summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-12-19 09:03:49 -0500
committerBrian Evans <grknight@gentoo.org>2017-12-19 09:03:49 -0500
commit532322e487fe9de6d7221333d83192d37a4d21e6 (patch)
tree87be5006ffa58a310ca5e30a54b5d3a78ca11676 /dev-php
parentnet-libs/nodejs: Update dev-libs/icu dependency. (diff)
downloadgentoo-532322e487fe9de6d7221333d83192d37a4d21e6.tar.gz
gentoo-532322e487fe9de6d7221333d83192d37a4d21e6.tar.bz2
gentoo-532322e487fe9de6d7221333d83192d37a4d21e6.zip
dev-php/PHP_CodeSniffer: Version bump for 3.2.1
Package-Manager: Portage-2.3.18, Repoman-2.3.6
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/PHP_CodeSniffer/Manifest1
-rw-r--r--dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.2.1.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-php/PHP_CodeSniffer/Manifest b/dev-php/PHP_CodeSniffer/Manifest
index 67d8c8af434..c9d24934020 100644
--- a/dev-php/PHP_CodeSniffer/Manifest
+++ b/dev-php/PHP_CodeSniffer/Manifest
@@ -1,2 +1,3 @@
DIST PHP_CodeSniffer-2.6.2.tgz 497234 BLAKE2B 66479e8371f2fe9bdf48acc1c459239b3c7a79a598d486737ff1d41265f992d376ada660bb12fa605fb838b0620a7fedac2c13d50827b61108c0ca9eac191552 SHA512 8e74ca2035f25647c836c6cacb6da6c1a3d0d280077cc6b31f5abf01843546c7370a96cba4f3a1b56fe8bac6954e10ce6570352ae67b14f717bab6a30bd2c865
DIST PHP_CodeSniffer-3.0.2.tgz 529486 BLAKE2B 569de0abec306663ac94876bde3bcda3aca4409b2f74558c72b986a18f08c98e3a365b11d47d11986084d9b7da87caae3594ab412bab6be5aabd3c9b6e769f7b SHA512 ff32e6e88be1927a662f2d1d453f9c071220e168007ccc3ec7cfd3e766ea68ea0c69d537aa37ddb75d103792d1877e0af2d4710f8f6c6d4e957f0d4c482db68c
+DIST PHP_CodeSniffer-3.2.1.tgz 554343 BLAKE2B a43e253e7cdf6085ff1cfdec110878c99b61a69d80415a40cf670b7ce9ddce82f7254c34995c67084d5aa7aef8d775e6cfef5e9fcab90771f09244c1442e319d SHA512 69a4d70c6a567d262142f7f3d42507a7501ca3d5213f5b90d5893863e3d75e947a7b41e8bb08e85975677b606522b8f73df33dd35cde85c28016389f3c2ae63c
diff --git a/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.2.1.ebuild b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.2.1.ebuild
new file mode 100644
index 00000000000..c460fcdcb74
--- /dev/null
+++ b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.2.1.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"
+}