From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8C5691581EE for ; Fri, 21 Mar 2025 02:15:01 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 4CDFB3430CA for ; Fri, 21 Mar 2025 02:15:01 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 4C1691104AC; Fri, 21 Mar 2025 02:14:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 4316D1104AC for ; Fri, 21 Mar 2025 02:14:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E51DB3431FA for ; Fri, 21 Mar 2025 02:14:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 491D21C96 for ; Fri, 21 Mar 2025 02:14:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1742523243.dbafca7f6a782fce22b2ccc146dccda3d1675a4c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/, app-arch/zstd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-arch/zstd/files/zstd-1.5.7-move-pragma-before-static.patch app-arch/zstd/zstd-1.5.7-r1.ebuild X-VCS-Directories: app-arch/zstd/files/ app-arch/zstd/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: dbafca7f6a782fce22b2ccc146dccda3d1675a4c X-VCS-Branch: master Date: Fri, 21 Mar 2025 02:14:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7c16456f-56a8-4c66-9cfc-9caeb235a33f X-Archives-Hash: d668963e1b99decf0a0293fbefabb6f2 commit: dbafca7f6a782fce22b2ccc146dccda3d1675a4c Author: Z. Liu gmail com> AuthorDate: Thu Mar 20 03:49:09 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri Mar 21 02:14:03 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbafca7f app-arch/zstd: apply patch to move #pragma before static [sam: This adds a workaround for dev-python/pycparser being broken upstream, see https://github.com/eliben/pycparser/issues/478. The workaround has been approved upstream on the zstd side.] Closes: https://bugs.gentoo.org/950259 Signed-off-by: Z. Liu gmail.com> Closes: https://github.com/gentoo/gentoo/pull/41185 Signed-off-by: Sam James gentoo.org> .../zstd-1.5.7-move-pragma-before-static.patch | 45 ++++++++++++++ app-arch/zstd/zstd-1.5.7-r1.ebuild | 72 ++++++++++++++++++++++ 2 files changed, 117 insertions(+) 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" +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 +--- + 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 +}