dev-php/PEAR-HTML_Template_Sigma: Straight to stable revbump
authorBrian Evans <grknight@gentoo.org>
Mon, 19 Feb 2018 14:43:55 +0000 (09:43 -0500)
committerBrian Evans <grknight@gentoo.org>
Mon, 19 Feb 2018 15:19:57 +0000 (10:19 -0500)
Add required constructor and tests patch
Enable tests
Bump EAPI

Package-Manager: Portage-2.3.24, Repoman-2.3.6

dev-php/PEAR-HTML_Template_Sigma/PEAR-HTML_Template_Sigma-1.3.0-r1.ebuild [new file with mode: 0644]
dev-php/PEAR-HTML_Template_Sigma/PEAR-HTML_Template_Sigma-1.3.0.ebuild [deleted file]
dev-php/PEAR-HTML_Template_Sigma/files/HTML_Template_Sigma-1.3.0-php7.patch [new file with mode: 0644]

diff --git a/dev-php/PEAR-HTML_Template_Sigma/PEAR-HTML_Template_Sigma-1.3.0-r1.ebuild b/dev-php/PEAR-HTML_Template_Sigma/PEAR-HTML_Template_Sigma-1.3.0-r1.ebuild
new file mode 100644 (file)
index 0000000..828f16c
--- /dev/null
@@ -0,0 +1,20 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit php-pear-r2
+
+DESCRIPTION="An implementation of Integrated Templates API with template 'compilation' added"
+LICENSE="PHP-3.01"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+IUSE="test"
+
+RDEPEND="dev-lang/php:*[ctype]"
+DEPEND="test? ( ${RDEPEND} dev-php/phpunit )"
+PATCHES=( "${FILESDIR}/HTML_Template_Sigma-1.3.0-php7.patch" )
+
+src_test() {
+       phpunit tests/AllTests.php || die
+}
diff --git a/dev-php/PEAR-HTML_Template_Sigma/PEAR-HTML_Template_Sigma-1.3.0.ebuild b/dev-php/PEAR-HTML_Template_Sigma/PEAR-HTML_Template_Sigma-1.3.0.ebuild
deleted file mode 100644 (file)
index dfde6e2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit php-pear-r1
-
-DESCRIPTION="An implementation of Integrated Templates API with template 'compilation' added"
-LICENSE="PHP-3.01"
-SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
-IUSE=""
-
-DEPEND="dev-lang/php[ctype]"
diff --git a/dev-php/PEAR-HTML_Template_Sigma/files/HTML_Template_Sigma-1.3.0-php7.patch b/dev-php/PEAR-HTML_Template_Sigma/files/HTML_Template_Sigma-1.3.0-php7.patch
new file mode 100644 (file)
index 0000000..ffb95e2
--- /dev/null
@@ -0,0 +1,42 @@
+diff -aurN a/HTML/Template/Sigma.php b/HTML/Template/Sigma.php
+--- a/HTML/Template/Sigma.php  2014-01-13 04:33:52.000000000 -0500
++++ b/HTML/Template/Sigma.php  2018-02-19 09:29:52.995013991 -0500
+@@ -384,6 +384,26 @@
+      *\r
+      * @see   setRoot(), setCacheRoot()\r
+      */\r
++    function __construct($root = '', $cacheRoot = '')\r
++    {\r
++        // the class is inherited from PEAR to be able to use $this->setErrorHandling()\r
++        parent::__construct();\r
++        $this->variablesRegExp       = '@' . $this->openingDelimiter . '(' . $this->variablenameRegExp . ')' .\r
++                                       '(:(' . $this->functionnameRegExp . '))?' . $this->closingDelimiter . '@sm';\r
++        $this->removeVariablesRegExp = '@' . $this->openingDelimiter . '\s*(' . $this->variablenameRegExp . ')\s*'\r
++                                       . $this->closingDelimiter . '@sm';\r
++        $this->blockRegExp           = '@<!--\s+BEGIN\s+(' . $this->blocknameRegExp\r
++                                       . ')\s+-->(.*)<!--\s+END\s+\1\s+-->@sm';\r
++        $this->functionRegExp        = '@' . $this->functionPrefix . '(' . $this->functionnameRegExp . ')\s*\(@sm';\r
++        $this->setRoot($root);\r
++        $this->setCacheRoot($cacheRoot);\r
++\r
++        $this->setCallbackFunction('h', array(&$this, '_htmlspecialchars'));\r
++        $this->setCallbackFunction('e', array(&$this, '_htmlentities'));\r
++        $this->setCallbackFunction('u', 'urlencode');\r
++        $this->setCallbackFunction('r', 'rawurlencode');\r
++        $this->setCallbackFunction('j', array(&$this, '_jsEscape'));\r
++    }\r
+     function HTML_Template_Sigma($root = '', $cacheRoot = '')\r
+     {\r
+         // the class is inherited from PEAR to be able to use $this->setErrorHandling()\r
+diff -aurN a/tests/AllTests.php b/tests/AllTests.php
+--- a/tests/AllTests.php       2014-01-13 04:33:52.000000000 -0500
++++ b/tests/AllTests.php       2018-02-19 09:37:14.071972780 -0500
+@@ -24,8 +24,6 @@
+     define('PHPUnit_MAIN_METHOD', 'HTML_Template_Sigma_AllTests::main');\r
+ }\r
+ \r
+-require_once 'PHPUnit/Autoload.php';\r
+-\r
+ /**\r
+  * Class for file / directory manipulation from PEAR package\r
+  */\r