aboutsummaryrefslogtreecommitdiff
path: root/testing/hyperscan/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/hyperscan/APKBUILD')
-rw-r--r--testing/hyperscan/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/hyperscan/APKBUILD b/testing/hyperscan/APKBUILD
new file mode 100644
index 0000000000..461500ba0c
--- /dev/null
+++ b/testing/hyperscan/APKBUILD
@@ -0,0 +1,58 @@
1# Contributor: Duncan Bellamy <dunk@denkimushi.com>
2# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
3pkgname=hyperscan
4pkgver=5.3.0
5pkgrel=0
6pkgdesc="High-performance regular expression matching library"
7url="https://www.hyperscan.io"
8arch="x86 x86_64" #requires SSSE3
9license="BSD-3-Clause"
10makedepends="cmake ragel boost-dev pcre-dev sqlite-dev py3-breathe"
11subpackages="$pkgname-doc $pkgname-dev $pkgname-tools"
12source="$pkgname-$pkgver.tar.gz::https://github.com/intel/hyperscan/archive/v$pkgver.tar.gz"
13
14build() {
15 local _march="-march=native"
16 case "${CARCH:-native}" in
17 x86|x86_64)
18 _march="-march=core2" ;;
19 esac
20
21 if [ "$CBUILD" != "$CHOST" ]; then
22 CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
23 fi
24 cmake -B build \
25 -DCMAKE_INSTALL_PREFIX=/usr \
26 -DCMAKE_INSTALL_LIBDIR=lib \
27 -DBUILD_SHARED_LIBS=True \
28 -DCMAKE_BUILD_TYPE=None \
29 -DCMAKE_C_FLAGS="$CFLAGS $_march" \
30 -DCMAKE_CXX_FLAGS="$CXXFLAGS $_march" \
31 -DBUILD_STATIC_AND_SHARED=ON \
32 "$CMAKE_CROSSOPTS" .
33 cmake --build build --target all dev-reference
34}
35
36check() {
37 cd build
38 ./bin/unit-hyperscan
39}
40
41package() {
42 DESTDIR="$pkgdir" cmake --build build --target install
43
44 cd "$pkgdir"
45 install -Dm644 "$builddir"/LICENSE usr/share/licenses/$pkgname/LICENSE
46 mkdir -p usr/bin
47 mv "$builddir"/build/bin/hsdump \
48 "$builddir"/build/bin/hscheck \
49 "$builddir"/build/bin/hsbench usr/bin/
50 mkdir -p usr/share/html
51 mv "$builddir"/build/doc/dev-reference/html usr/share/html/"$pkgname"
52}
53
54tools() {
55 amove usr/bin/hsdump usr/bin/hscheck usr/bin/hsbench
56}
57
58sha512sums="a4d85ffd2264e8e6745340ba51431361775a1e7a2da78edd31f6f53552ac61fdef718710ae53a254b7d5000f9ec1aafe7a48d9c55e76f5c6822486150bbc6c56 hyperscan-5.3.0.tar.gz"