public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Evans" <grknight@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/PHP_TokenStream/files/, dev-php/PHP_TokenStream/
Date: Thu, 19 Dec 2019 19:47:02 +0000 (UTC)	[thread overview]
Message-ID: <1576784816.50fdf8976904baf151a1d24c1f3648d4c1091865.grknight@gentoo> (raw)

commit:     50fdf8976904baf151a1d24c1f3648d4c1091865
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 19 18:09:46 2019 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Dec 19 19:46:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50fdf897

dev-php/PHP_TokenStream: Version bump to 3.1.3

Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 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(+)

diff --git a/dev-php/PHP_TokenStream/Manifest b/dev-php/PHP_TokenStream/Manifest
index bb3db6b0d47..0e598da5b99 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 00000000000..1abe33f362c
--- /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 00000000000..4e385c87ec2
--- /dev/null
+++ b/dev-php/PHP_TokenStream/files/autoload-3.1.1.php
@@ -0,0 +1,47 @@
+<?php
+/* Autoloader for dev-php/PHP_TokenStream */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+    require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addClassMap(
+   [
+		'php_token' => '/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);
+


             reply	other threads:[~2019-12-19 19:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 19:47 Brian Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-25 19:23 [gentoo-commits] repo/gentoo:master commit in: dev-php/PHP_TokenStream/files/, dev-php/PHP_TokenStream/ Brian Evans
2019-12-19 15:51 Brian Evans
2017-03-09 16:23 Brian Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1576784816.50fdf8976904baf151a1d24c1f3648d4c1091865.grknight@gentoo \
    --to=grknight@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox