diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2018-11-11 23:25:08 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2018-11-11 23:30:35 +0100 |
commit | dbd66e8ddda83af05fcdc387662bf0bdd79987f5 (patch) | |
tree | ead4aebebabdd103c1b6b74ffec7d6a69a079f89 /app-arch | |
parent | sys-fs/xfsprogs: Bump to version 4.19.0 (diff) | |
download | gentoo-dbd66e8ddda83af05fcdc387662bf0bdd79987f5.tar.gz gentoo-dbd66e8ddda83af05fcdc387662bf0bdd79987f5.tar.bz2 gentoo-dbd66e8ddda83af05fcdc387662bf0bdd79987f5.zip |
app-arch/zstd: Added multilib support.
Don't compile code in src_install()
Closes: https://bugs.gentoo.org/594514
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/zstd/zstd-1.3.7-r1.ebuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/app-arch/zstd/zstd-1.3.7-r1.ebuild b/app-arch/zstd/zstd-1.3.7-r1.ebuild new file mode 100644 index 000000000000..0882b2bed1d6 --- /dev/null +++ b/app-arch/zstd/zstd-1.3.7-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal toolchain-funcs + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="lz4 static-libs" + +RDEPEND="app-arch/xz-utils + lz4? ( app-arch/lz4 )" +DEPEND="${RDEPEND}" + +src_prepare() { + default + multilib_copy_sources +} + +multilib_src_compile() { + emake -C lib \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + libzstd libzstd.a libzstd.pc + + if multilib_is_native_abi ; then + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + HAVE_LZ4=$(usex lz4 1 0) \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd + + emake -C contrib/pzstd \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + fi +} + +multilib_src_install() { + emake -C lib \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" install + + if multilib_is_native_abi ; then + emake -C programs \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" install + + emake -C contrib/pzstd \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" install + fi +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs; then + find "${ED}" -name "*.a" -delete || die + fi +} |