Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [wip] php8.4
@ 2025-01-10 15:42 TinfoilSubmarine
  2025-01-10 16:06 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: TinfoilSubmarine @ 2025-01-10 15:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]

There is a new pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/php8.4
https://github.com/void-linux/void-packages/pull/53915

[wip] php8.4
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

I had to modify the `do_build` of `php8.4` compared to the previous versions due to a build failure when trying to reuse the build directory for building the apache parts.

A patch file from https://github.com/void-linux/void-packages/pull/53915.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/php8.4-53915.patch --]
[-- Type: text/x-diff, Size: 49079 bytes --]

From 24eb8484a9392eac07465c853acb469cc94df3ba Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:26 -0500
Subject: [PATCH 1/9] New package: php8.4-8.4.2

---
 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 +
 .../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                       | 382 ++++++++++++++++++
 srcpkgs/php8.4/update                         |   3 +
 33 files changed, 693 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/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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..bc57ba73dbcdf3
--- /dev/null
+++ b/srcpkgs/php8.4/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php_module
+
+<IfModule dir_module>
+	<IfModule php_module>
+		DirectoryIndex index.php index.html
+		<FilesMatch "\.php$">
+			SetHandler application/x-httpd-php
+		</FilesMatch>
+		<FilesMatch "\.phps$">
+			SetHandler application/x-httpd-php-source
+		</FilesMatch>
+	</IfModule>
+</IfModule>
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 00000000000000..dee7b386a7e5be
--- /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/cross-gdImageCreateFrom.patch b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch
new file mode 100644
index 00000000000000..35af5bda896931
--- /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 <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -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 00000000000000..a6447ac150221e
--- /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 00000000000000..f9191a50a0b58c
--- /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 00000000000000..1e4e627ec65b96
--- /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 00000000000000..8d4c37941c3c12
--- /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 00000000000000..b83a7ab9bc1e49
--- /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 00000000000000..5e55e179f8a4a0
--- /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 00000000000000..d87b0265421996
--- /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 00000000000000..a3143e89a9ee3a
--- /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 00000000000000..3cf4b63851495c
--- /dev/null
+++ b/srcpkgs/php8.4/template
@@ -0,0 +1,382 @@
+# Template file for 'php8.4'
+# rebuild php8.4-apcu and php8.4-imagick when updating this package
+pkgname=php8.4
+version=8.4.2
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+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=5d3cf82a7f4cafdcfc4f3d98f3e3ee81077ae57c709a5613cbff5834d78a7747
+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_DLOPEN
+		 -DHAVE_DLSYM
+		 -DHAVE_SHM_IPC
+		 -DHAVE_SHM_MMAP_ANON
+		 -DHAVE_SHM_MMAP_ZERO
+		 -DHAVE_SHM_MMAP_POSIX
+		 -DHAVE_SHM_MMAP_FILE"
+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
+	# create a separate build directory for apache
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+
+}
+
+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} \
+		"
+
+	local _phpextensions="--enable-bcmath=shared \
+		--enable-calendar=shared \
+		--enable-exif=shared \
+		--enable-ftp=shared \
+		--enable-intl=shared \
+		--enable-mbstring \
+		--enable-opcache \
+		--enable-pcntl \
+		--enable-phar=shared \
+		--enable-posix=shared \
+		--enable-shmop=shared \
+		--enable-soap=shared \
+		--enable-sockets=shared \
+		--enable-sysvmsg=shared \
+		--enable-sysvsem=shared \
+		--enable-sysvshm=shared \
+		--enable-mysqlnd \
+		--enable-gd=shared \
+		--with-external-gd \
+		--with-ffi=shared \
+		--with-bz2=shared,$XBPS_CROSS_BASE/usr/ \
+		--with-curl=shared \
+		--with-db4=$XBPS_CROSS_BASE/usr \
+		--with-enchant=shared,$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-sodium=shared \
+		--with-mhash \
+		--with-mysql-sock=/run/mysqld/mysqld.sock \
+		--with-mysqli=shared,mysqlnd \
+		--with-openssl=shared \
+		--with-external-pcre \
+		--with-pear=/usr/share/pear${_php_version} \
+		--with-pdo-mysql=shared,mysqlnd \
+		--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-sqlite3=shared,$XBPS_CROSS_BASE/usr \
+		--with-unixODBC=shared,$XBPS_CROSS_BASE/usr \
+		--with-xsl=shared,$XBPS_CROSS_BASE/usr \
+		--with-tidy=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} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--enable-cgi \
+		--enable-fpm \
+		--with-fpm-user=_phpfpm \
+		--with-fpm-group=_phpfpm \
+		--with-fpm-acl \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	cd ${wrksrc}/build-apache
+	ln -s ${wrksrc}/configure
+	./configure ${_phpconfig} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--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 00000000000000..30e9d7f2873442
--- /dev/null
+++ b/srcpkgs/php8.4/update
@@ -0,0 +1,3 @@
+pkgname=php
+ignore="8.[5-9].*"
+site="https://www.php.net/distributions/"

From 6fde221b0c205396ea86e92b6ff6f08d49949975 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:17 -0500
Subject: [PATCH 2/9] New package: php8.4-apcu-5.1.24

---
 srcpkgs/php8.4-apcu/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-apcu/template               | 29 ++++++++++++++++++++++
 srcpkgs/php8.4-apcu/update                 |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.4-apcu/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-apcu/template
 create mode 100644 srcpkgs/php8.4-apcu/update

diff --git a/srcpkgs/php8.4-apcu/files/README.voidlinux b/srcpkgs/php8.4-apcu/files/README.voidlinux
new file mode 100644
index 00000000000000..9da8a70ccc2ba9
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.4-apcu/template b/srcpkgs/php8.4-apcu/template
new file mode 100644
index 00000000000000..983fe2e4f775d8
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-apcu'
+pkgname=php8.4-apcu
+version=5.1.24
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target=test
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel pcre2-devel"
+depends="php8.4"
+short_desc="In-memory key-value store for PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=5c28a55b27082c69657e25b7ecf553e2cf6b74ec3fa77d6b76f4fb982e001e43
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-apcu/update b/srcpkgs/php8.4-apcu/update
new file mode 100644
index 00000000000000..ad899519e31382
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 545c6e04aa0f6637d16e2f6ef3de5b78fd1abbd3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:19 -0500
Subject: [PATCH 3/9] New package: php8.4-ast-1.1.2

---
 srcpkgs/php8.4-ast/files/README.voidlinux |  2 ++
 srcpkgs/php8.4-ast/template               | 28 +++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 srcpkgs/php8.4-ast/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-ast/template

diff --git a/srcpkgs/php8.4-ast/files/README.voidlinux b/srcpkgs/php8.4-ast/files/README.voidlinux
new file mode 100644
index 00000000000000..40e14f32f8f635
--- /dev/null
+++ b/srcpkgs/php8.4-ast/files/README.voidlinux
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so
diff --git a/srcpkgs/php8.4-ast/template b/srcpkgs/php8.4-ast/template
new file mode 100644
index 00000000000000..fbbeec05575832
--- /dev/null
+++ b/srcpkgs/php8.4-ast/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-ast'
+pkgname=php8.4-ast
+version=1.1.2
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target="test"
+hostmakedepends="php8.4-devel autoconf"
+makedepends="php8.4-devel"
+depends="php8.4"
+checkdepends="${depends}"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=8742427ff7c07ba93f940968f7363972ea040d97d847da3b79b4283c2a369dea
+make_check_pre="env NO_INTERACTION=1"
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}

From 92ab5223c071794928246cc4595bd5ca95f2d87f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:20 -0500
Subject: [PATCH 4/9] New package: php8.4-igbinary-3.2.16

---
 srcpkgs/php8.4-igbinary/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/php8.4-igbinary/template

diff --git a/srcpkgs/php8.4-igbinary/template b/srcpkgs/php8.4-igbinary/template
new file mode 100644
index 00000000000000..c00b787aa90da9
--- /dev/null
+++ b/srcpkgs/php8.4-igbinary/template
@@ -0,0 +1,24 @@
+# Template file for 'php8.4-igbinary'
+pkgname=php8.4-igbinary
+version=3.2.16
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="Igbinary is a drop in replacement for the standard php serializer"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/igbinary/igbinary/"
+distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
+checksum=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT="${DESTDIR}" install
+	vlicense COPYING
+}

From db49b9b8f0960107050655853d991c494571f856 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:22 -0500
Subject: [PATCH 5/9] New package: php8.4-imagick-3.7.0

---
 srcpkgs/php8.4-imagick/files/README.voidlinux |  3 ++
 ...le-libmagick-header-file-search-path.patch | 17 +++++++++++
 srcpkgs/php8.4-imagick/template               | 29 +++++++++++++++++++
 srcpkgs/php8.4-imagick/update                 |  1 +
 4 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/php8.4-imagick/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 create mode 100644 srcpkgs/php8.4-imagick/template
 create mode 100644 srcpkgs/php8.4-imagick/update

diff --git a/srcpkgs/php8.4-imagick/files/README.voidlinux b/srcpkgs/php8.4-imagick/files/README.voidlinux
new file mode 100644
index 00000000000000..00497519fcee5b
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Imagick extension add the following line to your php.ini:
+
+	extension=imagick.so
diff --git a/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 00000000000000..16b8aaa5737151
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
@@ -0,0 +1,17 @@
+--- a/imagemagick.m4	2021-09-09 10:53:42.287881616 +0200
++++ b/imagemagick.m4	2021-09-09 11:14:47.662312430 +0200
+@@ -167,6 +167,14 @@ AC_DEFUN([IM_FIND_IMAGEMAGICK],[
+   
+     AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h])
+ 
++  elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
++
++    IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
++    IM_HEADER_STYLE="SEVEN"
++    AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header])
++
++    AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h])
++
+   elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
+ 
+     IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
diff --git a/srcpkgs/php8.4-imagick/template b/srcpkgs/php8.4-imagick/template
new file mode 100644
index 00000000000000..0c895c67080bbf
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-imagick'
+pkgname=php8.4-imagick
+version=3.7.0
+revision=4
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel libmagick-devel"
+depends="php8.4"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/imagick"
+distfiles="https://pecl.php.net/get/imagick-$version.tgz"
+checksum=5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-imagick/update b/srcpkgs/php8.4-imagick/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 5a8b07174c0c0a9550cad43ad38bfc181bb78c33 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:23 -0500
Subject: [PATCH 6/9] New package: php8.4-mongodb-1.20.1

---
 srcpkgs/php8.4-mongodb/files/README.voidlinux |  3 ++
 srcpkgs/php8.4-mongodb/template               | 28 +++++++++++++++++++
 srcpkgs/php8.4-mongodb/update                 |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/php8.4-mongodb/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-mongodb/template
 create mode 100644 srcpkgs/php8.4-mongodb/update

diff --git a/srcpkgs/php8.4-mongodb/files/README.voidlinux b/srcpkgs/php8.4-mongodb/files/README.voidlinux
new file mode 100644
index 00000000000000..173fab80af8df0
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the MongoDB extension add the following line to your php.ini:
+
+	extension=mongodb
diff --git a/srcpkgs/php8.4-mongodb/template b/srcpkgs/php8.4-mongodb/template
new file mode 100644
index 00000000000000..56fa4c0ba0566f
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-mongodb'
+pkgname=php8.4-mongodb
+version=1.20.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel openssl-devel"
+depends="php8.4"
+short_desc="Official MongoDB PHP driver"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="Apache-2.0"
+homepage="https://pecl.php.net/package/mongodb"
+changelog="https://pecl.php.net/package-changelog.php?package=mongodb"
+distfiles="https://pecl.php.net/get/mongodb-$version.tgz"
+checksum=614e57594918feb621f525e6516d59ce09b78f5172355ba8afb6c2207c1ce900
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-mongodb/update b/srcpkgs/php8.4-mongodb/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 3e67544419fc0d75e284883c10b7257f91a40891 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:24 -0500
Subject: [PATCH 7/9] New package: php8.4-redis-6.1.0

---
 srcpkgs/php8.4-redis/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-redis/template               | 27 +++++++++++++++++++++
 srcpkgs/php8.4-redis/update                 |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/php8.4-redis/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-redis/template
 create mode 100644 srcpkgs/php8.4-redis/update

diff --git a/srcpkgs/php8.4-redis/files/README.voidlinux b/srcpkgs/php8.4-redis/files/README.voidlinux
new file mode 100644
index 00000000000000..2a9de04b421e15
--- /dev/null
+++ b/srcpkgs/php8.4-redis/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Redis extension add the following line to your php.ini:
+
+	extension=redis
diff --git a/srcpkgs/php8.4-redis/template b/srcpkgs/php8.4-redis/template
new file mode 100644
index 00000000000000..6777e759d3d247
--- /dev/null
+++ b/srcpkgs/php8.4-redis/template
@@ -0,0 +1,27 @@
+# Template file for 'php8.4-redis'
+pkgname=php8.4-redis
+version=6.1.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="PHP extension for Redis"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/redis"
+distfiles="https://pecl.php.net/get/redis-$version.tgz"
+checksum=f10405f639fe415e9ed4ec99538e72c90694d8dbd62868edcfcd6a453466b48c
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc $FILESDIR/README.voidlinux
+}
diff --git a/srcpkgs/php8.4-redis/update b/srcpkgs/php8.4-redis/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-redis/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From a196380fef99e97778aec82026240b2c7a05fa0d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:32 -0500
Subject: [PATCH 8/9] New package: xdebug8.4-3.4.1

