From 9e0c1e8732244af022d9dd5dbe58f4621c76c55c Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Wed, 7 Aug 2024 15:10:10 -0400 Subject: [PATCH] php8.2: update to 8.2.22, fix gd image support on cross builds. --- .../patches/ac_fn_c_try_run_cross.patch | 166 ++++++++++++++++++ srcpkgs/php8.2/patches/php-cross-config.patch | 14 +- srcpkgs/php8.2/template | 6 +- 3 files changed, 176 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/php8.2/patches/ac_fn_c_try_run_cross.patch diff --git a/srcpkgs/php8.2/patches/ac_fn_c_try_run_cross.patch b/srcpkgs/php8.2/patches/ac_fn_c_try_run_cross.patch new file mode 100644 index 00000000000..2205168a786 --- /dev/null +++ b/srcpkgs/php8.2/patches/ac_fn_c_try_run_cross.patch @@ -0,0 +1,166 @@ +diff --git a/configure b/configure +index 88b317c..fdb8e73 100755 +--- a/configure ++++ b/configure +@@ -2600,7 +2600,13 @@ $as_echo "$ac_try_echo"; } >&5 + esac + eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" + $as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_try") 2>&5 ++ if test "$cross_compiling" = "yes"; then ++ # Use qemu-user-static to run the executable ++ qemu_exec="QEMU_LD_PREFIX=${XBPS_CROSS_BASE} qemu-${XBPS_TARGET_QEMU_MACHINE}-static" ++ (eval "$qemu_exec $ac_try") 2>&5 ++ else ++ (eval "$ac_try") 2>&5 ++ fi + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +@@ -37619,12 +37619,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -37662,7 +37656,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -37686,12 +37679,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -37729,7 +37716,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -37753,12 +37739,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -37796,7 +37776,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -37820,12 +37799,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -37863,7 +37836,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -37887,12 +37859,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -37930,7 +37896,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -37954,12 +37919,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -37997,7 +37956,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -38021,12 +37979,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test "$cross_compiling" = yes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -38064,7 +38016,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' diff --git a/srcpkgs/php8.2/patches/php-cross-config.patch b/srcpkgs/php8.2/patches/php-cross-config.patch index 1956e6690ab..21c5e1923b2 100644 --- a/srcpkgs/php8.2/patches/php-cross-config.patch +++ b/srcpkgs/php8.2/patches/php-cross-config.patch @@ -1,22 +1,22 @@ diff --git a/configure b/configure -index 1f5489d..a7e9276 100755 +index 88b317c..816799f 100755 --- a/configure +++ b/configure -@@ -63653,7 +63653,7 @@ printf %s "checking for pg_config... " >&6; } +@@ -61564,7 +61564,7 @@ $as_echo_n "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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5 + $as_echo "$PG_CONFIG" >&6; } PGSQL_INCLUDE=`$PG_CONFIG --includedir` -@@ -65177,7 +65177,7 @@ printf %s "checking for pg_config... " >&6; } +@@ -63090,7 +63090,7 @@ $as_echo_n "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; } + { $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.2/template b/srcpkgs/php8.2/template index 1e330598b96..50e6c851b1c 100644 --- a/srcpkgs/php8.2/template +++ b/srcpkgs/php8.2/template @@ -1,7 +1,7 @@ # Template file for 'php8.2' # rebuild php8.2-apcu and php8.2-imagick when updating this package pkgname=php8.2 -version=8.2.21 +version=8.2.22 revision=1 _php_version=8.2 hostmakedepends="bison pkg-config apache-devel" @@ -18,7 +18,7 @@ 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=0c6323699309a4d2e71057f01bc071b199f240973c349287b667a3ab36a496c6 +checksum=44197016c9eeed5c50523e20eb44adc4dd9d84ac08bdf9e46077e775d467d7d0 provides="php-runtime-${version}_1" conf_files="/etc/php${_php_version}/php.ini" @@ -27,7 +27,7 @@ lib32disabled=yes if [ -n "$CROSS_BUILD" ]; then # phar and pear need php to build - hostmakedepends+=" php${_php_version}" + hostmakedepends+=" php${_php_version} qemu-user-static" CFLAGS+=" -DHAVE_LIBDL -DHAVE_DLOPEN -DHAVE_DLSYM