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

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

index 1b06a08143b130d358fd35cbb5f3ddbf81137af3..f477202f46aa03db499a46524be934ae32f68c12 100644 (file)
@@ -1 +1,2 @@
 DIST Text_Template-1.1.1.tgz 3444 SHA256 1d21e556407441cbe81bbb32e34a78c3eaacb98def3e1d7ea3fa8a2b584ff207 SHA512 0eaf43ab8c0810f63d81ddaf62a5e81b2e244161fe79fe09bec05ef732ee07012a1c6c3711885a118cf38334131c57ac1d326e0a711eb3e6d3099c5475f80e7f WHIRLPOOL c64fbe8bf7574142b2d6bbaa60e62802d09f1a7a8d050543bc58921e83e8bcffd2575e1f14142805b38f0a4418f63011311986b07ae2e12d15b634dc07db5d47
+DIST Text_Template-1.2.1.tar.gz 2561 SHA256 007a9251c688951cadcb3476f23c652ecd97086a14d0d6291f7d01ad9f80f1fc SHA512 d8277f24782d0897b26d2e4922c2658047c484cb86f477916d6ad6dad3e5150bfa0a1ad38c79463a3fde97702bc65edb207a481b6f6cd8346c5fcc33b4cff8ca WHIRLPOOL 864f910e8b94b366989a434c0f9f1df6afd2f12c3e3e6976720888f3180b63f171c6c1d83640884637c89c9cbef996949d5f34163f83f2dc804484935bccfd8c
diff --git a/dev-php/Text_Template/Text_Template-1.2.1.ebuild b/dev-php/Text_Template/Text_Template-1.2.1.ebuild
new file mode 100644 (file)
index 0000000..0307762
--- /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-text-template"
+
+DESCRIPTION="A simple template engine"
+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/Text/Template
+       doins -r src/*
+       doins "${FILESDIR}/autoload.php"
+}
+
+pkg_postinst() {
+       ewarn "This library now loads via /usr/share/php/Text/Template/autoload.php"
+       ewarn "Please update any scripts to require the autoloader"
+}
diff --git a/dev-php/Text_Template/files/autoload.php b/dev-php/Text_Template/files/autoload.php
new file mode 100644 (file)
index 0000000..d6658c6
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+/* Autoloader for dev-php/Text_Template */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+    require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addClassMap(
+    array(
+               'text_template' => '/Template.php',
+    ),
+    __DIR__
+);