From 011de4410e3afcc4b49e47158349b1781ded1c42 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 17 Dec 2024 11:17:26 -0500 Subject: [PATCH] New package: php8.4-8.4.7 --- srcpkgs/php8.4-apache | 1 + srcpkgs/php8.4-cgi | 1 + srcpkgs/php8.4-devel | 1 + srcpkgs/php8.4-embed | 1 + srcpkgs/php8.4-enchant | 1 + srcpkgs/php8.4-ffi | 1 + srcpkgs/php8.4-fpm | 1 + srcpkgs/php8.4-gd | 1 + srcpkgs/php8.4-intl | 1 + srcpkgs/php8.4-ldap | 1 + srcpkgs/php8.4-mysql | 1 + srcpkgs/php8.4-odbc | 1 + srcpkgs/php8.4-pear | 1 + srcpkgs/php8.4-pgsql | 1 + srcpkgs/php8.4-phpdbg | 1 + srcpkgs/php8.4-snmp | 1 + srcpkgs/php8.4-sodium | 1 + srcpkgs/php8.4-sqlite | 1 + srcpkgs/php8.4-tidy | 1 + srcpkgs/php8.4-xsl | 1 + srcpkgs/php8.4/files/apache.conf | 13 + srcpkgs/php8.4/files/php-fpm8.4/run | 3 + .../php8.4/patches/aarch64-musl-off64_t.patch | 12 + srcpkgs/php8.4/patches/apache-zts.patch | 13 + srcpkgs/php8.4/patches/cross-configure.patch | 28 ++ .../patches/cross-gdImageCreateFrom.patch | 65 +++ .../cross-ltmain-sysroot-support.patch | 48 +++ srcpkgs/php8.4/patches/cross-pear.patch | 23 ++ srcpkgs/php8.4/patches/cross-phar.patch | 29 ++ .../cross-phpize-sysroot-support.patch | 27 ++ srcpkgs/php8.4/patches/musl-crypt.patch | 18 + srcpkgs/php8.4/patches/php-fpm.patch | 13 + .../php8.4/patches/php8.4-fix-manpages.patch | 25 ++ srcpkgs/php8.4/patches/php8.4-ini.patch | 24 ++ srcpkgs/php8.4/template | 375 ++++++++++++++++++ srcpkgs/php8.4/update | 3 + 36 files changed, 739 insertions(+) create mode 120000 srcpkgs/php8.4-apache create mode 120000 srcpkgs/php8.4-cgi create mode 120000 srcpkgs/php8.4-devel create mode 120000 srcpkgs/php8.4-embed create mode 120000 srcpkgs/php8.4-enchant create mode 120000 srcpkgs/php8.4-ffi create mode 120000 srcpkgs/php8.4-fpm create mode 120000 srcpkgs/php8.4-gd create mode 120000 srcpkgs/php8.4-intl create mode 120000 srcpkgs/php8.4-ldap create mode 120000 srcpkgs/php8.4-mysql create mode 120000 srcpkgs/php8.4-odbc create mode 120000 srcpkgs/php8.4-pear create mode 120000 srcpkgs/php8.4-pgsql create mode 120000 srcpkgs/php8.4-phpdbg create mode 120000 srcpkgs/php8.4-snmp create mode 120000 srcpkgs/php8.4-sodium create mode 120000 srcpkgs/php8.4-sqlite create mode 120000 srcpkgs/php8.4-tidy create mode 120000 srcpkgs/php8.4-xsl create mode 100644 srcpkgs/php8.4/files/apache.conf create mode 100644 srcpkgs/php8.4/files/php-fpm8.4/run create mode 100644 srcpkgs/php8.4/patches/aarch64-musl-off64_t.patch create mode 100644 srcpkgs/php8.4/patches/apache-zts.patch create mode 100644 srcpkgs/php8.4/patches/cross-configure.patch create mode 100644 srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch create mode 100644 srcpkgs/php8.4/patches/cross-ltmain-sysroot-support.patch create mode 100644 srcpkgs/php8.4/patches/cross-pear.patch create mode 100644 srcpkgs/php8.4/patches/cross-phar.patch create mode 100644 srcpkgs/php8.4/patches/cross-phpize-sysroot-support.patch create mode 100644 srcpkgs/php8.4/patches/musl-crypt.patch create mode 100644 srcpkgs/php8.4/patches/php-fpm.patch create mode 100644 srcpkgs/php8.4/patches/php8.4-fix-manpages.patch create mode 100644 srcpkgs/php8.4/patches/php8.4-ini.patch create mode 100644 srcpkgs/php8.4/template create mode 100644 srcpkgs/php8.4/update diff --git a/srcpkgs/php8.4-apache b/srcpkgs/php8.4-apache new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-apache @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-cgi b/srcpkgs/php8.4-cgi new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-cgi @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-devel b/srcpkgs/php8.4-devel new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-devel @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-embed b/srcpkgs/php8.4-embed new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-embed @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-enchant b/srcpkgs/php8.4-enchant new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-enchant @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-ffi b/srcpkgs/php8.4-ffi new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-ffi @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-fpm b/srcpkgs/php8.4-fpm new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-fpm @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-gd b/srcpkgs/php8.4-gd new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-gd @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-intl b/srcpkgs/php8.4-intl new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-intl @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-ldap b/srcpkgs/php8.4-ldap new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-ldap @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-mysql b/srcpkgs/php8.4-mysql new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-mysql @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-odbc b/srcpkgs/php8.4-odbc new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-odbc @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-pear b/srcpkgs/php8.4-pear new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-pear @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-pgsql b/srcpkgs/php8.4-pgsql new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-pgsql @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-phpdbg b/srcpkgs/php8.4-phpdbg new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-phpdbg @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-snmp b/srcpkgs/php8.4-snmp new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-snmp @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-sodium b/srcpkgs/php8.4-sodium new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-sodium @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-sqlite b/srcpkgs/php8.4-sqlite new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-sqlite @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-tidy b/srcpkgs/php8.4-tidy new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-tidy @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4-xsl b/srcpkgs/php8.4-xsl new file mode 120000 index 00000000000..969268fed31 --- /dev/null +++ b/srcpkgs/php8.4-xsl @@ -0,0 +1 @@ +php8.4 \ No newline at end of file diff --git a/srcpkgs/php8.4/files/apache.conf b/srcpkgs/php8.4/files/apache.conf new file mode 100644 index 00000000000..bc57ba73dbc --- /dev/null +++ b/srcpkgs/php8.4/files/apache.conf @@ -0,0 +1,13 @@ +# Required modules: dir_module, php_module + + + + DirectoryIndex index.php index.html + + SetHandler application/x-httpd-php + + + SetHandler application/x-httpd-php-source + + + diff --git a/srcpkgs/php8.4/files/php-fpm8.4/run b/srcpkgs/php8.4/files/php-fpm8.4/run new file mode 100644 index 00000000000..dee7b386a7e --- /dev/null +++ b/srcpkgs/php8.4/files/php-fpm8.4/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec php-fpm8.4 --nodaemonize ${OPTS} diff --git a/srcpkgs/php8.4/patches/aarch64-musl-off64_t.patch b/srcpkgs/php8.4/patches/aarch64-musl-off64_t.patch new file mode 100644 index 00000000000..558631856a5 --- /dev/null +++ b/srcpkgs/php8.4/patches/aarch64-musl-off64_t.patch @@ -0,0 +1,12 @@ +diff --git a/build/php.m4 b/build/php.m4 +index d8a5cbf..b23b456 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -1384,6 +1384,7 @@ int main(void) { + [php_cv_type_cookie_off64_t=yes], + [php_cv_type_cookie_off64_t=no], + [AS_CASE([$host_alias], ++ [aarch64-linux-musl], [php_cv_type_cookie_off64_t=no], + [*linux*], [php_cv_type_cookie_off64_t=yes], + [php_cv_type_cookie_off64_t=no])] + )]) diff --git a/srcpkgs/php8.4/patches/apache-zts.patch b/srcpkgs/php8.4/patches/apache-zts.patch new file mode 100644 index 00000000000..58ce04c2b53 --- /dev/null +++ b/srcpkgs/php8.4/patches/apache-zts.patch @@ -0,0 +1,13 @@ +diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 +index e335721..d824d5f 100644 +--- a/sapi/apache2handler/config.m4 ++++ b/sapi/apache2handler/config.m4 +@@ -122,7 +122,7 @@ if test "$PHP_APXS2" != "no"; then + + AS_IF([$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1], [ + APACHE_THREADED_MPM=yes +- enable_zts=yes ++ enable_zts=no + ], [APACHE_THREADED_MPM=no]) + + AC_CONFIG_COMMANDS([apache2handler], [AS_VAR_IF([enable_zts], [yes],, diff --git a/srcpkgs/php8.4/patches/cross-configure.patch b/srcpkgs/php8.4/patches/cross-configure.patch new file mode 100644 index 00000000000..9b35a5ed5a9 --- /dev/null +++ b/srcpkgs/php8.4/patches/cross-configure.patch @@ -0,0 +1,28 @@ +diff --git a/build/php.m4 b/build/php.m4 +index d8a5cbf..a870ca4 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -1967,7 +1967,11 @@ AS_VAR_IF([found_pgsql], [no], [dnl + AS_IF([test -x $i/pg_config], [PG_CONFIG="$i/pg_config"; break;]) + done + +- AS_VAR_IF([PG_CONFIG],, [dnl ++ AS_IF([test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"], [dnl ++ AC_MSG_RESULT([$PG_CONFIG]) ++ PGSQL_INCLUDE=$($PG_CONFIG --includedir) ++ PGSQL_LIBDIR=$($PG_CONFIG --libdir) ++ ], [dnl + AC_MSG_RESULT([not found]) + AS_VAR_IF([pgsql_dir],, + [pgsql_search_paths="/usr /usr/local /usr/local/pgsql"], +@@ -1983,10 +1987,6 @@ AS_VAR_IF([found_pgsql], [no], [dnl + [PGSQL_LIBDIR=$i/$j]) + done + done +- ], [dnl +- AC_MSG_RESULT([$PG_CONFIG]) +- PGSQL_INCLUDE=$($PG_CONFIG --includedir) +- PGSQL_LIBDIR=$($PG_CONFIG --libdir) + ]) + + AS_IF([test -n "$PGSQL_INCLUDE" && test -n "PGSQL_LIBDIR"], [ diff --git a/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch new file mode 100644 index 00000000000..35af5bda896 --- /dev/null +++ b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch @@ -0,0 +1,65 @@ +Copied and modified library macros from /usr/share/autoconf/autoconf/general.m4 +with support for using qemu-user-static to execute when cross compiling. + +diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 +index 7da5b8c..e9dc1dc 100644 +--- a/ext/gd/config.m4 ++++ b/ext/gd/config.m4 +@@ -147,6 +147,40 @@ dnl gdImageCreateFromFoo function even when it does not support the Foo format. + dnl Those no-op functions display a warning but eventually return normally, + dnl making a simple link or run test insufficient. + dnl ++ ++AC_DEFUN([_AC_DO_TOKENS_QEMU], ++[{ ++ if test "$cross_compiling" = "yes"; then ++ ac_try='QEMU_LD_PREFIX=${XBPS_CROSS_BASE} qemu-${XBPS_TARGET_QEMU_MACHINE}-static $1' ++ else ++ ac_try='$1' ++ fi ++ _AC_DO([$ac_try]); }]) ++ ++m4_define([_AC_RUN_IFELSE_QEMU_BODY], ++[ AS_LINENO_PUSH([$[]1]) ++ AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS_QEMU(./conftest$ac_exeext)], ++ [ac_retval=0], ++ [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD ++ _AC_MSG_LOG_CONFTEST ++ ac_retval=$ac_status]) ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ AS_LINENO_POP ++ AS_SET_STATUS([$ac_retval]) ++]) ++ ++AC_DEFUN([_AC_RUN_IFELSE_QEMU], ++[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run_qemu], ++ [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run_qemu], [LINENO], ++ [Try to run conftest.$ac_ext, and return whether this succeeded. ++ Assumes that executables *can* be run.])], ++ [$0_BODY])]dnl ++[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl ++[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run_qemu "$LINENO"], [$2], [$3]) ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl ++]) ++ + AC_DEFUN([PHP_GD_CHECK_FORMAT], + [AS_VAR_PUSHDEF([php_var], [php_cv_lib_gd_gdImageCreateFrom$1]) + old_LIBS="${LIBS}" +@@ -155,7 +189,7 @@ old_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}" + AC_LANG_PUSH([C]) + AC_CACHE_CHECK([for working gdImageCreateFrom$1 in libgd], [php_var], +- [AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ [_AC_RUN_IFELSE_QEMU([AC_LANG_SOURCE([ + #include + #include + #include +@@ -176,7 +210,6 @@ int main(int argc, char** argv) { + return 0; + }])], + [AS_VAR_SET([php_var], [yes])], +- [AS_VAR_SET([php_var], [no])], + [AS_VAR_SET([php_var], [no])])]) + AS_VAR_IF([php_var], [yes], [$2]) + AC_LANG_POP([C]) diff --git a/srcpkgs/php8.4/patches/cross-ltmain-sysroot-support.patch b/srcpkgs/php8.4/patches/cross-ltmain-sysroot-support.patch new file mode 100644 index 00000000000..a6447ac1502 --- /dev/null +++ b/srcpkgs/php8.4/patches/cross-ltmain-sysroot-support.patch @@ -0,0 +1,48 @@ +PHP's phpize is based on a very old libtool to generate build files for its +extensions. This libtool does not support .la files with '=' to support +sysroot. + +In order to support more PHP extension cross compilation this modifies +ltmain.sh to support such path. This is a bit hackish has it only get sysroot +from the used toolchain; the proper way to fix that is to have PHP developpers +to update the autotools file used to build there extensions. + +--- a/build/ltmain.sh 2021-09-09 15:19:14.822208365 +0200 ++++ b/build/ltmain.sh 2021-09-09 15:47:55.397011151 +0200 +@@ -2375,6 +2375,13 @@ EOF + *) . ./$lib ;; + esac + ++ newdependency_libs= ++ for deplib in $dependency_libs; do ++ deplib=$(echo "$deplib" | sed "s#^=\(.*\)#$(${CC} --print-sysroot)\1#") ++ newdependency_libs="$newdependency_libs $deplib" ++ done ++ dependency_libs=${newdependency_libs} ++ + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then +@@ -5750,6 +5757,13 @@ fi\ + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac ++ ++ newdependency_libs= ++ for deplib in $dependency_libs; do ++ deplib=$(echo "$deplib" | sed "s#^$(${CC} --print-sysroot)#=#") ++ newdependency_libs="$newdependency_libs $deplib" ++ done ++ + $echo > $output "\ + # $outputname - a libtool library file + # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +@@ -5767,7 +5781,7 @@ library_names='$library_names' + old_library='$old_library' + + # Libraries that this one depends upon. +-dependency_libs='$dependency_libs' ++dependency_libs='$newdependency_libs' + + # Version information for $libname. + current=$current diff --git a/srcpkgs/php8.4/patches/cross-pear.patch b/srcpkgs/php8.4/patches/cross-pear.patch new file mode 100644 index 00000000000..f9191a50a0b --- /dev/null +++ b/srcpkgs/php8.4/patches/cross-pear.patch @@ -0,0 +1,23 @@ +--- a/pear/Makefile.frag 2020-03-17 11:40:21.000000000 +0100 ++++ b/pear/Makefile.frag 2020-04-12 22:29:31.846943414 +0200 +@@ -8,9 +8,10 @@ FETCH = `which fetch 2>/dev/null` + PEAR_PREFIX = -dp a${program_prefix} + PEAR_SUFFIX = -ds a$(program_suffix) + PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar ++PEAR_PHP ?= $(top_builddir)/sapi/cli/php + + install-pear-installer: $(SAPI_CLI_PATH) +- @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX} ++ @$(PEAR_PHP) $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX} + + install-pear: + @echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/" +@@ -23,7 +24,7 @@ install-pear: + elif test ! -z "$(FETCH)" && test -x "$(FETCH)"; then \ + "$(FETCH)" -o $(builddir)/ "${PEAR_INSTALLER_URL}"; \ + else \ +- $(top_builddir)/sapi/cli/php -n $(srcdir)/fetch.php "${PEAR_INSTALLER_URL}" $(builddir)/install-pear-nozlib.phar; \ ++ $(PEAR_PHP) -n $(srcdir)/fetch.php "${PEAR_INSTALLER_URL}" $(builddir)/install-pear-nozlib.phar; \ + fi \ + fi \ + fi diff --git a/srcpkgs/php8.4/patches/cross-phar.patch b/srcpkgs/php8.4/patches/cross-phar.patch new file mode 100644 index 00000000000..1e4e627ec65 --- /dev/null +++ b/srcpkgs/php8.4/patches/cross-phar.patch @@ -0,0 +1,29 @@ +--- a/ext/phar/Makefile.frag 2020-04-13 12:18:23.998801926 +0200 ++++ b/ext/phar/Makefile.frag 2020-04-13 12:20:58.031795293 +0200 +@@ -8,12 +8,14 @@ $(srcdir)/phar_path_check.c: $(srcdir)/p + + pharcmd: $(builddir)/phar.php $(builddir)/phar.phar + ++PHAR_PHP ?= $(top_builddir)/$(SAPI_CLI_PATH) ++PHAR_PHP_MODULES ?= $(top_builddir)/modules + PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 + PHP_PHARCMD_EXECUTABLE = ` \ +- if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \ +- $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \ ++ if test -x "$(PHAR_PHP)"; then \ ++ $(top_srcdir)/build/shtool echo -n -- "$(PHAR_PHP) -n"; \ + if test "x$(PHP_MODULES)" != "x"; then \ +- $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \ ++ $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(PHAR_PHP_MODULES)"; \ + for i in bz2 zlib phar; do \ + if test -f "$(top_builddir)/modules/$$i.la"; then \ + . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \ +@@ -21,7 +23,7 @@ PHP_PHARCMD_EXECUTABLE = ` \ + done; \ + fi; \ + else \ +- $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ ++ $(top_srcdir)/build/shtool echo -n -- "$(PHAR_PHP)"; \ + fi;` + PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` + diff --git a/srcpkgs/php8.4/patches/cross-phpize-sysroot-support.patch b/srcpkgs/php8.4/patches/cross-phpize-sysroot-support.patch new file mode 100644 index 00000000000..8d4c37941c3 --- /dev/null +++ b/srcpkgs/php8.4/patches/cross-phpize-sysroot-support.patch @@ -0,0 +1,27 @@ +--- a/scripts/phpize.m4 2020-03-17 11:40:21.000000000 +0100 ++++ b/scripts/phpize.m4 2020-04-15 12:27:36.400466387 +0200 +@@ -44,6 +44,12 @@ PHP_ARG_WITH([libdir], + [lib], + [no]) + ++PHP_ARG_WITH([sysroot],, ++ [AS_HELP_STRING([--with-sysroot=NAME], ++ [System sysroot])], ++ [no], ++ [no]) ++ + PHP_RUNPATH_SWITCH + PHP_SHLIB_SUFFIX_NAMES + +@@ -62,6 +62,11 @@ PHP_CONFIG=$PHP_PHP_CONFIG + prefix=$($PHP_CONFIG --prefix 2>/dev/null) + phpincludedir=$($PHP_CONFIG --include-dir 2>/dev/null) + INCLUDES=$($PHP_CONFIG --includes 2>/dev/null) ++if test "x$PHP_SYSROOT" = xno; then : ++ INCLUDES=`$PHP_CONFIG --includes 2>/dev/null` ++else ++ INCLUDES=`$PHP_CONFIG --includes 2>/dev/null | sed "s#-I#-I$PHP_SYSROOT#g"` ++fi + EXTENSION_DIR=$($PHP_CONFIG --extension-dir 2>/dev/null) + PHP_EXECUTABLE=$($PHP_CONFIG --php-binary 2>/dev/null) + diff --git a/srcpkgs/php8.4/patches/musl-crypt.patch b/srcpkgs/php8.4/patches/musl-crypt.patch new file mode 100644 index 00000000000..b83a7ab9bc1 --- /dev/null +++ b/srcpkgs/php8.4/patches/musl-crypt.patch @@ -0,0 +1,18 @@ +TODO: This is apparently needed on musl, not sure what the error is, might be +something to dig in to. + +--- a/ext/standard/crypt.c 2016-04-28 14:13:00.000000000 -0400 ++++ b/ext/standard/crypt.c 2016-04-28 21:45:24.340955313 -0400 +@@ -267,6 +267,12 @@ + } + # elif defined(HAVE_CRYPT) + crypt_res = crypt(password, salt); ++ if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { ++ return NULL; ++ } else { ++ result = zend_string_init(crypt_res, strlen(crypt_res), 0); ++ return result; ++ } + # else + # error No crypt() implementation + # endif diff --git a/srcpkgs/php8.4/patches/php-fpm.patch b/srcpkgs/php8.4/patches/php-fpm.patch new file mode 100644 index 00000000000..5e55e179f8a --- /dev/null +++ b/srcpkgs/php8.4/patches/php-fpm.patch @@ -0,0 +1,13 @@ +--- a/sapi/fpm/Makefile.frag 2017-04-15 23:58:56.965737425 +0200 ++++ b/sapi/fpm/Makefile.frag 2017-04-16 00:00:57.814831649 +0200 +@@ -15,8 +15,8 @@ install-fpm: $(SAPI_FPM_PATH) + else \ + echo "Installing PHP FPM defconfig: $(INSTALL_ROOT)$(sysconfdir)/" && \ + $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d; \ +- $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default; \ +- $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default; \ ++ $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf; \ ++ $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf; \ + fi + + @echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/" diff --git a/srcpkgs/php8.4/patches/php8.4-fix-manpages.patch b/srcpkgs/php8.4/patches/php8.4-fix-manpages.patch new file mode 100644 index 00000000000..d87b0265421 --- /dev/null +++ b/srcpkgs/php8.4/patches/php8.4-fix-manpages.patch @@ -0,0 +1,25 @@ +This patch fixes .so links in man pages. +It's needed because of the configure option - + + --program-suffix=${_php_version} + +The changes made by this patch should be the same as the changes made by this +block of code - + + _regexp='^[[:space:]]*\.so[[:space:]]' + for file in $(grep -l -e "$_regexp" -R .); do + vsed -i "$file" -e "/$_regexp/"'s=^[[:space:]]*\.[^.]*=&'${_php_version}= + done + +Where _php_version is defined in the template file. + +--- a/ext/phar/phar.phar.1.in ++++ b/ext/phar/phar.phar.1.in +@@ -1 +1 @@ +-.so man1/phar.1 ++.so man1/phar8.4.1 +--- a/sapi/cgi/php-cgi.1.in ++++ b/sapi/cgi/php-cgi.1.in +@@ -1 +1 @@ +-.so man1/php.1 ++.so man1/php8.4.1 diff --git a/srcpkgs/php8.4/patches/php8.4-ini.patch b/srcpkgs/php8.4/patches/php8.4-ini.patch new file mode 100644 index 00000000000..a3143e89a9e --- /dev/null +++ b/srcpkgs/php8.4/patches/php8.4-ini.patch @@ -0,0 +1,24 @@ +diff --git a/php.ini-production b/php.ini-production +index b39a960..68f14a6 100644 +--- a/php.ini-production ++++ b/php.ini-production +@@ -737,7 +737,7 @@ default_charset = "UTF-8" + ;;;;;;;;;;;;;;;;;;;;;;;;; + + ; UNIX: "/path1:/path2" +-;include_path = ".:/php/includes" ++include_path = ".:/usr/share/pear8.4" + ; + ; Windows: "\path1;\path2" + ;include_path = ".;c:\php\includes" +@@ -760,9 +760,7 @@ user_dir = + + ; Directory in which the loadable extensions (modules) reside. + ; https://php.net/extension-dir +-;extension_dir = "./" +-; On windows: +-;extension_dir = "ext" ++extension_dir = "/usr/lib/php8.4/modules/" + + ; Directory where the temporary files should be placed. + ; Defaults to the system default (see sys_get_temp_dir) diff --git a/srcpkgs/php8.4/template b/srcpkgs/php8.4/template new file mode 100644 index 00000000000..75d1ac479ec --- /dev/null +++ b/srcpkgs/php8.4/template @@ -0,0 +1,375 @@ +# Template file for 'php8.4' +# rebuild php8.4-apcu and php8.4-imagick when updating this package +pkgname=php8.4 +version=8.4.7 +revision=1 +_php_version=8.4 +build_helper="qemu" +hostmakedepends="bison pkg-config apache apache-devel autoconf" +makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel + gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel + libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel + postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel + libffi-devel oniguruma-devel gd-devel acl-devel libargon2-devel" +short_desc="HTML-embedded scripting language" +maintainer="Joel Beckmeyer " +license="PHP-3.01" +homepage="https://www.php.net" +changelog="https://raw.githubusercontent.com/php/php-src/php-${version}/NEWS" +# this is the source where the www.php.net code pulls the tarballs it serves +# at https://www.php.net/distributions/ +distfiles="https://github.com/php/web-php-distributions/raw/master/php-${version}.tar.gz" +checksum=fd2be3b9320184e856426e01bd1a428110776ea8e976c3fb6b65808d03fc886a +provides="php-runtime-${version}_1" + +system_accounts="_phpfpm" +_phpfpm_homedir="/var/empty" + +conf_files="/etc/php${_php_version}/php.ini" + +lib32disabled=yes + +if [ -n "$CROSS_BUILD" ]; then + # phar and pear need php to build + hostmakedepends+=" php${_php_version}" + CFLAGS+=" -DHAVE_LIBDL + -DHAVE_SHM_IPC + -DHAVE_SHM_MMAP_ANON + -DHAVE_SHM_MMAP_POSIX" +fi + +alternatives=" + php:phar.phar:/usr/bin/phar${_php_version}.phar + php:php:/usr/bin/php${_php_version} + php:phar:/usr/bin/phar${_php_version} + php:phar.1:/usr/share/man/man1/phar${_php_version}.1 + php:phar.phar.1:/usr/share/man/man1/phar${_php_version}.phar.1 + php:php.1:/usr/share/man/man1/php${_php_version}.1" + +do_configure() { + autoconf -f +} + +do_build() { + local _phpconfig="--srcdir=.. \ + --config-cache \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/php${_php_version} \ + --localstatedir=/var \ + --with-layout=GNU \ + --with-config-file-path=/etc/php${_php_version} \ + --with-config-file-scan-dir=/etc/php${_php_version}/conf.d \ + --disable-rpath \ + --mandir=/usr/share/man \ + --libdir=/usr/lib/php${_php_version} \ + --datarootdir=/usr/share/php${_php_version} \ + --datadir=/usr/share/php${_php_version} \ + --program-suffix=${_php_version} \ + --includedir=/usr/include/php${_php_version} \ + --host=${XBPS_CROSS_TRIPLET} \ + " + + local _phpextensions="--enable-bcmath=shared \ + --enable-calendar=shared \ + --enable-dba=shared \ + --enable-exif=shared \ + --enable-ftp=shared \ + --enable-gd=shared \ + --enable-intl=shared \ + --enable-mbstring \ + --enable-pcntl \ + --enable-shmop=shared \ + --enable-soap=shared \ + --enable-sockets=shared \ + --enable-sysvmsg=shared \ + --enable-sysvsem=shared \ + --enable-sysvshm=shared \ + --with-bz2=shared,$XBPS_CROSS_BASE/usr/ \ + --with-curl=shared \ + --with-enchant=shared,$XBPS_CROSS_BASE/usr \ + --with-external-gd \ + --with-external-pcre \ + --with-ffi=shared \ + --with-db4=$XBPS_CROSS_BASE/usr \ + --with-gdbm=$XBPS_CROSS_BASE/usr \ + --with-gettext=shared \ + --with-gmp=shared \ + --with-iconv=shared \ + --with-ldap=shared,$XBPS_CROSS_BASE/usr \ + --with-ldap-sasl \ + --with-mhash \ + --with-mysql-sock=/run/mysqld/mysqld.sock \ + --with-mysqli=shared \ + --with-openssl=shared \ + --with-openssl-argon2 \ + --with-password-argon2 \ + --with-pear=/usr/share/pear${_php_version} \ + --with-pdo-dblib=shared,$XBPS_CROSS_BASE/usr \ + --with-pdo-mysql=shared \ + --with-pdo-odbc=shared,unixODBC,$XBPS_CROSS_BASE/usr \ + --with-pdo-pgsql=shared,$XBPS_CROSS_BASE/usr \ + --with-pdo-sqlite=shared,$XBPS_CROSS_BASE/usr \ + --with-pgsql=shared,$XBPS_CROSS_BASE/usr \ + --with-readline=$XBPS_CROSS_BASE/usr \ + --with-snmp=shared,$XBPS_CROSS_BASE/usr \ + --with-sodium=shared \ + --with-sqlite3=shared,$XBPS_CROSS_BASE/usr \ + --with-tidy=shared,$XBPS_CROSS_BASE/usr \ + --with-unixODBC=shared,$XBPS_CROSS_BASE/usr \ + --with-xsl=shared,$XBPS_CROSS_BASE/usr \ + --with-zip=shared \ + --with-zlib \ + ${configure_args} \ + " + if [ -n "$CROSS_BUILD" ]; then + local _make_env="PHAR_PHP=/usr/bin/php${_php_version} PHAR_PHP_MODULES=/usr/lib/php${_php_version}/modules" + fi + + EXTENSION_DIR="/usr/lib/php${_php_version}/modules" + export EXTENSION_DIR + PEAR_INSTALLDIR=/usr/share/pear${_php_version} + export PEAR_INSTALLDIR + EXTRA_LIBS="-ldl" + export EXTRA_LIBS + + # cgi,cli,embed,fcgi,fpm + mkdir -p build + cd build + ln -s ${wrksrc}/configure + ./configure ${_phpconfig} \ + --enable-cgi \ + --enable-fpm \ + --with-fpm-acl \ + --with-fpm-user=_phpfpm \ + --with-fpm-group=_phpfpm \ + --enable-embed=shared \ + ${_phpextensions} + make ${makejobs} ${_make_env} + + # apache + # reuse the previous run; this will save us a lot of time + cp -a ${wrksrc}/build ${wrksrc}/build-apache + cd ${wrksrc}/build-apache + ./configure ${_phpconfig} \ + --with-apxs2 \ + ${_phpextensions} + make ${makejobs} ${_make_env} +} + +do_install() { + cd ${wrksrc}/build + local _env="INSTALL_ROOT=${DESTDIR}" + if [ -n "$CROSS_BUILD" ]; then + _env+=" PHAR_PHP=/usr/bin/php${_php_version}" + fi + make ${_env} install-{modules,cli,build,headers,programs,pharcmd} + + # install php.ini + vinstall ${wrksrc}/php.ini-production 644 "etc/php${_php_version}" php.ini + # remove static modules + rm -f "${DESTDIR}/usr/lib/php${_php_version}/modules/*.a" +} + +php8.4-devel_package() { + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/php${_php_version}/build" + vmove "usr/bin/php-config${_php_version}" + vmove "usr/bin/phpize${_php_version}" + vmove "usr/share/man/man1/phpize${_php_version}.1" + vmove "usr/share/man/man1/php-config${_php_version}.1" + } +} + +php8.4-phpdbg_package() { + short_desc+=" - interactive debugger" + depends="php${_php_version}>=${version}_${revision}" + pkg_install() { + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg + } +} + +php8.4-cgi_package() { + short_desc+=' - CGI and FCGI SAPI' + depends="php${_php_version}>=${version}_${revision}" + pkg_install() { + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} install-cgi + } +} + +php8.4-apache_package() { + short_desc+=' - Apache SAPI' + depends="php${_php_version}>=${version}_${revision}" + conf_files="/etc/apache/extra/php${_php_version}_module.conf" + alternatives=" + php-apache:libphp.so:/usr/libexec/httpd/modules/libphp${_php_version}.so + php-apache:php_module.conf:/etc/apache/extra/php${_php_version}_module.conf" + pkg_install() { + vinstall ${wrksrc}/build-apache/libs/libphp.so 755 usr/libexec/httpd/modules "libphp${_php_version}.so" + vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra "php${_php_version}_module.conf" + } +} + +php8.4-fpm_package() { + short_desc+=' - FastCGI Process Manager' + depends="php${_php_version}>=${version}_${revision}" + conf_files="/etc/php${_php_version}/php-fpm.conf /etc/php${_php_version}/php-fpm.d/*" + pkg_install() { + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} install-fpm + vsv "php-fpm${_php_version}" + } +} + +php8.4-embed_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - Embed SAPI' + pkg_install() { + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} PHP_SAPI=embed install-sapi + mv ${PKGDESTDIR}/usr/lib/php8.4/libphp.so ${PKGDESTDIR}/usr/lib/libphp${_php_version}.so + } +} + +php8.4-pear_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision} + php${_php_version}>=devel-${version}_${revision} autoconf" + short_desc+=' - PHP Extension and Application Repository' + conf_files="/etc/php${_php_version}/pear.conf" + pkg_install() { + cd ${wrksrc}/build + local _env="INSTALL_ROOT=${PKGDESTDIR} PHP_PEAR_PHP_BIN=php${_php_version}" + if [ -n "$CROSS_BUILD" ]; then + _env+=" PEAR_PHP=/usr/bin/php${_php_version}" + fi + make install-pear ${_env} + rm -rf ${PKGDESTDIR}/.{channels,depdb,depdblock,filemap,lock,registry} + rm -rf ${PKGDESTDIR}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry} + mv ${PKGDESTDIR}/usr/bin/pear{,${_php_version}} + mv ${PKGDESTDIR}/usr/bin/peardev{,${_php_version}} + mv ${PKGDESTDIR}/usr/bin/pecl{,${_php_version}} + } +} + +php8.4-enchant_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - enchant module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/enchant.so" + } +} + +php8.4-gd_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - gd module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/gd.so" + } +} + +php8.4-intl_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - Internationalization module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/intl.so" + } +} + +php8.4-ldap_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - LDAP module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/ldap.so" + } +} + +php8.4-mysql_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - MySQL modules' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/*mysql*.so" + } +} + +php8.4-odbc_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - ODBC modules' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/*odbc.so" + } +} + +php8.4-pgsql_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - PostgreSQL modules' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/*pgsql.so" + } +} + +php8.4-snmp_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - snmp module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/snmp.so" + } +} + +php8.4-sqlite_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - sqlite module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/*sqlite*.so" + } +} + +php8.4-tidy_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - tidy HTML module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/*tidy*.so" + } +} + +php8.4-xsl_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - XSL module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/xsl.so" + } +} + +php8.4-sodium_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - sodium module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/sodium.so" + } +} + +php8.4-ffi_package() { + lib32disabled=yes + depends="php${_php_version}>=${version}_${revision}" + short_desc+=' - FFI module' + pkg_install() { + vmove "usr/lib/php${_php_version}/modules/ffi.so" + } +} diff --git a/srcpkgs/php8.4/update b/srcpkgs/php8.4/update new file mode 100644 index 00000000000..30e9d7f2873 --- /dev/null +++ b/srcpkgs/php8.4/update @@ -0,0 +1,3 @@ +pkgname=php +ignore="8.[5-9].*" +site="https://www.php.net/distributions/"