summary refs log tree commit diff
path: root/pkgs/development/r-modules/patches/RNifti.patch
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2022-03-14 13:45:57 +1100
committerJustin Bedo <cu@cua0.org>2022-03-14 13:50:02 +1100
commit95d69d32d9236943da3abf62d3dd2b2274770f88 (patch)
tree24a4ecf5d04067c29c739e3f6fae2f6149bd90b3 /pkgs/development/r-modules/patches/RNifti.patch
parentf67c61e0d507ed352e33be64d0d02b9d6be0488b (diff)
downloadnixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.tar
nixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.tar.gz
nixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.tar.bz2
nixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.tar.lz
nixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.tar.xz
nixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.tar.zst
nixpkgs-95d69d32d9236943da3abf62d3dd2b2274770f88.zip
rPackages.RNifti: use nixpkgs zlib
Build was failing due to incorrect zlib macro expansion.
Patch to use nixpkgs zlib rather than vendored copy.
Diffstat (limited to 'pkgs/development/r-modules/patches/RNifti.patch')
-rw-r--r--pkgs/development/r-modules/patches/RNifti.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/r-modules/patches/RNifti.patch b/pkgs/development/r-modules/patches/RNifti.patch
new file mode 100644
index 00000000000..e8f3561e750
--- /dev/null
+++ b/pkgs/development/r-modules/patches/RNifti.patch
@@ -0,0 +1,33 @@
+diff --git a/configure.ac b/configure.ac
+index 05e8a1e..2dcde81 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,16 +17,5 @@ CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
+ CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
+ LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`
+ 
+-# Checks for libraries.
+-ZLIB_FLAGS="-Izlib"
+-ZLIB_OBJECTS=`ls -1 src/zlib/*.c | sed 's/^src\///' | sed 's/\\.c$/\\.o/'`
+-AC_SEARCH_LIBS([inflate], [z], [
+-    ZLIB_FLAGS=""
+-    ZLIB_OBJECTS=""
+-])
+-
+-AC_SUBST(ZLIB_FLAGS)
+-AC_SUBST(ZLIB_OBJECTS)
+-
+ AC_CONFIG_FILES([src/Makevars])
+ AC_OUTPUT
+diff --git a/src/Makevars.in b/src/Makevars.in
+index 77da572..358cc1d 100644
+--- a/src/Makevars.in
++++ b/src/Makevars.in
+@@ -1,5 +1,5 @@
+-PKG_CPPFLAGS = -DNDEBUG -DHAVE_ZLIB -DUSING_R -DRNIFTI_NIFTILIB_DEDUPLICATE -I../inst/include @ZLIB_FLAGS@
++PKG_CPPFLAGS = -DNDEBUG -DHAVE_ZLIB -DUSING_R -DRNIFTI_NIFTILIB_DEDUPLICATE -I../inst/include
+ PKG_LIBS = @LIBS@
+ 
+ NIFTI_OBJECTS = znzlib/znzlib.o niftilib/nifti1_io.o niftilib/nifti2_io.o
+-OBJECTS = main.o zzz.o @ZLIB_OBJECTS@ $(NIFTI_OBJECTS)
++OBJECTS = main.o zzz.o $(NIFTI_OBJECTS)