summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2023-04-18 21:09:26 -0700
committerJohn Helmert III <ajak@gentoo.org>2023-04-18 21:12:28 -0700
commit5663f7e15244378caa1c3c94c1b657a0057268bb (patch)
tree9ff35a543dbb9347ac0bf044e2249ce9682f8724 /dev-php
parentapp-emulation/dxvk: fix build w/ gcc13 (diff)
downloadgentoo-5663f7e15244378caa1c3c94c1b657a0057268bb.tar.gz
gentoo-5663f7e15244378caa1c3c94c1b657a0057268bb.tar.bz2
gentoo-5663f7e15244378caa1c3c94c1b657a0057268bb.zip
dev-php/twig: add 1.44.7
Closes: https://bugs.gentoo.org/873358 Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/twig/Manifest1
-rw-r--r--dev-php/twig/twig-1.44.7.ebuild49
2 files changed, 50 insertions, 0 deletions
diff --git a/dev-php/twig/Manifest b/dev-php/twig/Manifest
index 9dd8fb8fdb33..4c387b5ab2f5 100644
--- a/dev-php/twig/Manifest
+++ b/dev-php/twig/Manifest
@@ -1 +1,2 @@
DIST twig-1.44.6.tar.gz 126880 BLAKE2B a838a5ae8bc82b6e0a39b55ba7d3817dd0ac0c2995881662fc5e7327a5dea83dea4740952282c9320016b379c08f02cb53a850004ecd2c919ca84da6267d0a56 SHA512 a443a700b71f982ea47187d9753ba9903e879f272ed53ff399211f5a76e7dd84774d5071a24cb8d5df6ffa754ce989fac152d0fe124ca460b8f167a553be86e7
+DIST twig-1.44.7.tar.gz 126915 BLAKE2B 2a88840cbea671dae367d39422d4b222e275236aab511fa8f5e4704093b53c3c8e5f335aac4930d84d43b05bcbe759993228de40d1aa2dd90e7b84ca8e5af7e6 SHA512 134d43f310f4277902ea06d632a7946de475ce1907cb33176f82cc49ffefc1c13b9d3f4cf76846c0084bb5a1636b001b6eb72d25e3770e118b7c1e4e4a30a373
diff --git a/dev-php/twig/twig-1.44.7.ebuild b/dev-php/twig/twig-1.44.7.ebuild
new file mode 100644
index 000000000000..01310215fa64
--- /dev/null
+++ b/dev-php/twig/twig-1.44.7.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="Twig"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+DESCRIPTION="PHP templating engine with syntax similar to Django"
+HOMEPAGE="https://twig.symfony.com/"
+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"
+BDEPEND="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/${MY_PN}"
+ 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')"
+}