/[gentoo-x86]/eclass/php-ext-source-r2.eclass
Gentoo

Diff of /eclass/php-ext-source-r2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.32 Revision 1.35
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2015 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.32 2013/04/14 06:54:43 olemarkus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.35 2015/05/04 18:59:30 grknight Exp $
4 4
5# @ECLASS: php-ext-source-r2.eclass 5# @ECLASS: php-ext-source-r2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo PHP team <php-bugs@gentoo.org> 7# Gentoo PHP team <php-bugs@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
14# @BLURB: A unified interface for compiling and installing standalone PHP extensions. 14# @BLURB: A unified interface for compiling and installing standalone PHP extensions.
15# @DESCRIPTION: 15# @DESCRIPTION:
16# This eclass provides a unified interface for compiling and installing standalone 16# This eclass provides a unified interface for compiling and installing standalone
17# PHP extensions (modules). 17# PHP extensions (modules).
18 18
19inherit flag-o-matic autotools multilib 19inherit flag-o-matic autotools multilib eutils
20 20
21EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install 21EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
22 22
23DEPEND=">=sys-devel/m4-1.4.3 23DEPEND=">=sys-devel/m4-1.4.3
24 >=sys-devel/libtool-1.5.18" 24 >=sys-devel/libtool-1.5.18"
30 *) 30 *)
31 die "php-ext-source-r2 is not compatible with EAPI=${EAPI}" 31 die "php-ext-source-r2 is not compatible with EAPI=${EAPI}"
32esac 32esac
33 33
34# @ECLASS-VARIABLE: PHP_EXT_NAME 34# @ECLASS-VARIABLE: PHP_EXT_NAME
35# @REQUIRED
35# @DESCRIPTION: 36# @DESCRIPTION:
36# The extension name. This must be set, otherwise the eclass dies. 37# The extension name. This must be set, otherwise the eclass dies.
37# Only automagically set by php-ext-pecl-r2.eclass, so unless your ebuild 38# Only automagically set by php-ext-pecl-r2.eclass, so unless your ebuild
38# inherits that eclass, you must set this manually before inherit. 39# inherits that eclass, you must set this manually before inherit.
39[[ -z "${PHP_EXT_NAME}" ]] && die "No module name specified for the php-ext-source-r2 eclass" 40[[ -z "${PHP_EXT_NAME}" ]] && die "No module name specified for the php-ext-source-r2 eclass"
49# Controls whether the extension is a ZendEngine extension or not. 50# Controls whether the extension is a ZendEngine extension or not.
50# Defaults to "no" and if you don't know what is it, you don't need it. 51# Defaults to "no" and if you don't know what is it, you don't need it.
51[[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no" 52[[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no"
52 53
53# @ECLASS-VARIABLE: USE_PHP 54# @ECLASS-VARIABLE: USE_PHP
55# @REQUIRED
54# @DESCRIPTION: 56# @DESCRIPTION:
55# Lists the PHP slots compatibile the extension is compatibile with 57# Lists the PHP slots compatibile the extension is compatibile with
56[[ -z "${USE_PHP}" ]] && USE_PHP="php5-3" 58# Example:
59# @CODE
60# USE_PHP="php5-5 php5-6"
61# @CODE
62[[ -z "${USE_PHP}" ]] && die "USE_PHP is not set for the php-ext-source-r2 eclass"
57 63
58# @ECLASS-VARIABLE: PHP_EXT_OPTIONAL_USE 64# @ECLASS-VARIABLE: PHP_EXT_OPTIONAL_USE
59# @DESCRIPTION: 65# @DESCRIPTION:
60# If set, this is the USE flag that the PHP dependencies are behind 66# If set, this is the USE flag that the PHP dependencies are behind
61# Most commonly set as PHP_EXT_OPTIONAL_USE=php to get the dependencies behind 67# Most commonly set as PHP_EXT_OPTIONAL_USE=php to get the dependencies behind
67# the source package. This is useful for packages that bundle the PHP extension. 73# the source package. This is useful for packages that bundle the PHP extension.
68# Defaults to ${S} 74# Defaults to ${S}
69[[ -z "${PHP_EXT_S}" ]] && PHP_EXT_S="${S}" 75[[ -z "${PHP_EXT_S}" ]] && PHP_EXT_S="${S}"
70 76
71#Make sure at least one target is installed. 77#Make sure at least one target is installed.
72REQUIRED_USE="|| ( " 78REQUIRED_USE="${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }|| ( "
73for target in ${USE_PHP}; do 79for target in ${USE_PHP}; do
74 IUSE="${IUSE} php_targets_${target}" 80 IUSE="${IUSE} php_targets_${target}"
75 target=${target/+} 81 target=${target/+}
76 REQUIRED_USE+="php_targets_${target} " 82 REQUIRED_USE+="php_targets_${target} "
77 slot=${target/php} 83 slot=${target/php}
78 slot=${slot/-/.} 84 slot=${slot/-/.}
79 PHPDEPEND="${PHPDEPEND} 85 PHPDEPEND="${PHPDEPEND}
80 php_targets_${target}? ( dev-lang/php:${slot} )" 86 php_targets_${target}? ( dev-lang/php:${slot} )"
81done 87done
82REQUIRED_USE+=")" 88REQUIRED_USE+=") ${PHP_EXT_OPTIONAL_USE:+ )}"
83 89
84RDEPEND="${RDEPEND} 90RDEPEND="${RDEPEND}
85 ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( } 91 ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }
86 ${PHPDEPEND} 92 ${PHPDEPEND}
87 ${PHP_EXT_OPTIONAL_USE:+ )}" 93 ${PHP_EXT_OPTIONAL_USE:+ )}"

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.20