summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-03-09 10:50:37 -0500
committerBrian Evans <grknight@gentoo.org>2017-03-09 11:22:42 -0500
commit01564d714845c1edde79d4db2068bde43fdd693b (patch)
tree8e55691bfe65b8ff9e179f02311c01b6f1d9e21d
parentdev-php/File_Iterator: Version bump and use composer autoloading (diff)
downloadgentoo-01564d714845c1edde79d4db2068bde43fdd693b.tar.gz
gentoo-01564d714845c1edde79d4db2068bde43fdd693b.tar.bz2
gentoo-01564d714845c1edde79d4db2068bde43fdd693b.zip
dev-php/PHP_TokenStream: Version bump and use composer autoloading
Package-Manager: Portage-2.3.4, Repoman-2.3.2
-rw-r--r--dev-php/PHP_TokenStream/Manifest1
-rw-r--r--dev-php/PHP_TokenStream/PHP_TokenStream-1.4.11.ebuild35
-rw-r--r--dev-php/PHP_TokenStream/files/autoload.php15
3 files changed, 51 insertions, 0 deletions
diff --git a/dev-php/PHP_TokenStream/Manifest b/dev-php/PHP_TokenStream/Manifest
index 61874e409be4..59f15ca5ae9a 100644
--- a/dev-php/PHP_TokenStream/Manifest
+++ b/dev-php/PHP_TokenStream/Manifest
@@ -1 +1,2 @@
DIST PHP_TokenStream-1.1.3.tgz 9860 SHA256 9be9fd9e9bcd096d1d6708024513281f3bb8cd08e48a20acaf575a6c7b5a16b8 SHA512 2751acabc340f05c59bb46f8fb9e47ff25a5f8a6503f1525ed4977d96f2044ad0f9714b40f573d0b845aaf47424a89c3d9e7cfdada67c58d650bb98ee7b47772 WHIRLPOOL 26b03e43602289629bc7de579c947d4ed995d49ee2fe150981c3de8f40f95b3e3c7ff326d7f64bdd28421b4c719a465e71386a64369b6d375947d5ef3ed7e909
+DIST PHP_TokenStream-1.4.11.tar.gz 13388 SHA256 6b95960c1a162d321da8b7d42bc9361bdcc991478e0db93a659a433c2b6a9008 SHA512 4e8d8d1eb16169d46b64a43d91f3066d49fe8e3f184d90c5c7cf4234ebfe4eac271a811744b201f05dc86976b3c5b8ad4ae9f2532165a3849980663f1ac5852e WHIRLPOOL b8953000433242b2eef7eda3827f7e9bce548e163b231a605ab73723cdc855c5fc5fbab1f51cd1221c469a9b1b5d35028d45261c9fbce429c4cb6a8e85230c5e
diff --git a/dev-php/PHP_TokenStream/PHP_TokenStream-1.4.11.ebuild b/dev-php/PHP_TokenStream/PHP_TokenStream-1.4.11.ebuild
new file mode 100644
index 000000000000..e9c4604f4fc7
--- /dev/null
+++ b/dev-php/PHP_TokenStream/PHP_TokenStream-1.4.11.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="php-token-stream"
+
+DESCRIPTION="Wrapper around PHP's tokenizer extension"
+HOMEPAGE="http://phpunit.de"
+SRC_URI="https://github.com/sebastianbergmann/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+RDEPEND="dev-php/fedora-autoloader
+ || (
+ dev-lang/php:5.6[tokenizer]
+ dev-lang/php:7.0[tokenizer]
+ dev-lang/php:7.1[tokenizer]
+ )"
+
+src_install() {
+ insinto /usr/share/php/PHP/Token
+ doins -r src/*
+ doins "${FILESDIR}/autoload.php"
+}
+
+pkg_postinst() {
+ ewarn "This library now loads via /usr/share/php/PHP/Token/autoload.php"
+ ewarn "Please update any scripts to require the autoloader"
+}
diff --git a/dev-php/PHP_TokenStream/files/autoload.php b/dev-php/PHP_TokenStream/files/autoload.php
new file mode 100644
index 000000000000..5b3aac57ec17
--- /dev/null
+++ b/dev-php/PHP_TokenStream/files/autoload.php
@@ -0,0 +1,15 @@
+<?php
+/* Autoloader for dev-php/PHP_TokenStream */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addClassMap(
+ array(
+ 'php_token' => '/Token.php',
+ 'php_token_stream' => '/Token/Stream.php',
+ 'php_token_stream_cachingfactory' => '/Token/Stream/CachingFactory.php',
+ ),
+ __DIR__
+);