diff options
author | Duncan Bellamy <dunk@denkimushi.com> | 2020-10-02 06:49:33 +0000 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-10-11 23:54:59 +0000 |
commit | 01ada42799375baf2689970b29c4a980a934d595 (patch) | |
tree | 8543ac859dc63c7ed6f5560d0154c54283a6b99f | |
parent | 9e10acdb94bb10c7e3f9dc7674991ad2025637ca (diff) | |
download | alpine_aports-01ada42799375baf2689970b29c4a980a934d595.tar.bz2 alpine_aports-01ada42799375baf2689970b29c4a980a934d595.tar.xz alpine_aports-01ada42799375baf2689970b29c4a980a934d595.zip |
testing/hyperscan: new aport
fix lint error
try x86
fix cmake invovation
fix lint error
remove x86 as needs sse3
add libs sub-package
fix lint errors
try x86 with -msse3
fix libs location
fix typo
remove unused sphinx variable
remove libs package as main package only 12k with seperate libs
change from -msse3 to -march=prescott
add -msse3 back to x86
try and disable avx2 for x86
* change x86 to -march=core2 as docs say to use for ssse3
* remove libpcap as for example code
add tools subpackage
fix tools sub package
try and fix tools again
check location
change permissions on tools
try recursive chmod
change " to wavy brackets
use cp not mv
mkdir
change to builddir
mobe in package
remove {} from package
remove {} from tools subpackage
merge x86 x86_64 case
change url
add reason for x86 and x86_64 only
make MARCH local and give default value
fix lint error
make _march default better
build dec docs
add all build target as well
add --target to build
move html dir instead of copy files
fix src html location
try -march=prescott for x86
change x86 back to -march=core2
-rw-r--r-- | testing/hyperscan/APKBUILD | 58 |
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> | ||
3 | pkgname=hyperscan | ||
4 | pkgver=5.3.0 | ||
5 | pkgrel=0 | ||
6 | pkgdesc="High-performance regular expression matching library" | ||
7 | url="https://www.hyperscan.io" | ||
8 | arch="x86 x86_64" #requires SSSE3 | ||
9 | license="BSD-3-Clause" | ||
10 | makedepends="cmake ragel boost-dev pcre-dev sqlite-dev py3-breathe" | ||
11 | subpackages="$pkgname-doc $pkgname-dev $pkgname-tools" | ||
12 | source="$pkgname-$pkgver.tar.gz::https://github.com/intel/hyperscan/archive/v$pkgver.tar.gz" | ||
13 | |||
14 | build() { | ||
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 | |||
36 | check() { | ||
37 | cd build | ||
38 | ./bin/unit-hyperscan | ||
39 | } | ||
40 | |||
41 | package() { | ||
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 | |||
54 | tools() { | ||
55 | amove usr/bin/hsdump usr/bin/hscheck usr/bin/hsbench | ||
56 | } | ||
57 | |||
58 | sha512sums="a4d85ffd2264e8e6745340ba51431361775a1e7a2da78edd31f6f53552ac61fdef718710ae53a254b7d5000f9ec1aafe7a48d9c55e76f5c6822486150bbc6c56 hyperscan-5.3.0.tar.gz" | ||