[packages/php-pecl-imagick] Rel 2. Build for PHP 5.3-5.5 again
arekm
arekm at pld-linux.org
Thu Nov 26 13:00:42 CET 2026
commit 419f14497cbec6727c7aa08ce8ab5b8a0662759a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 26 13:00:09 2026 +0100
Rel 2. Build for PHP 5.3-5.5 again
php-pecl-imagick.spec | 39 ++++++++++++++++++++++++++++++++++++++-
php5-minver.patch | 22 ++++++++++++++++++++++
2 files changed, 60 insertions(+), 1 deletion(-)
---
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 057a97b..797fc1d 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -10,7 +10,7 @@ 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.1
-Release: 1
+Release: 2
License: PHP 3.01
Group: Development/Languages/PHP
Source0: https://pecl.php.net/get/%{modname}-%{version}.tgz
@@ -18,6 +18,7 @@ Source0: https://pecl.php.net/get/%{modname}-%{version}.tgz
Patch0: skip_version_check.patch
Patch1: build.patch
Patch2: php86-offsetof.patch
+Patch3: php5-minver.patch
URL: https://pecl.php.net/package/imagick
BuildRequires: %{php_name}-cli
BuildRequires: %{php_name}-devel >= 4:5.3
@@ -70,6 +71,7 @@ mv %{modname}-%{version}/* .
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
+%patch -P3 -p1
xfail() {
local t=$1
@@ -131,6 +133,41 @@ Test Imagick::optimizeimagelayers and Imagick::optimizeimagetransparency [tests/
# php73/x32
Test PHP bug #59378 writing to php://memory is incomplete [tests/bug59378.phpt]
+# ::class needs PHP 5.5
+%if "%php_major_version.%php_minor_version" < "5.5"
+Imagick::setResourceLimit test [tests/014-setresourcelimit.phpt]
+%endif
+
+# tests use PHP 5.4 syntax (short arrays), functions.inc too, which breaks SKIPIF
+%if "%php_major_version.%php_minor_version" == "5.3"
+Test functionimage [tests/025-function-image.phpt]
+Test Imagick, borderImageWithComposite [tests/039_Imagick_borderImage_im7.phpt]
+Test Imagick, clutImage [tests/042_Imagick_clutImage_basic.phpt]
+Test Imagick, clutImageWithInterpolate [tests/042_Imagick_clutImage_im7.phpt]
+Test Imagick, convolveImage [tests/047_Imagick_convolveImage_6.phpt]
+Test Imagick, frameImageWithComposite [tests/077_Imagick_frameImage_im7.phpt]
+Test Imagick, implodeImageWithMethod [tests/088_Imagick_implodeImageWithMethod_basic.phpt]
+Test Imagick, medianFilterImage [tests/089_Imagick_medianFilterImage_basic.phpt]
+Test Imagick, orderedPosterizeImage [tests/098_Imagick_orderedPosterizeImage_basic.phpt]
+Test Imagick, radialBlurImage [tests/102_Imagick_radialBlurImage_basic.phpt]
+Test Imagick, reduceNoiseImage [tests/106_Imagick_reduceNoiseImage_basic.phpt]
+Test Imagick, recolorImage [tests/107_Imagick_recolorImage_basic.phpt]
+Test Imagick, setImageBias [tests/121_Imagick_setImageBias_basic.phpt]
+Test Imagick, setImageClipMask [tests/123_Imagick_setImageClipMask_basic.phpt]
+Test Imagick, transformImage [tests/159_Imagick_transformImage_basic.phpt]
+Test ImagickDraw, matte [tests/180_ImagickDraw_matte_basic.phpt]
+Testing ImagickPixel with unitialized pixel_wand [tests/275_ImagickPixel_unitializedObjects.phpt]
+Test that reflection can get default values [tests/291_reflection.phpt]
+Test iterating over images works [tests/292_index_iterator.phpt]
+Test Imagick, getImageKurtosis [tests/316_Imagick_getImageKurtosis.phpt]
+Test Imagick, getImageMean [tests/317_Imagick_getImageMean.phpt]
+Test Imagick, getImageRange [tests/318_Imagick_getImageRange.phpt]
+Test Imagick, getOptions [tests/320_Imagick_getOptions.phpt]
+Test Imagick, polynomialImage [tests/324_Imagick_polynomialImage.phpt]
+Test Imagick, polaroidImage [tests/327_Imagick_polaroidImage_basic.phpt]
+Test Imagick, polaroidWithTextAndMethod [tests/328_Imagick_polaroidImageWithTextAndMethod_basic.phpt]
+%endif
+
# php 7.4, 8.0
%if "%php_major_version.%php_minor_version" == "7.4"
Casting color and opacity to pixel [tests/003_cast_color_opacity.phpt]
diff --git a/php5-minver.patch b/php5-minver.patch
new file mode 100644
index 0000000..7a39016
--- /dev/null
+++ b/php5-minver.patch
@@ -0,0 +1,22 @@
+# upstream raised the minimum to 5.6 only in config.m4 (8c5b4ea6), the code still has PHP < 5.6 paths
+
+--- imagick-3.8.1.orig/config.m4 2025-11-26 22:38:21.000000000 +0100
++++ imagick-3.8.1/config.m4 2026-11-26 12:33:28.985897031 +0100
+@@ -20,7 +20,7 @@
+ #
+ # PHP minimum version
+ #
+- AC_MSG_CHECKING([PHP version is at least 5.6.0])
++ AC_MSG_CHECKING([PHP version is at least 5.3.2])
+
+ if test -z "${PHP_VERSION_ID}"; then
+ if test -z "${PHP_CONFIG}"; then
+@@ -36,7 +36,7 @@
+ PHP_IMAGICK_FOUND_VERSION="${PHP_VERSION}"
+ fi
+
+- if test "$PHP_IMAGICK_FOUND_VERNUM" -ge "50600"; then
++ if test "$PHP_IMAGICK_FOUND_VERNUM" -ge "50302"; then
+ AC_MSG_RESULT(yes. found $PHP_IMAGICK_FOUND_VERSION)
+ else
+ AC_MSG_ERROR(no. found $PHP_IMAGICK_FOUND_VERSION)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-imagick.git/commitdiff/419f14497cbec6727c7aa08ce8ab5b8a0662759a
More information about the pld-cvs-commit
mailing list