/[gentoo-x86]/eclass/php-ext-pecl-r1.eclass
Gentoo

Diff of /eclass/php-ext-pecl-r1.eclass

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

Revision 1.10 Revision 1.13
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/Attic/php-ext-pecl-r1.eclass,v 1.10 2007/10/22 22:54:19 jokey Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/php-ext-pecl-r1.eclass,v 1.13 2010/10/06 19:58:45 olemarkus Exp $
4# 4#
5# Author: Tal Peer <coredumb@gentoo.org> 5# Author: Tal Peer <coredumb@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org> 6# Author: Luca Longinotti <chtekk@gentoo.org>
7# Author: Jakub Moc <jakub@gentoo.org> 7# Author: Jakub Moc <jakub@gentoo.org>
8 8
16# For more information about PECL, see http://pecl.php.net/ 16# For more information about PECL, see http://pecl.php.net/
17 17
18# @ECLASS-VARIABLE: PHP_EXT_PECL_PKG 18# @ECLASS-VARIABLE: PHP_EXT_PECL_PKG
19# @DESCRIPTION: 19# @DESCRIPTION:
20# Set in ebuild before inheriting this eclass if the tarball name 20# Set in ebuild before inheriting this eclass if the tarball name
21# differs from ${PN/pecl-/} so that SRC_URI and HOMEPAGE gets set 21# differs from ${PN/pecl-/} so that SRC_URI and HOMEPAGE gets set
22# correctly by the eclass. 22# correctly by the eclass.
23# 23#
24# Setting this variable manually also affects PHP_EXT_NAME and ${S} 24# Setting this variable manually also affects PHP_EXT_NAME and ${S}
25# unless you override those in ebuild. Also see PHP_EXT_PECL_FILENAME 25# unless you override those in ebuild. Also see PHP_EXT_PECL_FILENAME
26# if this is not desired for whatever reason. 26# if this is not desired for whatever reason.
30# Set in ebuild before inheriting this eclass if the tarball name 30# Set in ebuild before inheriting this eclass if the tarball name
31# differs from ${PN/pecl-/} so that SRC_URI gets set correctly by 31# differs from ${PN/pecl-/} so that SRC_URI gets set correctly by
32# the eclass. 32# the eclass.
33# 33#
34# Unlike PHP_EXT_PECL_PKG, setting this variable does not affect 34# Unlike PHP_EXT_PECL_PKG, setting this variable does not affect
35# HOMEPAGE, PHP_EXT_NAME or ${S}. 35# HOMEPAGE, PHP_EXT_NAME or ${S}.
36 36
37 37
38[[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}" 38[[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}"
39 39
40PECL_PKG="${PHP_EXT_PECL_PKG}" 40PECL_PKG="${PHP_EXT_PECL_PKG}"
43 43
44[[ -z "${PHP_EXT_NAME}" ]] && PHP_EXT_NAME="${PECL_PKG}" 44[[ -z "${PHP_EXT_NAME}" ]] && PHP_EXT_NAME="${PECL_PKG}"
45 45
46inherit php-ext-source-r1 depend.php 46inherit php-ext-source-r1 depend.php
47 47
48EXPORT_FUNCTIONS src_compile src_install 48EXPORT_FUNCTIONS src_compile src_install src_test
49 49
50if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then 50if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then
51 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz" 51 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz"
52else 52else
53 FILENAME="${PECL_PKG_V}.tgz" 53 FILENAME="${PECL_PKG_V}.tgz"
67} 67}
68 68
69# @FUNCTION: php-ext-pecl-r1_src_install 69# @FUNCTION: php-ext-pecl-r1_src_install
70# @DESCRIPTION: 70# @DESCRIPTION:
71# Takes care of standard install for PECL packages. 71# Takes care of standard install for PECL packages.
72# You can also simply add examples to IUSE to automagically install 72# You can also simply add examples to IUSE to automagically install
73# examples supplied with the package. 73# examples supplied with the package.
74 74
75# @VARIABLE: DOCS 75# @VARIABLE: DOCS
76# @DESCRIPTION: 76# @DESCRIPTION:
77# Set in ebuild if you wish to install additional, package-specific documentation. 77# Set in ebuild if you wish to install additional, package-specific documentation.
86 if has examples ${IUSE} && use examples ; then 86 if has examples ${IUSE} && use examples ; then
87 insinto /usr/share/doc/${CATEGORY}/${PF}/examples 87 insinto /usr/share/doc/${CATEGORY}/${PF}/examples
88 doins -r examples/* 88 doins -r examples/*
89 fi 89 fi
90} 90}
91
92# @FUNCTION: php-ext-pecl-r1_src_test
93# @DESCRIPTION:
94# Takes care of running any tests delivered with the PECL package.
95# Testing is somewhat standardized across pecl extensions through phpize's
96# run-tests.php - unfortunatly there are some quirks we need to work around
97php-ext-pecl-r1_src_test() {
98 # Makefile passes a hard-coded -d extension_dir=./modules, we move the lib
99 # away from there in src_compile
100 ln -s "${WORKDIR}/${PHP_EXT_NAME}-default.so" "${S}/modules/${PHP_EXT_NAME}.so"
101
102 NO_INTERACTION="yes" emake test || die "emake test failed"
103}

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20