cfitsio: use absolute references instead of rpath on darwin

This commit is contained in:
Sebastien Maret 2018-05-31 11:55:10 +02:00
parent 3d2fd2268b
commit d629daeb2c
3 changed files with 22 additions and 13 deletions

View file

@ -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"
;;

View file

@ -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

View file

@ -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";