nixpkgs/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch
2018-06-01 11:15:47 +02:00

22 lines
1.4 KiB
Diff

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/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}"
lhea_shlib_cflags="-fPIC -fno-common"
;;