diff options
author | Remi Collet <remi@remirepo.net> | 2021-06-11 12:36:20 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-06-11 12:36:20 +0200 |
commit | 6760c41e3f22130f57ed983f57cb1cf262f5b9ca (patch) | |
tree | 15c85499f2b96615a11121a77a3d5da94f3298dc | |
parent | 1fe8bc9104b809ba88557a8c60dcf24e4d771c91 (diff) |
add patch for test suite with PHP 8.1 from
https://github.com/vitoc/gmagick/pull/54
-rw-r--r-- | gmagick-php81.patch | 29 | ||||
-rw-r--r-- | php-pecl-gmagick.spec | 13 |
2 files changed, 41 insertions, 1 deletions
diff --git a/gmagick-php81.patch b/gmagick-php81.patch new file mode 100644 index 0000000..85c0343 --- /dev/null +++ b/gmagick-php81.patch @@ -0,0 +1,29 @@ +From 584a077bca8c989789a70d47c7ead1f9083490cd Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 11 Jun 2021 10:47:39 +0200 +Subject: [PATCH] fix param order in test + +--- + tests/gmagick-003-resize_variations.phpt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/gmagick-003-resize_variations.phpt b/tests/gmagick-003-resize_variations.phpt +index a701d23..12f5518 100644 +--- a/tests/gmagick-003-resize_variations.phpt ++++ b/tests/gmagick-003-resize_variations.phpt +@@ -8,10 +8,10 @@ if(!extension_loaded('gmagick')) die('skip'); + --FILE-- + <?php + $gm = new Gmagick("magick:rose"); +-$gm->resizeImage(10, 10, 0.5, Gmagick::FILTER_LANCZOS); +-$gm->resizeImage(10, 10, 0.5, Gmagick::FILTER_UNDEFINED, true); +-$gm->resizeImage(10, 10, 0.5, Gmagick::FILTER_GAUSSIAN, false); ++$gm->resizeImage(10, 10, Gmagick::FILTER_LANCZOS, 0.5); ++$gm->resizeImage(10, 10, Gmagick::FILTER_UNDEFINED, 0.5, true); ++$gm->resizeImage(10, 10, Gmagick::FILTER_GAUSSIAN, 0.5, false); + echo "ok"; + ?> + --EXPECTF-- +-ok +\ No newline at end of file ++ok diff --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec index 5ce169f..529d63f 100644 --- a/php-pecl-gmagick.spec +++ b/php-pecl-gmagick.spec @@ -25,11 +25,13 @@ Summary: Provides a wrapper to the GraphicsMagick library Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Patch0: %{pecl_name}-php81.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-pear @@ -63,6 +65,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} <= %{version} +%endif %endif @@ -83,6 +88,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 + extver=$(sed -n '/#define PHP_GMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_gmagick.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. @@ -223,6 +230,10 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" %changelog +* Fri Jun 11 2021 Remi Collet <remi@remirepo.net> - 2.0.6~RC1-2 +- add patch for test suite with PHP 8.1 from + https://github.com/vitoc/gmagick/pull/54 + * Fri Feb 12 2021 Remi Collet <remi@remirepo.net> - 2.0.6~RC1-1 - Update to 2.0.6RC1 |