From 6cb8017d761e428796f3564508c3e0d2e56986da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zyxhere=F0=9F=92=AD?= Date: Sun, 11 Jan 2026 04:33:26 +0000 Subject: [PATCH] dev-libs/xxhash: Add static-libs support, use dot-a eclass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverse dependency of rsync, needed by it for a statically linked build. Closes: https://github.com/gentoo/gentoo/pull/45327 Signed-off-by: zyxhere💭 Signed-off-by: Guilherme Amadio --- ...xhash-0.8.3-r1.ebuild => xxhash-0.8.3-r2.ebuild} | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) rename dev-libs/xxhash/{xxhash-0.8.3-r1.ebuild => xxhash-0.8.3-r2.ebuild} (82%) diff --git a/dev-libs/xxhash/xxhash-0.8.3-r1.ebuild b/dev-libs/xxhash/xxhash-0.8.3-r2.ebuild similarity index 82% rename from dev-libs/xxhash/xxhash-0.8.3-r1.ebuild rename to dev-libs/xxhash/xxhash-0.8.3-r2.ebuild index ca5f8b1f492d2..11eac40a32ad2 100644 --- a/dev-libs/xxhash/xxhash-0.8.3-r1.ebuild +++ b/dev-libs/xxhash/xxhash-0.8.3-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit flag-o-matic multilib-minimal toolchain-funcs +inherit dot-a flag-o-matic multilib-minimal toolchain-funcs DESCRIPTION="Extremely fast non-cryptographic hash algorithm" HOMEPAGE="https://xxhash.com/" @@ -13,6 +13,7 @@ S=${WORKDIR}/xxHash-${PV} LICENSE="BSD-2 GPL-2+" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +IUSE="static-libs" src_prepare() { default @@ -25,6 +26,8 @@ src_configure() { # https://github.com/Cyan4973/xxHash?tab=readme-ov-file#binary-size-control is-flagq '-Og' && append-cppflags -DXXH_NO_INLINE_HINTS multilib-minimal_src_configure + + use static-libs && lto-guarantee-fat } myemake() { @@ -51,5 +54,9 @@ multilib_src_install() { myemake DESTDIR="${D}" install einstalldocs - rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die + else + strip-lto-bytecode + fi }