From 442b0de33b4ab899fd3ee25c5f41a979922d0db1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Nov 2020 10:37:54 +0100 Subject: update to 8.1.0 drop all patches merged upstream --- 10.patch | 41 ----- 11.patch | 37 ----- 12.patch | 112 ------------- 13.patch | 89 ----------- 15.patch | 106 ------------- 5.patch | 101 ------------ 8.patch | 390 ---------------------------------------------- 9.patch | 109 ------------- PHPINFO | 2 +- REFLECTION | 2 +- ip2location-tests.patch | 18 +++ php-pecl-ip2location.spec | 46 ++---- 12 files changed, 32 insertions(+), 1021 deletions(-) delete mode 100644 10.patch delete mode 100644 11.patch delete mode 100644 12.patch delete mode 100644 13.patch delete mode 100644 15.patch delete mode 100644 5.patch delete mode 100644 8.patch delete mode 100644 9.patch create mode 100644 ip2location-tests.patch diff --git a/10.patch b/10.patch deleted file mode 100644 index b8ade4b..0000000 --- a/10.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c788be10e9bd9979b9f8ae0d649b26f6b1cce140 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 24 Sep 2020 11:01:28 +0200 -Subject: [PATCH] display library version in MINFO - ---- - ip2location.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/ip2location.c b/ip2location.c -index 7996b57..848bb36 100644 ---- a/ip2location.c -+++ b/ip2location.c -@@ -119,9 +119,26 @@ PHP_MSHUTDOWN_FUNCTION(ip2location) - * */ - PHP_MINFO_FUNCTION(ip2location) - { -+ char buf[32]; -+ unsigned long ver; -+ - php_info_print_table_start(); - php_info_print_table_header(2, "ip2location support", "enabled"); -- php_info_print_table_row(2, "version", PHP_IP2LOCATION_VERSION); -+ php_info_print_table_row(2, "extension version", PHP_IP2LOCATION_VERSION); -+#if API_VERSION_NUMERIC >= 80100 -+ ver = IP2Location_api_version_number(); -+#else -+ ver = IP2Location_api_version_num(); -+#endif -+ snprintf(buf, sizeof(buf), "%d.%d.%d", API_VERSION_MAJOR, API_VERSION_MINOR, API_VERSION_RELEASE); -+ if (API_VERSION_NUMERIC == ver) { -+ php_info_print_table_row(2, "library version", buf); -+ } else { -+ /* display both headers/runtime versions when differ */ -+ php_info_print_table_row(2, "library headers version", buf); -+ snprintf(buf, sizeof(buf), "%lu.%lu.%lu", ver / 10000, (ver / 100) % 100, ver % 100); -+ php_info_print_table_row(2, "library runtime version", buf); -+ } - php_info_print_table_end(); - } - /* }}} */ diff --git a/11.patch b/11.patch deleted file mode 100644 index be346f2..0000000 --- a/11.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e73c4c546dc7845cd161e51ffe339acb5421c39b Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 24 Sep 2020 11:37:49 +0200 -Subject: [PATCH] remove remaining hardcoded /lib - ---- - config.m4 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/config.m4 b/config.m4 -index 5abb4fa..b8041bc 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -9,7 +9,7 @@ dnl Make sure that the comment is aligned: - if test "$PHP_IP2LOCATION" != "no"; then - - # --with-ip2location -> check with-path -- SEARCH_PATH="/usr/local /usr /opt/local /lib" -+ SEARCH_PATH="/usr/local /usr /opt/local" - SEARCH_FOR="/include/IP2Location.h" - if test -r $PHP_IP2LOCATION/$SEARCH_FOR; then - IP2LOCATION_DIR=$PHP_IP2LOCATION -@@ -43,12 +43,12 @@ if test "$PHP_IP2LOCATION" != "no"; then - - PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOLNEW, - [ -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IP2LOCATION_DIR/lib, IP2LOCATION_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IP2LOCATION_DIR/$PHP_LIBDIR, IP2LOCATION_SHARED_LIBADD) - AC_DEFINE(HAVE_IPLOCATIONLIB,1,[ ]) - ],[ - PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOLOLD, - [ -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IP2LOCATION_DIR/lib, IP2LOCATION_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IP2LOCATION_DIR/$PHP_LIBDIR, IP2LOCATION_SHARED_LIBADD) - AC_DEFINE(HAVE_IPLOCATIONLIB,1,[ ]) - ],[ - AC_MSG_ERROR([wrong ip2location, lib version >= 6.x.x is required or library not found]) diff --git a/12.patch b/12.patch deleted file mode 100644 index 6fc98ec..0000000 --- a/12.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 9d0d006505d6c8fdf4ed9d52df1be10e16fa02d3 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 30 Sep 2020 15:06:29 +0200 -Subject: [PATCH] adapt for library version 8.1.4 - ---- - ip2location.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/ip2location.c b/ip2location.c -index 064e5a2..198410a 100644 ---- a/ip2location.c -+++ b/ip2location.c -@@ -406,7 +406,7 @@ PHP_FUNCTION(ip2location_get_zipcode) - return; - } - record = IP2Location_get_zipcode(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->zip_code; - #else - ret = record->zipcode; -@@ -434,7 +434,7 @@ PHP_FUNCTION(ip2location_get_timezone) - return; - } - record = IP2Location_get_timezone(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->time_zone; - #else - ret = record->timezone; -@@ -469,7 +469,7 @@ PHP_FUNCTION(ip2location_get_netspeed) - } - - record = IP2Location_get_netspeed(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->net_speed; - #else - ret = record->netspeed; -@@ -497,7 +497,7 @@ PHP_FUNCTION(ip2location_get_iddcode) - return; - } - record = IP2Location_get_iddcode(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->idd_code; - #else - ret = record->iddcode; -@@ -525,7 +525,7 @@ PHP_FUNCTION(ip2location_get_areacode) - return; - } - record = IP2Location_get_areacode(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->area_code; - #else - ret = record->areacode; -@@ -553,7 +553,7 @@ PHP_FUNCTION(ip2location_get_weatherstationcode) - return; - } - record = IP2Location_get_weatherstationcode(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->weather_station_code; - #else - ret = record->weatherstationcode; -@@ -581,7 +581,7 @@ PHP_FUNCTION(ip2location_get_weatherstationname) - return; - } - record = IP2Location_get_weatherstationname(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->weather_station_name; - #else - ret = record->weatherstationname; -@@ -655,7 +655,7 @@ PHP_FUNCTION(ip2location_get_mobilebrand) - return; - } - record = IP2Location_get_mobilebrand(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->mobile_brand; - #else - ret = record->mobilebrand; -@@ -702,7 +702,7 @@ PHP_FUNCTION(ip2location_get_usagetype) - return; - } - record = IP2Location_get_usagetype(IP2LOCATION_G(ip2location_ptr), ip_address); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - ret = record->usage_type; - #else - ret = record->usagetype; -@@ -738,7 +738,7 @@ PHP_FUNCTION(ip2location_get_all) - add_assoc_string(return_value, "city",record->city); - add_assoc_string(return_value, "isp",record->isp); - add_assoc_string(return_value, "domain",record->domain); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - add_assoc_string(return_value, "zipcode",record->zip_code); - add_assoc_string(return_value, "timezone",record->time_zone); - add_assoc_string(return_value, "netspeed",record->net_speed); -@@ -768,7 +768,7 @@ PHP_FUNCTION(ip2location_get_all) - add_assoc_string(return_value, "city",record->city, 1); - add_assoc_string(return_value, "isp",record->isp, 1); - add_assoc_string(return_value, "domain",record->domain, 1); --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104 - add_assoc_string(return_value, "zipcode",record->zip_code, 1); - add_assoc_string(return_value, "timezone",record->time_zone, 1); - add_assoc_string(return_value, "netspeed",record->net_speed, 1); diff --git a/13.patch b/13.patch deleted file mode 100644 index 8f04772..0000000 --- a/13.patch +++ /dev/null @@ -1,89 +0,0 @@ -From f3169d68045c7d1db9606856261774b459c0912a Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 8 Oct 2020 09:02:28 +0200 -Subject: [PATCH 1/2] always display where header is found - ---- - config.m4 | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/config.m4 b/config.m4 -index b8041bc..89d9eaa 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -11,14 +11,13 @@ if test "$PHP_IP2LOCATION" != "no"; then - # --with-ip2location -> check with-path - SEARCH_PATH="/usr/local /usr /opt/local" - SEARCH_FOR="/include/IP2Location.h" -+ AC_MSG_CHECKING([for ip2location files in default path]) - if test -r $PHP_IP2LOCATION/$SEARCH_FOR; then - IP2LOCATION_DIR=$PHP_IP2LOCATION - else # search default path list -- AC_MSG_CHECKING([for ip2location files in default path]) - for i in $SEARCH_PATH ; do - if test -r $i/$SEARCH_FOR; then - IP2LOCATION_DIR=$i -- AC_MSG_RESULT([found in $i]) - fi - done - fi -@@ -26,6 +25,8 @@ if test "$PHP_IP2LOCATION" != "no"; then - if test -z "$IP2LOCATION_DIR"; then - AC_MSG_RESULT([not found]) - AC_MSG_ERROR([Please reinstall the ip2location C library]) -+ else -+ AC_MSG_RESULT([found in $IP2LOCATION_DIR]) - fi - - # --with-ip2location -> add include path - -From 174847db69b9806cf501038814fc8ff852845ff7 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 8 Oct 2020 09:02:51 +0200 -Subject: [PATCH 2/2] don't track build artefacts - ---- - .gitignore | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - create mode 100644 .gitignore - -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..aa304ab ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1,34 @@ -+*.lo -+.deps -+.libs/ -+.*.swp -+Makefile -+Makefile.fragments -+Makefile.global -+Makefile.objects -+acinclude.m4 -+aclocal.m4 -+autom4te.cache/ -+build/ -+config.guess -+config.h -+config.h.in -+config.h.in~ -+config.log -+config.nice -+config.status -+config.sub -+configure -+configure.in -+configure.ac -+data/.libs/ -+install-sh -+libtool -+ltmain.sh -+ltmain.sh.backup -+missing -+mkinstalldirs -+modules/ -+run-tests.php -+run-tests.sh -+*.la diff --git a/15.patch b/15.patch deleted file mode 100644 index ca21ec9..0000000 --- a/15.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 8a24f22087beca64a579fb4685f7ead92ccb535f Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 30 Oct 2020 10:05:59 +0100 -Subject: [PATCH] add ip2location_bin_version from library version 8.3.0 - ---- - ip2location.c | 30 ++++++++++++++++++++++++++++-- - php_ip2location.h | 3 +++ - tests/file.phpt | 2 ++ - 3 files changed, 33 insertions(+), 2 deletions(-) - -diff --git a/ip2location.c b/ip2location.c -index 198410a..e849e52 100644 ---- a/ip2location.c -+++ b/ip2location.c -@@ -76,6 +76,9 @@ static zend_function_entry ip2location_functions_entry[] = { - PHP_FE(ip2location_get_all, ip2location_ip_address) - PHP_FE(ip2location_close, ip2location_void) - PHP_FE(ip2location_delete_shm, ip2location_void) -+#if API_VERSION_NUMERIC >= 80300 -+ PHP_FE(ip2location_bin_version, ip2location_void) -+#endif - #ifdef PHP_FE_END - PHP_FE_END - #else -@@ -805,7 +808,7 @@ PHP_FUNCTION(ip2location_get_all) - * Returns the record information */ - PHP_FUNCTION(ip2location_close) - { -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") != SUCCESS) { -+ if (zend_parse_parameters_none() != SUCCESS) { - return; - } - if (IP2LOCATION_G(ip2location_ptr)) { -@@ -819,7 +822,7 @@ PHP_FUNCTION(ip2location_close) - * Returns nothing */ - PHP_FUNCTION(ip2location_delete_shm) - { -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") != SUCCESS) { -+ if (zend_parse_parameters_none() != SUCCESS) { - return; - } - #if API_VERSION_NUMERIC >= 80100 -@@ -830,6 +833,29 @@ PHP_FUNCTION(ip2location_delete_shm) - } - /* }}} */ - -+#if API_VERSION_NUMERIC >= 80300 -+/* {{{ ip2location_open_mem() -+ * Returns the version */ -+PHP_FUNCTION(ip2location_bin_version) -+{ -+ char *version; -+ -+ if (zend_parse_parameters_none() != SUCCESS) { -+ return; -+ } -+ -+ PHP_IP2LOCATION_DB_CHECK; -+ version = IP2Location_bin_version(IP2LOCATION_G(ip2location_ptr)); -+ -+#if PHP_MAJOR_VERSION >= 7 -+ RETVAL_STRING(version); -+#else -+ RETVAL_STRING(version, 1); -+#endif -+} -+/* }}} */ -+#endif -+ - /* - * Local variables: - * tab-width: 4 -diff --git a/php_ip2location.h b/php_ip2location.h -index f055009..37ec987 100644 ---- a/php_ip2location.h -+++ b/php_ip2location.h -@@ -64,6 +64,9 @@ PHP_FUNCTION(ip2location_get_usagetype); - PHP_FUNCTION(ip2location_get_all); - PHP_FUNCTION(ip2location_close); - PHP_FUNCTION(ip2location_delete_shm); -+#if API_VERSION_NUMERIC >= 80300 -+PHP_FUNCTION(ip2location_bin_version); -+#endif - - ZEND_BEGIN_MODULE_GLOBALS(ip2location) - IP2Location *ip2location_ptr; -diff --git a/tests/file.phpt b/tests/file.phpt -index 6b6bc4c..6c9a4f5 100644 ---- a/tests/file.phpt -+++ b/tests/file.phpt -@@ -11,6 +11,7 @@ var_dump(ip2location_open(__DIR__ . '/IP-COUNTRY-SAMPLE.BIN')); - var_dump(ip2location_open_mem(IP2LOCATION_FILE_IO)); - var_dump(ip2location_get_country_short('25.5.10.2')); - var_dump(ip2location_get_country_long('25.5.10.2')); -+var_dump(ip2location_bin_version()); - var_dump(ip2location_close()); - ?> - Done -@@ -19,5 +20,6 @@ bool(true) - bool(true) - string(2) "UK" - string(14) "UNITED KINGDOM" -+string(9) "2013-4-11" - NULL - Done diff --git a/5.patch b/5.patch deleted file mode 100644 index e430650..0000000 --- a/5.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 2d3eaa98c1022df06bf667b0284316d73b5e6f00 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 7 Nov 2017 09:02:35 +0100 -Subject: [PATCH 2/2] add 3 real tests - ---- - tests/cache.phpt | 23 +++++++++++++++++++++++ - tests/file.phpt | 23 +++++++++++++++++++++++ - tests/shm.phpt | 23 +++++++++++++++++++++++ - 3 files changed, 69 insertions(+) - create mode 100644 tests/cache.phpt - create mode 100644 tests/file.phpt - create mode 100644 tests/shm.phpt - -diff --git a/tests/cache.phpt b/tests/cache.phpt -new file mode 100644 -index 0000000..d6c5157 ---- /dev/null -+++ b/tests/cache.phpt -@@ -0,0 +1,23 @@ -+--TEST-- -+DB access using cache method -+--SKIPIF-- -+ -+--FILE-- -+ -+Done -+--EXPECTF-- -+bool(true) -+bool(true) -+string(2) "UK" -+string(14) "UNITED KINGDOM" -+NULL -+Done -diff --git a/tests/file.phpt b/tests/file.phpt -new file mode 100644 -index 0000000..6b6bc4c ---- /dev/null -+++ b/tests/file.phpt -@@ -0,0 +1,23 @@ -+--TEST-- -+DB access using file method -+--SKIPIF-- -+ -+--FILE-- -+ -+Done -+--EXPECTF-- -+bool(true) -+bool(true) -+string(2) "UK" -+string(14) "UNITED KINGDOM" -+NULL -+Done -diff --git a/tests/shm.phpt b/tests/shm.phpt -new file mode 100644 -index 0000000..056c1d4 ---- /dev/null -+++ b/tests/shm.phpt -@@ -0,0 +1,23 @@ -+--TEST-- -+DB access using shared memory method -+--SKIPIF-- -+ -+--FILE-- -+ -+Done -+--EXPECTF-- -+bool(true) -+bool(true) -+string(2) "UK" -+string(14) "UNITED KINGDOM" -+NULL -+Done diff --git a/8.patch b/8.patch deleted file mode 100644 index 94126f7..0000000 --- a/8.patch +++ /dev/null @@ -1,390 +0,0 @@ -From 570306a94ee8caa1af9c817c5f991cbfee9003d3 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 24 Sep 2020 09:34:59 +0200 -Subject: [PATCH] adapt for library version 8.1.0 - ---- - config.m4 | 17 ++++-- - ip2location.c | 146 +++++++++++++++++++++++++++++++++++++++----------- - 2 files changed, 128 insertions(+), 35 deletions(-) - -diff --git a/config.m4 b/config.m4 -index 7c3ae1d..5abb4fa 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -38,16 +38,25 @@ if test "$PHP_IP2LOCATION" != "no"; then - - # --with-ip2location -> check for lib and symbol presence - LIBNAME=IP2Location # you may want to change this -- LIBSYMBOL=IP2Location_open_mem # you most likely want to change this -+ LIBSYMBOLOLD=IP2Location_open_mem -+ LIBSYMBOLNEW=IP2Location_set_lookup_mode - -- PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, -+ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOLNEW, - [ - PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IP2LOCATION_DIR/lib, IP2LOCATION_SHARED_LIBADD) - AC_DEFINE(HAVE_IPLOCATIONLIB,1,[ ]) - ],[ -- AC_MSG_ERROR([wrong ip2location, lib version >= 6.x.x is required or library not found]) -+ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOLOLD, -+ [ -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IP2LOCATION_DIR/lib, IP2LOCATION_SHARED_LIBADD) -+ AC_DEFINE(HAVE_IPLOCATIONLIB,1,[ ]) -+ ],[ -+ AC_MSG_ERROR([wrong ip2location, lib version >= 6.x.x is required or library not found]) -+ ],[ -+ -L$IP2LOCATION_DIR/$PHP_LIBDIR -+ ]) - ],[ -- -L$IP2LOCATION_DIR/$PHP_LIBDIR -+ -L$IP2LOCATION_DIR/$PHP_LIBDIR - ]) - - PHP_SUBST(IP2LOCATION_SHARED_LIBADD) -diff --git a/ip2location.c b/ip2location.c -index e415e68..7996b57 100644 ---- a/ip2location.c -+++ b/ip2location.c -@@ -158,7 +158,11 @@ PHP_FUNCTION(ip2location_open_mem) - } - /*Shared memory method is not supported*/ - if( method == IP2LOCATION_FILE_IO || method == IP2LOCATION_CACHE_MEMORY || method == IP2LOCATION_SHARED_MEMORY ){ -+#if API_VERSION_NUMERIC >= 80100 -+ if(IP2Location_set_lookup_mode(IP2LOCATION_G(ip2location_ptr), method) == -1){ -+#else - if(IP2Location_open_mem(IP2LOCATION_G(ip2location_ptr), method) == -1){ -+#endif - RETURN_FALSE; - } - else{ -@@ -351,7 +355,7 @@ PHP_FUNCTION(ip2location_get_domain) - * Returns ip address's zipcode information */ - PHP_FUNCTION(ip2location_get_zipcode) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -361,10 +365,15 @@ PHP_FUNCTION(ip2location_get_zipcode) - return; - } - record = IP2Location_get_zipcode(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->zip_code; -+#else -+ ret = record->zipcode; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->zipcode); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->zipcode, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -374,7 +383,7 @@ PHP_FUNCTION(ip2location_get_zipcode) - * Returns ip address's timezone information */ - PHP_FUNCTION(ip2location_get_timezone) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -384,20 +393,31 @@ PHP_FUNCTION(ip2location_get_timezone) - return; - } - record = IP2Location_get_timezone(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->time_zone; -+#else -+ ret = record->timezone; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->timezone); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->timezone, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } - /* }}} */ - -+ -+#if API_VERSION_NUMERIC >= 80100 -+/* see https://github.com/chrislim2888/IP2Location-C-Library/issues/37 */ -+IP2LocationRecord *IP2Location_get_netspeed(IP2Location *handler, char *ip); -+#endif -+ - /* {{{ ip2location_get_netspeed("ip_address") - * Returns ip address's netspeed information */ - PHP_FUNCTION(ip2location_get_netspeed) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -406,11 +426,17 @@ PHP_FUNCTION(ip2location_get_netspeed) - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip_address, &ip_len) == FAILURE) { - return; - } -+ - record = IP2Location_get_netspeed(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->net_speed; -+#else -+ ret = record->netspeed; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->netspeed); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->netspeed, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -420,7 +446,7 @@ PHP_FUNCTION(ip2location_get_netspeed) - * Returns ip address's iddcode information */ - PHP_FUNCTION(ip2location_get_iddcode) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -430,10 +456,15 @@ PHP_FUNCTION(ip2location_get_iddcode) - return; - } - record = IP2Location_get_iddcode(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->idd_code; -+#else -+ ret = record->iddcode; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->iddcode); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->iddcode, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -443,7 +474,7 @@ PHP_FUNCTION(ip2location_get_iddcode) - * Returns ip address's areacode information */ - PHP_FUNCTION(ip2location_get_areacode) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -453,10 +484,15 @@ PHP_FUNCTION(ip2location_get_areacode) - return; - } - record = IP2Location_get_areacode(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->area_code; -+#else -+ ret = record->areacode; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->areacode); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->areacode, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -466,7 +502,7 @@ PHP_FUNCTION(ip2location_get_areacode) - * Returns ip address's weatherstationcode information */ - PHP_FUNCTION(ip2location_get_weatherstationcode) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -476,10 +512,15 @@ PHP_FUNCTION(ip2location_get_weatherstationcode) - return; - } - record = IP2Location_get_weatherstationcode(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->weather_station_code; -+#else -+ ret = record->weatherstationcode; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->weatherstationcode); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->weatherstationcode, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -489,7 +530,7 @@ PHP_FUNCTION(ip2location_get_weatherstationcode) - * Returns ip address's weatherstationname information */ - PHP_FUNCTION(ip2location_get_weatherstationname) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -499,10 +540,15 @@ PHP_FUNCTION(ip2location_get_weatherstationname) - return; - } - record = IP2Location_get_weatherstationname(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->weather_station_name; -+#else -+ ret = record->weatherstationname; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->weatherstationname); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->weatherstationname, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -558,7 +604,7 @@ PHP_FUNCTION(ip2location_get_mnc) - * Returns ip address's mobilebrand information */ - PHP_FUNCTION(ip2location_get_mobilebrand) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -568,10 +614,15 @@ PHP_FUNCTION(ip2location_get_mobilebrand) - return; - } - record = IP2Location_get_mobilebrand(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->mobile_brand; -+#else -+ ret = record->mobilebrand; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->mobilebrand); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->mobilebrand, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -600,7 +651,7 @@ PHP_FUNCTION(ip2location_get_elevation) - * Returns ip address's internet connection usagetype information */ - PHP_FUNCTION(ip2location_get_usagetype) - { -- char *ip_address; -+ char *ip_address, *ret; - size_t ip_len; - IP2LocationRecord *record = NULL; - -@@ -610,10 +661,15 @@ PHP_FUNCTION(ip2location_get_usagetype) - return; - } - record = IP2Location_get_usagetype(IP2LOCATION_G(ip2location_ptr), ip_address); -+#if API_VERSION_NUMERIC >= 80100 -+ ret = record->usage_type; -+#else -+ ret = record->usagetype; -+#endif - #if PHP_MAJOR_VERSION >= 7 -- RETVAL_STRING(record->usagetype); -+ RETVAL_STRING(ret); - #else -- RETVAL_STRING(record->usagetype, 1); -+ RETVAL_STRING(ret, 1); - #endif - IP2Location_free_record(record); - } -@@ -641,6 +697,17 @@ PHP_FUNCTION(ip2location_get_all) - add_assoc_string(return_value, "city",record->city); - add_assoc_string(return_value, "isp",record->isp); - add_assoc_string(return_value, "domain",record->domain); -+#if API_VERSION_NUMERIC >= 80100 -+ add_assoc_string(return_value, "zipcode",record->zip_code); -+ add_assoc_string(return_value, "timezone",record->time_zone); -+ add_assoc_string(return_value, "netspeed",record->net_speed); -+ add_assoc_string(return_value, "iddcode",record->idd_code); -+ add_assoc_string(return_value, "areacode",record->area_code); -+ add_assoc_string(return_value, "weatherstationcode",record->weather_station_code); -+ add_assoc_string(return_value, "weatherstationname",record->weather_station_name); -+ add_assoc_string(return_value, "mobilebrand",record->mobile_brand); -+ add_assoc_string(return_value, "usagetype",record->usage_type); -+#else - add_assoc_string(return_value, "zipcode",record->zipcode); - add_assoc_string(return_value, "timezone",record->timezone); - add_assoc_string(return_value, "netspeed",record->netspeed); -@@ -648,10 +715,11 @@ PHP_FUNCTION(ip2location_get_all) - add_assoc_string(return_value, "areacode",record->areacode); - add_assoc_string(return_value, "weatherstationcode",record->weatherstationcode); - add_assoc_string(return_value, "weatherstationname",record->weatherstationname); -- add_assoc_string(return_value, "mcc",record->mcc); -- add_assoc_string(return_value, "mnc",record->mnc); - add_assoc_string(return_value, "mobilebrand",record->mobilebrand); - add_assoc_string(return_value, "usagetype",record->usagetype); -+#endif -+ add_assoc_string(return_value, "mcc",record->mcc); -+ add_assoc_string(return_value, "mnc",record->mnc); - #else - add_assoc_string(return_value, "country_short", record->country_short, 1); - add_assoc_string(return_value, "country_long", record->country_long, 1); -@@ -659,6 +727,17 @@ PHP_FUNCTION(ip2location_get_all) - add_assoc_string(return_value, "city",record->city, 1); - add_assoc_string(return_value, "isp",record->isp, 1); - add_assoc_string(return_value, "domain",record->domain, 1); -+#if API_VERSION_NUMERIC >= 80100 -+ add_assoc_string(return_value, "zipcode",record->zip_code, 1); -+ add_assoc_string(return_value, "timezone",record->time_zone, 1); -+ add_assoc_string(return_value, "netspeed",record->net_speed, 1); -+ add_assoc_string(return_value, "iddcode",record->idd_code, 1); -+ add_assoc_string(return_value, "areacode",record->area_code, 1); -+ add_assoc_string(return_value, "weatherstationcode",record->weather_station_code, 1); -+ add_assoc_string(return_value, "weatherstationname",record->weather_station_name, 1); -+ add_assoc_string(return_value, "mobilebrand",record->mobile_brand, 1); -+ add_assoc_string(return_value, "usagetype",record->usage_type, 1); -+#else - add_assoc_string(return_value, "zipcode",record->zipcode, 1); - add_assoc_string(return_value, "timezone",record->timezone, 1); - add_assoc_string(return_value, "netspeed",record->netspeed, 1); -@@ -666,11 +745,12 @@ PHP_FUNCTION(ip2location_get_all) - add_assoc_string(return_value, "areacode",record->areacode, 1); - add_assoc_string(return_value, "weatherstationcode",record->weatherstationcode, 1); - add_assoc_string(return_value, "weatherstationname",record->weatherstationname, 1); -- add_assoc_string(return_value, "mcc",record->mcc, 1); -- add_assoc_string(return_value, "mnc",record->mnc, 1); - add_assoc_string(return_value, "mobilebrand",record->mobilebrand, 1); - add_assoc_string(return_value, "usagetype",record->usagetype, 1); - #endif -+ add_assoc_string(return_value, "mcc",record->mcc, 1); -+ add_assoc_string(return_value, "mnc",record->mnc, 1); -+#endif - - add_assoc_double(return_value, "latitude",record->latitude ); - add_assoc_double(return_value, "longitude",record->longitude ); -@@ -701,7 +781,11 @@ PHP_FUNCTION(ip2location_delete_shm) - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") != SUCCESS) { - return; - } -+#if API_VERSION_NUMERIC >= 80100 -+ IP2Location_clear_memory(); -+#else - IP2Location_delete_shm(); -+#endif - } - /* }}} */ - diff --git a/9.patch b/9.patch deleted file mode 100644 index 375cf97..0000000 --- a/9.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 47b8ff06fba74c5fbe57b06c60b898d4b120139c Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 24 Sep 2020 10:36:13 +0200 -Subject: [PATCH] add all arginfo, and fix PHP 8 compatibility - ---- - ip2location.c | 76 +++++++++++++++++++++++++++++++++------------------ - 1 file changed, 50 insertions(+), 26 deletions(-) - -diff --git a/ip2location.c b/ip2location.c -index 7996b57..4d91bd6 100644 ---- a/ip2location.c -+++ b/ip2location.c -@@ -26,37 +26,61 @@ - - #include "php_ip2location.h" - -+/* For PHP 8 */ -+#ifndef TSRMLS_CC -+#define TSRMLS_CC -+#endif -+ - ZEND_DECLARE_MODULE_GLOBALS(ip2location) - - #define IP2LOCATION_RECORD 0 - -+ZEND_BEGIN_ARG_INFO_EX(ip2location_open, 0, 0, 1) -+ ZEND_ARG_INFO(0, file_path) -+ZEND_END_ARG_INFO() -+ -+ZEND_BEGIN_ARG_INFO_EX(ip2location_open_mem, 0, 0, 1) -+ ZEND_ARG_INFO(0, method) -+ZEND_END_ARG_INFO() -+ -+ZEND_BEGIN_ARG_INFO_EX(ip2location_ip_address, 0, 0, 1) -+ ZEND_ARG_INFO(0, ip_address) -+ZEND_END_ARG_INFO() -+ -+ZEND_BEGIN_ARG_INFO_EX(ip2location_void, 0, 0, 0) -+ZEND_END_ARG_INFO() -+ - static zend_function_entry ip2location_functions_entry[] = { -- PHP_FE(ip2location_open, NULL) -- PHP_FE(ip2location_open_mem, NULL) -- PHP_FE(ip2location_get_country_short, NULL) -- PHP_FE(ip2location_get_country_long, NULL) -- PHP_FE(ip2location_get_region, NULL) -- PHP_FE(ip2location_get_city, NULL) -- PHP_FE(ip2location_get_isp, NULL) -- PHP_FE(ip2location_get_latitude, NULL) -- PHP_FE(ip2location_get_longitude, NULL) -- PHP_FE(ip2location_get_domain, NULL) -- PHP_FE(ip2location_get_zipcode, NULL) -- PHP_FE(ip2location_get_timezone, NULL) -- PHP_FE(ip2location_get_netspeed, NULL) -- PHP_FE(ip2location_get_iddcode, NULL) -- PHP_FE(ip2location_get_areacode, NULL) -- PHP_FE(ip2location_get_weatherstationcode, NULL) -- PHP_FE(ip2location_get_weatherstationname, NULL) -- PHP_FE(ip2location_get_mcc, NULL) -- PHP_FE(ip2location_get_mnc, NULL) -- PHP_FE(ip2location_get_mobilebrand, NULL) -- PHP_FE(ip2location_get_elevation, NULL) -- PHP_FE(ip2location_get_usagetype, NULL) -- PHP_FE(ip2location_get_all, NULL) -- PHP_FE(ip2location_close, NULL) -- PHP_FE(ip2location_delete_shm, NULL) -+ PHP_FE(ip2location_open, ip2location_open) -+ PHP_FE(ip2location_open_mem, ip2location_open_mem) -+ PHP_FE(ip2location_get_country_short, ip2location_ip_address) -+ PHP_FE(ip2location_get_country_long, ip2location_ip_address) -+ PHP_FE(ip2location_get_region, ip2location_ip_address) -+ PHP_FE(ip2location_get_city, ip2location_ip_address) -+ PHP_FE(ip2location_get_isp, ip2location_ip_address) -+ PHP_FE(ip2location_get_latitude, ip2location_ip_address) -+ PHP_FE(ip2location_get_longitude, ip2location_ip_address) -+ PHP_FE(ip2location_get_domain, ip2location_ip_address) -+ PHP_FE(ip2location_get_zipcode, ip2location_ip_address) -+ PHP_FE(ip2location_get_timezone, ip2location_ip_address) -+ PHP_FE(ip2location_get_netspeed, ip2location_ip_address) -+ PHP_FE(ip2location_get_iddcode, ip2location_ip_address) -+ PHP_FE(ip2location_get_areacode, ip2location_ip_address) -+ PHP_FE(ip2location_get_weatherstationcode, ip2location_ip_address) -+ PHP_FE(ip2location_get_weatherstationname, ip2location_ip_address) -+ PHP_FE(ip2location_get_mcc, ip2location_ip_address) -+ PHP_FE(ip2location_get_mnc, ip2location_ip_address) -+ PHP_FE(ip2location_get_mobilebrand, ip2location_ip_address) -+ PHP_FE(ip2location_get_elevation, ip2location_ip_address) -+ PHP_FE(ip2location_get_usagetype, ip2location_ip_address) -+ PHP_FE(ip2location_get_all, ip2location_ip_address) -+ PHP_FE(ip2location_close, ip2location_void) -+ PHP_FE(ip2location_delete_shm, ip2location_void) -+#ifdef PHP_FE_END -+ PHP_FE_END -+#else - {NULL, NULL, NULL} -+#endif - }; - - /* the following code creates an entry for the module and registers it with Zend.*/ -@@ -408,7 +432,7 @@ PHP_FUNCTION(ip2location_get_timezone) - /* }}} */ - - --#if API_VERSION_NUMERIC >= 80100 -+#if API_VERSION_NUMERIC == 80100 - /* see https://github.com/chrislim2888/IP2Location-C-Library/issues/37 */ - IP2LocationRecord *IP2Location_get_netspeed(IP2Location *handler, char *ip); - #endif diff --git a/PHPINFO b/PHPINFO index 13ef579..3807e2c 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,5 +2,5 @@ ip2location ip2location support => enabled -extension version => 8.0.1 +extension version => 8.1.0 library version => 8.3.1 diff --git a/REFLECTION b/REFLECTION index 6b1b69e..7328f28 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #78 ip2location version 8.0.1 ] { +Extension [ extension #78 ip2location version 8.1.0 ] { - Constants [4] { Constant [ int IP2LOCATION_FILE_IO ] { 0 } diff --git a/ip2location-tests.patch b/ip2location-tests.patch new file mode 100644 index 0000000..e8c4f84 --- /dev/null +++ b/ip2location-tests.patch @@ -0,0 +1,18 @@ +diff -up tests/file.phpt.old tests/file.phpt +--- tests/file.phpt.old 2020-11-19 10:10:14.948127303 +0100 ++++ tests/file.phpt 2020-11-19 10:13:24.705560070 +0100 +@@ -11,6 +11,7 @@ var_dump(ip2location_open(__DIR__ . '/IP + var_dump(ip2location_open_mem(IP2LOCATION_FILE_IO)); + var_dump(ip2location_get_country_short('25.5.10.2')); + var_dump(ip2location_get_country_long('25.5.10.2')); ++if (function_exists('ip2location_bin_version') && ip2location_bin_version() !== '2013-4-11') + var_dump(ip2location_bin_version()); + var_dump(ip2location_close()); + ?> +@@ -20,6 +21,5 @@ bool(true) + bool(true) + string(2) "UK" + string(14) "UNITED KINGDOM" +-string(9) "2013-4-11" + NULL + Done diff --git a/php-pecl-ip2location.spec b/php-pecl-ip2location.spec index 4a93acd..e436964 100644 --- a/php-pecl-ip2location.spec +++ b/php-pecl-ip2location.spec @@ -19,39 +19,25 @@ %global ini_name 40-%{pecl_name}.ini %endif -%global upstream_version 8.0.1 +%global upstream_version 8.1.0 #global upstream_prever RC1 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: 11%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -# 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 -# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/12 - library 8.1.4 -Patch5: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/12.patch -# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/13 - config -Patch6: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/13.patch -# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/15 - ip2location_bin_version -Patch7: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/15.patch +# Fix test with old library < 8.3 +Patch0: %{pecl_name}-tests.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-devel # ensure proper version is used -BuildRequires: IP2Location-devel >= 8.2.0 +BuildRequires: IP2Location-devel >= 8.2 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -104,24 +90,12 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS # Don't install tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ - -e '/README.TXT/s/role="doc"/role="src"/' \ + -e '/README.TXT/s/role="doc"/role="test"/' \ -i package.xml cd NTS -sed -e "s/\r//" -i LICENSE CREDITS README *.c *.h -chmod -x *.c *.h LICENSE CREDITS README - -: Patches -mv test tests -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 -%patch5 -p1 -b .pr12 -%patch6 -p1 -b .pr13 -%patch7 -p1 -b .pr15 +sed -e "s/\r//" -i LICENSE CREDITS *.md *.c *.h +%patch0 -p0 # Check version extver=$(sed -n '/#define PHP_IP2LOCATION_VERSION/{s/.* "//;s/".*$//;p}' php_ip2location.h) @@ -243,6 +217,10 @@ fi %changelog +* Thu Nov 19 2020 Remi Collet - 8.1.0-1 +- update to 8.1.0 +- drop all patches merged upstream + * Wed Nov 18 2020 Remi Collet - 8.0.1-11 - add patch to improve configure output from https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/13 -- cgit