dev-php/zetacomponents-ConsoleTools - 9999 (nest)

Search

Install

Install this version:

emerge -a =dev-php/zetacomponents-ConsoleTools-9999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-php/zetacomponents-ConsoleTools-9999

Or alternatively:

emerge --autounmask-write -a =dev-php/zetacomponents-ConsoleTools-9999

Package Information

Description:
A set of classes to do different actions with the console
Homepage:
https://github.com/zetacomponents/ConsoleTools
License:
Apache-2.0

Ebuild Details

Version EAPI Keywords Slot
9999 9 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=9

COMPOSER_INSTALL_PATH="ezc/ConsoleTools"
PHP_REQ_USE="iconv(-)"

inherit composer git-r3

DESCRIPTION="A set of classes to do different actions with the console"
HOMEPAGE="https://github.com/zetacomponents/ConsoleTools"
EGIT_REPO_URI="https://github.com/zetacomponents/ConsoleTools.git"

LICENSE="Apache-2.0"
SLOT="0"

RDEPEND="dev-php/zetacomponents-Base"
BDEPEND="dev-php/theseer-Autoload
	test? ( dev-php/zetacomponents-UnitTest )"

PATCHES=( "${FILESDIR}/${PN}"-1.7.5-tests-bootstrap.patch
	"${FILESDIR}/${PN}"-1.7.5-tests-dialog_test.patch
	"${FILESDIR}/${PN}"-1.7.5-tests-phpunit.xml.patch
	"${FILESDIR}/${PN}"-1.7.5-tests-string_tools_test.patch )

composer_enable_tests phpunit

src_prepare() {
	composer_src_prepare

	edo phpab -q -o src/autoload.php -t "${FILESDIR}"/autoload.php.tpl src

	# PHPUnit 12 requires test filenames to match their class names.
	# rename legacy Zeta Components tests and update PHPUnit discovery.
	local file class
	for file in tests/*_test.php ; do
		class=$(sed -nE 's/^(abstract )?class (ezc[^ ]+Test) extends .*/\2/p' "${file}")
		[[ -n ${class} ]] || die "missing test class in ${file}"
		mv "${file}" tests/"${class}".php || die "mv failed for ${class}.php"
	done

	sed -i '/suffix="/s|_test|Test|' phpunit.xml.dist || die "sed failed for phpunit.xml.dist"
}

src_test() {
	ephpunit
}

Inherited Eclasses

Dependencies

RDEPEND

dev-php/zetacomponents-Base

BDEPEND

dev-php/theseer-Autoload
	test? ( dev-php/zetacomponents-UnitTest )