summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-11-10 00:16:10 -0500
committerMike Frysinger <vapier@gentoo.org>2016-11-10 00:16:10 -0500
commit22099cef5b70c6147a3c040f95ec26ad57a17f48 (patch)
tree46c661c42c9db4e94af76ea348a5e0b2bb1410e3 /app-arch/lz4/lz4-9999.ebuild
parentx11-wm/enlightenment: drop USE=udev flag (diff)
downloadgentoo-22099cef5b70c6147a3c040f95ec26ad57a17f48.tar.gz
gentoo-22099cef5b70c6147a3c040f95ec26ad57a17f48.tar.bz2
gentoo-22099cef5b70c6147a3c040f95ec26ad57a17f48.zip
app-arch/lz4: add support for USE=static-libs
Diffstat (limited to 'app-arch/lz4/lz4-9999.ebuild')
-rw-r--r--app-arch/lz4/lz4-9999.ebuild23
1 files changed, 14 insertions, 9 deletions
diff --git a/app-arch/lz4/lz4-9999.ebuild b/app-arch/lz4/lz4-9999.ebuild
index 8e7767efc86..21dc5de4ab7 100644
--- a/app-arch/lz4/lz4-9999.ebuild
+++ b/app-arch/lz4/lz4-9999.ebuild
@@ -26,7 +26,7 @@ LICENSE="BSD-2 GPL-2"
# with abi-compliance-checker and update the subslot every time ABI
# changes. This is the least we can do to keep things sane.
SLOT="0/r131"
-IUSE="test valgrind"
+IUSE="static-libs test valgrind"
DEPEND="test? ( valgrind? ( dev-util/valgrind ) )"
@@ -34,27 +34,32 @@ src_prepare() {
if ! use valgrind; then
sed -i -e '/^test:/s|test-mem||g' programs/Makefile || die
fi
+ epatch "${FILESDIR}"/${PN}-0_p131-static-libs.patch
multilib_copy_sources
}
+lmake() {
+ emake \
+ BUILD_STATIC=$(usex static-libs) \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
+ "$@"
+}
+
multilib_src_compile() {
tc-export CC AR
# we must not use the 'all' target since it builds test programs
# & extra -m32 executables
- emake -C lib liblz4 liblz4.pc \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}"/usr/$(get_libdir)
- emake -C programs lz4 lz4c
+ lmake -C lib liblz4 liblz4.pc
+ lmake -C programs lz4 lz4c
# work around lack of proper target dependencies
touch lib/liblz4
}
multilib_src_test() {
- emake -j1 test
+ lmake -j1 test
}
multilib_src_install() {
- emake install DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ lmake install DESTDIR="${D}"
}