1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # @ECLASS: php-lib-r1.eclass
7 # Gentoo PHP team <php-bugs@gentoo.org>
9 # Author: Stuart Herbert <stuart@gentoo.org>
10 # Author: Luca Longinotti <chtekk@gentoo.org>
11 # @BLURB: A unified interface for adding new PHP libraries.
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.
16 EXPORT_FUNCTIONS src_install
17 # Silence repoman warnings
23 DEPEND="dev-lang/php:*"
29 # @ECLASS-VARIABLE: PHP_LIB_NAME
31 # Defaults to ${PN} unless set manually in the ebuild.
32 [[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
34 # @FUNCTION: php-lib-r1_src_install
35 # @USAGE: <directory to install from> <list of files>
37 # Takes care of install for PHP libraries.
38 # You have to pass in a list of the PHP files to install.
42 # Set in ebuild if you wish to install additional, package-specific documentation.
44 # $1 - directory in ${S} to insert from
45 # $2 ... list of files to install
46 php-lib-r1_src_install() {
53 SUBDIR="$(dirname ${x})"
54 insinto "/usr/share/php/${PHP_LIB_NAME}/${SUBDIR}"
58 for doc in ${DOCS} ; do
59 [[ -s ${doc} ]] && dodoc ${doc}