---
 srcpkgs/xdebug8.4/files/README.voidlinux |  1 +
 srcpkgs/xdebug8.4/template               | 25 ++++++++++++++++++++++++
 srcpkgs/xdebug8.4/update                 |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/xdebug8.4/files/README.voidlinux
 create mode 100644 srcpkgs/xdebug8.4/template
 create mode 100644 srcpkgs/xdebug8.4/update

diff --git a/srcpkgs/xdebug8.4/files/README.voidlinux b/srcpkgs/xdebug8.4/files/README.voidlinux
new file mode 100644
index 00000000000000..04e3343216f7f1
--- /dev/null
+++ b/srcpkgs/xdebug8.4/files/README.voidlinux
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.4/template b/srcpkgs/xdebug8.4/template
new file mode 100644
index 00000000000000..e8400dd3437680
--- /dev/null
+++ b/srcpkgs/xdebug8.4/template
@@ -0,0 +1,25 @@
+# Template file for 'xdebug8.4'
+pkgname=xdebug8.4
+version=3.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+short_desc="PHP debugging extension"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4d96bcded78dbd271fb344c119171b625a8597cd67fc6899ec5e019549f1bb87
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/xdebug8.4/update b/srcpkgs/xdebug8.4/update
new file mode 100644
index 00000000000000..280b0bc7e3ac92
--- /dev/null
+++ b/srcpkgs/xdebug8.4/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From 1285d16e1bdc1e449d25f4380f7491f987ed2743 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:12 -0500
Subject: [PATCH 9/9] php: update to 8.4.

---
 srcpkgs/php/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index d04d1369746fd5..5eba95db516833 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,7 +1,7 @@
 # Template file for 'php'
 pkgname=php
-version=8.3
-revision=2
+version=8.4
+revision=1
 build_style=meta
 depends="php${version}"
 short_desc="Meta package for PHP"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [wip] php8.4
  2025-01-10 15:42 [PR PATCH] [wip] php8.4 TinfoilSubmarine
@ 2025-01-10 16:06 ` TinfoilSubmarine
  2025-01-10 16:25 ` TinfoilSubmarine
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: TinfoilSubmarine @ 2025-01-10 16:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/php8.4
https://github.com/void-linux/void-packages/pull/53915

[wip] php8.4
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

I had to modify the `do_build` of `php8.4` compared to the previous versions due to a build failure when trying to reuse the build directory for building the apache parts.

A patch file from https://github.com/void-linux/void-packages/pull/53915.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/php8.4-53915.patch --]
[-- Type: text/x-diff, Size: 51002 bytes --]

From 24eb8484a9392eac07465c853acb469cc94df3ba Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:26 -0500
Subject: [PATCH 01/10] New package: php8.4-8.4.2

---
 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 +
 .../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                       | 382 ++++++++++++++++++
 srcpkgs/php8.4/update                         |   3 +
 33 files changed, 693 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/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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..bc57ba73dbcdf3
--- /dev/null
+++ b/srcpkgs/php8.4/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php_module
+
+<IfModule dir_module>
+	<IfModule php_module>
+		DirectoryIndex index.php index.html
+		<FilesMatch "\.php$">
+			SetHandler application/x-httpd-php
+		</FilesMatch>
+		<FilesMatch "\.phps$">
+			SetHandler application/x-httpd-php-source
+		</FilesMatch>
+	</IfModule>
+</IfModule>
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 00000000000000..dee7b386a7e5be
--- /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/cross-gdImageCreateFrom.patch b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch
new file mode 100644
index 00000000000000..35af5bda896931
--- /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 <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -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 00000000000000..a6447ac150221e
--- /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 00000000000000..f9191a50a0b58c
--- /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 00000000000000..1e4e627ec65b96
--- /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 00000000000000..8d4c37941c3c12
--- /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 00000000000000..b83a7ab9bc1e49
--- /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 00000000000000..5e55e179f8a4a0
--- /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 00000000000000..d87b0265421996
--- /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 00000000000000..a3143e89a9ee3a
--- /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 00000000000000..3cf4b63851495c
--- /dev/null
+++ b/srcpkgs/php8.4/template
@@ -0,0 +1,382 @@
+# Template file for 'php8.4'
+# rebuild php8.4-apcu and php8.4-imagick when updating this package
+pkgname=php8.4
+version=8.4.2
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+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=5d3cf82a7f4cafdcfc4f3d98f3e3ee81077ae57c709a5613cbff5834d78a7747
+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_DLOPEN
+		 -DHAVE_DLSYM
+		 -DHAVE_SHM_IPC
+		 -DHAVE_SHM_MMAP_ANON
+		 -DHAVE_SHM_MMAP_ZERO
+		 -DHAVE_SHM_MMAP_POSIX
+		 -DHAVE_SHM_MMAP_FILE"
+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
+	# create a separate build directory for apache
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+
+}
+
+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} \
+		"
+
+	local _phpextensions="--enable-bcmath=shared \
+		--enable-calendar=shared \
+		--enable-exif=shared \
+		--enable-ftp=shared \
+		--enable-intl=shared \
+		--enable-mbstring \
+		--enable-opcache \
+		--enable-pcntl \
+		--enable-phar=shared \
+		--enable-posix=shared \
+		--enable-shmop=shared \
+		--enable-soap=shared \
+		--enable-sockets=shared \
+		--enable-sysvmsg=shared \
+		--enable-sysvsem=shared \
+		--enable-sysvshm=shared \
+		--enable-mysqlnd \
+		--enable-gd=shared \
+		--with-external-gd \
+		--with-ffi=shared \
+		--with-bz2=shared,$XBPS_CROSS_BASE/usr/ \
+		--with-curl=shared \
+		--with-db4=$XBPS_CROSS_BASE/usr \
+		--with-enchant=shared,$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-sodium=shared \
+		--with-mhash \
+		--with-mysql-sock=/run/mysqld/mysqld.sock \
+		--with-mysqli=shared,mysqlnd \
+		--with-openssl=shared \
+		--with-external-pcre \
+		--with-pear=/usr/share/pear${_php_version} \
+		--with-pdo-mysql=shared,mysqlnd \
+		--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-sqlite3=shared,$XBPS_CROSS_BASE/usr \
+		--with-unixODBC=shared,$XBPS_CROSS_BASE/usr \
+		--with-xsl=shared,$XBPS_CROSS_BASE/usr \
+		--with-tidy=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} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--enable-cgi \
+		--enable-fpm \
+		--with-fpm-user=_phpfpm \
+		--with-fpm-group=_phpfpm \
+		--with-fpm-acl \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	cd ${wrksrc}/build-apache
+	ln -s ${wrksrc}/configure
+	./configure ${_phpconfig} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--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 00000000000000..30e9d7f2873442
--- /dev/null
+++ b/srcpkgs/php8.4/update
@@ -0,0 +1,3 @@
+pkgname=php
+ignore="8.[5-9].*"
+site="https://www.php.net/distributions/"

From 6fde221b0c205396ea86e92b6ff6f08d49949975 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:17 -0500
Subject: [PATCH 02/10] New package: php8.4-apcu-5.1.24

---
 srcpkgs/php8.4-apcu/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-apcu/template               | 29 ++++++++++++++++++++++
 srcpkgs/php8.4-apcu/update                 |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.4-apcu/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-apcu/template
 create mode 100644 srcpkgs/php8.4-apcu/update

diff --git a/srcpkgs/php8.4-apcu/files/README.voidlinux b/srcpkgs/php8.4-apcu/files/README.voidlinux
new file mode 100644
index 00000000000000..9da8a70ccc2ba9
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.4-apcu/template b/srcpkgs/php8.4-apcu/template
new file mode 100644
index 00000000000000..983fe2e4f775d8
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-apcu'
+pkgname=php8.4-apcu
+version=5.1.24
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target=test
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel pcre2-devel"
+depends="php8.4"
+short_desc="In-memory key-value store for PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=5c28a55b27082c69657e25b7ecf553e2cf6b74ec3fa77d6b76f4fb982e001e43
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-apcu/update b/srcpkgs/php8.4-apcu/update
new file mode 100644
index 00000000000000..ad899519e31382
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 545c6e04aa0f6637d16e2f6ef3de5b78fd1abbd3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:19 -0500
Subject: [PATCH 03/10] New package: php8.4-ast-1.1.2

---
 srcpkgs/php8.4-ast/files/README.voidlinux |  2 ++
 srcpkgs/php8.4-ast/template               | 28 +++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 srcpkgs/php8.4-ast/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-ast/template

diff --git a/srcpkgs/php8.4-ast/files/README.voidlinux b/srcpkgs/php8.4-ast/files/README.voidlinux
new file mode 100644
index 00000000000000..40e14f32f8f635
--- /dev/null
+++ b/srcpkgs/php8.4-ast/files/README.voidlinux
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so
diff --git a/srcpkgs/php8.4-ast/template b/srcpkgs/php8.4-ast/template
new file mode 100644
index 00000000000000..fbbeec05575832
--- /dev/null
+++ b/srcpkgs/php8.4-ast/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-ast'
+pkgname=php8.4-ast
+version=1.1.2
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target="test"
+hostmakedepends="php8.4-devel autoconf"
+makedepends="php8.4-devel"
+depends="php8.4"
+checkdepends="${depends}"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=8742427ff7c07ba93f940968f7363972ea040d97d847da3b79b4283c2a369dea
+make_check_pre="env NO_INTERACTION=1"
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}

From 92ab5223c071794928246cc4595bd5ca95f2d87f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:20 -0500
Subject: [PATCH 04/10] New package: php8.4-igbinary-3.2.16

---
 srcpkgs/php8.4-igbinary/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/php8.4-igbinary/template

diff --git a/srcpkgs/php8.4-igbinary/template b/srcpkgs/php8.4-igbinary/template
new file mode 100644
index 00000000000000..c00b787aa90da9
--- /dev/null
+++ b/srcpkgs/php8.4-igbinary/template
@@ -0,0 +1,24 @@
+# Template file for 'php8.4-igbinary'
+pkgname=php8.4-igbinary
+version=3.2.16
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="Igbinary is a drop in replacement for the standard php serializer"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/igbinary/igbinary/"
+distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
+checksum=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT="${DESTDIR}" install
+	vlicense COPYING
+}

From 11c8a4dbdb39ea9f50955561682396a38c4b58be Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:22 -0500
Subject: [PATCH 05/10] New package: php8.4-imagick-3.7.0

---
 srcpkgs/php8.4-imagick/files/README.voidlinux |  3 ++
 ...le-libmagick-header-file-search-path.patch | 17 +++++++++++
 srcpkgs/php8.4-imagick/template               | 29 +++++++++++++++++++
 srcpkgs/php8.4-imagick/update                 |  1 +
 4 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/php8.4-imagick/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 create mode 100644 srcpkgs/php8.4-imagick/template
 create mode 100644 srcpkgs/php8.4-imagick/update

diff --git a/srcpkgs/php8.4-imagick/files/README.voidlinux b/srcpkgs/php8.4-imagick/files/README.voidlinux
new file mode 100644
index 00000000000000..00497519fcee5b
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Imagick extension add the following line to your php.ini:
+
+	extension=imagick.so
diff --git a/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 00000000000000..16b8aaa5737151
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
@@ -0,0 +1,17 @@
+--- a/imagemagick.m4	2021-09-09 10:53:42.287881616 +0200
++++ b/imagemagick.m4	2021-09-09 11:14:47.662312430 +0200
+@@ -167,6 +167,14 @@ AC_DEFUN([IM_FIND_IMAGEMAGICK],[
+   
+     AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h])
+ 
++  elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
++
++    IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
++    IM_HEADER_STYLE="SEVEN"
++    AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header])
++
++    AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h])
++
+   elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
+ 
+     IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
diff --git a/srcpkgs/php8.4-imagick/template b/srcpkgs/php8.4-imagick/template
new file mode 100644
index 00000000000000..4993c5d515ba3a
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-imagick'
+pkgname=php8.4-imagick
+version=3.7.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel libmagick-devel"
+depends="php8.4"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/imagick"
+distfiles="https://pecl.php.net/get/imagick-$version.tgz"
+checksum=5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-imagick/update b/srcpkgs/php8.4-imagick/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From a3ae8254e20c318882bb734e395d948891cb324d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:23 -0500
Subject: [PATCH 06/10] New package: php8.4-mongodb-1.20.1

---
 srcpkgs/php8.4-mongodb/files/README.voidlinux |  3 ++
 srcpkgs/php8.4-mongodb/template               | 28 +++++++++++++++++++
 srcpkgs/php8.4-mongodb/update                 |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/php8.4-mongodb/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-mongodb/template
 create mode 100644 srcpkgs/php8.4-mongodb/update

