From 13fdad5a9730d2f1e1025ac08efe7e3e638e3339 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 25 Sep 2020 09:07:44 +0200 Subject: add patches for library version 8.1 and for PHP 8 from https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11 --- php-pecl-ip2location.spec | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) (limited to 'php-pecl-ip2location.spec') diff --git a/php-pecl-ip2location.spec b/php-pecl-ip2location.spec index 8c955a1..d0d55fc 100644 --- a/php-pecl-ip2location.spec +++ b/php-pecl-ip2location.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-ip2location # -# Copyright (c) 2020 Remi Collet +# Copyright (c) 2017-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -16,7 +16,7 @@ %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else -%global ini_name 40-%{pecl_name}.ini +%global ini_name 40-%{pecl_name}.ini %endif %global upstream_version 8.0.1 @@ -24,20 +24,27 @@ Summary: Get geo location information of an IP address Name: %{?sub_prefix}php-pecl-%{pecl_name} +License: PHP Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} URL: https://pecl.php.net/package/igbinary Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -License: PHP -Group: System Environment/Libraries -# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/5 +# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/5 - test suite Patch0: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/5.patch +# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8 - library 8.1 +Patch1: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/8.patch +# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9 - PHP 8 +Patch2: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/9.patch +# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10 - display version +Patch3: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/10.patch +# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11 - config.m4 +Patch4: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/11.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-devel -BuildRequires: IP2location-devel +BuildRequires: IP2Location-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -96,7 +103,12 @@ sed -e 's/role="test"/role="src"/' \ cd NTS chmod -x *.c *.h LICENSE README mv test tests -%patch0 -p1 -b .pr10 +sed -e "s/\r//" -i *.c config.m4 +%patch0 -p1 -b .pr5 +%patch1 -p1 -b .pr8 +%patch2 -p1 -b .pr9 +%patch3 -p1 -b .pr10 +%patch4 -p1 -b .pr11 # Check version extver=$(sed -n '/#define PHP_IP2LOCATION_VERSION/{s/.* "//;s/".*$//;p}' php_ip2location.h) @@ -154,7 +166,7 @@ done %check -: simple NTS module load test, without APC, as optional +: simple NTS module load test %{_bindir}/php --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} @@ -168,7 +180,7 @@ REPORT_EXIT_STATUS=1 \ %{_bindir}/php -n run-tests.php --show-diff %if %{with_zts} -: simple ZTS module load test, without APC, as optional +: simple ZTS module load test %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} @@ -219,6 +231,13 @@ fi %changelog +* Fri Sep 25 2020 Remi Collet - 8.0.1-6 +- add patches for library version 8.1 and for PHP 8 from + https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8 + https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9 + https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10 + https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11 + * Tue Sep 03 2019 Remi Collet - 8.0.1-5 - rebuild for 7.4.0RC1 -- cgit