aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-01-25 21:10:21 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-01-25 21:13:29 +0000
commit8ea662c5f71699443c369821319d211bd91f5901 (patch)
tree850e13001360a27bd99973ab246f85c1ba006f6b
parent58310a68d2e7085a56113b5025317c86b7946222 (diff)
downloadports-8ea662c5f71699443c369821319d211bd91f5901.tar.gz
ports-8ea662c5f71699443c369821319d211bd91f5901.zip
www/mod_php8*: Fix build
USES=apache must be called before bsd.pre.port.mk however this was overridden using an include clause. During my previous commit on refactoring apache.mk these include blocks were deleted which causes failure to the build of these port as USES=apache in preport.mk is never called. This commit changes and refactors the code. Fixes: 40843b1 Mk/Uses/apache.mk: Refactor after removal of older versions
-rw-r--r--lang/php80/Makefile17
-rw-r--r--lang/php81/Makefile17
-rw-r--r--lang/php82/Makefile17
-rw-r--r--www/mod_php80/Makefile3
-rw-r--r--www/mod_php81/Makefile3
-rw-r--r--www/mod_php82/Makefile3
6 files changed, 27 insertions, 33 deletions
diff --git a/lang/php80/Makefile b/lang/php80/Makefile
index 85486b348290..3a0079fc8c43 100644
--- a/lang/php80/Makefile
+++ b/lang/php80/Makefile
@@ -88,19 +88,8 @@ ZTS_CONFIGURE_ENV= pthreads_working="yes"
DESTDIRNAME= INSTALL_ROOT
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == riscv64
-CONFIGURE_ARGS+=--without-pcre-jit
-.endif
-
.if defined(PKGNAMEPREFIX)
USES+= apache
-.if ${PORT_OPTIONS:MAP2FILTER}
-CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
-.else
-CONFIGURE_ARGS+=--with-apxs2=${APXS}
-.endif
PLIST= ${PKGDIR}/pkg-plist.mod
PKGMESSAGE= ${PKGDIR}/pkg-message.mod
MODULENAME= libphp
@@ -108,6 +97,12 @@ SHORTMODNAME= php
WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!"
.endif
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == riscv64
+CONFIGURE_ARGS+=--without-pcre-jit
+.endif
+
.if ${PORT_OPTIONS:MPHPDBG} && ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+=--enable-phpdbg-debug
.endif
diff --git a/lang/php81/Makefile b/lang/php81/Makefile
index af232eed7af0..d84a3e179501 100644
--- a/lang/php81/Makefile
+++ b/lang/php81/Makefile
@@ -89,19 +89,8 @@ PHPDBG_VARS= PHP_SAPI+=phpdbg
ZTS_CONFIGURE_ON= --enable-zts
ZTS_CONFIGURE_ENV= pthreads_working="yes"
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == riscv64
-CONFIGURE_ARGS+= --without-pcre-jit
-.endif
-
.if defined(PKGNAMEPREFIX)
USES+= apache
-.if ${PORT_OPTIONS:MAP2FILTER}
-CONFIGURE_ARGS+= --with-apxs2filter=${APXS}
-.else
-CONFIGURE_ARGS+= --with-apxs2=${APXS}
-.endif
PLIST= ${PKGDIR}/pkg-plist.mod
PKGMESSAGE= ${PKGDIR}/pkg-message.mod
MODULENAME= libphp
@@ -109,6 +98,12 @@ SHORTMODNAME= php
WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!"
.endif
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == riscv64
+CONFIGURE_ARGS+= --without-pcre-jit
+.endif
+
.if ${PORT_OPTIONS:MPHPDBG} && ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+= --enable-phpdbg-debug
.endif
diff --git a/lang/php82/Makefile b/lang/php82/Makefile
index ae4cdc3c2c66..bbceb4d67248 100644
--- a/lang/php82/Makefile
+++ b/lang/php82/Makefile
@@ -89,19 +89,8 @@ PHPDBG_VARS= PHP_SAPI+=phpdbg
ZTS_CONFIGURE_ON= --enable-zts
ZTS_CONFIGURE_ENV= pthreads_working="yes"
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == riscv64
-CONFIGURE_ARGS+= --without-pcre-jit
-.endif
-
.if defined(PKGNAMEPREFIX)
USES+= apache
-.if ${PORT_OPTIONS:MAP2FILTER}
-CONFIGURE_ARGS+= --with-apxs2filter=${APXS}
-.else
-CONFIGURE_ARGS+= --with-apxs2=${APXS}
-.endif
PLIST= ${PKGDIR}/pkg-plist.mod
PKGMESSAGE= ${PKGDIR}/pkg-message.mod
MODULENAME= libphp
@@ -109,6 +98,12 @@ SHORTMODNAME= php
WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!"
.endif
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == riscv64
+CONFIGURE_ARGS+= --without-pcre-jit
+.endif
+
.if ${PORT_OPTIONS:MPHPDBG} && ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+= --enable-phpdbg-debug
.endif
diff --git a/www/mod_php80/Makefile b/www/mod_php80/Makefile
index 8ca5af8db5f6..6b5651434f38 100644
--- a/www/mod_php80/Makefile
+++ b/www/mod_php80/Makefile
@@ -13,4 +13,7 @@ OPTIONS_EXCLUDE= CGI CLI EMBED FPM
AP2FILTER_DESC= Use Apache 2.x filter interface (experimental)
+AP2FILTER_CONFIGURE_ON=--with-apxs2filter=${APXS}
+AP2FILTER_CONFIGURE_OFF=--with-apxs2=${APXS}
+
.include "${MASTERDIR}/Makefile"
diff --git a/www/mod_php81/Makefile b/www/mod_php81/Makefile
index b5c0cfd961a2..82d7543e42b3 100644
--- a/www/mod_php81/Makefile
+++ b/www/mod_php81/Makefile
@@ -13,4 +13,7 @@ OPTIONS_EXCLUDE= CGI CLI EMBED FPM
AP2FILTER_DESC= Use Apache 2.x filter interface (experimental)
+AP2FILTER_CONFIGURE_ON=--with-apxs2filter=${APXS}
+AP2FILTER_CONFIGURE_OFF=--with-apxs2=${APXS}
+
.include "${MASTERDIR}/Makefile"
diff --git a/www/mod_php82/Makefile b/www/mod_php82/Makefile
index a32582b36c28..723a425618b4 100644
--- a/www/mod_php82/Makefile
+++ b/www/mod_php82/Makefile
@@ -12,4 +12,7 @@ OPTIONS_EXCLUDE= CGI CLI EMBED FPM
AP2FILTER_DESC= Use Apache 2.x filter interface (experimental)
+AP2FILTER_CONFIGURE_ON=--with-apxs2filter=${APXS}
+AP2FILTER_CONFIGURE_OFF=--with-apxs2=${APXS}
+
.include "${MASTERDIR}/Makefile"