diff options
author | 2021-10-15 16:12:16 +0200 | |
---|---|---|
committer | 2021-10-15 16:33:01 +0200 | |
commit | 8040f44e11fb956c0b02531bf168343d97c5a699 (patch) | |
tree | d1645c1a1bb5cd1e847a2847b556dcc23e6cb8e6 /dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.1.ebuild | |
parent | dev-php/phpspec-prophecy: bump to v1.14.0 (diff) | |
download | gentoo-8040f44e11fb956c0b02531bf168343d97c5a699.tar.gz gentoo-8040f44e11fb956c0b02531bf168343d97c5a699.tar.bz2 gentoo-8040f44e11fb956c0b02531bf168343d97c5a699.zip |
dev-php/PHP_CodeSniffer: bump to v3.6.1
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.1.ebuild')
-rw-r--r-- | dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.1.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.1.ebuild b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.1.ebuild new file mode 100644 index 000000000000..f15c9ff98ca6 --- /dev/null +++ b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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" +RESTRICT="!test? ( test )" + +RDEPEND="dev-lang/php:*[cli(-),tokenizer(-),xmlwriter(-)]" +DEPEND="test? ( + ${RDEPEND} + <dev-php/phpunit-6 + )" + +DOCS=( CONTRIBUTING.md README.md ) + +src_prepare() { + sed -i "s~@data_dir@~${EPREFIX}/usr/share/php/data~" src/Config.php || die + default +} + +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" +} + +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 +} |