Do as other Mk/Uses/*.mk. It fixes r464175.
Details
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 15646 Build 15680: arc lint + arc unit
Event Timeline
I wonder why USES+= apache:xx is not enough in the lang/phpXX ports, why is the direct include needed?
I see now that it's below bsd.port.pre.mk, this is wrong...
It should probably be :
Index: lang/php72/Makefile
===================================================================
--- lang/php72/Makefile (revision 465011)
+++ lang/php72/Makefile (working copy)
@@ -59,6 +59,22 @@
DESTDIRNAME= INSTALL_ROOT
+.include <bsd.port.options.mk>
+
+.if defined(PKGNAMEPREFIX)
+USES+= apache:2.2+
+.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= libphp7
+SHORTMODNAME= php7
+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 ${PORT_OPTIONS:MCLI}
@@ -81,21 +97,6 @@
--with-fpm-group=${WWWGRP}
.endif
-.if defined(PKGNAMEPREFIX)
-USES+= apache:2.2+
-.include "${PORTSDIR}/Mk/Uses/apache.mk"
-.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= libphp7
-SHORTMODNAME= php7
-WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!"
-.endif
-
.if ${PORT_OPTIONS:MEMBED}
PHP_SAPI+= embed
CONFIGURE_ARGS+=--enable-embed
The inclusion of <bsd.port.pre.mk> and apache.mk is dated May 6 2006, at that time that was very likely the correct/only way to to do it. I haven't verified if the behavior is 100% preserved with your patch, but at first sight it seems correct.
This is what I also did in D12398 ?
Additionally, I'm not sure if this is proper. In my ports tree USESDIR is only used by the ports framework, nowhere in the ports.
Additionally it is not documented as a variable you can use in the header/comments of bsd.ports.mk.
OTOH... If portmgr is OK with using USESDIR in ports, I'm not complaining!