components/r/patches/01-fix-zlib-fail.patch
author Rich Burridge <rich.burridge@oracle.com>
Thu, 16 Mar 2017 12:24:20 -0700
changeset 7768 b2bf3840279b
parent 7742 594dd2cf6dec
permissions -rw-r--r--
25712939 R doesn't like zlib 1.2.10+ (fix build)

zlib version check fails

The proper fix is already committed upstream. See:

https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17204

For now we just patch the configure script to solve the problem.
When R is updated to version 3.3.3 (CR #25681843), then the real fix will
take affect and this patch can be removed.

--- R-3.3.2/configure.orig	2017-03-16 10:57:21.167034116 +0000
+++ R-3.3.2/configure	2017-03-16 10:58:12.704864360 +0000
@@ -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