summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-04 08:14:48 +0100
committerRemi Collet <remi@remirepo.net>2021-01-04 08:14:48 +0100
commit5756a564614d568af0b061036f362a152e87078e (patch)
tree49f5672d72474ffbc193ccc86de9dd212adbe2a4
parentdaa7e6fb9ab2c6d9e276da88bf5fbf36c6f4cf8b (diff)
allow to use ImageMagick7 using --with im7 build option
-rw-r--r--php-pecl-imagick.spec17
1 files changed, 12 insertions, 5 deletions
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 5d57354..159cbfd 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -1,12 +1,14 @@
# remirepo spec file for php-pecl-imagick
#
-# Copyright (c) 2008-2020 Remi Collet
+# Copyright (c) 2008-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
+%bcond_with im7
+
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
@@ -37,7 +39,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 0.9.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 14%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 15%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
%endif
License: PHP
@@ -48,16 +50,17 @@ Patch1: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull
Patch2: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/347.patch
Patch3: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/348.patch
Patch4: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/350.patch
+#Patch5: temp.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.4
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: pcre-devel
-%if 0%{?fedora} >= 30 || 0%{?rhel} >= 7
-BuildRequires: ImageMagick-devel
+%if %{with im7}
+BuildRequires: ImageMagick7-devel
%else
-BuildRequires: ImageMagick6-devel
+BuildRequires: ImageMagick-devel
%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -163,6 +166,7 @@ cd NTS
%patch2 -p1 -b .pr347
%patch3 -p1 -b .pr348
%patch4 -p1 -b .pr350
+#patch5 -p1 -b .pr
extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -309,6 +313,9 @@ cd ../ZTS
%changelog
+* Mon Jan 4 2021 Remi Collet <remi@remirepo.net> - 3.4.4-15
+- allow to use ImageMagick7 using --with im7 build option
+
* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 3.4.4-14
- rebuild for PHP 8.0.0RC1