From 50fdf8976904baf151a1d24c1f3648d4c1091865 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Thu, 19 Dec 2019 13:09:46 -0500 Subject: dev-php/PHP_TokenStream: Version bump to 3.1.3 Signed-off-by: Brian Evans --- dev-php/PHP_TokenStream/Manifest | 1 + .../PHP_TokenStream/PHP_TokenStream-3.1.1.ebuild | 49 ++++++++++++++++++++++ dev-php/PHP_TokenStream/files/autoload-3.1.1.php | 47 +++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 dev-php/PHP_TokenStream/PHP_TokenStream-3.1.1.ebuild create mode 100644 dev-php/PHP_TokenStream/files/autoload-3.1.1.php (limited to 'dev-php') diff --git a/dev-php/PHP_TokenStream/Manifest b/dev-php/PHP_TokenStream/Manifest index bb3db6b0d47d..0e598da5b997 100644 --- a/dev-php/PHP_TokenStream/Manifest +++ b/dev-php/PHP_TokenStream/Manifest @@ -1 +1,2 @@ DIST PHP_TokenStream-1.4.11.tar.gz 13388 BLAKE2B 20ef9907ce660e2958ffd50f588ead563efa04c9fc4adda4a823830000f73ee7a4c988adc79d14e549c4f02836b7128aa42b01b26996a090595d34a191282b67 SHA512 4e8d8d1eb16169d46b64a43d91f3066d49fe8e3f184d90c5c7cf4234ebfe4eac271a811744b201f05dc86976b3c5b8ad4ae9f2532165a3849980663f1ac5852e +DIST PHP_TokenStream-3.1.1.tar.gz 14275 BLAKE2B 5300768f79cba17a08f55a58a05744eef55df00fc0f0144612bddd3ba5d0494fe19bd5b74d56b57d345f5d98b63033aa05e6d157c0979be163e51dc7cc5ad19f SHA512 3a1e36d13b8d77d6fe7d1617fc43a8d59b68af6ee6182afdecf5c970c844f7cb63f3056ce7f6aaae17237b948c5ff9862438d823c2eda179e24c1bb4fc4f4e02 diff --git a/dev-php/PHP_TokenStream/PHP_TokenStream-3.1.1.ebuild b/dev-php/PHP_TokenStream/PHP_TokenStream-3.1.1.ebuild new file mode 100644 index 000000000000..1abe33f362c5 --- /dev/null +++ b/dev-php/PHP_TokenStream/PHP_TokenStream-3.1.1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_PHP="php7-2 php7-3 php7-4" +MY_PN="php-token-stream" + +DESCRIPTION="Wrapper around PHP's tokenizer extension" +HOMEPAGE="http://phpunit.de" +SRC_URI="https://github.com/sebastianbergmann/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="test" + +S="${WORKDIR}/${MY_PN}-${PV}" + +RDEPEND="dev-php/fedora-autoloader + || ( + dev-lang/php:7.2[tokenizer(-)] + dev-lang/php:7.3[tokenizer(-)] + dev-lang/php:7.4[tokenizer(-)] + )" +BDEPEND="test? ( ${RDEPEND} dev-php/phpunit )" +RESTRICT="!test? ( test )" + +src_install() { + insinto /usr/share/php/PHP/Token + doins -r src/* + newins "${FILESDIR}/autoload-3.1.1.php" autoload.php +} + +src_test() { + mkdir vendor || die + cp "${FILESDIR}/autoload-3.1.1.php" vendor/autoload.php || die + sed -i 's~__DIR__~__DIR__."/../src"~' vendor/autoload.php || die + for target in ${USE_PHP//-/.} ; do + if [ -x /usr/bin/$target ] ; then + ${target} /usr/bin/phpunit -c phpunit.xml || die + fi + done +} + +pkg_postinst() { + ewarn "This library now loads via /usr/share/php/PHP/Token/autoload.php" + ewarn "Please update any scripts to require the autoloader" +} diff --git a/dev-php/PHP_TokenStream/files/autoload-3.1.1.php b/dev-php/PHP_TokenStream/files/autoload-3.1.1.php new file mode 100644 index 000000000000..4e385c87ec24 --- /dev/null +++ b/dev-php/PHP_TokenStream/files/autoload-3.1.1.php @@ -0,0 +1,47 @@ + '/Token.php', + 'php_tokenwithscope' => '/Token.php', + 'php_tokenwithscopeandvisibility' => '/Token.php', + 'php_token_open_tag' => '/Token.php', + 'php_token_util' => '/Token/Util.php', + 'php_token_stream' => '/Token/Stream.php', + 'php_token_stream_cachingfactory' => '/Token/Stream/CachingFactory.php', + ], + __DIR__ +); +$_gentooFedAutoload = function() { +$_fedAutoLoadtokens = []; +$_fedAutoLoadtokenSubClasses = ['includes','function','interface','abstract','ampersand','and_equal', +'array','array_cast','as','at','backtick','bad_character','boolean_and','boolean_or','boolean_cast', +'break','caret','case','catch','character','class','class_c','class_name_constant','clone','close_bracket', +'close_curly','close_square','close_tag','colon','comma','comment','concat_equal','const','constant_encapsed_string', +'continue','curly_open','dec','declare','default','div','div_equal','dnumber','do','doc_comment','dollar', +'dollar_open_curly_braces','dot','double_arrow','double_cast','double_colon','double_quotes','echo','else', +'elseif','empty','encapsed_and_whitespace','enddeclare','endfor','endforeach','endif','endswitch','endwhile', +'end_heredoc','equal','eval','exclamation_mark','exit','extends','file','final','for','foreach','func_c','global', +'gt','if','implements','inc','include','include_once','inline_html','instanceof','int_cast','isset','is_equal', +'is_greater_or_equal','is_identical','is_not_equal','is_not_identical','is_smaller_or_equal','line','list', +'lnumber','logical_and','logical_or','logical_xor','lt','method_c','minus','minus_equal','mod_equal','mult', +'mult_equal','new','num_string','object_cast','object_operator','open_bracket','open_curly','open_square', +'open_tag','open_tag_with_echo','or_equal','paamayim_nekudotayim','percent','pipe','plus','plus_equal','print', +'private','protected','public','question_mark','require','require_once','return','semicolon','sl','sl_equal', +'sr','sr_equal','start_heredoc','static','string','string_cast','string_varname','switch','throw','tilde', +'try','unset','unset_cast','use','use_function','var','variable','while','whitespace','xor_equal','halt_compiler', +'dir','goto','namespace','ns_c','ns_separator','callable','insteadof','trait','trait_c','finally','yield', +'ellipsis','pow','pow_equal','coalesce','spaceship','yield_from','coalesce_equal','fn' +]; +foreach($_fedAutoLoadtokenSubClasses as $_fedAutoLoadi) + $_fedAutoLoadtokens["php_token_{$_fedAutoLoadi}"] = '/Token.php'; +\Fedora\Autoloader\Autoload::addClassMap($_fedAutoLoadtokens, __DIR__); +}; +$_gentooFedAutoload(); +unset ($_gentooFedAutoload); + -- cgit v1.2.3-65-gdbad