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] php/composer: turn into meta package as 7.4 is EOL; php8.[01] and composer8.[01]: add alternatives groups.
Date: Tue, 06 Dec 2022 18:34:34 +0100	[thread overview]
Message-ID: <20221206173434.gsUByqLCsJqHJqS0RAiK8effnFsZOrhzTOGmPBdUkKM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38536@inbox.vuxu.org>

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

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

https://github.com/TinfoilSubmarine/void-packages maint/php
https://github.com/void-linux/void-packages/pull/38536

php/composer: turn into meta package as 7.4 is EOL; php8.[01] and composer8.[01]: add alternatives groups.
### Should not be merged until PHP 7.4 EOL (28 Nov 2022): https://www.php.net/supported-versions.php

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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
-->

Packages depending on `php`:
- [x] ampache https://github.com/void-linux/void-packages/pull/38973
- [x] composer (need to decide how to handle running with multiple PHP versions)
- [x] phoronix-test-suite (verified to work with the `php8.1` interpreter after symlinking `/usr/bin/php8.1` to `/usr/bin/php`. Since it works with both, I don't think there is any change needed to the `phoronix-test-suite` package.)
- [x] phpMyAdmin https://github.com/void-linux/void-packages/pull/38984

Packages depending on `php-gd`:
- [x] zabbix-frontend-php https://github.com/void-linux/void-packages/pull/38982

Packages depending on `php-mysql`:
- [x] zabbix-frontend-php https://github.com/void-linux/void-packages/pull/38982

Packages with `php-devel` in *makedepends:
- [x] libguestfs (configures and compiles fine with 8.1, but php is not enabled by default anyway)

Other things to take care of:
- [x] php-pear

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

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

From 90649f02547cd8aaf1cc78aab212f3c113483390 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 6 Dec 2022 12:02:06 -0500
Subject: [PATCH 1/7] New package: php-meta-8.1

7.4 is EOL, so pull all packages into a single location to enable easier
version transitions
---
 srcpkgs/composer                              |   1 +
 srcpkgs/composer/template                     |  24 --
 srcpkgs/php                                   |   1 +
 srcpkgs/php-apcu                              |   1 +
 srcpkgs/php-apcu/INSTALL.msg                  |   3 -
 srcpkgs/php-apcu/template                     |  28 --
 srcpkgs/php-apcu/update                       |   2 -
 srcpkgs/php-ast                               |   1 +
 srcpkgs/php-ast/INSTALL.msg                   |   2 -
 srcpkgs/php-ast/template                      |  30 --
 srcpkgs/php-igbinary                          |   1 +
 srcpkgs/php-igbinary/template                 |  24 --
 srcpkgs/php-imagick                           |   1 +
 srcpkgs/php-imagick/INSTALL.msg               |   3 -
 ...le-libmagick-header-file-search-path.patch |  17 -
 srcpkgs/php-imagick/template                  |  31 --
 srcpkgs/php-meta/template                     | 173 +++++++++
 srcpkgs/php/files/apache.conf                 |  13 -
 srcpkgs/php/files/php-fpm/run                 |   3 -
 srcpkgs/php/patches/php-706-crypt.patch       |  15 -
 srcpkgs/php/patches/php-cross-config.patch    |  41 --
 srcpkgs/php/patches/php-enchant2.patch        | 103 -----
 srcpkgs/php/patches/php-fpm.patch             |  13 -
 .../patches/php-ltmain-sysroot-support.patch  |  39 --
 srcpkgs/php/patches/php-pear-cross.patch      |  23 --
 srcpkgs/php/patches/php-phar-cross.patch      |  29 --
 .../patches/php-phpize-sysroot-support.patch  |  28 --
 srcpkgs/php/patches/php.ini.patch             |  24 --
 srcpkgs/php/template                          | 353 ------------------
 srcpkgs/php/update                            |   2 -
 srcpkgs/xdebug                                |   1 +
 srcpkgs/xdebug/INSTALL.msg                    |   1 -
 srcpkgs/xdebug/template                       |  26 --
 srcpkgs/xdebug/update                         |   1 -
 34 files changed, 180 insertions(+), 878 deletions(-)
 create mode 120000 srcpkgs/composer
 delete mode 100644 srcpkgs/composer/template
 create mode 120000 srcpkgs/php
 create mode 120000 srcpkgs/php-apcu
 delete mode 100644 srcpkgs/php-apcu/INSTALL.msg
 delete mode 100644 srcpkgs/php-apcu/template
 delete mode 100644 srcpkgs/php-apcu/update
 create mode 120000 srcpkgs/php-ast
 delete mode 100644 srcpkgs/php-ast/INSTALL.msg
 delete mode 100644 srcpkgs/php-ast/template
 create mode 120000 srcpkgs/php-igbinary
 delete mode 100644 srcpkgs/php-igbinary/template
 create mode 120000 srcpkgs/php-imagick
 delete mode 100644 srcpkgs/php-imagick/INSTALL.msg
 delete mode 100644 srcpkgs/php-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
 delete mode 100644 srcpkgs/php-imagick/template
 create mode 100644 srcpkgs/php-meta/template
 delete mode 100644 srcpkgs/php/files/apache.conf
 delete mode 100755 srcpkgs/php/files/php-fpm/run
 delete mode 100644 srcpkgs/php/patches/php-706-crypt.patch
 delete mode 100644 srcpkgs/php/patches/php-cross-config.patch
 delete mode 100644 srcpkgs/php/patches/php-enchant2.patch
 delete mode 100644 srcpkgs/php/patches/php-fpm.patch
 delete mode 100644 srcpkgs/php/patches/php-ltmain-sysroot-support.patch
 delete mode 100644 srcpkgs/php/patches/php-pear-cross.patch
 delete mode 100644 srcpkgs/php/patches/php-phar-cross.patch
 delete mode 100644 srcpkgs/php/patches/php-phpize-sysroot-support.patch
 delete mode 100644 srcpkgs/php/patches/php.ini.patch
 delete mode 100644 srcpkgs/php/template
 delete mode 100644 srcpkgs/php/update
 create mode 120000 srcpkgs/xdebug
 delete mode 100644 srcpkgs/xdebug/INSTALL.msg
 delete mode 100644 srcpkgs/xdebug/template
 delete mode 100644 srcpkgs/xdebug/update

diff --git a/srcpkgs/composer b/srcpkgs/composer
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/composer
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/composer/template b/srcpkgs/composer/template
deleted file mode 100644
index 439b27811c5a..000000000000
--- a/srcpkgs/composer/template
+++ /dev/null
@@ -1,24 +0,0 @@
-# Template file for 'composer'
-pkgname=composer
-version=2.4.2
-revision=1
-build_style=fetch
-depends="php"
-short_desc="Dependency manager for PHP"
-maintainer="Felipe Nogueira <contato.fnog@gmail.com>"
-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="8fe98a01050c92cc6812b8ead3bd5b6e0bcdc575ce7a93b242bde497a31d7732
- 7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
-
-do_install() {
-	vbin composer.phar composer
-	vlicense LICENSE
-
-	vmkdir /etc/php/conf.d
-	printf 'extension=%s\n' phar iconv openssl zip \
-		>${DESTDIR}/etc/php/conf.d/composer.ini
-}
diff --git a/srcpkgs/php b/srcpkgs/php
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/php
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/php-apcu b/srcpkgs/php-apcu
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/php-apcu
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/php-apcu/INSTALL.msg b/srcpkgs/php-apcu/INSTALL.msg
deleted file mode 100644
index 9da8a70ccc2b..000000000000
--- a/srcpkgs/php-apcu/INSTALL.msg
+++ /dev/null
@@ -1,3 +0,0 @@
-To enable APCu add the following line to your php.ini:
-
-	extension=apcu.so
diff --git a/srcpkgs/php-apcu/template b/srcpkgs/php-apcu/template
deleted file mode 100644
index 143322579e0b..000000000000
--- a/srcpkgs/php-apcu/template
+++ /dev/null
@@ -1,28 +0,0 @@
-# Template file for 'php-apcu'
-pkgname=php-apcu
-version=5.1.22
-revision=1
-build_wrksrc=apcu-$version
-build_style=gnu-configure
-make_check_target=test
-hostmakedepends="autoconf pcre2-devel php-devel"
-makedepends="php-devel"
-depends="php>=7.4.3"
-short_desc="In-memory key-value store for PHP"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="PHP-3.01"
-homepage="https://pecl.php.net/package/APCu"
-distfiles="https://pecl.php.net/get/apcu-${version}.tgz"
-checksum=010a0d8fd112e1ed7a52a356191da3696a6b76319423f7b0dfdeaeeafcb41a1e
-
-pre_configure() {
-	phpize
-}
-
-pre_install() {
-	make_install_args="INSTALL_ROOT=$DESTDIR"
-}
-
-post_install() {
-	rm -r $DESTDIR/usr/include
-}
diff --git a/srcpkgs/php-apcu/update b/srcpkgs/php-apcu/update
deleted file mode 100644
index ad899519e313..000000000000
--- a/srcpkgs/php-apcu/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://pecl.php.net/package/APCu"
-pattern="apcu-\K[\d\.]*(?=\.tgz)"
diff --git a/srcpkgs/php-ast b/srcpkgs/php-ast
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/php-ast
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/php-ast/INSTALL.msg b/srcpkgs/php-ast/INSTALL.msg
deleted file mode 100644
index 0dd0b5df2d96..000000000000
--- a/srcpkgs/php-ast/INSTALL.msg
+++ /dev/null
@@ -1,2 +0,0 @@
-To enable the ast extension please add the following to php.ini:
-	extension=ast.so 
diff --git a/srcpkgs/php-ast/template b/srcpkgs/php-ast/template
deleted file mode 100644
index 615361fe50fe..000000000000
--- a/srcpkgs/php-ast/template
+++ /dev/null
@@ -1,30 +0,0 @@
-# Template file for 'php-ast'
-pkgname=php-ast
-version=1.1.0
-revision=1
-build_style=gnu-configure
-make_check_target="test"
-hostmakedepends="php-devel autoconf"
-makedepends="php-devel"
-depends="php>=7.4.3"
-checkdepends="${depends}"
-short_desc="Exposes the abstract syntax tree generated by PHP 7"
-maintainer="Merlin Diavova <merlindiavova@gmail.com>"
-license="BSD-3-Clause"
-homepage="https://github.com/nikic/php-ast"
-distfiles="https://pecl.php.net/get/ast-${version}.tgz"
-checksum=ee3d4f67e24d82e4d340806a24052012e4954d223122949377665427443e6d13
-make_check_pre="env NO_INTERACTION=1"
-
-post_extract() {
-	mv ast-$version/* .
-}
-
-pre_configure() {
-	phpize
-}
-
-do_install() {
-	make INSTALL_ROOT=${DESTDIR} install
-	vlicense LICENSE
-}
diff --git a/srcpkgs/php-igbinary b/srcpkgs/php-igbinary
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/php-igbinary
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/php-igbinary/template b/srcpkgs/php-igbinary/template
deleted file mode 100644
index d8b3e1aa25dd..000000000000
--- a/srcpkgs/php-igbinary/template
+++ /dev/null
@@ -1,24 +0,0 @@
-# Template file for 'php-igbinary'
-pkgname=php-igbinary
-version=3.2.12
-revision=1
-build_wrksrc=igbinary-$version
-build_style=gnu-configure
-hostmakedepends="autoconf php-devel"
-makedepends="php-devel"
-depends="php>7.4.3"
-short_desc="Igbinary is a drop in replacement for the standard php serializer"
-maintainer="Merlin Diavova <merlindiavova@gmail.com>"
-license="BSD-3-Clause"
-homepage="https://github.com/igbinary/igbinary/"
-distfiles="https://pecl.php.net/get/igbinary-${version}.tgz"
-checksum=b69cffdf054cc6e6b02893ff77cf440cec8c7a87d2dc00c1af183c212269581c
-
-pre_configure() {
-	phpize
-}
-
-do_install() {
-	make INSTALL_ROOT="${DESTDIR}" install
-	vlicense COPYING
-}
diff --git a/srcpkgs/php-imagick b/srcpkgs/php-imagick
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/php-imagick
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/php-imagick/INSTALL.msg b/srcpkgs/php-imagick/INSTALL.msg
deleted file mode 100644
index 00497519fcee..000000000000
--- a/srcpkgs/php-imagick/INSTALL.msg
+++ /dev/null
@@ -1,3 +0,0 @@
-To enable the Imagick extension add the following line to your php.ini:
-
-	extension=imagick.so
diff --git a/srcpkgs/php-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch b/srcpkgs/php-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
deleted file mode 100644
index 16b8aaa57371..000000000000
--- a/srcpkgs/php-imagick/patches/0001-fix-cross-compile-libmagick-header-file-search-path.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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/php-imagick/template b/srcpkgs/php-imagick/template
deleted file mode 100644
index 1f3248f28884..000000000000
--- a/srcpkgs/php-imagick/template
+++ /dev/null
@@ -1,31 +0,0 @@
-# Template file for 'php-imagick'
-pkgname=php-imagick
-version=3.4.4
-revision=5
-build_style=gnu-configure
-configure_args="--with-imagick=${XBPS_CROSS_BASE}/usr"
-hostmakedepends="php-devel autoconf pkg-config"
-makedepends="php-devel pcre2-devel libmagick-devel"
-depends="php>=7.4.3"
-short_desc="Provides a PHP wrapper to the ImageMagick library"
-maintainer="Alin Dobre <alin.dobre@outlook.com>"
-license="PHP-3.01"
-homepage="https://pecl.php.net/package/imagick"
-distfiles="https://pecl.php.net/get/imagick-$version.tgz"
-checksum=8dd5aa16465c218651fc8993e1faecd982e6a597870fd4b937e9ece02d567077
-
-post_extract() {
-	mv imagick-$version/* .
-}
-
-pre_configure() {
-	phpize
-}
-
-pre_install() {
-	make_install_args="INSTALL_ROOT=$DESTDIR"
-}
-
-post_install() {
-	rm -r $DESTDIR/usr/include
-}
diff --git a/srcpkgs/php-meta/template b/srcpkgs/php-meta/template
new file mode 100644
index 000000000000..d9699722b187
--- /dev/null
+++ b/srcpkgs/php-meta/template
@@ -0,0 +1,173 @@
+# Template file for 'php-meta'
+pkgname=php-meta
+version=8.1
+revision=1
+build_style=meta
+short_desc="Meta package for PHP"
+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"
+
+php_package() {
+	depends="php${version}"
+	build_style=meta
+	short_desc="PHP scripting language meta package"
+	replaces="php-mcrypt<7.2.0"
+}
+
+php-devel_package() {
+	depends="php${version}-devel"
+	build_style=meta
+	short_desc="PHP development files meta package"
+}
+
+php-phpdbg_package() {
+	depends="php${version}-phpdbg"
+	build_style=meta
+	short_desc="PHP interactive debugger meta package"
+}
+
+php-cgi_package() {
+	depends="php${version}-cgi"
+	build_style=meta
+	short_desc="PHP CGI and FCGI SAPI meta package"
+}
+
+php-apache_package() {
+	depends="php${version}-apache"
+	build_style=meta
+	short_desc="PHP Apache SAPI meta package"
+}
+
+php-fpm_package() {
+	depends="php${version}-fpm"
+	build_style=meta
+	short_desc="PHP FastCGI Process Manager meta package"
+}
+
+php-embed_package() {
+	depends="php${version}-embed"
+	build_style=meta
+	short_desc="PHP Embed SAPI meta package"
+}
+
+php-pear_package() {
+	depends="php${version}-pear"
+	build_style=meta
+	short_desc="PHP Extension and Application Repository meta package"
+}
+
+php-enchant_package() {
+	depends="php${version}-enchant"
+	build_style=meta
+	short_desc="PHP enchant module meta package"
+}
+
+php-gd_package() {
+	depends="php${version}-gd"
+	build_style=meta
+	short_desc="PHP gd module meta package"
+}
+
+php-intl_package() {
+	depends="php${version}-intl"
+	build_style=meta
+	short_desc="PHP Internationalization module meta package"
+}
+
+php-ldap_package() {
+	depends="php${version}-ldap"
+	build_style=meta
+	short_desc="PHP LDAP module meta package"
+}
+
+php-mysql_package() {
+	depends="php${version}-mysql"
+	build_style=meta
+	short_desc="PHP MySQL modules meta package"
+}
+
+php-odbc_package() {
+	depends="php${version}-odbc"
+	build_style=meta
+	short_desc="PHP ODBC modules meta package"
+}
+
+php-pgsql_package() {
+	depends="php${version}-pgsql"
+	build_style=meta
+	short_desc="PHP PostgreSQL modules meta package"
+}
+
+php-snmp_package() {
+	depends="php${version}-snmp"
+	build_style=meta
+	short_desc="PHP snmp module meta package"
+}
+
+php-sqlite_package() {
+	depends="php${version}-sqlite"
+	build_style=meta
+	short_desc="PHP sqlite module meta package"
+}
+
+php-tidy_package() {
+	depends="php${version}-tidy"
+	build_style=meta
+	short_desc="PHP tidy HTML module meta package"
+}
+
+php-xsl_package() {
+	depends="php${version}-xsl"
+	build_style=meta
+	short_desc="PHP XSL module meta package"
+}
+
+php-sodium_package() {
+	depends="php${version}-sodium"
+	build_style=meta
+	short_desc="PHP sodium module meta package"
+}
+
+php-ffi_package() {
+	depends="php${version}-ffi"
+	build_style=meta
+	short_desc="PHP FFI module meta package"
+}
+
+php-apcu_package() {
+	depends="php${version}-apcu"
+	build_style=meta
+	short_desc="PHP in-memory key-value store meta package"
+}
+
+php-ast_package() {
+	depends="php${version}-ast"
+	build_style=meta
+	short_desc="PHP abstract syntax tree meta package"
+}
+
+php-igbinary_package() {
+	depends="php${version}-igbinary"
+	build_style=meta
+	short_desc="PHP igbinary drop-in replacement serializer meta package"
+}
+
+php-imagick_package() {
+	depends="php${version}-imagick"
+	build_style=meta
+	short_desc="PHP ImageMagick library wrapper meta package"
+}
+
+xdebug_package() {
+	depends="xdebug${version}"
+	build_style=meta
+	short_desc="PHP debugging extension meta package"
+}
+
+composer_package() {
+	depends="composer${version}"
+	build_style=meta
+	short_desc="PHP dependency manager meta package"
+}
diff --git a/srcpkgs/php/files/apache.conf b/srcpkgs/php/files/apache.conf
deleted file mode 100644
index b516b5e66ffa..000000000000
--- a/srcpkgs/php/files/apache.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# Required modules: dir_module, php7_module
-
-<IfModule dir_module>
-	<IfModule php7_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/php/files/php-fpm/run b/srcpkgs/php/files/php-fpm/run
deleted file mode 100755
index c9c75b0498aa..000000000000
--- a/srcpkgs/php/files/php-fpm/run
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec php-fpm --nodaemonize
diff --git a/srcpkgs/php/patches/php-706-crypt.patch b/srcpkgs/php/patches/php-706-crypt.patch
deleted file mode 100644
index 254f1d2187c2..000000000000
--- a/srcpkgs/php/patches/php-706-crypt.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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/php/patches/php-cross-config.patch b/srcpkgs/php/patches/php-cross-config.patch
deleted file mode 100644
index d6af2c58cb25..000000000000
--- a/srcpkgs/php/patches/php-cross-config.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- 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 php7"
-   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 php7"
-   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/php/patches/php-enchant2.patch b/srcpkgs/php/patches/php-enchant2.patch
deleted file mode 100644
index b82c41211123..000000000000
--- a/srcpkgs/php/patches/php-enchant2.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-diff --git a/configure b/configure
-index 3ece7a4..b832a68 100755
---- a/configure
-+++ b/configure
-@@ -28123,19 +28123,19 @@ $as_echo "$ext_output" >&6; }
- if test "$PHP_ENCHANT" != "no"; then
- 
- pkg_failed=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enchant" >&5
--$as_echo_n "checking for enchant... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enchant-2" >&5
-+$as_echo_n "checking for enchant-2... " >&6; }
- 
- if test -n "$ENCHANT_CFLAGS"; then
-     pkg_cv_ENCHANT_CFLAGS="$ENCHANT_CFLAGS"
-  elif test -n "$PKG_CONFIG"; then
-     if test -n "$PKG_CONFIG" && \
--    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant\""; } >&5
--  ($PKG_CONFIG --exists --print-errors "enchant") 2>&5
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant-2\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "enchant-2") 2>&5
-   ac_status=$?
-   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-   test $ac_status = 0; }; then
--  pkg_cv_ENCHANT_CFLAGS=`$PKG_CONFIG --cflags "enchant" 2>/dev/null`
-+  pkg_cv_ENCHANT_CFLAGS=`$PKG_CONFIG --cflags "enchant-2" 2>/dev/null`
- 		      test "x$?" != "x0" && pkg_failed=yes
- else
-   pkg_failed=yes
-@@ -28147,12 +28147,12 @@ if test -n "$ENCHANT_LIBS"; then
-     pkg_cv_ENCHANT_LIBS="$ENCHANT_LIBS"
-  elif test -n "$PKG_CONFIG"; then
-     if test -n "$PKG_CONFIG" && \
--    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant\""; } >&5
--  ($PKG_CONFIG --exists --print-errors "enchant") 2>&5
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant-2\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "enchant-2") 2>&5
-   ac_status=$?
-   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-   test $ac_status = 0; }; then
--  pkg_cv_ENCHANT_LIBS=`$PKG_CONFIG --libs "enchant" 2>/dev/null`
-+  pkg_cv_ENCHANT_LIBS=`$PKG_CONFIG --libs "enchant-2" 2>/dev/null`
- 		      test "x$?" != "x0" && pkg_failed=yes
- else
-   pkg_failed=yes
-@@ -28173,14 +28173,14 @@ else
-         _pkg_short_errors_supported=no
- fi
-         if test $_pkg_short_errors_supported = yes; then
--	        ENCHANT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "enchant" 2>&1`
-+	        ENCHANT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "enchant-2" 2>&1`
-         else
--	        ENCHANT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "enchant" 2>&1`
-+	        ENCHANT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "enchant-2" 2>&1`
-         fi
- 	# Put the nasty error message in config.log where it belongs
- 	echo "$ENCHANT_PKG_ERRORS" >&5
- 
--	as_fn_error $? "Package requirements (enchant) were not met:
-+	as_fn_error $? "Package requirements (enchant-2) were not met:
- 
- $ENCHANT_PKG_ERRORS
- 
-diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
-index 6ce9d4b..1923726 100644
---- a/ext/enchant/enchant.c
-+++ b/ext/enchant/enchant.c
-@@ -738,7 +738,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
- 			for (i = 0; i < n_sugg; i++) {
- 				add_next_index_string(sugg, suggs[i]);
- 			}
--			enchant_dict_free_suggestions(pdict->pdict, suggs);
-+			enchant_dict_free_string_list(pdict->pdict, suggs);
- 		}
- 
- 
-@@ -793,7 +793,7 @@ PHP_FUNCTION(enchant_dict_suggest)
- 			add_next_index_string(return_value, suggs[i]);
- 		}
- 
--		enchant_dict_free_suggestions(pdict->pdict, suggs);
-+		enchant_dict_free_string_list(pdict->pdict, suggs);
- 	}
- }
- /* }}} */
-@@ -813,7 +813,7 @@ PHP_FUNCTION(enchant_dict_add_to_personal)
- 
- 	PHP_ENCHANT_GET_DICT;
- 
--	enchant_dict_add_to_personal(pdict->pdict, word, wordlen);
-+	enchant_dict_add(pdict->pdict, word, wordlen);
- }
- /* }}} */
- 
-@@ -851,7 +851,7 @@ PHP_FUNCTION(enchant_dict_is_in_session)
- 
- 	PHP_ENCHANT_GET_DICT;
- 
--	RETURN_BOOL(enchant_dict_is_in_session(pdict->pdict, word, wordlen));
-+	RETURN_BOOL(enchant_dict_is_added(pdict->pdict, word, wordlen));
- }
- /* }}} */
- 
diff --git a/srcpkgs/php/patches/php-fpm.patch b/srcpkgs/php/patches/php-fpm.patch
deleted file mode 100644
index 5e55e179f8a4..000000000000
--- a/srcpkgs/php/patches/php-fpm.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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/php/patches/php-ltmain-sysroot-support.patch b/srcpkgs/php/patches/php-ltmain-sysroot-support.patch
deleted file mode 100644
index bbe0a514a9e8..000000000000
--- a/srcpkgs/php/patches/php-ltmain-sysroot-support.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- 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/php/patches/php-pear-cross.patch b/srcpkgs/php/patches/php-pear-cross.patch
deleted file mode 100644
index f9191a50a0b5..000000000000
--- a/srcpkgs/php/patches/php-pear-cross.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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/php/patches/php-phar-cross.patch b/srcpkgs/php/patches/php-phar-cross.patch
deleted file mode 100644
index 1e4e627ec65b..000000000000
--- a/srcpkgs/php/patches/php-phar-cross.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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/php/patches/php-phpize-sysroot-support.patch b/srcpkgs/php/patches/php-phpize-sysroot-support.patch
deleted file mode 100644
index 76cff3f81664..000000000000
--- a/srcpkgs/php/patches/php-phpize-sysroot-support.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- 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/php/patches/php.ini.patch b/srcpkgs/php/patches/php.ini.patch
deleted file mode 100644
index 47197c778d34..000000000000
--- a/srcpkgs/php/patches/php.ini.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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/php/modules/"
- 
- ; Directory where the temporary files should be placed.
- ; Defaults to the system default (see sys_get_temp_dir)
diff --git a/srcpkgs/php/template b/srcpkgs/php/template
deleted file mode 100644
index 7e79418e3554..000000000000
--- a/srcpkgs/php/template
+++ /dev/null
@@ -1,353 +0,0 @@
-# Template file for 'php'
-pkgname=php
-version=7.4.33
-revision=1
-hostmakedepends="bison pkg-config apache-devel"
-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="Steve Prybylski <sa.prybylx@gmail.com>"
-license="PHP-3.01"
-homepage="https://www.php.net"
-changelog="https://www.php.net/ChangeLog-7.php"
-# 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=5a2337996f07c8a097e03d46263b5c98d2c8e355227756351421003bea8f463e
-
-conf_files="/etc/php/php.ini"
-
-lib32disabled=yes
-replaces="php-mcrypt<7.2.0"
-
-if [ -n "$CROSS_BUILD" ]; then
-	# php-pear needs php to build
-	hostmakedepends+=" php"
-	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 \
-		--localstatedir=/var \
-		--with-layout=GNU \
-		--with-config-file-path=/etc/php \
-		--with-config-file-scan-dir=/etc/php/conf.d \
-		--disable-rpath \
-		--mandir=/usr/share/man \
-		--with-pear=/usr/share/pear \
-		"
-
-	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-zip=shared \
-		--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-freetype-dir=$XBPS_CROSS_BASE/usr \
-		--with-gdbm=$XBPS_CROSS_BASE/usr \
-		--with-gettext=shared \
-		--with-gmp=shared \
-		--with-iconv=shared \
-		--with-icu-dir=$XBPS_CROSS_BASE/usr \
-		--with-jpeg-dir=$XBPS_CROSS_BASE/usr \
-		--with-ldap=shared,$XBPS_CROSS_BASE/usr \
-		--with-ldap-sasl \
-		--with-libzip \
-		--with-sodium=shared \
-		--with-mhash \
-		--with-mysql-sock=/run/mysqld/mysqld.sock \
-		--with-mysqli=shared,mysqlnd \
-		--with-openssl=shared \
-		--with-pcre-regex=$XBPS_CROSS_BASE/usr \
-		--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-png-dir=$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-zlib \
-		${configure_args} \
-		"
-	if [ -n "$CROSS_BUILD" ]; then
-		local _make_env="PHAR_PHP=/usr/bin/php PHAR_PHP_MODULES=/usr/lib/php/modules"
-	fi
-
-	EXTENSION_DIR=/usr/lib/php/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"
-	fi
-	make ${_env} install-{modules,cli,build,headers,programs,pharcmd}
-
-	# install php.ini
-	vinstall ${wrksrc}/php.ini-production 644 etc/php php.ini
-	# remove static modules
-	rm -f ${DESTDIR}/usr/lib/php/modules/*.a
-}
-
-php-devel_package() {
-	short_desc+=" - development files"
-	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/php/build
-		vmove usr/bin/php-config
-		vmove usr/bin/phpize
-		vmove usr/share/man/man1/phpize.1
-		vmove usr/share/man/man1/php-config.1
-	}
-}
-
-php-phpdbg_package() {
-	short_desc+=" - interactive debugger"
-	depends="php-${version}_${revision}"
-	pkg_install() {
-		cd ${wrksrc}/build
-		make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg
-	}
-}
-
-php-cgi_package() {
-	short_desc+=' - CGI and FCGI SAPI'
-	depends="php-${version}_${revision}"
-	pkg_install() {
-		cd ${wrksrc}/build
-		make INSTALL_ROOT=${PKGDESTDIR} install-cgi
-	}
-}
-
-php-apache_package() {
-	short_desc+=' - Apache SAPI'
-	depends="php-${version}_${revision}"
-	conf_files="/etc/apache/extra/php7_module.conf"
-	pkg_install() {
-		vinstall ${wrksrc}/build-apache/libs/libphp7.so 755 usr/libexec/httpd/modules
-		vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra php7_module.conf
-	}
-}
-
-php-fpm_package() {
-	short_desc+=' - FastCGI Process Manager'
-	depends="php-${version}_${revision}"
-	conf_files="/etc/php/php-fpm.conf /etc/php/php-fpm.d/*"
-	pkg_install() {
-		cd ${wrksrc}/build
-		make INSTALL_ROOT=${PKGDESTDIR} install-fpm
-		vsv php-fpm
-	}
-}
-
-php-embed_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - Embed SAPI'
-	pkg_install() {
-		cd ${wrksrc}/build
-		make INSTALL_ROOT=${PKGDESTDIR} PHP_SAPI=embed install-sapi
-	}
-}
-
-php-pear_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - PHP Extension and Application Repository'
-	conf_files="/etc/php/pear.conf"
-	pkg_install() {
-		cd ${wrksrc}/build
-		local _env="INSTALL_ROOT=${PKGDESTDIR}"
-		if [ -n "$CROSS_BUILD" ]; then
-			_env+=" PEAR_PHP=/usr/bin/php"
-		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}
-	}
-}
-
-php-enchant_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - enchant module'
-	pkg_install() {
-		vmove usr/lib/php/modules/enchant.so
-	}
-}
-
-php-gd_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - gd module'
-	pkg_install() {
-		vmove usr/lib/php/modules/gd.so
-	}
-}
-
-php-intl_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - Internationalization module'
-	pkg_install() {
-		vmove usr/lib/php/modules/intl.so
-	}
-}
-
-php-ldap_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - LDAP module'
-	pkg_install() {
-		vmove usr/lib/php/modules/ldap.so
-	}
-}
-
-php-mysql_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - MySQL modules'
-	pkg_install() {
-		vmove "usr/lib/php/modules/*mysql*.so"
-	}
-}
-
-php-odbc_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - ODBC modules'
-	pkg_install() {
-		vmove "usr/lib/php/modules/*odbc.so"
-	}
-}
-
-php-pgsql_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - PostgreSQL modules'
-	pkg_install() {
-		vmove "usr/lib/php/modules/*pgsql.so"
-	}
-}
-
-php-snmp_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - snmp module'
-	pkg_install() {
-		vmove usr/lib/php/modules/snmp.so
-	}
-}
-
-php-sqlite_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - sqlite module'
-	pkg_install() {
-		vmove "usr/lib/php/modules/*sqlite*.so"
-	}
-}
-
-php-tidy_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - tidy HTML module'
-	pkg_install() {
-		vmove "usr/lib/php/modules/*tidy*.so"
-	}
-}
-
-php-xsl_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - XSL module'
-	pkg_install() {
-		vmove usr/lib/php/modules/xsl.so
-	}
-}
-
-php-sodium_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - sodium module'
-	pkg_install() {
-		vmove usr/lib/php/modules/sodium.so
-	}
-}
-
-php-ffi_package() {
-	lib32disabled=yes
-	depends="php-${version}_${revision}"
-	short_desc+=' - FFI module'
-	pkg_install() {
-		vmove usr/lib/php/modules/ffi.so
-	}
-}
diff --git a/srcpkgs/php/update b/srcpkgs/php/update
deleted file mode 100644
index caf45c0dd8d1..000000000000
--- a/srcpkgs/php/update
+++ /dev/null
@@ -1,2 +0,0 @@
-ignore="8.*"
-site="https://www.php.net/distributions/"
diff --git a/srcpkgs/xdebug b/srcpkgs/xdebug
new file mode 120000
index 000000000000..961c45da2e37
--- /dev/null
+++ b/srcpkgs/xdebug
@@ -0,0 +1 @@
+php-meta
\ No newline at end of file
diff --git a/srcpkgs/xdebug/INSTALL.msg b/srcpkgs/xdebug/INSTALL.msg
deleted file mode 100644
index 04e3343216f7..000000000000
--- a/srcpkgs/xdebug/INSTALL.msg
+++ /dev/null
@@ -1 +0,0 @@
-You should add 'zend_extension="xdebug.so"' to php.ini
diff --git a/srcpkgs/xdebug/template b/srcpkgs/xdebug/template
deleted file mode 100644
index cab8e455139f..000000000000
--- a/srcpkgs/xdebug/template
+++ /dev/null
@@ -1,26 +0,0 @@
-# Template file for 'xdebug'
-pkgname=xdebug
-version=2.9.3
-revision=1
-build_style=gnu-configure
-hostmakedepends="autoconf php-devel"
-makedepends="php-devel"
-short_desc="PHP debugging extension"
-maintainer="Alexander Mamay <alexander@mamay.su>"
-license="PHP-3.0"
-homepage="http://xdebug.org"
-distfiles="http://xdebug.org/files/${pkgname}-${version,,}.tgz"
-checksum=a63f567f2238d75a2244c2a4bd6f5abee817280b3567f9006c99481488dc977c
-
-post_extract() {
-	mv xdebug-$version/* .
-}
-
-pre_configure() {
-	phpize
-}
-
-do_install() {
-	make INSTALL_ROOT=${DESTDIR} install
-	vlicense LICENSE
-}
diff --git a/srcpkgs/xdebug/update b/srcpkgs/xdebug/update
deleted file mode 100644
index ec68403a03ba..000000000000
--- a/srcpkgs/xdebug/update
+++ /dev/null
@@ -1 +0,0 @@
-ignore="*alpha* *beta*"

From 26d475fd3b0038c5fdda84dd9613761854065db7 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 8 Aug 2022 11:36:52 -0400
Subject: [PATCH 2/7] php8.0: add alternatives groups.

---
 srcpkgs/php8.0/template | 68 ++++++++++++++++++++++++++++-------------
 1 file changed, 47 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/php8.0/template b/srcpkgs/php8.0/template
index 74c50da0e46f..4f3eb8a54661 100644
--- a/srcpkgs/php8.0/template
+++ b/srcpkgs/php8.0/template
@@ -1,7 +1,7 @@
 # Template file for 'php8.0'
 pkgname=php8.0
 version=8.0.25
-revision=1
+revision=2
 _php_version=8.0
 hostmakedepends="bison pkg-config apache-devel"
 makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
@@ -36,6 +36,14 @@ if [ -n "$CROSS_BUILD" ]; then
 		 -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_build() {
 	local _phpconfig="--srcdir=.. \
 		--config-cache \
@@ -159,6 +167,11 @@ do_install() {
 
 php8.0-devel_package() {
 	short_desc+=" - development files"
+	alternatives="
+	 php-devel:php-config:/usr/bin/php-config${_php_version}
+	 php-devel:phpize:/usr/bin/phpize${_php_version}
+	 php-devel:phpize.1:/usr/share/man/man1/phpize${_php_version}.1
+	 php-devel:php-config.1:/usr/share/man/man1/php-config${_php_version}.1"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/php${_php_version}/build"
@@ -171,7 +184,10 @@ php8.0-devel_package() {
 
 php8.0-phpdbg_package() {
 	short_desc+=" - interactive debugger"
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
+	alternatives="
+	 phpdbg:phpdbg:/usr/bin/phpdbg${_php_version}
+	 phpdbg:phpdbg.1:/usr/share/man/man1/phpdbg${_php_version}.1"
 	pkg_install() {
 		cd ${wrksrc}/build
 		make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg
@@ -180,7 +196,10 @@ php8.0-phpdbg_package() {
 
 php8.0-cgi_package() {
 	short_desc+=' - CGI and FCGI SAPI'
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
+	alternatives="
+	 php-cgi:php-cgi:/usr/bin/php-cgi${_php_version}
+	 php-cgi:php-cgi.1:/usr/share/man/man1/php-cgi${_php_version}.1"
 	pkg_install() {
 		cd ${wrksrc}/build
 		make INSTALL_ROOT=${PKGDESTDIR} install-cgi
@@ -189,7 +208,7 @@ php8.0-cgi_package() {
 
 php8.0-apache_package() {
 	short_desc+=' - Apache SAPI'
-	depends="php${_php_version}-${version}_${revision}"
+	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"
@@ -199,8 +218,11 @@ php8.0-apache_package() {
 
 php8.0-fpm_package() {
 	short_desc+=' - FastCGI Process Manager'
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	conf_files="/etc/php${_php_version}/php-fpm.conf /etc/php${_php_version}/php-fpm.d/*"
+	alternatives="
+	 php-fpm:php-fpm:/usr/bin/php-fpm${_php_version}
+	 php-fpm:php-fpm.8:/usr/share/man/man8/php-fpm${_php_version}.8"
 	pkg_install() {
 		cd ${wrksrc}/build
 		make INSTALL_ROOT=${PKGDESTDIR} install-fpm
@@ -210,7 +232,7 @@ php8.0-fpm_package() {
 
 php8.0-embed_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - Embed SAPI'
 	pkg_install() {
 		cd ${wrksrc}/build
@@ -221,10 +243,14 @@ php8.0-embed_package() {
 
 php8.0-pear_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}
-	 php${_php_version}-devel-${version}_${revision} autoconf"
+	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"
+	alternatives="
+	 php-pear:pear:/usr/bin/pear${_php_version}
+	 php-pear:peardev:/usr/bin/peardev${_php_version}
+	 php-pear:pecl:/usr/bin/pecl${_php_version}"
 	pkg_install() {
 		cd ${wrksrc}/build
 		local _env="INSTALL_ROOT=${PKGDESTDIR} PHP_PEAR_PHP_BIN=php${_php_version}"
@@ -242,7 +268,7 @@ php8.0-pear_package() {
 
 php8.0-enchant_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - enchant module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/enchant.so"
@@ -251,7 +277,7 @@ php8.0-enchant_package() {
 
 php8.0-gd_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - gd module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/gd.so"
@@ -260,7 +286,7 @@ php8.0-gd_package() {
 
 php8.0-intl_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - Internationalization module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/intl.so"
@@ -269,7 +295,7 @@ php8.0-intl_package() {
 
 php8.0-ldap_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - LDAP module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/ldap.so"
@@ -278,7 +304,7 @@ php8.0-ldap_package() {
 
 php8.0-mysql_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - MySQL modules'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*mysql*.so"
@@ -287,7 +313,7 @@ php8.0-mysql_package() {
 
 php8.0-odbc_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - ODBC modules'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*odbc.so"
@@ -296,7 +322,7 @@ php8.0-odbc_package() {
 
 php8.0-pgsql_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - PostgreSQL modules'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*pgsql.so"
@@ -305,7 +331,7 @@ php8.0-pgsql_package() {
 
 php8.0-snmp_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - snmp module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/snmp.so"
@@ -314,7 +340,7 @@ php8.0-snmp_package() {
 
 php8.0-sqlite_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - sqlite module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*sqlite*.so"
@@ -323,7 +349,7 @@ php8.0-sqlite_package() {
 
 php8.0-tidy_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - tidy HTML module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*tidy*.so"
@@ -332,7 +358,7 @@ php8.0-tidy_package() {
 
 php8.0-xsl_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - XSL module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/xsl.so"
@@ -341,7 +367,7 @@ php8.0-xsl_package() {
 
 php8.0-sodium_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - sodium module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/sodium.so"
@@ -350,7 +376,7 @@ php8.0-sodium_package() {
 
 php8.0-ffi_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - FFI module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/ffi.so"

From a0d6a553d724eaef9f16782aec2c282dd3c37735 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 8 Aug 2022 11:36:37 -0400
Subject: [PATCH 3/7] php8.1: add alternatives groups.

---
 srcpkgs/php8.1/template | 68 ++++++++++++++++++++++++++++-------------
 1 file changed, 47 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/php8.1/template b/srcpkgs/php8.1/template
index f19688b52f6c..62ab9d1c93aa 100644
--- a/srcpkgs/php8.1/template
+++ b/srcpkgs/php8.1/template
@@ -1,7 +1,7 @@
 # Template file for 'php8.1'
 pkgname=php8.1
 version=8.1.12
-revision=1
+revision=2
 _php_version=8.1
 hostmakedepends="bison pkg-config apache-devel"
 makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
@@ -36,6 +36,14 @@ if [ -n "$CROSS_BUILD" ]; then
 		 -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_build() {
 	local _phpconfig="--srcdir=.. \
 		--config-cache \
@@ -159,6 +167,11 @@ do_install() {
 
 php8.1-devel_package() {
 	short_desc+=" - development files"
+	alternatives="
+	 php-devel:php-config:/usr/bin/php-config${_php_version}
+	 php-devel:phpize:/usr/bin/phpize${_php_version}
+	 php-devel:phpize.1:/usr/share/man/man1/phpize${_php_version}.1
+	 php-devel:php-config.1:/usr/share/man/man1/php-config${_php_version}.1"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/php${_php_version}/build"
@@ -171,7 +184,10 @@ php8.1-devel_package() {
 
 php8.1-phpdbg_package() {
 	short_desc+=" - interactive debugger"
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
+	alternatives="
+	 phpdbg:phpdbg:/usr/bin/phpdbg${_php_version}
+	 phpdbg:phpdbg.1:/usr/share/man/man1/phpdbg${_php_version}.1"
 	pkg_install() {
 		cd ${wrksrc}/build
 		make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg
@@ -180,7 +196,10 @@ php8.1-phpdbg_package() {
 
 php8.1-cgi_package() {
 	short_desc+=' - CGI and FCGI SAPI'
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
+	alternatives="
+	 php-cgi:php-cgi:/usr/bin/php-cgi${_php_version}
+	 php-cgi:php-cgi.1:/usr/share/man/man1/php-cgi${_php_version}.1"
 	pkg_install() {
 		cd ${wrksrc}/build
 		make INSTALL_ROOT=${PKGDESTDIR} install-cgi
@@ -189,7 +208,7 @@ php8.1-cgi_package() {
 
 php8.1-apache_package() {
 	short_desc+=' - Apache SAPI'
-	depends="php${_php_version}-${version}_${revision}"
+	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"
@@ -199,8 +218,11 @@ php8.1-apache_package() {
 
 php8.1-fpm_package() {
 	short_desc+=' - FastCGI Process Manager'
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	conf_files="/etc/php${_php_version}/php-fpm.conf /etc/php${_php_version}/php-fpm.d/*"
+	alternatives="
+	 php-fpm:php-fpm:/usr/bin/php-fpm${_php_version}
+	 php-fpm:php-fpm.8:/usr/share/man/man8/php-fpm${_php_version}.8"
 	pkg_install() {
 		cd ${wrksrc}/build
 		make INSTALL_ROOT=${PKGDESTDIR} install-fpm
@@ -210,7 +232,7 @@ php8.1-fpm_package() {
 
 php8.1-embed_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - Embed SAPI'
 	pkg_install() {
 		cd ${wrksrc}/build
@@ -221,10 +243,14 @@ php8.1-embed_package() {
 
 php8.1-pear_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}
-	 php${_php_version}-devel-${version}_${revision} autoconf"
+	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"
+	alternatives="
+	 php-pear:pear:/usr/bin/pear${_php_version}
+	 php-pear:peardev:/usr/bin/peardev${_php_version}
+	 php-pear:pecl:/usr/bin/pecl${_php_version}"
 	pkg_install() {
 		cd ${wrksrc}/build
 		local _env="INSTALL_ROOT=${PKGDESTDIR} PHP_PEAR_PHP_BIN=php${_php_version}"
@@ -242,7 +268,7 @@ php8.1-pear_package() {
 
 php8.1-enchant_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - enchant module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/enchant.so"
@@ -251,7 +277,7 @@ php8.1-enchant_package() {
 
 php8.1-gd_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - gd module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/gd.so"
@@ -260,7 +286,7 @@ php8.1-gd_package() {
 
 php8.1-intl_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - Internationalization module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/intl.so"
@@ -269,7 +295,7 @@ php8.1-intl_package() {
 
 php8.1-ldap_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - LDAP module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/ldap.so"
@@ -278,7 +304,7 @@ php8.1-ldap_package() {
 
 php8.1-mysql_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - MySQL modules'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*mysql*.so"
@@ -287,7 +313,7 @@ php8.1-mysql_package() {
 
 php8.1-odbc_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - ODBC modules'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*odbc.so"
@@ -296,7 +322,7 @@ php8.1-odbc_package() {
 
 php8.1-pgsql_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - PostgreSQL modules'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*pgsql.so"
@@ -305,7 +331,7 @@ php8.1-pgsql_package() {
 
 php8.1-snmp_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - snmp module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/snmp.so"
@@ -314,7 +340,7 @@ php8.1-snmp_package() {
 
 php8.1-sqlite_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - sqlite module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*sqlite*.so"
@@ -323,7 +349,7 @@ php8.1-sqlite_package() {
 
 php8.1-tidy_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - tidy HTML module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/*tidy*.so"
@@ -332,7 +358,7 @@ php8.1-tidy_package() {
 
 php8.1-xsl_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - XSL module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/xsl.so"
@@ -341,7 +367,7 @@ php8.1-xsl_package() {
 
 php8.1-sodium_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - sodium module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/sodium.so"
@@ -350,7 +376,7 @@ php8.1-sodium_package() {
 
 php8.1-ffi_package() {
 	lib32disabled=yes
-	depends="php${_php_version}-${version}_${revision}"
+	depends="php${_php_version}>=${version}_${revision}"
 	short_desc+=' - FFI module'
 	pkg_install() {
 		vmove "usr/lib/php${_php_version}/modules/ffi.so"

From 2088554bf7413969dca462ab0f71b97c1fed91be Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 8 Aug 2022 12:00:05 -0400
Subject: [PATCH 4/7] composer8.0: add alternatives group.

---
 srcpkgs/composer8.0/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/composer8.0/template b/srcpkgs/composer8.0/template
index b55bc86366e4..61fd5f0c0c55 100644
--- a/srcpkgs/composer8.0/template
+++ b/srcpkgs/composer8.0/template
@@ -1,7 +1,7 @@
 # Template file for 'composer8.0'
 pkgname=composer8.0
 version=2.4.2
-revision=1
+revision=2
 build_style=fetch
 depends="php8.0"
 short_desc="Dependency manager for PHP"
@@ -13,6 +13,7 @@ distfiles="https://github.com/composer/composer/releases/download/${version}/com
  https://raw.githubusercontent.com/composer/composer/main/LICENSE"
 checksum="8fe98a01050c92cc6812b8ead3bd5b6e0bcdc575ce7a93b242bde497a31d7732
  7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.0"
 
 do_install() {
 	vbin ${FILESDIR}/composer8.0

From 8363d27793a9045bee9820dc090e3e9fe1134743 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 8 Aug 2022 11:58:52 -0400
Subject: [PATCH 5/7] composer8.1: add alternatives group.

---
 srcpkgs/composer8.1/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/composer8.1/template b/srcpkgs/composer8.1/template
index 924dff92a42d..1e1db796fe1d 100644
--- a/srcpkgs/composer8.1/template
+++ b/srcpkgs/composer8.1/template
@@ -1,7 +1,7 @@
 # Template file for 'composer8.1'
 pkgname=composer8.1
 version=2.4.2
-revision=1
+revision=2
 build_style=fetch
 depends="php8.1"
 short_desc="Dependency manager for PHP"
@@ -13,6 +13,7 @@ distfiles="https://github.com/composer/composer/releases/download/${version}/com
  https://raw.githubusercontent.com/composer/composer/main/LICENSE"
 checksum="8fe98a01050c92cc6812b8ead3bd5b6e0bcdc575ce7a93b242bde497a31d7732
  7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
+alternatives="composer:composer:/usr/bin/composer8.1"
 
 do_install() {
 	vbin ${FILESDIR}/composer8.1

From 2adca0f6333d90cccecaadd58420ac5f356bc4dd Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 28 Nov 2022 14:49:32 -0500
Subject: [PATCH 6/7] phoronix-test-suite: depend on php8.1.

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

diff --git a/srcpkgs/phoronix-test-suite/template b/srcpkgs/phoronix-test-suite/template
index 4824b65dd40d..16b4034bec27 100644
--- a/srcpkgs/phoronix-test-suite/template
+++ b/srcpkgs/phoronix-test-suite/template
@@ -1,8 +1,8 @@
 # Template file for 'phoronix-test-suite'
 pkgname=phoronix-test-suite
 version=10.8.4
-revision=1
-depends="php"
+revision=2
+depends="php8.1"
 short_desc="Comprehensive testing and benchmarking platform for Linux"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"

From 72af78c83449107547a5b30d8605aebab67254ba Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 28 Nov 2022 14:49:58 -0500
Subject: [PATCH 7/7] phpMyAdmin: depend on php8.1.

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

diff --git a/srcpkgs/phpMyAdmin/template b/srcpkgs/phpMyAdmin/template
index c4ee6fa3a0a0..7f0b5f024df5 100644
--- a/srcpkgs/phpMyAdmin/template
+++ b/srcpkgs/phpMyAdmin/template
@@ -1,9 +1,9 @@
 # Template file for 'phpMyAdmin'
 pkgname=phpMyAdmin
 version=5.2.0
-revision=1
+revision=2
 conf_files="/etc/webapps/phpMyAdmin/config.inc.php"
-depends="php mariadb"
+depends="php8.1 mariadb"
 short_desc="Web interface for MySQL and MariaDB"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="GPL-2.0-only"

  parent reply	other threads:[~2022-12-06 17:34 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 16:45 [PR PATCH] php/php8.0/php8.1 and composer/composer8.0/composer8.1: " TinfoilSubmarine
2022-08-08 23:37 ` paper42
2022-08-09 18:08 ` Chocimier
2022-08-09 18:43 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-08-09 18:45 ` TinfoilSubmarine
2022-08-29 12:37 ` [PR PATCH] [Updated] [NOMERGE] php/composer: turn into meta package as 7.4 is EOL; php8.[01] and composer8.[01]: " TinfoilSubmarine
2022-08-29 12:49 ` TinfoilSubmarine
2022-08-29 12:58 ` [PR PATCH] [Updated] [WIP] " TinfoilSubmarine
2022-08-29 13:10 ` TinfoilSubmarine
2022-08-29 13:18 ` TinfoilSubmarine
2022-08-29 13:47 ` TinfoilSubmarine
2022-08-29 14:57 ` TinfoilSubmarine
2022-08-30 18:42 ` TinfoilSubmarine
2022-08-30 21:19 ` [PR REVIEW] " paper42
2022-08-31 12:41 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-08-31 12:44 ` [PR REVIEW] " TinfoilSubmarine
2022-11-17 14:33 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-11-27 10:33 ` paper42
2022-11-28 20:01 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-12-01 13:15 ` TinfoilSubmarine
2022-12-04 13:52 ` [PR REVIEW] " paper42
2022-12-04 13:52 ` paper42
2022-12-04 13:52 ` paper42
2022-12-04 13:52 ` paper42
2022-12-04 13:52 ` paper42
2022-12-06 15:45 ` TinfoilSubmarine
2022-12-06 17:34 ` TinfoilSubmarine [this message]
2022-12-06 17:35 ` TinfoilSubmarine
2022-12-06 19:14 ` paper42
2022-12-06 19:14 ` paper42
2022-12-07 14:25 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-12-08 18:42 ` [PR REVIEW] " TinfoilSubmarine
2022-12-15 17:10 ` paper42
2022-12-15 17:47 ` TinfoilSubmarine
2022-12-25  0:00 ` paper42
2022-12-25  0:03 ` paper42
2023-01-04 20:41 ` TinfoilSubmarine
2023-01-20 15:38 ` [PR PATCH] [Updated] " TinfoilSubmarine
2023-01-20 15:43 ` [PR REVIEW] " TinfoilSubmarine
2023-02-15 19:29 ` [PR PATCH] [Updated] " TinfoilSubmarine
2023-02-21 18:34 ` [PR REVIEW] " TinfoilSubmarine
2023-02-21 23:50 ` paper42
2023-02-28 22:36 ` paper42
2023-03-01 13:23 ` [PR PATCH] [Updated] " TinfoilSubmarine
2023-03-01 13:26 ` [PR REVIEW] " TinfoilSubmarine
2023-03-02 21:25 ` paper42
2023-03-02 21:58 ` [PR PATCH] [Updated] " TinfoilSubmarine
2023-03-02 21:59 ` [PR REVIEW] " TinfoilSubmarine
2023-03-04 22:05 ` [PR PATCH] [Merged]: " paper42
2023-04-08  3:34 ` jchook

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=20221206173434.gsUByqLCsJqHJqS0RAiK8effnFsZOrhzTOGmPBdUkKM@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).