3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/r-modules/patches/RNifti.patch
Justin Bedo 95d69d32d9
rPackages.RNifti: use nixpkgs zlib
Build was failing due to incorrect zlib macro expansion.
Patch to use nixpkgs zlib rather than vendored copy.
2022-03-14 13:50:02 +11:00

34 lines
1.1 KiB
Diff

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)