From 3322d6726dd05b802c88f01696939b99c4497582 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 25 Jan 2021 14:38:18 +0100 Subject: add patch for PHP 8 from https://github.com/vitoc/gmagick/pull/50 add build fixes from https://github.com/rlerdorf/gmagick/pull/1 https://github.com/rlerdorf/gmagick/pull/2 --- php-pecl-gmagick.spec | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'php-pecl-gmagick.spec') diff --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec index 3fb1f49..28b4ed7 100644 --- a/php-pecl-gmagick.spec +++ b/php-pecl-gmagick.spec @@ -1,6 +1,6 @@ # spec file for php-pecl-gmagick # -# Copyright (c) 2010-2020 Remi Collet +# Copyright (c) 2010-2021 Remi Collet # Copyright (c) 2009-2010 Pavel Alexeev # License: MIT # http://opensource.org/licenses/MIT @@ -23,13 +23,17 @@ Summary: Provides a wrapper to the GraphicsMagick library Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 8%{?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}-bug78465.patch +Source1: https://raw.githubusercontent.com/rlerdorf/gmagick/master/tests/skipif.inc +Patch0: https://patch-diff.githubusercontent.com/raw/vitoc/gmagick/pull/50.patch +Patch1: https://patch-diff.githubusercontent.com/raw/rlerdorf/gmagick/pull/1.patch +Patch2: https://patch-diff.githubusercontent.com/raw/rlerdorf/gmagick/pull/2.patch +BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-devel >= 7.0.1 @@ -51,30 +55,17 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele Conflicts: %{?scl_prefix}php-pecl-imagick Conflicts: %{?scl_prefix}php-magickwand -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter private shared -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} %endif @@ -95,7 +86,10 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS cd NTS -%patch0 -p1 -b .bug78465 +%patch0 -p1 -b .pr50 +%patch1 -p1 -b .pr1 +%patch2 -p1 -b .pr2 +cp %{SOURCE1} tests/skipif.inc extver=$(sed -n '/#define PHP_GMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_gmagick.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -175,7 +169,9 @@ fi %check -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7 +rm ?TS/tests/gmagick-056-set_getsamplingfactors.phpt + +%if 0%{?fedora} == 31 || 0%{?rhel} == 8 # see https://bugzilla.redhat.com/1530057 rm ?TS/tests/gmagick-006-annotateimage.phpt rm ?TS/tests/gmagickdraw-003-annotate.phpt @@ -189,7 +185,7 @@ rm ?TS/tests/gmagickdraw_045_setFontFamily_basic.phpt cd NTS %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' : upstream test suite for NTS extension export TEST_PHP_EXECUTABLE=%{__php} @@ -203,7 +199,7 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" cd ../ZTS %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' : upstream test suite for ZTS extension export TEST_PHP_EXECUTABLE=%{__ztsphp} @@ -227,6 +223,13 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" %changelog +* Wed Feb 19 2020 Remi Collet - 2.0.5~RC1-8 +- add patch for PHP 8 from + https://github.com/vitoc/gmagick/pull/50 +- add build fixes from + https://github.com/rlerdorf/gmagick/pull/1 + https://github.com/rlerdorf/gmagick/pull/2 + * Wed Feb 19 2020 Remi Collet - 2.0.5~RC1-7 - better workaround to https://bugs.php.net/78465 -- cgit