dev-php/PHP_Timer: Version bump for 2.1.2
authorBrian Evans <grknight@gentoo.org>
Thu, 19 Dec 2019 20:35:04 +0000 (15:35 -0500)
committerBrian Evans <grknight@gentoo.org>
Thu, 19 Dec 2019 21:50:52 +0000 (16:50 -0500)
Signed-off-by: Brian Evans <grknight@gentoo.org>
dev-php/PHP_Timer/Manifest
dev-php/PHP_Timer/PHP_Timer-2.1.2.ebuild [new file with mode: 0644]
dev-php/PHP_Timer/files/autoload-2.1.2.php [new file with mode: 0644]

index d989f88a6b591c2795048a1e4033170c202b543a..d99a7462f4c6572fa75fd75d1fb33c1464816b97 100644 (file)
@@ -1,2 +1,3 @@
 DIST PHP_Timer-1.0.5.tgz 3597 BLAKE2B cf82c3ff61a1f96a94a5d3743270be3262bc2ea28d7d71cd1c93a07c7bec950597c4da5d6dd23e4b58b8aad7c2e3bdb7aea07d761ef096e898088ca2296b43cf SHA512 da030dec608d1f8d447da6ce40e995ca818064e3a4b2f2eca1819a77a12875843a25bba1ffd253043ef3ac62a6dc1a16c5e7ba9b792b99b54d0713090478be84
 DIST PHP_Timer-1.0.9.tar.gz 3740 BLAKE2B d551fd676046e6bb653fb9a9bde7a976b9b2081d26caee23177b899fa01e11ae1fb2183234ab43745798c058222574b1523064cc07d25485315eef9090f892a5 SHA512 96db90cf2af18fabcf44bdd4dbb5d298402ed2c8e49f3033fd1b89b3aa8c880d9f8677897d4d542a0db6348bdd9c697042deb0b6e26242adebfde1bcdb4bc559
+DIST PHP_Timer-2.1.2.tar.gz 7090 BLAKE2B c99dd69433b3579e9ed81f06188cac280b6ac383bce12acd9c6a00b5a6d6017a94c427692b639ad1516c1faebec8e160b7cd5c7e5e96043dd3dcb6d283d2095b SHA512 199175e048560756867180cd99a3ca1766431d14091f1448cd8011df5f7824504a6c586ef15d9e53374bdb9dbd1731c05b44509e59d92d725908ec2c46d7d576
diff --git a/dev-php/PHP_Timer/PHP_Timer-2.1.2.ebuild b/dev-php/PHP_Timer/PHP_Timer-2.1.2.ebuild
new file mode 100644 (file)
index 0000000..a0785cb
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN="php-timer"
+
+DESCRIPTION="Utility class for timing"
+HOMEPAGE="https://phpunit.de"
+SRC_URI="https://github.com/sebastianbergmann/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+RDEPEND="dev-php/fedora-autoloader
+       >=dev-lang/php-7.1:*"
+
+src_install() {
+       insinto /usr/share/php/PHP/Timer
+       doins -r src/Timer.php src/{Runtime,}Exception.php
+       newins "${FILESDIR}/autoload-2.1.2.php" 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-2.1.2.php b/dev-php/PHP_Timer/files/autoload-2.1.2.php
new file mode 100644 (file)
index 0000000..835f626
--- /dev/null
@@ -0,0 +1,15 @@
+<?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(
+    [
+               'sebastianBergmann\timer\exception' => '/Exception.php',
+               'sebastianBergmann\timer\runtimeexception' => '/RuntimeException.php',
+               'sebastianBergmann\timer\timer' => '/Timer.php',
+    ],
+    __DIR__
+);