summaryrefslogtreecommitdiff
path: root/dev-php/pecl-geoip/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-09 14:16:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-09 14:16:10 +0100
commitc62f31f933c259fc576a912eed0856ca03346fc4 (patch)
tree0ea376f6ab79cebbc42b1c32d28ba8df12010fa7 /dev-php/pecl-geoip/files
parent21616d4521c47fc859035ab3939842cddd56e374 (diff)
gentoo auto-resync : 09:08:2022 - 14:16:10
Diffstat (limited to 'dev-php/pecl-geoip/files')
-rw-r--r--dev-php/pecl-geoip/files/fix-failing-tests-1.1.1.patch46
-rw-r--r--dev-php/pecl-geoip/files/fix-failing-tests-php8-1-1.1.1.patch71
-rw-r--r--dev-php/pecl-geoip/files/php8-support-1.1.1.patch93
3 files changed, 0 insertions, 210 deletions
diff --git a/dev-php/pecl-geoip/files/fix-failing-tests-1.1.1.patch b/dev-php/pecl-geoip/files/fix-failing-tests-1.1.1.patch
deleted file mode 100644
index a86994708e7b..000000000000
--- a/dev-php/pecl-geoip/files/fix-failing-tests-1.1.1.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-On Gentoo, we require users to download the GeoIP databases
-themselves. As a result, the databases may not be there when
-installing pecl-geoip. The first patch below skips a test if the
-database it uses is not present. The second patch disables 019.phpt
-completely, because I can't make it pass.
-
-PHP-Bug: 73416
-
-diff --git a/tests/001.phpt b/tests/001.phpt
-index a548d6e..c0e4972 100644
---- a/tests/001.phpt
-+++ b/tests/001.phpt
-@@ -1,7 +1,10 @@
- --TEST--
- Checking Country (Free) DB availability
- --SKIPIF--
--<?php if (!extension_loaded("geoip")) print "skip"; ?>
-+<?php
-+if (!extension_loaded("geoip")) print "skip";
-+if (!file_exists(geoip_db_filename(GEOIP_COUNTRY_EDITION))) print "skip";
-+?>
- --POST--
- --GET--
- --FILE--
-diff --git a/tests/019.phpt b/tests/019.phpt
-deleted file mode 100644
-index 4630354..0000000
---- a/tests/019.phpt
-+++ /dev/null
-@@ -1,15 +0,0 @@
----TEST--
--Checking geoip_setup_custom_directory() (with trailing slash)
----SKIPIF--
--<?php if (!extension_loaded("geoip")) print "skip"; ?>
----INI--
--geoip.custom_directory="/test/"
----FILE--
--<?php
--
--var_dump( geoip_country_name_by_name_v6('0000:0000:0000:0000') );
--
--?>
----EXPECT--
--string(27) "/some/other/place/GeoIP.dat"
--string(6) "/test/"
-\ No newline at end of file
diff --git a/dev-php/pecl-geoip/files/fix-failing-tests-php8-1-1.1.1.patch b/dev-php/pecl-geoip/files/fix-failing-tests-php8-1-1.1.1.patch
deleted file mode 100644
index a2f8353b438c..000000000000
--- a/dev-php/pecl-geoip/files/fix-failing-tests-php8-1-1.1.1.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-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
- <?php
-
- var_dump(geoip_time_zone_by_country_and_region('US','MA'));
--var_dump(geoip_time_zone_by_country_and_region('US',NULL));
-+var_dump(geoip_time_zone_by_country_and_region('US',''));
- var_dump(geoip_time_zone_by_country_and_region('DE'));
--var_dump(geoip_time_zone_by_country_and_region(NULL,''));
--var_dump(geoip_time_zone_by_country_and_region(NULL,NULL));
-+var_dump(geoip_time_zone_by_country_and_region('',''));
-
- ?>
- --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
- <?php
-
- var_dump(geoip_region_name_by_code('CA',''));
--var_dump(geoip_region_name_by_code('CA',NULL));
- var_dump(geoip_region_name_by_code('CA',1));
- var_dump(geoip_region_name_by_code('','QC'));
--var_dump(geoip_region_name_by_code(NULL,'QC'));
- var_dump(geoip_region_name_by_code(1,'QC'));
-
- ?>
-@@ -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/tests/019.phpt b/tests/019.phpt
-new file mode 100644
-index 0000000..9493ea3
---- /dev/null
-+++ b/tests/019.phpt
-@@ -0,0 +1,13 @@
-+--TEST--
-+Checking geoip_country_code_by_name_v6 (if IPv6 DB installed)
-+--SKIPIF--
-+<?php if (!extension_loaded("geoip") || !defined("GEOIP_COUNTRY_EDITION_V6") || !geoip_db_avail(GEOIP_COUNTRY_EDITION_V6)) print "skip"; ?>
-+--INI--
-+--FILE--
-+<?php
-+
-+var_dump( geoip_country_code_by_name_v6('2001:4860:4860::8888') );
-+
-+?>
-+--EXPECT--
-+string(2) "US"
diff --git a/dev-php/pecl-geoip/files/php8-support-1.1.1.patch b/dev-php/pecl-geoip/files/php8-support-1.1.1.patch
deleted file mode 100644
index 50c53d1a94a7..000000000000
--- a/dev-php/pecl-geoip/files/php8-support-1.1.1.patch
+++ /dev/null
@@ -1,93 +0,0 @@
---- a/geoip.c 2020/10/30 12:04:28 351081
-+++ b/geoip.c 2020/10/30 12:51:07 351082
-@@ -34,41 +34,72 @@
- #include "ext/standard/info.h"
- #include "php_geoip.h"
-
--
-+/* For PHP 8 */
-+#ifndef TSRMLS_CC
-+#define TSRMLS_CC
-+#endif
-
- ZEND_DECLARE_MODULE_GLOBALS(geoip)
-
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_void, 0, 0, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_database_opt, 0, 0, 0)
-+ ZEND_ARG_INFO(0, database)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_database, 0, 0, 1)
-+ ZEND_ARG_INFO(0, database)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_host, 0, 0, 1)
-+ ZEND_ARG_INFO(0, host)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_region, 0, 0, 2)
-+ ZEND_ARG_INFO(0, country_code)
-+ ZEND_ARG_INFO(0, region_code)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_directory, 0, 0, 1)
-+ ZEND_ARG_INFO(0, directory)
-+ZEND_END_ARG_INFO()
-+
- static int le_geoip;
-
- /* {{{ */
- zend_function_entry geoip_functions[] = {
-- PHP_FE(geoip_database_info, NULL)
-+ PHP_FE(geoip_database_info, arginfo_geoip_database_opt)
- #define GEOIPDEF(php_func, c_func, db_type) \
-- PHP_FE(php_func, NULL)
-+ PHP_FE(php_func, arginfo_geoip_host)
- #include "geoip.def"
- #undef GEOIPDEF
-- PHP_FE(geoip_continent_code_by_name, NULL)
-- PHP_FE(geoip_org_by_name, NULL)
-- PHP_FE(geoip_record_by_name, NULL)
-- PHP_FE(geoip_id_by_name, NULL)
-- PHP_FE(geoip_region_by_name, NULL)
-- PHP_FE(geoip_isp_by_name, NULL)
-- PHP_FE(geoip_db_avail, NULL)
-- PHP_FE(geoip_db_get_all_info, NULL)
-- PHP_FE(geoip_db_filename, NULL)
-+ PHP_FE(geoip_continent_code_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_org_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_record_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_id_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_region_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_isp_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_db_avail, arginfo_geoip_database)
-+ PHP_FE(geoip_db_get_all_info, arginfo_geoip_void)
-+ PHP_FE(geoip_db_filename, arginfo_geoip_database)
- #if LIBGEOIP_VERSION >= 1004001
-- PHP_FE(geoip_region_name_by_code, NULL)
-- PHP_FE(geoip_time_zone_by_country_and_region, NULL)
-+ PHP_FE(geoip_region_name_by_code, arginfo_geoip_region)
-+ PHP_FE(geoip_time_zone_by_country_and_region, arginfo_geoip_region)
- #endif
- #ifdef HAVE_CUSTOM_DIRECTORY
-- PHP_FE(geoip_setup_custom_directory, NULL)
-+ PHP_FE(geoip_setup_custom_directory, arginfo_geoip_directory)
- #endif
-- PHP_FE(geoip_asnum_by_name, NULL)
-- PHP_FE(geoip_domain_by_name, NULL)
-+ PHP_FE(geoip_asnum_by_name, arginfo_geoip_host)
-+ PHP_FE(geoip_domain_by_name, arginfo_geoip_host)
- #if LIBGEOIP_VERSION >= 1004008
-- PHP_FE(geoip_netspeedcell_by_name, NULL)
-+ PHP_FE(geoip_netspeedcell_by_name, arginfo_geoip_host)
- #endif
-+#ifdef PHP_FE_END
-+ PHP_FE_END
-+#else
- {NULL, NULL, NULL}
-+#endif
- };
- /* }}} */
-