dev-php/PHP_Timer: Version bump and use composer autoloading
authorBrian Evans <grknight@gentoo.org>
Thu, 9 Mar 2017 16:13:27 +0000 (11:13 -0500)
committerBrian Evans <grknight@gentoo.org>
Thu, 9 Mar 2017 16:22:47 +0000 (11:22 -0500)
Package-Manager: Portage-2.3.4, Repoman-2.3.2

dev-php/PHP_Timer/Manifest
dev-php/PHP_Timer/PHP_Timer-1.0.9.ebuild [new file with mode: 0644]
dev-php/PHP_Timer/files/autoload.php [new file with mode: 0644]

index 3a3a0f5e3fad02271cda3d654c0dba520ef11872..719e67b01253b29957aa7cc5c3f93371b3d39ac7 100644 (file)
@@ -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 (file)
index 0000000..4081714
--- /dev/null
@@ -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 (file)
index 0000000..bb0974e
--- /dev/null
@@ -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__
+);