From 7dcda0d5d4d46112fc400dd6930250ab47482f3a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Oct 2020 08:06:27 +0200 Subject: add upstream patches for PHP 8 --- php-pecl-yaz.spec | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) (limited to 'php-pecl-yaz.spec') diff --git a/php-pecl-yaz.spec b/php-pecl-yaz.spec index 18bfaab..97f75f3 100644 --- a/php-pecl-yaz.spec +++ b/php-pecl-yaz.spec @@ -1,11 +1,15 @@ # remirepo spec file for php-pecl-yaz # -# Copyright (c) 2014-2019 Remi Collet +# Copyright (c) 2014-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # + +# Test suite requires internet access +%bcond_with tests + %if 0%{?scl:1} %global sub_prefix %{scl_prefix} %scl_package php-pecl-yaz @@ -18,16 +22,17 @@ %else %global ini_name 40-%{pecl_name}.ini %endif -# Test suite requires internet access -%global with_tests 0%{?_with_tests:1} Summary: Z39.50/SRU client Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.2.3 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +# Upstream patches +Patch0: %{pecl_name}-php8.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel @@ -51,31 +56,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif -%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}" > "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} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -109,6 +99,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .up + # Sanity check, really often broken extver=$(sed -n '/#define PHP_YAZ_VERSION/{s/.* "//;s/".*$//;p}' php_yaz.h) if test "x${extver}" != "x%{version}"; then @@ -203,7 +195,7 @@ cd NTS --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ @@ -219,7 +211,7 @@ cd ../ZTS --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ @@ -245,6 +237,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Oct 1 2020 Remi Collet - 1.2.3-4 +- add upstream patches for PHP 8 + * Tue Sep 03 2019 Remi Collet - 1.2.3-3 - rebuild for 7.4.0RC1 -- cgit