Github messages for voidlinux
 help / color / mirror / Atom feed
From: TinfoilSubmarine <TinfoilSubmarine@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: php8.0-*, php8.1-*, xdebug8.0/1, composer8.0/1
Date: Sun, 10 Apr 2022 02:22:27 +0200	[thread overview]
Message-ID: <20220410002227.KDbZLXnbuoppKGBukrO3DL88qadjBp-td4Bb2chb9ZA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36026@inbox.vuxu.org>

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

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

https://github.com/TinfoilSubmarine/void-packages php8
https://github.com/void-linux/void-packages/pull/36026

New packages: php8.0-*, php8.1-*, xdebug8.0/1, composer8.0/1
<!-- Uncomment relevant sections and delete options which are not applicable -->

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


#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](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, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - aarch64 (cross)
  - armv6l (cross)
-->

Not sure what else is needed for this to round a complete PHP environment, but I am currently using the php8.0-* stuff to self-host Nextcloud and Firefly III without any issues.

~~In regards to 8.0.x vs 8.1.x, I opted for 8.0.x because in my use case both Nextcloud and Firefly III still haven't properly supported PHP 8.1.x. For reference, it's been out for [3 months](https://www.php.net/supported-versions.php). Perhaps we can have a php8.1 package as well? idk~~

EDIT: this would also close https://github.com/void-linux/void-packages/issues/31678

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

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

From 960678d72144d77304bc61ee27c65c84b4fa2fc9 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:15:34 -0400
Subject: [PATCH 01/14] New package: php8.0-8.0.17

---
 srcpkgs/php8.0-apache                         |   1 +
 srcpkgs/php8.0-cgi                            |   1 +
 srcpkgs/php8.0-devel                          |   1 +
 srcpkgs/php8.0-embed                          |   1 +
 srcpkgs/php8.0-enchant                        |   1 +
 srcpkgs/php8.0-ffi                            |   1 +
 srcpkgs/php8.0-fpm                            |   1 +
 srcpkgs/php8.0-gd                             |   1 +
 srcpkgs/php8.0-intl                           |   1 +
 srcpkgs/php8.0-ldap                           |   1 +
 srcpkgs/php8.0-mysql                          |   1 +
 srcpkgs/php8.0-odbc                           |   1 +
 srcpkgs/php8.0-pgsql                          |   1 +
 srcpkgs/php8.0-phpdbg                         |   1 +
 srcpkgs/php8.0-snmp                           |   1 +
 srcpkgs/php8.0-sodium                         |   1 +
 srcpkgs/php8.0-sqlite                         |   1 +
 srcpkgs/php8.0-tidy                           |   1 +
 srcpkgs/php8.0-xsl                            |   1 +
 srcpkgs/php8.0/files/apache.conf              |  13 +
 srcpkgs/php8.0/files/php-fpm8.0/run           |   3 +
 srcpkgs/php8.0/patches/php-706-crypt.patch    |  15 +
 srcpkgs/php8.0/patches/php-cross-config.patch |  41 +++
 srcpkgs/php8.0/patches/php-fpm.patch          |  13 +
 .../patches/php-ltmain-sysroot-support.patch  |  39 ++
 .../php8.0/patches/php-opcache-cross.patch    |  14 +
 srcpkgs/php8.0/patches/php-pear-cross.patch   |  23 ++
 srcpkgs/php8.0/patches/php-phar-cross.patch   |  29 ++
 .../patches/php-phpize-sysroot-support.patch  |  28 ++
 srcpkgs/php8.0/patches/php.ini.patch          |  24 ++
 srcpkgs/php8.0/template                       | 337 ++++++++++++++++++
 srcpkgs/php8.0/update                         |   2 +
 32 files changed, 600 insertions(+)
 create mode 120000 srcpkgs/php8.0-apache
 create mode 120000 srcpkgs/php8.0-cgi
 create mode 120000 srcpkgs/php8.0-devel
 create mode 120000 srcpkgs/php8.0-embed
 create mode 120000 srcpkgs/php8.0-enchant
 create mode 120000 srcpkgs/php8.0-ffi
 create mode 120000 srcpkgs/php8.0-fpm
 create mode 120000 srcpkgs/php8.0-gd
 create mode 120000 srcpkgs/php8.0-intl
 create mode 120000 srcpkgs/php8.0-ldap
 create mode 120000 srcpkgs/php8.0-mysql
 create mode 120000 srcpkgs/php8.0-odbc
 create mode 120000 srcpkgs/php8.0-pgsql
 create mode 120000 srcpkgs/php8.0-phpdbg
 create mode 120000 srcpkgs/php8.0-snmp
 create mode 120000 srcpkgs/php8.0-sodium
 create mode 120000 srcpkgs/php8.0-sqlite
 create mode 120000 srcpkgs/php8.0-tidy
 create mode 120000 srcpkgs/php8.0-xsl
 create mode 100644 srcpkgs/php8.0/files/apache.conf
 create mode 100755 srcpkgs/php8.0/files/php-fpm8.0/run
 create mode 100644 srcpkgs/php8.0/patches/php-706-crypt.patch
 create mode 100644 srcpkgs/php8.0/patches/php-cross-config.patch
 create mode 100644 srcpkgs/php8.0/patches/php-fpm.patch
 create mode 100644 srcpkgs/php8.0/patches/php-ltmain-sysroot-support.patch
 create mode 100644 srcpkgs/php8.0/patches/php-opcache-cross.patch
 create mode 100644 srcpkgs/php8.0/patches/php-pear-cross.patch
 create mode 100644 srcpkgs/php8.0/patches/php-phar-cross.patch
 create mode 100644 srcpkgs/php8.0/patches/php-phpize-sysroot-support.patch
 create mode 100644 srcpkgs/php8.0/patches/php.ini.patch
 create mode 100644 srcpkgs/php8.0/template
 create mode 100644 srcpkgs/php8.0/update

diff --git a/srcpkgs/php8.0-apache b/srcpkgs/php8.0-apache
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-apache
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-cgi b/srcpkgs/php8.0-cgi
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-cgi
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-devel b/srcpkgs/php8.0-devel
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-devel
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-embed b/srcpkgs/php8.0-embed
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-embed
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-enchant b/srcpkgs/php8.0-enchant
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-enchant
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-ffi b/srcpkgs/php8.0-ffi
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-ffi
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-fpm b/srcpkgs/php8.0-fpm
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-fpm
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-gd b/srcpkgs/php8.0-gd
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-gd
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-intl b/srcpkgs/php8.0-intl
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-intl
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-ldap b/srcpkgs/php8.0-ldap
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-ldap
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-mysql b/srcpkgs/php8.0-mysql
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-mysql
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-odbc b/srcpkgs/php8.0-odbc
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-odbc
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-pgsql b/srcpkgs/php8.0-pgsql
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-pgsql
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-phpdbg b/srcpkgs/php8.0-phpdbg
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-phpdbg
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-snmp b/srcpkgs/php8.0-snmp
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-snmp
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-sodium b/srcpkgs/php8.0-sodium
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-sodium
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-sqlite b/srcpkgs/php8.0-sqlite
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-sqlite
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-tidy b/srcpkgs/php8.0-tidy
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-tidy
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0-xsl b/srcpkgs/php8.0-xsl
new file mode 120000
index 000000000000..104f2d35908d
--- /dev/null
+++ b/srcpkgs/php8.0-xsl
@@ -0,0 +1 @@
+php8.0
\ No newline at end of file
diff --git a/srcpkgs/php8.0/files/apache.conf b/srcpkgs/php8.0/files/apache.conf
new file mode 100644
index 000000000000..17a0ad5f6fa4
--- /dev/null
+++ b/srcpkgs/php8.0/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php8.0_module
+
+<IfModule dir_module>
+	<IfModule php8.0_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.0/files/php-fpm8.0/run b/srcpkgs/php8.0/files/php-fpm8.0/run
new file mode 100755
index 000000000000..f1c712335ab8
--- /dev/null
+++ b/srcpkgs/php8.0/files/php-fpm8.0/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec php-fpm8.0 --nodaemonize ${OPTS}
diff --git a/srcpkgs/php8.0/patches/php-706-crypt.patch b/srcpkgs/php8.0/patches/php-706-crypt.patch
new file mode 100644
index 000000000000..254f1d2187c2
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-706-crypt.patch
@@ -0,0 +1,15 @@
+--- 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.0/patches/php-cross-config.patch b/srcpkgs/php8.0/patches/php-cross-config.patch
new file mode 100644
index 000000000000..24de8c58cbdd
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-cross-config.patch
@@ -0,0 +1,41 @@
+--- a/configure	2020-03-17 11:40:20.000000000 +0100
++++ b/configure	2020-04-12 19:51:57.216350534 +0200
+@@ -6374,10 +6374,12 @@ IFS="- /.
+     as_fn_error $? "Please note that Apache version >= 2.0.44 is required" "$LINENO" 5
+   fi
+ 
++  APXS_PREFIX='$(INSTALL_ROOT)'/usr
+   APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
+   if test -z `$APXS -q SYSCONFDIR`; then
+     INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
+                  $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
++                       -S PREFIX='$APXS_PREFIX' \
+                        -i -n php"
+   else
+     APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
+@@ -6385,6 +6387,7 @@ IFS="- /.
+                 \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
+                  $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
+                        -S SYSCONFDIR='$APXS_SYSCONFDIR' \
++                       -S PREFIX='$APXS_PREFIX' \
+                        -i -a -n php"
+   fi
+ 
+@@ -57170,7 +57173,7 @@ $as_echo_n "checking for pg_config... "
+     fi
+   done
+ 
+-  if test -n "$PG_CONFIG"; then
++  if test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
+ $as_echo "$PG_CONFIG" >&6; }
+     PGSQL_INCLUDE=`$PG_CONFIG --includedir`
+@@ -58821,7 +58824,7 @@ $as_echo_n "checking for pg_config... "
+     fi
+   done
+ 
+-  if test -n "$PG_CONFIG"; then
++  if test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
+ $as_echo "$PG_CONFIG" >&6; }
+     PGSQL_INCLUDE=`$PG_CONFIG --includedir`
diff --git a/srcpkgs/php8.0/patches/php-fpm.patch b/srcpkgs/php8.0/patches/php-fpm.patch
new file mode 100644
index 000000000000..5e55e179f8a4
--- /dev/null
+++ b/srcpkgs/php8.0/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.0/patches/php-ltmain-sysroot-support.patch b/srcpkgs/php8.0/patches/php-ltmain-sysroot-support.patch
new file mode 100644
index 000000000000..bbe0a514a9e8
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-ltmain-sysroot-support.patch
@@ -0,0 +1,39 @@
+--- 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.0/patches/php-opcache-cross.patch b/srcpkgs/php8.0/patches/php-opcache-cross.patch
new file mode 100644
index 000000000000..5d8a8c5ceed5
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-opcache-cross.patch
@@ -0,0 +1,14 @@
+diff --git a/configure b/configure.new
+index 1159224b4c..29f763aa05 100755
+--- a/configure
++++ b/configure.new
+@@ -51689,7 +51689,8 @@ $as_echo "$have_shm_ipc" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mmap() using MAP_ANON shared memory support" >&5
+ $as_echo_n "checking for mmap() using MAP_ANON shared memory support... " >&6; }
+   if test "$cross_compiling" = yes; then :
+-  have_shm_mmap_anon=no
++$as_echo "#define HAVE_SHM_MMAP_ANON 1" >>confdefs.h
++  have_shm_mmap_anon=yes
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
diff --git a/srcpkgs/php8.0/patches/php-pear-cross.patch b/srcpkgs/php8.0/patches/php-pear-cross.patch
new file mode 100644
index 000000000000..f9191a50a0b5
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-pear-cross.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.0/patches/php-phar-cross.patch b/srcpkgs/php8.0/patches/php-phar-cross.patch
new file mode 100644
index 000000000000..1e4e627ec65b
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-phar-cross.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.0/patches/php-phpize-sysroot-support.patch b/srcpkgs/php8.0/patches/php-phpize-sysroot-support.patch
new file mode 100644
index 000000000000..76cff3f81664
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php-phpize-sysroot-support.patch
@@ -0,0 +1,28 @@
+--- 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
+ 
+@@ -58,7 +64,11 @@ dnl For BC.
+ 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.0/patches/php.ini.patch b/srcpkgs/php8.0/patches/php.ini.patch
new file mode 100644
index 000000000000..07e38a04cf4f
--- /dev/null
+++ b/srcpkgs/php8.0/patches/php.ini.patch
@@ -0,0 +1,24 @@
+diff --git php.ini-production php.ini-production
+index 794d3e8ddb..c7acf9c883 100644
+--- a/php.ini-production
++++ b/php.ini-production
+@@ -729,7 +729,7 @@ default_charset = "UTF-8"
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+ 
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:/usr/share/pear"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -752,9 +752,7 @@ user_dir =
+ 
+ ; Directory in which the loadable extensions (modules) reside.
+ ; http://php.net/extension-dir
+-;extension_dir = "./"
+-; On windows:
+-;extension_dir = "ext"
++extension_dir = "/usr/lib/php8.0/modules/"
+ 
+ ; Directory where the temporary files should be placed.
+ ; Defaults to the system default (see sys_get_temp_dir)
diff --git a/srcpkgs/php8.0/template b/srcpkgs/php8.0/template
new file mode 100644
index 000000000000..52c3e11c9c64
--- /dev/null
+++ b/srcpkgs/php8.0/template
@@ -0,0 +1,337 @@
+# Template file for 'php8.0'
+pkgname=php8.0
+version=8.0.17
+revision=1
+_php_version=8.0
+wrksrc="php-${version}"
+hostmakedepends="bison pkg-config apache-devel curl"
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="PHP-3.01"
+homepage="https://www.php.net"
+distfiles="https://www.php.net/distributions/php-${version}.tar.gz"
+checksum=bdbd792901c156c4d1710c9d266732d3c17f6ff63850d6660b9d8d3411188424
+
+fetch_cmd="curl -O"
+
+conf_files="/etc/php${_php_version}/php.ini"
+
+lib32disabled=yes
+
+if [ -n "$CROSS_BUILD" ]; then
+	# phar needs 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
+
+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 \
+		--without-pear \
+		--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
+	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=http \
+		--with-fpm-group=http \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	# reuse the previous run; this will save us a lot of time
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+	cd ${wrksrc}/build-apache
+	./configure ${_phpconfig} \
+		--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.0-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.0-phpdbg_package() {
+	short_desc+=" - interactive debugger"
+	depends="php${_php_version}-${version}_${revision}"
+	pkg_install() {
+		cd ${wrksrc}/build
+		make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg
+	}
+}
+
+php8.0-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.0-apache_package() {
+	short_desc+=' - Apache SAPI'
+	depends="php${_php_version}-${version}_${revision}"
+	conf_files="/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.0-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.0-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/libphp.so ${PKGDESTDIR}/usr/lib/libphp${_php_version}.so
+	}
+}
+
+php8.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0/update b/srcpkgs/php8.0/update
new file mode 100644
index 000000000000..c4d9bc5958ca
--- /dev/null
+++ b/srcpkgs/php8.0/update
@@ -0,0 +1,2 @@
+pkgname=php
+ignore="8.[1-9].*"

