summaryrefslogtreecommitdiff
path: root/dev-php/maxmind-db-reader
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-11-10 00:43:02 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-11-10 00:43:02 +0000
commita5332b59346f7cbf0fdbd148b54aa8a84aaf8190 (patch)
treee6d8d3589fcd01fbc3f1286185639163daa81424 /dev-php/maxmind-db-reader
parentfceeaf01a28ee71065cf3798b70b77d3bc4ef199 (diff)
gentoo resync : 10.11.2017
Diffstat (limited to 'dev-php/maxmind-db-reader')
-rw-r--r--dev-php/maxmind-db-reader/Manifest4
-rw-r--r--dev-php/maxmind-db-reader/files/autoload.php6
-rw-r--r--dev-php/maxmind-db-reader/maxmind-db-reader-1.2.0.ebuild85
-rw-r--r--dev-php/maxmind-db-reader/metadata.xml16
4 files changed, 111 insertions, 0 deletions
diff --git a/dev-php/maxmind-db-reader/Manifest b/dev-php/maxmind-db-reader/Manifest
new file mode 100644
index 000000000000..ef44c3b5815a
--- /dev/null
+++ b/dev-php/maxmind-db-reader/Manifest
@@ -0,0 +1,4 @@
+AUX autoload.php 199 SHA256 c57dcb1b6d61d14edc2dcf7cedcc43ed7afd82f361a6617a8b9aaf20da841f92 SHA512 bb53c3edbab856787432d085f35af4b0388a46489ad910bce4d2e070537b5b1652da6ed7260fa5b1c0fb7f808c5e8a66b9fce0282bc0d62f3e80d1eb2284a905 WHIRLPOOL 9ee1e489dc78be252483d6350065ead452e7db9eb396d26c5fb0814935c3dd25edb7042f92ae905e06307d070179e1ad680f1a6270a59e64b0d01c041c0d49d7
+DIST MaxMind-DB-Reader-php-1.2.0.tar.gz 17488 SHA256 b1d0166ac9d7a2df2ec33c2fd3e2ccfcb556f013c8f58df3610e08bbf7e9c383 SHA512 2965c5348ec787e503c04322961b00fe7806cd95c5f711efd9833adc0acb21f0c40cab1983868f8ea0bb4e8576186d83e1e1913b203aab999f3870ea298a9b2a WHIRLPOOL 6059929c7b6e10ceafc4d50b7b2af2162c5a6e3b4dfc7390bd6b7adebca69de1847a01632e63c4b7de09581fdbd3c21dabe3c5182346d503228fd8e0112ad366
+EBUILD maxmind-db-reader-1.2.0.ebuild 2375 SHA256 86f365b73ab551c46d7f0a2a4a435954587909a3f85e3d8253053929740499df SHA512 4640012b889a6078324a9f2ddf819d4f9f4ab4f6c85bd7b0c9d0b85ca80dd7b09e76822fb00cad43f81ed080e519dea5edb25dbd2bc6bdad7b0076e40e79e8f6 WHIRLPOOL d12e6c8c4e5835d4c2223fd97fdf9138025ffb4612bc1ce082ca44ed4dc3a34fba934a1f57daba368716c1f509540927617981abc23adcc02768c2750ebe9db9
+MISC metadata.xml 472 SHA256 5f37f8e455bf9e0cd2946e5bf1ea10cfdffef5446f4e12e206e6bb6f0569c027 SHA512 7522517bc559e5309dce0bfa525c80f0d00ca57f03d7a6c771fc1ac20281c09efb142bfdafd56633edfa3e2a878943d6bd3c16ea3f93f0b5ca8ba11a5f28cf8d WHIRLPOOL 7a290ce8542c1cf968c7a24638993634abfc1dc9d5955869f1f9023e9d33aaa8984d8588f51de5d261f0286dc2e26c6d5ddb1f69bdd14531709a3d53dc936869
diff --git a/dev-php/maxmind-db-reader/files/autoload.php b/dev-php/maxmind-db-reader/files/autoload.php
new file mode 100644
index 000000000000..45e8c2dfba31
--- /dev/null
+++ b/dev-php/maxmind-db-reader/files/autoload.php
@@ -0,0 +1,6 @@
+<?php
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addPsr4('MaxMind\\Db\\', __DIR__);
diff --git a/dev-php/maxmind-db-reader/maxmind-db-reader-1.2.0.ebuild b/dev-php/maxmind-db-reader/maxmind-db-reader-1.2.0.ebuild
new file mode 100644
index 000000000000..6d5d40ddc9c6
--- /dev/null
+++ b/dev-php/maxmind-db-reader/maxmind-db-reader-1.2.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 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"
+
+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"
+
+COMMON_DEPEND="extension? ( dev-libs/libmaxminddb )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+ dev-php/fedora-autoloader"
+
+src_unpack() {
+ # Don't make copies of the source tree if they won't be used.
+ if use extension; then
+ php-ext-source-r3_src_unpack
+ else
+ default
+ fi
+}
+
+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.
+ eapply_user
+ use extension && php-ext-source-r3_src_prepare
+}
+
+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 "${FILESDIR}/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."
+}
diff --git a/dev-php/maxmind-db-reader/metadata.xml b/dev-php/maxmind-db-reader/metadata.xml
new file mode 100644
index 000000000000..c6051cdbefb0
--- /dev/null
+++ b/dev-php/maxmind-db-reader/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>php-bugs@gentoo.org</email>
+ <name>PHP</name>
+ </maintainer>
+ <use>
+ <flag name="extension">
+ Build the C extension that uses <pkg>dev-libs/libmaxminddb</pkg>
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">maxmind/MaxMind-DB-Reader-php</remote-id>
+ </upstream>
+</pkgmetadata>