diff --git a/lang/php80/Makefile b/lang/php80/Makefile --- a/lang/php80/Makefile +++ b/lang/php80/Makefile @@ -25,7 +25,7 @@ --with-libxml \ --with-password-argon2=${LOCALBASE} \ --program-prefix="" -CPPFLAGS= -I${LOCALBASE}/include +CPPFLAGS+= -I${LOCALBASE}/include USES+= autoreconf:build USE_GNOME= libxml2 @@ -50,22 +50,41 @@ OPTIONS_EXCLUDE_sparc64= DTRACE OPTIONS_SUB= yes -CLI_DESC= Build CLI version CGI_DESC= Build CGI version -FPM_DESC= Build FPM version +CLI_DESC= Build CLI version EMBED_DESC= Build embedded library -PHPDBG_DESC= Interactive PHP debugger +FPM_DESC= Build FPM version +LINKTHR_DESC= Link thread lib (for threaded extensions) MYSQLND_DESC= Build with MySQL Native Driver MYSQL80_DESC= Build with MySQL caching password mechanism -LINKTHR_DESC= Link thread lib (for threaded extensions) +PHPDBG_DESC= Interactive PHP debugger ZTS_DESC= Force Zend Thread Safety (ZTS) build -MYSQL80_CONFIGURE_ON= --with-openssl +CGI_CONFIGURE_OFF= --disable-cgi +CGI_VARS= PHP_SAPI+=cgi +CLI_CONFIGURE_OFF= --disable-cli +CLI_VARS= PHP_SAPI+=cli +DEBUG_CONFIGURE_ON= --enable-debug +DTRACE_CONFIGURE_ON= --enable-dtrace +DTRACE_PLIST_SUB= DTRACE="" +DTRACE_PLIST_SUB_OFF= DTRACE="@comment " +EMBED_CONFIGURE_ON= --enable-embed +EMBED_VARS= PHP_SAPI+=embed +FPM_CONFIGURE_ON= --enable-fpm --with-fpm-user=${WWWOWN} --with-fpm-group=${WWWGRP} +FPM_VARS= PHP_SAPI+=fpm +IPV6_CONFIGURE_OFF= --disable-ipv6 +LINKTHR_LIBS= -lpthread +MYSQLND_CONFIGURE_ON= --enable-mysqlnd MYSQL80_CONFIGURE_ENV= OPENSSL_CFLAGS="-I${OPENSSLINC}" \ OPENSSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" \ PHP_OPENSSL=no +MYSQL80_CONFIGURE_ON= --with-openssl MYSQL80_LDFLAGS= -L${OPENSSLLIB} -lcrypto -lssl MYSQL80_USES= ssl +PHPDBG_CONFIGURE_ON= --enable-phpdbg +PHPDBG_VARS= PHP_SAPI+=phpdbg +ZTS_CONFIGURE_ENV= pthreads_working="yes" +ZTS_CONFIGURE_ON= --enable-zts CONFLICTS= php72-* php73-* php74-* @@ -73,28 +92,8 @@ .include -.if ${PORT_OPTIONS:MMYSQLND} -CONFIGURE_ARGS+=--enable-mysqlnd -.endif - -.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) @@ -112,18 +111,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="" @@ -134,30 +124,6 @@ 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-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 - .if ${PORT_OPTIONS:MMYSQL80} WARNING= "PHP is now built with MySQL 8.0 support which has caching password mechanism. \ This implies php80-openssl module. Hence php80-openssl can no longer be \ @@ -169,10 +135,10 @@ 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) diff --git a/lang/php80/Makefile.ext b/lang/php80/Makefile.ext --- a/lang/php80/Makefile.ext +++ b/lang/php80/Makefile.ext @@ -45,12 +45,27 @@ CDB_DESC= cdb database support DB4_DESC= Berkeley DB4 support +FLATFILE_DESC= flatfile support GDBM_DESC= GDBM database support -QDBM_DESC= QDBM database support -TOKYO_DESC= Tokyo Cabinet database support INIFILE_DESC= INI file support -FLATFILE_DESC= flatfile support LMDB_DESC= LMDB database support +QDBM_DESC= QDBM database support +TOKYO_DESC= Tokyo Cabinet database support + +CDB_CONFIGURE_OFF= --without-cdb +DB4_CONFIGURE_ON= --with-db4=${LOCALBASE} +DB4_USES= bdb +DB4_VARS= WITH_BDB_HIGHEST=yes +FLATFILE_CONFIGURE_OFF= --disable-flatfile +GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm +GDBM_CONFIGURE_ON= --with-gdbm=${LOCALBASE} +INIFILE_CONFIGURE_OFF= --disable-inifile +LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb +LMDB_CONFIGURE_ON= --with-lmdb=${LOCALBASE} +QDBM_LIB_DEPENDS= libqdbm.so:databases/qdbm +QDBM_CONFIGURE_ON= --with-qdbm=${LOCALBASE} +TOKYO_CONFIGURE_ON= --with-tcadb=${LOCALBASE} +TOKYO_LIB_DEPENDS= libtokyocabinet.so:databases/tokyocabinet PHP_HEADER_DIRS= libcdb libflatfile libinifile .endif @@ -120,6 +135,12 @@ WEBP_DESC= Enable WebP image format support X11_DESC= Enable XPM support +JIS_CONFIGURE_ON= --enable-gd-jis-conv +WEBP_CONFIGURE_ON= --with-webp +WEBP_LIB_DEPENDS= libwebp.so:graphics/webp +X11_CONFIGURE_ON= --with-xpm +X11_USE= XORG=xpm +X11_USES= xorg .endif .if ${PHP_MODNAME} == "gettext" @@ -148,6 +169,9 @@ CCLIENT_DESC= Uses the original but unmaintained cclient PANDA_DESC= Uses the forked panda-cclient instead of the original cclient +PANDA_LIB_DEPENDS= libc-client4.so.10:mail/panda-cclient +PANDA_LIB_DEPENDS_OFF= libc-client4.so.9:mail/cclient + CONFIGURE_ARGS+=--with-imap=${LOCALBASE} \ --with-pcre-dir=${LOCALBASE} \ --with-imap-ssl=${OPENSSLBASE} @@ -182,7 +206,6 @@ .endif .if ${PHP_MODNAME} == "mbstring" - CONFIGURE_ARGS+=--enable-mbstring \ --with-pcre-dir=${LOCALBASE} @@ -191,6 +214,10 @@ REGEX_DESC= Enable multibyte regex support +REGEX_CONFIGURE_ON= --with-onig=${LOCALBASE} +REGEX_CONFIGURE_OFF=--disable-mbregex +REGEX_LIB_DEPENDS= libonig.so:devel/oniguruma + PHP_HEADER_DIRS=libmbfl libmbfl/filters libmbfl/mbfl libmbfl/nls .endif @@ -199,6 +226,10 @@ OPTIONS_DEFAULT=MYSQLND MYSQLND_DESC= Use MySQL Native Driver + +MYSQLND_CONFIGURE_OFF= --with-mysqli=${LOCALBASE}/bin/mysql_config +MYSQLND_CONFIGURE_ON= --with-mysqli=mysqlnd +MYSQLND_USES_OFF= mysql .endif .if ${PHP_MODNAME} == "odbc" @@ -238,6 +269,9 @@ OPTIONS_DEFINE= MSSQL MSSQL_DESC= Enable Microsoft SQL Server support + +MSSQL_LIB_DEPENDS= libsybdb.so:databases/freetds +MSSQL_LIB_DEPENDS_OFF= libct.so:databases/freetds .endif .if ${PHP_MODNAME} == "pdo_firebird" @@ -260,6 +294,11 @@ MYSQLND_DESC= Use MySQL Native Driver +MYSQLND_CONFIGURE_OFF= --with-pdo-mysql=${LOCALBASE} \ + --with-zlib-dir=/usr +MYSQLND_CONFIGURE_ON= --with-pdo-mysql=mysqlnd +MYSQLND_USES_OFF= mysql + USE_PHP= pdo:build .endif @@ -437,101 +476,8 @@ USES+= pkgconfig .endif -.include - -.if ${PHP_MODNAME} == "dba" -. if empty(PORT_OPTIONS:MCDB) -CONFIGURE_ARGS+=--without-cdb -. endif -. if ${PORT_OPTIONS:MDB4} -CONFIGURE_ARGS+=--with-db4=${LOCALBASE} - -USES+= bdb -WITH_BDB_HIGHEST= yes -. endif -. if ${PORT_OPTIONS:MGDBM} -LIB_DEPENDS+= libgdbm.so:databases/gdbm - -CONFIGURE_ARGS+=--with-gdbm=${LOCALBASE} -. endif -. if ${PORT_OPTIONS:MQDBM} -LIB_DEPENDS+= libqdbm.so:databases/qdbm - -CONFIGURE_ARGS+=--with-qdbm=${LOCALBASE} -. endif -. if ${PORT_OPTIONS:MTOKYO} -LIB_DEPENDS+= libtokyocabinet.so:databases/tokyocabinet - -CONFIGURE_ARGS+=--with-tcadb=${LOCALBASE} -. endif -. if empty(PORT_OPTIONS:MINIFILE) -CONFIGURE_ARGS+=--disable-inifile -. endif -. if empty(PORT_OPTIONS:MFLATFILE) -CONFIGURE_ARGS+=--disable-flatfile -. endif - -. if ${PORT_OPTIONS:MLMDB} -LIB_DEPENDS+= liblmdb.so:databases/lmdb -CONFIGURE_ARGS+= --with-lmdb=${LOCALBASE} -.endif -.endif - -.if ${PHP_MODNAME} == "mysqli" -. if ${PORT_OPTIONS:MMYSQLND} -CONFIGURE_ARGS+=--with-mysqli=mysqlnd -. else -CONFIGURE_ARGS+=--with-mysqli=${LOCALBASE}/bin/mysql_config -USES+= mysql -. endif -.endif - -.if ${PHP_MODNAME} == "pdo_mysql" -. if ${PORT_OPTIONS:MMYSQLND} -CONFIGURE_ARGS+=--with-pdo-mysql=mysqlnd -. else -CONFIGURE_ARGS+=--with-pdo-mysql=${LOCALBASE} \ - --with-zlib-dir=/usr -USES+= mysql -. endif -.endif - -.if ${PHP_MODNAME} == "gd" -. if ${PORT_OPTIONS:MJIS} -CONFIGURE_ARGS+=--enable-gd-jis-conv -. endif -. if ${PORT_OPTIONS:MWEBP} -LIB_DEPENDS+= libwebp.so:graphics/webp - -CONFIGURE_ARGS+=--with-webp -. endif -. if ${PORT_OPTIONS:MX11} -USES+= xorg -USE_XORG= xpm - -CONFIGURE_ARGS+=--with-xpm -. endif -.endif - .include -.if ${PHP_MODNAME} == "imap" -. if ${PORT_OPTIONS:MPANDA} -LIB_DEPENDS+= libc-client4.so.10:mail/panda-cclient -. else -LIB_DEPENDS+= libc-client4.so.9:mail/cclient -. endif -.endif - -.if ${PHP_MODNAME} == "mbstring" -. if ${PORT_OPTIONS:MREGEX} -LIB_DEPENDS+= libonig.so:devel/oniguruma -CONFIGURE_ARGS+=--with-onig=${LOCALBASE} -. else -CONFIGURE_ARGS+=--disable-mbregex -. endif -.endif - .if ${PHP_MODNAME} == "openssl" post-stage: @if ${PREFIX}/bin/php -m | grep openssl 2>/dev/null && ( [ ! -f ${PREFIX}/etc/php/ext-20-openssl.ini ] && [ ! -f ${PREFIX}/etc/php/ext-30-openssl.ini ] ); then \ @@ -542,26 +488,13 @@ fi .endif -.if ${PHP_MODNAME} == "openssl" || ${PHP_MODNAME} == "sqlite3" +.if ${PHP_MODNAME} == "openssl" || ${PHP_MODNAME} == "sqlite3" || ${PHP_MODNAME} == "zlib" post-extract: @${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4 .endif -.if ${PHP_MODNAME} == "pdo_dblib" -. if ${PORT_OPTIONS:MMSSQL} -LIB_DEPENDS+= libsybdb.so:databases/freetds -. else -LIB_DEPENDS+= libct.so:databases/freetds -. endif -.endif - .if ${PHP_MODNAME} == "xml" post-extract: @${MKDIR} ${WRKSRC}/ext/xml @${CP} ${WRKSRC}/expat_compat.h ${WRKSRC}/ext/xml .endif - -.if ${PHP_MODNAME} == "zlib" -post-extract: - @${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4 -.endif