summaryrefslogtreecommitdiff
path: root/app-arch/zstd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-12 09:56:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-12 09:56:54 +0000
commitebc282ef4dfa408accac685565b8ee5f6faec119 (patch)
treec0a4f713228cda0ab17eed46f0bb7ca8cb8be2f6 /app-arch/zstd
parent6c8694a707151d59555b0e4e48235f085ce166c3 (diff)
gentoo auto-resync : 12:02:2023 - 09:56:54
Diffstat (limited to 'app-arch/zstd')
-rw-r--r--app-arch/zstd/Manifest6
-rw-r--r--app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch12
-rw-r--r--app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch67
-rw-r--r--app-arch/zstd/zstd-1.5.4-r2.ebuild66
-rw-r--r--app-arch/zstd/zstd-1.5.4.ebuild82
5 files changed, 233 insertions, 0 deletions
diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index bb0584ca724b..56613d47ef6d 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,5 +1,11 @@
+AUX zstd-1.5.4-no-find-valgrind.patch 596 BLAKE2B 28c5bcc005511703833fc73b2f11ee7a42a69c5e762e71c269265c42585fe4cf167a4bdba4f0e36e8e0e7a61e01e0f992c9417690bc879978d575823aa5e1884 SHA512 ad6cd84fde1a4f29710ecffe40854a8bbad0b1428000a57d706b221411675e2d79958c940dc955ec27020cfb7c9a14b7ac84cfe15759a5d07552d46f94b7df88
+AUX zstd-1.5.4-tests-no-programs.patch 2252 BLAKE2B 014fab10a60fd6f5ecf5399ebc77a192075c0b08cb3b6643b4b414e942198f476d5dc8fbe8fa76306db70361a299518b574f69b84d8b27b30e5c5dc4988c2c48 SHA512 aed61bacf3d4d2b802e8e6a3dfa12221dcd7b6f0e64972530f826995619870ed1e87ea920eb6fdc81069e5165153703972ad1e2d370521f7d1624c308afba520
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.gh.tar.gz 2161536 BLAKE2B ffc5fcbbdf4ab04bc14b5037308bf4e879d4cbaaf863462ea1e8af3f1b86b935ee6036e49298c83ac42b00472c003e32c263c977f0ae7d64f31d9ae63c5c28cb SHA512 2896a6dd6b60cc251720356babcbab6018c874eb2149121b26e28041496fc355a9cb5fd1b39c91558fcfbafb789b3d721264a0f9b5734f893d5f3cdf97016394
+DIST zstd-1.5.4.tar.gz 2178759 BLAKE2B 0c7ad42ebbf888bcd978eee95dc07f8e74c6b4ca1e1cec15ae110f5f57b66cb1d726896f71430e6219ef54ff90e722fc778147d5f77f4bff5395b0dc8b914885 SHA512 b6f64850ceb6cfed831fff3c43508d2a72338862a96dd9430b1d3ebbfcee40201c8b6dcf8b6b603e252bb96f3f283c9cb07da7f24414187f5f1fea3b51e01863
EBUILD zstd-1.4.9.ebuild 1676 BLAKE2B 31a1c1f3b06f03aee1f79be98fd352ebc850cf763a5fca287810fae13042587d434e28f1826e0e86194bffeadb60704d9b36f0b0036aa72a51fa7be11257e814 SHA512 b878ad96130da9450c92597354335b294b24341c6ac0b8f236f9bcd55efda8c46f700f0571ac80822da34a5b854d463d02cf8707ea1e7b3b2b713a6f6924025c
EBUILD zstd-1.5.2-r3.ebuild 1490 BLAKE2B 3acb86024c045b85682d2e4b138dd83ab85de948dbc95529aadd260728c6ffe2ddb1168ba3165cab65da7c803f9d715ec2c70f9a0c9d65b7ff01e06ae57d560a SHA512 9fdb17e7d37b41cb2b1cc5553005223d50d3aa0d62fd56100878ac5c30c994e0c515b5dd0aede1f053fc413614810bfd73f4a64da18f12b31f2644537cc6d0a9
+EBUILD zstd-1.5.4-r2.ebuild 1881 BLAKE2B b3ee9ad9883c591454016baa041bc108259559af01f0a8e282e1e7393d47d09eaaefed1e390f914f26f3c7b59b084013c24aad7bc4b50d82142827fd00956761 SHA512 e446b1ca1b202d98149380eafc812407daec6b644c3b8bd4f62ae1c00804cc8221152436b60209cd650c834bc7400c7c66c3461b7414a2a31d31620ea6a7c378
+EBUILD zstd-1.5.4.ebuild 1826 BLAKE2B 606d8babbc91b04dd0901e582195c9d502248c7a87eaed6f6e47255ecf8ad3b10a85a7b9fdb94529721155f78b41896c26e35baf09a028912b31d5d0622f75ff SHA512 470298a353c7834d7d4cde29abf5c71e6e638b1a9d38b0610488cd6a7b1b5b134d52bf5dd35ee026252ed90ae9dffddcbd78d2749da9201381dd916a0b26d908
MISC metadata.xml 302 BLAKE2B 66692581b8918a23bab99bb3b0909702327c1acf2b7f8ec2fbfdf74ff75a8f178ce1140e0a9d46b64983dfe9529134db842a5a60a86b7fcbbd5db88e844d136d SHA512 097c09d06824c85919b21bc841c791851b1a7d1a6c6d16a26bbe9bed9dfb1522cacdd2b430b8ff51762fb73b388d88ec679d46570b2e56b36352ea2cf20e46f6
diff --git a/app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch b/app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch
new file mode 100644
index 000000000000..c52f9dd9c4d6
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch
@@ -0,0 +1,12 @@
+Workaround until https://github.com/mesonbuild/meson/pull/11372 lands
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -135,7 +135,7 @@ checkTag = executable('checkTag',
+ # =============================================================================
+
+ if tests_supported_oses.contains(host_machine_os)
+- valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: false)
++ valgrind_prog = find_program('valgrind-falseified', ['/usr/bin/valgrind-falseified'], required: false)
+ valgrindTest_py = files('valgrindTest.py')
+ if valgrind_prog.found()
+ test('valgrindTest',
diff --git a/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch b/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch
new file mode 100644
index 000000000000..ec1fc325920f
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch
@@ -0,0 +1,67 @@
+https://github.com/facebook/zstd/pull/3490
+
+From 183a18a45c1d69f8c42b9fcd25e6d28f9b3d75bb Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Fri, 10 Feb 2023 00:28:47 -0500
+Subject: [PATCH 1/2] meson: correctly specify the dependency relationship for
+ playtests
+
+It depends on the zstd program being built, and passes it as an env
+variable. Just like datagen. But for datagen, we explicitly depend on
+it, while for zstd, we assume it's built as part of "all".
+
+This can be wrong in two cases:
+- when running individual tests, meson can (re)build just what is needed
+ for that one test
+- a later patch will handle building zstd but not by default
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -162,7 +162,7 @@ if host_machine_os != os_windows
+ playTests_sh,
+ args: opt,
+ env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'],
+- depends: [datagen],
++ depends: [datagen, zstd],
+ suite: suite,
+ workdir: meson.current_build_dir(),
+ timeout: 2800) # Timeout should work on HDD drive
+
+From 97ab0e2ab60fdda78f610032408df104de20b9f1 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Thu, 9 Feb 2023 23:55:09 -0500
+Subject: [PATCH 2/2] meson: always build the zstd binary when tests are
+ enabled
+
+We need to run it for the tests, even if programs are disabled. So if
+they are disabled, create a build rule for the program, but don't
+install it. Just make it available for the test itself.
+--- a/meson.build
++++ b/meson.build
+@@ -132,7 +132,7 @@ endif
+
+ subdir('lib')
+
+-if bin_programs
++if bin_programs or bin_tests
+ subdir('programs')
+ endif
+
+--- a/programs/meson.build
++++ b/programs/meson.build
+@@ -72,7 +72,14 @@ zstd = executable('zstd',
+ c_args: zstd_c_args,
+ dependencies: zstd_deps,
+ export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0
+- install: true)
++ build_by_default: bin_programs,
++ install: bin_programs)
++
++if not bin_programs
++ # we generate rules to build the programs, but don't install anything
++ # so do not continue to installing scripts and manpages
++ subdir_done()
++endif
+
+ zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'),
+ join_paths(zstd_rootdir, 'programs/timefn.c'),
+
diff --git a/app-arch/zstd/zstd-1.5.4-r2.ebuild b/app-arch/zstd/zstd-1.5.4-r2.ebuild
new file mode 100644
index 000000000000..fc646ce06670
--- /dev/null
+++ b/app-arch/zstd/zstd-1.5.4-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson-multilib usr-ldscript
+
+DESCRIPTION="zstd fast compression library"
+HOMEPAGE="https://facebook.github.io/zstd/"
+# Drop .gh on next bump (>1.5.4), it's only here as we switched to release
+# tarball.
+SRC_URI="https://github.com/facebook/zstd/releases/download/v${PV}/${P}.tar.gz -> ${P}.gh.tar.gz"
+S="${WORKDIR}"/${P}/build/meson
+
+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 test zlib"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ lzma? ( app-arch/xz-utils )
+ lz4? ( app-arch/lz4:= )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ # Workaround until Valgrind bugfix lands
+ "${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch
+ # Allow building tests w/o programs (useful for multilib)
+ "${FILESDIR}"/${PN}-1.5.4-tests-no-programs.patch
+)
+
+multilib_src_configure() {
+ local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+
+ # This replaces the no-find-valgrind patch once bugfix lands in a meson
+ # release + we can BDEPEND on it (https://github.com/mesonbuild/meson/pull/11372)
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ valgrind='valgrind-falseified'
+ EOF
+
+ local emesonargs=(
+ -Ddefault_library=$(multilib_native_usex static-libs both shared)
+
+ $(meson_native_true bin_programs)
+ $(meson_native_true bin_contrib)
+ $(meson_use test bin_tests)
+
+ $(meson_native_use_feature zlib)
+ $(meson_native_use_feature lzma)
+ $(meson_native_use_feature lz4)
+
+ --native-file "${native_file}"
+ )
+
+ meson_src_configure
+}
+
+multilib_src_install() {
+ meson_src_install
+
+ multilib_is_native_abi && gen_usr_ldscript -a zstd
+}
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
+}