@@ -78,26 +78,26 @@ ENV RBENV_RUBIES="2.5.9 3.1.6 3.4.1"
7878
7979# Install the bootstrap rubies
8080RUN bash -c " \
81- echo 'gem: --no-ri --no-rdoc --no-document' > > ~/.gemrc && \
82- export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
83- for v in ${RBENV_RUBIES} ; do \
84- rbenv install \$v -- --disable-install-doc ; \
85- done && \
86- find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \
87- "
81+ echo 'gem: --no-ri --no-rdoc --no-document' > > ~/.gemrc && \
82+ export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
83+ for v in ${RBENV_RUBIES} ; do \
84+ rbenv install \$v -- --disable-install-doc ; \
85+ done && \
86+ find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \
87+ "
8888
8989# Install rake-compiler and patch it to build and install static libraries for Linux rubies
9090COPY build/patches /home/rubyuser/patches
9191RUN bash -c " \
92- for v in ${RBENV_RUBIES} ; do \
93- rbenv shell \$v && \
94- gem install rake-compiler -v1.2.9 && \
95- cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
96- for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
97- patch -p1 < \$patch ; \
98- done \
99- done \
100- "
92+ for v in ${RBENV_RUBIES} ; do \
93+ rbenv shell \$v && \
94+ gem install rake-compiler -v1.2.9 && \
95+ cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
96+ for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
97+ patch -p1 < \$patch ; \
98+ done \
99+ done \
100+ "
101101
102102# Install rake-compiler's cross rubies in global dir instead of /root
103103RUN sudo mkdir -p /usr/local/rake-compiler && \
@@ -134,16 +134,16 @@ strip = '-s' if platform !~ /darwin/
134134
135135xrubies_build_plan . each do |xrubies , bootstrap_ruby_version | %>
136136RUN bash -c " \
137- rbenv shell <%= bootstrap_ruby_version %> && \
138- export CPPFLAGS='<%= "-D__USE_MINGW_ANSI_STDIO=1" if platform =~ /x64-mingw-ucrt/ %> ' && \
139- export CFLAGS='-O1 -fno-omit-frame-pointer -fno-fast-math -fstack-protector-strong <%= strip %> ' && \
140- export LDFLAGS='-pipe <%= strip %> ' && \
141- <%= "export LIBS='-l:libssp.a' &&" if platform =~ /mingw/ %> \
142- <%= "export CC=#{ target } -clang &&" if platform =~ /darwin/ %> \
143- export MAKE='make V=1' && \
144- rake-compiler cross-ruby VERSION=<%= xrubies %> HOST=<%= target %> && \
145- rm -rf ~/.rake-compiler/builds ~/.rake-compiler/sources \
146- "
137+ rbenv shell <%= bootstrap_ruby_version %> && \
138+ export CPPFLAGS='<%= "-D__USE_MINGW_ANSI_STDIO=1" if platform =~ /x64-mingw-ucrt/ %> ' && \
139+ export CFLAGS='-O1 -fno-omit-frame-pointer -fno-fast-math -fstack-protector-strong <%= strip %> ' && \
140+ export LDFLAGS='-pipe <%= strip %> ' && \
141+ <%= "export LIBS='-l:libssp.a' &&" if platform =~ /mingw/ %> \
142+ <%= "export CC=#{ target } -clang &&" if platform =~ /darwin/ %> \
143+ export MAKE='make V=1' && \
144+ rake-compiler cross-ruby VERSION=<%= xrubies %> HOST=<%= target %> && \
145+ rm -rf ~/.rake-compiler/builds ~/.rake-compiler/sources \
146+ "
147147<% end %>
148148# "
149149
0 commit comments