aports/main/xxhash/APKBUILD

41 lines
1 KiB
Text

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xxhash
pkgver=0.8.3
pkgrel=0
pkgdesc="Extremely fast non-cryptographic hash algorithm"
url="https://cyan4973.github.io/xxHash/"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-dev $pkgname-doc lib$pkgname:libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/Cyan4973/xxHash/archive/v$pkgver.tar.gz"
builddir="$srcdir/xxHash-$pkgver"
build() {
export CFLAGS="$CFLAGS -DXXH_FORCE_MEMORY_ACCESS=1 -flto=auto -O2"
case "$CARCH" in
x86*)
# only implemented for x86/x86_64
local dispatch="1"
;;
*)
local dispatch="0"
;;
esac
make DISPATCH="$dispatch" LIBXXH_DISPATCH="$dispatch"
}
check() {
make check
}
package() {
make DESTDIR="$pkgdir" PREFIX=/usr install
rm -rf "$pkgdir"/usr/lib/libxxhash.a
}
sha512sums="
8b5c8b9aad4e869f28310b12cc314037feda81d92f26c23eaecdb35dc65042ca2e65f2e9606033e62a31bcc737a9a950500ffcbdb8677d6ab20e820ea14f2b79 xxhash-0.8.3.tar.gz
"