summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-03-09 11:13:27 -0500
committerBrian Evans <grknight@gentoo.org>2017-03-09 11:22:47 -0500
commit9bcffd2f1968b3c9d001b98275826fff7dc1a91a (patch)
treeb12201c60d3bea6d5fda6df0ae3e7d84bc82d418 /dev-php
parentdev-php/PHP_TokenStream: Version bump and use composer autoloading (diff)
downloadgentoo-9bcffd2f1968b3c9d001b98275826fff7dc1a91a.tar.gz
gentoo-9bcffd2f1968b3c9d001b98275826fff7dc1a91a.tar.bz2
gentoo-9bcffd2f1968b3c9d001b98275826fff7dc1a91a.zip
dev-php/PHP_Timer: Version bump and use composer autoloading
Package-Manager: Portage-2.3.4, Repoman-2.3.2
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/PHP_Timer/Manifest1
-rw-r--r--dev-php/PHP_Timer/PHP_Timer-1.0.9.ebuild31
-rw-r--r--dev-php/PHP_Timer/files/autoload.php13
3 files changed, 45 insertions, 0 deletions
diff --git a/dev-php/PHP_Timer/Manifest b/dev-php/PHP_Timer/Manifest
index 3a3a0f5e3fad..719e67b01253 100644
--- a/dev-php/PHP_Timer/Manifest
+++ b/dev-php/PHP_Timer/Manifest
@@ -1 +1,2 @@
DIST PHP_Timer-1.0.5.tgz 3597 SHA256 9c3954a8056d63b857febe239d00f1c2c007f10a731b4e90c4de74c47c633141 SHA512 da030dec608d1f8d447da6ce40e995ca818064e3a4b2f2eca1819a77a12875843a25bba1ffd253043ef3ac62a6dc1a16c5e7ba9b792b99b54d0713090478be84 WHIRLPOOL 10a05fae0afc4d03ae24b73b94641ff2feadea158d553a789978671441351d2df6575df1add9ee912e02015bcb5a8c8cb2aee443a0bc4182e8794201593b9dab
+DIST PHP_Timer-1.0.9.tar.gz 3740 SHA256 db90226fe9c5e3d72f49780d6df430b4f305b55639544fdfb9b22927d581670c SHA512 96db90cf2af18fabcf44bdd4dbb5d298402ed2c8e49f3033fd1b89b3aa8c880d9f8677897d4d542a0db6348bdd9c697042deb0b6e26242adebfde1bcdb4bc559 WHIRLPOOL 38088ea070c666286478bf7ee95ee18a5abf6a1c372efb280f2f22d6c402ef12d62652f4868766e0d073397f3d359afbf466d1332b941a581819575f6607fa81
diff --git a/dev-php/PHP_Timer/PHP_Timer-1.0.9.ebuild b/dev-php/PHP_Timer/PHP_Timer-1.0.9.ebuild
new file mode 100644
index 000000000000..408171414901
--- /dev/null
+++ b/dev-php/PHP_Timer/PHP_Timer-1.0.9.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="php-timer"
+
+DESCRIPTION="Utility class for timing"
+HOMEPAGE="http://phpunit.de"
+SRC_URI="https://github.com/sebastianbergmann/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+RDEPEND="dev-php/fedora-autoloader
+ >=dev-lang/php-5.6:*"
+
+src_install() {
+ insinto /usr/share/php/PHP/Timer
+ doins -r src/Timer.php
+ doins "${FILESDIR}/autoload.php"
+}
+
+pkg_postinst() {
+ ewarn "This library now loads via /usr/share/php/PHP/Timer/autoload.php"
+ ewarn "Please update any scripts to require the autoloader"
+}
diff --git a/dev-php/PHP_Timer/files/autoload.php b/dev-php/PHP_Timer/files/autoload.php
new file mode 100644
index 000000000000..bb0974e087d6
--- /dev/null
+++ b/dev-php/PHP_Timer/files/autoload.php
@@ -0,0 +1,13 @@
+<?php
+/* Autoloader for dev-php/PHP_Timer */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addClassMap(
+ array(
+ 'php_timer' => '/Timer.php',
+ ),
+ __DIR__
+);