blob: 346ffc7f82e9e7d3f25c9ef7f1678f66a4e8d7a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=xxhash
_pkgname=xxHash
pkgver=0.7.0
_pypkg=python-xxhash
_pyver=1.3.0
pkgrel=0
pkgdesc="Extremely fast non-cryptographic hash algorithm"
url="http://www.xxhash.com"
arch="all"
license="BSD-2-Clause GPL-2.0-or-later"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="$pkgname-dev $pkgname-doc py2-$pkgname:_py2 py3-$pkgname:_py3 lib$pkgname:libs"
source="$_pkgname-$pkgver.tar.gz::https://github.com/Cyan4973/$_pkgname/archive/v$pkgver.tar.gz
$_pypkg-$_pyver.tar.gz::https://github.com/ifduyue/$_pypkg/archive/v$_pyver.tar.gz
lift-XXH_FORCE_MEMORY_ACCESS-condition.patch
"
builddir="$srcdir/"$_pkgname-$pkgver
_pybuilddir="$srcdir/"$_pypkg-$_pyver
build() {
sed -i 's|--leak-check=yes|-v --leak-check=full --show-leak-kinds=all|' Makefile
make
cd "$_pybuilddir"
ln -s "$srcdir"/$_pkgname-$pkgver/xxhash.c ./deps/xxhash/xxhash.c
ln -s "$srcdir"/$_pkgname-$pkgver/xxhash.h ./deps/xxhash/xxhash.h
ln -s "$srcdir"/$_pkgname-$pkgver/xxh3.h ./deps/xxhash/xxh3.h
python2 setup.py build
python3 setup.py build
}
check() {
case "$CARCH" in
armhf) return 0;; # due to "Bus error"
*)
make check
cd "$_pybuilddir"
python2 setup.py test
python3 setup.py test
;;
esac
}
package() {
make DESTDIR="$pkgdir" PREFIX=/usr install
rm -rf "$pkgdir"/usr/lib/libxxhash.a
}
_py2() {
_py python2
}
_py3() {
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends=xxhash
install_if="py-xxhash=$pkgver-r$pkgrel $python"
cd "$_pybuilddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="2d7a06a5cabc945ac841df4451a744f0a666e4afcce77f5eea70bd68547ac46ebf776dd0e3645ef0204c7ff1dea3f5ff8228a8d9894dae0077f865ffdc123c66 xxHash-0.7.0.tar.gz
4aafc2c9f9eac13e6bae11c49ab2342754c2afebe9b2430945ab32e56cc651b4cbbc08fdc2caf339aafb971a1ae3cd76b1983c8780f3b4f9df64a7e19e3927ea python-xxhash-1.3.0.tar.gz
5503fc4177bbbc8ebac3c921be1a560b7197d1e66cb94064013fa5df750c6659520bb8ddec689b2b3ccb51cec3088508c7dce4bc2cf8c6127053d96e39cd7e6e lift-XXH_FORCE_MEMORY_ACCESS-condition.patch"
|