diff --git a/srcpkgs/php8.4-mongodb/files/README.voidlinux b/srcpkgs/php8.4-mongodb/files/README.voidlinux
new file mode 100644
index 00000000000000..173fab80af8df0
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the MongoDB extension add the following line to your php.ini:
+
+	extension=mongodb
diff --git a/srcpkgs/php8.4-mongodb/template b/srcpkgs/php8.4-mongodb/template
new file mode 100644
index 00000000000000..56fa4c0ba0566f
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-mongodb'
+pkgname=php8.4-mongodb
+version=1.20.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel openssl-devel"
+depends="php8.4"
+short_desc="Official MongoDB PHP driver"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="Apache-2.0"
+homepage="https://pecl.php.net/package/mongodb"
+changelog="https://pecl.php.net/package-changelog.php?package=mongodb"
+distfiles="https://pecl.php.net/get/mongodb-$version.tgz"
+checksum=614e57594918feb621f525e6516d59ce09b78f5172355ba8afb6c2207c1ce900
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-mongodb/update b/srcpkgs/php8.4-mongodb/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From e6e84d7fc7ef026703db67f2e4dc7ae33f7a8eae Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:24 -0500
Subject: [PATCH 07/10] New package: php8.4-redis-6.1.0

---
 srcpkgs/php8.4-redis/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-redis/template               | 27 +++++++++++++++++++++
 srcpkgs/php8.4-redis/update                 |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/php8.4-redis/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-redis/template
 create mode 100644 srcpkgs/php8.4-redis/update

diff --git a/srcpkgs/php8.4-redis/files/README.voidlinux b/srcpkgs/php8.4-redis/files/README.voidlinux
new file mode 100644
index 00000000000000..2a9de04b421e15
--- /dev/null
+++ b/srcpkgs/php8.4-redis/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Redis extension add the following line to your php.ini:
+
+	extension=redis
diff --git a/srcpkgs/php8.4-redis/template b/srcpkgs/php8.4-redis/template
new file mode 100644
index 00000000000000..6777e759d3d247
--- /dev/null
+++ b/srcpkgs/php8.4-redis/template
@@ -0,0 +1,27 @@
+# Template file for 'php8.4-redis'
+pkgname=php8.4-redis
+version=6.1.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="PHP extension for Redis"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/redis"
+distfiles="https://pecl.php.net/get/redis-$version.tgz"
+checksum=f10405f639fe415e9ed4ec99538e72c90694d8dbd62868edcfcd6a453466b48c
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc $FILESDIR/README.voidlinux
+}
diff --git a/srcpkgs/php8.4-redis/update b/srcpkgs/php8.4-redis/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-redis/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 5b2e60d1e69fb27d7d3cd1decf4f2424230f5599 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:32 -0500
Subject: [PATCH 08/10] New package: xdebug8.4-3.4.1

---
 srcpkgs/xdebug8.4/files/README.voidlinux |  1 +
 srcpkgs/xdebug8.4/template               | 25 ++++++++++++++++++++++++
 srcpkgs/xdebug8.4/update                 |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/xdebug8.4/files/README.voidlinux
 create mode 100644 srcpkgs/xdebug8.4/template
 create mode 100644 srcpkgs/xdebug8.4/update

diff --git a/srcpkgs/xdebug8.4/files/README.voidlinux b/srcpkgs/xdebug8.4/files/README.voidlinux
new file mode 100644
index 00000000000000..04e3343216f7f1
--- /dev/null
+++ b/srcpkgs/xdebug8.4/files/README.voidlinux
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.4/template b/srcpkgs/xdebug8.4/template
new file mode 100644
index 00000000000000..e8400dd3437680
--- /dev/null
+++ b/srcpkgs/xdebug8.4/template
@@ -0,0 +1,25 @@
+# Template file for 'xdebug8.4'
+pkgname=xdebug8.4
+version=3.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+short_desc="PHP debugging extension"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4d96bcded78dbd271fb344c119171b625a8597cd67fc6899ec5e019549f1bb87
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/xdebug8.4/update b/srcpkgs/xdebug8.4/update
new file mode 100644
index 00000000000000..280b0bc7e3ac92
--- /dev/null
+++ b/srcpkgs/xdebug8.4/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From 9efea9fd41b33bb84d0321bee8d42fa4f948eec0 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Fri, 10 Jan 2025 11:06:08 -0500
Subject: [PATCH 09/10] New package: composer8.4-2.8.4

---
 srcpkgs/composer8.4/files/composer8.3 |  2 ++
 srcpkgs/composer8.4/template          | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 srcpkgs/composer8.4/files/composer8.3
 create mode 100644 srcpkgs/composer8.4/template

diff --git a/srcpkgs/composer8.4/files/composer8.3 b/srcpkgs/composer8.4/files/composer8.3
new file mode 100644
index 00000000000000..83984e3ea5eff8
--- /dev/null
+++ b/srcpkgs/composer8.4/files/composer8.3
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.3 /usr/libexec/composer.phar8.3 "$@"
diff --git a/srcpkgs/composer8.4/template b/srcpkgs/composer8.4/template
new file mode 100644
index 00000000000000..1045b916010932
--- /dev/null
+++ b/srcpkgs/composer8.4/template
@@ -0,0 +1,27 @@
+# Template file for 'composer8.4'
+pkgname=composer8.4
+version=2.8.4
+revision=1
+build_style=fetch
+depends="php8.4"
+short_desc="Dependency manager for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://getcomposer.org/"
+changelog="https://raw.githubusercontent.com/composer/composer/main/CHANGELOG.md"
+distfiles="https://github.com/composer/composer/releases/download/${version}/composer.phar
+ https://raw.githubusercontent.com/composer/composer/main/LICENSE"
+checksum="c4c4e2e1beab0ea04e0bd042a5dbba9feda1fbf5eda0d36203958edd343c0a8a
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.4"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.4
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.4
+	vlicense LICENSE
+
+	vmkdir /etc/php8.4/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.4/conf.d/composer.ini
+}

From 61ae121284d012bcd574350ba2ea2bc766de6ea8 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:12 -0500
Subject: [PATCH 10/10] php: update to 8.4.

---
 srcpkgs/php/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index d04d1369746fd5..5eba95db516833 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,7 +1,7 @@
 # Template file for 'php'
 pkgname=php
-version=8.3
-revision=2
+version=8.4
+revision=1
 build_style=meta
 depends="php${version}"
 short_desc="Meta package for PHP"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [wip] php8.4
  2025-01-10 15:42 [PR PATCH] [wip] php8.4 TinfoilSubmarine
  2025-01-10 16:06 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2025-01-10 16:25 ` TinfoilSubmarine
  2025-01-10 17:31 ` TinfoilSubmarine
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: TinfoilSubmarine @ 2025-01-10 16:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/php8.4
https://github.com/void-linux/void-packages/pull/53915

[wip] php8.4
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

I had to modify the `do_build` of `php8.4` compared to the previous versions due to a build failure when trying to reuse the build directory for building the apache parts.

A patch file from https://github.com/void-linux/void-packages/pull/53915.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/php8.4-53915.patch --]
[-- Type: text/x-diff, Size: 51002 bytes --]

From 24eb8484a9392eac07465c853acb469cc94df3ba Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:26 -0500
Subject: [PATCH 01/10] New package: php8.4-8.4.2

---
 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 +
 .../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                       | 382 ++++++++++++++++++
 srcpkgs/php8.4/update                         |   3 +
 33 files changed, 693 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/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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..bc57ba73dbcdf3
--- /dev/null
+++ b/srcpkgs/php8.4/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php_module
+
+<IfModule dir_module>
+	<IfModule php_module>
+		DirectoryIndex index.php index.html
+		<FilesMatch "\.php$">
+			SetHandler application/x-httpd-php
+		</FilesMatch>
+		<FilesMatch "\.phps$">
+			SetHandler application/x-httpd-php-source
+		</FilesMatch>
+	</IfModule>
+</IfModule>
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 00000000000000..dee7b386a7e5be
--- /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/cross-gdImageCreateFrom.patch b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch
new file mode 100644
index 00000000000000..35af5bda896931
--- /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 <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -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 00000000000000..a6447ac150221e
--- /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 00000000000000..f9191a50a0b58c
--- /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 00000000000000..1e4e627ec65b96
--- /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 00000000000000..8d4c37941c3c12
--- /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 00000000000000..b83a7ab9bc1e49
--- /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 00000000000000..5e55e179f8a4a0
--- /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 00000000000000..d87b0265421996
--- /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 00000000000000..a3143e89a9ee3a
--- /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 00000000000000..3cf4b63851495c
--- /dev/null
+++ b/srcpkgs/php8.4/template
@@ -0,0 +1,382 @@
+# Template file for 'php8.4'
+# rebuild php8.4-apcu and php8.4-imagick when updating this package
+pkgname=php8.4
+version=8.4.2
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+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=5d3cf82a7f4cafdcfc4f3d98f3e3ee81077ae57c709a5613cbff5834d78a7747
+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_DLOPEN
+		 -DHAVE_DLSYM
+		 -DHAVE_SHM_IPC
+		 -DHAVE_SHM_MMAP_ANON
+		 -DHAVE_SHM_MMAP_ZERO
+		 -DHAVE_SHM_MMAP_POSIX
+		 -DHAVE_SHM_MMAP_FILE"
+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
+	# create a separate build directory for apache
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+
+}
+
+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} \
+		"
+
+	local _phpextensions="--enable-bcmath=shared \
+		--enable-calendar=shared \
+		--enable-exif=shared \
+		--enable-ftp=shared \
+		--enable-intl=shared \
+		--enable-mbstring \
+		--enable-opcache \
+		--enable-pcntl \
+		--enable-phar=shared \
+		--enable-posix=shared \
+		--enable-shmop=shared \
+		--enable-soap=shared \
+		--enable-sockets=shared \
+		--enable-sysvmsg=shared \
+		--enable-sysvsem=shared \
+		--enable-sysvshm=shared \
+		--enable-mysqlnd \
+		--enable-gd=shared \
+		--with-external-gd \
+		--with-ffi=shared \
+		--with-bz2=shared,$XBPS_CROSS_BASE/usr/ \
+		--with-curl=shared \
+		--with-db4=$XBPS_CROSS_BASE/usr \
+		--with-enchant=shared,$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-sodium=shared \
+		--with-mhash \
+		--with-mysql-sock=/run/mysqld/mysqld.sock \
+		--with-mysqli=shared,mysqlnd \
+		--with-openssl=shared \
+		--with-external-pcre \
+		--with-pear=/usr/share/pear${_php_version} \
+		--with-pdo-mysql=shared,mysqlnd \
+		--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-sqlite3=shared,$XBPS_CROSS_BASE/usr \
+		--with-unixODBC=shared,$XBPS_CROSS_BASE/usr \
+		--with-xsl=shared,$XBPS_CROSS_BASE/usr \
+		--with-tidy=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} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--enable-cgi \
+		--enable-fpm \
+		--with-fpm-user=_phpfpm \
+		--with-fpm-group=_phpfpm \
+		--with-fpm-acl \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	cd ${wrksrc}/build-apache
+	ln -s ${wrksrc}/configure
+	./configure ${_phpconfig} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--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 00000000000000..30e9d7f2873442
--- /dev/null
+++ b/srcpkgs/php8.4/update
@@ -0,0 +1,3 @@
+pkgname=php
+ignore="8.[5-9].*"
+site="https://www.php.net/distributions/"

From 6fde221b0c205396ea86e92b6ff6f08d49949975 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:17 -0500
Subject: [PATCH 02/10] New package: php8.4-apcu-5.1.24

---
 srcpkgs/php8.4-apcu/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-apcu/template               | 29 ++++++++++++++++++++++
 srcpkgs/php8.4-apcu/update                 |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.4-apcu/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-apcu/template
 create mode 100644 srcpkgs/php8.4-apcu/update

diff --git a/srcpkgs/php8.4-apcu/files/README.voidlinux b/srcpkgs/php8.4-apcu/files/README.voidlinux
new file mode 100644
index 00000000000000..9da8a70ccc2ba9
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.4-apcu/template b/srcpkgs/php8.4-apcu/template
new file mode 100644
index 00000000000000..983fe2e4f775d8
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-apcu'
+pkgname=php8.4-apcu
+version=5.1.24
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target=test
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel pcre2-devel"
+depends="php8.4"
+short_desc="In-memory key-value store for PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=5c28a55b27082c69657e25b7ecf553e2cf6b74ec3fa77d6b76f4fb982e001e43
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-apcu/update b/srcpkgs/php8.4-apcu/update
new file mode 100644
index 00000000000000..ad899519e31382
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 545c6e04aa0f6637d16e2f6ef3de5b78fd1abbd3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:19 -0500
Subject: [PATCH 03/10] New package: php8.4-ast-1.1.2

---
 srcpkgs/php8.4-ast/files/README.voidlinux |  2 ++
 srcpkgs/php8.4-ast/template               | 28 +++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 srcpkgs/php8.4-ast/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-ast/template

