/[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.3 Revision 1.4
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.3 2010/11/02 17:09:56 olemarkus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.4 2010/11/02 21:46:05 olemarkus Exp $
4# 4#
5# Author: Tal Peer <coredumb@gentoo.org> 5# Author: Tal Peer <coredumb@gentoo.org>
6# Author: Stuart Herbert <stuart@gentoo.org> 6# Author: Stuart Herbert <stuart@gentoo.org>
7# Author: Luca Longinotti <chtekk@gentoo.org> 7# Author: Luca Longinotti <chtekk@gentoo.org>
8# Author: Jakub Moc <jakub@gentoo.org> (documentation) 8# Author: Jakub Moc <jakub@gentoo.org> (documentation)
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 depend.php 19inherit flag-o-matic autotools depend.php
20 20
21EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install 21EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
22 22
23# @ECLASS-VARIABLE: PHP_EXT_NAME 23# @ECLASS-VARIABLE: PHP_EXT_NAME
24# @DESCRIPTION: 24# @DESCRIPTION:
25# The extension name. This must be set, otherwise the eclass dies. 25# The extension name. This must be set, otherwise the eclass dies.
26# Only automagically set by php-ext-pecl-r1.eclass, so unless your ebuild 26# Only automagically set by php-ext-pecl-r1.eclass, so unless your ebuild
90php-ext-source-r2_src_unpack() { 90php-ext-source-r2_src_unpack() {
91 unpack ${A} 91 unpack ${A}
92 local slot orig_s="$S" 92 local slot orig_s="$S"
93 for slot in $(php_get_slots); do 93 for slot in $(php_get_slots); do
94 cp -r "${orig_s}" "${WORKDIR}/${slot}" 94 cp -r "${orig_s}" "${WORKDIR}/${slot}"
95 done
96}
97
98php-ext-source-r2_src_prepare() {
99 local slot orig_s="$S"
100 for slot in $(php_get_slots); do
95 php_init_slot_env ${slot} 101 php_init_slot_env ${slot}
96 if [[ "${PHP_EXT_SKIP_PHPIZE}" != 'yes' ]] ; then
97 php-ext-source-r2_phpize 102 php-ext-source-r2_phpize
98 fi
99 done 103 done
100} 104}
101 105
102# @FUNCTION php-ext-source-r2_phpize 106# @FUNCTION php-ext-source-r2_phpize
103# @DESCRIPTION: 107# @DESCRIPTION:
104# Runs phpize and autotools in addition to the standard src_unpack 108# Runs phpize and autotools in addition to the standard src_unpack
105php-ext-source-r2_phpize() { 109php-ext-source-r2_phpize() {
110 if [[ "${PHP_EXT_SKIP_PHPIZE}" != 'yes' ]] ; then
106 # Create configure out of config.m4 111 # Create configure out of config.m4
107 # I wish I could run this to solve #329071, but I cannot 112 # I wish I could run this to solve #329071, but I cannot
108 #autotools_run_tool ${PHPIZE} 113 #autotools_run_tool ${PHPIZE}
109 ${PHPIZE} 114 ${PHPIZE}
110 # force run of libtoolize and regeneration of related autotools 115 # force run of libtoolize and regeneration of related autotools
111 # files (bug 220519) 116 # files (bug 220519)
112 rm aclocal.m4 117 rm aclocal.m4
113 eautoreconf 118 eautoreconf
119 fi
114} 120}
115 121
116# @FUNCTION: php-ext-source-r2_src_configure 122# @FUNCTION: php-ext-source-r2_src_configure
117# @DESCRIPTION: 123# @DESCRIPTION:
118# Takes care of standard configure for PHP extensions (modules). 124# Takes care of standard configure for PHP extensions (modules).

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20