# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards." HOMEPAGE="https://github.com/squizlabs/PHP_CodeSniffer" SRC_URI="https://github.com/squizlabs/PHP_CodeSniffer/archive/refs/tags/${PV}.tar.gz -> ${PN}-${PV}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~arm64" RDEPEND="dev-lang/php[tokenizer,xmlwriter,simplexml] dev-php/symfony-yaml" MY_PN="PHP/CodeSniffer" src_prepare() { default sed -i "s~@data_dir@\(/PHP_CodeSniffer\)\?~${EPREFIX}/usr/share/php/data/${MY_PN}~" src/Config.php || die # Yaml support is expected by Drupal Coder cat >> autoload.php <