diff --git a/imagick-php_strtolower-php84.patch b/imagick-php_strtolower-php84.patch new file mode 100644 index 0000000..c8f1443 --- /dev/null +++ b/imagick-php_strtolower-php84.patch @@ -0,0 +1,42 @@ +diff -upr imagick-3.7.0.orig/imagick.c imagick-3.7.0/imagick.c +--- imagick-3.7.0.orig/imagick.c 2022-01-11 16:23:47.000000000 +0100 ++++ imagick-3.7.0/imagick.c 2024-11-22 11:14:01.187974046 +0100 +@@ -603,7 +603,11 @@ static zval *php_imagick_read_property(z + if (format) { + retval = rv; + ZVAL_STRING(retval, format); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #if PHP_VERSION_ID < 80400 ++ php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #else ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #endif + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + retval = rv; +@@ -676,7 +680,11 @@ static zval *php_imagick_read_property(z + if (format) { + retval = rv; + ZVAL_STRING(retval, format); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #if PHP_VERSION_ID < 80400 ++ php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #else ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #endif + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + retval = rv; +@@ -759,7 +767,11 @@ static zval *php_imagick_read_property(z + + if (format) { + ZVAL_STRING(retval, format, 1); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #if PHP_VERSION_ID < 80400 ++ php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #else ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ #endif + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + ZVAL_STRING(retval, "", 1); diff --git a/php-imagick.changes b/php-imagick.changes index 947422f..7d3a911 100644 --- a/php-imagick.changes +++ b/php-imagick.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 22 10:28:40 UTC 2024 - Manu Maier + +- Fix removed "php_strtolower" for PHP 8.4 + + imagick-php_strtolower-php84.patch + ------------------------------------------------------------------- Sun Jan 21 20:38:00 UTC 2024 - Arjen de Korte diff --git a/php-imagick.spec b/php-imagick.spec index 1292352..f529999 100644 --- a/php-imagick.spec +++ b/php-imagick.spec @@ -45,6 +45,7 @@ Patch0: imagick-reproducible.patch 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 +Patch12: imagick-php_strtolower-php84.patch BuildRequires: %{php_name}-devel >= 7.0.1 BuildRequires: ImageMagick-devel >= 6.5.3.10 BuildRequires: ghostscript-fonts-std