summaryrefslogtreecommitdiff
path: root/dev-php/twig
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-05-18 00:10:51 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-05-18 00:10:51 +0100
commiteccb70a7f91b2d22582587f26d1a28bb31408b45 (patch)
tree3223e1fd54201bcf4ebecac6fbe87361cbe643e2 /dev-php/twig
parenta2810985afabcc31d3eace5e61d8ea25b852ba17 (diff)
gentoo resync : 18.05.2019
Diffstat (limited to 'dev-php/twig')
-rw-r--r--dev-php/twig/Manifest6
-rw-r--r--dev-php/twig/files/Autoloader.php18
-rw-r--r--dev-php/twig/twig-1.31.0.ebuild82
-rw-r--r--dev-php/twig/twig-1.35.3.ebuild82
-rw-r--r--dev-php/twig/twig-1.40.1-r1.ebuild49
5 files changed, 69 insertions, 168 deletions
diff --git a/dev-php/twig/Manifest b/dev-php/twig/Manifest
index fb9ea00e82c0..9e56fdbfc641 100644
--- a/dev-php/twig/Manifest
+++ b/dev-php/twig/Manifest
@@ -1,8 +1,6 @@
AUX 1.40.1-autoloader-path.patch 852 BLAKE2B 5a09a7fc095fd4ae34ccadd35cbb97b2ba7e4e7ae8735d1beb04ed3014f984583245b44a2d96e3283daa73fc2767de7794c40f8033624499d8fb0bd3786f4bf0 SHA512 bff2e1acab5dc61b930d3698add018eb60975a7f043d4abc764579109a0d026bfe0be29e7d0756efcf583ad84bc3831ca6d081d36ec16e6b2e6651d9c7e9534f
-DIST twig-1.31.0.tar.gz 242247 BLAKE2B f11195b235c5dd8cda5373394d94306c81810d46c155194cc11bfcb832778b03085bf05de10b636ebda9223876ab9b752214e8676c000578c702f6d9b832ffe1 SHA512 c8c25139b2568d40c9d1b14d8f489047abe13b1598c9d3292ddd3898a685ac69ede00a516c12c4f22805314fca4712991cd27e39dd9c4f57e5576f86e2746401
-DIST twig-1.35.3.tar.gz 256758 BLAKE2B e96f6651fddd2fab3a1d379a2996ded594942bcb511548d419a56e8e4cc6c6b30e6a0a96b44211351ce9b3d2f36cde6b1c85acd46e51d5c2e19793703fccecc4 SHA512 c27d4407b5ad0e51724599fe0371a5951e8a8654df443ca6ac817a9c6958c3235b4d56a396eeceb71eaf707887420a6beace10ca42f1c09882988039c932fe7b
+AUX Autoloader.php 503 BLAKE2B 57679179226098eea818df53154b98afd3249f12a219fc894a7529bdcb8ceb39c7c5c20f14263ce03875983ab0acaeaa6e09ca8446ee5b9a591b6e284e7f9238 SHA512 054a9420a23b67c57ca0780fdbc3c817436dea71780714654469efa23c0d17173e1c87b2f3c6ce48e26e4dd49a92f1f17e2e23472a666513e9fb8903a4f11699
DIST twig-1.40.1.tar.gz 274081 BLAKE2B 0e73bd9fff58677446ba03ed560bff17c1879192b79cca9f718ccd330e1eac64ee1195d7034fa52ec009e323868d1cc1bedc182e90f0a77c8b54d6aa16022554 SHA512 de174e5dd14562a155515a3238aa07ef5a22c3bf0eff8ecc320f1a972e56f1ec759a53ee24579c6434e286b3775044e88c753fd08930037314b45c9577b310b1
-EBUILD twig-1.31.0.ebuild 2521 BLAKE2B 3bca6d375823553584cda2bdd243f19dbe8854bdb80ea6a8a62aae9e33e651c7b1a0e73c26fbcf938c03c9c9a182f1ef8c8e69f29fda5c039934f4276c3facca SHA512 83e3df9db7d32fdf7c7cb29c30d43422aaffc04f55976b8267781e2f0c383a6a69605ba4ed6369a8ff65e8819418db76bcd1a0035291727287d1d82a512845a3
-EBUILD twig-1.35.3.ebuild 2521 BLAKE2B 1422899758d8b3c8bcc9877e954ddd1f7cf8c09c4e6c43cb840120f1dd45ab1f2f332d3ebc0321a7bf5618d185df0fe3da7999dede68d339443b9ea0cb947893 SHA512 aeb548e3ce955ec8f4a75e5a830ec45cde36ce535b8b9df87a3e6503436f0763e8d9d0ab02d7680fab83d352ad829a4b4a4f2f7873e26ca7fadf3016b0ab09b2
+EBUILD twig-1.40.1-r1.ebuild 1369 BLAKE2B d0cb11c5eacd37538ad94097a5c2db78c351893140df5f025b82a8f3b8ec57ebadfee4ecafc2be5c527955656315e20ea9b404ecdaf374a92864c6f66edcb421 SHA512 e4243f710ed4287c8bd8ebb74bba91e534c1b6ec3b898706dbbd2cc7920682bc0c78e92472ad33257696df1031acbcfdf5a67036f7ff0a050cb3ccb49e30106b
EBUILD twig-1.40.1.ebuild 2738 BLAKE2B 7bb7d6d53773a8c1c8dfe222b4fc84233914456fd9e04ba75404e371e39168b4506158f73f3b89c647c7a3deff516389edd56a8792a3661f6802086e12ad7b18 SHA512 d70a35093e913df6d03aca6179d6c14d0971a999f4202059653eabc441858fba4f96211d6b3c64956e524ad60a6987e23053b8b0a2f809590f2b0b5bf74cdc8b
MISC metadata.xml 545 BLAKE2B ccc89ed2677959e71586c28951a718dc42b2dbce61803762b75198606407ed8ed4eebbcd18cee00591fb6c9f22e422c8e026d4a5cd4814db3af47b8f31eb88ad SHA512 7374d514d449d55037c8c57a0fb95162bb11b9ad80cb9896510cc1fddad6a984c19fff5431ce4f2d9ecd49dad72cd54edc25e521c986c4347a841c1a4b8435de
diff --git a/dev-php/twig/files/Autoloader.php b/dev-php/twig/files/Autoloader.php
new file mode 100644
index 000000000000..e4bef5471257
--- /dev/null
+++ b/dev-php/twig/files/Autoloader.php
@@ -0,0 +1,18 @@
+<?php
+/* Autoloader for dev-php/twig */
+
+if (!class_exists('Twig_Autoloader', false)) {
+ // polyfill for old code
+ class Twig_Autoloader {
+ public static function register(){}
+ public static function autoload(){}
+ }
+}
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addPsr0('Twig_', __DIR__.'/lib');
+\Fedora\Autoloader\Autoload::addPsr4('Twig\\', __DIR__.'/src');
+
diff --git a/dev-php/twig/twig-1.31.0.ebuild b/dev-php/twig/twig-1.31.0.ebuild
deleted file mode 100644
index 7e678f068e6b..000000000000
--- a/dev-php/twig/twig-1.31.0.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# 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_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."
-}
diff --git a/dev-php/twig/twig-1.35.3.ebuild b/dev-php/twig/twig-1.35.3.ebuild
deleted file mode 100644
index b4bbd806de7e..000000000000
--- a/dev-php/twig/twig-1.35.3.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2018 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_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."
-}
diff --git a/dev-php/twig/twig-1.40.1-r1.ebuild b/dev-php/twig/twig-1.40.1-r1.ebuild
new file mode 100644
index 000000000000..c06e5c627361
--- /dev/null
+++ b/dev-php/twig/twig-1.40.1-r1.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')"
+}