/[gentoo-x86]/eclass/php-lib-r1.eclass
Gentoo

Diff of /eclass/php-lib-r1.eclass

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

Revision 1.3 Revision 1.5
1# Copyright 1999-2005 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-lib-r1.eclass,v 1.3 2005/10/31 14:08:42 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.5 2007/03/05 01:50:47 chtekk Exp $
4# 4#
5# Author: Stuart Herbert <stuart@gentoo.org> 5# Author: Stuart Herbert <stuart@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org>
7# Maintained by the PHP Team <php-bugs@gentoo.org>
6# 8#
7# The php-lib eclass provides a unified interface for adding new 9# The php-lib-r1 eclass provides a unified interface for adding new
8# PHP libraries. PHP libraries are PHP scripts designed for reuse inside 10# PHP libraries. PHP libraries are PHP scripts designed for reuse inside
9# other PHP scripts. 11# other PHP scripts.
10#
11# This eclass doesn't do a lot (yet)
12 12
13inherit depend.php 13inherit depend.php
14 14
15RESTRICT="${RESTRICT} nostrip"
16
17EXPORT_FUNCTIONS src_install 15EXPORT_FUNCTIONS src_install
18 16
19# ---begin ebuild configurable settings 17DEPEND="dev-lang/php"
18RDEPEND="${DEPEND}"
20 19
21# provide default extension name if necessary 20# provide default extension name if necessary
22[ -z "${PHP_LIB_NAME}" ] && PHP_LIB_NAME="${PN}" 21[[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
23# ---end ebuild configurable settings
24
25DEPEND="${DEPEND} dev-lang/php"
26RDEPEND="${RDEPEND} ${DEPEND}"
27 22
28# you have to pass in a list of the PHP files to install 23# you have to pass in a list of the PHP files to install
29# 24#
30# $1 - directory in ${S} to insert from 25# $1 - directory in ${S} to insert from
31# $2 ... list of files to install 26# $2 ... list of files to install
33php-lib-r1_src_install() { 28php-lib-r1_src_install() {
34 has_php 29 has_php
35 30
36 # install to the correct phpX folder, if not specified 31 # install to the correct phpX folder, if not specified
37 # fall back to /usr/share/php 32 # fall back to /usr/share/php
38 if [ -n "${PHP_SHARED_CAT}" ] ; then 33 if [[ -n "${PHP_SHARED_CAT}" ]] ; then
39 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}" 34 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}"
40 else 35 else
41 PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}" 36 PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}"
42 fi 37 fi
43 38
46 S_DIR="$1" 41 S_DIR="$1"
47 shift 42 shift
48 43
49 for x in $@ ; do 44 for x in $@ ; do
50 SUBDIR="`dirname ${x}`" 45 SUBDIR="`dirname ${x}`"
51 insinto ${PHP_LIB_DIR}/${SUBDIR} 46 insinto "${PHP_LIB_DIR}/${SUBDIR}"
52 doins "${S_DIR}/${x}" 47 doins "${S_DIR}/${x}"
53 done 48 done
54} 49}

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

  ViewVC Help
Powered by ViewVC 1.1.20