Contents of /trunk/include/php.sminc
Parent Directory
|
Revision Log
Revision 2161 -
(show annotations)
(download)
Mon Jul 6 18:59:20 2009 UTC (14 years, 10 months ago) by niro
Original Path: trunk/core/include/php5.sminc
File size: 1623 byte(s)
Mon Jul 6 18:59:20 2009 UTC (14 years, 10 months ago) by niro
Original Path: trunk/core/include/php5.sminc
File size: 1623 byte(s)
-fixed libtool2 issues
1 | # $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 | php5_phpize() |
21 | { |
22 | phpize || die |
23 | |
24 | # regen aclocal, libtoolize etc to fix libtool-2 issues |
25 | rm -f aclocal.m4 || die |
26 | autoreconf --verbose --force --install || die |
27 | mlibtoolize || die |
28 | } |
29 | |
30 | php5_src_prepare() |
31 | { |
32 | munpack ${SRCFILE} || die |
33 | cd ${SRCDIR} |
34 | |
35 | php5_phpize || die |
36 | } |
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 |