summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-04-10 12:28:16 -0400
committerBrian Evans <grknight@gentoo.org>2018-04-10 12:28:16 -0400
commitb777ed6924d39efbe2f1beb4db879719a9c33aac (patch)
tree097177d7c47e10c0bfa5b05bf020ec6425968e89 /dev-php/maxmind-db-reader
parentdev-php/pecl-zmq: Revbump for PHP 7.2 support; update live build (diff)
downloadgentoo-b777ed6924d39efbe2f1beb4db879719a9c33aac.tar.gz
gentoo-b777ed6924d39efbe2f1beb4db879719a9c33aac.tar.bz2
gentoo-b777ed6924d39efbe2f1beb4db879719a9c33aac.zip
dev-php/maxmind-db-reader: Version bump to 1.3.0
Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'dev-php/maxmind-db-reader')
-rw-r--r--dev-php/maxmind-db-reader/Manifest1
-rw-r--r--dev-php/maxmind-db-reader/maxmind-db-reader-1.3.0.ebuild77
2 files changed, 78 insertions, 0 deletions
diff --git a/dev-php/maxmind-db-reader/Manifest b/dev-php/maxmind-db-reader/Manifest
index 3995e3bb8e07..aef27a8a5f11 100644
--- a/dev-php/maxmind-db-reader/Manifest
+++ b/dev-php/maxmind-db-reader/Manifest
@@ -1 +1,2 @@
DIST MaxMind-DB-Reader-php-1.2.0.tar.gz 17488 BLAKE2B 2a511f84091ade374eb5b9a975fa6dafe75d69c4c057113790492840acfb9b8e50137bf4927814d8d77b2e17f4e0a7fe1ffda511f7c599a604bc69d4f38af406 SHA512 2965c5348ec787e503c04322961b00fe7806cd95c5f711efd9833adc0acb21f0c40cab1983868f8ea0bb4e8576186d83e1e1913b203aab999f3870ea298a9b2a
+DIST MaxMind-DB-Reader-php-1.3.0.tar.gz 18573 BLAKE2B 6f093b4343438d37a44639dd47d4c149bcfdd351b9fe68eb19c1b739a28e7c7605728e47471cc7d5d257d56df5da37b5ffd32c275cb705befe9e6d60a137ac46 SHA512 480fb38122d1700b18bb0b85d8062397ddc7f003897829f3533901c12a409d76eea9d499ffc0fdd1bfaf4d35b954a30606a053b78e787eda27771995e2a1800b
diff --git a/dev-php/maxmind-db-reader/maxmind-db-reader-1.3.0.ebuild b/dev-php/maxmind-db-reader/maxmind-db-reader-1.3.0.ebuild
new file mode 100644
index 000000000000..7d53d3fc64d6
--- /dev/null
+++ b/dev-php/maxmind-db-reader/maxmind-db-reader-1.3.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="MaxMind-DB-Reader-php"
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+PHP_EXT_S="${S}/ext"
+PHP_EXT_NAME="maxminddb"
+PHP_EXT_OPTIONAL_USE="extension"
+
+USE_PHP="php5-6 php7-0 php7-1 php7-2"
+
+inherit php-ext-source-r3
+
+DESCRIPTION="PHP reader for the MaxMind database format"
+HOMEPAGE="https://github.com/maxmind/${MY_PN}"
+SRC_URI="${HOMEPAGE}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="extension test"
+
+DEPEND="extension? ( dev-libs/libmaxminddb )"
+RDEPEND="${DEPEND}"
+
+src_prepare(){
+ # We need to call eapply_user ourselves, because it may be skipped
+ # if either the "extension" USE flag is not set, or if the user's
+ # PHP_TARGETS is essentially empty. In the latter case, the eclass
+ # src_prepare does nothing. We only call the eclass phase conditionally
+ # because the correct version of e.g. "phpize" may not be there
+ # unless USE=extension is set.
+ if use extension ; then
+ php-ext-source-r3_src_prepare
+ else
+ default
+ fi
+}
+
+src_configure() {
+ # The eclass phase will try to run the ./configure script even if it
+ # doesn't exist (in contrast to the default src_configure), so we
+ # need to skip it if the eclass src_prepare (that creates said
+ # script) is not run.
+ use extension && php-ext-source-r3_src_configure
+}
+
+src_compile() {
+ # Avoids the same problem as in src_configure.
+ use extension && php-ext-source-r3_src_compile
+}
+
+src_install() {
+ dodoc CHANGELOG.md README.md
+ insinto /usr/share/php
+ doins -r src/MaxMind
+ insinto /usr/share/php/MaxMind/Db
+ doins autoload.php
+
+ use extension && php-ext-source-r3_src_install
+}
+
+src_test() {
+ # The PHP API has its own set of tests that isn't shipped with the
+ # release tarballs at the moment (github issues 55).
+ use extension && php-ext-source-r3_src_test
+}
+
+pkg_postinst(){
+ elog "${PN} has been installed in /usr/share/php/MaxMind/Db/."
+ elog "To use it in a script, require('MaxMind/Db/autoload.php'),"
+ elog "and then most of the examples in the documentation should"
+ elog "work without further modification."
+}