Annotation of /trunk/include/php.sminc
Parent Directory
|
Revision Log
Revision 9880 -
(hide annotations)
(download)
Sat Jan 14 01:48:34 2012 UTC (12 years, 4 months ago) by niro
Original Path: trunk/include/php5.sminc
File size: 1623 byte(s)
Sat Jan 14 01:48:34 2012 UTC (12 years, 4 months ago) by niro
Original Path: trunk/include/php5.sminc
File size: 1623 byte(s)
-imported from magellan-next
1 | niro | 2 | # $Header: /magellan-cvs/smage/include/php5.sminc,v 1.2 2007-07-11 17:51:45 niro Exp $ |
2 | |||
3 | # default includes | ||
4 | sminclude mtools | ||
5 | |||
6 | # default extension name if not already given | ||
7 | : ${PHP5_EXTENSION="${PNAME/#php5-/}"} | ||
8 | |||
9 | # some sane default dependencies | ||
10 | DEPEND=">= dev-lang/php5-5.2" | ||
11 | |||
12 | SDEPEND=">= sys-dev/m4-1.4 | ||
13 | >= sys-dev/libtool-1.5" | ||
14 | |||
15 | # default SRCFILE SRCDIR and SRC_URI | ||
16 | : ${SRCFILE="${PNAME/#php5-/}-${PVER}.tar.bz2"} | ||
17 | : ${SRCDIR="${BUILDDIR}/${PNAME/#php5-/}-${PVER}"} | ||
18 | : ${SRC_URI=( mirror://${PNAME}/${SRCFILE} )} | ||
19 | |||
20 | niro | 2160 | php5_phpize() |
21 | { | ||
22 | phpize || die | ||
23 | |||
24 | # regen aclocal, libtoolize etc to fix libtool-2 issues | ||
25 | niro | 2161 | rm -f aclocal.m4 || die |
26 | niro | 2160 | autoreconf --verbose --force --install || die |
27 | mlibtoolize || die | ||
28 | } | ||
29 | |||
30 | niro | 2 | php5_src_prepare() |
31 | { | ||
32 | munpack ${SRCFILE} || die | ||
33 | niro | 2160 | cd ${SRCDIR} |
34 | niro | 2161 | |
35 | niro | 2160 | php5_phpize || die |
36 | niro | 2 | } |
37 | |||
38 | php5_src_configure() | ||
39 | { | ||
40 | local configure_opts="$@" | ||
41 | |||
42 | mconfigure \ | ||
43 | --with-php-config=/usr/bin/php-config \ | ||
44 | ${configure_opts} \ | ||
45 | || die | ||
46 | } | ||
47 | |||
48 | php5_src_compile() | ||
49 | { | ||
50 | cd ${SRCDIR} | ||
51 | php5_src_configure || die | ||
52 | mmake || die | ||
53 | } | ||
54 | |||
55 | php5_src_install() | ||
56 | { | ||
57 | cd ${SRCDIR} | ||
58 | |||
59 | # needed directories | ||
60 | minstalldir /etc/php5/conf.d || die | ||
61 | minstalldir $(php-config --extension-dir) || die | ||
62 | |||
63 | # install extensions and the config ini | ||
64 | minstallexec modules/${PHP5_EXTENSION}.so $(php-config --extension-dir) || die | ||
65 | echo "extension=${PHP5_EXTENSION}.so" \ | ||
66 | > ${BINDIR}/etc/php5/conf.d/${PHP5_EXTENSION}.ini || die | ||
67 | |||
68 | # install docs | ||
69 | local i | ||
70 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
71 | FAQ LICENSE NEWS README TODO | ||
72 | do | ||
73 | if [ -f ${SRCDIR}/${i} ] | ||
74 | then | ||
75 | minstalldocs ${i} || die | ||
76 | fi | ||
77 | done | ||
78 | } | ||
79 | |||
80 | export_inherits php5 src_prepare src_compile src_install |