diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2016-10-29 21:07:10 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2016-10-29 21:07:30 -0400 |
commit | e9a6d713e7792cd7e7dae96a10078dfcb389d33d (patch) | |
tree | 310d674d8d027c51a2ef2371df84490828e1a04b /dev-php/pecl-geoip | |
parent | dev-util/pkgconf: drop github from SRC_URI (diff) | |
download | gentoo-e9a6d713e7792cd7e7dae96a10078dfcb389d33d.tar.gz gentoo-e9a6d713e7792cd7e7dae96a10078dfcb389d33d.tar.bz2 gentoo-e9a6d713e7792cd7e7dae96a10078dfcb389d33d.zip |
dev-php/pecl-geoip: new revision and patch to fix two failing tests.
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-php/pecl-geoip')
-rw-r--r-- | dev-php/pecl-geoip/files/fix-failing-tests-1.1.1.patch | 46 | ||||
-rw-r--r-- | dev-php/pecl-geoip/pecl-geoip-1.1.1-r1.ebuild (renamed from dev-php/pecl-geoip/pecl-geoip-1.1.1.ebuild) | 2 |
2 files changed, 48 insertions, 0 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 new file mode 100644 index 000000000000..a86994708e7b --- /dev/null +++ b/dev-php/pecl-geoip/files/fix-failing-tests-1.1.1.patch @@ -0,0 +1,46 @@ +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/pecl-geoip-1.1.1.ebuild b/dev-php/pecl-geoip/pecl-geoip-1.1.1-r1.ebuild index 025d6aa0b8ea..529b97d4cd52 100644 --- a/dev-php/pecl-geoip/pecl-geoip-1.1.1.ebuild +++ b/dev-php/pecl-geoip/pecl-geoip-1.1.1-r1.ebuild @@ -19,3 +19,5 @@ IUSE="" DEPEND="dev-libs/geoip" RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/fix-failing-tests-1.1.1.patch" ) |