dev-php/PEAR-PHP_CodeSniffer: rename to dev-php/PHP_CodeSniffer.

Gentoo-Bug: 575422
This commit is contained in:
Michael Orlitzky
2016-08-05 16:45:13 -04:00
parent 4f91edf6fc
commit d20f220823
5 changed files with 2 additions and 57 deletions

View File

@@ -0,0 +1 @@
DIST PHP_CodeSniffer-2.6.2.tgz 497234 SHA256 f5c71941e254742130e22cd5ef48d3b06b486efbd1b3dbc7f2fa77acdeac650d SHA512 8e74ca2035f25647c836c6cacb6da6c1a3d0d280077cc6b31f5abf01843546c7370a96cba4f3a1b56fe8bac6954e10ce6570352ae67b14f717bab6a30bd2c865 WHIRLPOOL 558653b7ca61d65cdb20dc5e91b3b53f4de57e00aa399a58e798a497b5b1659241f946390817333621ed7e4737f6eda90088085b57e43832af24f7fd4a273a76

View File

@@ -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"
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>php-bugs@gentoo.org</email>
<name>PHP</name>
</maintainer>
</pkgmetadata>