summaryrefslogtreecommitdiff
path: root/dev-lang/php/files/php-8.3.9-gd-cachevars.patch
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2024-07-09 15:16:23 -0400
committerMichael Orlitzky <mjo@gentoo.org>2024-07-10 10:07:08 -0400
commit0771e0a34345350b76153a1d4826dbec82e0dbea (patch)
tree36c8a5384f7ebde8e2345b07b5303d34a1ddb3f2 /dev-lang/php/files/php-8.3.9-gd-cachevars.patch
parent4dcab49aee7096c9a1fc52b5136ee080bb3b24e1 (diff)
downloadgentoo-0771e0a34345350b76153a1d4826dbec82e0dbea.tar.gz
gentoo-0771e0a34345350b76153a1d4826dbec82e0dbea.tar.bz2
gentoo-0771e0a34345350b76153a1d4826dbec82e0dbea.zip
dev-lang/php: add 8.3.9, drop 8.3.8
Various improvements on top of the version bump: * The system copy of media-libs/gd is now used. * Autoconf cache variables are overridden to allow cross-compiles with external libraries. * New USE=opcache-jit flag to control the use of a JIT within the opcache extension. Closes: https://bugs.gentoo.org/857597 Closes: https://bugs.gentoo.org/906585 Bug: https://bugs.gentoo.org/931884 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'dev-lang/php/files/php-8.3.9-gd-cachevars.patch')
-rw-r--r--dev-lang/php/files/php-8.3.9-gd-cachevars.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-lang/php/files/php-8.3.9-gd-cachevars.patch b/dev-lang/php/files/php-8.3.9-gd-cachevars.patch
new file mode 100644
index 000000000000..cb6ae9f3479d
--- /dev/null
+++ b/dev-lang/php/files/php-8.3.9-gd-cachevars.patch
@@ -0,0 +1,68 @@
+From b5e5a42d145be30be3856ff4be9af7978adec5c5 Mon Sep 17 00:00:00 2001
+From: Peter Kokot <peterkokot@gmail.com>
+Date: Sun, 2 Jun 2024 19:47:39 +0200
+Subject: [PATCH] Wrap gdImageCreateFrom* checks in AC_CACHE_CHECK
+
+This enables cross-compiling edge cases to manually override the checks
+with the php_cv_lib_gd_gdImageCreateFrom* cache variables.
+---
+ ext/gd/config.m4 | 39 ++++++++++++++++++++-------------------
+ 1 file changed, 20 insertions(+), 19 deletions(-)
+
+diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
+index d9c6d4f6ee0c2..5c1c7a867c2f8 100644
+--- a/ext/gd/config.m4
++++ b/ext/gd/config.m4
+@@ -147,14 +147,15 @@ dnl that gd defines "junk" versions of each gdImageCreateFromFoo function
+ dnl even when it does not support the Foo format. Those junk functions
+ dnl display a warning but eventually return normally, making a simple link
+ dnl or run test insufficient.
+-AC_DEFUN([PHP_GD_CHECK_FORMAT],[
+- old_LIBS="${LIBS}"
+- LIBS="${LIBS} ${GD_SHARED_LIBADD}"
+- old_CFLAGS="${CFLAGS}"
+- CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
+- AC_MSG_CHECKING([for working gdImageCreateFrom$1 in libgd])
+- AC_LANG_PUSH([C])
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
++AC_DEFUN([PHP_GD_CHECK_FORMAT],
++[AS_VAR_PUSHDEF([php_var], [php_cv_lib_gd_gdImageCreateFrom$1])
++old_LIBS="${LIBS}"
++LIBS="${LIBS} ${GD_SHARED_LIBADD}"
++old_CFLAGS="${CFLAGS}"
++CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
++AC_LANG_PUSH([C])
++AC_CACHE_CHECK([for working gdImageCreateFrom$1 in libgd], [php_var],
++ [AC_RUN_IFELSE([AC_LANG_SOURCE([
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <gd.h>
+@@ -173,17 +174,17 @@ int main(int argc, char** argv) {
+ gdSetErrorMethod(exit1);
+ gdImagePtr p = gdImageCreateFrom$1(f);
+ return 0;
+-}])],[
+- AC_MSG_RESULT([yes])
+- AC_DEFINE($2, 1, [Does gdImageCreateFrom$1 work?])
+- ],[
+- AC_MSG_RESULT([no])
+- ],[
+- AC_MSG_RESULT([no])
+- ])
+- AC_LANG_POP([C])
+- CFLAGS="${old_CFLAGS}"
+- LIBS="${old_LIBS}"
++}])],
++ [AS_VAR_SET([php_var], [yes])],
++ [AS_VAR_SET([php_var], [no])],
++ [AS_VAR_SET([php_var], [no])])])
++AS_VAR_IF([php_var], [yes],
++ [AC_DEFINE_UNQUOTED([$2], [1],
++ [Define to 1 if GD library has 'gdImageCreateFrom$1'.])])
++AC_LANG_POP([C])
++CFLAGS="${old_CFLAGS}"
++LIBS="${old_LIBS}"
++AS_VAR_POPDEF([php_var])
+ ])
+
+ AC_DEFUN([PHP_GD_CHECK_VERSION],[