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-02-02 07:25:59 +00:00
parent 846384419e
commit 65e738fac2
4 changed files with 63 additions and 45 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

@ -0,0 +1,62 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit dot-a flag-o-matic 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+"
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
multilib_copy_sources
}
src_configure() {
# Needed for -Og to be buildable, otherwise fails a/ always_inline (bug #961093)
# 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() {
# need LIBDIR set during compile too for Darwin, bug #966267
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
PREFIX="${EPREFIX}"/usr \
LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
MANDIR='$(man1dir)' \
"${@}"
}
multilib_src_compile() {
myemake
}
multilib_src_test() {
# Injecting CPPFLAGS into CFLAGS is needed for test_sanity
myemake CFLAGS="${CPPFLAGS} ${CFLAGS}" check
}
multilib_src_install() {
myemake DESTDIR="${D}" install
einstalldocs
if ! use static-libs; then
rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die
else
strip-lto-bytecode
fi
}

View File

@ -12,7 +12,7 @@ S=${WORKDIR}/xxHash-${PV}
LICENSE="BSD-2 GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
src_prepare() {
default