From de3a52bd542e6503071f10800b8c76af908bb5be Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 10 Feb 2023 03:45:20 +0000 Subject: app-arch/zstd: add 1.5.4 Signed-off-by: Sam James --- app-arch/zstd/Manifest | 1 + app-arch/zstd/zstd-1.5.4.ebuild | 82 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 app-arch/zstd/zstd-1.5.4.ebuild (limited to 'app-arch/zstd') diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest index bc52aca1941e..59a72088df01 100644 --- a/app-arch/zstd/Manifest +++ b/app-arch/zstd/Manifest @@ -1,2 +1,3 @@ DIST zstd-1.4.9.tar.gz 1834843 BLAKE2B 907f492bd023db9459bdc292a0bc4d1b6336d92dd7041eb2b36668589c20fcb98c411b85d78f92cd16d9b4a000d9c4125b5f966a5ca777034ae78210e639315b SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133 DIST zstd-1.5.2.tar.gz 1950967 BLAKE2B 9d474e9fdcf7e5eb09d1f606712b05ca3001e8f6f7451254d8dba3f429101048532fd9c84a5b9083ae90d0457e9e1b1d48256581a1697e7db19b09d73595f070 SHA512 e107508a41fca50845cc2494e64adaba93efb95a2fa486fc962510a8ba4b2180d93067cae9870f119e88e5e8b28a046bc2240b0b23cdd8933d1fb1a6a9668c1e +DIST zstd-1.5.4.tar.gz 2178759 BLAKE2B 0c7ad42ebbf888bcd978eee95dc07f8e74c6b4ca1e1cec15ae110f5f57b66cb1d726896f71430e6219ef54ff90e722fc778147d5f77f4bff5395b0dc8b914885 SHA512 b6f64850ceb6cfed831fff3c43508d2a72338862a96dd9430b1d3ebbfcee40201c8b6dcf8b6b603e252bb96f3f283c9cb07da7f24414187f5f1fea3b51e01863 diff --git a/app-arch/zstd/zstd-1.5.4.ebuild b/app-arch/zstd/zstd-1.5.4.ebuild new file mode 100644 index 000000000000..b933a78b2570 --- /dev/null +++ b/app-arch/zstd/zstd-1.5.4.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal toolchain-funcs usr-ldscript + +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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+lzma lz4 static-libs zlib" + +RDEPEND=" + lzma? ( app-arch/xz-utils ) + lz4? ( app-arch/lz4 ) + zlib? ( sys-libs/zlib ) +" +DEPEND="${RDEPEND}" + +src_prepare() { + default + multilib_copy_sources +} + +mymake() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + V=1 \ + HAVE_LZMA="$(multilib_native_usex lzma 1 0)" \ + HAVE_LZ4="$(multilib_native_usex lz4 1 0)" \ + HAVE_ZLIB="$(multilib_native_usex zlib 1 0)" \ + "${@}" +} + +multilib_src_compile() { + local libzstd_targets=( libzstd{,.a}-mt ) + + mymake -C lib ${libzstd_targets[@]} libzstd.pc + + if multilib_is_native_abi ; then + mymake zstd + mymake -C contrib/pzstd + fi +} + +multilib_src_test() { + if multilib_is_native_abi ; then + # 'test' runs more tests than 'check'. + mymake -C tests test + mymake -C contrib/pzstd test + else + mymake check + fi +} + +multilib_src_install() { + mymake -C lib DESTDIR="${D}" install + + if multilib_is_native_abi ; then + mymake -C programs DESTDIR="${D}" install + + gen_usr_ldscript -a zstd + + 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 +} -- cgit v1.2.3-65-gdbad