diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2017-01-19 19:12:29 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2017-01-19 19:12:46 -0500 |
commit | c6e61c1e57365284b061ade8fd66ec9cd4ebfb25 (patch) | |
tree | c938c19976c0cca32b5d8b19c5b29ca74a075187 /dev-php/PEAR-Console_CommandLine/PEAR-Console_CommandLine-1.2.2.ebuild | |
parent | sys-apps/shadow: Make gettext DEPEND unconditional (diff) | |
download | gentoo-c6e61c1e57365284b061ade8fd66ec9cd4ebfb25.tar.gz gentoo-c6e61c1e57365284b061ade8fd66ec9cd4ebfb25.tar.bz2 gentoo-c6e61c1e57365284b061ade8fd66ec9cd4ebfb25.zip |
dev-php/PEAR-Console_CommandLine: new version 1.2.2.
This new version drops the php-pear-r1 eclass in exchange for a few
fixes. The documentation (examples) are now installed in the correct
location, behind USE=examples. The xmlschema.rng data file is
installed outside of the PHP include directory, since it is not
included by PHP code. And finally, the (working) test suite has been
enabled.
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-php/PEAR-Console_CommandLine/PEAR-Console_CommandLine-1.2.2.ebuild')
-rw-r--r-- | dev-php/PEAR-Console_CommandLine/PEAR-Console_CommandLine-1.2.2.ebuild | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-php/PEAR-Console_CommandLine/PEAR-Console_CommandLine-1.2.2.ebuild b/dev-php/PEAR-Console_CommandLine/PEAR-Console_CommandLine-1.2.2.ebuild new file mode 100644 index 000000000000..569e460bd273 --- /dev/null +++ b/dev-php/PEAR-Console_CommandLine/PEAR-Console_CommandLine-1.2.2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +MY_PN="${PN/PEAR-/}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="A full-featured command-line options and arguments parser" +HOMEPAGE="http://pear.php.net/package/${MY_PN}" +SRC_URI="http://download.pear.php.net/package/${MY_P}.tgz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="examples test" + +# Only needs PEAR_Exception (not yet packaged) -- not all of PEAR-PEAR. +RDEPEND="dev-lang/php:* + dev-php/PEAR-PEAR" + +# Beware, the test suite really needs PEAR-PEAR. +DEPEND="test? ( ${RDEPEND} )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # There's one occurrence of @data_dir@ that needs to be replaced + # This location just has to agree with where we put the "data" + # directory during src_install(). + default + sed -i "s|@data_dir@|${EPREFIX}/usr/share|" \ + Console/CommandLine/XmlParser.php || die +} + +src_install() { + use examples && dodoc -r docs/examples + + insinto "/usr/share/${MY_PN}" + doins -r data + + insinto /usr/share/php + doins -r Console +} + +src_test() { + # Requires the "pear" executable from dev-php/PEAR-PEAR. + pear run-tests tests || die + + # The command succeeds regardless of whether or not the test suite + # passed, but this file is only written when there was a failure. + [[ -f run-tests.log ]] && die "test suite failed" +} |