From bad50c1cff2cd0fd1069046787437ebf958e38dc Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:32:37 -0400
Subject: [PATCH 02/14] New package: php8.0-apcu-5.1.21

---
 srcpkgs/php8.0-apcu/INSTALL.msg |  3 +++
 srcpkgs/php8.0-apcu/template    | 29 +++++++++++++++++++++++++++++
 srcpkgs/php8.0-apcu/update      |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.0-apcu/INSTALL.msg
 create mode 100644 srcpkgs/php8.0-apcu/template
 create mode 100644 srcpkgs/php8.0-apcu/update

diff --git a/srcpkgs/php8.0-apcu/INSTALL.msg b/srcpkgs/php8.0-apcu/INSTALL.msg
new file mode 100644
index 000000000000..9da8a70ccc2b
--- /dev/null
+++ b/srcpkgs/php8.0-apcu/INSTALL.msg
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.0-apcu/template b/srcpkgs/php8.0-apcu/template
new file mode 100644
index 000000000000..e081806f4530
--- /dev/null
+++ b/srcpkgs/php8.0-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.0-apcu'
+pkgname=php8.0-apcu
+version=5.1.21
+revision=1
+wrksrc="apcu-${version}"
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.0"
+make_check_target=test
+hostmakedepends="autoconf php8.0-devel"
+makedepends="php8.0-devel pcre2-devel"
+depends="php8.0"
+short_desc="In-memory key-value store for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=1033530448696ee7cadec85050f6df5135fb1330072ef2a74569392acfecfbc1
+
+pre_configure() {
+	phpize8.0
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+}
diff --git a/srcpkgs/php8.0-apcu/update b/srcpkgs/php8.0-apcu/update
new file mode 100644
index 000000000000..ad899519e313
--- /dev/null
+++ b/srcpkgs/php8.0-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From eaa4ad326b942f1fede3ed669708556964df7119 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:30:18 -0400
Subject: [PATCH 03/14] New package: php8.0-ast-1.0.16