diff --git a/srcpkgs/php8.4-ast/files/README.voidlinux b/srcpkgs/php8.4-ast/files/README.voidlinux
new file mode 100644
index 00000000000000..40e14f32f8f635
--- /dev/null
+++ b/srcpkgs/php8.4-ast/files/README.voidlinux
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so
diff --git a/srcpkgs/php8.4-ast/template b/srcpkgs/php8.4-ast/template
new file mode 100644
index 00000000000000..fbbeec05575832
--- /dev/null
+++ b/srcpkgs/php8.4-ast/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-ast'
+pkgname=php8.4-ast
+version=1.1.2
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target="test"
+hostmakedepends="php8.4-devel autoconf"
+makedepends="php8.4-devel"
+depends="php8.4"
+checkdepends="${depends}"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=8742427ff7c07ba93f940968f7363972ea040d97d847da3b79b4283c2a369dea
+make_check_pre="env NO_INTERACTION=1"
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}

From 92ab5223c071794928246cc4595bd5ca95f2d87f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:20 -0500
Subject: [PATCH 04/10] New package: php8.4-igbinary-3.2.16

---
 srcpkgs/php8.4-igbinary/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/php8.4-igbinary/template

diff --git a/srcpkgs/php8.4-igbinary/template b/srcpkgs/php8.4-igbinary/template
new file mode 100644
index 00000000000000..c00b787aa90da9
--- /dev/null
+++ b/srcpkgs/php8.4-igbinary/template
@@ -0,0 +1,24 @@
+# Template file for 'php8.4-igbinary'
+pkgname=php8.4-igbinary
+version=3.2.16
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="Igbinary is a drop in replacement for the standard php serializer"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/igbinary/igbinary/"
+distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
+checksum=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT="${DESTDIR}" install
+	vlicense COPYING
+}

From 11c8a4dbdb39ea9f50955561682396a38c4b58be Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:22 -0500
Subject: [PATCH 05/10] New package: php8.4-imagick-3.7.0

---
 srcpkgs/php8.4-imagick/files/README.voidlinux |  3 ++
 ...le-libmagick-header-file-search-path.patch | 17 +++++++++++
 srcpkgs/php8.4-imagick/template               | 29 +++++++++++++++++++
 srcpkgs/php8.4-imagick/update                 |  1 +
 4 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/php8.4-imagick/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 create mode 100644 srcpkgs/php8.4-imagick/template
 create mode 100644 srcpkgs/php8.4-imagick/update

diff --git a/srcpkgs/php8.4-imagick/files/README.voidlinux b/srcpkgs/php8.4-imagick/files/README.voidlinux
new file mode 100644
index 00000000000000..00497519fcee5b
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Imagick extension add the following line to your php.ini:
+
+	extension=imagick.so
diff --git a/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 00000000000000..16b8aaa5737151
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
@@ -0,0 +1,17 @@
+--- a/imagemagick.m4	2021-09-09 10:53:42.287881616 +0200
++++ b/imagemagick.m4	2021-09-09 11:14:47.662312430 +0200
+@@ -167,6 +167,14 @@ AC_DEFUN([IM_FIND_IMAGEMAGICK],[
+   
+     AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h])
+ 
++  elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
++
++    IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
++    IM_HEADER_STYLE="SEVEN"
++    AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header])
++
++    AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h])
++
+   elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
+ 
+     IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
diff --git a/srcpkgs/php8.4-imagick/template b/srcpkgs/php8.4-imagick/template
new file mode 100644
index 00000000000000..4993c5d515ba3a
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-imagick'
+pkgname=php8.4-imagick
+version=3.7.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel libmagick-devel"
+depends="php8.4"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/imagick"
+distfiles="https://pecl.php.net/get/imagick-$version.tgz"
+checksum=5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-imagick/update b/srcpkgs/php8.4-imagick/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From a3ae8254e20c318882bb734e395d948891cb324d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:23 -0500
Subject: [PATCH 06/10] New package: php8.4-mongodb-1.20.1

---
 srcpkgs/php8.4-mongodb/files/README.voidlinux |  3 ++
 srcpkgs/php8.4-mongodb/template               | 28 +++++++++++++++++++
 srcpkgs/php8.4-mongodb/update                 |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/php8.4-mongodb/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-mongodb/template
 create mode 100644 srcpkgs/php8.4-mongodb/update

diff --git a/srcpkgs/php8.4-mongodb/files/README.voidlinux b/srcpkgs/php8.4-mongodb/files/README.voidlinux
new file mode 100644
index 00000000000000..173fab80af8df0
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the MongoDB extension add the following line to your php.ini:
+
+	extension=mongodb
diff --git a/srcpkgs/php8.4-mongodb/template b/srcpkgs/php8.4-mongodb/template
new file mode 100644
index 00000000000000..56fa4c0ba0566f
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-mongodb'
+pkgname=php8.4-mongodb
+version=1.20.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel openssl-devel"
+depends="php8.4"
+short_desc="Official MongoDB PHP driver"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="Apache-2.0"
+homepage="https://pecl.php.net/package/mongodb"
+changelog="https://pecl.php.net/package-changelog.php?package=mongodb"
+distfiles="https://pecl.php.net/get/mongodb-$version.tgz"
+checksum=614e57594918feb621f525e6516d59ce09b78f5172355ba8afb6c2207c1ce900
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-mongodb/update b/srcpkgs/php8.4-mongodb/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From e6e84d7fc7ef026703db67f2e4dc7ae33f7a8eae Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:24 -0500
Subject: [PATCH 07/10] New package: php8.4-redis-6.1.0

---
 srcpkgs/php8.4-redis/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-redis/template               | 27 +++++++++++++++++++++
 srcpkgs/php8.4-redis/update                 |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/php8.4-redis/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-redis/template
 create mode 100644 srcpkgs/php8.4-redis/update

diff --git a/srcpkgs/php8.4-redis/files/README.voidlinux b/srcpkgs/php8.4-redis/files/README.voidlinux
new file mode 100644
index 00000000000000..2a9de04b421e15
--- /dev/null
+++ b/srcpkgs/php8.4-redis/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Redis extension add the following line to your php.ini:
+
+	extension=redis
diff --git a/srcpkgs/php8.4-redis/template b/srcpkgs/php8.4-redis/template
new file mode 100644
index 00000000000000..6777e759d3d247
--- /dev/null
+++ b/srcpkgs/php8.4-redis/template
@@ -0,0 +1,27 @@
+# Template file for 'php8.4-redis'
+pkgname=php8.4-redis
+version=6.1.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="PHP extension for Redis"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/redis"
+distfiles="https://pecl.php.net/get/redis-$version.tgz"
+checksum=f10405f639fe415e9ed4ec99538e72c90694d8dbd62868edcfcd6a453466b48c
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc $FILESDIR/README.voidlinux
+}
diff --git a/srcpkgs/php8.4-redis/update b/srcpkgs/php8.4-redis/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-redis/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 5b2e60d1e69fb27d7d3cd1decf4f2424230f5599 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:32 -0500
Subject: [PATCH 08/10] New package: xdebug8.4-3.4.1

---
 srcpkgs/xdebug8.4/files/README.voidlinux |  1 +
 srcpkgs/xdebug8.4/template               | 25 ++++++++++++++++++++++++
 srcpkgs/xdebug8.4/update                 |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/xdebug8.4/files/README.voidlinux
 create mode 100644 srcpkgs/xdebug8.4/template
 create mode 100644 srcpkgs/xdebug8.4/update

diff --git a/srcpkgs/xdebug8.4/files/README.voidlinux b/srcpkgs/xdebug8.4/files/README.voidlinux
new file mode 100644
index 00000000000000..04e3343216f7f1
--- /dev/null
+++ b/srcpkgs/xdebug8.4/files/README.voidlinux
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.4/template b/srcpkgs/xdebug8.4/template
new file mode 100644
index 00000000000000..e8400dd3437680
--- /dev/null
+++ b/srcpkgs/xdebug8.4/template
@@ -0,0 +1,25 @@
+# Template file for 'xdebug8.4'
+pkgname=xdebug8.4
+version=3.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+short_desc="PHP debugging extension"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4d96bcded78dbd271fb344c119171b625a8597cd67fc6899ec5e019549f1bb87
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/xdebug8.4/update b/srcpkgs/xdebug8.4/update
new file mode 100644
index 00000000000000..280b0bc7e3ac92
--- /dev/null
+++ b/srcpkgs/xdebug8.4/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From 8d1cd50cde413cbcae117bf2340147b2bd44d26c Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Fri, 10 Jan 2025 11:06:08 -0500
Subject: [PATCH 09/10] New package: composer8.4-2.8.4

---
 srcpkgs/composer8.4/files/composer8.4 |  2 ++
 srcpkgs/composer8.4/template          | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 srcpkgs/composer8.4/files/composer8.4
 create mode 100644 srcpkgs/composer8.4/template

diff --git a/srcpkgs/composer8.4/files/composer8.4 b/srcpkgs/composer8.4/files/composer8.4
new file mode 100644
index 00000000000000..e1d0d9df347353
--- /dev/null
+++ b/srcpkgs/composer8.4/files/composer8.4
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.4 /usr/libexec/composer.phar8.4 "$@"
diff --git a/srcpkgs/composer8.4/template b/srcpkgs/composer8.4/template
new file mode 100644
index 00000000000000..1045b916010932
--- /dev/null
+++ b/srcpkgs/composer8.4/template
@@ -0,0 +1,27 @@
+# Template file for 'composer8.4'
+pkgname=composer8.4
+version=2.8.4
+revision=1
+build_style=fetch
+depends="php8.4"
+short_desc="Dependency manager for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://getcomposer.org/"
+changelog="https://raw.githubusercontent.com/composer/composer/main/CHANGELOG.md"
+distfiles="https://github.com/composer/composer/releases/download/${version}/composer.phar
+ https://raw.githubusercontent.com/composer/composer/main/LICENSE"
+checksum="c4c4e2e1beab0ea04e0bd042a5dbba9feda1fbf5eda0d36203958edd343c0a8a
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.4"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.4
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.4
+	vlicense LICENSE
+
+	vmkdir /etc/php8.4/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.4/conf.d/composer.ini
+}

From f3ee41baa4e0c9265e9f135009d503aceecb7f4e Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:12 -0500
Subject: [PATCH 10/10] php: update to 8.4.

---
 srcpkgs/php/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index d04d1369746fd5..5eba95db516833 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,7 +1,7 @@
 # Template file for 'php'
 pkgname=php
-version=8.3
-revision=2
+version=8.4
+revision=1
 build_style=meta
 depends="php${version}"
 short_desc="Meta package for PHP"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [wip] php8.4
  2025-01-10 15:42 [PR PATCH] [wip] php8.4 TinfoilSubmarine
  2025-01-10 16:06 ` [PR PATCH] [Updated] " TinfoilSubmarine
  2025-01-10 16:25 ` TinfoilSubmarine
