summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 8e7767efc866..21dc5de4ab78 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}"
}