---
 srcpkgs/php8.0-ast/INSTALL.msg |  2 ++
 srcpkgs/php8.0-ast/template    | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 srcpkgs/php8.0-ast/INSTALL.msg
 create mode 100644 srcpkgs/php8.0-ast/template

diff --git a/srcpkgs/php8.0-ast/INSTALL.msg b/srcpkgs/php8.0-ast/INSTALL.msg
new file mode 100644
index 000000000000..0dd0b5df2d96
--- /dev/null
+++ b/srcpkgs/php8.0-ast/INSTALL.msg
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so 
diff --git a/srcpkgs/php8.0-ast/template b/srcpkgs/php8.0-ast/template
new file mode 100644
index 000000000000..5f4dedd31d66
--- /dev/null
+++ b/srcpkgs/php8.0-ast/template
@@ -0,0 +1,25 @@
+# Template file for 'php8.0-ast'
+pkgname=php8.0-ast
+version=1.0.16
+revision=1
+wrksrc="ast-${version}"
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.0"
+hostmakedepends="php8.0-devel autoconf"
+makedepends="php8.0-devel"
+depends="php8.0"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=45bda34b780c4661ce77cf65cd8a504fb56526d4b456edcc97d791c86f3879ce
+
+pre_configure() {
+	phpize8.0
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+}

