/[gentoo-alt]/trunk/prefix/eclass/php-ext-source-r1.eclass
Gentoo

Contents of /trunk/prefix/eclass/php-ext-source-r1.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 982 - (show annotations) (download)
Thu Feb 2 04:20:17 2006 UTC (13 years, 2 months ago) by kito
File size: 1688 byte(s)
Initial eclass import from gentoo-x86
1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r1.eclass,v 1.4 2005/11/20 01:35:05 chtekk Exp $
4 #
5 # Author: Tal Peer <coredumb@gentoo.org>
6 # Author: Stuart Herbert <stuart@gentoo.org>
7 # Maintained by the PHP Herd <php-bugs@gentoo.org>
8 #
9 # The php-ext-source-r1 eclass provides a unified interface for compiling and
10 # installing standalone PHP extensions ('modules') from source code.
11 #
12 # To use this eclass, you must add the following to your ebuild:
13 #
14 # inherit php-ext-source-r1
15
16 inherit php-ext-base-r1
17
18 EXPORT_FUNCTIONS src_compile src_install
19
20 # ---begin ebuild configurable settings
21
22 # Wether or not to add a line in the php.ini for the extension
23 # (defaults to "yes" and shouldn't be changed in most cases)
24 [ -z "${PHP_EXT_INI}" ] && PHP_EXT_INI="yes"
25
26 # ---end ebuild configurable settings
27
28 DEPEND="${DEPEND}
29 >=sys-devel/m4-1.4.3
30 >=sys-devel/libtool-1.5.18
31 >=sys-devel/automake-1.9.6
32 sys-devel/automake-wrapper
33 >=sys-devel/autoconf-2.59
34 sys-devel/autoconf-wrapper"
35
36 php-ext-source-r1_src_compile() {
37 # pull in the PHP settings
38 has_php
39 my_conf="${my_conf} --prefix=${PHPPREFIX} --with-php-config=${PHPCONFIG}"
40 addpredict /usr/share/snmp/mibs/.index
41 # phpize creates configure out of config.m4
42 export WANT_AUTOMAKE=1.9 WANT_AUTOCONF=2.5
43 ${PHPIZE}
44 ./configure ${my_conf} || die "Unable to configure code to compile"
45 emake || die "Unable to make code"
46 }
47
48 php-ext-source-r1_src_install() {
49 has_php
50 addpredict /usr/share/snmp/mibs/.index
51 chmod +x build/shtool
52 insinto ${EXT_DIR}
53 doins modules/${PHP_EXT_NAME}.so
54 php-ext-base-r1_src_install
55 }

  ViewVC Help
Powered by ViewVC 1.1.20