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