Annotation of /trunk/include/php.sminc
Parent Directory | Revision Log
Revision 2160 -
(hide annotations)
(download)
Mon Jul 6 18:57:33 2009 UTC (15 years, 3 months ago) by niro
Original Path: trunk/core/include/php5.sminc
File size: 1655 byte(s)
Mon Jul 6 18:57:33 2009 UTC (15 years, 3 months ago) by niro
Original Path: trunk/core/include/php5.sminc
File size: 1655 byte(s)
-fixed libtool2 issues
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 | if [[ -f aclocal.m4 ]] | ||
26 | then | ||
27 | rm aclocal.m4 || die | ||
28 | fi | ||
29 | |||
30 | autoreconf --verbose --force --install || die | ||
31 | mlibtoolize || die | ||
32 | } | ||
33 | |||
34 | niro | 2 | php5_src_prepare() |
35 | { | ||
36 | munpack ${SRCFILE} || die | ||
37 | niro | 2160 | cd ${SRCDIR} |
38 | php5_phpize || die | ||
39 | niro | 2 | } |
40 | |||
41 | php5_src_configure() | ||
42 | { | ||
43 | local configure_opts="$@" | ||
44 | |||
45 | mconfigure \ | ||
46 | --with-php-config=/usr/bin/php-config \ | ||
47 | ${configure_opts} \ | ||
48 | || die | ||
49 | } | ||
50 | |||
51 | php5_src_compile() | ||
52 | { | ||
53 | cd ${SRCDIR} | ||
54 | php5_src_configure || die | ||
55 | mmake || die | ||
56 | } | ||
57 | |||
58 | php5_src_install() | ||
59 | { | ||
60 | cd ${SRCDIR} | ||
61 | |||
62 | # needed directories | ||
63 | minstalldir /etc/php5/conf.d || die | ||
64 | minstalldir $(php-config --extension-dir) || die | ||
65 | |||
66 | # install extensions and the config ini | ||
67 | minstallexec modules/${PHP5_EXTENSION}.so $(php-config --extension-dir) || die | ||
68 | echo "extension=${PHP5_EXTENSION}.so" \ | ||
69 | > ${BINDIR}/etc/php5/conf.d/${PHP5_EXTENSION}.ini || die | ||
70 | |||
71 | # install docs | ||
72 | local i | ||
73 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
74 | FAQ LICENSE NEWS README TODO | ||
75 | do | ||
76 | if [ -f ${SRCDIR}/${i} ] | ||
77 | then | ||
78 | minstalldocs ${i} || die | ||
79 | fi | ||
80 | done | ||
81 | } | ||
82 | |||
83 | export_inherits php5 src_prepare src_compile src_install |