@ 2025-01-10 17:31 ` TinfoilSubmarine
  2025-01-10 18:40 ` TinfoilSubmarine
  2025-01-10 19:04 ` TinfoilSubmarine
  4 siblings, 0 replies; 6+ messages in thread
From: TinfoilSubmarine @ 2025-01-10 17:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/php8.4
https://github.com/void-linux/void-packages/pull/53915

[wip] php8.4
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

I had to modify the `do_build` of `php8.4` compared to the previous versions due to a build failure when trying to reuse the build directory for building the apache parts.

A patch file from https://github.com/void-linux/void-packages/pull/53915.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/php8.4-53915.patch --]
[-- Type: text/x-diff, Size: 51024 bytes --]

From 6abb52d398897e94d96cccca513d80906a9b76e4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:26 -0500
Subject: [PATCH 01/10] New package: php8.4-8.4.2

---
 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 +
 .../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                       | 382 ++++++++++++++++++
 srcpkgs/php8.4/update                         |   3 +
 33 files changed, 693 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/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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..bc57ba73dbcdf3
--- /dev/null
+++ b/srcpkgs/php8.4/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php_module
+
+<IfModule dir_module>
+	<IfModule php_module>
+		DirectoryIndex index.php index.html
+		<FilesMatch "\.php$">
+			SetHandler application/x-httpd-php
+		</FilesMatch>
+		<FilesMatch "\.phps$">
+			SetHandler application/x-httpd-php-source
+		</FilesMatch>
+	</IfModule>
+</IfModule>
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 00000000000000..dee7b386a7e5be
--- /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/cross-gdImageCreateFrom.patch b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch
new file mode 100644
index 00000000000000..35af5bda896931
--- /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 <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -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 00000000000000..a6447ac150221e
--- /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 00000000000000..f9191a50a0b58c
--- /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 00000000000000..1e4e627ec65b96
--- /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 00000000000000..8d4c37941c3c12
--- /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 00000000000000..b83a7ab9bc1e49
--- /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 00000000000000..5e55e179f8a4a0
--- /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 00000000000000..d87b0265421996
--- /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 00000000000000..a3143e89a9ee3a
--- /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 00000000000000..9f04343c009116
--- /dev/null
+++ b/srcpkgs/php8.4/template
@@ -0,0 +1,382 @@
+# Template file for 'php8.4'
+# rebuild php8.4-apcu and php8.4-imagick when updating this package
+pkgname=php8.4
+version=8.4.2
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+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=5d3cf82a7f4cafdcfc4f3d98f3e3ee81077ae57c709a5613cbff5834d78a7747
+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} postgresql-libs-devel"
+	CFLAGS+=" -DHAVE_LIBDL
+		 -DHAVE_DLOPEN
+		 -DHAVE_DLSYM
+		 -DHAVE_SHM_IPC
+		 -DHAVE_SHM_MMAP_ANON
+		 -DHAVE_SHM_MMAP_ZERO
+		 -DHAVE_SHM_MMAP_POSIX
+		 -DHAVE_SHM_MMAP_FILE"
+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
+	# create a separate build directory for apache
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+
+}
+
+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} \
+		"
+
+	local _phpextensions="--enable-bcmath=shared \
+		--enable-calendar=shared \
+		--enable-exif=shared \
+		--enable-ftp=shared \
+		--enable-intl=shared \
+		--enable-mbstring \
+		--enable-opcache \
+		--enable-pcntl \
+		--enable-phar=shared \
+		--enable-posix=shared \
+		--enable-shmop=shared \
+		--enable-soap=shared \
+		--enable-sockets=shared \
+		--enable-sysvmsg=shared \
+		--enable-sysvsem=shared \
+		--enable-sysvshm=shared \
+		--enable-mysqlnd \
+		--enable-gd=shared \
+		--with-external-gd \
+		--with-ffi=shared \
+		--with-bz2=shared,$XBPS_CROSS_BASE/usr/ \
+		--with-curl=shared \
+		--with-db4=$XBPS_CROSS_BASE/usr \
+		--with-enchant=shared,$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-sodium=shared \
+		--with-mhash \
+		--with-mysql-sock=/run/mysqld/mysqld.sock \
+		--with-mysqli=shared,mysqlnd \
+		--with-openssl=shared \
+		--with-external-pcre \
+		--with-pear=/usr/share/pear${_php_version} \
+		--with-pdo-mysql=shared,mysqlnd \
+		--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-sqlite3=shared,$XBPS_CROSS_BASE/usr \
+		--with-unixODBC=shared,$XBPS_CROSS_BASE/usr \
+		--with-xsl=shared,$XBPS_CROSS_BASE/usr \
+		--with-tidy=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} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--enable-cgi \
+		--enable-fpm \
+		--with-fpm-user=_phpfpm \
+		--with-fpm-group=_phpfpm \
+		--with-fpm-acl \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	cd ${wrksrc}/build-apache
+	ln -s ${wrksrc}/configure
+	./configure ${_phpconfig} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--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 00000000000000..30e9d7f2873442
--- /dev/null
+++ b/srcpkgs/php8.4/update
@@ -0,0 +1,3 @@
+pkgname=php
+ignore="8.[5-9].*"
+site="https://www.php.net/distributions/"

From f6de863b9dc003c9dea65e9af96cc12f86ee24bd Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:17 -0500
Subject: [PATCH 02/10] New package: php8.4-apcu-5.1.24

---
 srcpkgs/php8.4-apcu/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-apcu/template               | 29 ++++++++++++++++++++++
 srcpkgs/php8.4-apcu/update                 |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.4-apcu/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-apcu/template
 create mode 100644 srcpkgs/php8.4-apcu/update

diff --git a/srcpkgs/php8.4-apcu/files/README.voidlinux b/srcpkgs/php8.4-apcu/files/README.voidlinux
new file mode 100644
index 00000000000000..9da8a70ccc2ba9
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.4-apcu/template b/srcpkgs/php8.4-apcu/template
new file mode 100644
index 00000000000000..983fe2e4f775d8
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-apcu'
+pkgname=php8.4-apcu
+version=5.1.24
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target=test
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel pcre2-devel"
+depends="php8.4"
+short_desc="In-memory key-value store for PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=5c28a55b27082c69657e25b7ecf553e2cf6b74ec3fa77d6b76f4fb982e001e43
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-apcu/update b/srcpkgs/php8.4-apcu/update
new file mode 100644
index 00000000000000..ad899519e31382
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 8fb3ad54dc1de86dc9801cbed1db612b68654557 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:19 -0500
Subject: [PATCH 03/10] New package: php8.4-ast-1.1.2

---
 srcpkgs/php8.4-ast/files/README.voidlinux |  2 ++
 srcpkgs/php8.4-ast/template               | 28 +++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 srcpkgs/php8.4-ast/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-ast/template

diff --git a/srcpkgs/php8.4-ast/files/README.voidlinux b/srcpkgs/php8.4-ast/files/README.voidlinux
new file mode 100644
index 00000000000000..40e14f32f8f635
--- /dev/null
+++ b/srcpkgs/php8.4-ast/files/README.voidlinux
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so
diff --git a/srcpkgs/php8.4-ast/template b/srcpkgs/php8.4-ast/template
new file mode 100644
index 00000000000000..fbbeec05575832
--- /dev/null
+++ b/srcpkgs/php8.4-ast/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-ast'
+pkgname=php8.4-ast
+version=1.1.2
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target="test"
+hostmakedepends="php8.4-devel autoconf"
+makedepends="php8.4-devel"
+depends="php8.4"
+checkdepends="${depends}"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=8742427ff7c07ba93f940968f7363972ea040d97d847da3b79b4283c2a369dea
+make_check_pre="env NO_INTERACTION=1"
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}

From ef412d22925beda84a1d505272095e35f1602713 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:20 -0500
Subject: [PATCH 04/10] New package: php8.4-igbinary-3.2.16

---
 srcpkgs/php8.4-igbinary/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/php8.4-igbinary/template

diff --git a/srcpkgs/php8.4-igbinary/template b/srcpkgs/php8.4-igbinary/template
new file mode 100644
index 00000000000000..c00b787aa90da9
--- /dev/null
+++ b/srcpkgs/php8.4-igbinary/template
@@ -0,0 +1,24 @@
+# Template file for 'php8.4-igbinary'
+pkgname=php8.4-igbinary
+version=3.2.16
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="Igbinary is a drop in replacement for the standard php serializer"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/igbinary/igbinary/"
+distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
+checksum=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT="${DESTDIR}" install
+	vlicense COPYING
+}

From 9063ac4927813522254876804247c2799e951897 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:22 -0500
Subject: [PATCH 05/10] New package: php8.4-imagick-3.7.0

---
 srcpkgs/php8.4-imagick/files/README.voidlinux |  3 ++
 ...le-libmagick-header-file-search-path.patch | 17 +++++++++++
 srcpkgs/php8.4-imagick/template               | 29 +++++++++++++++++++
 srcpkgs/php8.4-imagick/update                 |  1 +
 4 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/php8.4-imagick/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 create mode 100644 srcpkgs/php8.4-imagick/template
 create mode 100644 srcpkgs/php8.4-imagick/update

diff --git a/srcpkgs/php8.4-imagick/files/README.voidlinux b/srcpkgs/php8.4-imagick/files/README.voidlinux
new file mode 100644
index 00000000000000..00497519fcee5b
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Imagick extension add the following line to your php.ini:
+
+	extension=imagick.so
diff --git a/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 00000000000000..16b8aaa5737151
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
@@ -0,0 +1,17 @@
+--- a/imagemagick.m4	2021-09-09 10:53:42.287881616 +0200
++++ b/imagemagick.m4	2021-09-09 11:14:47.662312430 +0200
+@@ -167,6 +167,14 @@ AC_DEFUN([IM_FIND_IMAGEMAGICK],[
+   
+     AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h])
+ 
++  elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
++
++    IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
++    IM_HEADER_STYLE="SEVEN"
++    AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header])
++
++    AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h])
++
+   elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
+ 
+     IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
diff --git a/srcpkgs/php8.4-imagick/template b/srcpkgs/php8.4-imagick/template
new file mode 100644
index 00000000000000..4993c5d515ba3a
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-imagick'
+pkgname=php8.4-imagick
+version=3.7.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel libmagick-devel"
+depends="php8.4"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/imagick"
+distfiles="https://pecl.php.net/get/imagick-$version.tgz"
+checksum=5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-imagick/update b/srcpkgs/php8.4-imagick/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From bee0b082948cb1b9965c24a842b4500409f3c72f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:23 -0500
Subject: [PATCH 06/10] New package: php8.4-mongodb-1.20.1

---
 srcpkgs/php8.4-mongodb/files/README.voidlinux |  3 ++
 srcpkgs/php8.4-mongodb/template               | 28 +++++++++++++++++++
 srcpkgs/php8.4-mongodb/update                 |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/php8.4-mongodb/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-mongodb/template
 create mode 100644 srcpkgs/php8.4-mongodb/update

diff --git a/srcpkgs/php8.4-mongodb/files/README.voidlinux b/srcpkgs/php8.4-mongodb/files/README.voidlinux
new file mode 100644
index 00000000000000..173fab80af8df0
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the MongoDB extension add the following line to your php.ini:
+
+	extension=mongodb
diff --git a/srcpkgs/php8.4-mongodb/template b/srcpkgs/php8.4-mongodb/template
new file mode 100644
index 00000000000000..56fa4c0ba0566f
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-mongodb'
+pkgname=php8.4-mongodb
+version=1.20.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel openssl-devel"
+depends="php8.4"
+short_desc="Official MongoDB PHP driver"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="Apache-2.0"
+homepage="https://pecl.php.net/package/mongodb"
+changelog="https://pecl.php.net/package-changelog.php?package=mongodb"
+distfiles="https://pecl.php.net/get/mongodb-$version.tgz"
+checksum=614e57594918feb621f525e6516d59ce09b78f5172355ba8afb6c2207c1ce900
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-mongodb/update b/srcpkgs/php8.4-mongodb/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 701f6ee59d97d56009c6209c164d3be02d10da3d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:24 -0500
Subject: [PATCH 07/10] New package: php8.4-redis-6.1.0

---
 srcpkgs/php8.4-redis/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-redis/template               | 27 +++++++++++++++++++++
 srcpkgs/php8.4-redis/update                 |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/php8.4-redis/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-redis/template
 create mode 100644 srcpkgs/php8.4-redis/update

diff --git a/srcpkgs/php8.4-redis/files/README.voidlinux b/srcpkgs/php8.4-redis/files/README.voidlinux
new file mode 100644
index 00000000000000..2a9de04b421e15
--- /dev/null
+++ b/srcpkgs/php8.4-redis/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Redis extension add the following line to your php.ini:
+
+	extension=redis
diff --git a/srcpkgs/php8.4-redis/template b/srcpkgs/php8.4-redis/template
new file mode 100644
index 00000000000000..6777e759d3d247
--- /dev/null
+++ b/srcpkgs/php8.4-redis/template
@@ -0,0 +1,27 @@
+# Template file for 'php8.4-redis'
+pkgname=php8.4-redis
+version=6.1.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="PHP extension for Redis"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/redis"
+distfiles="https://pecl.php.net/get/redis-$version.tgz"
+checksum=f10405f639fe415e9ed4ec99538e72c90694d8dbd62868edcfcd6a453466b48c
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc $FILESDIR/README.voidlinux
+}
diff --git a/srcpkgs/php8.4-redis/update b/srcpkgs/php8.4-redis/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-redis/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From e61e26e1ca4b95586c5785607d1f3ea99f94ec50 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:32 -0500
Subject: [PATCH 08/10] New package: xdebug8.4-3.4.1

---
 srcpkgs/xdebug8.4/files/README.voidlinux |  1 +
 srcpkgs/xdebug8.4/template               | 25 ++++++++++++++++++++++++
 srcpkgs/xdebug8.4/update                 |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/xdebug8.4/files/README.voidlinux
 create mode 100644 srcpkgs/xdebug8.4/template
 create mode 100644 srcpkgs/xdebug8.4/update

diff --git a/srcpkgs/xdebug8.4/files/README.voidlinux b/srcpkgs/xdebug8.4/files/README.voidlinux
new file mode 100644
index 00000000000000..04e3343216f7f1
--- /dev/null
+++ b/srcpkgs/xdebug8.4/files/README.voidlinux
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.4/template b/srcpkgs/xdebug8.4/template
new file mode 100644
index 00000000000000..e8400dd3437680
--- /dev/null
+++ b/srcpkgs/xdebug8.4/template
@@ -0,0 +1,25 @@
+# Template file for 'xdebug8.4'
+pkgname=xdebug8.4
+version=3.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+short_desc="PHP debugging extension"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4d96bcded78dbd271fb344c119171b625a8597cd67fc6899ec5e019549f1bb87
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/xdebug8.4/update b/srcpkgs/xdebug8.4/update
new file mode 100644
index 00000000000000..280b0bc7e3ac92
--- /dev/null
+++ b/srcpkgs/xdebug8.4/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From aab4a569f89a218a6e0f4c2aedd02a4ad5c413b8 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Fri, 10 Jan 2025 11:06:08 -0500
Subject: [PATCH 09/10] New package: composer8.4-2.8.4

---
 srcpkgs/composer8.4/files/composer8.4 |  2 ++
 srcpkgs/composer8.4/template          | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 srcpkgs/composer8.4/files/composer8.4
 create mode 100644 srcpkgs/composer8.4/template

diff --git a/srcpkgs/composer8.4/files/composer8.4 b/srcpkgs/composer8.4/files/composer8.4
new file mode 100644
index 00000000000000..e1d0d9df347353
--- /dev/null
+++ b/srcpkgs/composer8.4/files/composer8.4
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.4 /usr/libexec/composer.phar8.4 "$@"
diff --git a/srcpkgs/composer8.4/template b/srcpkgs/composer8.4/template
new file mode 100644
index 00000000000000..1045b916010932
--- /dev/null
+++ b/srcpkgs/composer8.4/template
@@ -0,0 +1,27 @@
+# Template file for 'composer8.4'
+pkgname=composer8.4
+version=2.8.4
+revision=1
+build_style=fetch
+depends="php8.4"
+short_desc="Dependency manager for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://getcomposer.org/"
+changelog="https://raw.githubusercontent.com/composer/composer/main/CHANGELOG.md"
+distfiles="https://github.com/composer/composer/releases/download/${version}/composer.phar
+ https://raw.githubusercontent.com/composer/composer/main/LICENSE"
+checksum="c4c4e2e1beab0ea04e0bd042a5dbba9feda1fbf5eda0d36203958edd343c0a8a
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.4"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.4
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.4
+	vlicense LICENSE
+
+	vmkdir /etc/php8.4/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.4/conf.d/composer.ini
+}

From 053290bd22860a45e3c313eb6a8e23e19f3f943c Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:12 -0500
Subject: [PATCH 10/10] php: update to 8.4.

---
 srcpkgs/php/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index d04d1369746fd5..5eba95db516833 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,7 +1,7 @@
 # Template file for 'php'
 pkgname=php
-version=8.3
-revision=2
+version=8.4
+revision=1
 build_style=meta
 depends="php${version}"
 short_desc="Meta package for PHP"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [wip] php8.4
  2025-01-10 15:42 [PR PATCH] [wip] php8.4 TinfoilSubmarine
                   ` (2 preceding siblings ...)
  2025-01-10 17:31 ` TinfoilSubmarine
@ 2025-01-10 18:40 ` TinfoilSubmarine
  2025-01-10 19:04 ` TinfoilSubmarine
  4 siblings, 0 replies; 6+ messages in thread
From: TinfoilSubmarine @ 2025-01-10 18:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/php8.4
https://github.com/void-linux/void-packages/pull/53915

[wip] php8.4
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

I had to modify the `do_build` of `php8.4` compared to the previous versions due to a build failure when trying to reuse the build directory for building the apache parts.

A patch file from https://github.com/void-linux/void-packages/pull/53915.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/php8.4-53915.patch --]
[-- Type: text/x-diff, Size: 51862 bytes --]

From 0d7884c4e6157c2cb386ba3da1b7e639b0044fc0 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:26 -0500
Subject: [PATCH 01/10] New package: php8.4-8.4.2

---
 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 +
 srcpkgs/php8.4/patches/cross-configure.patch  |  13 +
 .../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                       | 382 ++++++++++++++++++
 srcpkgs/php8.4/update                         |   3 +
 34 files changed, 706 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/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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..bc57ba73dbcdf3
--- /dev/null
+++ b/srcpkgs/php8.4/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php_module
+
+<IfModule dir_module>
+	<IfModule php_module>
+		DirectoryIndex index.php index.html
+		<FilesMatch "\.php$">
+			SetHandler application/x-httpd-php
+		</FilesMatch>
+		<FilesMatch "\.phps$">
+			SetHandler application/x-httpd-php-source
+		</FilesMatch>
+	</IfModule>
+</IfModule>
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 00000000000000..dee7b386a7e5be
--- /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/cross-configure.patch b/srcpkgs/php8.4/patches/cross-configure.patch
new file mode 100644
index 00000000000000..a77062c0636236
--- /dev/null
+++ b/srcpkgs/php8.4/patches/cross-configure.patch
@@ -0,0 +1,13 @@
+diff --git a/build/php.m4 b/build/php.m4
+index e45b22b..e3894b4 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -1958,7 +1958,7 @@ 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([not found])
+     AS_VAR_IF([pgsql_dir],,
+       [pgsql_search_paths="/usr /usr/local /usr/local/pgsql"],
diff --git a/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch b/srcpkgs/php8.4/patches/cross-gdImageCreateFrom.patch
new file mode 100644
index 00000000000000..35af5bda896931
--- /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 <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -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 00000000000000..a6447ac150221e
--- /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 00000000000000..f9191a50a0b58c
--- /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 00000000000000..1e4e627ec65b96
--- /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 00000000000000..8d4c37941c3c12
--- /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 00000000000000..b83a7ab9bc1e49
--- /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 00000000000000..5e55e179f8a4a0
--- /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 00000000000000..d87b0265421996
--- /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 00000000000000..a3143e89a9ee3a
--- /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 00000000000000..3cf4b63851495c
--- /dev/null
+++ b/srcpkgs/php8.4/template
@@ -0,0 +1,382 @@
+# Template file for 'php8.4'
+# rebuild php8.4-apcu and php8.4-imagick when updating this package
+pkgname=php8.4
+version=8.4.2
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+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=5d3cf82a7f4cafdcfc4f3d98f3e3ee81077ae57c709a5613cbff5834d78a7747
+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_DLOPEN
+		 -DHAVE_DLSYM
+		 -DHAVE_SHM_IPC
+		 -DHAVE_SHM_MMAP_ANON
+		 -DHAVE_SHM_MMAP_ZERO
+		 -DHAVE_SHM_MMAP_POSIX
+		 -DHAVE_SHM_MMAP_FILE"
+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
+	# create a separate build directory for apache
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+
+}
+
+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} \
+		"
+
+	local _phpextensions="--enable-bcmath=shared \
+		--enable-calendar=shared \
+		--enable-exif=shared \
+		--enable-ftp=shared \
+		--enable-intl=shared \
+		--enable-mbstring \
+		--enable-opcache \
+		--enable-pcntl \
+		--enable-phar=shared \
+		--enable-posix=shared \
+		--enable-shmop=shared \
+		--enable-soap=shared \
+		--enable-sockets=shared \
+		--enable-sysvmsg=shared \
+		--enable-sysvsem=shared \
+		--enable-sysvshm=shared \
+		--enable-mysqlnd \
+		--enable-gd=shared \
+		--with-external-gd \
+		--with-ffi=shared \
+		--with-bz2=shared,$XBPS_CROSS_BASE/usr/ \
+		--with-curl=shared \
+		--with-db4=$XBPS_CROSS_BASE/usr \
+		--with-enchant=shared,$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-sodium=shared \
+		--with-mhash \
+		--with-mysql-sock=/run/mysqld/mysqld.sock \
+		--with-mysqli=shared,mysqlnd \
+		--with-openssl=shared \
+		--with-external-pcre \
+		--with-pear=/usr/share/pear${_php_version} \
+		--with-pdo-mysql=shared,mysqlnd \
+		--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-sqlite3=shared,$XBPS_CROSS_BASE/usr \
+		--with-unixODBC=shared,$XBPS_CROSS_BASE/usr \
+		--with-xsl=shared,$XBPS_CROSS_BASE/usr \
+		--with-tidy=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} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--enable-cgi \
+		--enable-fpm \
+		--with-fpm-user=_phpfpm \
+		--with-fpm-group=_phpfpm \
+		--with-fpm-acl \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	cd ${wrksrc}/build-apache
+	ln -s ${wrksrc}/configure
+	./configure ${_phpconfig} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--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 00000000000000..30e9d7f2873442
--- /dev/null
+++ b/srcpkgs/php8.4/update
@@ -0,0 +1,3 @@
+pkgname=php
+ignore="8.[5-9].*"
+site="https://www.php.net/distributions/"

From bc4db85ccb908d5917bcb6f80e5ffc387236389c Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:17 -0500
Subject: [PATCH 02/10] New package: php8.4-apcu-5.1.24

---
 srcpkgs/php8.4-apcu/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-apcu/template               | 29 ++++++++++++++++++++++
 srcpkgs/php8.4-apcu/update                 |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.4-apcu/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-apcu/template
 create mode 100644 srcpkgs/php8.4-apcu/update

diff --git a/srcpkgs/php8.4-apcu/files/README.voidlinux b/srcpkgs/php8.4-apcu/files/README.voidlinux
new file mode 100644
index 00000000000000..9da8a70ccc2ba9
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.4-apcu/template b/srcpkgs/php8.4-apcu/template
new file mode 100644
index 00000000000000..983fe2e4f775d8
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-apcu'
+pkgname=php8.4-apcu
+version=5.1.24
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target=test
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel pcre2-devel"
+depends="php8.4"
+short_desc="In-memory key-value store for PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=5c28a55b27082c69657e25b7ecf553e2cf6b74ec3fa77d6b76f4fb982e001e43
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-apcu/update b/srcpkgs/php8.4-apcu/update
new file mode 100644
index 00000000000000..ad899519e31382
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 1ba010ecb7312a4717ba140fb099bcbbae386db0 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:19 -0500
Subject: [PATCH 03/10] New package: php8.4-ast-1.1.2

---
 srcpkgs/php8.4-ast/files/README.voidlinux |  2 ++
 srcpkgs/php8.4-ast/template               | 28 +++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 srcpkgs/php8.4-ast/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-ast/template

diff --git a/srcpkgs/php8.4-ast/files/README.voidlinux b/srcpkgs/php8.4-ast/files/README.voidlinux
new file mode 100644
index 00000000000000..40e14f32f8f635
--- /dev/null
+++ b/srcpkgs/php8.4-ast/files/README.voidlinux
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so
diff --git a/srcpkgs/php8.4-ast/template b/srcpkgs/php8.4-ast/template
new file mode 100644
index 00000000000000..fbbeec05575832
--- /dev/null
+++ b/srcpkgs/php8.4-ast/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-ast'
+pkgname=php8.4-ast
+version=1.1.2
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target="test"
+hostmakedepends="php8.4-devel autoconf"
+makedepends="php8.4-devel"
+depends="php8.4"
+checkdepends="${depends}"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=8742427ff7c07ba93f940968f7363972ea040d97d847da3b79b4283c2a369dea
+make_check_pre="env NO_INTERACTION=1"
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}

From 49c25cfac4ce5f42e0b865c665249b3f7e8b1fb8 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:20 -0500
Subject: [PATCH 04/10] New package: php8.4-igbinary-3.2.16

---
 srcpkgs/php8.4-igbinary/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/php8.4-igbinary/template

diff --git a/srcpkgs/php8.4-igbinary/template b/srcpkgs/php8.4-igbinary/template
new file mode 100644
index 00000000000000..c00b787aa90da9
--- /dev/null
+++ b/srcpkgs/php8.4-igbinary/template
@@ -0,0 +1,24 @@
+# Template file for 'php8.4-igbinary'
+pkgname=php8.4-igbinary
+version=3.2.16
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="Igbinary is a drop in replacement for the standard php serializer"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/igbinary/igbinary/"
+distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
+checksum=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT="${DESTDIR}" install
+	vlicense COPYING
+}

From 93ed49e7a2ea6248ad44a15878a3b163b8d98c7f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:22 -0500
Subject: [PATCH 05/10] New package: php8.4-imagick-3.7.0

---
 srcpkgs/php8.4-imagick/files/README.voidlinux |  3 ++
 ...le-libmagick-header-file-search-path.patch | 17 +++++++++++
 srcpkgs/php8.4-imagick/template               | 29 +++++++++++++++++++
 srcpkgs/php8.4-imagick/update                 |  1 +
 4 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/php8.4-imagick/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 create mode 100644 srcpkgs/php8.4-imagick/template
 create mode 100644 srcpkgs/php8.4-imagick/update

diff --git a/srcpkgs/php8.4-imagick/files/README.voidlinux b/srcpkgs/php8.4-imagick/files/README.voidlinux
new file mode 100644
index 00000000000000..00497519fcee5b
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Imagick extension add the following line to your php.ini:
+
+	extension=imagick.so
diff --git a/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 00000000000000..16b8aaa5737151
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
@@ -0,0 +1,17 @@
+--- a/imagemagick.m4	2021-09-09 10:53:42.287881616 +0200
++++ b/imagemagick.m4	2021-09-09 11:14:47.662312430 +0200
+@@ -167,6 +167,14 @@ AC_DEFUN([IM_FIND_IMAGEMAGICK],[
+   
+     AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h])
+ 
++  elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
++
++    IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
++    IM_HEADER_STYLE="SEVEN"
++    AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header])
++
++    AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h])
++
+   elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
+ 
+     IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
diff --git a/srcpkgs/php8.4-imagick/template b/srcpkgs/php8.4-imagick/template
new file mode 100644
index 00000000000000..4993c5d515ba3a
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-imagick'
+pkgname=php8.4-imagick
+version=3.7.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel libmagick-devel"
+depends="php8.4"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/imagick"
+distfiles="https://pecl.php.net/get/imagick-$version.tgz"
+checksum=5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-imagick/update b/srcpkgs/php8.4-imagick/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 5d5aaa4002b11bad86eb2d8db2d9648690802915 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:23 -0500
Subject: [PATCH 06/10] New package: php8.4-mongodb-1.20.1

---
 srcpkgs/php8.4-mongodb/files/README.voidlinux |  3 ++
 srcpkgs/php8.4-mongodb/template               | 28 +++++++++++++++++++
 srcpkgs/php8.4-mongodb/update                 |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/php8.4-mongodb/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-mongodb/template
 create mode 100644 srcpkgs/php8.4-mongodb/update

diff --git a/srcpkgs/php8.4-mongodb/files/README.voidlinux b/srcpkgs/php8.4-mongodb/files/README.voidlinux
new file mode 100644
index 00000000000000..173fab80af8df0
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the MongoDB extension add the following line to your php.ini:
+
+	extension=mongodb
diff --git a/srcpkgs/php8.4-mongodb/template b/srcpkgs/php8.4-mongodb/template
new file mode 100644
index 00000000000000..56fa4c0ba0566f
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-mongodb'
+pkgname=php8.4-mongodb
+version=1.20.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel openssl-devel"
+depends="php8.4"
+short_desc="Official MongoDB PHP driver"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="Apache-2.0"
+homepage="https://pecl.php.net/package/mongodb"
+changelog="https://pecl.php.net/package-changelog.php?package=mongodb"
+distfiles="https://pecl.php.net/get/mongodb-$version.tgz"
+checksum=614e57594918feb621f525e6516d59ce09b78f5172355ba8afb6c2207c1ce900
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-mongodb/update b/srcpkgs/php8.4-mongodb/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 3ade723350946ce6f86993c64d4383305a22e4b7 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:24 -0500
Subject: [PATCH 07/10] New package: php8.4-redis-6.1.0

---
 srcpkgs/php8.4-redis/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-redis/template               | 27 +++++++++++++++++++++
 srcpkgs/php8.4-redis/update                 |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/php8.4-redis/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-redis/template
 create mode 100644 srcpkgs/php8.4-redis/update

diff --git a/srcpkgs/php8.4-redis/files/README.voidlinux b/srcpkgs/php8.4-redis/files/README.voidlinux
new file mode 100644
index 00000000000000..2a9de04b421e15
--- /dev/null
+++ b/srcpkgs/php8.4-redis/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Redis extension add the following line to your php.ini:
+
+	extension=redis
diff --git a/srcpkgs/php8.4-redis/template b/srcpkgs/php8.4-redis/template
new file mode 100644
index 00000000000000..6777e759d3d247
--- /dev/null
+++ b/srcpkgs/php8.4-redis/template
@@ -0,0 +1,27 @@
+# Template file for 'php8.4-redis'
+pkgname=php8.4-redis
+version=6.1.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="PHP extension for Redis"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/redis"
+distfiles="https://pecl.php.net/get/redis-$version.tgz"
+checksum=f10405f639fe415e9ed4ec99538e72c90694d8dbd62868edcfcd6a453466b48c
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc $FILESDIR/README.voidlinux
+}
diff --git a/srcpkgs/php8.4-redis/update b/srcpkgs/php8.4-redis/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-redis/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From dd55af26fabf5ac32ce532a1b4cb0234035fd7c3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:32 -0500
Subject: [PATCH 08/10] New package: xdebug8.4-3.4.1

---
 srcpkgs/xdebug8.4/files/README.voidlinux |  1 +
 srcpkgs/xdebug8.4/template               | 25 ++++++++++++++++++++++++
 srcpkgs/xdebug8.4/update                 |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/xdebug8.4/files/README.voidlinux
 create mode 100644 srcpkgs/xdebug8.4/template
 create mode 100644 srcpkgs/xdebug8.4/update

diff --git a/srcpkgs/xdebug8.4/files/README.voidlinux b/srcpkgs/xdebug8.4/files/README.voidlinux
new file mode 100644
index 00000000000000..04e3343216f7f1
--- /dev/null
+++ b/srcpkgs/xdebug8.4/files/README.voidlinux
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.4/template b/srcpkgs/xdebug8.4/template
new file mode 100644
index 00000000000000..e8400dd3437680
--- /dev/null
+++ b/srcpkgs/xdebug8.4/template
@@ -0,0 +1,25 @@
+# Template file for 'xdebug8.4'
+pkgname=xdebug8.4
+version=3.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+short_desc="PHP debugging extension"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4d96bcded78dbd271fb344c119171b625a8597cd67fc6899ec5e019549f1bb87
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/xdebug8.4/update b/srcpkgs/xdebug8.4/update
new file mode 100644
index 00000000000000..280b0bc7e3ac92
--- /dev/null
+++ b/srcpkgs/xdebug8.4/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From 269329f87508efd09478c77d90b2775dc662925e Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Fri, 10 Jan 2025 11:06:08 -0500
Subject: [PATCH 09/10] New package: composer8.4-2.8.4

---
 srcpkgs/composer8.4/files/composer8.4 |  2 ++
 srcpkgs/composer8.4/template          | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 srcpkgs/composer8.4/files/composer8.4
 create mode 100644 srcpkgs/composer8.4/template

diff --git a/srcpkgs/composer8.4/files/composer8.4 b/srcpkgs/composer8.4/files/composer8.4
new file mode 100644
index 00000000000000..e1d0d9df347353
--- /dev/null
+++ b/srcpkgs/composer8.4/files/composer8.4
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.4 /usr/libexec/composer.phar8.4 "$@"
diff --git a/srcpkgs/composer8.4/template b/srcpkgs/composer8.4/template
new file mode 100644
index 00000000000000..1045b916010932
--- /dev/null
+++ b/srcpkgs/composer8.4/template
@@ -0,0 +1,27 @@
+# Template file for 'composer8.4'
+pkgname=composer8.4
+version=2.8.4
+revision=1
+build_style=fetch
+depends="php8.4"
+short_desc="Dependency manager for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://getcomposer.org/"
+changelog="https://raw.githubusercontent.com/composer/composer/main/CHANGELOG.md"
+distfiles="https://github.com/composer/composer/releases/download/${version}/composer.phar
+ https://raw.githubusercontent.com/composer/composer/main/LICENSE"
+checksum="c4c4e2e1beab0ea04e0bd042a5dbba9feda1fbf5eda0d36203958edd343c0a8a
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.4"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.4
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.4
+	vlicense LICENSE
+
+	vmkdir /etc/php8.4/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.4/conf.d/composer.ini
+}

From 366ad781b5a75b3b384fb8622bec90f3f8f5a6b1 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:12 -0500
Subject: [PATCH 10/10] php: update to 8.4.

---
 srcpkgs/php/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index d04d1369746fd5..5eba95db516833 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,7 +1,7 @@
 # Template file for 'php'
 pkgname=php
-version=8.3
-revision=2
+version=8.4
+revision=1
 build_style=meta
 depends="php${version}"
 short_desc="Meta package for PHP"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [wip] php8.4
  2025-01-10 15:42 [PR PATCH] [wip] php8.4 TinfoilSubmarine
                   ` (3 preceding siblings ...)
  2025-01-10 18:40 ` TinfoilSubmarine
@ 2025-01-10 19:04 ` TinfoilSubmarine
  4 siblings, 0 replies; 6+ messages in thread
