summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gmagick-pr41.patch24
-rw-r--r--php-pecl-gmagick-php7.spec23
2 files changed, 44 insertions, 3 deletions
diff --git a/gmagick-pr41.patch b/gmagick-pr41.patch
new file mode 100644
index 0000000..42932c3
--- /dev/null
+++ b/gmagick-pr41.patch
@@ -0,0 +1,24 @@
+From cbc919f4f7224e7217bffa89472b5d092cd30764 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Fri, 24 Jun 2016 12:54:29 +0200
+Subject: [PATCH] clean duplicate constant definition, fix #40
+
+---
+ gmagick_helpers.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/gmagick_helpers.c b/gmagick_helpers.c
+index 9c8ed06..88aab56 100644
+--- a/gmagick_helpers.c
++++ b/gmagick_helpers.c
+@@ -341,10 +341,6 @@ void php_gmagick_initialize_constants()
+ GMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_ABSOLUTE", AbsoluteIntent);
+ GMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_RELATIVE", RelativeIntent);
+ GMAGICK_REGISTER_CONST_LONG("INTERLACE_UNDEFINED", UndefinedInterlace);
+- GMAGICK_REGISTER_CONST_LONG("INTERLACE_NO", NoInterlace);
+- GMAGICK_REGISTER_CONST_LONG("INTERLACE_LINE", LineInterlace);
+- GMAGICK_REGISTER_CONST_LONG("INTERLACE_PLANE", PlaneInterlace);
+- GMAGICK_REGISTER_CONST_LONG("INTERLACE_PARTITION", PartitionInterlace);
+ GMAGICK_REGISTER_CONST_LONG("FILLRULE_UNDEFINED", UndefinedRule);
+ GMAGICK_REGISTER_CONST_LONG("FILLRULE_EVENODD", EvenOddRule);
+ GMAGICK_REGISTER_CONST_LONG("FILLRULE_NONZERO", NonZeroRule);
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 <remi@fedoraproject.org> - 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 <remi@fedoraproject.org> - 2.0.2-0.3.RC2
- Update to 2.0.2RC2 (php 7, beta)