diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-php/PEAR-PHP_Beautifier | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-php/PEAR-PHP_Beautifier')
4 files changed, 110 insertions, 0 deletions
diff --git a/dev-php/PEAR-PHP_Beautifier/Manifest b/dev-php/PEAR-PHP_Beautifier/Manifest new file mode 100644 index 000000000000..eb744b8ca11f --- /dev/null +++ b/dev-php/PEAR-PHP_Beautifier/Manifest @@ -0,0 +1,4 @@ +AUX use_default_error_reporting.patch 1576 BLAKE2B 0e1deba63910c3466cae3751bba060f58033772eb8a8ee9d09aee2c8a073a2b40f089ed6cd75ca82d1005d27fcc30f5b7c0585fa73bad28be5eb172be45444e2 SHA512 f1e6c53c9dda6d15ea5609e07986d3ed8206152b554cdb2ad20c702128d8b3a9e757f3fcc2ef2c6e9ef7501ca169786301261bd6fb4bc57d946322853d20c2c8 +DIST PHP_Beautifier-0.1.15.tgz 74408 BLAKE2B 9d9a59175b404592d43b2539f47bb33807c23268408e88d570974633f17c3bbd2a05909c80ec966df73e7571a23462a93ec789da14fad80d0361b4a2dea43bf6 SHA512 1e2c7060295c6a13424339e7d45a5dfa9b02749baeb96f8efe55b4951243a3285ddffc815ad0432aec7a710646bdae33bd40abe723faf4ff35a50dad2258efd6 +EBUILD PEAR-PHP_Beautifier-0.1.15-r2.ebuild 1087 BLAKE2B a5e216ab541c8fe31e9f93a373f76fdb7708960d3c3537404491c563f8262966c6515ca1d8c6e101a8e50bb2556f03c6e73628ddcf1c977660291bcb3bd5f3e5 SHA512 94a57982857cc96268104bd74b4198f9aa9478d798bfe3b8c21066c2522b8dfea6365b61be70dc27073d69aa98ae40d99bdd06d9a29839cbbc8ec079f9d69aac +MISC metadata.xml 557 BLAKE2B 46eae5572188b52c50c0336f27a6ac551db7f603a68f7747fb82ad77808017a2faf19f8f55d3a52622f76a5563042b69db9af99b2378746aac945176b02a50bd SHA512 da17e6471c97a0ed98107a29a6569ecc69c54c1bf984eab09a3402858a18a69d7471ae55571bea4c9b84fae96ef8bde166c94a4b587327d7d20249cd06653e8f 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..933671ed3713 --- /dev/null +++ b/dev-php/PEAR-PHP_Beautifier/PEAR-PHP_Beautifier-0.1.15-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 +} diff --git a/dev-php/PEAR-PHP_Beautifier/files/use_default_error_reporting.patch b/dev-php/PEAR-PHP_Beautifier/files/use_default_error_reporting.patch new file mode 100644 index 000000000000..cf1019b3399c --- /dev/null +++ b/dev-php/PEAR-PHP_Beautifier/files/use_default_error_reporting.patch @@ -0,0 +1,44 @@ +From 39e6b5605bd15db6a1f2f223dede9c8d2265140c Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Mon, 9 Jan 2017 22:34:30 -0500 +Subject: [PATCH 1/1] Use the default PHP error_reporting value. + +The php_beautifier script triggers some strict/deprecation warnings +with newer versions of PHP. With error_reporting = E_ALL, they are +shown to the user. Instead, we can at least respect the default +value of error_reporting from php.ini which (on Gentoo, anyway) +hides strict/deprecation warnings. +--- + Beautifier.php | 2 +- + scripts/php_beautifier | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Beautifier.php b/Beautifier.php +index 584ac4d..90d8d0b 100755 +--- a/Beautifier.php ++++ b/Beautifier.php +@@ -19,7 +19,7 @@ + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id:$ + */ +-error_reporting(E_ALL); ++// error_reporting(E_ALL); + // Before all, test the tokenizer extension + if (!extension_loaded('tokenizer')) { + throw new Exception("Compile php with tokenizer extension. Use --enable-tokenizer or don't use --disable-all on configure."); +diff --git a/scripts/php_beautifier b/scripts/php_beautifier +index 255a264..6e87f4e 100755 +--- a/scripts/php_beautifier ++++ b/scripts/php_beautifier +@@ -52,7 +52,7 @@ + */ + require_once 'PHP/Beautifier/Batch.php'; + define('PHP_Beautifier_WINDOWS', substr(PHP_OS, 0, 3) == 'WIN'); +- error_reporting(E_ALL); ++ // error_reporting(E_ALL); + // get log object + $oLog = PHP_Beautifier_Common::getLog(); + +-- +2.10.2 + diff --git a/dev-php/PEAR-PHP_Beautifier/metadata.xml b/dev-php/PEAR-PHP_Beautifier/metadata.xml new file mode 100644 index 000000000000..6ef7bb57383b --- /dev/null +++ b/dev-php/PEAR-PHP_Beautifier/metadata.xml @@ -0,0 +1,18 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>php-bugs@gentoo.org</email> + <name>PHP</name> + </maintainer> + <use> + <flag name="cli"> + Require <pkg>dev-lang/php</pkg> to be built with the "cli" SAPI + and install the php_beautifier script. + </flag> + </use> + <upstream> + <remote-id type="github">clbustos/PHP_Beautifier</remote-id> + <remote-id type="pear">PHP_Beautifier</remote-id> + </upstream> +</pkgmetadata> |