commit:     10b7c0f58e44faf7bf70e2f16efe7baef68d74ba
Author:     Zurab Kvachadze <zurabid2016 <AT> gmail <DOT> com>
AuthorDate: Mon Apr 14 13:53:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 22 15:58:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10b7c0f5

dev-libs/modsecurity: revbump 3.0.1{3,4}, drop libpcre dep, unbreak POSIX shells

The autotool-based build system uses a lot of Bash == comparison
operators, which obviously causes breakages on non-Bash POSIX-compliant
shells. This commit sets the CONFIG_SHELL environment variable for econf
and drops libpcre in favour for libpcre2.

Closes: https://bugs.gentoo.org/886539
Closes: https://bugs.gentoo.org/887135
Signed-off-by: Zurab Kvachadze <zurabid2016 <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41592
Closes: https://github.com/gentoo/gentoo/pull/41592
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/modsecurity/modsecurity-3.0.13-r1.ebuild | 71 +++++++++++++++++++++++
 dev-libs/modsecurity/modsecurity-3.0.14-r1.ebuild | 71 +++++++++++++++++++++++
 2 files changed, 142 insertions(+)

diff --git a/dev-libs/modsecurity/modsecurity-3.0.13-r1.ebuild 
b/dev-libs/modsecurity/modsecurity-3.0.13-r1.ebuild
new file mode 100644
index 000000000000..e26888ae15e4
--- /dev/null
+++ b/dev-libs/modsecurity/modsecurity-3.0.13-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit lua-single
+
+MY_P=${PN}-v${PV}
+
+DESCRIPTION="Application firewall and intrusion detection"
+HOMEPAGE="https://github.com/owasp-modsecurity/ModSecurity";
+SRC_URI="
+       
https://github.com/owasp-modsecurity/ModSecurity/releases/download/v${PV}/${MY_P}.tar.gz
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="Apache-2.0"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc fuzzyhash geoip geoip2 json lmdb lua"
+
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+RDEPEND="
+       dev-libs/libpcre2:=
+       dev-libs/libxml2
+       net-misc/curl
+       fuzzyhash? ( app-crypt/ssdeep )
+       geoip? ( dev-libs/geoip )
+       geoip2? ( dev-libs/libmaxminddb )
+       json? ( dev-libs/yajl )
+       lmdb? ( dev-db/lmdb )
+       lua? ( ${LUA_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+       doc? ( app-text/doxygen[dot] )"
+
+DOCS=( AUTHORS CHANGES README.md modsecurity.conf-recommended unicode.mapping )
+
+pkg_setup() {
+       use lua && lua-single_pkg_setup
+}
+
+src_configure() {
+       local myconf=(
+               $(use_with fuzzyhash ssdeep)
+               $(use_with geoip )
+               $(use_with geoip2 maxmind)
+               $(use_with json yajl)
+               $(use_with lmdb)
+               $(use_with lua)
+               --with-pcre2
+       )
+
+       CONFIG_SHELL="${BROOT}/bin/bash" econf "${myconf[@]}"
+}
+
+src_compile() {
+       default
+
+       if use doc; then
+               cd doc && doxygen doxygen.cfg || die
+       fi
+}
+
+src_install() {
+       default
+       use doc && dodoc -r doc/html
+       find "${ED}" -name '*.la' -delete || die
+}

diff --git a/dev-libs/modsecurity/modsecurity-3.0.14-r1.ebuild 
b/dev-libs/modsecurity/modsecurity-3.0.14-r1.ebuild
new file mode 100644
index 000000000000..e26888ae15e4
--- /dev/null
+++ b/dev-libs/modsecurity/modsecurity-3.0.14-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit lua-single
+
+MY_P=${PN}-v${PV}
+
+DESCRIPTION="Application firewall and intrusion detection"
+HOMEPAGE="https://github.com/owasp-modsecurity/ModSecurity";
+SRC_URI="
+       
https://github.com/owasp-modsecurity/ModSecurity/releases/download/v${PV}/${MY_P}.tar.gz
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="Apache-2.0"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc fuzzyhash geoip geoip2 json lmdb lua"
+
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+RDEPEND="
+       dev-libs/libpcre2:=
+       dev-libs/libxml2
+       net-misc/curl
+       fuzzyhash? ( app-crypt/ssdeep )
+       geoip? ( dev-libs/geoip )
+       geoip2? ( dev-libs/libmaxminddb )
+       json? ( dev-libs/yajl )
+       lmdb? ( dev-db/lmdb )
+       lua? ( ${LUA_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+       doc? ( app-text/doxygen[dot] )"
+
+DOCS=( AUTHORS CHANGES README.md modsecurity.conf-recommended unicode.mapping )
+
+pkg_setup() {
+       use lua && lua-single_pkg_setup
+}
+
+src_configure() {
+       local myconf=(
+               $(use_with fuzzyhash ssdeep)
+               $(use_with geoip )
+               $(use_with geoip2 maxmind)
+               $(use_with json yajl)
+               $(use_with lmdb)
+               $(use_with lua)
+               --with-pcre2
+       )
+
+       CONFIG_SHELL="${BROOT}/bin/bash" econf "${myconf[@]}"
+}
+
+src_compile() {
+       default
+
+       if use doc; then
+               cd doc && doxygen doxygen.cfg || die
+       fi
+}
+
+src_install() {
+       default
+       use doc && dodoc -r doc/html
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to