/[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.30 Revision 1.34
1# Copyright 1999-2012 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.30 2012/09/27 16:35:41 axs Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.34 2015/03/26 16:15:33 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"
25RDEPEND="" 25RDEPEND=""
26 26
27# Because of USE deps, we require at least EAPI 2 27# Because of USE deps, we require at least EAPI 2
28case ${EAPI} in 28case ${EAPI} in
29 2|3|4|5) ;; 29 4|5) ;;
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
51[[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no" 51[[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no"
52 52
53# @ECLASS-VARIABLE: USE_PHP 53# @ECLASS-VARIABLE: USE_PHP
54# @DESCRIPTION: 54# @DESCRIPTION:
55# Lists the PHP slots compatibile the extension is compatibile with 55# Lists the PHP slots compatibile the extension is compatibile with
56[[ -z "${USE_PHP}" ]] && USE_PHP="php5-3" 56[[ -z "${USE_PHP}" ]] && USE_PHP="php5-3" \
57 && eqawarn "An empty USE_PHP is deprecated and support will be removed on 2015-05-01"
57 58
58# @ECLASS-VARIABLE: PHP_EXT_OPTIONAL_USE 59# @ECLASS-VARIABLE: PHP_EXT_OPTIONAL_USE
59# @DESCRIPTION: 60# @DESCRIPTION:
60# If set, this is the USE flag that the PHP dependencies are behind 61# 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 62# Most commonly set as PHP_EXT_OPTIONAL_USE=php to get the dependencies behind
66# The relative location of the temporary build directory for the PHP extension within 67# The relative location of the temporary build directory for the PHP extension within
67# the source package. This is useful for packages that bundle the PHP extension. 68# the source package. This is useful for packages that bundle the PHP extension.
68# Defaults to ${S} 69# Defaults to ${S}
69[[ -z "${PHP_EXT_S}" ]] && PHP_EXT_S="${S}" 70[[ -z "${PHP_EXT_S}" ]] && PHP_EXT_S="${S}"
70 71
71#Make sure at least one target is installed. Abuses USE dependencies. 72#Make sure at least one target is installed.
73REQUIRED_USE="${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }|| ( "
72for target in ${USE_PHP}; do 74for target in ${USE_PHP}; do
73 IUSE="${IUSE} php_targets_${target}" 75 IUSE="${IUSE} php_targets_${target}"
74 target=${target/+} 76 target=${target/+}
75 SELFDEPEND="${SELFDEPEND} =${CATEGORY}/${PF}[php_targets_${target}]" 77 REQUIRED_USE+="php_targets_${target} "
76 slot=${target/php} 78 slot=${target/php}
77 slot=${slot/-/.} 79 slot=${slot/-/.}
78 PHPDEPEND="${PHPDEPEND} 80 PHPDEPEND="${PHPDEPEND}
79 php_targets_${target}? ( dev-lang/php:${slot} )" 81 php_targets_${target}? ( dev-lang/php:${slot} )"
80done 82done
83REQUIRED_USE+=") ${PHP_EXT_OPTIONAL_USE:+ )}"
81 84
82RDEPEND="${RDEPEND} 85RDEPEND="${RDEPEND}
83 ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( } 86 ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }
84 || ( ${SELFDEPEND} )
85 ${PHPDEPEND} 87 ${PHPDEPEND}
86 ${PHP_EXT_OPTIONAL_USE:+ )}" 88 ${PHP_EXT_OPTIONAL_USE:+ )}"
87 89
88DEPEND="${DEPEND} 90DEPEND="${DEPEND}
89 ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( } 91 ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }
260 262
261 # Symlink the <ext>.ini files from ext/ to ext-active/ 263 # Symlink the <ext>.ini files from ext/ to ext-active/
262 local inifile 264 local inifile
263 for inifile in ${PHPINIFILELIST} ; do 265 for inifile in ${PHPINIFILELIST} ; do
264 if [[ -n "${PHP_EXT_INIFILE}" ]]; then 266 if [[ -n "${PHP_EXT_INIFILE}" ]]; then
265 cat "${FILESDIR}/${PHP_EXT_INIFILE}" > "${inifile}" 267 cat "${FILESDIR}/${PHP_EXT_INIFILE}" >> "${ED}/${inifile}"
266 einfo "Added content of ${FILESDIR}/${PHP_EXT_INIFILE} to ${inifile}" 268 einfo "Added content of ${FILESDIR}/${PHP_EXT_INIFILE} to ${inifile}"
267 fi 269 fi
268
269
270
271
272 inidir="${inifile/${PHP_EXT_NAME}.ini/}" 270 inidir="${inifile/${PHP_EXT_NAME}.ini/}"
273 inidir="${inidir/ext/ext-active}" 271 inidir="${inidir/ext/ext-active}"
274 dodir "/${inidir}" 272 dodir "/${inidir}"
275 dosym "/${inifile}" "/${inifile/ext/ext-active}" 273 dosym "/${inifile}" "/${inifile/ext/ext-active}"
276 done 274 done

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.20