From: TinfoilSubmarine @ 2025-01-10 19:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/php8.4
https://github.com/void-linux/void-packages/pull/53915

[wip] php8.4
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

I had to modify the `do_build` of `php8.4` compared to the previous versions due to a build failure when trying to reuse the build directory for building the apache parts.

A patch file from https://github.com/void-linux/void-packages/pull/53915.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/php8.4-53915.patch --]
[-- Type: text/x-diff, Size: 52327 bytes --]

From f3802e3194c12e604cf30e1797b93fd17fd3c26f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:26 -0500
Subject: [PATCH 01/10] New package: php8.4-8.4.2

---
 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 +
 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                       | 382 ++++++++++++++++++
 srcpkgs/php8.4/update                         |   3 +
 34 files changed, 721 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/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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..969268fed31266
--- /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 00000000000000..bc57ba73dbcdf3
--- /dev/null
+++ b/srcpkgs/php8.4/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php_module
+
+<IfModule dir_module>
+	<IfModule php_module>
+		DirectoryIndex index.php index.html
+		<FilesMatch "\.php$">
+			SetHandler application/x-httpd-php
+		</FilesMatch>
+		<FilesMatch "\.phps$">
+			SetHandler application/x-httpd-php-source
+		</FilesMatch>
+	</IfModule>
+</IfModule>
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 00000000000000..dee7b386a7e5be
--- /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/cross-configure.patch b/srcpkgs/php8.4/patches/cross-configure.patch
new file mode 100644
index 00000000000000..dcf21589c9e794
--- /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 e45b22b..a37fd4f 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -1958,7 +1958,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"],
+@@ -1974,10 +1978,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 00000000000000..35af5bda896931
--- /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 <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -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 00000000000000..a6447ac150221e
--- /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 00000000000000..f9191a50a0b58c
--- /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 00000000000000..1e4e627ec65b96
--- /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 00000000000000..8d4c37941c3c12
--- /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 00000000000000..b83a7ab9bc1e49
--- /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 00000000000000..5e55e179f8a4a0
--- /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 00000000000000..d87b0265421996
--- /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 00000000000000..a3143e89a9ee3a
--- /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 00000000000000..3cf4b63851495c
--- /dev/null
+++ b/srcpkgs/php8.4/template
@@ -0,0 +1,382 @@
+# Template file for 'php8.4'
+# rebuild php8.4-apcu and php8.4-imagick when updating this package
+pkgname=php8.4
+version=8.4.2
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+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=5d3cf82a7f4cafdcfc4f3d98f3e3ee81077ae57c709a5613cbff5834d78a7747
+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_DLOPEN
+		 -DHAVE_DLSYM
+		 -DHAVE_SHM_IPC
+		 -DHAVE_SHM_MMAP_ANON
+		 -DHAVE_SHM_MMAP_ZERO
+		 -DHAVE_SHM_MMAP_POSIX
+		 -DHAVE_SHM_MMAP_FILE"
+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
+	# create a separate build directory for apache
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+
+}
+
+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} \
+		"
+
+	local _phpextensions="--enable-bcmath=shared \
+		--enable-calendar=shared \
+		--enable-exif=shared \
+		--enable-ftp=shared \
+		--enable-intl=shared \
+		--enable-mbstring \
+		--enable-opcache \
+		--enable-pcntl \
+		--enable-phar=shared \
+		--enable-posix=shared \
+		--enable-shmop=shared \
+		--enable-soap=shared \
+		--enable-sockets=shared \
+		--enable-sysvmsg=shared \
+		--enable-sysvsem=shared \
+		--enable-sysvshm=shared \
+		--enable-mysqlnd \
+		--enable-gd=shared \
+		--with-external-gd \
+		--with-ffi=shared \
+		--with-bz2=shared,$XBPS_CROSS_BASE/usr/ \
+		--with-curl=shared \
+		--with-db4=$XBPS_CROSS_BASE/usr \
+		--with-enchant=shared,$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-sodium=shared \
+		--with-mhash \
+		--with-mysql-sock=/run/mysqld/mysqld.sock \
+		--with-mysqli=shared,mysqlnd \
+		--with-openssl=shared \
+		--with-external-pcre \
+		--with-pear=/usr/share/pear${_php_version} \
+		--with-pdo-mysql=shared,mysqlnd \
+		--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-sqlite3=shared,$XBPS_CROSS_BASE/usr \
+		--with-unixODBC=shared,$XBPS_CROSS_BASE/usr \
+		--with-xsl=shared,$XBPS_CROSS_BASE/usr \
+		--with-tidy=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} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--enable-cgi \
+		--enable-fpm \
+		--with-fpm-user=_phpfpm \
+		--with-fpm-group=_phpfpm \
+		--with-fpm-acl \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	cd ${wrksrc}/build-apache
+	ln -s ${wrksrc}/configure
+	./configure ${_phpconfig} \
+		--host=${XBPS_CROSS_TRIPLET} \
+		--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 00000000000000..30e9d7f2873442
--- /dev/null
+++ b/srcpkgs/php8.4/update
@@ -0,0 +1,3 @@
+pkgname=php
+ignore="8.[5-9].*"
+site="https://www.php.net/distributions/"

