diff options
-rw-r--r-- | imagick-pr690.patch | 40 | ||||
-rw-r--r-- | php-pecl-imagick.spec | 18 |
2 files changed, 53 insertions, 5 deletions
diff --git a/imagick-pr690.patch b/imagick-pr690.patch new file mode 100644 index 0000000..189e745 --- /dev/null +++ b/imagick-pr690.patch @@ -0,0 +1,40 @@ +From 65e27f2bc02e7e8f1bf64e26e359e42a1331fca1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= <mvorisek@mvorisek.cz> +Date: Wed, 25 Sep 2024 10:56:28 +0200 +Subject: [PATCH] Fix removed "php_strtolower" for PHP 8.4 + +--- + imagick.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/imagick.c b/imagick.c +index 1b765389..ebab7ae7 100644 +--- a/imagick.c ++++ b/imagick.c +@@ -610,7 +610,7 @@ static zval *php_imagick_read_property(zend_object *object, zend_string *member, + if (format) { + retval = rv; + ZVAL_STRING(retval, format); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + retval = rv; +@@ -683,7 +683,7 @@ static zval *php_imagick_read_property(zval *object, zval *member, int type, voi + if (format) { + retval = rv; + ZVAL_STRING(retval, format); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + retval = rv; +@@ -766,7 +766,7 @@ static zval *php_imagick_read_property(zval *object, zval *member, int type, con + + if (format) { + ZVAL_STRING(retval, format, 1); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + ZVAL_STRING(retval, "", 1); diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec index bd361b4..3eba28f 100644 --- a/php-pecl-imagick.spec +++ b/php-pecl-imagick.spec @@ -62,13 +62,14 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 0.11.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 10.10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 11%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz %endif License: PHP-3.01 URL: https://pecl.php.net/package/imagick Patch0: %{pecl_name}-tests.patch +Patch1: %{pecl_name}-pr690.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -173,6 +174,7 @@ fi cd %{sources} %patch -P0 -p1 +%patch -P1 -p1 : Avoid arginfo to be regenerated rm *.stub.php @@ -221,11 +223,13 @@ mkdir ZTS cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL : Standard NTS build cd ../NTS %configure --with-imagick=%{_root_prefix} --with-php-config=%{__phpconfig} -make %{?_smp_mflags} +%make_build : Dump REFLECTION %{__php} --no-php-ini \ @@ -236,14 +240,14 @@ make %{?_smp_mflags} : ZTS build cd ../ZTS %configure --with-imagick=%{_root_prefix} --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} +%make_build %endif %install %{?dtsenable} -make install INSTALL_ROOT=%{buildroot} -C NTS +%make_install -C NTS # Drop in the bit of configuration install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -252,7 +256,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -p -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make install INSTALL_ROOT=%{buildroot} -C ZTS +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -329,6 +333,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ %changelog +* Fri Sep 27 2024 Remi Collet <remi@remirepo.net> - 3.7.0-11 +- add patch for PHP 8.4 from + https://github.com/Imagick/imagick/pull/690 + * Mon Feb 12 2024 Remi Collet <remi@remirepo.net> - 3.7.0-10 - add upstream patch for test suite with recent IM versions |