diff --git a/imagick-fix-test316.patch b/imagick-fix-test316.patch new file mode 100644 index 0000000..30d122d --- /dev/null +++ b/imagick-fix-test316.patch @@ -0,0 +1,19 @@ +diff -purN a/tests/316_Imagick_getImageKurtosis.phpt b/tests/316_Imagick_getImageKurtosis.phpt +--- a/tests/316_Imagick_getImageKurtosis.phpt 2022-01-11 16:23:47.000000000 +0100 ++++ b/tests/316_Imagick_getImageKurtosis.phpt 2024-01-22 20:29:18.738097214 +0100 +@@ -14,8 +14,13 @@ function getImageKurtosis() { + $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg'); + $values = $imagick->getImageKurtosis(); + +- check_value($values, "kurtosis", -0.9379261035010518); +- check_value($values, "skewness", 0.4562517200972045); ++ if (isVersionGreaterEqual('6.9.13-2', '7.1.1-24')) { ++ check_value($values, "kurtosis", -0.7092599567492); ++ check_value($values, "skewness", 0.56839010636614); ++ } else { ++ check_value($values, "kurtosis", -0.9379261035010518); ++ check_value($values, "skewness", 0.4562517200972045); ++ } + } + + getImageKurtosis() ; diff --git a/imagick-xfail-test014.patch b/imagick-xfail-test014.patch new file mode 100644 index 0000000..7703290 --- /dev/null +++ b/imagick-xfail-test014.patch @@ -0,0 +1,12 @@ +diff -purN a/tests/014-setresourcelimit.phpt b/tests/014-setresourcelimit.phpt +--- a/tests/014-setresourcelimit.phpt 2022-01-11 16:23:45.000000000 +0100 ++++ b/tests/014-setresourcelimit.phpt 2024-01-21 21:21:54.685527129 +0100 +@@ -5,6 +5,8 @@ Imagick::setResourceLimit test + $imageMagickRequiredVersion=0x692; + require_once(dirname(__FILE__) . '/skipif.inc'); + ?> ++--XFAIL-- ++These tests are flaky as the values ImageMagick will accept are limited by the policy.xml of the system. + --FILE-- + + +- Expect test to fail as the values ImageMagick will accept are limited + by the policy.xml of the system which is more restrictive now + + imagick-xfail-test014.patch + +- Fix test failing since ImageMagick 7.1.1.24 due to changed calculation + of kurtosis and skewness values + + imagick-fix-test316.patch + ------------------------------------------------------------------- Sat Dec 10 10:32:12 UTC 2022 - Arjen de Korte diff --git a/php-imagick.spec b/php-imagick.spec index aa5130d..1292352 100644 --- a/php-imagick.spec +++ b/php-imagick.spec @@ -41,6 +41,10 @@ Source0: https://pecl.php.net/get/%{pkg_name}-%{version}.tgz Source1: php-%{pkg_name}-rpmlintrc # SUSE: Make build reproduceable Patch0: imagick-reproducible.patch +# PATCH-FIX-OPENSUSE - test expected to fail because of resource limits in policy.xml +Patch10: imagick-xfail-test014.patch +# PATCH-FIX-OPENSUSE - calculation of kurtosis and skewness was fixed in Imagick-7.1.1.24 +Patch11: imagick-fix-test316.patch BuildRequires: %{php_name}-devel >= 7.0.1 BuildRequires: ImageMagick-devel >= 6.5.3.10 BuildRequires: ghostscript-fonts-std