summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2021-05-15 06:17:48 +0000
committerPatrick Lauer <patrick@gentoo.org>2021-05-15 06:17:56 +0000
commitb570cc1949e886b4e3ddcde94198c4c7c3924fc1 (patch)
tree155c6f2c95d5146d0a7c7201943272b05eb4cc00
parentsys-kernel/pf-sources: bump to 5.12-pf2 (diff)
downloadgentoo-b570cc1949e886b4e3ddcde94198c4c7c3924fc1.tar.gz
gentoo-b570cc1949e886b4e3ddcde94198c4c7c3924fc1.tar.bz2
gentoo-b570cc1949e886b4e3ddcde94198c4c7c3924fc1.zip
app-arch/zstd: Bump to 1.5.0
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Patrick Lauer <patrick@gentoo.org>
-rw-r--r--app-arch/zstd/Manifest1
-rw-r--r--app-arch/zstd/zstd-1.5.0.ebuild69
2 files changed, 70 insertions, 0 deletions
diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index f0e458f47e8e..7950f8b80cac 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1 +1,2 @@
DIST zstd-1.4.9.tar.gz 1834843 BLAKE2B 907f492bd023db9459bdc292a0bc4d1b6336d92dd7041eb2b36668589c20fcb98c411b85d78f92cd16d9b4a000d9c4125b5f966a5ca777034ae78210e639315b SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133
+DIST zstd-1.5.0.tar.gz 1867111 BLAKE2B e503d17478b94128eb3ec578178f9d7023e941434dcc07790e12fd6c9933518f34fba5d7795ab7b145e4e499597644a6edd2830106649c5a749c962d5afe2f31 SHA512 25b657529a698eec891f92ff4a085d1fd95d2ff938ce52c8a4ff6163eb0b668ec642dd09e0db190652638cd92371006afa01d8e437437762c4097ad301675c33
diff --git a/app-arch/zstd/zstd-1.5.0.ebuild b/app-arch/zstd/zstd-1.5.0.ebuild
new file mode 100644
index 000000000000..a7b21ee6fe57
--- /dev/null
+++ b/app-arch/zstd/zstd-1.5.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic 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 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="lz4 static-libs +threads"
+
+RDEPEND="app-arch/xz-utils
+ lz4? ( app-arch/lz4 )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ multilib_copy_sources
+
+ # Workaround #713940 / https://github.com/facebook/zstd/issues/2045
+ # where upstream build system does not add -pthread for Makefile-based
+ # build system.
+ use threads && append-flags $(test-flags-CCLD -pthread)
+}
+
+mymake() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ "${@}"
+}
+
+multilib_src_compile() {
+ local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') )
+
+ mymake -C lib ${libzstd_targets[@]} libzstd.pc
+
+ if multilib_is_native_abi ; then
+ mymake HAVE_LZ4="$(usex lz4 1 0)" zstd
+
+ mymake -C contrib/pzstd
+ fi
+}
+
+multilib_src_install() {
+ mymake -C lib DESTDIR="${D}" install
+
+ if multilib_is_native_abi ; then
+ mymake -C programs DESTDIR="${D}" install
+
+ mymake -C contrib/pzstd DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if ! use static-libs; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}