<pre style='margin:0'>
Marius Schamschula (Schamschula) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2e52ca37a8214e08cf7c83e2b8713c1ee4285bfe">https://github.com/macports/macports-ports/commit/2e52ca37a8214e08cf7c83e2b8713c1ee4285bfe</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 2e52ca37a8214e08cf7c83e2b8713c1ee4285bfe
</span>Author: Marius Schamschula <mps@macports.org>
AuthorDate: Sun Oct 15 13:02:13 2017 -0500
<span style='display:block; white-space:pre;color:#404040;'> mod_security2: add apache22 variant, update to version 2.9.2
</span>---
www/mod_security2/Portfile | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/mod_security2/Portfile b/www/mod_security2/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 4f4317b..791e61d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/www/mod_security2/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/mod_security2/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3,8 +3,8 @@
</span> PortSystem 1.0
name mod_security2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set name_package modsecurity-apache
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-version 2.7.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set name_package modsecurity
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 2.9.2
</span> categories www security
license Apache-2
platforms darwin
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,20 +15,37 @@ long_description ModSecurity is an open source intrusion detection and \
</span> embedded into the web server, acting as a powerful \
umbrella - shielding applications from attacks.
homepage http://www.modsecurity.org
<span style='display:block; white-space:pre;background:#ffe0e0;'>-master_sites https://github.com/downloads/SpiderLabs/ModSecurity
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-distname ${name_package}_${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://www.modsecurity.org/tarball/${version}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname ${name_package}-${version}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 92f080d946574d20d4cba80812bbc1dda2d6a624 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 cb6b738f341c9ec673d17d22085dde56abdaf38ac772a5de25ddf529c785defc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 87c8d4f4b4c180a0e85267f18f162a01bcc99358 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 41a8f73476ec891f3a9e8736b98b64ea5c2105f1ce15ea57a1f05b4bf2ffaeb5
</span>
worksrcdir ${distname}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build port:pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> depends_lib port:apache2 \
port:libxml2 \
port:lua \
port:curl
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args --with-apxs=${prefix}/apache2/bin/apxs \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset apache22]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set apxs ${prefix}/apache22/bin/apxs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set httpd_conf ${prefix}/apache22/conf/httpd.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mdir ${destroot}${prefix}/apache22/modules/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set apxs ${prefix}/bin/apxs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set httpd_conf ${prefix}/etc/apache2/httpd.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mdir ${destroot}${prefix}/lib/apache2/modules/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant apache22 description "use apache22 instead of apache2" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-replace port:apache2 port:apache22
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.violate_mtree yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args --with-apxs=${apxs} \
</span> --with-pcre=${prefix}/bin/pcre-config \
--with-apr=${prefix}/bin/apr-1-config \
--with-apu=${prefix}/bin/apu-1-config \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -36,12 +53,10 @@ configure.args --with-apxs=${prefix}/apache2/bin/apxs \
</span> --with-libxml=${prefix} \
--with-lua=${prefix}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-destroot.violate_mtree yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> destroot {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d -m 755 ${destroot}${prefix}/apache2/modules
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d -m 755 ${mdir}
</span> xinstall -m 644 -W ${worksrcpath}/apache2/.libs mod_security2.so \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/apache2/modules
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mdir}
</span> xinstall -m 755 -W ${worksrcpath}/mlogc mlogc mlogc-batch-load.pl \
${destroot}${prefix}/bin
xinstall -m 755 -W ${worksrcpath}/tools rules-updater.pl \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -59,7 +74,7 @@ livecheck.regex "tarball/(\\d+(?:\\.\\d+)*)/modsecurity-\\1.tar.gz"
</span>
notes "
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Now edit ${prefix}/apache2/conf/httpd.conf and add the following lines at the end of the LoadModules section:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Now edit ${httpd_conf} and add the following lines at the end of the LoadModules section:
</span> LoadFile ${prefix}/lib/libxml2.dylib
LoadFile ${prefix}/lib/liblua.dylib
LoadModule security2_module modules/mod_security2.so
</pre><pre style='margin:0'>
</pre>