From e9b0b0d763b84e41174518a67137cc5baeebf652 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:29:14 -0400
Subject: [PATCH 04/14] New package: php8.0-igbinary-3.2.7

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

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

From acbc7915f138d1065d13476165e4fb35e0a540b7 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:31:34 -0400
Subject: [PATCH 05/14] New package: php8.0-imagick-3.7.0

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

diff --git a/srcpkgs/php8.0-imagick/INSTALL.msg b/srcpkgs/php8.0-imagick/INSTALL.msg
new file mode 100644
index 000000000000..00497519fcee
--- /dev/null
+++ b/srcpkgs/php8.0-imagick/INSTALL.msg
@@ -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.0-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.0-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 000000000000..16b8aaa57371
--- /dev/null
+++ b/srcpkgs/php8.0-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.0-imagick/template b/srcpkgs/php8.0-imagick/template
new file mode 100644
index 000000000000..c9f3797a61c7
--- /dev/null
+++ b/srcpkgs/php8.0-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.0-imagick'
+pkgname=php8.0-imagick
+version=3.7.0
+revision=1
+wrksrc="imagick-$version"
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.0"
+hostmakedepends="php8.0-devel autoconf pkg-config"
+makedepends="php8.0-devel pcre2-devel libmagick-devel"
+depends="php8.0"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+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.0
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+}
diff --git a/srcpkgs/php8.0-imagick/update b/srcpkgs/php8.0-imagick/update
new file mode 100644
index 000000000000..fb47044a964d
--- /dev/null
+++ b/srcpkgs/php8.0-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From 861ca2dbd3cce88c3a0dc36dd1ee500456b0e1d4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:45:45 -0400
Subject: [PATCH 06/14] New package: composer8.0-2.3.4

---
 srcpkgs/composer8.0/files/composer8.0 |  2 ++
 srcpkgs/composer8.0/template          | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/composer8.0/files/composer8.0
 create mode 100644 srcpkgs/composer8.0/template

diff --git a/srcpkgs/composer8.0/files/composer8.0 b/srcpkgs/composer8.0/files/composer8.0
new file mode 100644
index 000000000000..d2b5a886acc4
--- /dev/null
+++ b/srcpkgs/composer8.0/files/composer8.0
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.0 -f /usr/libexec/composer.phar8.0
diff --git a/srcpkgs/composer8.0/template b/srcpkgs/composer8.0/template
new file mode 100644
index 000000000000..e4fe657a3164
--- /dev/null
+++ b/srcpkgs/composer8.0/template
@@ -0,0 +1,26 @@
+# Template file for 'composer8.0'
+pkgname=composer8.0
+version=2.3.4
+revision=1
+build_style=fetch
+depends="php8.0"
+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="1fc8fc5b43f081fe76fa85eb5a213412e55f54a60bae4880bc96521ae482d6c3
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.0
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.0
+	vlicense LICENSE
+
+	vmkdir /etc/php8.0/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.0/conf.d/composer.ini
+}

From 7a0266fc88eae49fd532ad214b5f16da1a5809a5 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 14:20:19 -0400
Subject: [PATCH 07/14] New package: xdebug8.0-3.1.4

---
 srcpkgs/xdebug8.0/INSTALL.msg |  1 +
 srcpkgs/xdebug8.0/template    | 29 +++++++++++++++++++++++++++++
 srcpkgs/xdebug8.0/update      |  2 ++
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/xdebug8.0/INSTALL.msg
 create mode 100644 srcpkgs/xdebug8.0/template
 create mode 100644 srcpkgs/xdebug8.0/update

