From 6760c41e3f22130f57ed983f57cb1cf262f5b9ca Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 11 Jun 2021 12:36:20 +0200 Subject: add patch for test suite with PHP 8.1 from https://github.com/vitoc/gmagick/pull/54 --- gmagick-php81.patch | 29 +++++++++++++++++++++++++++++ php-pecl-gmagick.spec | 13 ++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gmagick-php81.patch 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 +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-- + 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 - 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 - 2.0.6~RC1-1 - Update to 2.0.6RC1 -- cgit