php8.1: update to 8.1.31.

- enable fpm ACLs
- clean up patches
- generate configure locally instead of using vendored for ease of
  patching
- add user for php-fpm instead of using uncreated `http` user
This commit is contained in:
Joel Beckmeyer 2024-09-17 09:20:36 -04:00 committed by John Zimmermann
parent e9426fbb77
commit 57f20971a5
10 changed files with 52 additions and 28 deletions

View File

@ -0,0 +1,26 @@
diff --git a/ext/pdo_pgsql/config.m4 b/ext/pdo_pgsql/config.m4
index 80ffd97..d8cad47 100644
--- a/ext/pdo_pgsql/config.m4
+++ b/ext/pdo_pgsql/config.m4
@@ -20,7 +20,7 @@ if test "$PHP_PDO_PGSQL" != "no"; then
fi
done
- if test -n "$PG_CONFIG"; then
+ if test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"; then
AC_MSG_RESULT([$PG_CONFIG])
PGSQL_INCLUDE=`$PG_CONFIG --includedir`
PGSQL_LIBDIR=`$PG_CONFIG --libdir`
diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4
index 669a9f7..7e5bf7f 100644
--- a/ext/pgsql/config.m4
+++ b/ext/pgsql/config.m4
@@ -18,7 +18,7 @@ if test "$PHP_PGSQL" != "no"; then
fi
done
- if test -n "$PG_CONFIG"; then
+ if test -n "$PG_CONFIG" && test "x$cross_compiling" != "xyes"; then
AC_MSG_RESULT([$PG_CONFIG])
PGSQL_INCLUDE=`$PG_CONFIG --includedir`
PGSQL_LIBDIR=`$PG_CONFIG --libdir`

View File

@ -1,3 +1,12 @@
PHP's phpize is based on a very old libtool to generate build files for its
extensions. This libtool does not support .la files with '=' to support
sysroot.
In order to support more PHP extension cross compilation this modifies
ltmain.sh to support such path. This is a bit hackish has it only get sysroot
from the used toolchain; the proper way to fix that is to have PHP developpers
to update the autotools file used to build there extensions.
--- a/build/ltmain.sh 2021-09-09 15:19:14.822208365 +0200
+++ b/build/ltmain.sh 2021-09-09 15:47:55.397011151 +0200
@@ -2375,6 +2375,13 @@ EOF

View File

@ -1,3 +1,6 @@
TODO: This is apparently needed on musl, not sure what the error is, might be
something to dig in to.
--- a/ext/standard/crypt.c 2016-04-28 14:13:00.000000000 -0400
+++ b/ext/standard/crypt.c 2016-04-28 21:45:24.340955313 -0400
@@ -267,6 +267,12 @@

View File

@ -1,22 +0,0 @@
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`

View File

@ -1,15 +1,15 @@
# Template file for 'php8.1'
# rebuild php8.1-apcu and php8.1-imagick when updating this package
pkgname=php8.1
version=8.1.29
version=8.1.31
revision=1
_php_version=8.1
hostmakedepends="bison pkg-config apache-devel"
hostmakedepends="bison pkg-config apache-devel autoconf"
makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel
libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel
postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel
libffi-devel oniguruma-devel gd-devel"
libffi-devel oniguruma-devel gd-devel acl-devel"
short_desc="HTML-embedded scripting language"
maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
license="PHP-3.01"
@ -18,9 +18,12 @@ changelog="https://raw.githubusercontent.com/php/php-src/php-${version}/NEWS"
# this is the source where the www.php.net code pulls the tarballs it serves
# at https://www.php.net/distributions/
distfiles="https://github.com/php/web-php-distributions/raw/master/php-${version}.tar.gz"
checksum=8b2609bf1d3173aa38269a9af21532c65f730aadd3051f9aae011eea9e246de5
checksum=618923b407c4575bfee085f00c4aaa16a5cc86d4b1eb893c0f352d61541bbfb1
provides="php-runtime-${version}_1"
system_accounts="_phpfpm"
_phpfpm_homedir="/var/empty"
conf_files="/etc/php${_php_version}/php.ini"
lib32disabled=yes
@ -50,6 +53,10 @@ alternatives="
php:phar.phar.1:/usr/share/man/man1/phar${_php_version}.phar.1
php:php.1:/usr/share/man/man1/php${_php_version}.1"
do_configure() {
autoconf -f
}
do_build() {
local _phpconfig="--srcdir=.. \
--config-cache \
@ -140,8 +147,9 @@ do_build() {
--host=${XBPS_CROSS_TRIPLET} \
--enable-cgi \
--enable-fpm \
--with-fpm-user=http \
--with-fpm-group=http \
--with-fpm-user=_phpfpm \
--with-fpm-group=_phpfpm \
--with-fpm-acl \
--enable-embed=shared \
${_phpextensions}
make ${makejobs} ${_make_env}