diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2017-01-09 23:07:38 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2017-01-09 23:32:47 -0500 |
commit | c122fda674ae055121fecd550bb3d814d76ae4f2 (patch) | |
tree | 9c2b29b82f3a2a5865caaa8f68c7f3bcfc0be32e /dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild | |
parent | app-misc/ranger: version bump to 1.8.1 (diff) | |
download | gentoo-c122fda674ae055121fecd550bb3d814d76ae4f2.tar.gz gentoo-c122fda674ae055121fecd550bb3d814d76ae4f2.tar.bz2 gentoo-c122fda674ae055121fecd550bb3d814d76ae4f2.zip |
dev-php/PEAR-PHP_Beautifier: new revision sans the php-pear-r1 eclass.
This new revision drops the php-pear-r1 eclass in order to fix some
otherwise-unfixable issues. First, the ebuild has been updated to
EAPI=6; that one was easy. Two new USE flags to enable the CLI and
installation of the examples were added -- that and the removal
of the eclass caused some RDEPEND changes.
We now have custom src_prepare() and src_install() phases:
* In src_prepare, we replace the strings @package_version@ and
@php_bin@ everywhere in the source code using sed. We also
apply a new patch to use the default error_reporting, which
hides a bunch of ugly errors.
* The src_install phase now installs the examples to the proper
location, and only installs the CLI script with USE=cli.
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild')
-rw-r--r-- | dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild b/dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild new file mode 100644 index 000000000000..0e6cb5d43163 --- /dev/null +++ b/dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild @@ -0,0 +1,45 @@ +# 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="Code Beautifier for PHP" +HOMEPAGE="http://pear.php.net/package/${MY_PN}" +SRC_URI="http://download.pear.php.net/package/${MY_P}.tgz" +LICENSE="PHP-3.01" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cli examples" + +# Require automagic dependencies unconditionally to avoid surprises. +RDEPEND="dev-lang/php:*[bzip2,cli?,tokenizer] + dev-php/PEAR-Archive_Tar + dev-php/PEAR-Log + dev-php/PEAR-PEAR + cli? ( dev-php/PEAR-Console_Getopt )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}/use_default_error_reporting.patch" ) + +src_prepare() { + default + shopt -s globstar + for file in scripts/php_beautifier **/*.php; do + sed -i "s|@package_version@|${PV}|g" "${file}" || die + sed -i "s|@php_bin@|${EPREFIX}/usr/bin/php|g" "${file}" || die + done + shopt -u globstar +} + +src_install() { + insinto /usr/share/php/PHP + doins Beautifier.php + doins -r Beautifier + use examples && dodoc -r examples + use cli && dobin scripts/php_beautifier +} |