dev-php/theseer-tokenizer: new package
authorRob Levitsky <kitsunenokenja@protonmail.ch>
Mon, 8 Jan 2018 22:22:01 +0000 (17:22 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Sun, 28 Jan 2018 16:45:48 +0000 (11:45 -0500)
Package-Manager: Portage-2.3.13, Repoman-2.3.3

Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
dev-php/theseer-tokenizer/Manifest [new file with mode: 0644]
dev-php/theseer-tokenizer/files/autoload.php [new file with mode: 0644]
dev-php/theseer-tokenizer/metadata.xml [new file with mode: 0644]
dev-php/theseer-tokenizer/theseer-tokenizer-1.1.0.ebuild [new file with mode: 0644]

diff --git a/dev-php/theseer-tokenizer/Manifest b/dev-php/theseer-tokenizer/Manifest
new file mode 100644 (file)
index 0000000..f9a07ea
--- /dev/null
@@ -0,0 +1 @@
+DIST theseer-tokenizer-1.1.0.tar.gz 10163 BLAKE2B b2360f901d60f784db2045912707a8e293a55967d60d4e72168a1c4b0c9a2d5bdb739fbed9bfec02075476e7bf6762eb1cc7e36870b84fcc341b609527579ca2 SHA512 8b500565dc0d6c8513db3aa72a7ee1fa04510a712ce9b0977feccddc6b2dae53825e39182d43508e196f326776115789e81697116418f6f9f63d08f0c05d0543
diff --git a/dev-php/theseer-tokenizer/files/autoload.php b/dev-php/theseer-tokenizer/files/autoload.php
new file mode 100644 (file)
index 0000000..67f5bd3
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/* Autoloader for dev-php/theseer-tokenizer */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+       require_once 'Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addClassMap(
+   [
+               'theseer\\tokenizer\\exception' => '/Exception.php',
+               'theseer\\tokenizer\\namespaceuri' => '/NamespaceUri.php',
+               'theseer\\tokenizer\\namespaceuriexception' => '/NamespaceUriException.php',
+               'theseer\\tokenizer\\token' => '/Token.php',
+               'theseer\\tokenizer\\tokencollection' => '/TokenCollection.php',
+               'theseer\\tokenizer\\tokencollectionexception' => '/TokenCollectionException.php',
+               'theseer\\tokenizer\\tokenizer' => '/Tokenizer.php',
+               'theseer\\tokenizer\\xmlserializer' => '/XMLSerializer.php',
+       ],
+       __DIR__
+);
diff --git a/dev-php/theseer-tokenizer/metadata.xml b/dev-php/theseer-tokenizer/metadata.xml
new file mode 100644 (file)
index 0000000..ba2f818
--- /dev/null
@@ -0,0 +1,11 @@
+<?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>
+       <upstream>
+               <remote-id type="github">theseer/tokenizer</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/dev-php/theseer-tokenizer/theseer-tokenizer-1.1.0.ebuild b/dev-php/theseer-tokenizer/theseer-tokenizer-1.1.0.ebuild
new file mode 100644 (file)
index 0000000..f4435fb
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="tokenizer"
+
+DESCRIPTION="Library for converting tokenized PHP source code into XML and other formats"
+HOMEPAGE="https://github.com/theseer/tokenizer"
+SRC_URI="https://github.com/theseer/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+RDEPEND="dev-php/fedora-autoloader
+       >=dev-lang/php-7.0:*[tokenizer,xmlwriter]"
+
+DEPEND="test? ( ${RDEPEND} dev-php/phpunit )"
+
+src_prepare() {
+       cp "${FILESDIR}/autoload.php" src/ || die
+       default
+}
+
+src_install() {
+       insinto /usr/share/php/TheSeer/Tokenizer
+       doins -r src/*
+       dodoc README.md
+}
+
+src_test() {
+       phpunit || die "Unit testing failed!"
+}