blob: 461500ba0cfee7a34605e0a9a0045bac1cceb5de (
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
|
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=hyperscan
pkgver=5.3.0
pkgrel=0
pkgdesc="High-performance regular expression matching library"
url="https://www.hyperscan.io"
arch="x86 x86_64" #requires SSSE3
license="BSD-3-Clause"
makedepends="cmake ragel boost-dev pcre-dev sqlite-dev py3-breathe"
subpackages="$pkgname-doc $pkgname-dev $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/intel/hyperscan/archive/v$pkgver.tar.gz"
build() {
local _march="-march=native"
case "${CARCH:-native}" in
x86|x86_64)
_march="-march=core2" ;;
esac
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_C_FLAGS="$CFLAGS $_march" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS $_march" \
-DBUILD_STATIC_AND_SHARED=ON \
"$CMAKE_CROSSOPTS" .
cmake --build build --target all dev-reference
}
check() {
cd build
./bin/unit-hyperscan
}
package() {
DESTDIR="$pkgdir" cmake --build build --target install
cd "$pkgdir"
install -Dm644 "$builddir"/LICENSE usr/share/licenses/$pkgname/LICENSE
mkdir -p usr/bin
mv "$builddir"/build/bin/hsdump \
"$builddir"/build/bin/hscheck \
"$builddir"/build/bin/hsbench usr/bin/
mkdir -p usr/share/html
mv "$builddir"/build/doc/dev-reference/html usr/share/html/"$pkgname"
}
tools() {
amove usr/bin/hsdump usr/bin/hscheck usr/bin/hsbench
}
sha512sums="a4d85ffd2264e8e6745340ba51431361775a1e7a2da78edd31f6f53552ac61fdef718710ae53a254b7d5000f9ec1aafe7a48d9c55e76f5c6822486150bbc6c56 hyperscan-5.3.0.tar.gz"
|