From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B052A139694 for ; Fri, 24 Feb 2017 14:14:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E62BA21C028; Fri, 24 Feb 2017 14:14:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B265821C028 for ; Fri, 24 Feb 2017 14:14:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77E9E340F53 for ; Fri, 24 Feb 2017 14:14:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D800C5303 for ; Fri, 24 Feb 2017 14:14:15 +0000 (UTC) From: "Marius Brehler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marius Brehler" Message-ID: <1487945581.2e0e40872ac17823e19daeb038e53699a287c200.marbre@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: eclass/ X-VCS-Repository: proj/sci X-VCS-Files: eclass/depend.php.eclass X-VCS-Directories: eclass/ X-VCS-Committer: marbre X-VCS-Committer-Name: Marius Brehler X-VCS-Revision: 2e0e40872ac17823e19daeb038e53699a287c200 X-VCS-Branch: master Date: Fri, 24 Feb 2017 14:14:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d9ed3a3d-8ec0-490e-9123-899f99ecea31 X-Archives-Hash: 9cdf189547d4726ced9c879e2226fca9 commit: 2e0e40872ac17823e19daeb038e53699a287c200 Author: Marius Brehler linux sungazer de> AuthorDate: Fri Feb 24 14:13:01 2017 +0000 Commit: Marius Brehler linux sungazer de> CommitDate: Fri Feb 24 14:13:01 2017 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=2e0e4087 Revert "depend.php.eclass: Import from main tree, required by ganglia_jobmonarch" This reverts commit 1c70956ce252680df94134953d0c4dae97223cc9. eclass/depend.php.eclass | 258 ----------------------------------------------- 1 file changed, 258 deletions(-) diff --git a/eclass/depend.php.eclass b/eclass/depend.php.eclass deleted file mode 100644 index c29cda22c..000000000 --- a/eclass/depend.php.eclass +++ /dev/null @@ -1,258 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# @DEAD -# @ECLASS: depend.php.eclass -# @MAINTAINER: -# Gentoo PHP team -# @AUTHOR: -# Author: Stuart Herbert -# Author: Luca Longinotti -# Author: Jakub Moc (documentation) -# @BLURB: Functions to allow ebuilds to depend on php5 and check for specific features. -# @DESCRIPTION: -# This eclass provides functions that allow ebuilds to depend on php5 and check -# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install -# documentation for PHP packages to php-specific location. -# This eclass is deprecated and is set to be removed 30 days after bug 552836 is resolved - -inherit eutils multilib - -# PHP5-only depend functions - -# @FUNCTION: need_php5 -# @DESCRIPTION: -# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5 -# (with any SAPI). -need_php5() { - DEPEND="${DEPEND} =dev-lang/php-5*" - RDEPEND="${RDEPEND} =dev-lang/php-5*" - PHP_VERSION="5" - PHP_SHARED_CAT="php5" -} - -# common settings go in here -uses_php5() { - # cache this - libdir=$(get_libdir) - - PHPIZE="/usr/${libdir}/php5/bin/phpize" - PHPCONFIG="/usr/${libdir}/php5/bin/php-config" - PHPCLI="/usr/${libdir}/php5/bin/php" - PHPCGI="/usr/${libdir}/php5/bin/php-cgi" - PHP_PKG="$(best_version =dev-lang/php-5*)" - PHPPREFIX="/usr/${libdir}/php5" - EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" - - einfo - einfo "Using ${PHP_PKG}" - einfo -} - -# general PHP depend functions - -# @FUNCTION: need_php_httpd -# @DESCRIPTION: -# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP -# (any version) with either cgi or apache2 SAPI. -need_php_httpd() { - DEPEND="${DEPEND} virtual/httpd-php" - RDEPEND="${RDEPEND} virtual/httpd-php" -} - -# @FUNCTION: need_php -# @DESCRIPTION: -# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP -# (any version with any SAPI). -need_php() { - DEPEND="${DEPEND} dev-lang/php" - RDEPEND="${RDEPEND} dev-lang/php" - PHP_SHARED_CAT="php" -} - -# @FUNCTION: has_php -# @DESCRIPTION: -# Call this function from your pkg_setup, src_compile, src_install etc. if you -# need to know which PHP version is being used and where the PHP binaries/data -# are installed. -has_php() { - # Detect which PHP version we have installed - if has_version '=dev-lang/php-5*' ; then - PHP_VERSION="5" - else - die "Unable to find an installed dev-lang/php package" - fi - - # If we get here, then PHP_VERSION tells us which version of PHP we - # want to use - uses_php${PHP_VERSION} -} - -# @FUNCTION: require_php_with_use -# @USAGE: -# @DESCRIPTION: -# Call this function from pkg_setup if your package requires PHP compiled -# with specific USE flags. Returns if all of the listed USE flags are enabled. -# Dies if any of the listed USE flags are disabled. - -# @VARIABLE: PHPCHECKNODIE -# @DESCRIPTION: -# You can set PHPCHECKNODIE to non-empty value in your ebuild to chain multiple -# require_php_with_(any)_use checks without making the ebuild die on every failure. -# This is useful in cases when certain PHP features are only required if specific -# USE flag(s) are enabled for that ebuild. -# @CODE -# Example: -# -# local flags="pcre session snmp sockets wddx" -# use mysql && flags="${flags} mysql" -# use postgres && flags="${flags} postgres" -# if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} \ -# || ! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ; then -# die "Re-install ${PHP_PKG} with ${flags} and either gd or gd-external" -# fi -# @CODE -require_php_with_use() { - has_php - - local missing_use="" - local x - - einfo "Checking for required PHP feature(s) ..." - - for x in $@ ; do - case $x in - pcre|spl|reflection|mhash) - eqawarn "require_php_with_use MUST NOT check for the pcre, spl, mhash or reflection USE flag." - eqawarn "These USE flags are removed from >=dev-lang/php-5.3 and your ebuild will break" - eqawarn "if you check the USE flags against PHP 5.3 ebuilds." - eqawarn "Please use USE dependencies from EAPI 2 instead" - ;; - esac - - if ! built_with_use =${PHP_PKG} ${x} ; then - einfo " Discovered missing USE flag: ${x}" - missing_use="${missing_use} ${x}" - fi - done - - if [[ -z "${missing_use}" ]] ; then - if [[ -z "${PHPCHECKNODIE}" ]] ; then - return - else - return 0 - fi - fi - - if [[ -z "${PHPCHECKNODIE}" ]] ; then - eerror - eerror "${PHP_PKG} needs to be re-installed with all of the following" - eerror "USE flags enabled:" - eerror - eerror " $@" - eerror - die "Missing PHP USE flags found" - else - return 1 - fi -} - - -# ======================================================================== -# require_*() functions -# -# These functions die() if PHP was built without the required features -# ======================================================================== - -# @FUNCTION: require_php_cgi -# @DESCRIPTION: -# Determines which installed PHP version has the CGI SAPI enabled. -# Useful for anything which needs to run PHP scripts depending on the CGI SAPI. -# @RETURN: die if feature is missing -require_php_cgi() { - # If PHP_PKG is set, then we have remembered our PHP settings - # from last time - if [[ -n ${PHP_PKG} ]] ; then - return - fi - - local PHP_PACKAGE_FOUND="" - - if has_version '=dev-lang/php-5*' ; then - PHP_PACKAGE_FOUND="1" - pkg="$(best_version '=dev-lang/php-5*')" - if built_with_use =${pkg} cgi ; then - PHP_VERSION="5" - fi - fi - - if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then - die "Unable to find an installed dev-lang/php package" - fi - - if [[ -z ${PHP_VERSION} ]] ; then - die "No PHP CGI installed. Re-emerge dev-lang/php with USE=cgi." - fi - - # If we get here, then PHP_VERSION tells us which version of PHP we - # want to use - uses_php${PHP_VERSION} -} - -# ======================================================================== -# Misc functions -# -# These functions provide miscellaneous checks and functionality. -# ======================================================================== - -# @FUNCTION: dodoc-php -# @USAGE: -# @DESCRIPTION: -# Alternative to dodoc function for use in our PHP eclasses and ebuilds. -# Stored here because depend.php gets always sourced everywhere in the PHP -# ebuilds and eclasses. It simply is dodoc with a changed path to the docs. -# NOTE: No support for docinto is provided! -dodoc-php() { -if [[ $# -lt 1 ]] ; then - echo "$0: at least one argument needed" 1>&2 - exit 1 -fi - -phpdocdir="/usr/share/doc/${CATEGORY}/${PF}/" - -for x in $@ ; do - if [[ -s "${x}" ]] ; then - insinto "${phpdocdir}" - doins "${x}" - gzip -f -9 "${D}/${phpdocdir}/${x##*/}" - elif [[ ! -e "${x}" ]] ; then - echo "dodoc-php: ${x} does not exist" 1>&2 - fi -done -} - -# @FUNCTION: dohtml-php -# @USAGE: -# @DESCRIPTION: -# Alternative to dohtml function for use in our PHP eclasses and ebuilds. -# Stored here because depend.php gets always sourced everywhere in the PHP -# ebuilds and eclasses. It simply is dohtml with a changed path to the docs. -# NOTE: No support for [-a|-A|-p|-x] options is provided! -dohtml-php() { -if [[ $# -lt 1 ]] ; then - echo "$0: at least one argument needed" 1>&2 - exit 1 -fi - -phphtmldir="/usr/share/doc/${CATEGORY}/${PF}/html" - -for x in $@ ; do - if [[ -s "${x}" ]] ; then - insinto "${phphtmldir}" - doins "${x}" - elif [[ ! -e "${x}" ]] ; then - echo "dohtml-php: ${x} does not exist" 1>&2 - fi -done -}