summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2022-02-17 11:09:46 -0500
committerBrian Evans <grknight@gentoo.org>2022-02-17 11:09:46 -0500
commitd522626106cec1650739ea160a9739cd69768e20 (patch)
treeb7ad4e3f6f2946c1106d1920fcedf1b6f98a63e2 /dev-php
parentdev-perl/PerlMol: Fix warning and add missing dep (diff)
downloadgentoo-d522626106cec1650739ea160a9739cd69768e20.tar.gz
gentoo-d522626106cec1650739ea160a9739cd69768e20.tar.bz2
gentoo-d522626106cec1650739ea160a9739cd69768e20.zip
dev-php/nikic-php-parser: New package
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/nikic-php-parser/Manifest1
-rw-r--r--dev-php/nikic-php-parser/files/autoload.php8
-rw-r--r--dev-php/nikic-php-parser/metadata.xml12
-rw-r--r--dev-php/nikic-php-parser/nikic-php-parser-4.13.2.ebuild27
4 files changed, 48 insertions, 0 deletions
diff --git a/dev-php/nikic-php-parser/Manifest b/dev-php/nikic-php-parser/Manifest
new file mode 100644
index 000000000000..0241d5a5919f
--- /dev/null
+++ b/dev-php/nikic-php-parser/Manifest
@@ -0,0 +1 @@
+DIST nikic-php-parser-4.13.2.tar.gz 153762 BLAKE2B 065c5c494f78c2369a6d5ed2613de768eb58d2984abf2c91fb924071dc89f0c1c660cf06c444670d925d4db050880faa916759587db809b2ea519f4b1f0556da SHA512 9097c05694f983c5cd80919ac81a1eb0052e4b63c4c5b680578c576b04f1637fcccf6d93b918725b0b650a2e331d3121c80bd3d3e4c09e7ceed42fd23af7735c
diff --git a/dev-php/nikic-php-parser/files/autoload.php b/dev-php/nikic-php-parser/files/autoload.php
new file mode 100644
index 000000000000..76352b3bf039
--- /dev/null
+++ b/dev-php/nikic-php-parser/files/autoload.php
@@ -0,0 +1,8 @@
+<?php
+/* Autoloader for dev-php/nikic-PHP-Parser */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+Fedora\Autoloader\Autoload::addPsr4('PhpParser\\', __DIR__);
diff --git a/dev-php/nikic-php-parser/metadata.xml b/dev-php/nikic-php-parser/metadata.xml
new file mode 100644
index 000000000000..24d84f3f64d5
--- /dev/null
+++ b/dev-php/nikic-php-parser/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>php-bugs@gentoo.org</email>
+ <name>PHP</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="github">nikic/PHP-Parser</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-php/nikic-php-parser/nikic-php-parser-4.13.2.ebuild b/dev-php/nikic-php-parser/nikic-php-parser-4.13.2.ebuild
new file mode 100644
index 000000000000..17ac6a0df823
--- /dev/null
+++ b/dev-php/nikic-php-parser/nikic-php-parser-4.13.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="PHP-Parser"
+
+DESCRIPTION="PHP 5.2 to PHP 8.0 parser written in PHP"
+HOMEPAGE="https://github.com/nikic/PHP-Parser"
+SRC_URI="https://github.com/nikic/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+RDEPEND="dev-php/fedora-autoloader
+ >=dev-lang/php-7.1:*[tokenizer(-)]"
+
+src_install() {
+ insinto /usr/share/php/nikic
+ doins -r lib/*
+ insinto /usr/share/php/nikic/PhpParser/
+ doins "${FILESDIR}/autoload.php"
+}