diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-11-30 00:38:11 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-11-30 01:39:15 +0100 |
commit | 6083c01b19d77bff46f257539f918287c5f8139b (patch) | |
tree | 13d633129d55f2ccd75b6171720a1628b078fa64 /dev-php | |
parent | dev-php/zetacomponents-ConsoleTools: new package (diff) | |
download | gentoo-6083c01b19d77bff46f257539f918287c5f8139b.tar.gz gentoo-6083c01b19d77bff46f257539f918287c5f8139b.tar.bz2 gentoo-6083c01b19d77bff46f257539f918287c5f8139b.zip |
dev-php/theseer-Autoload: new package
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-php')
-rw-r--r-- | dev-php/theseer-Autoload/Manifest | 1 | ||||
-rw-r--r-- | dev-php/theseer-Autoload/files/autoload.php.tpl | 26 | ||||
-rw-r--r-- | dev-php/theseer-Autoload/files/fedora.php.tpl | 12 | ||||
-rw-r--r-- | dev-php/theseer-Autoload/files/fedora2.php.tpl | 12 | ||||
-rw-r--r-- | dev-php/theseer-Autoload/files/theseer-Autoload-1.26.0-autoload.php.patch | 12 | ||||
-rw-r--r-- | dev-php/theseer-Autoload/metadata.xml | 11 | ||||
-rw-r--r-- | dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild | 82 |
7 files changed, 156 insertions, 0 deletions
diff --git a/dev-php/theseer-Autoload/Manifest b/dev-php/theseer-Autoload/Manifest new file mode 100644 index 000000000000..8317998a9905 --- /dev/null +++ b/dev-php/theseer-Autoload/Manifest @@ -0,0 +1 @@ +DIST theseer-Autoload-1.26.0.tar.gz 43119 BLAKE2B 7b2413bc2fb281472cee03010c175aae1c8304ab0629c31f09e11497bd6f46d58bae8625da610f5a513b19fc8aafc45c35be7271ba13188466f576e7b4a7392f SHA512 c8fcb3ad39c140517d695c44e6dea3797ea0135ff64246478e55cbf167e4b9fbb3e5027732c201f66b404039a313952c7125f13fdeb1cd96633dbccfdda6f143 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 +} |