Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171517208
D12398.id50485.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D12398.id50485.diff
View Options
Index: lang/php73/Makefile
===================================================================
--- lang/php73/Makefile
+++ lang/php73/Makefile
@@ -30,9 +30,15 @@
--with-pcre-regex=${LOCALBASE} \
--with-password-argon2=${LOCALBASE} \
--program-prefix=""
-USES+= autoreconf:build
+CONFIGURE_ENV+= ac_cv_decimal_fp_supported="no" \
+ lt_cv_path_SED="sed"
+USES+= autoreconf:build gnome
USE_GNOME= libxml2
+CONFLICTS= php56-* php7[012]-*
+
+DESTDIRNAME= INSTALL_ROOT
+
OPTIONS_DEFINE+=CLI CGI FPM EMBED PHPDBG DEBUG DTRACE IPV6 LINKTHR ZTS
OPTIONS_DEFAULT=CLI CGI FPM EMBED LINKTHR DTRACE
OPTIONS_EXCLUDE_DragonFly= DTRACE
@@ -55,40 +61,37 @@
LINKTHR_DESC= Link thread lib (for threaded extensions)
ZTS_DESC= Force Zend Thread Safety (ZTS) build
-CONFLICTS= php56-* php70-* php71-* php72-*
+OPTIONS_SUB= yes
-DESTDIRNAME= INSTALL_ROOT
+AP2FILTER_CONFIGURE_ON= --with-apxs2filter=${APXS}
+AP2FILTER_CONFIGURE_OFF=--with-apxs2=${APXS}
+CGI_VARS= php_sapi+=cgi
+CGI_CONFIGURE_OFF= --disable-cgi
+CLI_VARS= php_sapi+=cli
+CLI_CONFIGURE_OFF= --disable-cli
+DEBUG_CONFIGURE_ON= --enable-debug
+DTRACE_CONFIGURE_ON= --enable-dtrace
+EMBED_VARS= PHP_SAPI+=embed
+ENBED_CONFIGURE_ON= --enable-embed
+FPM_VARS= php_sapi+=fpm
+FPM_CONFIGURE_ON= --enable-fpm \
+ --with-fpm-user=${WWWOWN} \
+ --with-fpm-group=${WWWGRP}
+FPM_USE= rc_subr=php-fpm
+IPV6_CONFIGURE_OFF= --disable-ipv6
+LINKTHR_LIBS= -lpthread
+PHPDBG_VARS= php_sapi+=phpdbg
+PHPDBG_CONFIGURE_ON= --enable-phpdbg
+ZTS_CONFIGURE_ON= --enable-maintainer-zts
+ZTS_CONFIGURE_ENV= pthreads_working="yes"
.include <bsd.port.pre.mk>
-.if ${PORT_OPTIONS:MCLI}
-PHP_SAPI+= cli
-.else
-CONFIGURE_ARGS+=--disable-cli
-.endif
-
-.if ${PORT_OPTIONS:MCGI}
-PHP_SAPI+= cgi
-.else
-CONFIGURE_ARGS+=--disable-cgi
-.endif
-
-.if ${PORT_OPTIONS:MFPM}
-PHP_SAPI+= fpm
-USE_RC_SUBR+= php-fpm
-CONFIGURE_ARGS+=--enable-fpm \
- --with-fpm-user=${WWWOWN} \
- --with-fpm-group=${WWWGRP}
-.endif
-
-.if defined(PKGNAMEPREFIX)
-USES+= apache:2.2+
+.if defined(PKGNAMEPREFIX) && ${PKGNAMEPREFIX} == "mod_"
+# Apache module
+USES+= apache:2.4+
+PKGNAMEPREFIX= ${APACHE_PKGNAMEPREFIX}mod_
.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
@@ -96,18 +99,9 @@
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
-.endif
-
-.if ${PORT_OPTIONS:MPHPDBG}
-PHP_SAPI+= phpdbg
-CONFIGURE_ARGS+=--enable-phpdbg
-.if ${PORT_OPTIONS:MDEBUG}
+.if ${PORT_OPTIONS:MPHPDBG} && ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+=--enable-phpdbg-debug
.endif
-.endif
.if ${PORT_OPTIONS:MCLI} || ${PORT_OPTIONS:MEMBED}
PLIST_SUB+= SAPI_INC=""
@@ -115,40 +109,13 @@
PLIST_SUB+= SAPI_INC="@comment "
.endif
-CONFIGURE_ENV+= ac_cv_decimal_fp_supported="no" \
- lt_cv_path_SED="sed"
-
-.if ${PORT_OPTIONS:MLINKTHR}
-LIBS+= -lpthread
-.endif
-
-.if ${PORT_OPTIONS:MDEBUG}
-CONFIGURE_ARGS+=--enable-debug
-.endif
-
-.if ${PORT_OPTIONS:MZTS}
-CONFIGURE_ARGS+=--enable-maintainer-zts
-CONFIGURE_ENV+= pthreads_working="yes"
-.endif
-
-.if ${PORT_OPTIONS:MDTRACE}
-CONFIGURE_ARGS+=--enable-dtrace
-PLIST_SUB+= DTRACE=""
-.else
-PLIST_SUB+= DTRACE="@comment "
-.endif
-
-.if empty(PORT_OPTIONS:MIPV6)
-CONFIGURE_ARGS+=--disable-ipv6
-.endif
-
post-patch:
@${TOUCH} ${WRKSRC}/ext/php_config.h
@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
-.if ${PORT_OPTIONS:MFPM}
+
+post-patch-FPM-on:
@${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
${WRKSRC}/sapi/fpm/php-fpm.conf.in
-.endif
pre-configure:
@(cd ${WRKSRC} && ${SETENV} MAKE=${MAKE_CMD} ./buildconf --force)
@@ -175,7 +142,7 @@
${STAGEDIR}${PREFIX}/${APACHEMODDIR}
.endif
-.else
+.else # !defined(PKGNAMESUFFIX)
.include "${MASTERDIR}/Makefile.ext"
-.endif
+.endif # !defined(PKGNAMESUFFIX)
.include <bsd.port.post.mk>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 12, 1:44 PM (6 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38708550
Default Alt Text
D12398.id50485.diff (4 KB)
Attached To
Mode
D12398: lang/php73: Simplify with options framework
Attached
Detach File
Event Timeline
Log In to Comment