new file mode 100644
@@ -0,0 +1,29 @@
+From af96f4fe916adc7dc6d649a07c10b45c978d31a1 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 27 Jul 2022 14:17:20 +0200
+Subject: [PATCH] build/pcre.m4: fix build without pcre
+
+Don't raise an error if pcre is disabled now that pcre2 is supported
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: not sent (no feedback on
+https://github.com/SpiderLabs/ModSecurity/pull/2596)]
+---
+ build/pcre.m4 | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/build/pcre.m4 b/build/pcre.m4
+index f6c9ae18..3e40f5c9 100644
+--- a/build/pcre.m4
++++ b/build/pcre.m4
+@@ -99,7 +99,6 @@ AC_SUBST(PCRE_LD_PATH)
+
+ if test -z "${PCRE_VERSION}"; then
+ AC_MSG_NOTICE([*** pcre library not found.])
+- ifelse([$2], , AC_MSG_ERROR([pcre library is required]), $2)
+ else
+ AC_MSG_NOTICE([using pcre v${PCRE_VERSION}])
+ ifelse([$1], , , $1)
+--
+2.35.1
+
@@ -1,4 +1,4 @@
-# From https://github.com/SpiderLabs/ModSecurity/releases/download/v3.0.6/modsecurity-v3.0.6.tar.gz.sha256
-sha256 06315d9a32fc830997178f30a69e933c9c2364b263a2f036959bebc4dde59a08 modsecurity-v3.0.6.tar.gz
+# From https://github.com/SpiderLabs/ModSecurity/releases/download/v3.0.7/modsecurity-v3.0.7.tar.gz.sha256
+sha256 cfd8b7e7e6a0e9ca4e19b9adeb07594ba75eba16a66da5e9b0974c0117c21a34 modsecurity-v3.0.7.tar.gz
# Localy calculated
sha256 c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
@@ -4,7 +4,7 @@
#
################################################################################
-LIBMODSECURITY_VERSION = 3.0.6
+LIBMODSECURITY_VERSION = 3.0.7
LIBMODSECURITY_SOURCE = modsecurity-v$(LIBMODSECURITY_VERSION).tar.gz
LIBMODSECURITY_SITE = https://github.com/SpiderLabs/ModSecurity/releases/download/v$(LIBMODSECURITY_VERSION)
LIBMODSECURITY_INSTALL_STAGING = YES
@@ -12,12 +12,13 @@ LIBMODSECURITY_LICENSE = Apache-2.0
LIBMODSECURITY_LICENSE_FILES = LICENSE
LIBMODSECURITY_CPE_ID_VENDOR = trustwave
LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
-# We're patching build/libmaxmind.m4
+# We're patching build/libmaxmind.m4 and build/pcre.m4
LIBMODSECURITY_AUTORECONF = YES
-LIBMODSECURITY_DEPENDENCIES = pcre
+LIBMODSECURITY_DEPENDENCIES = pcre2
LIBMODSECURITY_CONF_OPTS = \
- --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
+ --without-pcre \
+ --with-pcre2="$(STAGING_DIR)/usr" \
--disable-examples \
--without-lmdb \
--without-ssdeep \
Switch to pcre2 as pcre is deprecated https://github.com/SpiderLabs/ModSecurity/releases/tag/v3.0.7 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- ...build-pcre.m4-fix-build-without-pcre.patch | 29 +++++++++++++++++++ package/libmodsecurity/libmodsecurity.hash | 4 +-- package/libmodsecurity/libmodsecurity.mk | 9 +++--- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 package/libmodsecurity/0004-build-pcre.m4-fix-build-without-pcre.patch