diff --git a/srcpkgs/xdebug8.0/INSTALL.msg b/srcpkgs/xdebug8.0/INSTALL.msg
new file mode 100644
index 000000000000..04e3343216f7
--- /dev/null
+++ b/srcpkgs/xdebug8.0/INSTALL.msg
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.0/template b/srcpkgs/xdebug8.0/template
new file mode 100644
index 000000000000..9d5244daf4d2
--- /dev/null
+++ b/srcpkgs/xdebug8.0/template
@@ -0,0 +1,29 @@
+# Template file for 'xdebug8.0'
+pkgname=xdebug8.0
+version=3.1.4
+revision=1
+wrksrc="xdebug-${version}"
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.0"
+hostmakedepends="autoconf"
+makedepends="php8.0-devel"
+short_desc="PHP debugging extension"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4195926f9f6c4e802ff749bb2ca85ac50636719a72e5389e372e35ef523505f9
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" php8.0-devel"
+fi
+
+pre_configure() {
+	phpize8.0
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xdebug8.0/update b/srcpkgs/xdebug8.0/update
new file mode 100644
index 000000000000..280b0bc7e3ac
--- /dev/null
+++ b/srcpkgs/xdebug8.0/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

From 8b917c2bc4a1f430696c3eef1ff5874f2ce0be97 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:13:12 -0400
Subject: [PATCH 08/14] New package: php8.1-8.1.4

---
 srcpkgs/php8.1-apache                         |   1 +
 srcpkgs/php8.1-cgi                            |   1 +
 srcpkgs/php8.1-devel                          |   1 +
 srcpkgs/php8.1-embed                          |   1 +
 srcpkgs/php8.1-enchant                        |   1 +
 srcpkgs/php8.1-ffi                            |   1 +
 srcpkgs/php8.1-fpm                            |   1 +
 srcpkgs/php8.1-gd                             |   1 +
 srcpkgs/php8.1-intl                           |   1 +
 srcpkgs/php8.1-ldap                           |   1 +
 srcpkgs/php8.1-mysql                          |   1 +
 srcpkgs/php8.1-odbc                           |   1 +
 srcpkgs/php8.1-pgsql                          |   1 +
 srcpkgs/php8.1-phpdbg                         |   1 +
 srcpkgs/php8.1-snmp                           |   1 +
 srcpkgs/php8.1-sodium                         |   1 +
 srcpkgs/php8.1-sqlite                         |   1 +
 srcpkgs/php8.1-tidy                           |   1 +
 srcpkgs/php8.1-xsl                            |   1 +
 srcpkgs/php8.1/files/apache.conf              |  13 +
 srcpkgs/php8.1/files/php-fpm8.1/run           |   3 +
 srcpkgs/php8.1/patches/php-706-crypt.patch    |  15 +
 srcpkgs/php8.1/patches/php-cross-config.patch |  22 ++
 srcpkgs/php8.1/patches/php-fpm.patch          |  13 +
 .../patches/php-ltmain-sysroot-support.patch  |  39 ++
 srcpkgs/php8.1/patches/php-pear-cross.patch   |  23 ++
 srcpkgs/php8.1/patches/php-phar-cross.patch   |  29 ++
 .../patches/php-phpize-sysroot-support.patch  |  28 ++
 srcpkgs/php8.1/patches/php.ini.patch          |  24 ++
 srcpkgs/php8.1/template                       | 337 ++++++++++++++++++
 srcpkgs/php8.1/update                         |   2 +
 31 files changed, 567 insertions(+)
 create mode 120000 srcpkgs/php8.1-apache
 create mode 120000 srcpkgs/php8.1-cgi
 create mode 120000 srcpkgs/php8.1-devel
 create mode 120000 srcpkgs/php8.1-embed
 create mode 120000 srcpkgs/php8.1-enchant
 create mode 120000 srcpkgs/php8.1-ffi
 create mode 120000 srcpkgs/php8.1-fpm
 create mode 120000 srcpkgs/php8.1-gd
 create mode 120000 srcpkgs/php8.1-intl
 create mode 120000 srcpkgs/php8.1-ldap
 create mode 120000 srcpkgs/php8.1-mysql
 create mode 120000 srcpkgs/php8.1-odbc
 create mode 120000 srcpkgs/php8.1-pgsql
 create mode 120000 srcpkgs/php8.1-phpdbg
 create mode 120000 srcpkgs/php8.1-snmp
 create mode 120000 srcpkgs/php8.1-sodium
 create mode 120000 srcpkgs/php8.1-sqlite
 create mode 120000 srcpkgs/php8.1-tidy
 create mode 120000 srcpkgs/php8.1-xsl
 create mode 100644 srcpkgs/php8.1/files/apache.conf
 create mode 100755 srcpkgs/php8.1/files/php-fpm8.1/run
 create mode 100644 srcpkgs/php8.1/patches/php-706-crypt.patch
 create mode 100644 srcpkgs/php8.1/patches/php-cross-config.patch
 create mode 100644 srcpkgs/php8.1/patches/php-fpm.patch
 create mode 100644 srcpkgs/php8.1/patches/php-ltmain-sysroot-support.patch
 create mode 100644 srcpkgs/php8.1/patches/php-pear-cross.patch
 create mode 100644 srcpkgs/php8.1/patches/php-phar-cross.patch
 create mode 100644 srcpkgs/php8.1/patches/php-phpize-sysroot-support.patch
 create mode 100644 srcpkgs/php8.1/patches/php.ini.patch
 create mode 100644 srcpkgs/php8.1/template
 create mode 100644 srcpkgs/php8.1/update

diff --git a/srcpkgs/php8.1-apache b/srcpkgs/php8.1-apache
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-apache
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-cgi b/srcpkgs/php8.1-cgi
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-cgi
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-devel b/srcpkgs/php8.1-devel
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-devel
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-embed b/srcpkgs/php8.1-embed
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-embed
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-enchant b/srcpkgs/php8.1-enchant
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-enchant
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-ffi b/srcpkgs/php8.1-ffi
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-ffi
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-fpm b/srcpkgs/php8.1-fpm
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-fpm
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-gd b/srcpkgs/php8.1-gd
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-gd
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-intl b/srcpkgs/php8.1-intl
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-intl
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-ldap b/srcpkgs/php8.1-ldap
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-ldap
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-mysql b/srcpkgs/php8.1-mysql
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-mysql
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-odbc b/srcpkgs/php8.1-odbc
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-odbc
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-pgsql b/srcpkgs/php8.1-pgsql
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-pgsql
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-phpdbg b/srcpkgs/php8.1-phpdbg
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-phpdbg
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-snmp b/srcpkgs/php8.1-snmp
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-snmp
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-sodium b/srcpkgs/php8.1-sodium
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-sodium
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-sqlite b/srcpkgs/php8.1-sqlite
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-sqlite
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-tidy b/srcpkgs/php8.1-tidy
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-tidy
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1-xsl b/srcpkgs/php8.1-xsl
new file mode 120000
index 000000000000..4ad857cc7c08
--- /dev/null
+++ b/srcpkgs/php8.1-xsl
@@ -0,0 +1 @@
+php8.1
\ No newline at end of file
diff --git a/srcpkgs/php8.1/files/apache.conf b/srcpkgs/php8.1/files/apache.conf
new file mode 100644
index 000000000000..f321ec12d31b
--- /dev/null
+++ b/srcpkgs/php8.1/files/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php8.1_module
+
+<IfModule dir_module>
+	<IfModule php8.1_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.1/files/php-fpm8.1/run b/srcpkgs/php8.1/files/php-fpm8.1/run
new file mode 100755
index 000000000000..5928ea5103ef
--- /dev/null
+++ b/srcpkgs/php8.1/files/php-fpm8.1/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec php-fpm8.1 --nodaemonize ${OPTS}
diff --git a/srcpkgs/php8.1/patches/php-706-crypt.patch b/srcpkgs/php8.1/patches/php-706-crypt.patch
new file mode 100644
index 000000000000..254f1d2187c2
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php-706-crypt.patch
@@ -0,0 +1,15 @@
+--- 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.1/patches/php-cross-config.patch b/srcpkgs/php8.1/patches/php-cross-config.patch
new file mode 100644
index 000000000000..169c43f1df93
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php-cross-config.patch
@@ -0,0 +1,22 @@
+diff --git a/configure b/configure
+index e4b82d1..1a8678f 100755
+--- a/configure
++++ b/configure
+@@ -62424,7 +62424,7 @@ printf %s "checking for pg_config... " >&6; }
+     fi
+   done
+ 
+-  if test -n "$PG_CONFIG"; then
++  if test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"; then
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
+ printf "%s\n" "$PG_CONFIG" >&6; }
+     PGSQL_INCLUDE=`$PG_CONFIG --includedir`
+@@ -63948,7 +63948,7 @@ printf %s "checking for pg_config... " >&6; }
+     fi
+   done
+ 
+-  if test -n "$PG_CONFIG"; then
++  if test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"; then
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
+ printf "%s\n" "$PG_CONFIG" >&6; }
+     PGSQL_INCLUDE=`$PG_CONFIG --includedir`
diff --git a/srcpkgs/php8.1/patches/php-fpm.patch b/srcpkgs/php8.1/patches/php-fpm.patch
new file mode 100644
index 000000000000..5e55e179f8a4
--- /dev/null
+++ b/srcpkgs/php8.1/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.1/patches/php-ltmain-sysroot-support.patch b/srcpkgs/php8.1/patches/php-ltmain-sysroot-support.patch
new file mode 100644
index 000000000000..bbe0a514a9e8
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php-ltmain-sysroot-support.patch
@@ -0,0 +1,39 @@
+--- 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.1/patches/php-pear-cross.patch b/srcpkgs/php8.1/patches/php-pear-cross.patch
new file mode 100644
index 000000000000..f9191a50a0b5
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php-pear-cross.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.1/patches/php-phar-cross.patch b/srcpkgs/php8.1/patches/php-phar-cross.patch
new file mode 100644
index 000000000000..1e4e627ec65b
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php-phar-cross.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.1/patches/php-phpize-sysroot-support.patch b/srcpkgs/php8.1/patches/php-phpize-sysroot-support.patch
new file mode 100644
index 000000000000..76cff3f81664
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php-phpize-sysroot-support.patch
@@ -0,0 +1,28 @@
+--- 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
+ 
+@@ -58,7 +64,11 @@ dnl For BC.
+ 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.1/patches/php.ini.patch b/srcpkgs/php8.1/patches/php.ini.patch
new file mode 100644
index 000000000000..186898f63fab
--- /dev/null
+++ b/srcpkgs/php8.1/patches/php.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/pear"
+ ;
+ ; 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.1/modules/"
+ 
+ ; Directory where the temporary files should be placed.
+ ; Defaults to the system default (see sys_get_temp_dir)
diff --git a/srcpkgs/php8.1/template b/srcpkgs/php8.1/template
new file mode 100644
index 000000000000..dc1aa8a5b321
--- /dev/null
+++ b/srcpkgs/php8.1/template
@@ -0,0 +1,337 @@
+# Template file for 'php8.1'
+pkgname=php8.1
+version=8.1.4
+revision=1
+_php_version=8.1
+wrksrc="php-${version}"
+hostmakedepends="bison pkg-config apache-devel curl"
+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"
+short_desc="HTML-embedded scripting language"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="PHP-3.01"
+homepage="https://www.php.net"
+distfiles="https://www.php.net/distributions/php-${version}.tar.gz"
+checksum=a9951c1c8fd5d2eefde28de0f646c344eb61d751319d220713a6da26f986abde
+
+fetch_cmd="curl -O"
+
+conf_files="/etc/php${_php_version}/php.ini"
+
+lib32disabled=yes
+
+if [ -n "$CROSS_BUILD" ]; then
+	# phar needs 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
+
+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 \
+		--without-pear \
+		--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
+	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=http \
+		--with-fpm-group=http \
+		--enable-embed=shared \
+		${_phpextensions}
+	make ${makejobs} ${_make_env}
+
+	# apache
+	# reuse the previous run; this will save us a lot of time
+	cp -a ${wrksrc}/build ${wrksrc}/build-apache
+	cd ${wrksrc}/build-apache
+	./configure ${_phpconfig} \
+		--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.1-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.1-phpdbg_package() {
+	short_desc+=" - interactive debugger"
+	depends="php${_php_version}-${version}_${revision}"
+	pkg_install() {
+		cd ${wrksrc}/build
+		make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg
+	}
+}
+
+php8.1-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.1-apache_package() {
+	short_desc+=' - Apache SAPI'
+	depends="php${_php_version}-${version}_${revision}"
+	conf_files="/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.1-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.1-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/libphp.so ${PKGDESTDIR}/usr/lib/libphp${_php_version}.so
+	}
+}
+
+php8.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1/update b/srcpkgs/php8.1/update
new file mode 100644
index 000000000000..0c2792ec963f
--- /dev/null
+++ b/srcpkgs/php8.1/update
@@ -0,0 +1,2 @@
+pkgname=php
+ignore="8.[2-9].*"

