From 177a2ecea222328899e0d5446792387ce47b8cc6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 24 Jun 2016 13:21:42 +0200 Subject: php-pecl-gmagick: add fix for PHP 7.1 --- php-pecl-gmagick-php7.spec | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'php-pecl-gmagick-php7.spec') diff --git a/php-pecl-gmagick-php7.spec b/php-pecl-gmagick-php7.spec index c9801c8..c2876d5 100644 --- a/php-pecl-gmagick-php7.spec +++ b/php-pecl-gmagick-php7.spec @@ -7,21 +7,28 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-gmagick} +%if 0%{?scl:1} +%global sub_prefix %{scl_prefix} +%scl_package php-pecl-gmagick +%endif + %global pecl_name gmagick %global prever RC2 %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini Summary: Provides a wrapper to the GraphicsMagick library -Name: %{?scl_prefix}php-pecl-%{pecl_name} +Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 2.0.2 -Release: 0.3.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 0.4.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP Group: Development/Libraries URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +# https://github.com/vitoc/gmagick/pull/41 - for PHP 7.1 +Patch0: %{pecl_name}-pr41.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-devel >= 7.0.1 @@ -35,8 +42,10 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +%if "%{?scl_prefix}" != "%{?sub_prefix}" Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%endif Conflicts: %{?scl_prefix}php-pecl-imagick Conflicts: %{?scl_prefix}php-magickwand @@ -53,6 +62,10 @@ Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} Obsoletes: php70u-pecl-%{pecl_name} <= %{version} Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%if "%{php_version}" > "7.1" +Obsoletes: php71u-pecl-%{pecl_name} <= %{version} +Obsoletes: php71w-pecl-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -79,6 +92,7 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{version}%{?prever} NTS cd NTS +%patch0 -p1 -b .pr41 extver=$(sed -n '/#define PHP_GMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_gmagick.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -203,6 +217,9 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" %changelog +* Fri Jun 24 2016 Remi Collet - 2.0.2-0.4.RC2 +- add patch for PHP 7.1, https://github.com/vitoc/gmagick/pull/41 + * Fri Mar 11 2016 Remi Collet - 2.0.2-0.3.RC2 - Update to 2.0.2RC2 (php 7, beta) -- cgit