diff options
author | Brian Evans <grknight@gentoo.org> | 2016-07-18 08:59:30 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2016-07-18 08:59:30 -0400 |
commit | dcd2809c9842029520fc6fce8cbbfa8b23ce172c (patch) | |
tree | 92d262404419ea28b4dcac52eae7653accee845c /dev-php | |
parent | net-ftp/lftp: Old. (diff) | |
download | gentoo-dcd2809c9842029520fc6fce8cbbfa8b23ce172c.tar.gz gentoo-dcd2809c9842029520fc6fce8cbbfa8b23ce172c.tar.bz2 gentoo-dcd2809c9842029520fc6fce8cbbfa8b23ce172c.zip |
dev-php/PEAR-PHP_CodeSniffer: Revbump to remove PEAR eclass
As per mjo's comments on IRC, this package may be better off
in its own namepace. None of the includes are meant to be used outside
of the script
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-php')
-rw-r--r-- | dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2-r1.ebuild | 48 | ||||
-rw-r--r-- | dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2.ebuild | 29 |
2 files changed, 48 insertions, 29 deletions
diff --git a/dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2-r1.ebuild b/dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2-r1.ebuild new file mode 100644 index 000000000000..7ef39e92be1e --- /dev/null +++ b/dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +# Can go if we ever drop the "PEAR-" prefix. +MY_PN="${PN#PEAR-}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Detect violations of PHP code standards" +HOMEPAGE="https://github.com/squizlabs/PHP_CodeSniffer" + +SRC_URI="http://download.pear.php.net/package/${MY_P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND="test? ( >=dev-php/phpunit-4 )" +RDEPEND="dev-lang/php:*[cli,tokenizer,xmlwriter]" + +# Can go if we ever drop the "PEAR-" prefix. +S="${WORKDIR}/${MY_P}" + +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" +} diff --git a/dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2.ebuild b/dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2.ebuild deleted file mode 100644 index 9889ea6294ac..000000000000 --- a/dev-php/PEAR-PHP_CodeSniffer/PEAR-PHP_CodeSniffer-2.6.2.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# 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" - -inherit php-pear-r1 - -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() { - php-pear-r1_src_install - einstalldocs -} - -src_test() { - phpunit "${S}/tests/AllTests.php" || die "test suite failed" -} |