From 03747c813c2b7284e83849edb4f4f41f5bc5ab31 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:29:51 -0400
Subject: [PATCH 09/14] New package: php8.1-apcu-5.1.21

---
 srcpkgs/php8.1-apcu/INSTALL.msg |  3 +++
 srcpkgs/php8.1-apcu/template    | 29 +++++++++++++++++++++++++++++
 srcpkgs/php8.1-apcu/update      |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 srcpkgs/php8.1-apcu/INSTALL.msg
 create mode 100644 srcpkgs/php8.1-apcu/template
 create mode 100644 srcpkgs/php8.1-apcu/update

diff --git a/srcpkgs/php8.1-apcu/INSTALL.msg b/srcpkgs/php8.1-apcu/INSTALL.msg
new file mode 100644
index 000000000000..9da8a70ccc2b
--- /dev/null
+++ b/srcpkgs/php8.1-apcu/INSTALL.msg
@@ -0,0 +1,3 @@
+To enable APCu add the following line to your php.ini:
+
+	extension=apcu.so
diff --git a/srcpkgs/php8.1-apcu/template b/srcpkgs/php8.1-apcu/template
new file mode 100644
index 000000000000..d38a93896383
--- /dev/null
+++ b/srcpkgs/php8.1-apcu/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.1-apcu'
+pkgname=php8.1-apcu
+version=5.1.21
+revision=1
+wrksrc="apcu-${version}"
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.1"
+make_check_target=test
+hostmakedepends="autoconf php8.1-devel"
+makedepends="php8.1-devel pcre2-devel"
+depends="php8.1"
+short_desc="In-memory key-value store for PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="PHP-3.01"
+homepage="https://pecl.php.net/package/APCu"
+distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
+checksum=1033530448696ee7cadec85050f6df5135fb1330072ef2a74569392acfecfbc1
+
+pre_configure() {
+	phpize8.1
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+}
diff --git a/srcpkgs/php8.1-apcu/update b/srcpkgs/php8.1-apcu/update
new file mode 100644
index 000000000000..ad899519e313
--- /dev/null
+++ b/srcpkgs/php8.1-apcu/update
@@ -0,0 +1,2 @@
+site="https://pecl.php.net/package/APCu"
+pattern="apcu-\K[\d\.]*(?=\.tgz)"

