summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMarkus Ullmann <jokey@gentoo.org>2007-09-01 15:58:17 +0000
committerMarkus Ullmann <jokey@gentoo.org>2007-09-01 15:58:17 +0000
commit8b31b61c63c5c257d20ddb40c4ec65d20b146fde (patch)
treeda426b11bb62a48619e066a356aa7e5515c36b85 /eclass
parentStable on ppc wrt bug 190796 (diff)
downloadgentoo-2-8b31b61c63c5c257d20ddb40c4ec65d20b146fde.tar.gz
gentoo-2-8b31b61c63c5c257d20ddb40c4ec65d20b146fde.tar.bz2
gentoo-2-8b31b61c63c5c257d20ddb40c4ec65d20b146fde.zip
Bunch of php eclass docification
Diffstat (limited to 'eclass')
-rw-r--r--eclass/depend.php.eclass211
-rw-r--r--eclass/php-common-r1.eclass28
-rw-r--r--eclass/php-ext-base-r1.eclass57
-rw-r--r--eclass/php-ext-pecl-r1.eclass25
-rw-r--r--eclass/php-ext-source-r1.eclass41
-rw-r--r--eclass/php-ezc.eclass19
-rw-r--r--eclass/php-lib-r1.eclass28
-rw-r--r--eclass/php-pear-r1.eclass30
-rw-r--r--eclass/phpconfutils.eclass24
9 files changed, 321 insertions, 142 deletions
diff --git a/eclass/depend.php.eclass b/eclass/depend.php.eclass
index fdf921fa3aaf..0abfb7ef3dd0 100644
--- a/eclass/depend.php.eclass
+++ b/eclass/depend.php.eclass
@@ -1,37 +1,49 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.20 2007/08/16 22:11:00 hoffie Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.21 2007/09/01 15:58:17 jokey Exp $
+
+# Author: Stuart Herbert <stuart@gentoo.org>
+# Author: Luca Longinotti <chtekk@gentoo.org>
+# Author: Jakub Moc <jakub@gentoo.org> (documentation)
+
+# @ECLASS: depend.php.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: Functions to allow ebuilds to depend on php[45] and check for specific features.
+# @DESCRIPTION:
+# This eclass provides functions that allow ebuilds to depend on php[45] and check
+# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install
+# documentation for PHP packages to php-specific location.
-# ========================================================================
-#
-# depend.php.eclass
-# Functions to allow ebuilds to depend on php4 and/or php5
-#
-# Author: Stuart Herbert
-# <stuart@gentoo.org>
-#
-# Author: Luca Longinotti
-# <chtekk@gentoo.org>
-#
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# ========================================================================
inherit eutils phpconfutils
# PHP4-only depend functions
+
+# @FUNCTION: need_php4_cli
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP4
+# with cli SAPI.
need_php4_cli() {
DEPEND="${DEPEND} =virtual/php-4*"
RDEPEND="${RDEPEND} =virtual/php-4*"
PHP_VERSION="4"
}
+# @FUNCTION: need_php4_httpd
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP4
+# with either cgi or apache2 SAPI.
need_php4_httpd() {
DEPEND="${DEPEND} =virtual/httpd-php-4*"
RDEPEND="${RDEPEND} =virtual/httpd-php-4*"
PHP_VERSION="4"
}
+# @FUNCTION: need_php4
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP4
+# (with any SAPI).
need_php4() {
DEPEND="${DEPEND} =dev-lang/php-4*"
RDEPEND="${RDEPEND} =dev-lang/php-4*"
@@ -58,18 +70,31 @@ uses_php4() {
}
# PHP5-only depend functions
+
+# @FUNCTION: need_php5_cli
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
+# with cli SAPI.
need_php5_cli() {
DEPEND="${DEPEND} =virtual/php-5*"
RDEPEND="${RDEPEND} =virtual/php-5*"
PHP_VERSION="5"
}
+# @FUNCTION: need_php5_httpd
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
+# with either cgi or apache2 SAPI.
need_php5_httpd() {
DEPEND="${DEPEND} =virtual/httpd-php-5*"
RDEPEND="${RDEPEND} =virtual/httpd-php-5*"
PHP_VERSION="5"
}
+# @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*"
@@ -96,22 +121,40 @@ uses_php5() {
}
# general PHP depend functions
+
+# @FUNCTION: need_php_cli
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
+# (any version) with cli SAPI.
need_php_cli() {
DEPEND="${DEPEND} virtual/php"
RDEPEND="${RDEPEND} virtual/php"
}
+# @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: need_php_by_category
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild to depend on PHP version
+# determined by ${CATEGORY} - any PHP version, PHP4 or PHP5 for dev-php, dev-php4 and
+# dev-php5, respectively.
need_php_by_category() {
case "${CATEGORY}" in
dev-php) need_php ;;
@@ -121,9 +164,12 @@ need_php_by_category() {
esac
}
-# Call this function from your pkg_setup, src_compile and src_install methods
-# if you need to know where the PHP binaries are installed and their data
+# @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() {
# If PHP_PKG is already set, then we have remembered our PHP settings
# from last time
@@ -147,14 +193,21 @@ has_php() {
uses_php${PHP_VERSION}
}
+# @FUNCTION: require_php_sapi_from
+# @USAGE: <list of SAPIs>
+# @DESCRIPTION:
# Call this function from pkg_setup if your package only works with
-# specific SAPIs
+# specific SAPI(s) and specify a list of PHP SAPI USE flags that are
+# required (one or more from cli, cgi, apache2) as arguments.
+# Returns if any of the listed SAPIs have been installed, dies if none
+# of them is available.
#
-# $1 ... a list of PHP SAPI USE flags (cli, cgi, apache2)
-#
-# Returns if any one of the listed SAPIs have been installed
-# Dies if none of the listed SAPIs have been installed
-
+# Unfortunately, if you want to be really sure that the required SAPI is
+# provided by PHP, you will have to use this function or similar ones (like
+# require_php_cli or require_php_cgi) in pkg_setup until we are able to
+# depend on USE flags being enabled. The above described need_php[45]_cli
+# and need_php[45]_httpd functions cannot guarantee these requirements.
+# See Bug 2272 for details.
require_php_sapi_from() {
has_php
@@ -183,14 +236,30 @@ require_php_sapi_from() {
die "No compatible PHP SAPIs found"
}
+# @FUNCTION: require_php_with_use
+# @USAGE: <list of USE flags>
+# @DESCRIPTION:
# Call this function from pkg_setup if your package requires PHP compiled
-# with specific USE flags
-#
-# $1 ... a list of USE flags
+# 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:
#
-# Returns if all of the listed USE flags are enabled
-# Dies if any of the listed USE flags are disabled
-
+# 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
@@ -227,14 +296,12 @@ require_php_with_use() {
fi
}
-# Call this function from pkg_setup if your package requires PHP compiled
-# with any of specified USE flags
-#
-# $1 ... a list of USE flags
-#
-# Returns if any of the listed USE flags are enabled
-# Dies if all of the listed USE flags are disabled
-
+# @FUNCTION: require_php_with_any_use
+# @USAGE: <list of USE flags>
+# @DESCRIPTION:
+# Call this function from pkg_setup if your package requires PHP compiled with
+# any of specified USE flags. Returns if any of the listed USE flags are enabled.
+# Dies if all of the listed USE flags are disabled.
require_php_with_any_use() {
has_php
@@ -279,8 +346,10 @@ require_php_with_any_use() {
# These functions return 0 if the condition is satisfied, 1 otherwise
# ========================================================================
-# Check if our PHP was compiled with ZTS (Zend Thread Safety) enabled
-
+# @FUNCTION: has_zts
+# @DESCRIPTION:
+# Check if our PHP was compiled with ZTS (Zend Thread Safety) enabled.
+# @RETURN: 0 if true, 1 otherwise
has_zts() {
has_php
@@ -291,8 +360,10 @@ has_zts() {
return 1
}
-# Check if our PHP was built with debug support enabled
-
+# @FUNCTION: has_debug
+# @DESCRIPTION:
+# Check if our PHP was built with debug support enabled.
+# @RETURN: 0 if true, 1 otherwise
has_debug() {
has_php
@@ -303,8 +374,10 @@ has_debug() {
return 1
}
-# Check if our PHP was built with the concurrentmodphp support enabled
-
+# @FUNCTION: has_concurrentmodphp
+# @DESCRIPTION:
+# Check if our PHP was built with the concurrentmodphp support enabled.
+# @RETURN: 0 if true, 1 otherwise
has_concurrentmodphp() {
has_php
@@ -321,8 +394,10 @@ has_concurrentmodphp() {
# These functions die() if PHP was built without the required features
# ========================================================================
-# Require a PHP built with PDO support (PHP5 only)
-
+# @FUNCTION: require_pdo
+# @DESCRIPTION:
+# Require a PHP built with PDO support (PHP5 only).
+# @RETURN: die if feature is missing
require_pdo() {
has_php
@@ -365,10 +440,12 @@ require_pdo() {
die "No PDO extension for PHP 5 found"
}
-# Determines which installed PHP version has the CLI SAPI enabled,
-# useful for PEAR stuff, or anything which needs to run PHP
-# scripts depending on the CLI SAPI
-
+# @FUNCTION: require_php_cli
+# @DESCRIPTION:
+# Determines which installed PHP version has the CLI SAPI enabled.
+# Useful for PEAR stuff, or anything which needs to run PHP script
+# depending on the CLI SAPI.
+# @RETURN: die if feature is missing
require_php_cli() {
# If PHP_PKG is set, then we have remembered our PHP settings
# from last time
@@ -408,10 +485,11 @@ require_php_cli() {
uses_php${PHP_VERSION}
}
-# Determines which installed PHP version has the CGI SAPI enabled,
-# useful for anything which needs to run PHP scripts
-# depending on the CGI SAPI
-
+# @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
@@ -451,8 +529,10 @@ require_php_cgi() {
uses_php${PHP_VERSION}
}
+# @FUNCTION: require_sqlite
+# @DESCRIPTION:
# Require a PHP built with SQLite support
-
+# @RETURN: die if feature is missing
require_sqlite() {
has_php
@@ -478,8 +558,10 @@ require_sqlite() {
die "No SQLite extension for PHP found"
}
+# @FUNCTION: require_gd
+# @DESCRIPTION:
# Require a PHP built with GD support
-
+# @RETURN: die if feature is missing
require_gd() {
has_php
@@ -510,8 +592,9 @@ require_gd() {
# These functions provide miscellaneous checks and functionality.
# ========================================================================
-# Executes some checks needed when installing a binary PHP extension
-
+# @FUNCTION: php_binary_extension
+# @DESCRIPTION:
+# Executes some checks needed when installing a binary PHP extension.
php_binary_extension() {
has_php
@@ -547,13 +630,13 @@ php_binary_extension() {
fi
}
-# 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 given!
-
+# @FUNCTION: dodoc-php
+# @USAGE: <list of docs>
+# @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
diff --git a/eclass/php-common-r1.eclass b/eclass/php-common-r1.eclass
index 2349bc1ad972..126b9c8a15d2 100644
--- a/eclass/php-common-r1.eclass
+++ b/eclass/php-common-r1.eclass
@@ -1,21 +1,19 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.10 2007/08/27 11:17:32 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.11 2007/09/01 15:58:17 jokey Exp $
+
+# Based on robbat2's work on the php4 sapi eclass
+# Based on stuart's work on the php5 sapi eclass
+
+# @ECLASS: php-common-r1.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: Common functions which are shared between the PHP4 and PHP5 packages.
+# @DESCRIPTION:
+# This eclass provides common functions which are shared between the PHP4 and PHP5 packages.
+# It is only used by php*-sapi eclasses currently and the functions are not intended
+# for direct use in ebuilds.
-# ========================================================================
-#
-# php-common-r1.eclass
-# Contains common functions which are shared between the
-# PHP4 and PHP5 packages
-#
-# USE THIS ECLASS FOR THE "CONSOLIDATED" PACKAGES
-#
-# Based on robbat2's work on the php4 sapi eclass
-# Based on stuart's work on the php5 sapi eclass
-#
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# ========================================================================
# ========================================================================
# CFLAG SANITY
diff --git a/eclass/php-ext-base-r1.eclass b/eclass/php-ext-base-r1.eclass
index 3750ec1b499f..0d4884c1e646 100644
--- a/eclass/php-ext-base-r1.eclass
+++ b/eclass/php-ext-base-r1.eclass
@@ -1,14 +1,19 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-base-r1.eclass,v 1.7 2007/05/12 02:54:35 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-base-r1.eclass,v 1.8 2007/09/01 15:58:17 jokey Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
# Author: Stuart Herbert <stuart@gentoo.org>
# Author: Luca Longinotti <chtekk@gentoo.org>
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# The php-ext-base-r1 eclass provides a unified interface for adding standalone
-# PHP extensions ('modules') to the php.ini files on your system.
+# Author: Jakub Moc <jakub@gentoo.org> (documentation)
+
+# @ECLASS: php-ext-base-r1.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: A unified interface for adding standalone PHP extensions.
+# @DESCRIPTION:
+# This eclass provides a unified interface for adding standalone
+# PHP extensions (modules) to the php.ini files on your system.
#
# Combined with php-ext-source-r1, we have a standardised solution for supporting
# PHP extensions.
@@ -17,17 +22,26 @@ inherit depend.php
EXPORT_FUNCTIONS src_install
-# The extension name, this must be set, otherwise we die
+# @ECLASS-VARIABLE: PHP_EXT_NAME
+# @DESCRIPTION:
+# The extension name. This must be set, otherwise the eclass dies.
+# Only automagically set by php-ext-pecl-r1.eclass, so unless your ebuild
+# inherits that eclass, you must set this manually before inherit.
[[ -z "${PHP_EXT_NAME}" ]] && die "No module name specified for the php-ext-base-r1 eclass"
-# Wether or not to add a line to php.ini for the extension
-# (defaults to "yes" and shouldn't be changed in most cases)
+# @ECLASS-VARIABLE: PHP_EXT_INI
+# @DESCRIPTION:
+# Controls whether or not to add a line to php.ini for the extension.
+# Defaults to "yes" and should not be changed in most cases.
[[ -z "${PHP_EXT_INI}" ]] && PHP_EXT_INI="yes"
-# Wether the extension is a ZendEngine extension or not
-# (defaults to "no" and if you don't know what is it, you don't need it)
+# @ECLASS-VARIABLE: PHP_EXT_ZENDEXT
+# @DESCRIPTION:
+# Controls whether the extension is a ZendEngine extension or not.
+# Defaults to "no" and if you don't know what is it, you don't need it.
[[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no"
+
php-ext-base-r1_buildinilist() {
# Work out the list of <ext>.ini files to edit/add to
if [[ -z "${PHPSAPILIST}" ]] ; then
@@ -43,6 +57,9 @@ php-ext-base-r1_buildinilist() {
done
}
+# @FUNCTION: php-ext-base-r1_src_install
+# @DESCRIPTION:
+# Takes care of standard install for PHP extensions (modules).
php-ext-base-r1_src_install() {
# Pull in the PHP settings
has_php
@@ -100,7 +117,6 @@ php-ext-base-r1_addextension() {
# $2 - Setting value
# $3 - File to add to
# $4 - Sanitized text to output
-
php-ext-base-r1_addtoinifile() {
if [[ ! -d `dirname $3` ]] ; then
mkdir -p `dirname $3`
@@ -125,6 +141,25 @@ php-ext-base-r1_addtoinifile() {
doins "$3"
}
+# @FUNCTION: php-ext-base-r1_addtoinifiles
+# @USAGE: <setting name> <setting value> [message to output]; or just [section name]
+# @DESCRIPTION:
+# Add value settings to php.ini file installed by the extension (module).
+# You can also add a [section], see examples below.
+#
+# @CODE
+# Add some settings for the extension:
+#
+# php-ext-base-r1_addtoinifiles "zend_optimizer.optimization_level" "15"
+# php-ext-base-r1_addtoinifiles "zend_optimizer.enable_loader" "0"
+# php-ext-base-r1_addtoinifiles "zend_optimizer.disable_licensing" "0"
+#
+# Adding values to a section in php.ini file installed by the extension:
+#
+# php-ext-base-r1_addtoinifiles "[Debugger]"
+# php-ext-base-r1_addtoinifiles "debugger.enabled" "on"
+# php-ext-base-r1_addtoinifiles "debugger.profiler_enabled" "on"
+# @CODE
php-ext-base-r1_addtoinifiles() {
for x in ${PHPINIFILELIST} ; do
php-ext-base-r1_addtoinifile "$1" "$2" "$x" "$3"
diff --git a/eclass/php-ext-pecl-r1.eclass b/eclass/php-ext-pecl-r1.eclass
index cb4f2b0e6685..8204a6f5b27d 100644
--- a/eclass/php-ext-pecl-r1.eclass
+++ b/eclass/php-ext-pecl-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-pecl-r1.eclass,v 1.7 2007/08/31 10:00:56 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-pecl-r1.eclass,v 1.8 2007/09/01 15:58:17 jokey Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
# Author: Luca Longinotti <chtekk@gentoo.org>
@@ -15,12 +15,27 @@
# as a uniform way of installing PECL extensions.
# For more information about PECL, see http://pecl.php.net/
-# @VARIABLE: PHP_EXT_PECL_FILENAME
-# @DESCRIPTION:
-# Set in ebuild if the filename differs from the package name so that SRC_URI gets set correctly.
+# @ECLASS-VARIABLE: PHP_EXT_PECL_PKG
+# @DESCRIPTION:
+# Set in ebuild before inheriting this eclass if the tarball name
+# differs from ${PN/pecl-/} so that SRC_URI and HOMEPAGE gets set
+# correctly by the eclass.
+#
+# Setting this variable manually also affects PHP_EXT_NAME and ${S}
+# unless you override those in ebuild. Also see PHP_EXT_PECL_FILENAME
+# if this is not desired for whatever reason.
+
+# @ECLASS-VARIABLE: PHP_EXT_PECL_FILENAME
+# @DESCRIPTION:
+# Set in ebuild before inheriting this eclass if the tarball name
+# differs from ${PN/pecl-/} so that SRC_URI gets set correctly by
+# the eclass.
+#
+# Unlike PHP_EXT_PECL_PKG, setting this variable does not affect
+# HOMEPAGE, PHP_EXT_NAME or ${S}.
# @VARIABLE: DOCS
-# @DESCRIPTION:
+# @DESCRIPTION:
# Set in ebuild if you wish to install additional, package-specific documentation.
[[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}"
diff --git a/eclass/php-ext-source-r1.eclass b/eclass/php-ext-source-r1.eclass
index adb4e7f6ca15..eaf45898ca7c 100644
--- a/eclass/php-ext-source-r1.eclass
+++ b/eclass/php-ext-source-r1.eclass
@@ -1,18 +1,20 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r1.eclass,v 1.12 2007/08/27 11:16:13 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r1.eclass,v 1.13 2007/09/01 15:58:17 jokey Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
# Author: Stuart Herbert <stuart@gentoo.org>
# Author: Luca Longinotti <chtekk@gentoo.org>
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# The php-ext-source-r1 eclass provides a unified interface for compiling and
-# installing standalone PHP extensions ('modules') from source code.
-#
-# To use this eclass, you must add the following to your ebuild:
-#
-# inherit php-ext-source-r1
+# Author: Jakub Moc <jakub@gentoo.org> (documentation)
+
+# @ECLASS: php-ext-src-r1.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: A unified interface for compiling and installing standalone PHP extensions from source code.
+# @DESCRIPTION:
+# This eclass provides a unified interface for compiling and installing standalone
+# PHP extensions (modules) from source code.
+
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
@@ -21,13 +23,29 @@ inherit php-ext-base-r1 flag-o-matic autotools depend.php
EXPORT_FUNCTIONS src_compile src_install
-# The extension name, this must be set, otherwise we die
+# @ECLASS-VARIABLE: PHP_EXT_NAME
+# @DESCRIPTION:
+# The extension name. This must be set, otherwise the eclass dies.
+# Only automagically set by php-ext-pecl-r1.eclass, so unless your ebuild
+# inherits that eclass, you must set this manually before inherit.
[[ -z "${PHP_EXT_NAME}" ]] && die "No module name specified for the php-ext-source-r1 eclass"
DEPEND=">=sys-devel/m4-1.4.3
>=sys-devel/libtool-1.5.18"
RDEPEND=""
+# @VARIABLE: PHP_EXT_SKIP_PHPIZE
+# @DESCRIPTION:
+# phpize will be run by default for all ebuilds that use php-ext-source-r1_src_compile.
+# Set PHP_EXT_SKIP_PHPIZE="yes" in your ebuild if you do not want to run phpize.
+
+# @VARIABLE: my_conf
+# @DESCRIPTION:
+# Set this in the ebuild to pass configure options to econf.
+
+# @FUNCTION: php-ext-source-r1_src_compile
+# @DESCRIPTION:
+# Takes care of standard compile for PHP extensions (modules).
php-ext-source-r1_src_compile() {
# Pull in the PHP settings
has_php
@@ -66,6 +84,9 @@ php-ext-source-r1_src_compile() {
fi
}
+# @FUNCTION: php-ext-source-r1_src_install
+# @DESCRIPTION:
+# Takes care of standard install for PHP extensions (modules).
php-ext-source-r1_src_install() {
# Pull in the PHP settings
has_php
diff --git a/eclass/php-ezc.eclass b/eclass/php-ezc.eclass
index dab65e3d8799..932375a7a09c 100644
--- a/eclass/php-ezc.eclass
+++ b/eclass/php-ezc.eclass
@@ -1,11 +1,14 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ezc.eclass,v 1.3 2007/08/31 09:40:33 jokey Exp $
-#
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# The php-ezc eclass provides means for an easy installation
-# of the eZ components, see http://ez.no/products/ez_components
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ezc.eclass,v 1.4 2007/09/01 15:58:17 jokey Exp $
+
+# @ECLASS: php-ezc.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: Provides an easy installation of the eZcomponents.
+# @DESCRIPTION:
+# This eclass provides means for an easy installation of the eZ components.
+# For more information on eZcomponents see http://ez.no/products/ez_components
inherit php-pear-r1
@@ -19,7 +22,9 @@ fix_EZC_PV() {
EZC_PV="${tmp}"
}
-# set EZC_PV in ebuilds if the PV mangling of beta/rc versions breaks SRC_URI
+# @ECLASS-VARIABLE: EZC_PV
+# @DESCRIPTION:
+# Set in ebuild if the eclass ${PV} mangling of beta/rc versions breaks SRC_URI.
[[ -z "${EZC_PV}" ]] && fix_EZC_PV
EZC_PN="${EZC_PKG_NAME}-${EZC_PV}"
diff --git a/eclass/php-lib-r1.eclass b/eclass/php-lib-r1.eclass
index 4596dc4992c8..8eb8352fc61a 100644
--- a/eclass/php-lib-r1.eclass
+++ b/eclass/php-lib-r1.eclass
@@ -1,14 +1,17 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.5 2007/03/05 01:50:47 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.6 2007/09/01 15:58:17 jokey Exp $
#
# Author: Stuart Herbert <stuart@gentoo.org>
# Author: Luca Longinotti <chtekk@gentoo.org>
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# The php-lib-r1 eclass provides a unified interface for adding new
-# PHP libraries. PHP libraries are PHP scripts designed for reuse inside
-# other PHP scripts.
+
+# @ECLASS: php-lib-r1.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: A unified interface for adding new PHP libraries.
+# @DESCRIPTION:
+# This eclass provides a unified interface for adding new PHP libraries.
+# PHP libraries are PHP scripts designed for reuse inside other PHP scripts.
inherit depend.php
@@ -17,14 +20,19 @@ EXPORT_FUNCTIONS src_install
DEPEND="dev-lang/php"
RDEPEND="${DEPEND}"
-# provide default extension name if necessary
+# @ECLASS-VARIABLE: PHP_LIB_NAME
+# @DESCRIPTION:
+# Defaults to ${PN} unless set manually in the ebuild.
[[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
-# you have to pass in a list of the PHP files to install
-#
+# @FUNCTION: php-lib-r1_src_install
+# @USAGE: <directory to install from> <list of files>
+# @DESCRIPTION:
+# Takes care of install for PHP libraries.
+# You have to pass in a list of the PHP files to install.
+
# $1 - directory in ${S} to insert from
# $2 ... list of files to install
-
php-lib-r1_src_install() {
has_php
diff --git a/eclass/php-pear-r1.eclass b/eclass/php-pear-r1.eclass
index 7a7b0249b654..56a225d4ed4a 100644
--- a/eclass/php-pear-r1.eclass
+++ b/eclass/php-pear-r1.eclass
@@ -1,24 +1,29 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-r1.eclass,v 1.16 2007/08/27 11:15:19 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-r1.eclass,v 1.17 2007/09/01 15:58:17 jokey Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
# Author: Luca Longinotti <chtekk@gentoo.org>
-# Maintained by the PHP Team <php-bugs@gentoo.org>
-#
-# The php-pear-r1 eclass provides means for an easy installation of PEAR
-# packages, see http://pear.php.net/
-# Note that this eclass doesn't handle PEAR packages' dependencies on
-# purpose, please use (R)DEPEND to define them correctly!
+# @ECLASS: php-pear-r1.eclass
+# @MAINTAINER:
+# Gentoo PHP Team <php-bugs@gentoo.org>
+# @BLURB: Provides means for an easy installation of PEAR packages.
+# @DESCRIPTION:
+# This eclass provides means for an easy installation of PEAR packages.
+# For more information on PEAR, see http://pear.php.net/
+# Note that this eclass doesn't handle dependencies of PEAR packages
+# on purpose; please use (R)DEPEND to define them correctly!
EXPORT_FUNCTIONS src_install
DEPEND="dev-lang/php >=dev-php/PEAR-PEAR-1.4.6"
RDEPEND="${DEPEND}"
-# Set this if the the PEAR package name is different than the one in
-# Portage (generally shouldn't be the case).
+# @ECLASS-VARIABLE: PHP_PEAR_PKG_NAME
+# @DESCRIPTION:
+# Set this if the the PEAR package name differs from ${PN/PEAR-/}
+# (generally shouldn't be the case).
[[ -z "${PHP_PEAR_PKG_NAME}" ]] && PHP_PEAR_PKG_NAME="${PN/PEAR-/}"
fix_PEAR_PV() {
@@ -29,7 +34,9 @@ fix_PEAR_PV() {
PEAR_PV="${tmp}"
}
-# Set PEAR_PV in ebuilds if the PV mangling for beta/rc versions breaks SRC_URI
+# @ECLASS-VARIABLE: PEAR_PV
+# @DESCRIPTION:
+# Set in ebuild if the eclass ${PV} mangling breaks SRC_URI for beta/rc versions
[[ -z "${PEAR_PV}" ]] && fix_PEAR_PV
PEAR_PN="${PHP_PEAR_PKG_NAME}-${PEAR_PV}"
@@ -39,6 +46,9 @@ PEAR_PN="${PHP_PEAR_PKG_NAME}-${PEAR_PV}"
S="${WORKDIR}/${PEAR_PN}"
+# @FUNCTION: php-pear-r1_src_install
+# @DESCRIPTION:
+# Takes care of standard install for PEAR packages.
php-pear-r1_src_install() {
# SNMP support
addpredict /usr/share/snmp/mibs/.index
diff --git a/eclass/phpconfutils.eclass b/eclass/phpconfutils.eclass
index 4ca26e0869bf..21b90f91e096 100644
--- a/eclass/phpconfutils.eclass
+++ b/eclass/phpconfutils.eclass
@@ -1,21 +1,25 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/phpconfutils.eclass,v 1.5 2007/05/10 20:26:45 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/phpconfutils.eclass,v 1.6 2007/09/01 15:58:17 jokey Exp $
#
# ########################################################################
#
-# eclass/phpconfutils.eclass
-# Utility functions to help with configuring PHP
+# Based on Stuart's work on the original confutils eclass
#
-# Based on Stuart's work on the original confutils eclass
-#
-# Author(s) Luca Longinotti
-# <chtekk@gentoo.org>
-#
-# Maintained by the PHP Herd <php-bugs@gentoo.org>
+# Author(s): Luca Longinotti <chtekk@gentoo.org>
#
# ========================================================================
+# @ECLASS: phpconfutils.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @BLURB: Provides utility functions to help with configuring PHP.
+# @DESCRIPTION:
+# This eclass provides utility functions to help with configuring PHP.
+# It is only used by other php eclasses currently and the functions
+# are not generally intended for direct use in ebuilds.
+
+
# ========================================================================
# List of USE flags that need deps that aren't yet in Portage
# or that can't be (fex. certain commercial apps)