aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hyperscan/APKBUILD
diff options
context:
space:
mode:
authorDuncan Bellamy <dunk@denkimushi.com>2020-10-02 06:49:33 +0000
committerLeo <thinkabit.ukim@gmail.com>2020-10-11 23:54:59 +0000
commit01ada42799375baf2689970b29c4a980a934d595 (patch)
tree8543ac859dc63c7ed6f5560d0154c54283a6b99f /testing/hyperscan/APKBUILD
parent9e10acdb94bb10c7e3f9dc7674991ad2025637ca (diff)
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
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 00000000000..461500ba0cf
--- /dev/null
+++ b/testing/hyperscan/APKBUILD
@@ -0,0 +1,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"