summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-08-03 11:36:06 -0400
committerBrian Evans <grknight@gentoo.org>2017-08-03 11:36:06 -0400
commite1b4bf081cce0194fb22d29a94d346afbe9cbd64 (patch)
tree0f21a09a701c6ea9231d312615bebed49b71a13b /dev-php/PHP_CodeSniffer
parentdev-lang/php: new version 7.0.22 in the 7.0 slot. (diff)
downloadgentoo-e1b4bf081cce0194fb22d29a94d346afbe9cbd64.tar.gz
gentoo-e1b4bf081cce0194fb22d29a94d346afbe9cbd64.tar.bz2
gentoo-e1b4bf081cce0194fb22d29a94d346afbe9cbd64.zip
dev-php/PHP_CodeSniffer: Version bump
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'dev-php/PHP_CodeSniffer')
-rw-r--r--dev-php/PHP_CodeSniffer/Manifest1
-rw-r--r--dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.0.2.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-php/PHP_CodeSniffer/Manifest b/dev-php/PHP_CodeSniffer/Manifest
index 738d5451f7c1..f79f7d398c99 100644
--- a/dev-php/PHP_CodeSniffer/Manifest
+++ b/dev-php/PHP_CodeSniffer/Manifest
@@ -1 +1,2 @@
DIST PHP_CodeSniffer-2.6.2.tgz 497234 SHA256 f5c71941e254742130e22cd5ef48d3b06b486efbd1b3dbc7f2fa77acdeac650d SHA512 8e74ca2035f25647c836c6cacb6da6c1a3d0d280077cc6b31f5abf01843546c7370a96cba4f3a1b56fe8bac6954e10ce6570352ae67b14f717bab6a30bd2c865 WHIRLPOOL 558653b7ca61d65cdb20dc5e91b3b53f4de57e00aa399a58e798a497b5b1659241f946390817333621ed7e4737f6eda90088085b57e43832af24f7fd4a273a76
+DIST PHP_CodeSniffer-3.0.2.tgz 529486 SHA256 782403840a46b24a8055889ca71f77046762ac7ed74f4aec8d2d95c7abf4b62b SHA512 ff32e6e88be1927a662f2d1d453f9c071220e168007ccc3ec7cfd3e766ea68ea0c69d537aa37ddb75d103792d1877e0af2d4710f8f6c6d4e957f0d4c482db68c WHIRLPOOL 5b2d4ec8726156c753db5a6b41d422d4ccb0fe749d389685b4ff3211876e12b50f1930371a1dd9e2c2207bd90a3612f894b7cab90d0536d796c12d36ce13e18a
diff --git a/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.0.2.ebuild b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.0.2.ebuild
new file mode 100644
index 000000000000..c460fcdcb741
--- /dev/null
+++ b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.0.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Detect violations of PHP code standards"
+HOMEPAGE="https://github.com/squizlabs/PHP_CodeSniffer"
+
+# The test suite isn't part of the Github tarball at the moment. Keep an
+# eye on https://github.com/squizlabs/PHP_CodeSniffer/issues/548
+SRC_URI="http://download.pear.php.net/package/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="test? ( >=dev-php/phpunit-4 )"
+RDEPEND="dev-lang/php:*[cli,tokenizer,xmlwriter]"
+
+DOCS=( CONTRIBUTING.md README.md )
+
+src_prepare() {
+ sed -i "s~@data_dir@~${EPREFIX}/usr/share/php/data~" src/Config.php || die
+ eapply_user
+}
+
+src_install() {
+ local MY_PN="PHP/CodeSniffer" script
+ # The PEAR eclass would install everything into the wrong location.
+ insinto "/usr/share/php/${MY_PN}"
+ doins -r src autoload.php
+
+ insinto "/usr/share/php/data/${MY_PN}"
+ doins CodeSniffer.conf.dist
+ # These load code via relative paths, so they have to be symlinked
+ # and not dobin'd.
+ exeinto "/usr/share/php/${MY_PN}/bin"
+ for script in phpcbf phpcs; do
+ doexe "bin/${script}"
+ dosym "../share/php/${MY_PN}/bin/${script}" "/usr/bin/${script}"
+ done
+
+ einstalldocs
+}
+
+src_test() {
+ # The test suite will fail if date.timezone isn't set in php.ini.
+ phpunit -d date.timezone=UTC tests/AllTests.php \
+ || die "test suite failed"
+}