summaryrefslogtreecommitdiff
path: root/dev-php/theseer-Autoload
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /dev-php/theseer-Autoload
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'dev-php/theseer-Autoload')
-rw-r--r--dev-php/theseer-Autoload/Manifest7
-rw-r--r--dev-php/theseer-Autoload/files/autoload.php.tpl26
-rw-r--r--dev-php/theseer-Autoload/files/fedora.php.tpl12
-rw-r--r--dev-php/theseer-Autoload/files/fedora2.php.tpl12
-rw-r--r--dev-php/theseer-Autoload/files/theseer-Autoload-1.26.0-autoload.php.patch12
-rw-r--r--dev-php/theseer-Autoload/metadata.xml11
-rw-r--r--dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild82
7 files changed, 162 insertions, 0 deletions
diff --git a/dev-php/theseer-Autoload/Manifest b/dev-php/theseer-Autoload/Manifest
new file mode 100644
index 000000000000..9d163c44bdde
--- /dev/null
+++ b/dev-php/theseer-Autoload/Manifest
@@ -0,0 +1,7 @@
+AUX autoload.php.tpl 633 BLAKE2B 5e697e4dc3e1e51cd5ec95b44938f96c43d834f41dfb4edfca8d1375891f31fc1afaf048470d7ecbc561e11d29f3ee49d75e2bc00b5a58747cb88557b9eab51d SHA512 310c8b3b8b6b71627bb193b3f7b9b4463b0e41864bb66bba92256e203aa65ce2731296efb649e620a59fa06d6502b5e4a9418384550f9db6bd1f8f7fb87d3419
+AUX fedora.php.tpl 256 BLAKE2B 0a6ffe677079d10668cc7caa0ec6bc22951ae9b78f2a6ce037e8fd9d1fbc0ff947079826e55f312ae2d02546f56933d2ad8cca6fc77c1f4cb4a2eac4d5232bcb SHA512 bf5f6c953efe84847456c3d64709eb813c6876fd496780e4cd4abc543dc1d6713ae9e52f0227b8d5108016cdfee811758267e1149744314a67deb51b17c2a9c6
+AUX fedora2.php.tpl 241 BLAKE2B c7e7dce85f2b7c2f33f9760e7f4c0440fff18ad9679045a7c47be871d6bb3b32d031aded4a410bfd0b2de8affb2cec6b38630864d1b0517c3cf1aad7bf42b924 SHA512 e5c369fd822fbe1ed895f6d97ceff84593f7e74b6e1a3d9bf918dee2063643b6fd991a90bc33fe970b29529760b42a1a6dcac360246bfe67bd8f9248b6b77077
+AUX theseer-Autoload-1.26.0-autoload.php.patch 273 BLAKE2B 02ef287623dded15446172c54344be51bca15723f9de69aee7c75b4b2b6c1c4fef3d1d3df84bcf2da892c9708e5c5916933648e4cf4421ff62580af594ce9007 SHA512 8f8e6d278b2596dee872c14bc794a21d012f29a2e2cf0b56669796e97ceabbb0efade766492b247817f7c6f77b85a12d1d583717914016501b4007659f813abe
+DIST theseer-Autoload-1.26.0.tar.gz 43119 BLAKE2B 7b2413bc2fb281472cee03010c175aae1c8304ab0629c31f09e11497bd6f46d58bae8625da610f5a513b19fc8aafc45c35be7271ba13188466f576e7b4a7392f SHA512 c8fcb3ad39c140517d695c44e6dea3797ea0135ff64246478e55cbf167e4b9fbb3e5027732c201f66b404039a313952c7125f13fdeb1cd96633dbccfdda6f143
+EBUILD theseer-Autoload-1.26.0.ebuild 1875 BLAKE2B 8269ad55d6c5f8efb6ce137aaa8aa62603f6e0fb379bf83646cfa20e67b3f64fbc72a5f8acc4227fd7f6a4070d1e6772c75bfff3a8bd01b671fc1605cd90c026 SHA512 aaa5d2c598df28bcf0b3c1a803a0441965740f451ae2ee2973b2a4d92a3b6959b6e6181fa0a57cf965b33ee75d0b31d8be155499d275041db6891822ac8296c2
+MISC metadata.xml 320 BLAKE2B 98998896c3cef1d685d3b50e33b367fb6b280595a26c51b48eca55704b0c6076d50b4898d09ea1b8662119123e3a256f6079666dc4ac13b62391eecc8d0cc977 SHA512 736f703a29bb821a70dd6651dd06acdfa4b27080f65e83cd3c76d5ef257513e44e37570f1a3f4054ce669dfd6f19d9570b5aff9e4f13fd5b40b84c5b24a649d0
diff --git a/dev-php/theseer-Autoload/files/autoload.php.tpl b/dev-php/theseer-Autoload/files/autoload.php.tpl
new file mode 100644
index 000000000000..cb88eb77c450
--- /dev/null
+++ b/dev-php/theseer-Autoload/files/autoload.php.tpl
@@ -0,0 +1,26 @@
+<?php
+
+require_once 'TheSeer/DirectoryScanner/autoload.php';
+require_once 'ezc/Base/autoload.php';
+require_once 'ezc/ConsoleTools/autoload.php';
+
+// @codingStandardsIgnoreFile
+// @codeCoverageIgnoreStart
+// this is an autogenerated file - do not edit
+spl_autoload_register(
+ function($class) {
+ static $classes = null;
+ if ($classes === null) {
+ $classes = array(
+ ___CLASSLIST___
+ );
+ }
+ $cn = strtolower($class);
+ if (isset($classes[$cn])) {
+ require ___BASEDIR___$classes[$cn];
+ }
+ },
+ true,
+ false
+);
+// @codeCoverageIgnoreEnd
diff --git a/dev-php/theseer-Autoload/files/fedora.php.tpl b/dev-php/theseer-Autoload/files/fedora.php.tpl
new file mode 100644
index 000000000000..d05f27231892
--- /dev/null
+++ b/dev-php/theseer-Autoload/files/fedora.php.tpl
@@ -0,0 +1,12 @@
+<?php
+// @codingStandardsIgnoreFile
+// @codeCoverageIgnoreStart
+require_once '/usr/share/php/Fedora/Autoloader'.'/autoload.php';
+
+\Fedora\Autoloader\Autoload::addClassMap(
+ array(
+ ___CLASSLIST___,
+ ),
+ __DIR__
+);
+// @codeCoverageIgnoreEnd
diff --git a/dev-php/theseer-Autoload/files/fedora2.php.tpl b/dev-php/theseer-Autoload/files/fedora2.php.tpl
new file mode 100644
index 000000000000..b337b9646b34
--- /dev/null
+++ b/dev-php/theseer-Autoload/files/fedora2.php.tpl
@@ -0,0 +1,12 @@
+<?php
+// @codingStandardsIgnoreFile
+// @codeCoverageIgnoreStart
+require_once 'Fedora/Autoloader'.'/autoload.php';
+
+\Fedora\Autoloader\Autoload::addClassMap(
+ array(
+ ___CLASSLIST___,
+ ),
+ __DIR__
+);
+// @codeCoverageIgnoreEnd
diff --git a/dev-php/theseer-Autoload/files/theseer-Autoload-1.26.0-autoload.php.patch b/dev-php/theseer-Autoload/files/theseer-Autoload-1.26.0-autoload.php.patch
new file mode 100644
index 000000000000..d85409d47126
--- /dev/null
+++ b/dev-php/theseer-Autoload/files/theseer-Autoload-1.26.0-autoload.php.patch
@@ -0,0 +1,12 @@
+--- a/composer/bin/phpab
++++ b/composer/bin/phpab
+@@ -56,7 +56,7 @@ foreach ($files as $file) {
+ }
+ }
+
+-require __DIR__ . '/../../src/autoload.php';
++require 'TheSeer/Autoload/autoload.php';
+
+ $factory = new \TheSeer\Autoload\Factory();
+ $factory->getCLI()->run();
+
diff --git a/dev-php/theseer-Autoload/metadata.xml b/dev-php/theseer-Autoload/metadata.xml
new file mode 100644
index 000000000000..bb9f50f08f6f
--- /dev/null
+++ b/dev-php/theseer-Autoload/metadata.xml
@@ -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/Autoload</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild b/dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild
new file mode 100644
index 000000000000..01afc209be05
--- /dev/null
+++ b/dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN="Autoload"
+
+DESCRIPTION="PHP Autoload Builder"
+HOMEPAGE="https://github.com/theseer/Autoload"
+SRC_URI="https://github.com/theseer/${MY_PN}/archive/1.26.0.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+CDEPEND="dev-lang/php:*
+ >=dev-php/theseer-DirectoryScanner-1.3
+ <dev-php/theseer-DirectoryScanner-2
+ >=dev-php/zetacomponents-Base-1.8
+ <dev-php/zetacomponents-Base-2
+ >=dev-php/zetacomponents-ConsoleTools-1.7.1
+ <dev-php/zetacomponents-ConsoleTools-2"
+
+BDEPEND="${CDEPEND}
+ test? (
+ >=dev-php/phpunit-8
+ <dev-php/phpunit-9
+ )"
+
+RDEPEND="${CDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.26.0-autoload.php.patch )
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ default
+
+ # Set version
+ sed -i \
+ -e "s/%development%/${PV}/" \
+ phpab.php \
+ composer/bin/phpab \
+ || die
+
+ cp --target-directory src/templates/ci \
+ "${FILESDIR}"/fedora.php.tpl \
+ "${FILESDIR}"/fedora2.php.tpl \
+ || die
+
+ # Mimick layout to bootstrap phpab
+ mkdir --parents \
+ vendor/theseer/directoryscanner \
+ vendor/zetacomponents/base \
+ vendor/zetacomponents/console-tools \
+ || die
+
+ ln -s /usr/share/php/TheSeer/DirectoryScanner vendor/theseer/directoryscanner/src || die
+ ln -s /usr/share/php/ezc/Base vendor/zetacomponents/base/src || die
+ ln -s /usr/share/php/ezc/ConsoleTools vendor/zetacomponents/console-tools/src || die
+
+ ./phpab.php \
+ --output src/autoload.php \
+ --template "${FILESDIR}"/autoload.php.tpl \
+ --basedir src \
+ src || die
+}
+
+src_test() {
+ phpunit --no-coverage --verbose || die "Unit testing failed!"
+}
+
+src_install() {
+ insinto /usr/share/php/TheSeer/${MY_PN}
+ doins -r src/*
+
+ dobin "${S}"/composer/bin/phpab
+
+ einstalldocs
+}