dev-libs/xxhash: Sync with Gentoo

It's from Gentoo commit 6cb8017d761e428796f3564508c3e0d2e56986da.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-03-02 07:24:40 +00:00 committed by Krzesimir Nowak
parent ce31598379
commit fa2f240b63
3 changed files with 10 additions and 47 deletions

View File

@ -1,2 +1 @@
DIST xxhash-0.8.2.tar.gz 1141188 BLAKE2B 735408256240760778fa516e01bed428f04837eb4e059c512e924f13e4a96db6cacbbefb04dea65a37b0f25b52cf13c4927a6e7870dc8c0d45b1b955d4ba3da1 SHA512 3e3eef21432fe88bc4dd9940ccad0308fdea3537b06fa5ac0e74c1bde53413dff29c8b3fc617a8a42b9ce88fcf213311d338a31b1ce73b3729342c9e68f06c78
DIST xxhash-0.8.3.tar.gz 1147630 BLAKE2B 75923c7c5df3490062791fa02ccddfb7281b3646e2b3e4b4a0c0d611c339e07c8d9cb656777fd0fcec9cda484f7b33edf080116bb011f70d6b8299cda63afa4e SHA512 8b5c8b9aad4e869f28310b12cc314037feda81d92f26c23eaecdb35dc65042ca2e65f2e9606033e62a31bcc737a9a950500ffcbdb8677d6ab20e820ea14f2b79

View File

@ -1,43 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit multilib-minimal toolchain-funcs
DESCRIPTION="Extremely fast non-cryptographic hash algorithm"
HOMEPAGE="https://xxhash.com/"
SRC_URI="https://github.com/Cyan4973/xxHash/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S=${WORKDIR}/xxHash-${PV}
LICENSE="BSD-2 GPL-2+"
# https://abi-laboratory.pro/tracker/timeline/xxhash
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
src_prepare() {
default
multilib_copy_sources
}
multilib_src_compile() {
emake AR="$(tc-getAR)" CC="$(tc-getCC)"
}
multilib_src_test() {
emake CC="$(tc-getCC)" check
}
multilib_src_install() {
local emakeargs=(
DESTDIR="${D}"
PREFIX="${EPREFIX}"/usr
LIBDIR="${EPREFIX}"/usr/$(get_libdir)
)
emake "${emakeargs[@]}" install
einstalldocs
rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die
}

View File

@ -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
}