commit:     2c3bf701dff1c57800b8e2ada20559049714aef2
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 28 21:41:41 2017 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Fri Jul 28 21:42:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c3bf701

sci-mathematics/arb: fixed for linking with PIE

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 .../arb/{arb-2.11.1.ebuild => arb-2.11.1-r1.ebuild}     |  5 ++++-
 sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch     | 17 +++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/arb/arb-2.11.1.ebuild 
b/sci-mathematics/arb/arb-2.11.1-r1.ebuild
similarity index 92%
rename from sci-mathematics/arb/arb-2.11.1.ebuild
rename to sci-mathematics/arb/arb-2.11.1-r1.ebuild
index bea3d8d89ec..88e262a3d9f 100644
--- a/sci-mathematics/arb/arb-2.11.1.ebuild
+++ b/sci-mathematics/arb/arb-2.11.1-r1.ebuild
@@ -21,6 +21,8 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
+PATCHES=( "${FILESDIR}"/${P}-pie-ftbs.patch )
+
 src_configure() {
        # Not an autoconf configure script.
        # Note that it appears to have been cloned from the flint configure 
script
@@ -31,7 +33,8 @@ src_configure() {
                --with-flint="${EPREFIX}/usr" \
                --with-gmp="${EPREFIX}/usr" \
                --with-mpfr="${EPREFIX}/usr" \
-               $(use_enable static-libs static) || die
+               $(use_enable static-libs static) \
+               CFLAGS="${CPPFLAGS} ${CFLAGS}" || die
 }
 
 src_compile() {

diff --git a/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch 
b/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch
new file mode 100644
index 00000000000..b2db6b2a294
--- /dev/null
+++ b/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch
@@ -0,0 +1,17 @@
+Description: Use -r instead of -Wl,-r to fix FTBFS with PIE enabled
+Author: Logan Rosen
+Forwarded: yes
+
+diff --git a/Makefile.subdirs b/Makefile.subdirs
+index 3dc757d..f0ec923 100644
+--- a/Makefile.subdirs
++++ b/Makefile.subdirs
+@@ -52,7 +52,7 @@ $(BUILD_DIR)/$(MOD_DIR)_%.o: %.c
+       $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF 
"$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@"
+ 
+ $(MOD_LOBJ): $(LOBJS)
+-      $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib
++      $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib
+ 
+ -include $(LOBJS:.lo=.d)
+ 

Reply via email to