Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a8925a2188b6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e126a8c8a5a4
Choose a head ref
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on May 30, 2018

  1. cfitsio: add darwin support

    smaret committed May 30, 2018
    Copy the full SHA
    3d2fd22 View commit details

Commits on May 31, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d629dae View commit details

Commits on Jun 1, 2018

  1. Copy the full SHA
    73bc473 View commit details
  2. Merge pull request #41254 from smaret/cfitsio

    cfitsio: add Darwin support
    LnL7 authored Jun 1, 2018
    Copy the full SHA
    e126a8c View commit details
25 changes: 25 additions & 0 deletions pkgs/development/libraries/cfitsio/darwin-curl-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff -ruN cfitsio/configure cfitsio-curl-config/configure
--- cfitsio/configure 2018-05-09 21:16:00.000000000 +0200
+++ cfitsio-curl-config/configure 2018-05-30 13:28:58.000000000 +0200
@@ -4783,13 +4783,6 @@
CURL_LIB=""
CURL_INC=""
# Use curl-config to get compiler & linker flags, if available.
-# On Macs, prefer XCode curl-config, and reject MacPorts version
-# until further notice to prevent build errors:
-if test "x$EXT" = xdarwin -a -x /usr/bin/curl-config; then
- CURLCONFIG="/usr/bin/curl-config"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for curl-config... choosing /usr/bin/curl-config on Mac" >&5
-$as_echo "checking for curl-config... choosing /usr/bin/curl-config on Mac" >&6; }
-else
# Extract the first word of "curl-config", so it can be a program name with args.
set dummy curl-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -4833,7 +4826,6 @@
fi
fi
fi
-fi
CURLCONFIG=$ac_cv_prog_CURLCONFIG
if test -n "$CURLCONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLCONFIG" >&5
21 changes: 21 additions & 0 deletions pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch
Original file line number Diff line number Diff line change
@@ -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/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}"

lhea_shlib_cflags="-fPIC -fno-common"
;;
6 changes: 4 additions & 2 deletions pkgs/development/libraries/cfitsio/default.nix
Original file line number Diff line number Diff line change
@@ -8,9 +8,11 @@
sha256 = "07fghxh5fl8nqk3q0dh8rvc83npnm0hisxzcj16a6r7gj5pmp40l";
};

patches = [ ./darwin-curl-config.patch ./darwin-rpath-universal.patch ];

# Shared-only build
buildFlags = "shared";
patchPhase = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in
postPatch = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in
'';

meta = with stdenv.lib; {
@@ -27,6 +29,6 @@
'';
# Permissive BSD-style license.
license = "permissive";
platforms = platforms.linux;
platforms = with platforms; linux ++ darwin;
};
}