summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2020-12-10 13:40:57 -0500
committerBrian Evans <grknight@gentoo.org>2020-12-10 15:26:03 -0500
commitd6f189df76c27bcf91b32562154453ef519f4587 (patch)
tree611aeddbc1938ffb0fb809b8d4bc961e5743dd1e /dev-php/pecl-geoip
parentmedia-video/ffmpeg: Keyword 4.3.1 alpha, #728558 (diff)
downloadgentoo-d6f189df76c27bcf91b32562154453ef519f4587.tar.gz
gentoo-d6f189df76c27bcf91b32562154453ef519f4587.tar.bz2
gentoo-d6f189df76c27bcf91b32562154453ef519f4587.zip
dev-php/pecl-geoip: Revbump for PHP 8 support
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'dev-php/pecl-geoip')
-rw-r--r--dev-php/pecl-geoip/files/php8-support-1.1.1.patch93
-rw-r--r--dev-php/pecl-geoip/pecl-geoip-1.1.1-r5.ebuild25
2 files changed, 118 insertions, 0 deletions
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
new file mode 100644
index 000000000000..50c53d1a94a7
--- /dev/null
+++ b/dev-php/pecl-geoip/files/php8-support-1.1.1.patch
@@ -0,0 +1,93 @@
+--- 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
+ };
+ /* }}} */
+
diff --git a/dev-php/pecl-geoip/pecl-geoip-1.1.1-r5.ebuild b/dev-php/pecl-geoip/pecl-geoip-1.1.1-r5.ebuild
new file mode 100644
index 000000000000..f5bbf1f24038
--- /dev/null
+++ b/dev-php/pecl-geoip/pecl-geoip-1.1.1-r5.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PHP_EXT_NAME="geoip"
+DOCS="README ChangeLog"
+USE_PHP="php7-2 php7-3 php7-4 php8-0"
+
+inherit php-ext-pecl-r3
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="PHP extension to map IP address to geographic places"
+LICENSE="PHP-3"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-libs/geoip"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/fix-failing-tests-1.1.1.patch"
+ "${FILESDIR}/php8-support-1.1.1.patch"
+)