summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-09-12 01:20:26 -0400
committerMike Frysinger <vapier@gentoo.org>2015-09-12 01:22:14 -0400
commit9213bd4562ec1636922d8b420bcd110f4c14e8ec (patch)
treea023b884e6fae16e9ee94fea9f7127440537f578 /sys-fs
parentdev-ruby/mini_magick: version bump (diff)
downloadgentoo-9213bd4562ec1636922d8b420bcd110f4c14e8ec.tar.gz
gentoo-9213bd4562ec1636922d8b420bcd110f4c14e8ec.tar.bz2
gentoo-9213bd4562ec1636922d8b420bcd110f4c14e8ec.zip
sys-fs/xfsprogs: rework static flag handling #551810
The use of -static when linking causes bad rpaths when USE=-static-libs because only dynamic xfs libs are available. But we don't really want to link the programs against the static xfs libs when we have dynamic ones available.
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/xfsprogs/xfsprogs-4.2.0.ebuild11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys-fs/xfsprogs/xfsprogs-4.2.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.2.0.ebuild
index 35a490f370b9..45d31297c5c8 100644
--- a/sys-fs/xfsprogs/xfsprogs-4.2.0.ebuild
+++ b/sys-fs/xfsprogs/xfsprogs-4.2.0.ebuild
@@ -39,15 +39,14 @@ pkg_setup() {
src_prepare() {
epatch "${FILESDIR}"/${PN}-4.2.0-sharedlibs.patch
+ # LLDFLAGS is used for programs, so apply -all-static when USE=static is enabled.
+ # Clear out -static from all flags since we want to link against dynamic xfs libs.
sed -i \
-e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ -e "1iLLDFLAGS += $(usex static '-all-static' '')" \
include/builddefs.in || die
- sed -i \
- -e '1iLLDFLAGS = -static' \
- {estimate,fsr}/Makefile || die
- sed -i \
- -e "/LLDFLAGS/s:-static-libtool-libs:$(use static && echo -all-static):" \
- $(find -name Makefile) || die
+ find -name Makefile -exec \
+ sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
# libdisk has broken blkid conditional checking
sed -i \