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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon Mar 5 01:50:47 2007 UTC (7 years, 4 months ago) by chtekk
Branch: MAIN
Changes since 1.4: +9 -13 lines
New updated PHP eclasses, fix lots of bugs, introduce PHP 5.2 support.

1 chtekk 1.5 # Copyright 1999-2007 Gentoo Foundation
2 stuart 1.1 # Distributed under the terms of the GNU General Public License v2
3 chtekk 1.5 # $Header: $
4 stuart 1.1 #
5     # Author: Stuart Herbert <stuart@gentoo.org>
6 chtekk 1.5 # Author: Luca Longinotti <chtekk@gentoo.org>
7     # Maintained by the PHP Team <php-bugs@gentoo.org>
8 stuart 1.1 #
9 chtekk 1.4 # The php-lib-r1 eclass provides a unified interface for adding new
10     # PHP libraries. PHP libraries are PHP scripts designed for reuse inside
11 stuart 1.1 # other PHP scripts.
12    
13     inherit depend.php
14    
15     EXPORT_FUNCTIONS src_install
16    
17 chtekk 1.5 DEPEND="dev-lang/php"
18     RDEPEND="${DEPEND}"
19 stuart 1.1
20     # provide default extension name if necessary
21 chtekk 1.5 [[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
22 stuart 1.1
23     # you have to pass in a list of the PHP files to install
24     #
25     # $1 - directory in ${S} to insert from
26     # $2 ... list of files to install
27    
28 hollow 1.2 php-lib-r1_src_install() {
29 stuart 1.1 has_php
30    
31     # install to the correct phpX folder, if not specified
32     # fall back to /usr/share/php
33 chtekk 1.5 if [[ -n "${PHP_SHARED_CAT}" ]] ; then
34 stuart 1.1 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}"
35     else
36     PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}"
37     fi
38    
39     local x
40    
41     S_DIR="$1"
42     shift
43    
44     for x in $@ ; do
45     SUBDIR="`dirname ${x}`"
46 chtekk 1.5 insinto "${PHP_LIB_DIR}/${SUBDIR}"
47 chtekk 1.3 doins "${S_DIR}/${x}"
48 stuart 1.1 done
49     }

  ViewVC Help
Powered by ViewVC 1.1.20