summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-06-29 18:29:21 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-06-29 18:29:21 +0000
commita6b9937a8ae7d73a60a3a474743a13db0f9f2f85 (patch)
tree4ce61a8c43272d2272a31f1b67b7b737ce73a9e5 /sys-apps
parentDrop ~ppc since it can't compile sci-physics/root (diff)
downloadgentoo-2-a6b9937a8ae7d73a60a3a474743a13db0f9f2f85.tar.gz
gentoo-2-a6b9937a8ae7d73a60a3a474743a13db0f9f2f85.tar.bz2
gentoo-2-a6b9937a8ae7d73a60a3a474743a13db0f9f2f85.zip
Fix building with -Wl,--as-needed wrt #313369 by Kacper Kowalik.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/hwinfo/ChangeLog6
-rw-r--r--sys-apps/hwinfo/files/hwinfo-16.0-asneeded.patch18
-rw-r--r--sys-apps/hwinfo/hwinfo-16.0.ebuild6
3 files changed, 28 insertions, 2 deletions
diff --git a/sys-apps/hwinfo/ChangeLog b/sys-apps/hwinfo/ChangeLog
index 35c7b3baa1e8..6e1946caad66 100644
--- a/sys-apps/hwinfo/ChangeLog
+++ b/sys-apps/hwinfo/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/hwinfo
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwinfo/ChangeLog,v 1.14 2010/02/23 17:30:54 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwinfo/ChangeLog,v 1.15 2010/06/29 18:29:21 ssuominen Exp $
+
+ 29 Jun 2010; Samuli Suominen <ssuominen@gentoo.org> hwinfo-16.0.ebuild,
+ +files/hwinfo-16.0-asneeded.patch:
+ Fix building with -Wl,--as-needed wrt #313369 by Kacper Kowalik.
23 Feb 2010; Markos Chandras <hwoarang@gentoo.org> hwinfo-16.0.ebuild:
Stable on amd64 wrt bug #305499
diff --git a/sys-apps/hwinfo/files/hwinfo-16.0-asneeded.patch b/sys-apps/hwinfo/files/hwinfo-16.0-asneeded.patch
new file mode 100644
index 000000000000..571a757a8583
--- /dev/null
+++ b/sys-apps/hwinfo/files/hwinfo-16.0-asneeded.patch
@@ -0,0 +1,18 @@
+Fixing as-needed issues and respecting LDFLAGS
+
+http://bugs.gentoo.org/313369
+
+--- src/Makefile
++++ src/Makefile
+@@ -23,9 +23,9 @@
+
+ ifdef SHARED_FLAGS
+ $(LIBHD_SO): $(LIBHD)
+- $(CC) -shared $(SO_LIBS) -Wl,--whole-archive $(LIBHD) -Wl,--no-whole-archive \
++ $(CC) $(LDFLAGS) -shared -Wl,--whole-archive $(LIBHD) -Wl,--no-whole-archive \
+ -Wl,-soname=$(LIBHD_SONAME) \
+- -o $(LIBHD_SO)
++ -o $(LIBHD_SO) $(SO_LIBS)
+ ln -snf $(LIBHD_NAME) $(LIBHD_SONAME)
+ ln -snf $(LIBHD_SONAME) $(LIBHD_BASE).so
+ else
diff --git a/sys-apps/hwinfo/hwinfo-16.0.ebuild b/sys-apps/hwinfo/hwinfo-16.0.ebuild
index 691e41db4eb8..4a076f1e348c 100644
--- a/sys-apps/hwinfo/hwinfo-16.0.ebuild
+++ b/sys-apps/hwinfo/hwinfo-16.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwinfo/hwinfo-16.0.ebuild,v 1.4 2010/02/23 17:30:54 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwinfo/hwinfo-16.0.ebuild,v 1.5 2010/06/29 18:29:21 ssuominen Exp $
EAPI=2
inherit eutils
@@ -51,6 +51,10 @@ src_prepare() {
echo 'libs: subdirs' >>"${S}"/Makefile
echo 'ranlib: $(LIBHD) subdirs' >>"${S}"/Makefile
echo -e "\tranlib \$(LIBHD)" >>"${S}"/Makefile
+
+ sed -i -e 's/LDFLAGS = /LDFLAGS := $(LDFLAGS) /' "${S}"/Makefile.common || die
+ sed -i -e 's/(CFLAGS)/& $(LDFLAGS)/' "${S}"/src/ids/Makefile || die
+ epatch "${FILESDIR}"/${PN}-16.0-asneeded.patch
}
src_compile(){