summaryrefslogtreecommitdiffstats
path: root/php-pecl-imagick.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-imagick.spec')
-rw-r--r--php-pecl-imagick.spec107
1 files changed, 32 insertions, 75 deletions
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index ebc1a6c..a4c439a 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -40,11 +40,7 @@
#global gh_date 20151204
%global pecl_name imagick
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
%global ini_name 40-%{pecl_name}.ini
-%endif
%global upstream_version 3.7.0
#global upstream_prever RC1
%if 0%{?gh_date:1}
@@ -66,13 +62,14 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 0.11.%{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: 10.5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 11.3%{?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-3.01
URL: https://pecl.php.net/package/imagick
Patch0: %{pecl_name}-tests.patch
+Patch1: %{pecl_name}-pr690.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -93,14 +90,18 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%if %{with im7}
-Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}%{?prever}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}%{?prever}
+Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}
+Provides: %{?scl_prefix}php-pecl-imagick = 1:%{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = 1:%{version}-%{release}
%else
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}%{?prever}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}%{?prever}
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl-imagick = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = %{version}-%{release}
%endif
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}%{?prever}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}%{?prever}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
Conflicts: %{?scl_prefix}php-pecl-gmagick
%if %{with im7}
@@ -118,44 +119,6 @@ Obsoletes: %{?scl_prefix}php-pecl-imagick <= %{version}-%{release}
Conflicts: %{?scl_prefix}php-pecl-imagick <= %{version}-%{release}
%endif
%endif
-Provides: %{?scl_prefix}php-pecl-imagick = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = %{version}-%{release}
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
-# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.0"
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%endif
-%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}
-%endif
-%endif
-
%description
Imagick is a native php extension to create and modify images
@@ -203,7 +166,7 @@ sed -e 's/3.3.0RC2/%{version}dev/' -i package.xml
sed -e '/anonymous_pro_minus.ttf/d' \
-e '/015-imagickdrawsetresolution.phpt/d' \
-e '/OFL.txt/d' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
if grep '\.ttf' package.xml
@@ -213,6 +176,7 @@ fi
cd %{sources}
%patch -P0 -p1
+%patch -P1 -p1
: Avoid arginfo to be regenerated
rm *.stub.php
@@ -261,11 +225,13 @@ mkdir ZTS
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
: Standard NTS build
cd ../NTS
%configure --with-imagick=%{_root_prefix} --with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
: Dump REFLECTION
%{__php} --no-php-ini \
@@ -276,14 +242,14 @@ make %{?_smp_mflags}
: ZTS build
cd ../ZTS
%configure --with-imagick=%{_root_prefix} --with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make install INSTALL_ROOT=%{buildroot} -C NTS
+%make_install -C NTS
# Drop in the bit of configuration
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -292,7 +258,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -p -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make install INSTALL_ROOT=%{buildroot} -C ZTS
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -308,26 +274,6 @@ do [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_docdir
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
cd %{sources}
export REPORT_EXIT_STATUS=1
@@ -354,6 +300,13 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%else
%{__php} -n run-tests.php -q --show-diff
%endif
+
+if [ -f %{php_extdir}/%{pecl_name}.so ]; then
+: upstream test suite for extension built with previous version
+%{__php} --ri imagick
+TEST_PHP_ARGS="-n -d extension=%{pecl_name}" \
+%{__php} -n run-tests.php -q --show-diff %{?_smp_mflags}
+fi
%endif
%if %{with_zts}
@@ -366,7 +319,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -389,6 +342,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%changelog
+* Fri Sep 27 2024 Remi Collet <remi@remirepo.net> - 3.7.0-11
+- add patch for PHP 8.4 from
+ https://github.com/Imagick/imagick/pull/690
+
* Mon Feb 12 2024 Remi Collet <remi@remirepo.net> - 3.7.0-10
- add upstream patch for test suite with recent IM versions