summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-12-03 18:24:19 +0100
committerFabian Groffen <grobian@gentoo.org>2017-12-03 18:24:34 +0100
commit5c118ba950c1ad185fb1d18e8121b59b9169d42b (patch)
tree6583ccc2f4eef273e42e04b2a56274135a39739a
parentnet-vpn/kvpnc: Drop 0.9.6a-r2, broken on stable, masked anyway (diff)
downloadgentoo-5c118ba950c1ad185fb1d18e8121b59b9169d42b.tar.gz
gentoo-5c118ba950c1ad185fb1d18e8121b59b9169d42b.tar.bz2
gentoo-5c118ba950c1ad185fb1d18e8121b59b9169d42b.zip
sci-electronics/ngspice: replace ldflags sed with a patch for Darwin
The sed was too greedy, causing bugs like #462318. Replace with a patch that ensures we only once append to LDFLAGS, not multiple times. Closes: https://bugs.gentoo.org/462318 Package-Manager: Portage-2.3.13, Repoman-2.3.3
-rw-r--r--sci-electronics/ngspice/Manifest4
-rw-r--r--sci-electronics/ngspice/files/ngspice-26-respect-ldflags.patch31
-rw-r--r--sci-electronics/ngspice/ngspice-26.ebuild6
3 files changed, 36 insertions, 5 deletions
diff --git a/sci-electronics/ngspice/Manifest b/sci-electronics/ngspice/Manifest
index 04a82ab9da5..65f631c0fa4 100644
--- a/sci-electronics/ngspice/Manifest
+++ b/sci-electronics/ngspice/Manifest
@@ -1,2 +1,2 @@
-DIST ngspice-26-manual.pdf 2141771 SHA256 30b4fde001d012b0350aae3ba64892fb2f315d04f6761b95abd79f4b7c4cd85d SHA512 1c160aeef61d8091a6d788677bcf7ea682393cc886d5d535f87bb800cdae4f095cbf1e833babadea481956b904b4bdb688cc18b80d9d6a29cab33a54275abab1 WHIRLPOOL 7e9be918599599da3bd6fc754afdc453e1cc6171cabe2afe05da2be24433b4c1ee46728c29995dc62d04d08f966a441a853aa231b37b55e7bcfd587832dcb5b1
-DIST ngspice-26.tar.gz 6925987 SHA256 51e230c8b720802d93747bc580c0a29d1fb530f3dd06f213b6a700ca9a4d0108 SHA512 eb6a81df90de803c9f7544e8d0de7cc413aac169f69d1dec5cc6d2e667b66d42aede7f14c75bcdd10288be0c2ac07863fd4028b9fe59f2f515d680c2ffa41cab WHIRLPOOL cb356ee817fa00ab4a195c8380445adddf6426b5b08ca7c9af1bd96e6f43f3643bc6e4d2d9a7e4a3f3a79f43aa40b0da08721c2e42365c79b5f2e6bad6aef669
+DIST ngspice-26-manual.pdf 2141771 BLAKE2B 16956c46640de4696f7197997b170a2b1aad9b2f9fbe299b801de100d8aaca949b5be6f259e353a168ae90d992d91ff65e8a819b49fdf509fae98ec7dfa610d7 SHA512 1c160aeef61d8091a6d788677bcf7ea682393cc886d5d535f87bb800cdae4f095cbf1e833babadea481956b904b4bdb688cc18b80d9d6a29cab33a54275abab1
+DIST ngspice-26.tar.gz 6925987 BLAKE2B 8f8e54000234ea3896a55863df99b6ce83ad322e3049845e0a817635ebfebdc8398e6fa4831727c4798a8d9dce1b1c2a01354505e48dc0b2db9e9036aa2ae5aa SHA512 eb6a81df90de803c9f7544e8d0de7cc413aac169f69d1dec5cc6d2e667b66d42aede7f14c75bcdd10288be0c2ac07863fd4028b9fe59f2f515d680c2ffa41cab
diff --git a/sci-electronics/ngspice/files/ngspice-26-respect-ldflags.patch b/sci-electronics/ngspice/files/ngspice-26-respect-ldflags.patch
new file mode 100644
index 00000000000..31fe300b105
--- /dev/null
+++ b/sci-electronics/ngspice/files/ngspice-26-respect-ldflags.patch
@@ -0,0 +1,31 @@
+--- ngspice-26/src/xspice/icm/makedefs.in
++++ ngspice-26/src/xspice/icm/makedefs.in
+@@ -44,16 +44,19 @@
+ LIBS = -lm
+
+ # Flags to use when linking shared library
+-LDFLAGS = -shared
+ ifeq ($(ISMINGW), 1)
+- LDFLAGS = -shared @LDFLAGS@
+-endif
+-ifeq "$(strip $(uname))" "Darwin"
+- LDFLAGS = -bundle -flat_namespace -undefined suppress
+-endif
+-ifeq "$(strip $(uname))" "SunOS"
+- ifneq "$(CC)" "gcc"
+- LDFLAGS = -G
++ LDFLAGS += -shared @LDFLAGS@
++else
++ ifeq "$(strip $(uname))" "Darwin"
++ LDFLAGS += -bundle -flat_namespace -undefined suppress
++ else
++ ifeq "$(strip $(uname))" "SunOS"
++ ifneq "$(CC)" "gcc"
++ LDFLAGS += -G
++ else
++ LDFLAGS += -shared
++ endif
++ endif
+ endif
+ endif
+
diff --git a/sci-electronics/ngspice/ngspice-26.ebuild b/sci-electronics/ngspice/ngspice-26.ebuild
index 6150e239ac6..3c185422f41 100644
--- a/sci-electronics/ngspice/ngspice-26.ebuild
+++ b/sci-electronics/ngspice/ngspice-26.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="3"
@@ -13,7 +13,7 @@ LICENSE="BSD GPL-2"
SLOT="0"
IUSE="X debug readline"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x64-macos"
DEPEND="sys-libs/ncurses
readline? ( >=sys-libs/readline-5.0 )
@@ -25,9 +25,9 @@ DEPEND="sys-libs/ncurses
RDEPEND="$DEPEND"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-respect-ldflags.patch
sed -e '/CFLAGS=/s: -s::' -i configure.ac || die "sed failed"
sed -e 's/_CFLAGS -O2/_CFLAGS/' -i configure.ac || die "sed failed"
- sed -e 's/LDFLAGS =/LDFLAGS +=/' -i src/xspice/icm/makedefs.in || die "sed failed"
sed -e '/AM_INIT_AUTOMAKE/s:-Werror::' -i configure.ac || die "sed failed"
# builds also with ncurses[tinfo] (bug #458128)
sed -e 's/ncurses termcap/ncurses termcap tinfo/g' -i configure.ac || die