/[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.13 - (hide annotations) (download)
Wed Jun 24 13:22:02 2015 UTC (5 weeks, 1 day ago) by grknight
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +2 -4 lines
Remove depend.php and dodoc-php in favor of just dodoc

1 grknight 1.12 # Copyright 1999-2015 Gentoo Foundation
2 stuart 1.1 # Distributed under the terms of the GNU General Public License v2
3 grknight 1.13 # $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.12 2015/04/14 18:32:51 grknight Exp $
4 jokey 1.6
5     # @ECLASS: php-lib-r1.eclass
6     # @MAINTAINER:
7     # Gentoo PHP team <php-bugs@gentoo.org>
8 vapier 1.10 # @AUTHOR:
9     # Author: Stuart Herbert <stuart@gentoo.org>
10     # Author: Luca Longinotti <chtekk@gentoo.org>
11 jokey 1.6 # @BLURB: A unified interface for adding new PHP libraries.
12     # @DESCRIPTION:
13     # This eclass provides a unified interface for adding new PHP libraries.
14     # PHP libraries are PHP scripts designed for reuse inside other PHP scripts.
15 stuart 1.1
16     EXPORT_FUNCTIONS src_install
17 grknight 1.12 # Silence repoman warnings
18     case "${EAPI:-0}" in
19     0|1|2|3|4)
20     DEPEND="dev-lang/php"
21     ;;
22     *)
23     DEPEND="dev-lang/php:*"
24     ;;
25     esac
26 stuart 1.1
27 chtekk 1.5 RDEPEND="${DEPEND}"
28 stuart 1.1
29 jokey 1.6 # @ECLASS-VARIABLE: PHP_LIB_NAME
30     # @DESCRIPTION:
31     # Defaults to ${PN} unless set manually in the ebuild.
32 chtekk 1.5 [[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
33 stuart 1.1
34 jokey 1.6 # @FUNCTION: php-lib-r1_src_install
35     # @USAGE: <directory to install from> <list of files>
36     # @DESCRIPTION:
37     # Takes care of install for PHP libraries.
38     # You have to pass in a list of the PHP files to install.
39    
40 jokey 1.7 # @VARIABLE: DOCS
41     # @DESCRIPTION:
42     # Set in ebuild if you wish to install additional, package-specific documentation.
43    
44 stuart 1.1 # $1 - directory in ${S} to insert from
45     # $2 ... list of files to install
46 hollow 1.2 php-lib-r1_src_install() {
47 stuart 1.1 local x
48    
49     S_DIR="$1"
50     shift
51    
52     for x in $@ ; do
53 jokey 1.8 SUBDIR="$(dirname ${x})"
54 mabi 1.11 insinto "/usr/share/php/${PHP_LIB_NAME}/${SUBDIR}"
55 chtekk 1.3 doins "${S_DIR}/${x}"
56 stuart 1.1 done
57 jokey 1.7
58 swegener 1.9 for doc in ${DOCS} ; do
59 grknight 1.13 [[ -s ${doc} ]] && dodoc ${doc}
60 swegener 1.9 done
61 stuart 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20