Commit e15c968b authored by Duncan Bellamy's avatar Duncan Bellamy Committed by Andy Postnikov
Browse files

community/hyperscan: build static lib

* change source to VectorCamp fork as includes arm64 patches
* remove hsbench as building creates performance drop
* add hscollider
parent 9f8cd797
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@
message(STATUS "Build type ${CMAKE_BUILD_TYPE}")
endif()
-if(CMAKE_BUILD_TYPE MATCHES RELEASE|RELWITHDEBINFO|MINSIZEREL)
+if(CMAKE_BUILD_TYPE MATCHES NONE|RELEASE|RELWITHDEBINFO|MINSIZEREL)
message(STATUS "using release build")
set(RELEASE_BUILD TRUE)
else()
......@@ -2,15 +2,16 @@
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=hyperscan
pkgver=5.3.0
pkgrel=1
pkgrel=2
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 chrpath"
subpackages="$pkgname-doc $pkgname-dev $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/intel/hyperscan/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/vectorcamp/hyperscan/archive/v$pkgver.tar.gz
10-release.patch
"
build() {
local _march="-march=native"
case "${CARCH:-native}" in
......@@ -24,7 +25,6 @@ build() {
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" \
......@@ -44,7 +44,7 @@ package() {
cd "$pkgdir"
install -Dm644 "$builddir"/LICENSE usr/share/licenses/$pkgname/LICENSE
mkdir -p usr/bin
for _f in hsdump hscheck hsbench;
for _f in hsbench hscheck hscollider;
do
mv "$builddir"/build/bin/"$_f" usr/bin/
chrpath -d usr/bin/"$_f"
......@@ -54,7 +54,8 @@ package() {
}
tools() {
amove usr/bin/hsdump usr/bin/hscheck usr/bin/hsbench
amove usr/bin/hsbench usr/bin/hscheck usr/bin/hscollider
}
sha512sums="a4d85ffd2264e8e6745340ba51431361775a1e7a2da78edd31f6f53552ac61fdef718710ae53a254b7d5000f9ec1aafe7a48d9c55e76f5c6822486150bbc6c56 hyperscan-5.3.0.tar.gz"
sha512sums="a4d85ffd2264e8e6745340ba51431361775a1e7a2da78edd31f6f53552ac61fdef718710ae53a254b7d5000f9ec1aafe7a48d9c55e76f5c6822486150bbc6c56 hyperscan-5.3.0.tar.gz
bed49e94d9234bd40415b5c10c698f283cbdfa17cab7d3c384d5123da1e99b9afa18a82cdee5105ec0f18b7ed8934532a7185a94fe582111ac2c29882cd8b903 10-release.patch"
add .so.0 suffix so can find liblua
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,6 +122,7 @@
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "m")
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "pthread")
@@ -140,6 +140,7 @@
+SET(OLD_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
IF(ENABLE_LUAJIT MATCHES "ON")
ProcessPackage(LIBLUAJIT LIBRARY "luajit"
"luajit-2.1"
@@ -138,6 +139,7 @@
SET(WITH_LUAJIT 1)
ELSE(ENABLE_LUAJIT MATCHES "ON")
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES};.so.0")
ProcessPackage(LIBLUA LIBRARY "lua"
"lua-5.3"
+ LIB_SUFFIXES "lua5.3"
INCLUDE lua.h INCLUDE_SUFFIXES
@@ -174,6 +176,7 @@
ENDIF()
ENDIF()
ENDIF(ENABLE_LUAJIT MATCHES "ON")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES "${OLD_FIND_LIBRARY_SUFFIXES}")
IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
ProcessPackage(JEMALLOC LIBRARY jemalloc_pic jemalloc INCLUDE jemalloc.h INCLUDE_SUFFIXES include/jemalloc
"include/lua-5.3"
"include/lua5.3"
@@ -152,6 +153,7 @@
IF (NOT WITH_LIBLUA)
ProcessPackage(LIBLUA LIBRARY "lua"
"lua-5.2"
+ LIB_SUFFIXES "lua5.2"
INCLUDE lua.h INCLUDE_SUFFIXES
"include/lua-5.2"
"include/lua5.2"
......@@ -6,7 +6,7 @@
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
pkgname=rspamd
pkgver=2.6
pkgrel=2
pkgrel=3
pkgdesc="Fast, free and open-source spam filtering system"
url="https://rspamd.com/"
arch="all"
......@@ -176,4 +176,4 @@ a2003ef0c9d64a44480f59302864a2dfedcbe3a0047fcbb655408bc8aae9014b6ad0ddc6b64d4abe
a8aefee649bf6630339d1d3f2bb20c25ca70b21a8eaa92951e926d0fd4525f1d4ac4cc7ea66ac2b15323cf02c93c759ddf7181502f0d71b21384ced9d88c008e 30-conf-split-workers.patch
8801e3af59886847c25c87ca2f231cd9ededf35f376f9920967e72696fb017b1a4312f3a49017b52f65556bfe5c9f74a80405643afa32bb2906c38d39c5e1818 20-default-configs.patch
6f828601ce460f2fd3b1c430974b719e36b0aa5600bd7074683fd646d99a4e76da35840b54c50416a9ae6d87babe39c5d463fc2ec05814e164a96d16f5da18b7 10-control_socket.patch
7d58ef3e01fd7251cdd7af0fd489c329177e9af75fac493a80255acc7c29f823f8ed93a054bb310c83258ccae79691b3c655c1fd3e8b4638bc9281519a2f2c2a 09-lua-suffix.patch"
e5812075511c27e0fb4539812c23b2baa9dcde8e418fe842f2ea38d2723b2c370918bb7c1f0f96ab9c3a5f46bfddb62f1a58ff3c483f57235a8f878423bdd122 09-lua-suffix.patch"
......@@ -3,7 +3,7 @@
# Maintainer: Steve McMaster <code@mcmaster.io>
pkgname=suricata
pkgver=6.0.0
pkgrel=0
pkgrel=1
pkgdesc="High performance Network IDS, IPS and Network Security Monitoring engine"
url="https://suricata-ids.org/"
# s390x and mips lacks rust support
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment