summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-10-29 19:21:06 -0400
committerMichael Orlitzky <mjo@gentoo.org>2016-10-29 19:21:58 -0400
commite4f3b3b12d833946c65c1184702d5985bc46c299 (patch)
tree9d2c4040f6936c83965f4aaa90a512c8af695835
parentgames-rpg/manaplus: Removed old. (diff)
downloadgentoo-e4f3b3b1.tar.gz
gentoo-e4f3b3b1.tar.bz2
gentoo-e4f3b3b1.zip
dev-php/pecl-geoip: new version 1.1.1 to replace 1.1.0-r1.
This new version adds proper upstream php-7.x support. As a result, we can drop the two patches that we carried in the files/ directory. Gentoo-Bug: 598294 Package-Manager: portage-2.3.0
-rw-r--r--dev-php/pecl-geoip/Manifest1
-rw-r--r--dev-php/pecl-geoip/files/1.1.0-php7-support.patch446
-rw-r--r--dev-php/pecl-geoip/files/1.1.0-public-init.patch21
-rw-r--r--dev-php/pecl-geoip/pecl-geoip-1.1.1.ebuild (renamed from dev-php/pecl-geoip/pecl-geoip-1.1.0-r1.ebuild)13
4 files changed, 4 insertions, 477 deletions
diff --git a/dev-php/pecl-geoip/Manifest b/dev-php/pecl-geoip/Manifest
index 107df0137fff..4a257a691690 100644
--- a/dev-php/pecl-geoip/Manifest
+++ b/dev-php/pecl-geoip/Manifest
@@ -1 +1,2 @@
DIST geoip-1.1.0.tgz 12714 SHA256 82c6deb7264d2ff7c4d6c45a7d27cff7ab097be965795e317e04a9c5b7be98b9 SHA512 8a0fc698a234d3b2c01f2a0c05c28025d98a5d3dce509ba19ee462abae0fd0f5631d96d3e8bba4fce6c23b278ec3875da5e8535971c7d880e2e307a097dc30a1 WHIRLPOOL f8ccf90958bdc0eee41f24b6ad04907884fed2efe2bca483fa816aceb46d15311325175b07f27d85085afdb5651fd071fd20b046ba42e30da26eea56a14912d6
+DIST geoip-1.1.1.tgz 13004 SHA256 b2d05c03019d46135c249b5a7fa0dbd43ca5ee98aea8ed807bc7aa90ac8c0f06 SHA512 395715297726aa8e7ed71297d403bea9cb08417a03adfca29dc6ea68bbc738c176f71ea621f9026109e07cd5a2adc647e2af8e140e18a6af1c8f0fe4ed1a9c6b WHIRLPOOL 2792b1c03efa7963b1d113133e21979ebe95ca0fc179192101cd515c77914c6c040bef744a81cbb7f36583c30dfa7b45123c2fca9c214314d9ab88429496bb24
diff --git a/dev-php/pecl-geoip/files/1.1.0-php7-support.patch b/dev-php/pecl-geoip/files/1.1.0-php7-support.patch
deleted file mode 100644
index bd503268d604..000000000000
--- a/dev-php/pecl-geoip/files/1.1.0-php7-support.patch
+++ /dev/null
@@ -1,446 +0,0 @@
---- a/geoip.c 2015/02/15 15:08:09 335947
-+++ b/geoip.c 2015/02/15 17:56:49 335948
-@@ -129,11 +129,19 @@
- {
- if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) {
- GEOIP_G(set_runtime_custom_directory) = 1;
-+#if PHP_MAJOR_VERSION >= 7
-+ geoip_change_custom_directory(new_value->val);
-+#else
- geoip_change_custom_directory(new_value);
-+#endif
- return SUCCESS;
- }
-
-+#if PHP_MAJOR_VERSION >= 7
-+ return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
-+#else
- return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
-+#endif
- }
- /* }}} */
- #endif
-@@ -251,7 +259,7 @@
- /* {{{ proto boolean geoip_db_avail( [ int database ] ) */
- PHP_FUNCTION(geoip_db_avail)
- {
-- long edition;
-+ zend_long edition;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &edition) == FAILURE) {
- return;
-@@ -270,7 +278,7 @@
- /* {{{ proto string geoip_db_filename( [ int database ] ) */
- PHP_FUNCTION(geoip_db_filename)
- {
-- long edition;
-+ zend_long edition;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &edition) == FAILURE) {
- return;
-@@ -283,7 +291,11 @@
- }
-
- if (NULL != GeoIPDBFileName[edition])
-+#if PHP_MAJOR_VERSION >= 7
-+ RETURN_STRING(GeoIPDBFileName[edition]);
-+#else
- RETURN_STRING(GeoIPDBFileName[edition], 1);
-+#endif
- }
- /* }}} */
-
-@@ -298,16 +310,31 @@
- {
- if (NULL != GeoIPDBDescription[i])
- {
-+#if PHP_MAJOR_VERSION >= 7
-+ zval real_row;
-+ zval *row = &real_row;
-+
-+ array_init(row);
-+#else
- zval *row;
- ALLOC_INIT_ZVAL(row);
- array_init(row);
-+#endif
-
- add_assoc_bool(row, "available", GeoIP_db_avail(i));
- if (GeoIPDBDescription[i]) {
-+#if PHP_MAJOR_VERSION >= 7
-+ add_assoc_string(row, "description", (char *)GeoIPDBDescription[i]);
-+#else
- add_assoc_string(row, "description", (char *)GeoIPDBDescription[i], 1);
-+#endif
- }
- if (GeoIPDBFileName[i]) {
-+#if PHP_MAJOR_VERSION >= 7
-+ add_assoc_string(row, "filename", GeoIPDBFileName[i]);
-+#else
- add_assoc_string(row, "filename", GeoIPDBFileName[i], 1);
-+#endif
- }
-
- add_index_zval(return_value, i, row);
-@@ -322,7 +349,7 @@
- {
- GeoIP * gi;
- char * db_info;
-- long edition = GEOIP_COUNTRY_EDITION;
-+ zend_long edition = GEOIP_COUNTRY_EDITION;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &edition) == FAILURE) {
- return;
-@@ -347,12 +374,45 @@
- db_info = GeoIP_database_info(gi);
- GeoIP_delete(gi);
-
-+#if PHP_MAJOR_VERSION >= 7
-+ RETVAL_STRING(db_info);
-+#else
- RETVAL_STRING(db_info, 1);
-+#endif
- free(db_info);
- }
- /* }}} */
-
- /* {{{ */
-+#if PHP_MAJOR_VERSION >= 7
-+#define GEOIPDEF(php_func, c_func, db_type) \
-+ PHP_FUNCTION(php_func) \
-+ { \
-+ GeoIP * gi; \
-+ char * hostname = NULL; \
-+ const char * return_code; \
-+ size_t arglen; \
-+ \
-+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
-+ return; \
-+ } \
-+ \
-+ if (GeoIP_db_avail(db_type)) { \
-+ gi = GeoIP_open_type(db_type, GEOIP_STANDARD); \
-+ } else { \
-+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
-+ return; \
-+ } \
-+ \
-+ return_code = c_func(gi, hostname); \
-+ GeoIP_delete(gi); \
-+ if (return_code == NULL) { \
-+ RETURN_FALSE; \
-+ } \
-+ RETURN_STRING((char*)return_code); \
-+ \
-+ }
-+#else
- #define GEOIPDEF(php_func, c_func, db_type) \
- PHP_FUNCTION(php_func) \
- { \
-@@ -380,6 +440,7 @@
- RETURN_STRING((char*)return_code, 1); \
- \
- }
-+#endif
- #include "geoip.def"
- #undef GEOIPDEF
- /* }}} */
-@@ -391,7 +452,11 @@
- GeoIP * gi;
- char * hostname = NULL;
- int id;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
- return;
-@@ -409,7 +474,11 @@
- if (id == 0) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETURN_STRING((char *)GeoIP_country_continent[id]);
-+#else
- RETURN_STRING((char *)GeoIP_country_continent[id], 1);
-+#endif
- }
- /* }}} */
-
-@@ -420,7 +489,11 @@
- GeoIP * gi;
- char * hostname = NULL;
- char * org;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
- return;
-@@ -438,7 +511,11 @@
- if (org == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETVAL_STRING(org);
-+#else
- RETVAL_STRING(org, 1);
-+#endif
- free(org);
- }
- /* }}} */
-@@ -450,7 +527,11 @@
- GeoIP * gi;
- char * hostname = NULL;
- char * org;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
- return;
-@@ -468,7 +549,11 @@
- if (org == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETVAL_STRING(org);
-+#else
- RETVAL_STRING(org, 1);
-+#endif
- free(org);
- }
- /* }}} */
-@@ -480,7 +565,11 @@
- GeoIP * gi;
- char * hostname = NULL;
- char * org;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
- return;
-@@ -498,7 +587,11 @@
- if (org == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETVAL_STRING(org);
-+#else
- RETVAL_STRING(org, 1);
-+#endif
- free(org);
- }
- /* }}} */
-@@ -511,7 +604,11 @@
- GeoIP * gi;
- char * hostname = NULL;
- char * org;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
- return;
-@@ -529,7 +626,11 @@
- if (org == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETVAL_STRING(org);
-+#else
- RETVAL_STRING(org, 1);
-+#endif
- free(org);
- }
- /* }}} */
-@@ -541,7 +642,11 @@
- {
- GeoIP * gi;
- char * hostname = NULL;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
- GeoIPRecord * gir;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
-@@ -567,15 +672,27 @@
- }
-
- array_init(return_value);
--#if LIBGEOIP_VERSION >= 1004003
-+#if PHP_MAJOR_VERSION >= 7
-+# if LIBGEOIP_VERSION >= 1004003
-+ add_assoc_string(return_value, "continent_code", (gir->continent_code == NULL) ? "" : gir->continent_code);
-+# endif
-+ add_assoc_string(return_value, "country_code", (gir->country_code == NULL) ? "" : gir->country_code);
-+ add_assoc_string(return_value, "country_code3", (gir->country_code3 == NULL) ? "" : gir->country_code3);
-+ add_assoc_string(return_value, "country_name", (gir->country_name == NULL) ? "" : gir->country_name);
-+ add_assoc_string(return_value, "region", (gir->region == NULL) ? "" : gir->region);
-+ add_assoc_string(return_value, "city", (gir->city == NULL) ? "" : gir->city);
-+ add_assoc_string(return_value, "postal_code", (gir->postal_code == NULL) ? "" : gir->postal_code);
-+#else
-+# if LIBGEOIP_VERSION >= 1004003
- add_assoc_string(return_value, "continent_code", (gir->continent_code == NULL) ? "" : gir->continent_code, 1);
--#endif
-+# endif
- add_assoc_string(return_value, "country_code", (gir->country_code == NULL) ? "" : gir->country_code, 1);
- add_assoc_string(return_value, "country_code3", (gir->country_code3 == NULL) ? "" : gir->country_code3, 1);
- add_assoc_string(return_value, "country_name", (gir->country_name == NULL) ? "" : gir->country_name, 1);
- add_assoc_string(return_value, "region", (gir->region == NULL) ? "" : gir->region, 1);
- add_assoc_string(return_value, "city", (gir->city == NULL) ? "" : gir->city, 1);
- add_assoc_string(return_value, "postal_code", (gir->postal_code == NULL) ? "" : gir->postal_code, 1);
-+#endif
- add_assoc_double(return_value, "latitude", gir->latitude);
- add_assoc_double(return_value, "longitude", gir->longitude);
- #if LIBGEOIP_VERSION >= 1004005
-@@ -595,7 +712,11 @@
- {
- GeoIP * gi;
- char * hostname = NULL;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
- int netspeed;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
-@@ -621,7 +742,11 @@
- {
- GeoIP * gi;
- char * hostname = NULL;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
- GeoIPRegion * region;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
-@@ -647,9 +772,14 @@
- }
-
- array_init(return_value);
-+#if PHP_MAJOR_VERSION >= 7
-+ add_assoc_string(return_value, "country_code", region->country_code);
-+ add_assoc_string(return_value, "region", region->region);
-+#else
- add_assoc_string(return_value, "country_code", region->country_code, 1);
- add_assoc_string(return_value, "region", region->region, 1);
--
-+#endif
-+
- GeoIPRegion_delete(region);
- }
- /* }}} */
-@@ -661,7 +791,11 @@
- GeoIP * gi;
- char * hostname = NULL;
- char * isp;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t arglen;
-+#else
- int arglen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) {
- return;
-@@ -679,7 +813,11 @@
- if (isp == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETVAL_STRING(isp);
-+#else
- RETVAL_STRING(isp, 1);
-+#endif
- free(isp);
- }
-
-@@ -691,7 +829,11 @@
- char * country_code = NULL;
- char * region_code = NULL;
- const char * region_name;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t countrylen, regionlen;
-+#else
- int countrylen, regionlen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &country_code, &countrylen, &region_code, &regionlen) == FAILURE) {
- return;
-@@ -706,7 +848,11 @@
- if (region_name == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETURN_STRING((char*)region_name);
-+#else
- RETURN_STRING((char*)region_name, 1);
-+#endif
- }
- /* }}} */
- #endif
-@@ -719,7 +865,11 @@
- char * country = NULL;
- char * region = NULL;
- const char * timezone;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t countrylen, arg2len;
-+#else
- int countrylen, arg2len;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &country, &countrylen, &region, &arg2len) == FAILURE) {
- return;
-@@ -734,7 +884,11 @@
- if (timezone == NULL) {
- RETURN_FALSE;
- }
-+#if PHP_MAJOR_VERSION >= 7
-+ RETURN_STRING((char*)timezone);
-+#else
- RETURN_STRING((char*)timezone, 1);
-+#endif
- }
- /* }}} */
- #endif
-@@ -745,7 +899,11 @@
- PHP_FUNCTION(geoip_setup_custom_directory)
- {
- char * dir = NULL;
-+#if PHP_MAJOR_VERSION >= 7
-+ size_t dirlen;
-+#else
- int dirlen;
-+#endif
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &dir, &dirlen) == FAILURE) {
- return;
---- a/php_geoip.h 2015/02/15 15:08:09 335947
-+++ b/php_geoip.h 2015/02/15 17:56:49 335948
-@@ -26,6 +26,10 @@
-
- #define PHP_GEOIP_VERSION "1.1.1-dev"
-
-+#if PHP_MAJOR_VERSION < 7
-+typedef long zend_long;
-+#endif
-+
- #ifdef PHP_WIN32
- #define PHP_GEOIP_API __declspec(dllexport)
- #else
diff --git a/dev-php/pecl-geoip/files/1.1.0-public-init.patch b/dev-php/pecl-geoip/files/1.1.0-public-init.patch
deleted file mode 100644
index 36c5fa6e33fe..000000000000
--- a/dev-php/pecl-geoip/files/1.1.0-public-init.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/geoip.c 2014/05/06 12:11:37 333484
-+++ b/geoip.c 2014/05/06 12:52:25 333485
-@@ -117,7 +117,7 @@
- #endif
-
- GeoIP_setup_custom_directory(value);
-- _GeoIP_setup_dbfilename();
-+ GeoIP_db_avail(GEOIP_COUNTRY_EDITION);
- }
- /* }}} */
- #endif
-@@ -168,7 +168,8 @@
- #ifdef HAVE_CUSTOM_DIRECTORY
- GeoIP_setup_custom_directory(GEOIP_G(custom_directory));
- #endif
-- _GeoIP_setup_dbfilename();
-+ /* This will initialize file structure */
-+ GeoIP_db_avail(GEOIP_COUNTRY_EDITION);
-
- /* For database type constants */
- REGISTER_LONG_CONSTANT("GEOIP_COUNTRY_EDITION", GEOIP_COUNTRY_EDITION, CONST_CS | CONST_PERSISTENT);
diff --git a/dev-php/pecl-geoip/pecl-geoip-1.1.0-r1.ebuild b/dev-php/pecl-geoip/pecl-geoip-1.1.1.ebuild
index 8dcfd62890c2..025d6aa0b8ea 100644
--- a/dev-php/pecl-geoip/pecl-geoip-1.1.0-r1.ebuild
+++ b/dev-php/pecl-geoip/pecl-geoip-1.1.1.ebuild
@@ -2,14 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="6"
+EAPI=6
PHP_EXT_NAME="geoip"
-PHP_EXT_INI="yes"
-PHP_EXT_ZENDEXT="no"
DOCS="README ChangeLog"
-
-USE_PHP="php7-0 php5-6 php5-5"
+USE_PHP="php5-5 php5-6 php7-0"
inherit php-ext-pecl-r3
@@ -20,9 +17,5 @@ LICENSE="PHP-3"
SLOT="0"
IUSE=""
-DEPEND=">=dev-libs/geoip-1.4.0"
+DEPEND="dev-libs/geoip"
RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}/${PV}-public-init.patch"
- "${FILESDIR}/${PV}-php7-support.patch" )