summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/zstd')
-rw-r--r--app-arch/zstd/zstd-1.1.0.ebuild28
1 files changed, 21 insertions, 7 deletions
diff --git a/app-arch/zstd/zstd-1.1.0.ebuild b/app-arch/zstd/zstd-1.1.0.ebuild
index bcfe360e065a..4e42b4fdc9d6 100644
--- a/app-arch/zstd/zstd-1.1.0.ebuild
+++ b/app-arch/zstd/zstd-1.1.0.ebuild
@@ -4,6 +4,8 @@
EAPI=6
+inherit toolchain-funcs
+
DESCRIPTION="zstd fast compression library"
HOMEPAGE="http://facebook.github.io/zstd/"
SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
@@ -16,15 +18,27 @@ IUSE="static-libs"
PATCHES=( "${FILESDIR}/${P}-fix_build_system.patch" )
src_compile() {
- emake PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" zstd
- cd lib &&
- emake PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" libzstd
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
+
+ emake -C lib \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" libzstd
}
src_install() {
- emake DESTDIR="${D}" \
- PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" install
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+ einstalldocs
- ! use static-libs &&
- rm -f $ "${ED}usr/$(get_libdir)/libzstd.a"
+ if ! use static-libs; then
+ rm "${ED%/}"/usr/$(get_libdir)/libzstd.a || die
+ fi
}