From cd7885585b32246373e124764d356924ac187e70 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 3 Dec 2020 08:39:51 +0100 Subject: add patch for PHP 8 from https://github.com/ph4r05/php_aho_corasick/pull/22 --- php-pecl-ahocorasick.spec | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'php-pecl-ahocorasick.spec') diff --git a/php-pecl-ahocorasick.spec b/php-pecl-ahocorasick.spec index 6c2325a..75ac1ce 100644 --- a/php-pecl-ahocorasick.spec +++ b/php-pecl-ahocorasick.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-ahocorasick # -# Copyright (c) 2018-2019 Remi Collet +# Copyright (c) 2018-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -24,10 +24,12 @@ Summary: Effective Aho-Corasick string pattern matching algorithm Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 0.0.7 -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: PHP and LGPLv3 -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 + +Patch0: https://patch-diff.githubusercontent.com/raw/ph4r05/php_aho_corasick/pull/22.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel @@ -46,30 +48,17 @@ 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}" > "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}" > "7.4" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} %endif @@ -98,6 +87,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr22 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_AHOCORASICK_VERSION/{s/.* "//;s/".*$//;p}' src/php_ahocorasick.h) if test "x${extver}" != "x%{version}"; then @@ -230,6 +221,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Dec 3 2020 Remi Collet - 0.0.7-4 +- add patch for PHP 8 from + https://github.com/ph4r05/php_aho_corasick/pull/22 + * Tue Sep 03 2019 Remi Collet - 0.0.7-3 - rebuild for 7.4.0RC1 -- cgit