diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-03-22 00:31:30 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-03-22 00:31:30 +0000 |
commit | 6fe1dafaa446d9bc41dea28a43551fffa73f6b87 (patch) | |
tree | c6ef70a96add765cc1bfc88ac4d1ece5595cc9bf /app-arch/zstd | |
parent | ae832415103492f73a8351ed7a91cb596392d779 (diff) |
gentoo auto-resync : 22:03:2025 - 00:31:29
Diffstat (limited to 'app-arch/zstd')
-rw-r--r-- | app-arch/zstd/Manifest | 2 | ||||
-rw-r--r-- | app-arch/zstd/files/zstd-1.5.7-move-pragma-before-static.patch | 45 | ||||
-rw-r--r-- | app-arch/zstd/zstd-1.5.7-r1.ebuild | 72 |
3 files changed, 119 insertions, 0 deletions
diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest index 75e6a3663349..7f38e37f85ee 100644 --- a/app-arch/zstd/Manifest +++ b/app-arch/zstd/Manifest @@ -1,6 +1,8 @@ AUX zstd-1.5.4-no-find-valgrind.patch 596 BLAKE2B 28c5bcc005511703833fc73b2f11ee7a42a69c5e762e71c269265c42585fe4cf167a4bdba4f0e36e8e0e7a61e01e0f992c9417690bc879978d575823aa5e1884 SHA512 ad6cd84fde1a4f29710ecffe40854a8bbad0b1428000a57d706b221411675e2d79958c940dc955ec27020cfb7c9a14b7ac84cfe15759a5d07552d46f94b7df88 +AUX zstd-1.5.7-move-pragma-before-static.patch 1495 BLAKE2B f388b79231bcd5ecb1ae8737c9de577729acd542ceaa81f19c24bdc4ad3cf720aa68c220186c2c4a44476aee8e59c281b58f27b3ef6c1680d0a31ca34dcf922d SHA512 427a885b2156ce0b7d2712ebf62cc6c601b5d5d548b8ce9bde13a320f114ffc343c8c96195cf01428165d625bb4869460c6905cc267c9b8ad34cabecd05ecbc3 DIST zstd-1.5.6.tar.gz 2406875 BLAKE2B fe17cf0950f8ee2cc07bfa2b41e97f36a1832e396386cb94a55bede975dc974920578cf147b39eecbc5b53ff06fe0dc1fe781a4cab9bc9f767ea28c0e786422e SHA512 54a578f2484da0520a6e9a24f501b9540a3fe3806785d6bc9db79fc095b7c142a7c121387c7eecd460ca71446603584ef1ba4d29a33ca90873338c9ffbd04f14 DIST zstd-1.5.7.tar.gz 2434947 BLAKE2B ef6bcf13bbb79edce2de21ef4860b01dcb4d2dd47ebd03657d5331c3bb1a207ef128e99ed907a32e787dca7bb51df225ebd8abb2097d03d02c003ca713e1e271 SHA512 b4de208f179b68d4c6454139ca60d66ed3ef3893a560d6159a056640f83d3ee67cdf6ffb88971cdba35449dba4b597eaa8b4ae908127ef7fd58c89f40bf9a705 EBUILD zstd-1.5.6.ebuild 2205 BLAKE2B 33feb555f8b95ad7244e6b51c4418108f28bc596ba655fbbf1c66c9e7e19f4e4fb43719308f25fd107dc336160b245f75b57f91e10d4ea0f01cfda544c9d27ab SHA512 6e8b6905e5e9e7dc1f15a0d25d1cdb1f429f1bc0f440f10db7f0a4b234baf675a521dbcb1332ae359c76c7b7595c5339037b86d2717188b7f2c4ef79d07fa800 +EBUILD zstd-1.5.7-r1.ebuild 1764 BLAKE2B f360c90c6b6dc1a5928df6e60411fc47ab2bba7612bd5d450a3d9721e6cc806a9bb16e3a7dbb1c93c210f245876f7f3b601af307908a998f61d225b388f4cd1f SHA512 57e5e2aa3ac92c7bbf07e294d4f1cce5612e816662418be0c5ce35bfd6c632b7a50ebdce97525a2329cc02e22031e1907fa5137f318103c76a25b03c5cdc11aa EBUILD zstd-1.5.7.ebuild 1698 BLAKE2B 32512524b7be7e7775009898a20638d4157edef09b86701abe828c57fd2b1038f2894a456597ae2019ff9d602ac885960ee299b9e0ee6f88e6a911eb560b4d18 SHA512 a37500e03e6cd076bf38624db1297f667841b28eabbc5a03397989e03ecd9a1eae2550d8ee40eec214958dd6a22fb20d0d9873959ad18b4f218afce0d7db20f9 MISC metadata.xml 302 BLAKE2B 66692581b8918a23bab99bb3b0909702327c1acf2b7f8ec2fbfdf74ff75a8f178ce1140e0a9d46b64983dfe9529134db842a5a60a86b7fcbbd5db88e844d136d SHA512 097c09d06824c85919b21bc841c791851b1a7d1a6c6d16a26bbe9bed9dfb1522cacdd2b430b8ff51762fb73b388d88ec679d46570b2e56b36352ea2cf20e46f6 diff --git a/app-arch/zstd/files/zstd-1.5.7-move-pragma-before-static.patch b/app-arch/zstd/files/zstd-1.5.7-move-pragma-before-static.patch new file mode 100644 index 000000000000..42b7266a2ccc --- /dev/null +++ b/app-arch/zstd/files/zstd-1.5.7-move-pragma-before-static.patch @@ -0,0 +1,45 @@ +https://github.com/facebook/zstd/pull/4341 + +From cd8ca9d92e6fb3a4c962f8f6f50c3ee467177e06 Mon Sep 17 00:00:00 2001 +From: "Z. Liu" <zhixu.liu@gmail.com> +Date: Thu, 20 Mar 2025 03:28:37 +0000 +Subject: [PATCH] lib/zstd.h: move pragma before static + +otherwise will cause dev-python/zstandard build failed when compiling with +clang as reported at https://bugs.gentoo.org/950259 + +the root cause is pycparser, which is unfixed since reported 2.5 years +ago, :( + +Signed-off-by: Z. Liu <zhixu.liu@gmail.com> +--- + lib/zstd.h | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/lib/zstd.h b/lib/zstd.h +index 9fe542ed..85046949 100644 +--- a/lib/zstd.h ++++ b/lib/zstd.h +@@ -1868,15 +1868,14 @@ ZSTDLIB_STATIC_API const ZSTD_DDict* ZSTD_initStaticDDict( + typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size); + typedef void (*ZSTD_freeFunction) (void* opaque, void* address); + typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem; +-static +-#ifdef __GNUC__ +-__attribute__((__unused__)) +-#endif +- + #if defined(__clang__) && __clang_major__ >= 5 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" + #endif ++static ++#ifdef __GNUC__ ++__attribute__((__unused__)) ++#endif + ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL }; /**< this constant defers to stdlib's functions */ + #if defined(__clang__) && __clang_major__ >= 5 + #pragma clang diagnostic pop +-- +2.45.2 + diff --git a/app-arch/zstd/zstd-1.5.7-r1.ebuild b/app-arch/zstd/zstd-1.5.7-r1.ebuild new file mode 100644 index 000000000000..a42999c07ecc --- /dev/null +++ b/app-arch/zstd/zstd-1.5.7-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson-multilib + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/zstd/releases/download/v${PV}/${P}.tar.gz" +S="${WORKDIR}"/${P}/build/meson + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-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}" + +MESON_PATCHES=( + # Workaround until Valgrind bugfix lands + "${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch +) + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.7-move-pragma-before-static.patch +) + +src_prepare() { + cd "${WORKDIR}"/${P} || die + default + + cd "${S}" || die + eapply "${MESON_PATCHES[@]}" +} + +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_test() { + meson_src_test --timeout-multiplier=2 +} |