git: 4f698c44ee8b - main - */php80*: Refactor codes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 Nov 2023 12:30:03 UTC
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=4f698c44ee8be9017a07ba9a2b14c9d766ea005b commit 4f698c44ee8be9017a07ba9a2b14c9d766ea005b Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2023-11-18 01:00:54 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2023-11-18 12:29:52 +0000 */php80*: Refactor codes - Switch to system pcre2 - Remove no longer required CONFIGURE_ARGS - Remove unnecessary patch from archivers/php80-phar - Remove unnecessary patch from converters/php80-mbstring - Add support for bdb:18 in databases/php80-dba - Remove unnecessary introduction of configure flags in databases/php80-odbc - Remove unnecessary patch from devel/php80-readline - Remove NOOP post-patch target from ftp/php80-ftp - Remove unnecessary patch and NOOP OPTIONS TRUETYPE from graphics/php80-gd - Remove unnecessary patch from mail/php80-imap and remove the OPTION for using CCLIENT as this has been marked DEPRECATED since there has been no release in last 16 years - Remove unnecessary patch from sysutils/php80-fileinfo - Remove unnecessary patch from textproc/php80-simplexml - Refactor patches for post-patch target in textproc/php80-enchant and switch to enchant2 for dependencies - Refactor patches for post-patch target in textproc/php80-xsl --- archivers/php80-phar/files/patch-config.m4 | 41 -------------- converters/php80-mbstring/files/patch-config.m4 | 44 --------------- databases/php80-dba/files/patch-config.m4 | 36 +++---------- databases/php80-odbc/files/patch-config.m4 | 34 +++++------- devel/php80-readline/files/patch-config.m4 | 33 ------------ devel/php80-readline/files/patch-readline_cli.c | 13 ----- ftp/php80-ftp/Makefile | 4 -- graphics/php80-gd/files/patch-gd.c | 11 ---- lang/php80/Makefile | 9 ++-- lang/php80/Makefile.ext | 72 ++++++++----------------- lang/php80/pkg-plist | 7 --- mail/php80-imap/files/patch-config.m4 | 47 ---------------- sysutils/php80-fileinfo/files/patch-config.m4 | 21 -------- textproc/php80-enchant/Makefile | 5 ++ textproc/php80-enchant/files/patch-enchant.c | 11 ---- textproc/php80-simplexml/files/patch-config.m4 | 42 --------------- textproc/php80-xsl/Makefile | 5 ++ textproc/php80-xsl/files/patch-php_xsl.h | 11 ---- 18 files changed, 56 insertions(+), 390 deletions(-) diff --git a/archivers/php80-phar/files/patch-config.m4 b/archivers/php80-phar/files/patch-config.m4 deleted file mode 100644 index 1aba3bd9a5a8..000000000000 --- a/archivers/php80-phar/files/patch-config.m4 +++ /dev/null @@ -1,41 +0,0 @@ ---- config.m4.orig 2016-06-21 19:56:50 UTC -+++ config.m4 -@@ -4,8 +4,38 @@ dnl config.m4 for extension phar - PHP_ARG_ENABLE(phar, for phar archive support, - [ --disable-phar Disable phar support], yes) - -+PHP_ARG_WITH(pcre-dir, pcre install prefix, -+[ --with-pcre-dir PHAR: pcre install prefix], no, no) -+ -+ - if test "$PHP_PHAR" != "no"; then -+ -+ dnl This is PECL build, check if bundled PCRE library is used -+ old_CPPFLAGS=$CPPFLAGS -+ CPPFLAGS=$INCLUDES -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=yes -+ ],[ -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=pecl -+ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include) -+ ],[ -+ PHP_PCRE_REGEX=no -+ ]) -+ ]) -+ - PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) -+ PHP_HASH=yes - AC_MSG_CHECKING([for phar openssl support]) - if test "$PHP_HASH_SHARED" != "yes"; then - if test "$PHP_HASH" != "no"; then diff --git a/converters/php80-mbstring/files/patch-config.m4 b/converters/php80-mbstring/files/patch-config.m4 deleted file mode 100644 index a3e5c14477a3..000000000000 --- a/converters/php80-mbstring/files/patch-config.m4 +++ /dev/null @@ -1,44 +0,0 @@ ---- config.m4.orig 2019-08-06 06:54:10 UTC -+++ config.m4 -@@ -37,6 +37,31 @@ AC_DEFUN([PHP_MBSTRING_EXTENSION], [ - - out="php_config.h" - -+ dnl This is PECL build, check if bundled PCRE library is used -+ old_CPPFLAGS=$CPPFLAGS -+ CPPFLAGS=$INCLUDES -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=yes -+ ],[ -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=pecl -+ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include) -+ ],[ -+ PHP_PCRE_REGEX=no -+ ]) -+ ]) -+ -+ - if test "$ext_shared" != "no" && test -f "$ext_builddir/config.h.in"; then - out="$abs_builddir/config.h" - fi -@@ -200,6 +225,9 @@ PHP_ARG_ENABLE([mbregex], - [yes], - [no]) - -+PHP_ARG_WITH(pcre-dir, pcre install prefix, -+[ --with-pcre-dir MBSTRING: pcre install prefix], no, no) -+ - if test "$PHP_MBSTRING" != "no"; then - AC_DEFINE([HAVE_MBSTRING],1,[whether to have multibyte string support]) - diff --git a/databases/php80-dba/files/patch-config.m4 b/databases/php80-dba/files/patch-config.m4 index 30f662138374..d26a96012cc2 100644 --- a/databases/php80-dba/files/patch-config.m4 +++ b/databases/php80-dba/files/patch-config.m4 @@ -1,6 +1,6 @@ ---- config.m4.orig 2016-01-06 15:14:47 UTC +--- config.m4.orig 2023-08-03 17:13:08 UTC +++ config.m4 -@@ -324,6 +324,38 @@ if test "$PHP_DB4" != "no"; then +@@ -387,6 +387,14 @@ if test "$PHP_DB4" != "no"; then THIS_PREFIX=$i THIS_INCLUDE=$i/include/db5.3/db.h break @@ -8,43 +8,19 @@ + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db5/db.h + break -+ elif test -f "$i/include/db48/db.h"; then ++ elif test -f "$i/include/db18/db.h"; then + THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db48/db.h -+ break -+ elif test -f "$i/include/db47/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db47/db.h -+ break -+ elif test -f "$i/include/db46/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db46/db.h -+ break -+ elif test -f "$i/include/db44/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db44/db.h -+ break -+ elif test -f "$i/include/db43/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db43/db.h -+ break -+ elif test -f "$i/include/db42/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db42/db.h -+ break -+ elif test -f "$i/include/db41/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db41/db.h ++ THIS_INCLUDE=$i/include/db18/db.h + break elif test -f "$i/include/db5.1/db.h"; then THIS_PREFIX=$i THIS_INCLUDE=$i/include/db5.1/db.h -@@ -366,7 +398,7 @@ if test "$PHP_DB4" != "no"; then +@@ -429,7 +437,7 @@ if test "$PHP_DB4" != "no"; then break fi done - PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) -+ PHP_DBA_DB_CHECK(4, db-5 db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) ++ PHP_DBA_DB_CHECK(4, db-5 db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db-18 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) fi PHP_DBA_STD_RESULT(db4,Berkeley DB4) diff --git a/databases/php80-odbc/files/patch-config.m4 b/databases/php80-odbc/files/patch-config.m4 index 04efc6ded7c9..47044e175cea 100644 --- a/databases/php80-odbc/files/patch-config.m4 +++ b/databases/php80-odbc/files/patch-config.m4 @@ -1,16 +1,6 @@ ---- config.m4.orig 2019-08-06 06:54:18 UTC +--- config.m4.orig 2023-08-03 17:13:08 UTC +++ config.m4 -@@ -91,6 +91,9 @@ AC_DEFUN([PHP_ODBC_FIND_EMPRESS_BCS_LIBS - dnl - dnl configure options - dnl -+PHP_ARG_ENABLE(odbc,, -+[ --enable-odbc Enable ODBC support with selected driver]) -+ - - PHP_ARG_WITH([odbcver],, - [AS_HELP_STRING([[--with-odbcver[=HEX]]], -@@ -102,7 +105,7 @@ PHP_ARG_WITH([odbcver],, +@@ -102,7 +102,7 @@ PHP_ARG_WITH([adabas],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([adabas],, [AS_HELP_STRING([[--with-adabas[=DIR]]], @@ -19,7 +9,7 @@ AC_MSG_CHECKING([for Adabas support]) if test "$PHP_ADABAS" != "no"; then -@@ -132,7 +135,7 @@ fi +@@ -132,7 +132,7 @@ PHP_ARG_WITH([sapdb],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([sapdb],, [AS_HELP_STRING([[--with-sapdb[=DIR]]], @@ -28,7 +18,7 @@ AC_MSG_CHECKING([for SAP DB support]) if test "$PHP_SAPDB" != "no"; then -@@ -153,7 +156,7 @@ fi +@@ -153,7 +153,7 @@ PHP_ARG_WITH([solid],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([solid],, [AS_HELP_STRING([[--with-solid[=DIR]]], @@ -37,7 +27,7 @@ AC_MSG_CHECKING(for Solid support) if test "$PHP_SOLID" != "no"; then -@@ -181,7 +184,7 @@ fi +@@ -181,7 +181,7 @@ PHP_ARG_WITH([ibm-db2],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([ibm-db2],, [AS_HELP_STRING([[--with-ibm-db2[=DIR]]], @@ -46,7 +36,7 @@ AC_MSG_CHECKING(for IBM DB2 support) if test "$PHP_IBM_DB2" != "no"; then -@@ -222,7 +225,7 @@ if test -z "$ODBC_TYPE"; then +@@ -222,7 +222,7 @@ PHP_ARG_WITH([empress],, PHP_ARG_WITH([empress],, [AS_HELP_STRING([[--with-empress[=DIR]]], [Include Empress support $EMPRESSPATH (Empress Version >= 8.60 @@ -55,7 +45,7 @@ AC_MSG_CHECKING(for Empress support) if test "$PHP_EMPRESS" != "no"; then -@@ -248,7 +251,7 @@ if test -z "$ODBC_TYPE"; then +@@ -248,7 +248,7 @@ PHP_ARG_WITH([empress-bcs],, PHP_ARG_WITH([empress-bcs],, [AS_HELP_STRING([[--with-empress-bcs[=DIR]]], [Include Empress Local Access support $EMPRESSPATH (Empress Version >= @@ -64,7 +54,7 @@ AC_MSG_CHECKING(for Empress local access support) if test "$PHP_EMPRESS_BCS" != "no"; then -@@ -294,7 +297,7 @@ PHP_ARG_WITH([custom-odbc],, +@@ -294,7 +294,7 @@ PHP_ARG_WITH([custom-odbc],, your include dirs. For example, you should define following for Sybase SQL Anywhere 5.5.00 on QNX, prior to running this configure script: CPPFLAGS="-DODBC_QNX -DSQLANY_BUG" LDFLAGS=-lunix @@ -73,7 +63,7 @@ AC_MSG_CHECKING(for a custom ODBC support) if test "$PHP_CUSTOM_ODBC" != "no"; then -@@ -317,7 +320,7 @@ fi +@@ -317,7 +317,7 @@ PHP_ARG_WITH([iodbc],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([iodbc],, [AS_HELP_STRING([--with-iodbc], @@ -82,7 +72,7 @@ AC_MSG_CHECKING(whether to build with iODBC support) if test "$PHP_IODBC" != "no"; then -@@ -335,7 +338,7 @@ fi +@@ -335,7 +335,7 @@ PHP_ARG_WITH([esoob],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([esoob],, [AS_HELP_STRING([[--with-esoob[=DIR]]], @@ -91,7 +81,7 @@ AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support) if test "$PHP_ESOOB" != "no"; then -@@ -358,7 +361,7 @@ fi +@@ -358,7 +358,7 @@ PHP_ARG_WITH([unixODBC],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([unixODBC],, [AS_HELP_STRING([--with-unixODBC], @@ -100,7 +90,7 @@ AC_MSG_CHECKING(whether to build with unixODBC support) if test "$PHP_UNIXODBC" != "no"; then -@@ -386,7 +389,7 @@ fi +@@ -386,7 +386,7 @@ PHP_ARG_WITH([dbmaker],, if test -z "$ODBC_TYPE"; then PHP_ARG_WITH([dbmaker],, [AS_HELP_STRING([[--with-dbmaker[=DIR]]], diff --git a/devel/php80-readline/files/patch-config.m4 b/devel/php80-readline/files/patch-config.m4 deleted file mode 100644 index 93799734a3e3..000000000000 --- a/devel/php80-readline/files/patch-config.m4 +++ /dev/null @@ -1,33 +0,0 @@ ---- config.m4.orig 2019-08-06 06:54:14 UTC -+++ config.m4 -@@ -3,16 +3,10 @@ PHP_ARG_WITH([libedit], - [AS_HELP_STRING([--with-libedit], - [Include libedit readline replacement (CLI/CGI only)])]) - --if test "$PHP_LIBEDIT" = "no"; then - PHP_ARG_WITH([readline], - [for readline support], - [AS_HELP_STRING([[--with-readline[=DIR]]], - [Include readline support (CLI/CGI only)])]) --else -- dnl "register" the --with-readline option to prevent invalid "unknown -- dnl configure option" warning -- php_with_readline=no --fi - - if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then - for i in $PHP_READLINE /usr/local /usr; do -@@ -78,6 +72,13 @@ if test "$PHP_READLINE" && test "$PHP_RE - AC_DEFINE(HAVE_HISTORY_LIST, 1, [ ]) - AC_DEFINE(HAVE_LIBREADLINE, 1, [ ]) - -+ PHP_CHECK_LIBRARY(readline, rl_completion_matches, -+ [ -+ AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, [ ]) -+ ],[],[ -+ -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS -+ ]) -+ - elif test "$PHP_LIBEDIT" != "no"; then - if test "$PHP_LIBEDIT" != "yes"; then - AC_MSG_WARN([libedit directory ignored, rely on pkg-config]) diff --git a/devel/php80-readline/files/patch-readline_cli.c b/devel/php80-readline/files/patch-readline_cli.c deleted file mode 100644 index 02f55974f9b0..000000000000 --- a/devel/php80-readline/files/patch-readline_cli.c +++ /dev/null @@ -1,13 +0,0 @@ ---- readline_cli.c.orig 2012-03-02 16:40:26.000000000 +0100 -+++ readline_cli.c 2012-03-02 16:40:43.000000000 +0100 -@@ -19,6 +19,10 @@ - - /* $Id: readline_cli.c 321634 2012-01-01 13:15:04Z felipe $ */ - -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ - #include "php.h" - - #ifndef HAVE_RL_COMPLETION_MATCHES diff --git a/ftp/php80-ftp/Makefile b/ftp/php80-ftp/Makefile index be45ee9254e0..5e9c3f76ec95 100644 --- a/ftp/php80-ftp/Makefile +++ b/ftp/php80-ftp/Makefile @@ -6,8 +6,4 @@ PKGNAMESUFFIX= -ftp TEST_TARGET= test -post-patch: - @${REINPLACE_CMD} s/HAVE_OPENSSL_EXT/__FreeBSD__/ \ - ${WRKSRC}/ftp.* ${WRKSRC}/php_ftp.* - .include "${MASTERDIR}/Makefile" diff --git a/graphics/php80-gd/files/patch-gd.c b/graphics/php80-gd/files/patch-gd.c deleted file mode 100644 index 37de5d8772fc..000000000000 --- a/graphics/php80-gd/files/patch-gd.c +++ /dev/null @@ -1,11 +0,0 @@ ---- gd.c.orig 2020-09-29 22:36:51 UTC -+++ gd.c -@@ -72,7 +72,7 @@ static int le_gd_font; - # include FT_FREETYPE_H - #endif - --#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) -+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) - # include "X11/xpm.h" - #endif - diff --git a/lang/php80/Makefile b/lang/php80/Makefile index 6277d8893b12..1b137546c8cf 100644 --- a/lang/php80/Makefile +++ b/lang/php80/Makefile @@ -14,12 +14,13 @@ LICENSE= PHP301 DEPRECATED= Upstream support ends on 2023-11-26 EXPIRATION_DATE= 2023-12-31 -USES+= compiler:c11 tar:xz cpe gnome pkgconfig +USES+= compiler:c11 tar:xz cpe gnome localbase pkgconfig CPE_PRODUCT= php CONFLICTS_INSTALL?= php[0-9][0-9]${PKGNAMESUFFIX} .if !defined(PKGNAMESUFFIX) +BUILD_DEPENDS= re2c>0:devel/re2c LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \ libargon2.so:security/libargon2 @@ -31,9 +32,10 @@ CONFIGURE_ARGS+= \ --with-layout=GNU \ --with-libxml \ --with-openssl \ - --with-password-argon2=${LOCALBASE} + --with-password-argon2=${LOCALBASE} \ + --with-external-pcre=${LOCALBASE} -USES+= autoreconf:build localbase ssl +USES+= autoreconf:build ssl USE_GNOME= libxml2 LDFLAGS= -L${OPENSSLLIB} -lcrypto -lssl @@ -128,7 +130,6 @@ CONFIGURE_ENV+= ac_cv_decimal_fp_supported="no" \ post-patch: @${TOUCH} ${WRKSRC}/ext/php_config.h - @${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-* post-patch-FPM-on: @${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \ diff --git a/lang/php80/Makefile.ext b/lang/php80/Makefile.ext index 26b4e9f76151..f32ae44f1321 100644 --- a/lang/php80/Makefile.ext +++ b/lang/php80/Makefile.ext @@ -71,17 +71,17 @@ PHP_HEADER_DIRS= libcdb libflatfile libinifile .endif .if ${PHP_MODNAME} == "dom" -CONFIGURE_ARGS+=--enable-dom \ - --with-libxml-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-dom USES+= pkgconfig USE_GNOME= libxml2 .endif .if ${PHP_MODNAME} == "enchant" -LIB_DEPENDS+= libenchant.so:textproc/enchant +LIB_DEPENDS+= libenchant-2.so:textproc/enchant2 CONFIGURE_ARGS+=--with-enchant=${LOCALBASE} -USES+= pkgconfig +USES+= gettext-runtime pkgconfig +USE_GNOME+= glib20 .endif .if ${PHP_MODNAME} == "exif" @@ -90,19 +90,17 @@ CONFIGURE_ARGS+=--enable-exif .if ${PHP_MODNAME} == "ffi" LIB_DEPENDS= libffi.so:devel/libffi -CONFIGURE_ARGS+=--enable-ffi +CONFIGURE_ARGS+=--with-ffi .endif .if ${PHP_MODNAME} == "fileinfo" -CONFIGURE_ARGS+=--enable-fileinfo \ - --with-pcre-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-fileinfo PHP_HEADER_DIRS= libmagic .endif .if ${PHP_MODNAME} == "filter" -CONFIGURE_ARGS+=--enable-filter \ - --with-pcre-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-filter .endif .if ${PHP_MODNAME} == "ftp" @@ -127,10 +125,8 @@ CONFIGURE_ARGS+=--enable-gd \ EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude libgd \ php-${DISTVERSION}/ext/gd -OPTIONS_DEFINE=TRUETYPE JIS WEBP X11 -OPTIONS_DEFAULT=TRUETYPE +OPTIONS_DEFINE=JIS WEBP X11 -TRUETYPE_DESC= Enable TrueType string function JIS_DESC= Enable JIS-mapped Japanese font support WEBP_DESC= Enable WebP image format support X11_DESC= Enable XPM support @@ -163,17 +159,9 @@ USES+= iconv:translit .if ${PHP_MODNAME} == "imap" PHP_MOD_PRIO= 30 -OPTIONS_RADIO= CLIENT -OPTIONS_RADIO_CLIENT= CCLIENT PANDA -OPTIONS_DEFAULT=PANDA -CCLIENT_DESC= Uses the original but unmaintained cclient -PANDA_DESC= Uses the forked panda-cclient instead of the original cclient - -PANDA_LIB_DEPENDS= libc-client.so.2010:mail/panda-cclient -PANDA_LIB_DEPENDS_OFF= libc-client4.so.9:mail/cclient +LIB_DEPENDS+= libc-client.so.2010:mail/panda-cclient CONFIGURE_ARGS+=--with-imap=${LOCALBASE} \ - --with-pcre-dir=${LOCALBASE} \ --with-imap-ssl=${OPENSSLBASE} CONFIGURE_ENV+= OPENSSL_CFLAGS="-I${OPENSSLINC}" \ @@ -185,7 +173,7 @@ USES+= ssl .endif .if ${PHP_MODNAME} == "intl" -CONFIGURE_ARGS+=--with-intl=${LOCALBASE} +CONFIGURE_ARGS+=--enable-intl LIB_DEPENDS= libicui18n.so:devel/icu USES+= pkgconfig .endif @@ -196,14 +184,14 @@ BUILD_DEPENDS= re2c:devel/re2c .endif .if ${PHP_MODNAME} == "ldap" +LIB_DEPENDS+=libsasl2.so:security/cyrus-sasl2 CONFIGURE_ARGS+=--with-ldap=${LOCALBASE} --with-ldap-sasl=${LOCALBASE} USES+= ldap .endif .if ${PHP_MODNAME} == "mbstring" -CONFIGURE_ARGS+=--enable-mbstring \ - --with-pcre-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-mbstring OPTIONS_DEFINE= REGEX OPTIONS_DEFAULT=REGEX @@ -211,7 +199,6 @@ OPTIONS_DEFAULT=REGEX REGEX_DESC= Enable multibyte regex support REGEX_CONFIGURE_OFF=--disable-mbregex -REGEX_CONFIGURE_ON=--with-onig=${LOCALBASE} REGEX_LIB_DEPENDS= libonig.so:devel/oniguruma PHP_HEADER_DIRS=libmbfl libmbfl/filters libmbfl/mbfl libmbfl/nls @@ -231,8 +218,7 @@ MYSQLND_USES_OFF= mysql .if ${PHP_MODNAME} == "odbc" LIB_DEPENDS+= libodbc.so:databases/unixODBC -CONFIGURE_ARGS+=--enable-odbc \ - --with-unixODBC=${LOCALBASE} +CONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE} .endif .if ${PHP_MODNAME} == "opcache" @@ -313,8 +299,7 @@ CONFIGURE_ARGS+=--with-pgsql=${LOCALBASE} .endif .if ${PHP_MODNAME} == "phar" -CONFIGURE_ARGS+=--enable-phar \ - --with-pcre-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-phar .endif .if ${PHP_MODNAME} == "posix" @@ -328,8 +313,8 @@ CONFIGURE_ARGS+=--with-pspell=${LOCALBASE} .endif .if ${PHP_MODNAME} == "readline" -CONFIGURE_ARGS+=--with-readline=/usr -USES+= readline +CONFIGURE_ARGS+=--with-libedit +USES+= libedit .endif .if ${PHP_MODNAME} == "session" @@ -342,17 +327,14 @@ CONFIGURE_ARGS+=--enable-shmop .endif .if ${PHP_MODNAME} == "simplexml" -CONFIGURE_ARGS+=--enable-simplexml \ - --with-pcre-dir=${LOCALBASE} \ - --with-libxml-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-simplexml USES+= pkgconfig USE_GNOME= libxml2 .endif .if ${PHP_MODNAME} == "snmp" -CONFIGURE_ARGS+=--with-snmp=${LOCALBASE} \ - --with-openssl-dir=${OPENSSLBASE} +CONFIGURE_ARGS+=--with-snmp=${LOCALBASE} CONFIGURE_ENV+= ac_cv_buggy_snprint_value="no" @@ -362,8 +344,7 @@ USES+= ssl .endif .if ${PHP_MODNAME} == "soap" -CONFIGURE_ARGS+=--enable-soap \ - --with-libxml-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-soap USES+= pkgconfig USE_GNOME= libxml2 @@ -406,16 +387,14 @@ CONFIGURE_ARGS+=--enable-tokenizer .endif .if ${PHP_MODNAME} == "xml" -CONFIGURE_ARGS+=--enable-xml \ - --with-libxml-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-xml USES+= pkgconfig USE_GNOME= libxml2 .endif .if ${PHP_MODNAME} == "xmlreader" -CONFIGURE_ARGS+=--enable-xmlreader \ - --with-libxml-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-xmlreader USE_GNOME= libxml2 @@ -424,7 +403,6 @@ USE_PHP= dom:build .if ${PHP_MODNAME} == "xmlrpc" CONFIGURE_ARGS+=--with-xmlrpc \ - --with-libxml-dir=${LOCALBASE} \ --with-iconv-dir=${LOCALBASE} USES+= iconv:translit @@ -436,8 +414,7 @@ USE_PHP= xml:build .endif .if ${PHP_MODNAME} == "xmlwriter" -CONFIGURE_ARGS+=--enable-xmlwriter \ - --with-libxml-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-xmlwriter USES+= pkgconfig USE_GNOME= libxml2 @@ -453,10 +430,7 @@ USE_PHP= dom:build xml:build .if ${PHP_MODNAME} == "zip" LIB_DEPENDS+= libzip.so:archivers/libzip -CONFIGURE_ARGS+=--enable-zip \ - --with-zlib-dir=/usr \ - --with-pcre-dir=${LOCALBASE} \ - --with-libzip=${LOCALBASE} +CONFIGURE_ARGS+=--with-zip USES+= pkgconfig .endif diff --git a/lang/php80/pkg-plist b/lang/php80/pkg-plist index ac9c84ae20bc..febf7f733223 100644 --- a/lang/php80/pkg-plist +++ b/lang/php80/pkg-plist @@ -148,13 +148,6 @@ include/php/ext/libxml/php_libxml.h %%MYSQLND%%include/php/ext/mysqlnd/mysqlnd_vio.h %%MYSQLND%%include/php/ext/mysqlnd/mysqlnd_wireprotocol.h %%MYSQLND%%include/php/ext/mysqlnd/php_mysqlnd.h -include/php/ext/pcre/pcre2lib/config.h -include/php/ext/pcre/pcre2lib/pcre2.h -include/php/ext/pcre/pcre2lib/pcre2_internal.h -include/php/ext/pcre/pcre2lib/pcre2_intmodedep.h -include/php/ext/pcre/pcre2lib/pcre2_jit_neon_inc.h -include/php/ext/pcre/pcre2lib/pcre2_jit_simd_inc.h -include/php/ext/pcre/pcre2lib/pcre2_ucp.h include/php/ext/pcre/php_pcre.h include/php/ext/spl/php_spl.h include/php/ext/spl/spl_array.h diff --git a/mail/php80-imap/files/patch-config.m4 b/mail/php80-imap/files/patch-config.m4 deleted file mode 100644 index b2a153543fe3..000000000000 --- a/mail/php80-imap/files/patch-config.m4 +++ /dev/null @@ -1,47 +0,0 @@ ---- config.m4.orig 2019-08-20 14:09:27 UTC -+++ config.m4 -@@ -105,6 +105,13 @@ PHP_ARG_WITH([imap-ssl], - [no], - [no]) - -+PHP_ARG_WITH([pcre-dir], -+ [pcre install prefix], -+ [AS_HELP_STRING([[--with-pcre-dir]], -+ [IMAP: pcre install prefix])], -+ [no], -+ [no]) -+ - if test "$PHP_IMAP" != "no"; then - PHP_SUBST(IMAP_SHARED_LIBADD) - PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) -@@ -120,6 +127,30 @@ if test "$PHP_IMAP" != "no"; then - fi - done - -+ dnl This is PECL build, check if bundled PCRE library is used -+ old_CPPFLAGS=$CPPFLAGS -+ CPPFLAGS=$INCLUDES -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=yes -+ ],[ -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=pecl -+ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include) -+ ],[ -+ PHP_PCRE_REGEX=no -+ ]) -+ ]) -+ - dnl Check for c-client version 2004 - AC_EGREP_HEADER(mail_fetch_overview_sequence, $IMAP_INC_DIR/mail.h, [ - AC_DEFINE(HAVE_IMAP2004,1,[ ]) diff --git a/sysutils/php80-fileinfo/files/patch-config.m4 b/sysutils/php80-fileinfo/files/patch-config.m4 deleted file mode 100644 index 1348023ccf64..000000000000 --- a/sysutils/php80-fileinfo/files/patch-config.m4 +++ /dev/null @@ -1,21 +0,0 @@ ---- config.m4.orig 2010-09-07 15:45:30.000000000 +0200 -+++ config.m4 2010-09-07 15:46:50.000000000 +0200 -@@ -4,6 +4,9 @@ - PHP_ARG_ENABLE(fileinfo, for fileinfo support, - [ --disable-fileinfo Disable fileinfo support], yes) - -+PHP_ARG_WITH(pcre-dir, pcre install prefix, -+[ --with-pcre-dir FILEINFO: pcre install prefix], no, no) -+ - if test "$PHP_FILEINFO" != "no"; then - - libmagic_sources=" \ -@@ -13,6 +16,8 @@ - libmagic/is_tar.c libmagic/magic.c libmagic/print.c \ - libmagic/readcdf.c libmagic/readelf.c libmagic/softmagic.c" - -+ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include) -+ - PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic) - PHP_ADD_BUILD_DIR($ext_builddir/libmagic) - diff --git a/textproc/php80-enchant/Makefile b/textproc/php80-enchant/Makefile index 25dd6e37607d..bb3e26ac90ae 100644 --- a/textproc/php80-enchant/Makefile +++ b/textproc/php80-enchant/Makefile @@ -6,4 +6,9 @@ PKGNAMESUFFIX= -enchant TEST_TARGET= test +post-patch: + ${REINPLACE_CMD} -e \ + 's|#include "../spl/spl_exceptions.h"|#include "ext/spl/spl_exceptions.h"|g' \ + ${WRKSRC}/enchant.c + .include "${MASTERDIR}/Makefile" diff --git a/textproc/php80-enchant/files/patch-enchant.c b/textproc/php80-enchant/files/patch-enchant.c deleted file mode 100644 index fb4da55c99de..000000000000 --- a/textproc/php80-enchant/files/patch-enchant.c +++ /dev/null @@ -1,11 +0,0 @@ ---- enchant.c.orig 2020-10-18 21:29:39 UTC -+++ enchant.c -@@ -24,7 +24,7 @@ - #include "ext/standard/info.h" - #include "Zend/zend_interfaces.h" - #include "Zend/zend_exceptions.h" --#include "../spl/spl_exceptions.h" -+#include "ext/spl/spl_exceptions.h" - #include <enchant.h> - #include "php_enchant.h" - #include "enchant_arginfo.h" diff --git a/textproc/php80-simplexml/files/patch-config.m4 b/textproc/php80-simplexml/files/patch-config.m4 deleted file mode 100644 index 88638f7dccf4..000000000000 --- a/textproc/php80-simplexml/files/patch-config.m4 +++ /dev/null @@ -1,42 +0,0 @@ ---- config.m4.orig 2019-08-06 06:54:07 UTC -+++ config.m4 -@@ -4,8 +4,39 @@ PHP_ARG_ENABLE([simplexml], - [Disable SimpleXML support])], - [yes]) - -+PHP_ARG_ENABLE([pcre-dir], -+ [pcre install prefix], -+ [AS_HELP_STRING([--with-pcre-dir], -+ [SimpleXML: pcre install dir])], -+ [no], -+ [no]) -+ - if test "$PHP_SIMPLEXML" != "no"; then - -+ dnl This is PECL build, check if bundled PCRE library is used -+ old_CPPFLAGS=$CPPFLAGS -+ CPPFLAGS=$INCLUDES -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=yes -+ ],[ -+ AC_EGREP_CPP(yes,[ -+#include <main/php_config.h> -+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) -+yes -+#endif -+ ],[ -+ PHP_PCRE_REGEX=pecl -+ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include) -+ ],[ -+ PHP_PCRE_REGEX=no -+ ]) -+ ]) -+ - if test "$PHP_LIBXML" = "no"; then - AC_MSG_ERROR([SimpleXML extension requires LIBXML extension, add --with-libxml]) - fi diff --git a/textproc/php80-xsl/Makefile b/textproc/php80-xsl/Makefile index 5b29c0a1c9ad..81e23ff3acc1 100644 --- a/textproc/php80-xsl/Makefile +++ b/textproc/php80-xsl/Makefile @@ -6,4 +6,9 @@ PKGNAMESUFFIX= -xsl TEST_TARGET= test +post-patch: + ${REINPLACE_CMD} -e \ + 's|#include "../dom/xml_common.h"|#include "ext/dom/xml_common.h"|g' \ + ${WRKSRC}/php_xsl.h + .include "${MASTERDIR}/Makefile" diff --git a/textproc/php80-xsl/files/patch-php_xsl.h b/textproc/php80-xsl/files/patch-php_xsl.h deleted file mode 100644 index 69f1140af49d..000000000000 --- a/textproc/php80-xsl/files/patch-php_xsl.h +++ /dev/null @@ -1,11 +0,0 @@ ---- php_xsl.h.orig 2020-10-16 22:10:29 UTC -+++ php_xsl.h -@@ -37,7 +37,7 @@ extern zend_module_entry xsl_module_entr - #include <libexslt/exsltconfig.h> - #endif - --#include "../dom/xml_common.h" -+#include "ext/dom/xml_common.h" - - #include <libxslt/extensions.h> - #include <libxml/xpathInternals.h>