forked from wjessop/build_ruby
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add template for libssl and yjit for 3.2.0
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Only produces builds for ruby >= 2.4 due to the newer openssl | ||
# see https://3.basecamp.com/2914079/buckets/21350690/todos/4209849128 | ||
# | ||
# We should drop this variant when we move beyond bionic | ||
|
||
# Can't use {{.Distro}} since it's ubuntu:18.04:libssl | ||
FROM ubuntu:18.04 | ||
RUN apt-get update | ||
RUN apt-get install -y build-essential \ | ||
libc6-dev libffi-dev libgdbm-dev libncurses5-dev \ | ||
libreadline-dev libssl-dev libyaml-dev zlib1g-dev rustc \ | ||
curl ruby ruby-dev | ||
RUN ["/usr/bin/gem", "install", "bundler", "-v", "1.17.3", "--no-rdoc", "--no-ri"] | ||
ADD Gemfile / | ||
ADD Gemfile.lock / | ||
RUN ["bundle", "install"] | ||
|
||
RUN curl {{.DownloadUrl}}|tar oxzC /tmp | ||
{{range .Patches}}ADD {{.}} / | ||
{{end}} | ||
WORKDIR /tmp/ruby-{{.RubyVersion}} | ||
RUN for i in `/bin/ls /*.patch`; do patch -p0 < $i; done | ||
RUN CFLAGS='-march=x86-64 -O3 -fno-fast-math -g3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -std=iso9899:1999 -fPIC' ./configure \ | ||
--prefix=/opt/ruby{{.RubyVersion}} \ | ||
--enable-shared \ | ||
--disable-install-doc \ | ||
--enable-load-relative \ | ||
--enable-yjit | ||
# Seems to only affect some 1.9 series Rubies, but the combined make step: | ||
# | ||
# RUN make -j8 install DESTDIR=/tmp/fpm | ||
# | ||
# that ran the make then make install, was broken. Splitting it up into | ||
# two separate commands works fine: | ||
RUN make -j{{.NumCPU}} | ||
RUN make install DESTDIR=/tmp/fpm | ||
|
||
WORKDIR / | ||
RUN fpm \ | ||
-s dir \ | ||
-t deb \ | ||
-n ruby-{{.RubyVersion}} \ | ||
-a {{.Arch}} \ | ||
-v {{.RubyVersion}} \ | ||
{{.Iteration}} | ||
-d libc6-dev \ | ||
-d libffi-dev \ | ||
-d libgdbm-dev \ | ||
-d libncurses5-dev \ | ||
-d libreadline-dev \ | ||
-d libssl-dev \ | ||
-d libyaml-dev \ | ||
-d zlib1g-dev \ | ||
-C /tmp/fpm \ | ||
-p /{{.FileName}} \ | ||
opt |