mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-php/theseer-Autoload: new package
Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
This commit is contained in:
1
dev-php/theseer-Autoload/Manifest
Normal file
1
dev-php/theseer-Autoload/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST theseer-Autoload-1.26.0.tar.gz 43119 BLAKE2B 7b2413bc2fb281472cee03010c175aae1c8304ab0629c31f09e11497bd6f46d58bae8625da610f5a513b19fc8aafc45c35be7271ba13188466f576e7b4a7392f SHA512 c8fcb3ad39c140517d695c44e6dea3797ea0135ff64246478e55cbf167e4b9fbb3e5027732c201f66b404039a313952c7125f13fdeb1cd96633dbccfdda6f143
|
||||
26
dev-php/theseer-Autoload/files/autoload.php.tpl
Normal file
26
dev-php/theseer-Autoload/files/autoload.php.tpl
Normal file
@@ -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
|
||||
12
dev-php/theseer-Autoload/files/fedora.php.tpl
Normal file
12
dev-php/theseer-Autoload/files/fedora.php.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// @codingStandardsIgnoreFile
|
||||
// @codeCoverageIgnoreStart
|
||||
require_once '/usr/share/php/Fedora/Autoloader'.'/autoload.php';
|
||||
|
||||
\Fedora\Autoloader\Autoload::addClassMap(
|
||||
array(
|
||||
___CLASSLIST___,
|
||||
),
|
||||
__DIR__
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
||||
12
dev-php/theseer-Autoload/files/fedora2.php.tpl
Normal file
12
dev-php/theseer-Autoload/files/fedora2.php.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// @codingStandardsIgnoreFile
|
||||
// @codeCoverageIgnoreStart
|
||||
require_once 'Fedora/Autoloader'.'/autoload.php';
|
||||
|
||||
\Fedora\Autoloader\Autoload::addClassMap(
|
||||
array(
|
||||
___CLASSLIST___,
|
||||
),
|
||||
__DIR__
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
||||
@@ -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();
|
||||
|
||||
11
dev-php/theseer-Autoload/metadata.xml
Normal file
11
dev-php/theseer-Autoload/metadata.xml
Normal file
@@ -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>
|
||||
82
dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild
Normal file
82
dev-php/theseer-Autoload/theseer-Autoload-1.26.0.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user