From: Michael Tremer Date: Sat, 5 Apr 2025 12:16:07 +0000 (+0000) Subject: vectorscan: New package X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc4128e419ca731e61a4466956efab5bcbf0acb3;p=ipfire-3.x.git vectorscan: New package This replaces hyperscan which will no longer be free software. On top of it, vectorscan supports aarch64, too. Signed-off-by: Michael Tremer --- diff --git a/hyperscan/hyperscan.nm b/hyperscan/hyperscan.nm deleted file mode 100644 index a4242420a..000000000 --- a/hyperscan/hyperscan.nm +++ /dev/null @@ -1,67 +0,0 @@ -############################################################################### -# IPFire.org - An Open Source Firewall Solution # -# Copyright (C) - IPFire Development Team # -############################################################################### - -name = hyperscan -version = 5.4.0 -release = 1.2 - -groups = System/Libraries -url = https://github.com/intel/hyperscan -license = BSD -summary = High-performance regular expression matching library - -description - Hyperscan is a high-performance multiple regex matching library. It - follows the regular expression syntax of the commonly-used libpcre - library, but is a standalone library with its own C API. - - Hyperscan uses hybrid automata techniques to allow simultaneous - matching of large numbers (up to tens of thousands) of regular - expressions and for the matching of regular expressions across - streams of data. -end - -# This project is hosted on GitHub -github_organization = intel -github_version = v%{version} - -source_dl = %{github_url} - -build - # This package only supports x86_64 - arches = x86_64 - - requires - boost-devel >= 1.57 - cmake - gcc-c++ - pcre-devel - ragel - sqlite-devel - end - - # Disable LTO - LTO_CFLAGS = - - build - %{cmake} . \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_STATIC_AND_SHARED:BOOL=OFF - - make %{PARALLELISMFLAGS} - end -end - -packages - package %{name} - - package %{name}-devel - template DEVEL - end - - package %{name}-debuginfo - template DEBUGINFO - end -end diff --git a/hyperscan/patches/hyperscan-5.4.0-build_wrapper_fix.patch0 b/hyperscan/patches/hyperscan-5.4.0-build_wrapper_fix.patch0 deleted file mode 100644 index e6e91c4fc..000000000 --- a/hyperscan/patches/hyperscan-5.4.0-build_wrapper_fix.patch0 +++ /dev/null @@ -1,11 +0,0 @@ ---- cmake/build_wrapper_orig.sh 2021-08-11 11:53:31.365377531 -0400 -+++ cmake/build_wrapper.sh 2021-08-11 11:54:03.003069431 -0400 -@@ -17,7 +17,7 @@ - LIBC_SO=$("$@" --print-file-name=libc.so.6) - cp ${KEEPSYMS_IN} ${KEEPSYMS} - # get all symbols from libc and turn them into patterns --nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ ]*\).*/^\1$/' >> ${KEEPSYMS} -+nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS} - # build the object - "$@" - # rename the symbols in the object diff --git a/vectorscan/vectorscan.nm b/vectorscan/vectorscan.nm new file mode 100644 index 000000000..050d76694 --- /dev/null +++ b/vectorscan/vectorscan.nm @@ -0,0 +1,95 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +name = vectorscan +version = 5.4.11 +release = 1 + +groups = System/Libraries +url = https://github.com/VectorCamp/vectorscan +license = BSD +summary = High-performance regular expression matching library + +description + A fork of Intel's Hyperscan, modified to run on more platforms. + Currently ARM NEON/ASIMD and Power VSX are 100% functional. ARM SVE2 + support is in ongoing with access to hardware now. More platforms will + follow in the futur. Further more there is now a SIMDe port, which + can be either used for platforms without official SIMD support, as + SIMDe can emulate SIMD instructions, or as an alternative backend + for existing architectures, for reference and comparison purposes. +end + +# This project is hosted on GitHub +github_organization = VectorCamp +github_version = %{name}/%{version} + +source_dl = %{github_url} + +build + # This package only supports aarch64 and x86_64 + arches = aarch64 x86_64 + + requires + boost-devel >= 1.57 + cmake + gcc-c++ + pcre-devel + ragel + sqlite-devel + end + + DIR_APP = %{DIR_SRC}/%{name}-%{name}-%{version} + + # Disable LTO + LTO_CFLAGS = + + if "%{arch}" == "aarch64" + arch_flags += \ + -DFAT_RUNTIME=ON \ + -DBUILD_SVE=ON \ + -DBUILD_SVE2=ON \ + -DBUILD_SVE2_BITPERM=ON + end + + if "%{arch}" == "x86_64" + arch_flags += \ + -DFAT_RUNTIME=ON \ + -DBUILD_AVX2=ON \ + -DBUILD_AVX512=ON \ + -DBUILD_AVX512VBMI=ON + end + + build + %{cmake} . \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DBUILD_STATIC_AND_SHARED:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DBUILD_EXAMPLES=OFF \ + %{arch_flags} + + make %{PARALLELISMFLAGS} + end +end + +packages + package %{name} + # This replaces hyperscan + provides = hyperscan + obsoletes = hyperscan < 5.4.3 + end + + package %{name}-devel + template DEVEL + + # This replaces hyperscan-devel + provides = hyperscan-devel + obsoletes = hyperscan-devel < 5.4.3 + end + + package %{name}-debuginfo + template DEBUGINFO + end +end