From 811c397fafc3abf6412a5ea4bfecac0979768e8d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:30:37 -0400
Subject: [PATCH 10/14] New package: php8.1-ast-1.0.16

---
 srcpkgs/php8.1-ast/INSTALL.msg |  2 ++
 srcpkgs/php8.1-ast/template    | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 srcpkgs/php8.1-ast/INSTALL.msg
 create mode 100644 srcpkgs/php8.1-ast/template

diff --git a/srcpkgs/php8.1-ast/INSTALL.msg b/srcpkgs/php8.1-ast/INSTALL.msg
new file mode 100644
index 000000000000..0dd0b5df2d96
--- /dev/null
+++ b/srcpkgs/php8.1-ast/INSTALL.msg
@@ -0,0 +1,2 @@
+To enable the ast extension please add the following to php.ini:
+	extension=ast.so 
diff --git a/srcpkgs/php8.1-ast/template b/srcpkgs/php8.1-ast/template
new file mode 100644
index 000000000000..ef6471a5ee90
--- /dev/null
+++ b/srcpkgs/php8.1-ast/template
@@ -0,0 +1,25 @@
+# Template file for 'php8.1-ast'
+pkgname=php8.1-ast
+version=1.0.16
+revision=1
+wrksrc="ast-${version}"
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.1"
+hostmakedepends="php8.1-devel autoconf"
+makedepends="php8.1-devel"
+depends="php8.1"
+short_desc="Exposes the abstract syntax tree generated by PHP"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="BSD-3-Clause"
+homepage="https://github.com/nikic/php-ast"
+distfiles="https://pecl.php.net/get/ast-${version}.tgz"
+checksum=45bda34b780c4661ce77cf65cd8a504fb56526d4b456edcc97d791c86f3879ce
+
+pre_configure() {
+	phpize8.1
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+}

From 3d3726425d65509dddeb3129df35a7cc06a193fd Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:31:06 -0400
Subject: [PATCH 11/14] New package: php8.1-igbinary-3.2.7

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

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

From 18d40481d4f230525e3d791a4c41240d14838e99 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:31:33 -0400
Subject: [PATCH 12/14] New package: php8.1-imagick-3.7.0

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

diff --git a/srcpkgs/php8.1-imagick/INSTALL.msg b/srcpkgs/php8.1-imagick/INSTALL.msg
new file mode 100644
index 000000000000..00497519fcee
--- /dev/null
+++ b/srcpkgs/php8.1-imagick/INSTALL.msg
@@ -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.1-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php8.1-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
new file mode 100644
index 000000000000..16b8aaa57371
--- /dev/null
+++ b/srcpkgs/php8.1-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.1-imagick/template b/srcpkgs/php8.1-imagick/template
new file mode 100644
index 000000000000..5789fc36a5f0
--- /dev/null
+++ b/srcpkgs/php8.1-imagick/template
@@ -0,0 +1,29 @@
+# Template file for 'php8.1-imagick'
+pkgname=php8.1-imagick
+version=3.7.0
+revision=1
+wrksrc="imagick-$version"
+build_style=gnu-configure
+configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr \
+ --with-php-config=/usr/bin/php-config8.1"
+hostmakedepends="php8.1-devel autoconf pkg-config"
+makedepends="php8.1-devel pcre2-devel libmagick-devel"
+depends="php8.1"
+short_desc="Provides a PHP wrapper to the ImageMagick library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+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.1
+}
+
+pre_install() {
+	make_install_args="INSTALL_ROOT=$DESTDIR"
+}
+
+post_install() {
+	rm -r $DESTDIR/usr/include
+}
diff --git a/srcpkgs/php8.1-imagick/update b/srcpkgs/php8.1-imagick/update
new file mode 100644
index 000000000000..fb47044a964d
--- /dev/null
+++ b/srcpkgs/php8.1-imagick/update
@@ -0,0 +1 @@
+pattern='<th.*Release \K[\d.]+(?=:</th>)'

From b8bff3c83c7e555babd28ef8ada9cebf7fbaca29 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:29:23 -0400
Subject: [PATCH 13/14] New package: composer8.1-2.3.4

---
 srcpkgs/composer8.1/files/composer8.1 |  2 ++
 srcpkgs/composer8.1/template          | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 srcpkgs/composer8.1/files/composer8.1
 create mode 100644 srcpkgs/composer8.1/template

