diff --git a/.gitignore b/.gitignore index e0e7e08..990863c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +clog geoip-1.0.8.tgz /geoip-1.1.0.tgz /geoip-1.1.1.tgz diff --git a/geoip-php8.patch b/geoip-php8.patch index 5de99f6..27e2eb2 100644 --- a/geoip-php8.patch +++ b/geoip-php8.patch @@ -1,5 +1,17 @@ ---- pecl/geoip/trunk/geoip.c 2020/10/30 12:04:28 351081 -+++ pecl/geoip/trunk/geoip.c 2020/10/30 12:51:07 351082 +From 4f7c46c98eadc7bae9cc39c942ee626ecae7539e Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 30 Oct 2020 12:51:07 +0000 +Subject: [PATCH] add arginfo and fix build with PHP 8 + +git-svn-id: http://svn.php.net/repository/pecl/geoip/trunk@351082 c90b9560-bf6c-de11-be94-00142212c4b1 +--- + geoip.c | 67 +++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 49 insertions(+), 18 deletions(-) + +diff --git a/geoip.c b/geoip.c +index ff8ed30..3e41a9d 100644 +--- a/geoip.c ++++ b/geoip.c @@ -34,41 +34,72 @@ #include "ext/standard/info.h" #include "php_geoip.h" diff --git a/geoip-php81.patch b/geoip-php81.patch new file mode 100644 index 0000000..18c4769 --- /dev/null +++ b/geoip-php81.patch @@ -0,0 +1,63 @@ +From e24c5e54098958a1acc65b8830bc245c7d0662e6 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 11 Jun 2021 08:54:44 +0200 +Subject: [PATCH] don't test NULL raising deprecation in 8.1 (and will be + removed later) + +--- + tests/014.phpt | 8 ++------ + tests/016.phpt | 8 -------- + 2 files changed, 2 insertions(+), 14 deletions(-) + +diff --git a/tests/014.phpt b/tests/014.phpt +index 40f3ef8..93bc1f7 100644 +--- a/tests/014.phpt ++++ b/tests/014.phpt +@@ -8,10 +8,9 @@ Checking timezone info with (some) empty fields + + --EXPECTF-- +@@ -21,6 +20,3 @@ string(%d) "Europe/%s" + + Warning: geoip_time_zone_by_country_and_region(): You need to specify at least the country code. in %s on line %d + bool(false) +- +-Warning: geoip_time_zone_by_country_and_region(): You need to specify at least the country code. in %s on line %d +-bool(false) +diff --git a/tests/016.phpt b/tests/016.phpt +index 83c5250..9b2f056 100644 +--- a/tests/016.phpt ++++ b/tests/016.phpt +@@ -8,10 +8,8 @@ Checking geoip_region_name_by_code with (some) empty fields + +@@ -19,12 +17,6 @@ var_dump(geoip_region_name_by_code(1,'QC')); + + Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d + bool(false) +- +-Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d +-bool(false) +-bool(false) +- +-Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d + bool(false) + + Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec index 15a859d..fd0db6f 100644 --- a/php-pecl-geoip.spec +++ b/php-pecl-geoip.spec @@ -3,15 +3,16 @@ Name: php-pecl-geoip Version: 1.1.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Extension to map IP addresses to geographic places License: PHP URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# Upstream patch for PHP 8 +# Upstream patches # https://svn.php.net/viewvc?view=revision&revision=351082 Patch0: %{pecl_name}-php8.patch +Patch1: %{pecl_name}-php81.patch BuildRequires: make BuildRequires: gcc @@ -49,7 +50,8 @@ extension=%{pecl_name}.so EOF cd %{pecl_name}-%{version} -%patch0 -p3 -b .up +%patch0 -p1 -b .php8 +%patch1 -p1 -b .php81 # Upstream often forget this extver=$(sed -n '/#define PHP_GEOIP_VERSION/{s/.* "//;s/".*$//;p}' php_geoip.h) @@ -111,6 +113,10 @@ NO_INTERACTION=1 \ %changelog +* Thu Oct 28 2021 Remi Collet - 1.1.1-17 +- rebuild for https://fedoraproject.org/wiki/Changes/php81 +- add upstream patch for PHP 8.1 + * Fri Jul 23 2021 Fedora Release Engineering - 1.1.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild