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 91E6F138334 for ; Sun, 7 Jul 2019 18:42:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0BA4E0839; Sun, 7 Jul 2019 18:42:45 +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 6F2EEE0839 for ; Sun, 7 Jul 2019 18:42:45 +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 0170D34730E for ; Sun, 7 Jul 2019 18:42:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 72D084D3 for ; Sun, 7 Jul 2019 18:42:42 +0000 (UTC) From: "Dirkjan Ochtman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Dirkjan Ochtman" Message-ID: <1562524952.faf866ceb51f0dd240d1b68dbe3fe3e339787feb.djc@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/twig/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-php/twig/Manifest dev-php/twig/twig-1.42.2.ebuild X-VCS-Directories: dev-php/twig/ X-VCS-Committer: djc X-VCS-Committer-Name: Dirkjan Ochtman X-VCS-Revision: faf866ceb51f0dd240d1b68dbe3fe3e339787feb X-VCS-Branch: master Date: Sun, 7 Jul 2019 18:42:42 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3767b6d6-5b02-4e84-8161-c0a504ffb0ad X-Archives-Hash: 0259082fed6a6ea1500741aa10eb34f4 commit: faf866ceb51f0dd240d1b68dbe3fe3e339787feb Author: Dirkjan Ochtman gentoo org> AuthorDate: Wed Jul 3 20:06:24 2019 +0000 Commit: Dirkjan Ochtman gentoo org> CommitDate: Sun Jul 7 18:42:32 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faf866ce dev-php/twig: version bump to 1.42.2 Revert faulty patching strategy. Signed-off-by: Dirkjan Ochtman gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11 dev-php/twig/Manifest | 1 + dev-php/twig/twig-1.42.2.ebuild | 86 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/dev-php/twig/Manifest b/dev-php/twig/Manifest index 2d9b40a94e2..787f3db0ac1 100644 --- a/dev-php/twig/Manifest +++ b/dev-php/twig/Manifest @@ -1 +1,2 @@ DIST twig-1.40.1.tar.gz 274081 BLAKE2B 0e73bd9fff58677446ba03ed560bff17c1879192b79cca9f718ccd330e1eac64ee1195d7034fa52ec009e323868d1cc1bedc182e90f0a77c8b54d6aa16022554 SHA512 de174e5dd14562a155515a3238aa07ef5a22c3bf0eff8ecc320f1a972e56f1ec759a53ee24579c6434e286b3775044e88c753fd08930037314b45c9577b310b1 +DIST twig-1.42.2.tar.gz 277760 BLAKE2B c72462b172f1cda85ca8a7988870e20abf09bdc6114eb428213508fcf9c19a2b10e180e8fa052b8e51e8aee749c7c0ded936e5792ca1f8b5c7024872335df3fb SHA512 17ccfcea750d9d9154841598b34de8882aa1144696d912c8175b1add996db4f31b3cb85bc68dc75f62944fe858345811ebbf952aabb0c3ff8c1bbc2a0f1a2576 diff --git a/dev-php/twig/twig-1.42.2.ebuild b/dev-php/twig/twig-1.42.2.ebuild new file mode 100644 index 00000000000..54c306ddc74 --- /dev/null +++ b/dev-php/twig/twig-1.42.2.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_PN="Twig" +USE_PHP="php5-6" +S="${WORKDIR}/${MY_PN}-${PV}" +PHP_EXT_S="${S}/ext/${PN}" +PHP_EXT_NAME="${PN}" +PHP_EXT_OPTIONAL_USE="extension" + +inherit eutils php-ext-source-r3 + +DESCRIPTION="PHP templating engine with syntax similar to Django" +HOMEPAGE="http://twig.sensiolabs.org/" +SRC_URI="https://github.com/twigphp/${MY_PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc extension test" + +DEPEND="test? ( dev-php/phpunit )" + +# We always require *some* version of PHP; the eclass (conditionally) +# requires *specific* versions. +RDEPEND="dev-lang/php" + +src_prepare(){ + # We need to call eapply_user ourselves, because it may be skipped + # if either the "extension" USE flag is not set, or if the user's + # PHP_TARGETS is essentially empty (does not contain "php5-6"). In + # the latter case, the eclass src_prepare does nothing. We only call + # the eclass phase conditionally because the correct version of + # e.g. "phpize" may not be there unless USE=extension is set. + eapply_user + use extension && php-ext-source-r3_src_prepare +} + +src_configure() { + # The eclass phase will try to run the ./configure script even if it + # doesn't exist (in contrast to the default src_configure), so we + # need to skip it if the eclass src_prepare (that creates said + # script) is not run. + use extension && php-ext-source-r3_src_configure +} + +src_compile() { + # Avoids the same problem as in src_configure. + use extension && php-ext-source-r3_src_compile +} + +src_install(){ + use extension && php-ext-source-r3_src_install + + cd "${S}" || die + # The autoloader requires the 'T' in "Twig" capitalized. + insinto "/usr/share/php/${MY_PN}/lib" + doins -r lib/* + insinto "/usr/share/php/${MY_PN}/src" + doins -r src/* + insinto "/usr/share/php/${MY_PN}" + #dosym "lib/Autoloader.php" "/usr/share/php/${MY_PN}/Autoloader.php" + + # The eclass src_install calls einstalldocs, so we may install a few + # files twice. Doing so should be harmless. + dodoc README.rst CHANGELOG + + # This installs the reStructuredText source documents. There's got + # to be some way to turn them into HTML using Sphinx, but upstream + # doesn't provide for it. + use doc && dodoc -r doc +} + +src_test(){ + phpunit --bootstrap test/bootstrap.php || die "test suite failed" +} + +pkg_postinst(){ + elog "${PN} has been installed in /usr/share/php/${MY_PN}/." + elog "To use it in a script, require('${MY_PN}/Autoloader.php')," + elog "and then run \"Twig_Autoloader::register();\". Most of" + elog "the examples in the documentation should work without" + elog "further modification." +}