summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2019-04-24 15:27:28 -0400
committerBrian Evans <grknight@gentoo.org>2019-04-24 15:45:36 -0400
commit199a2e82e0dcff8c0441974025a8da9bef320716 (patch)
tree58bdbf4a3b2d09e21c216cf56361baf1810f7fc6 /dev-php
parentnet-voip/telepathy-gabble: Drop 0.18.4 (r0) (diff)
downloadgentoo-199a2e82e0dcff8c0441974025a8da9bef320716.tar.gz
gentoo-199a2e82e0dcff8c0441974025a8da9bef320716.tar.bz2
gentoo-199a2e82e0dcff8c0441974025a8da9bef320716.zip
dev-php/PHP_CodeSniffer: Version bump for 3.4.2
Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/PHP_CodeSniffer/Manifest1
-rw-r--r--dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.4.2.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-php/PHP_CodeSniffer/Manifest b/dev-php/PHP_CodeSniffer/Manifest
index 444a358b9c9f..b36e7ce453da 100644
--- a/dev-php/PHP_CodeSniffer/Manifest
+++ b/dev-php/PHP_CodeSniffer/Manifest
@@ -1 +1,2 @@
DIST PHP_CodeSniffer-3.2.1.tgz 554343 BLAKE2B a43e253e7cdf6085ff1cfdec110878c99b61a69d80415a40cf670b7ce9ddce82f7254c34995c67084d5aa7aef8d775e6cfef5e9fcab90771f09244c1442e319d SHA512 69a4d70c6a567d262142f7f3d42507a7501ca3d5213f5b90d5893863e3d75e947a7b41e8bb08e85975677b606522b8f73df33dd35cde85c28016389f3c2ae63c
+DIST PHP_CodeSniffer-3.4.2.tgz 637880 BLAKE2B 1c919f92f0b3532f3568014a923bb644a845950587972d12c5e02885b3e8e4b2c334bd7ee8412ebc84527072b64737ea3c59ad3ba145a597ef8cfd71360717e9 SHA512 6236e3f9899d8f4637314f359a8db44835140d0292ea02b56b5e2e55ea8739841648ee03c3f25bf4df64577237b6bc1c3d0999d5452b9f292ef019347ecd41f5
diff --git a/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.4.2.ebuild b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.4.2.ebuild
new file mode 100644
index 000000000000..1db0183b7492
--- /dev/null
+++ b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.4.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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"
+
+RDEPEND="dev-lang/php:*[cli,tokenizer,xmlwriter]"
+DEPEND="test? ( >=dev-php/phpunit-4 ${RDEPEND} )"
+
+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"
+}