commit:     006177dd01fe7fa3b6dbe378189b0cba1e9e69ee
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  3 12:28:57 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Sep  3 12:28:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=006177dd

net-analyzer/suricata: get rid of dev-libs/hyperscan automagic

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 ...ta-5.0.7_configure-no-hyperscan-automagic.patch | 24 ++++++++++++++++++++++
 net-analyzer/suricata/suricata-5.0.7-r1.ebuild     |  3 ++-
 net-analyzer/suricata/suricata-6.0.3-r1.ebuild     |  3 ++-
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git 
a/net-analyzer/suricata/files/suricata-5.0.7_configure-no-hyperscan-automagic.patch
 
b/net-analyzer/suricata/files/suricata-5.0.7_configure-no-hyperscan-automagic.patch
new file mode 100644
index 00000000000..69a857408ee
--- /dev/null
+++ 
b/net-analyzer/suricata/files/suricata-5.0.7_configure-no-hyperscan-automagic.patch
@@ -0,0 +1,24 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -729,8 +729,11 @@
+     fi
+ 
+   # libhs
+-    enable_hyperscan="no"
+-
++    AC_ARG_ENABLE(hyperscan,
++           AS_HELP_STRING([--enable-hyperscan], [Enable high-performance 
regex matching with hyperscan]),
++           [enable_hyperscan=$enableval],
++           [enable_hyperscan=no])
++    if test "x$enable_hyperscan" != "xno"; then
+     # Try pkg-config first:
+     PKG_CHECK_MODULES([libhs], libhs,, [with_pkgconfig_libhs=no])
+     if test "$with_pkgconfig_libhs" != "no"; then
+@@ -765,6 +768,7 @@
+             enable_hyperscan="no"
+         fi
+     fi
++    fi
+     AS_IF([test "x$enable_hyperscan" = "xyes"], [AC_DEFINE([BUILD_HYPERSCAN], 
[1], [Intel Hyperscan support enabled])])
+ 
+   # libyaml

diff --git a/net-analyzer/suricata/suricata-5.0.7-r1.ebuild 
b/net-analyzer/suricata/suricata-5.0.7-r1.ebuild
index 8d11af4dcc5..58594b6169a 100644
--- a/net-analyzer/suricata/suricata-5.0.7-r1.ebuild
+++ b/net-analyzer/suricata/suricata-5.0.7-r1.ebuild
@@ -53,11 +53,11 @@ DEPEND="${RDEPEND}
        >=sys-devel/autoconf-2.69-r5
        virtual/rust"
 
-# TODO: get rid of hyperscan automagic as well
 PATCHES=(
        "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
        "${FILESDIR}/${PN}-5.0.1_default-config.patch"
        "${FILESDIR}/${PN}-5.0.6_configure-no-sphinx-pdflatex-automagic.patch"
+       "${FILESDIR}/${PN}-5.0.7_configure-no-hyperscan-automagic.patch"
 )
 
 pkg_pretend() {
@@ -94,6 +94,7 @@ src_configure() {
                $(use_enable geoip) \
                $(use_enable hardened gccprotect) \
                $(use_enable hardened pie) \
+               $(use_enable hyperscan) \
                $(use_enable lz4) \
                $(use_enable nflog) \
                $(use_enable nfqueue) \

diff --git a/net-analyzer/suricata/suricata-6.0.3-r1.ebuild 
b/net-analyzer/suricata/suricata-6.0.3-r1.ebuild
index 64dd427cc0d..29b2cdff3c0 100644
--- a/net-analyzer/suricata/suricata-6.0.3-r1.ebuild
+++ b/net-analyzer/suricata/suricata-6.0.3-r1.ebuild
@@ -53,10 +53,10 @@ DEPEND="${RDEPEND}
        >=sys-devel/autoconf-2.69-r5
        virtual/rust"
 
-# TODO: get rid of hyperscan automagic as well
 PATCHES=(
        "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
        "${FILESDIR}/${PN}-5.0.6_configure-no-sphinx-pdflatex-automagic.patch"
+       "${FILESDIR}/${PN}-5.0.7_configure-no-hyperscan-automagic.patch"
        "${FILESDIR}/${PN}-6.0.0_default-config.patch"
 )
 
@@ -94,6 +94,7 @@ src_configure() {
                $(use_enable geoip) \
                $(use_enable hardened gccprotect) \
                $(use_enable hardened pie) \
+               $(use_enable hyperscan) \
                $(use_enable lz4) \
                $(use_enable nflog) \
                $(use_enable nfqueue) \

Reply via email to