From eb6d2ed6818bd6fdc06febd825c1daa06c50b616 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 3 Dec 2017 15:20:30 +0100 Subject: sci-libs/dsdp: fix shared lib compilation on Darwin, bug #450388 Based on the patch by MATSUI Tetsushi, ensure we don't spit out GNU ld options for Darwin. Closes: https://bugs.gentoo.org/450388 Package-Manager: Portage-2.3.13, Repoman-2.3.3 --- sci-libs/dsdp/Manifest | 2 +- sci-libs/dsdp/dsdp-5.8-r3.ebuild | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sci-libs/dsdp/Manifest b/sci-libs/dsdp/Manifest index a8bd51051e28..a7ad6a29eb95 100644 --- a/sci-libs/dsdp/Manifest +++ b/sci-libs/dsdp/Manifest @@ -1 +1 @@ -DIST DSDP5.8.tar.gz 2608518 SHA256 26aa624525a636de272c0b329e2dfd01a0d5b7827f1c1c76f393d71e37dead70 SHA512 0a32a34e33dcac151e95ed0f8cee62603bbe2b4ba1e448bba35324fe576376cb33c15908cde61ae5a7c0dcdea945f1ec544f19b3dd36524158573260182e080e WHIRLPOOL 63f5ce91d1c624b3c8f4d6ba61f8f386e739c0a5ad97515b4d36bb6026751ff4ca83b6a466deb5983e15eab3c84879bc3d87d7f2613e8070ab989e2607da9ddf +DIST DSDP5.8.tar.gz 2608518 BLAKE2B d464db2956080a33c300520ed291e1b45aeedd28378d5aab753977688bfe74d953f1d40a7aa10c2af8b70808d97dc5ece0c98d2795f707a9a3d2128302658286 SHA512 0a32a34e33dcac151e95ed0f8cee62603bbe2b4ba1e448bba35324fe576376cb33c15908cde61ae5a7c0dcdea945f1ec544f19b3dd36524158573260182e080e diff --git a/sci-libs/dsdp/dsdp-5.8-r3.ebuild b/sci-libs/dsdp/dsdp-5.8-r3.ebuild index b5304b9065c0..4da8972809f3 100644 --- a/sci-libs/dsdp/dsdp-5.8-r3.ebuild +++ b/sci-libs/dsdp/dsdp-5.8-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -30,11 +30,22 @@ PATCHES=( make_shared_lib() { local soname=$(basename "${1%.a}")$(get_libname $(get_major_version)) + local cflags=() + + if [[ ${CHOST} == *-darwin* ]] ; then + cflags+=( + "-Wl,-install_name" + "-Wl,${EPREFIX}/usr/$(get_libdir)/${soname}" + ) + else + cflags+=( + "-shared" "-Wl,-soname=${soname}" + "-Wl,--whole-archive" "${1}" "-Wl,--no-whole-archive" + ) + fi einfo "Making ${soname}" ${2:-$(tc-getCC)} ${LDFLAGS} \ - -shared -Wl,-soname="${soname}" \ - $([[ ${CHOST} == *-darwin* ]] && echo "-Wl,-install_name -Wl,${EPREFIX}/usr/$(get_libdir)/${soname}") \ - -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \ + "${cflags[@]}" \ -o $(dirname "${1}")/"${soname}" \ -lm $($(tc-getPKG_CONFIG) --libs blas lapack) || return 1 } -- cgit v1.2.3-65-gdbad