Magellan Linux

Annotation of /branches/R11-unstable/include/php.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32899 - (hide annotations) (download)
Mon Apr 29 14:06:55 2019 UTC (5 years ago) by niro
File size: 1939 byte(s)
-release unstable
1 niro 13929 # $Id$
2 niro 2
3     # default includes
4     sminclude mtools
5    
6     # default extension name if not already given
7 niro 13929 : ${PHP_EXTENSION="${PNAME/#php-/}"}
8 niro 2
9 niro 13929 # default config locations
10     : ${PHP_CONFIG_DIR="/etc/php"}
11     : ${PHP_CONFIG_SCAN_DIR="/etc/php/conf.d"}
12     : ${PHP_EXTENSIONS_DIR="/usr/$(mlibdir)/php/extensions"}
13     : ${PHP_PEAR_DIR="/usr/share/php/pear"}
14    
15 niro 2 # some sane default dependencies
16 niro 27428 # but do not include on the php pkg itself
17     if [[ ${PNAME} != php ]]
18     then
19     DEPEND="${DEPEND}
20     >= dev-lang/php-5.4"
21     fi
22 niro 2
23 niro 22055 SDEPEND="${SDEPEND}
24     >= sys-dev/m4-1.4
25 niro 2 >= sys-dev/libtool-1.5"
26    
27     # default SRCFILE SRCDIR and SRC_URI
28 niro 13929 : ${SRCFILE="${PNAME/#php-/}-${PVER}.tar.bz2"}
29     : ${SRCDIR="${BUILDDIR}/${PNAME/#php-/}-${PVER}"}
30 niro 2 : ${SRC_URI=( mirror://${PNAME}/${SRCFILE} )}
31    
32 niro 13929 php_phpize()
33 niro 2160 {
34     phpize || die
35    
36     # regen aclocal, libtoolize etc to fix libtool-2 issues
37 niro 13929 if [ -f aclocal.m4 ]
38     then
39     rm aclocal.m4 || die
40     fi
41     mautoreconf || die
42 niro 2160 mlibtoolize || die
43     }
44    
45 niro 13929 php_src_prepare()
46 niro 2 {
47     munpack ${SRCFILE} || die
48 niro 2160 cd ${SRCDIR}
49 niro 2161
50 niro 13929 php_phpize || die
51 niro 2 }
52    
53 niro 13929 php_src_configure()
54 niro 2 {
55     local configure_opts="$@"
56    
57     mconfigure \
58     --with-php-config=/usr/bin/php-config \
59     ${configure_opts} \
60     || die
61     }
62    
63 niro 13929 php_src_compile()
64 niro 2 {
65     cd ${SRCDIR}
66 niro 13929 php_src_configure || die
67 niro 2 mmake || die
68     }
69    
70 niro 13929 php_src_check()
71 niro 2 {
72     cd ${SRCDIR}
73 niro 13929 mmake -k check || die
74     }
75 niro 2
76 niro 13929 php_src_install()
77     {
78     cd ${SRCDIR}
79    
80 niro 2 # needed directories
81 niro 13929 minstalldir ${PHP_CONFIG_SCAN_DIR} || die
82 niro 2 minstalldir $(php-config --extension-dir) || die
83    
84     # install extensions and the config ini
85 niro 13929 minstallexec modules/${PHP_EXTENSION}.so $(php-config --extension-dir) || die
86     local MCONFIG="${PHP_CONFIG_SCAN_DIR}/${PHP_EXTENSION}.ini"
87     mclearconfig || die
88     maddconfig "extension=${PHP_EXTENSION}.so" || die
89 niro 2
90     # install docs
91     local i
92     for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
93     FAQ LICENSE NEWS README TODO
94     do
95     if [ -f ${SRCDIR}/${i} ]
96     then
97     minstalldocs ${i} || die
98     fi
99     done
100     }
101    
102 niro 13929 export_inherits php src_prepare src_compile src_check src_install