From 024bd3e393613c28ab08f08ba075ad88aa26a30f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:17 -0500
Subject: [PATCH 02/10] New package: php8.4-apcu-5.1.24

---
 srcpkgs/php8.4-apcu/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-apcu/template               | 29 ++++++++++++++++++++++
 srcpkgs/php8.4-apcu/update                 |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.4-apcu/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-apcu/template
 create mode 100644 srcpkgs/php8.4-apcu/update

diff --git a/srcpkgs/php8.4-apcu/files/README.voidlinux b/srcpkgs/php8.4-apcu/files/README.voidlinux
new file mode 100644
index 00000000000000..9da8a70ccc2ba9
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.4-apcu/template b/srcpkgs/php8.4-apcu/template
new file mode 100644
index 00000000000000..983fe2e4f775d8
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-apcu'
+pkgname=php8.4-apcu
+version=5.1.24
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target=test
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel pcre2-devel"
+depends="php8.4"
+short_desc="In-memory key-value store for PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=5c28a55b27082c69657e25b7ecf553e2cf6b74ec3fa77d6b76f4fb982e001e43
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-apcu/update b/srcpkgs/php8.4-apcu/update
new file mode 100644
index 00000000000000..ad899519e31382
--- /dev/null
+++ b/srcpkgs/php8.4-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 34b823a806c475b247a13419d6b049bcee81eb5a Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:19 -0500
Subject: [PATCH 03/10] New package: php8.4-ast-1.1.2

