diff options
author | 2016-08-05 16:45:13 -0400 | |
---|---|---|
committer | 2016-08-05 16:48:12 -0400 | |
commit | d20f220823a60f0eb2bffeb8d8583ea76bce3917 (patch) | |
tree | 3466529678d393975ef3e2084db2be960b168b7b /dev-php/PHP_CodeSniffer/PHP_CodeSniffer-2.6.2-r2.ebuild | |
parent | games-mud/tf: fix PATCHES variable not to use glob on DISTDIR (diff) | |
download | gentoo-d20f220823a60f0eb2bffeb8d8583ea76bce3917.tar.gz gentoo-d20f220823a60f0eb2bffeb8d8583ea76bce3917.tar.bz2 gentoo-d20f220823a60f0eb2bffeb8d8583ea76bce3917.zip |
dev-php/PEAR-PHP_CodeSniffer: rename to dev-php/PHP_CodeSniffer.
Gentoo-Bug: 575422
Diffstat (limited to 'dev-php/PHP_CodeSniffer/PHP_CodeSniffer-2.6.2-r2.ebuild')
-rw-r--r-- | dev-php/PHP_CodeSniffer/PHP_CodeSniffer-2.6.2-r2.ebuild | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-2.6.2-r2.ebuild b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-2.6.2-r2.ebuild new file mode 100644 index 000000000000..ef6e783c8e65 --- /dev/null +++ b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-2.6.2-r2.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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_install() { + # The PEAR eclass would install everything into the wrong location. + insinto "/usr/share/${PN}" + doins -r CodeSniffer CodeSniffer.php + + # These load code via relative paths, so they have to be symlinked + # and not dobin'd. + exeinto "/usr/share/${PN}/scripts" + for script in phpcbf phpcs; do + doexe "scripts/${script}" + dosym "/usr/share/${PN}/scripts/${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" +} |