diff --git a/srcpkgs/composer8.1/files/composer8.1 b/srcpkgs/composer8.1/files/composer8.1
new file mode 100644
index 000000000000..f5a79a2bdb33
--- /dev/null
+++ b/srcpkgs/composer8.1/files/composer8.1
@@ -0,0 +1,2 @@
+#!/bin/sh
+php8.1 -f /usr/libexec/composer.phar8.1
diff --git a/srcpkgs/composer8.1/template b/srcpkgs/composer8.1/template
new file mode 100644
index 000000000000..fb507f8f28f5
--- /dev/null
+++ b/srcpkgs/composer8.1/template
@@ -0,0 +1,26 @@
+# Template file for 'composer8.1'
+pkgname=composer8.1
+version=2.3.4
+revision=1
+build_style=fetch
+depends="php8.1"
+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="1fc8fc5b43f081fe76fa85eb5a213412e55f54a60bae4880bc96521ae482d6c3
+ 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+
+do_install() {
+	vbin ${FILESDIR}/composer8.1
+
+	vinstall composer.phar 644 usr/libexec composer.phar8.1
+	vlicense LICENSE
+
+	vmkdir /etc/php8.1/conf.d
+	printf 'extension=%s\n' phar iconv openssl zip \
+		>${DESTDIR}/etc/php8.1/conf.d/composer.ini
+}

From babe311c78ebcd909b4ce797e0b84429d2efba76 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 15 Mar 2022 15:31:58 -0400
Subject: [PATCH 14/14] New package: xdebug8.1-3.1.4

---
 srcpkgs/xdebug8.1/INSTALL.msg |  1 +
 srcpkgs/xdebug8.1/template    | 29 +++++++++++++++++++++++++++++
 srcpkgs/xdebug8.1/update      |  2 ++
 3 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/xdebug8.1/INSTALL.msg
 create mode 100644 srcpkgs/xdebug8.1/template
 create mode 100644 srcpkgs/xdebug8.1/update

diff --git a/srcpkgs/xdebug8.1/INSTALL.msg b/srcpkgs/xdebug8.1/INSTALL.msg
new file mode 100644
index 000000000000..04e3343216f7
--- /dev/null
+++ b/srcpkgs/xdebug8.1/INSTALL.msg
@@ -0,0 +1 @@
+You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug8.1/template b/srcpkgs/xdebug8.1/template
new file mode 100644
index 000000000000..44a1940425f8
--- /dev/null
+++ b/srcpkgs/xdebug8.1/template
@@ -0,0 +1,29 @@
+# Template file for 'xdebug8.1'
+pkgname=xdebug8.1
+version=3.1.4
+revision=1
+wrksrc="xdebug-${version}"
+build_style=gnu-configure
+configure_args="--with-php-config=/usr/bin/php-config8.1"
+hostmakedepends="autoconf"
+makedepends="php8.1-devel"
+short_desc="PHP debugging extension"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="PHP-3.0"
+homepage="http://xdebug.org"
+changelog="https://xdebug.org/updates"
+distfiles="http://xdebug.org/files/xdebug-${version}.tgz"
+checksum=4195926f9f6c4e802ff749bb2ca85ac50636719a72e5389e372e35ef523505f9
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" php8.1-devel"
+fi
+
+pre_configure() {
+	phpize8.1
+}
+
+do_install() {
+	make INSTALL_ROOT=${DESTDIR} install
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xdebug8.1/update b/srcpkgs/xdebug8.1/update
new file mode 100644
index 000000000000..280b0bc7e3ac
--- /dev/null
+++ b/srcpkgs/xdebug8.1/update
@@ -0,0 +1,2 @@
+site="https://xdebug.org/updates"
+pattern='<dt><a name=.*></a>.*Xdebug \K[\d.]+(?=</dt>)'

  parent reply	other threads:[~2022-04-10  0:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08  2:11 [PR PATCH] New package: php8-8.0.16 TinfoilSubmarine
2022-03-08  2:43 ` TinfoilSubmarine
2022-03-08  2:50 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-03-08  2:55 ` TinfoilSubmarine
2022-03-08 14:28 ` TinfoilSubmarine
2022-03-08 14:31 ` TinfoilSubmarine
2022-03-08 16:54 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-03-08 17:51 ` TinfoilSubmarine
2022-03-08 18:30 ` [PR PATCH] [Updated] [WIP] " TinfoilSubmarine
2022-03-08 19:10 ` TinfoilSubmarine
2022-03-08 19:49 ` TinfoilSubmarine
2022-03-15 19:47 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-03-15 19:49 ` [PR PATCH] [Updated] New packages: php8.0-*, php8.1-*, xdebug8.0/1, composer8.0/1 TinfoilSubmarine
2022-03-16  3:47 ` TinfoilSubmarine
2022-03-27  8:31 ` [PR REVIEW] " paper42
2022-03-28 14:17 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-03-28 14:17 ` [PR REVIEW] " TinfoilSubmarine
2022-03-28 14:17 ` TinfoilSubmarine
2022-03-28 14:47 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-04-09 10:21 ` [PR REVIEW] " paper42
2022-04-10  0:22 ` TinfoilSubmarine [this message]
2022-04-11 13:19 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-04-19 17:19 ` TinfoilSubmarine
2022-04-19 18:45 ` New packages: php8.[01]*, xdebug8.[01], composer8.[01] paper42
2022-04-19 19:24 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-04-19 20:01 ` TinfoilSubmarine
2022-04-29 10:33 ` [PR PATCH] [Merged]: " paper42
2022-05-06 20:10 ` jchook
2022-05-06 20:10 ` jchook
2022-05-06 20:10 ` jchook
2022-05-06 21:02 ` TinfoilSubmarine
2022-05-06 21:19 ` paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220410002227.KDbZLXnbuoppKGBukrO3DL88qadjBp-td4Bb2chb9ZA@z \
    --to=tinfoilsubmarine@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).