aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-09-27 16:53:47 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-10-02 14:41:25 +0200
commit4c64dc9af87ba1826c4cbeef887b69663c5966c0 (patch)
treed8f00ee804f35ec936c339a9ae0305a4a68579fc
parent9c15cb9329a8e465529a8a8759b808b15e3df97e (diff)
workaround verconf.h problem
-rw-r--r--tools/distrib/build_ruby_environment_macos.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh
index c2240ce976..fe0c5a4d70 100644
--- a/tools/distrib/build_ruby_environment_macos.sh
+++ b/tools/distrib/build_ruby_environment_macos.sh
@@ -21,9 +21,10 @@ CROSS_RUBY=`mktemp tmpfile.XXXXXXXX`
curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v1.0.3/tasks/bin/cross-ruby.rake > $CROSS_RUBY
+# See https://github.com/grpc/grpc/issues/12161 for verconf.h patch details
patch $CROSS_RUBY << EOF
---- cross-ruby.rake 2016-02-05 16:26:53.000000000 -0800
-+++ cross-ruby.rake.patched 2016-02-05 16:27:33.000000000 -0800
+--- cross-ruby.rake 2017-09-27 16:46:00.311020325 +0200
++++ patched 2017-09-27 16:49:46.127016895 +0200
@@ -133,7 +133,8 @@
"--host=#{MINGW_HOST}",
"--target=#{MINGW_TARGET}",
@@ -32,8 +33,16 @@ patch $CROSS_RUBY << EOF
+ '--enable-static',
+ '--disable-shared',
'--disable-install-doc',
- '--without-tk',
- '--without-tcl'
+ '--with-ext='
+ ]
+@@ -151,6 +152,7 @@
+ # make
+ file "#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/ruby.exe" => ["#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/Makefile"] do |t|
+ chdir File.dirname(t.prerequisites.first) do
++ sh "test -s verconf.h || rm -f verconf.h" # if verconf.h has size 0, make sure it gets re-built by make
+ sh MAKE
+ end
+ end
EOF
MAKE="make -j8"