Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/PHP_CodeSniffer/
Date: Tue, 18 May 2021 18:59:29
Message-Id: 1621364359.19ad084e85526f92f6acb21d03380103d0884663.whissi@gentoo
1 commit: 19ad084e85526f92f6acb21d03380103d0884663
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 18 18:59:19 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue May 18 18:59:19 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ad084e
7
8 dev-php/PHP_CodeSniffer: bump to v3.6.0
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 dev-php/PHP_CodeSniffer/Manifest | 1 +
14 .../PHP_CodeSniffer/PHP_CodeSniffer-3.6.0.ebuild | 55 ++++++++++++++++++++++
15 2 files changed, 56 insertions(+)
16
17 diff --git a/dev-php/PHP_CodeSniffer/Manifest b/dev-php/PHP_CodeSniffer/Manifest
18 index 0e3aa95cb7f..43cfbe9df06 100644
19 --- a/dev-php/PHP_CodeSniffer/Manifest
20 +++ b/dev-php/PHP_CodeSniffer/Manifest
21 @@ -1,3 +1,4 @@
22 DIST PHP_CodeSniffer-3.5.4.tgz 697668 BLAKE2B f5915bcb73c0db0d8dcab3eda5ab647268888e490d244568f0d0e7fff38c4764cfe62fcc79dabe8095adcef56b1e6d0367d46c36b18d0c4e0fb04a048c697737 SHA512 3e8024aac18111741637f014629eeaf5863b2f080a673e5b379a676fafb69859d1889ae13289b0149a9810641b0a140123a970ae1178fcd2cf6da1c414233bfd
23 DIST PHP_CodeSniffer-3.5.6.tgz 706080 BLAKE2B 1d9d097e7c60f520973a0dff16e6b31c9e259599ded3f58ac6dda2f10419969b03c18d1ce7c38f19a0f3474b0d5cf4afc5abb889f820da0d5d9e8f0574a0a354 SHA512 392c162cc8cb8d8fe455990d7f358cc59f486d8083387dc3bf60af6ca7aa0e75b72ed337f624b08948d8060cc96bd2d03373b7508fb9179da6a4e6b83adf06a7
24 DIST PHP_CodeSniffer-3.5.8.tgz 716472 BLAKE2B e56efedc07a9db63eb2f135d9fef69bf055cef09c23dd9cd1e0efeed865d559b428e9aec06393b1ec1f58d32add92b2773c3d9ce33377f2441de0145560045a8 SHA512 69ef3d86520f541f492c955bd8158664c78aac6ecd4550f2b996f59d882d91f1bec81da9bbd106edc35c4f1a4c260ef2d9a56ec257fc0b4044047b902403065e
25 +DIST PHP_CodeSniffer-3.6.0.tgz 762998 BLAKE2B f83626a2a64dbb5c7ae2545368f1efdf74d87630720efe7466d9adfd6591cbcc95f2b74a17f54a935377519c6d909ba17f4056fff6d8f3870cefe782f32675dd SHA512 09c98ac460c6dc70637d2f4d81a1e46bdf742ee14d0b56032e8dbcaf7a0ff03f3fdb1abdf8144f664a33298cf397c732ba62027bcee41f1f4f740d12fa29f6a8
26
27 diff --git a/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.0.ebuild b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.0.ebuild
28 new file mode 100644
29 index 00000000000..ee16c9322ac
30 --- /dev/null
31 +++ b/dev-php/PHP_CodeSniffer/PHP_CodeSniffer-3.6.0.ebuild
32 @@ -0,0 +1,55 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +DESCRIPTION="Detect violations of PHP code standards"
39 +HOMEPAGE="https://github.com/squizlabs/PHP_CodeSniffer"
40 +
41 +# The test suite isn't part of the Github tarball at the moment. Keep an
42 +# eye on https://github.com/squizlabs/PHP_CodeSniffer/issues/548
43 +SRC_URI="http://download.pear.php.net/package/${P}.tgz"
44 +
45 +LICENSE="BSD"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE="test"
49 +RESTRICT="!test? ( test )"
50 +
51 +RDEPEND="dev-lang/php:*[cli(-),tokenizer(-),xmlwriter(-)]"
52 +DEPEND="test? (
53 + ${RDEPEND}
54 + <dev-php/phpunit-6
55 + )"
56 +
57 +DOCS=( CONTRIBUTING.md README.md )
58 +
59 +src_prepare() {
60 + sed -i "s~@data_dir@~${EPREFIX}/usr/share/php/data~" src/Config.php || die
61 + default
62 +}
63 +
64 +src_test() {
65 + # The test suite will fail if date.timezone isn't set in php.ini.
66 + phpunit -d date.timezone=UTC tests/AllTests.php \
67 + || die "test suite failed"
68 +}
69 +
70 +src_install() {
71 + local MY_PN="PHP/CodeSniffer" script
72 + # The PEAR eclass would install everything into the wrong location.
73 + insinto "/usr/share/php/${MY_PN}"
74 + doins -r src autoload.php
75 +
76 + insinto "/usr/share/php/data/${MY_PN}"
77 + doins CodeSniffer.conf.dist
78 + # These load code via relative paths, so they have to be symlinked
79 + # and not dobin'd.
80 + exeinto "/usr/share/php/${MY_PN}/bin"
81 + for script in phpcbf phpcs; do
82 + doexe "bin/${script}"
83 + dosym "../share/php/${MY_PN}/bin/${script}" "/usr/bin/${script}"
84 + done
85 +
86 + einstalldocs
87 +}