diff --git a/com.oracle.truffle.r.native/gnur/Makefile.gnur b/com.oracle.truffle.r.native/gnur/Makefile.gnur index 711ab5dc42fef24f2a05da9a323f0cdb95cdc232..2f82aecaa339c5a8d16481627cf289770394215d 100644 --- a/com.oracle.truffle.r.native/gnur/Makefile.gnur +++ b/com.oracle.truffle.r.native/gnur/Makefile.gnur @@ -57,11 +57,7 @@ all: Makefile $(GNUR_HOME) iconv config build $(GNUR_HOME): tar xf $(TOPDIR)/../libdownloads/R-$(R_VERSION).tar.gz -# Solaris doesn't need this and ed can't handle the size of the configure file! -ifneq ($(OSNAME), SunOS) - ed $(GNUR_HOME)/configure < edconfigure # to fix the zlib version check (fixed in GNUR in the meantime) -endif - + (cd $(GNUR_HOME) && patch < $(TOPDIR)/gnur/configure.patch) # to fix the zlib version check (fixed in GNUR in the meantime) # After this platform check, GNUR_CONFIG_FLAGS must be set ifeq ($(OSNAME), SunOS) diff --git a/com.oracle.truffle.r.native/gnur/configure.patch b/com.oracle.truffle.r.native/gnur/configure.patch new file mode 100644 index 0000000000000000000000000000000000000000..b4f0be9936176b6dc7ce55cc96c9234ecb966b97 --- /dev/null +++ b/com.oracle.truffle.r.native/gnur/configure.patch @@ -0,0 +1,18 @@ +--- ./R-3.3.2/configure Mon Oct 24 04:34:26 2016 ++++ ./configure.new Wed Jul 26 04:43:08 2017 +@@ -35507,10 +35507,11 @@ + #include <string.h> + #include <zlib.h> + int main() { +-#ifdef ZLIB_VERSION +-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such +- version on the master site zlib.net */ +- exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); ++#ifdef ZLIB_VERNUM ++ if (ZLIB_VERNUM < 0x1250) { ++ exit(1); ++ } ++ exit(0); + #else + exit(1); + #endif diff --git a/com.oracle.truffle.r.native/gnur/edconfigure b/com.oracle.truffle.r.native/gnur/edconfigure deleted file mode 100644 index ba5c8bbaf62383c3576331b6e809a59fff4e195e..0000000000000000000000000000000000000000 --- a/com.oracle.truffle.r.native/gnur/edconfigure +++ /dev/null @@ -1,9 +0,0 @@ -35510,35513c -#ifdef ZLIB_VERNUM - if (ZLIB_VERNUM < 0x1250) { - exit(1); - } - exit(0); -. -w -q