---
 srcpkgs/php8.4-ast/files/README.voidlinux |  2 ++
 srcpkgs/php8.4-ast/template               | 28 +++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 srcpkgs/php8.4-ast/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-ast/template

diff --git a/srcpkgs/php8.4-ast/files/README.voidlinux b/srcpkgs/php8.4-ast/files/README.voidlinux
new file mode 100644
index 00000000000000..40e14f32f8f635
--- /dev/null
+++ b/srcpkgs/php8.4-ast/files/README.voidlinux
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so
diff --git a/srcpkgs/php8.4-ast/template b/srcpkgs/php8.4-ast/template
new file mode 100644
index 00000000000000..fbbeec05575832
--- /dev/null
+++ b/srcpkgs/php8.4-ast/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-ast'
+pkgname=php8.4-ast
+version=1.1.2
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+make_check_target="test"
+hostmakedepends="php8.4-devel autoconf"
+makedepends="php8.4-devel"
+depends="php8.4"
+checkdepends="${depends}"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=8742427ff7c07ba93f940968f7363972ea040d97d847da3b79b4283c2a369dea
+make_check_pre="env NO_INTERACTION=1"
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}

From 1ce6566ac2cec57dbabe2fd582a4fdbb3eed8673 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:20 -0500
Subject: [PATCH 04/10] New package: php8.4-igbinary-3.2.16

---
 srcpkgs/php8.4-igbinary/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/php8.4-igbinary/template

diff --git a/srcpkgs/php8.4-igbinary/template b/srcpkgs/php8.4-igbinary/template
new file mode 100644
index 00000000000000..c00b787aa90da9
--- /dev/null
+++ b/srcpkgs/php8.4-igbinary/template
@@ -0,0 +1,24 @@
+# Template file for 'php8.4-igbinary'
+pkgname=php8.4-igbinary
+version=3.2.16
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="Igbinary is a drop in replacement for the standard php serializer"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="BSD-3-Clause"
+homepage="https://github.com/igbinary/igbinary/"
+distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
+checksum=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT="${DESTDIR}" install
+	vlicense COPYING
+}

From e168661c70e51051a45e946e05bff4417d6ff132 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:22 -0500
Subject: [PATCH 05/10] New package: php8.4-imagick-3.7.0

---
 srcpkgs/php8.4-imagick/files/README.voidlinux |  3 ++
 ...le-libmagick-header-file-search-path.patch | 17 +++++++++++
 srcpkgs/php8.4-imagick/template               | 29 +++++++++++++++++++
 srcpkgs/php8.4-imagick/update                 |  1 +
 4 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/php8.4-imagick/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 create mode 100644 srcpkgs/php8.4-imagick/template
 create mode 100644 srcpkgs/php8.4-imagick/update

diff --git a/srcpkgs/php8.4-imagick/files/README.voidlinux b/srcpkgs/php8.4-imagick/files/README.voidlinux
new file mode 100644
index 00000000000000..00497519fcee5b
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Imagick extension add the following line to your php.ini:
+
+	extension=imagick.so
diff --git a/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 00000000000000..16b8aaa5737151
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
@@ -0,0 +1,17 @@
+--- a/imagemagick.m4	2021-09-09 10:53:42.287881616 +0200
++++ b/imagemagick.m4	2021-09-09 11:14:47.662312430 +0200
+@@ -167,6 +167,14 @@ AC_DEFUN([IM_FIND_IMAGEMAGICK],[
+   
+     AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h])
+ 
++  elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
++
++    IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
++    IM_HEADER_STYLE="SEVEN"
++    AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header])
++
++    AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h])
++
+   elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then
+ 
+     IM_INCLUDE_FORMAT="MagickWand/MagickWand.h"
diff --git a/srcpkgs/php8.4-imagick/template b/srcpkgs/php8.4-imagick/template
new file mode 100644
index 00000000000000..4993c5d515ba3a
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.4-imagick'
+pkgname=php8.4-imagick
+version=3.7.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel libmagick-devel"
+depends="php8.4"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/imagick"
+distfiles="https://pecl.php.net/get/imagick-$version.tgz"
+checksum=5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-imagick/update b/srcpkgs/php8.4-imagick/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 8456a3261aa2dc0afde7673a0f435fbe5ad65627 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:23 -0500
Subject: [PATCH 06/10] New package: php8.4-mongodb-1.20.1

---
 srcpkgs/php8.4-mongodb/files/README.voidlinux |  3 ++
 srcpkgs/php8.4-mongodb/template               | 28 +++++++++++++++++++
 srcpkgs/php8.4-mongodb/update                 |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/php8.4-mongodb/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-mongodb/template
 create mode 100644 srcpkgs/php8.4-mongodb/update

diff --git a/srcpkgs/php8.4-mongodb/files/README.voidlinux b/srcpkgs/php8.4-mongodb/files/README.voidlinux
new file mode 100644
index 00000000000000..173fab80af8df0
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the MongoDB extension add the following line to your php.ini:
+
+	extension=mongodb
diff --git a/srcpkgs/php8.4-mongodb/template b/srcpkgs/php8.4-mongodb/template
new file mode 100644
index 00000000000000..56fa4c0ba0566f
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/template
@@ -0,0 +1,28 @@
+# Template file for 'php8.4-mongodb'
+pkgname=php8.4-mongodb
+version=1.20.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel pcre2-devel openssl-devel"
+depends="php8.4"
+short_desc="Official MongoDB PHP driver"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="Apache-2.0"
+homepage="https://pecl.php.net/package/mongodb"
+changelog="https://pecl.php.net/package-changelog.php?package=mongodb"
+distfiles="https://pecl.php.net/get/mongodb-$version.tgz"
+checksum=614e57594918feb621f525e6516d59ce09b78f5172355ba8afb6c2207c1ce900
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/php8.4-mongodb/update b/srcpkgs/php8.4-mongodb/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-mongodb/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 4be46b932a3d801dc195becdbba2d41b02559077 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:24 -0500
Subject: [PATCH 07/10] New package: php8.4-redis-6.1.0

---
 srcpkgs/php8.4-redis/files/README.voidlinux |  3 +++
 srcpkgs/php8.4-redis/template               | 27 +++++++++++++++++++++
 srcpkgs/php8.4-redis/update                 |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/php8.4-redis/files/README.voidlinux
 create mode 100644 srcpkgs/php8.4-redis/template
 create mode 100644 srcpkgs/php8.4-redis/update

diff --git a/srcpkgs/php8.4-redis/files/README.voidlinux b/srcpkgs/php8.4-redis/files/README.voidlinux
new file mode 100644
index 00000000000000..2a9de04b421e15
--- /dev/null
+++ b/srcpkgs/php8.4-redis/files/README.voidlinux
@@ -0,0 +1,3 @@
+To enable the Redis extension add the following line to your php.ini:
+
+	extension=redis
diff --git a/srcpkgs/php8.4-redis/template b/srcpkgs/php8.4-redis/template
new file mode 100644
index 00000000000000..6777e759d3d247
--- /dev/null
+++ b/srcpkgs/php8.4-redis/template
@@ -0,0 +1,27 @@
+# Template file for 'php8.4-redis'
+pkgname=php8.4-redis
+version=6.1.0
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="php8.4-devel autoconf pkg-config"
+makedepends="php8.4-devel"
+depends="php8.4"
+short_desc="PHP extension for Redis"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/redis"
+distfiles="https://pecl.php.net/get/redis-$version.tgz"
+checksum=f10405f639fe415e9ed4ec99538e72c90694d8dbd62868edcfcd6a453466b48c
+
+pre_configure() {
+	phpize8.4
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	vdoc $FILESDIR/README.voidlinux
+}
diff --git a/srcpkgs/php8.4-redis/update b/srcpkgs/php8.4-redis/update
new file mode 100644
index 00000000000000..fb47044a964d56
--- /dev/null
+++ b/srcpkgs/php8.4-redis/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From f5f6532da22e3a94b775b9dd78a41641fe583253 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:32 -0500
Subject: [PATCH 08/10] New package: xdebug8.4-3.4.1

---
 srcpkgs/xdebug8.4/files/README.voidlinux |  1 +
 srcpkgs/xdebug8.4/template               | 25 ++++++++++++++++++++++++
 srcpkgs/xdebug8.4/update                 |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/xdebug8.4/files/README.voidlinux
 create mode 100644 srcpkgs/xdebug8.4/template
 create mode 100644 srcpkgs/xdebug8.4/update

diff --git a/srcpkgs/xdebug8.4/files/README.voidlinux b/srcpkgs/xdebug8.4/files/README.voidlinux
new file mode 100644
index 00000000000000..04e3343216f7f1
--- /dev/null
+++ b/srcpkgs/xdebug8.4/files/README.voidlinux
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.4/template b/srcpkgs/xdebug8.4/template
new file mode 100644
index 00000000000000..e8400dd3437680
--- /dev/null
+++ b/srcpkgs/xdebug8.4/template
@@ -0,0 +1,25 @@
+# Template file for 'xdebug8.4'
+pkgname=xdebug8.4
+version=3.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.4"
+hostmakedepends="autoconf php8.4-devel"
+makedepends="php8.4-devel"
+short_desc="PHP debugging extension"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4d96bcded78dbd271fb344c119171b625a8597cd67fc6899ec5e019549f1bb87
+
+pre_configure() {
+	phpize8.4
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+	vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/xdebug8.4/update b/srcpkgs/xdebug8.4/update
new file mode 100644
index 00000000000000..280b0bc7e3ac92
--- /dev/null
+++ b/srcpkgs/xdebug8.4/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From 01f9bbde632b782731105be7c6c9ec17b9ec0d3d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Fri, 10 Jan 2025 11:06:08 -0500
Subject: [PATCH 09/10] New package: composer8.4-2.8.4

---
 srcpkgs/composer8.4/files/composer8.4 |  2 ++
 srcpkgs/composer8.4/template          | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 srcpkgs/composer8.4/files/composer8.4
 create mode 100644 srcpkgs/composer8.4/template

diff --git a/srcpkgs/composer8.4/files/composer8.4 b/srcpkgs/composer8.4/files/composer8.4
new file mode 100644
index 00000000000000..e1d0d9df347353
--- /dev/null
+++ b/srcpkgs/composer8.4/files/composer8.4
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.4 /usr/libexec/composer.phar8.4 "$@"
diff --git a/srcpkgs/composer8.4/template b/srcpkgs/composer8.4/template
new file mode 100644
index 00000000000000..1045b916010932
--- /dev/null
+++ b/srcpkgs/composer8.4/template
@@ -0,0 +1,27 @@
+# Template file for 'composer8.4'
+pkgname=composer8.4
+version=2.8.4
+revision=1
+build_style=fetch
+depends="php8.4"
+short_desc="Dependency manager for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://getcomposer.org/"
+changelog="https://raw.githubusercontent.com/composer/composer/main/CHANGELOG.md"
+distfiles="https://github.com/composer/composer/releases/download/${version}/composer.phar
+ https://raw.githubusercontent.com/composer/composer/main/LICENSE"
+checksum="c4c4e2e1beab0ea04e0bd042a5dbba9feda1fbf5eda0d36203958edd343c0a8a
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.4"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.4
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.4
+	vlicense LICENSE
+
+	vmkdir /etc/php8.4/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.4/conf.d/composer.ini
+}

From c4d191ccb14c03006e7cb0dbf80dc023350ac806 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 17 Dec 2024 11:17:12 -0500
Subject: [PATCH 10/10] php: update to 8.4.

---
 srcpkgs/php/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index d04d1369746fd5..5eba95db516833 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,7 +1,7 @@
 # Template file for 'php'
 pkgname=php
-version=8.3
-revision=2
+version=8.4
+revision=1
 build_style=meta
 depends="php${version}"
 short_desc="Meta package for PHP"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-10 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-10 15:42 [PR PATCH] [wip] php8.4 TinfoilSubmarine
2025-01-10 16:06 ` [PR PATCH] [Updated] " TinfoilSubmarine
2025-01-10 16:25 ` TinfoilSubmarine
2025-01-10 17:31 ` TinfoilSubmarine
2025-01-10 18:40 ` TinfoilSubmarine
2025-01-10 19:04 ` TinfoilSubmarine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).