[packages/php-pecl-imagick] Up to 3.8.1
arekm
arekm at pld-linux.org
Thu Nov 26 12:09:42 CET 2026
commit 65bcf8da492d9cb81d37d3ebdbb2c9ff6910f303
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 26 11:09:57 2026 +0100
Up to 3.8.1
Add upstream fix for PHP 8.6 (XtOffsetOf removed). XFAIL
024-ispixelsimilar, broken by ImageMagick 7.1.2 fuzz changes
(upstream #737).
php-pecl-imagick.spec | 8 +++--
php86-offsetof.patch | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 101 insertions(+), 2 deletions(-)
---
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 95bf92d..057a97b 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -9,14 +9,15 @@
Summary: %{modname} - PHP wrapper to the Image Magick Library
Summary(pl.UTF-8): %{modname} - PHP-owy wrapper do biblioteki Image Magick
Name: %{php_name}-pecl-%{modname}
-Version: 3.8.0
+Version: 3.8.1
Release: 1
License: PHP 3.01
Group: Development/Languages/PHP
Source0: https://pecl.php.net/get/%{modname}-%{version}.tgz
-# Source0-md5: e6185b1412e65a91e598d1c79a00aeb9
+# Source0-md5: aadbb5ad3db484e19bb6ba39aa2cd4a0
Patch0: skip_version_check.patch
Patch1: build.patch
+Patch2: php86-offsetof.patch
URL: https://pecl.php.net/package/imagick
BuildRequires: %{php_name}-cli
BuildRequires: %{php_name}-devel >= 4:5.3
@@ -68,6 +69,7 @@ To rozszerzenie ma w PECL status: %{status}.
mv %{modname}-%{version}/* .
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
xfail() {
local t=$1
@@ -89,6 +91,8 @@ while read line; do
done << 'EOF'
# skip failing tests
+# ImageMagick >= 7.1.2 changed fuzz distance, https://github.com/Imagick/imagick/issues/737
+Test ImagickPixel::isPixelSimilar [tests/024-ispixelsimilar.phpt]
Test Imagick, annotateImage [tests/034_Imagick_annotateImage_basic.phpt]
Test Imagick, setRegistry and getRegistry [tests/150_Imagick_setregistry.phpt]
Test ImagickDraw, composite [tests/177_ImagickDraw_composite_basic.phpt]
diff --git a/php86-offsetof.patch b/php86-offsetof.patch
new file mode 100644
index 0000000..12fe8a3
--- /dev/null
+++ b/php86-offsetof.patch
@@ -0,0 +1,95 @@
+https://github.com/Imagick/imagick/commit/b580a705e2c879924bfaee2e1ed3a93c9cb3fcfb
+
+From b580a705e2c879924bfaee2e1ed3a93c9cb3fcfb Mon Sep 17 00:00:00 2001
+From: Calvin Buckley <calvin at cmpct.info>
+Date: Mon, 20 Jul 2026 14:29:03 -0300
+Subject: [PATCH] XtOffsetOf is removed in 8.6, use standard C offsetof (#795)
+
+---
+ imagick.c | 10 +++++-----
+ php_imagick_defs.h | 10 +++++-----
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/imagick.c b/imagick.c
+index 68e63e13..ed5ad958 100644
+--- a/imagick.c
++++ b/imagick.c
+@@ -1057,7 +1057,7 @@ PHP_MINIT_FUNCTION(imagick)
+ imagick_object_handlers.read_property = php_imagick_read_property;
+ imagick_object_handlers.count_elements = php_imagick_count_elements;
+ #if PHP_VERSION_ID >= 70000
+- imagick_object_handlers.offset = XtOffsetOf(php_imagick_object, zo);
++ imagick_object_handlers.offset = offsetof(php_imagick_object, zo);
+ imagick_object_handlers.free_obj = php_imagick_object_free_storage;
+ #endif
+
+@@ -1077,7 +1077,7 @@ PHP_MINIT_FUNCTION(imagick)
+ #endif
+ imagickdraw_object_handlers.clone_obj = php_imagick_clone_imagickdraw_object;
+ #if PHP_VERSION_ID >= 70000
+- imagickdraw_object_handlers.offset = XtOffsetOf(php_imagickdraw_object, zo);
++ imagickdraw_object_handlers.offset = offsetof(php_imagickdraw_object, zo);
+ imagickdraw_object_handlers.free_obj = php_imagickdraw_object_free_storage;
+ #endif
+ php_imagickdraw_sc_entry = zend_register_internal_class(&ce TSRMLS_CC);
+@@ -1095,7 +1095,7 @@ PHP_MINIT_FUNCTION(imagick)
+ #endif
+ imagickpixeliterator_object_handlers.clone_obj = NULL;
+ #if PHP_VERSION_ID >= 70000
+- imagickpixeliterator_object_handlers.offset = XtOffsetOf(php_imagickpixeliterator_object, zo);
++ imagickpixeliterator_object_handlers.offset = offsetof(php_imagickpixeliterator_object, zo);
+ imagickpixeliterator_object_handlers.free_obj = php_imagickpixeliterator_object_free_storage;
+ #endif
+ php_imagickpixeliterator_sc_entry = zend_register_internal_class(&ce TSRMLS_CC);
+@@ -1114,7 +1114,7 @@ PHP_MINIT_FUNCTION(imagick)
+ #endif
+ imagickpixel_object_handlers.clone_obj = php_imagick_clone_imagickpixel_object;
+ #if PHP_VERSION_ID >= 70000
+- imagickpixel_object_handlers.offset = XtOffsetOf(php_imagickpixel_object, zo);
++ imagickpixel_object_handlers.offset = offsetof(php_imagickpixel_object, zo);
+ imagickpixel_object_handlers.free_obj = php_imagickpixel_object_free_storage;
+ #endif
+
+@@ -1136,7 +1136,7 @@ PHP_MINIT_FUNCTION(imagick)
+ imagickkernel_object_handlers.get_debug_info = php_imagickkernel_get_debug_info;
+ imagickkernel_object_handlers.clone_obj = php_imagick_clone_imagickkernel_object;
+ #if PHP_VERSION_ID >= 70000
+- imagickkernel_object_handlers.offset = XtOffsetOf(php_imagickkernel_object, zo);
++ imagickkernel_object_handlers.offset = offsetof(php_imagickkernel_object, zo);
+ imagickkernel_object_handlers.free_obj = php_imagickkernel_object_free_storage;
+ #endif
+
+diff --git a/php_imagick_defs.h b/php_imagick_defs.h
+index 2c5f990a..9ff83620 100644
+--- a/php_imagick_defs.h
++++ b/php_imagick_defs.h
+@@ -273,24 +273,24 @@ typedef struct _php_imagickkernel_object {
+ #if PHP_VERSION_ID >= 70000
+
+ static inline php_imagick_object *php_imagick_fetch_object(zend_object *obj) {
+- return (php_imagick_object *)((char*)(obj) - XtOffsetOf(php_imagick_object, zo));
++ return (php_imagick_object *)((char*)(obj) - offsetof(php_imagick_object, zo));
+ }
+
+ static inline php_imagickdraw_object *php_imagickdraw_fetch_object(zend_object *obj) {
+- return (php_imagickdraw_object *)((char*)(obj) - XtOffsetOf(php_imagickdraw_object, zo));
++ return (php_imagickdraw_object *)((char*)(obj) - offsetof(php_imagickdraw_object, zo));
+ }
+
+ static inline php_imagickpixel_object *php_imagickpixel_fetch_object(zend_object *obj) {
+- return (php_imagickpixel_object *)((char*)(obj) - XtOffsetOf(php_imagickpixel_object, zo));
++ return (php_imagickpixel_object *)((char*)(obj) - offsetof(php_imagickpixel_object, zo));
+ }
+
+ static inline php_imagickpixeliterator_object *php_imagickpixeliterator_fetch_object(zend_object *obj) {
+- return (php_imagickpixeliterator_object *)((char*)(obj) - XtOffsetOf(php_imagickpixeliterator_object, zo));
++ return (php_imagickpixeliterator_object *)((char*)(obj) - offsetof(php_imagickpixeliterator_object, zo));
+ }
+
+ #ifdef IMAGICK_WITH_KERNEL
+ static inline php_imagickkernel_object *php_imagickkernel_fetch_object(zend_object *obj) {
+- return (php_imagickkernel_object *)((char*)(obj) - XtOffsetOf(php_imagickkernel_object, zo));
++ return (php_imagickkernel_object *)((char*)(obj) - offsetof(php_imagickkernel_object, zo));
+ }
+ #endif
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-imagick.git/commitdiff/65bcf8da492d9cb81d37d3ebdbb2c9ff6910f303
More information about the pld-cvs-commit
mailing list