diff --git a/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch b/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch new file mode 100644 index 000000000000..7ac051326517 --- /dev/null +++ b/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch @@ -0,0 +1,21 @@ +diff -ruN cfitsio/configure cfitsio-rpath-universal/configure +--- cfitsio/configure 2018-05-09 21:16:00.000000000 +0200 ++++ cfitsio-rpath-universal/configure 2018-05-31 12:02:25.000000000 +0200 +@@ -4727,16 +4727,7 @@ + SHLIB_SUFFIX=".dylib" + CFITSIO_SHLIB="lib\${PACKAGE}.\${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}\${SHLIB_SUFFIX}" + CFITSIO_SHLIB_SONAME="lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX}" +- case $host in +- *darwin[56789]*) +- SHLIB_LD="$CC -dynamiclib -install_name lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" +- ;; +- *) +- # Build 'Universal' binaries (i386 & x86_64 architectures) and +- # use rpath token on Darwin 10.x or newer: +- SHLIB_LD="$CC -dynamiclib $C_UNIV_SWITCH -headerpad_max_install_names -install_name @rpath/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" +- ;; +- esac ++ SHLIB_LD="$CC -dynamiclib -install_name ${out}/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" + + lhea_shlib_cflags="-fPIC -fno-common" + ;; diff --git a/pkgs/development/libraries/cfitsio/darwin-universal.patch b/pkgs/development/libraries/cfitsio/darwin-universal.patch deleted file mode 100644 index db9b7b5a56e4..000000000000 --- a/pkgs/development/libraries/cfitsio/darwin-universal.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN cfitsio/configure cfitsio-universal/configure ---- cfitsio/configure 2018-05-09 21:16:00.000000000 +0200 -+++ cfitsio-universal/configure 2018-05-30 14:26:03.000000000 +0200 -@@ -4734,7 +4734,7 @@ - *) - # Build 'Universal' binaries (i386 & x86_64 architectures) and - # use rpath token on Darwin 10.x or newer: -- SHLIB_LD="$CC -dynamiclib $C_UNIV_SWITCH -headerpad_max_install_names -install_name @rpath/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" -+ SHLIB_LD="$CC -dynamiclib -headerpad_max_install_names -install_name @rpath/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" - ;; - esac - diff --git a/pkgs/development/libraries/cfitsio/default.nix b/pkgs/development/libraries/cfitsio/default.nix index 1fc9b62ccc86..a21158723be1 100644 --- a/pkgs/development/libraries/cfitsio/default.nix +++ b/pkgs/development/libraries/cfitsio/default.nix @@ -8,7 +8,7 @@ sha256 = "07fghxh5fl8nqk3q0dh8rvc83npnm0hisxzcj16a6r7gj5pmp40l"; }; - patches = [ ./darwin-curl-config.patch ./darwin-universal.patch ]; + patches = [ ./darwin-curl-config.patch ./darwin-rpath-universal.patch ]; # Shared-only build buildFlags = "shared";