From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-php/twig/Manifest | 5 +++ dev-php/twig/metadata.xml | 20 +++++++++ dev-php/twig/twig-1.31.0.ebuild | 91 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 dev-php/twig/Manifest create mode 100644 dev-php/twig/metadata.xml create mode 100644 dev-php/twig/twig-1.31.0.ebuild (limited to 'dev-php/twig') diff --git a/dev-php/twig/Manifest b/dev-php/twig/Manifest new file mode 100644 index 000000000000..b53ff006f26f --- /dev/null +++ b/dev-php/twig/Manifest @@ -0,0 +1,5 @@ +DIST twig-1.31.0.tar.gz 242247 SHA256 b4e6d00466a60aa21b165786829b39ed74a1b41810bade3b0f11bbdefa6cda23 SHA512 c8c25139b2568d40c9d1b14d8f489047abe13b1598c9d3292ddd3898a685ac69ede00a516c12c4f22805314fca4712991cd27e39dd9c4f57e5576f86e2746401 WHIRLPOOL ce2d15de20c857008aba172601aa3f46fe04b809c39247bac119b5c4c98027be7d42b37aa96c3eba930a27ef079281792a8124f479b9864a8156e1a8999aab29 +EBUILD twig-1.31.0.ebuild 2677 SHA256 4fc11ee4e8e75ec705bb8a4820320a95e1a0fdd4547db2be2a155d5bedbfb309 SHA512 c2e0e9e0ff99fd5083ee9af6a464f84e0dfca6edef775cbf3dbedc30a144a54bd1839bf8489f0645570a350f882fe2bd294c19d5c43f3d01ed18afb459c6b975 WHIRLPOOL 5f4444fe6035e0fff29e48949abed4c7959baf28bfba8289815ef9beb622f3681fd9d44f0ef098d08351e571cccaed463465c65f83ddbea8b1708d4e52b9f221 +MISC ChangeLog 3220 SHA256 30b2bb13ad71f00b9adb06355bd6b584070ad5b78b88298e7b920bea78ea7e49 SHA512 10c6e5e5108346cfb6fa20af9fdfdd7231f7f305ad096d80c3b03677af21190ba87599cef7e76747cbac0e89250dcb4e9c4d48257f586e15ebcb26dd80ab95e9 WHIRLPOOL 1dc3db90cb83ccf6ea84a0d1707986486e80a017f2eebac40d62807e6c5aafa02d74ca0d18bd4f81574ff2ab6947da16f42e66d7483a99eecb5504bcfa82d4bd +MISC ChangeLog-2015 743 SHA256 e0b2866dfba301a24582569c4b99a18df2c3c6d2b258efe4510a71afe3c09807 SHA512 93524026ee11fd0098d6e39ef047cb8b83e7833adde9ae1dd4076a4d66c08a1a43910b83e92a8cd8b88c7cfcc5ccb510a9709c106295b77c665ae94ec5a0e391 WHIRLPOOL f65f981f2e93e304dbe21ca9e434765a06c92e6526086090c03104810d1838379b3b3d5a4985ac03af85563a53c9a1723401ca20552006c9abbbda72685cd249 +MISC metadata.xml 545 SHA256 8643489af96ab6b6516376b8a1c318b3c3884fa35ce182a1f37376f99208bba0 SHA512 7374d514d449d55037c8c57a0fb95162bb11b9ad80cb9896510cc1fddad6a984c19fff5431ce4f2d9ecd49dad72cd54edc25e521c986c4347a841c1a4b8435de WHIRLPOOL f132a630780d6d1ac3802f57a88e7f5c29c241d11e43eb54dc520e7c2b1ca829c8b7a85ec18857977efe07f25dea0578764a96148815c9ff294fdd3d9c2cfaa0 diff --git a/dev-php/twig/metadata.xml b/dev-php/twig/metadata.xml new file mode 100644 index 000000000000..434d766441f9 --- /dev/null +++ b/dev-php/twig/metadata.xml @@ -0,0 +1,20 @@ + + + + + djc@gentoo.org + Dirkjan Ochtman + + + php-bugs@gentoo.org + PHP + + + + Build the C extension (only for php-5.6.x). + + + + twigphp/Twig + + diff --git a/dev-php/twig/twig-1.31.0.ebuild b/dev-php/twig/twig-1.31.0.ebuild new file mode 100644 index 000000000000..e62d3486a732 --- /dev/null +++ b/dev-php/twig/twig-1.31.0.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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 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_unpack() { + # Don't make copies of the source tree if they won't be used. + if use extension; then + php-ext-source-r3_src_unpack + else + default + fi +} + +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}" + doins -r lib/"${MY_PN}"/* + + # 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." +} -- cgit v1.2.3