From f1af93971b7490792d8541bc790e0d8c6d787059 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Sep 2019 10:28:05 +0100 Subject: gentoo resync : 06.08.2019 --- dev-php/twig/twig-1.42.3.ebuild | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 dev-php/twig/twig-1.42.3.ebuild (limited to 'dev-php/twig/twig-1.42.3.ebuild') diff --git a/dev-php/twig/twig-1.42.3.ebuild b/dev-php/twig/twig-1.42.3.ebuild new file mode 100644 index 000000000000..c06e5c627361 --- /dev/null +++ b/dev-php/twig/twig-1.42.3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN="Twig" +S="${WORKDIR}/${MY_PN}-${PV}" + +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 test" + +RDEPEND="dev-lang/php:*[ctype] dev-php/fedora-autoloader" +DEPEND="test? ( dev-php/phpunit ${RDEPEND} )" +# Test fail due to missing Symphony dependencies +RESTRICT="test" + +src_install(){ + # The autoloader requires the 'T' in "Twig" capitalized. + insinto "/usr/share/php/${MY_PN}/lib" + doins -r lib/"${MY_PN}"/* + insinto "/usr/share/php/${MY_PN}/src" + doins -r src/* + insinto "/usr/share/php/${MY_PN}" + doins "${FILESDIR}/Autoloader.php" + + 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(){ + cp "${FILESDIR}/Autoloader.php" "${S}" || die + phpunit --bootstrap Autoloader.php || die "test suite failed" + rm "${S}/Autoloader.php" || die +} + +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')" +} -- cgit v1.2.3