From a501e4f22f29cc96a7f77371d27364b0a2a32d48 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Tue, 23 Dec 2014 16:45:09 +0100 Subject: [PATCH] Add ruby patch for statically linking zlib extension --- patches/ruby/static_zlib.patch | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 patches/ruby/static_zlib.patch diff --git a/patches/ruby/static_zlib.patch b/patches/ruby/static_zlib.patch new file mode 100644 index 0000000..764ca58 --- /dev/null +++ b/patches/ruby/static_zlib.patch @@ -0,0 +1,43 @@ +--- a/common.mk ++++ b/common.mk +@@ -95,6 +95,7 @@ COMMONOBJS = array.$(OBJEXT) \ + vm_trace.$(OBJEXT) \ + thread.$(OBJEXT) \ + cont.$(OBJEXT) \ ++ ext/zlib/zlib.$(OBJEXT) \ + $(BUILTIN_ENCOBJS) \ + $(BUILTIN_TRANSOBJS) \ + $(MISSING) +diff --git a/ruby-2.1.5.orig/configure b/ruby-2.1.5/configure +index d0f1f68..45ab642 100755 +--- a/configure ++++ b/configure +@@ -2838,6 +2838,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + ++LIBS="$LIBS -lz" ++ + { # environment section + + +--- a/configure.in ++++ b/configure.in +@@ -31,6 +31,8 @@ rm() { + } + ])])]) + ++LIBS="$LIBS -lz" ++ + { # environment section + + AC_ARG_WITH(baseruby, +--- a/inits.c ++++ b/inits.c +@@ -61,5 +61,6 @@ rb_call_inits(void) + CALL(Complex); + CALL(version); + CALL(vm_trace); ++ CALL(zlib); + } + #undef CALL