summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-17 11:28:34 +0200
committerRemi Collet <remi@php.net>2025-07-17 11:28:34 +0200
commit46955f06d42baefe2931c8fd89cd34172e2d10f1 (patch)
tree6e1cbb78eec27e0174def8c1dfabd61f61d4bef8
parent8748ef64423aab97bb1c8f59d542104f1576fdfa (diff)
fix build with PHP 8.5.0alpha2 using patch fromHEADmaster
https://github.com/vitoc/gmagick/pull/59
-rw-r--r--gmagick-php85.patch31
-rw-r--r--php-pecl-gmagick.spec8
2 files changed, 38 insertions, 1 deletions
diff --git a/gmagick-php85.patch b/gmagick-php85.patch
new file mode 100644
index 0000000..3d4dda0
--- /dev/null
+++ b/gmagick-php85.patch
@@ -0,0 +1,31 @@
+From 2fed131a3e4a52b9cd9ef07d400ee16915d23d2a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 17 Jul 2025 11:25:16 +0200
+Subject: [PATCH] use zend_ce_exception instead of zend_exception_get_default()
+ for 8.5
+
+---
+ gmagick.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gmagick.c b/gmagick.c
+index 5102a42..72571c0 100644
+--- a/gmagick.c
++++ b/gmagick.c
+@@ -272,11 +272,11 @@ PHP_MINIT_FUNCTION(gmagick)
+
+ /* Exception */
+ INIT_CLASS_ENTRY(ce, "GmagickException", NULL);
+- php_gmagick_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default());
++ php_gmagick_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception);
+ php_gmagick_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+ INIT_CLASS_ENTRY(ce, "GmagickPixelException", NULL);
+- php_gmagickpixel_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default());
++ php_gmagickpixel_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception);
+ php_gmagickpixel_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+ /* Class entry */
+--
+2.50.1
+
diff --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec
index 1a06a05..52b76db 100644
--- a/php-pecl-gmagick.spec
+++ b/php-pecl-gmagick.spec
@@ -26,13 +26,14 @@
Summary: Provides a wrapper to the GraphicsMagick library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 13%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 14%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-php81.patch
Patch1: %{pecl_name}-build.patch
+Patch2: %{pecl_name}-php85.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -70,6 +71,7 @@ sed -e 's/role="test"/role="src"/' \
pushd %{sources}
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
pushd tests
for i in $(grep -l test_constructor *phpt); do sed -e "s:test_constructor:${i/.phpt/}:" -i $i; done
popd
@@ -188,6 +190,10 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so"
%changelog
+* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 2.0.6~RC1-14
+- fix build with PHP 8.5.0alpha2 using patch from
+ https://github.com/vitoc/gmagick/pull/59
+
* Wed Jul 9 2025 Remi Collet <remi@remirepo.net> - 2.0.6~RC1-13
- rename temp files in test suite to improve parallelism