From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0418139694 for ; Tue, 1 Aug 2017 20:49:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EAE451FC054; Tue, 1 Aug 2017 20:49:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B2A0B1FC054 for ; Tue, 1 Aug 2017 20:49:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9C8A33416B5 for ; Tue, 1 Aug 2017 20:49:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E6A475C4 for ; Tue, 1 Aug 2017 20:49:53 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1501620516.6ccd06e762e337e48fc2c39e235c9f1238f95bd7.grknight@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/PEAR-HTML_Template_IT/, dev-php/PEAR-HTML_Template_IT/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-php/PEAR-HTML_Template_IT/PEAR-HTML_Template_IT-1.3.0-r1.ebuild dev-php/PEAR-HTML_Template_IT/files/constructor.patch dev-php/PEAR-HTML_Template_IT/files/preg-callback.patch X-VCS-Directories: dev-php/PEAR-HTML_Template_IT/files/ dev-php/PEAR-HTML_Template_IT/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 6ccd06e762e337e48fc2c39e235c9f1238f95bd7 X-VCS-Branch: master Date: Tue, 1 Aug 2017 20:49:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a1a4ae97-aedd-44fa-8712-d0372394fed4 X-Archives-Hash: 4381b8bc050589a58ddd00fd52022e42 commit: 6ccd06e762e337e48fc2c39e235c9f1238f95bd7 Author: Brian Evans gentoo org> AuthorDate: Tue Aug 1 20:48:05 2017 +0000 Commit: Brian Evans gentoo org> CommitDate: Tue Aug 1 20:48:36 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ccd06e7 dev-php/PEAR-HTML_Template_IT: Revbump to add modern patches Replace /e in preg_replace with preg_replace_callback Use PHP5 constructors Package-Manager: Portage-2.3.6, Repoman-2.3.3 .../PEAR-HTML_Template_IT-1.3.0-r1.ebuild | 32 +++++++++++ .../PEAR-HTML_Template_IT/files/constructor.patch | 62 ++++++++++++++++++++++ .../files/preg-callback.patch | 17 ++++++ 3 files changed, 111 insertions(+) diff --git a/dev-php/PEAR-HTML_Template_IT/PEAR-HTML_Template_IT-1.3.0-r1.ebuild b/dev-php/PEAR-HTML_Template_IT/PEAR-HTML_Template_IT-1.3.0-r1.ebuild new file mode 100644 index 00000000000..c60b49c2ffd --- /dev/null +++ b/dev-php/PEAR-HTML_Template_IT/PEAR-HTML_Template_IT-1.3.0-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit php-pear-r2 + +DESCRIPTION="Integrated Templates" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86" +IUSE="examples test" +DEPEND="test? ( dev-php/phpunit ${RDEPEND} )" + +src_prepare() { + eapply "${FILESDIR}/preg-callback.patch" \ + "${FILESDIR}/constructor.patch" + eapply_user +} + +src_install() { + use examples && HTML_DOCS=( + examples/sample_it.php + examples/sample_itx_addblockfile.php + examples/templates/ + ) + php-pear-r2_src_install +} + +src_test() { + phpunit tests/AllTests.php || die +} diff --git a/dev-php/PEAR-HTML_Template_IT/files/constructor.patch b/dev-php/PEAR-HTML_Template_IT/files/constructor.patch new file mode 100644 index 00000000000..61d54eab4e2 --- /dev/null +++ b/dev-php/PEAR-HTML_Template_IT/files/constructor.patch @@ -0,0 +1,62 @@ +diff -aurN a/HTML/Template/IT_Error.php b/HTML/Template/IT_Error.php +--- a/HTML/Template/IT_Error.php 2010-03-10 03:08:10.000000000 -0500 ++++ b/HTML/Template/IT_Error.php 2017-08-01 16:44:31.257269180 -0400 +@@ -58,8 +58,11 @@ + */ + function IT_Error($msg, $file = __FILE__, $line = __LINE__) + { ++ $this->__construct($msg, $file, $line); ++ } ++ function __construct($msg, $file = __FILE__, $line = __LINE__) ++ { + $this->PEAR_Error(sprintf("%s [%s on line %d].", $msg, $file, $line)); + } // end func IT_Error + + } // end class IT_Error +-?> +diff -aurN a/HTML/Template/IT.php b/HTML/Template/IT.php +--- a/HTML/Template/IT.php 2017-08-01 16:40:29.822907534 -0400 ++++ b/HTML/Template/IT.php 2017-08-01 16:44:46.515860952 -0400 +@@ -409,6 +409,10 @@ + */ + function HTML_Template_IT($root = '', $options = null) + { ++ $this->__construct($root, $options); ++ } ++ function __construct($root = '', $options = null) ++ { + if (!is_null($options)) { + $this->setOptions($options); + } +@@ -1184,4 +1188,3 @@ + $errorMessages[$value] : $errorMessages[IT_ERROR]; + } + } // end class IntegratedTemplate +-?> +diff -aurN a/HTML/Template/ITX.php b/HTML/Template/ITX.php +--- a/HTML/Template/ITX.php 2010-03-10 03:08:10.000000000 -0500 ++++ b/HTML/Template/ITX.php 2017-08-01 16:44:41.185654236 -0400 +@@ -138,13 +138,17 @@ + */ + function HTML_Template_ITX($root = '') + { ++ $this->__construct($root); ++ } ++ function __construct($root = '') ++ { + + $this->checkblocknameRegExp = '@' . $this->blocknameRegExp . '@'; + + $this->functionRegExp = '@' . $this->functionPrefix . '(' . + $this->functionnameRegExp . ')\s*\(@sm'; + +- $this->HTML_Template_IT($root); ++ parent::__construct($root); + } // end func constructor + + /** +@@ -886,4 +890,3 @@ + } // end func warning + + } // end class HTML_Template_ITX +-?> diff --git a/dev-php/PEAR-HTML_Template_IT/files/preg-callback.patch b/dev-php/PEAR-HTML_Template_IT/files/preg-callback.patch new file mode 100644 index 00000000000..60ae20af189 --- /dev/null +++ b/dev-php/PEAR-HTML_Template_IT/files/preg-callback.patch @@ -0,0 +1,17 @@ +diff -aurN a/HTML/Template/IT.php b/HTML/Template/IT.php +--- a/HTML/Template/IT.php 2010-03-10 03:08:10.000000000 -0500 ++++ b/HTML/Template/IT.php 2017-08-01 15:12:31.161235223 -0400 +@@ -1088,9 +1088,10 @@ + $content = fread($fh, $fsize); + fclose($fh); + +- return preg_replace( +- "##ime", +- "\$this->getFile('\\1')", ++ return preg_replace_callback( ++ "##im", ++ function($matches) { ++ return $this->getFile($matches[1]); }, + $content + ); + } // end func getFile