Contents of /trunk/extras/php5/php5-5.3.2-r3.smage2
Parent Directory | Revision Log
Revision 5112 -
(show annotations)
(download)
Sun Mar 7 18:43:42 2010 UTC (14 years, 6 months ago) by niro
File size: 15446 byte(s)
Sun Mar 7 18:43:42 2010 UTC (14 years, 6 months ago) by niro
File size: 15446 byte(s)
-whitespaces
1 | # $Id$ |
2 | |
3 | PNAME="php5" |
4 | PVER="5.3.2" |
5 | PBUILD="r3" |
6 | |
7 | PCATEGORIE="dev-lang" |
8 | STATE="unstable" |
9 | |
10 | #DESCRIPTION="PHP Hypertext Preprocessor, a scripting language especially suited for web development." |
11 | HOMEPAGE="http://php.net/" |
12 | |
13 | # ToDO: mcrypt, imap, mhash, maintainer-zts, intl |
14 | SDEPEND=">= net-www/apache2-2.2.14 |
15 | >= sys-libs/ncurses-5.7 |
16 | >= sys-libs/readline-6.0 |
17 | >= sys-libs/zlib-1.2 |
18 | >= app-arch/bzip2-1 |
19 | >= dev-libs/libxml2-2.7 |
20 | >= dev-libs/libxslt-1.1.26 |
21 | >= dev-libs/openssl-0.9.8 |
22 | >= dev-libs/libpcre-8.0 |
23 | >= dev-libs/gmp-4.3 |
24 | >= media-libs/libjpeg-7 |
25 | >= media-libs/libpng-1.2.40 |
26 | >= x11-libs/libXpm-3.5 |
27 | >= media-libs/gd-2.0.35 |
28 | >= media-libs/freetype-2.3 |
29 | >= media-libs/t1lib-5.1 |
30 | >= net-misc/curl-7.19 |
31 | >= app-text/aspell-0.60 |
32 | >= app-text/enchant-1.5 |
33 | >= app-text/htmltidy-1.46 |
34 | >= dev-db/db-4.8 |
35 | >= dev-db/sqlite-3.6 |
36 | >= dev-db/mysql5-5.1 |
37 | >= dev-db/unixodbc-2.2 |
38 | >= net-dns/libidn-1.15 |
39 | >= dev-libs/cyrus-sasl-2.1.23 |
40 | >= net-nds/openldap-2.4 |
41 | >= sys-dev/m4-1.4 |
42 | >= sys-dev/libtool-1.5 |
43 | >= sys-dev/gettext-0.17 |
44 | >= sys-apps/sed-4" |
45 | |
46 | SRCFILE="${PNAME/5/}-${PVER}.tar.bz2" |
47 | SRCDIR="${BUILDDIR}/${PNAME/5/}-${PVER}" |
48 | |
49 | SUHOSIN_PVER="0.9.9.1" |
50 | PHP5_EXTENSIONS_DIR="/usr/$(mlibdir)/${PNAME}/extensions" |
51 | PHP5_PEAR_INSTALLDIR="/usr/share/${PNAME}/pear" |
52 | |
53 | SPLIT_PACKAGES="${PNAME} |
54 | ${PNAME}-cgi |
55 | ${PNAME}-apache |
56 | ${PNAME}-embedded |
57 | ${PNAME}-pear |
58 | ${PNAME}-bcmath |
59 | ${PNAME}-curl |
60 | ${PNAME}-dba |
61 | ${PNAME}-enchant |
62 | ${PNAME}-gd |
63 | ${PNAME}-gmp |
64 | ${PNAME}-ldap |
65 | ${PNAME}-mbstring |
66 | ${PNAME}-pdo |
67 | ${PNAME}-mysql |
68 | ${PNAME}-odbc |
69 | ${PNAME}-process |
70 | ${PNAME}-pspell |
71 | ${PNAME}-soap |
72 | ${PNAME}-sqlite |
73 | ${PNAME}-tidy |
74 | ${PNAME}-xml |
75 | ${PNAME}-xmlrpc" |
76 | |
77 | # splits with more then one module: |
78 | # ${PNAME}-odbc = odbc, pdo_odbc |
79 | # ${PNAME}-mysql = mysql, mysqli, pdo_mysql |
80 | # ${PNAME}-xml = xsl, wddx, dom, xmlreader, xmlwriter |
81 | # ${PNAME}-process = sysvmsg, sysvsem, sysvshm, posix |
82 | # ${PNAME}-sqlite = sqlite, sqlite3, pdo_sqlite |
83 | |
84 | sminclude mtools |
85 | |
86 | SRC_URI=( |
87 | http://de2.php.net/distributions/${SRCFILE} |
88 | http://us2.php.net/distributions/${SRCFILE} |
89 | mirror://${PNAME}/${SRCFILE} |
90 | mirror://${PNAME}/${PNAME}-5.2.4-multilib.patch |
91 | mirror://${PNAME}/${PNAME}-5.2.3-httpd-config.patch |
92 | mirror://${PNAME}/${PNAME}-5.2.4-build-dir.patch |
93 | mirror://${PNAME}/${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch |
94 | mirror://${PNAME}/${PNAME}-${PVER}-phar.patch |
95 | mirror://${PNAME}/php5_module.conf |
96 | ) |
97 | |
98 | # 5.3 stable series |
99 | UP2TAG="5.3" |
100 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'Current.*${UP2TAG}.*Stable' | sed 's/.*\:\ \(.*\)/\1/'" |
101 | |
102 | # install-helper function |
103 | install_php5_extensions() |
104 | { |
105 | local extensions="$@" |
106 | [[ -z ${extensions} ]] && die "no extensions given" |
107 | |
108 | # set default PHP5_BUILD_DIR, env can override this |
109 | : ${PHP5_BUILD_DIR="${BUILDDIR}/build-php"} |
110 | |
111 | cd ${PHP5_BUILD_DIR} |
112 | |
113 | # needed directories |
114 | minstalldir /etc/php5/conf.d || die |
115 | minstalldir ${PHP5_EXTENSIONS_DIR} || die |
116 | |
117 | local ext |
118 | for ext in ${extensions} |
119 | do |
120 | # install extensions and the config ini |
121 | minstallexec modules/${ext}.so ${PHP5_EXTENSIONS_DIR} || die "mod ${ext}" |
122 | echo "extension=${ext}.so" > ${BINDIR}/etc/php5/conf.d/${ext}.ini || die "ini ${ext}" |
123 | done |
124 | } |
125 | |
126 | split_info_php5() |
127 | { |
128 | DESCRIPTION="PHP Hypertext Preprocessor, a scripting language especially suited for web development." |
129 | DEPEND=">= sys-libs/ncurses-5.7 |
130 | >= sys-libs/readline-6.0 |
131 | >= sys-libs/zlib-1.2 |
132 | >= app-arch/bzip2-1 |
133 | >= dev-libs/libxml2-2.7 |
134 | >= dev-libs/openssl-0.9.8 |
135 | >= dev-libs/libpcre-8.0" |
136 | } |
137 | |
138 | split_info_php5-cgi() |
139 | { |
140 | DESCRIPTION="GI and FCGI SAPI for PHP." |
141 | DEPEND="== dev-lang/php5-${PVER} |
142 | >= dev-libs/libxml2-2.7 |
143 | >= dev-libs/libpcre-8" |
144 | } |
145 | |
146 | split_info_php5-apache() |
147 | { |
148 | DESCRIPTION="Apache SAPI for PHP." |
149 | DEPEND="== dev-lang/php5-${PVER} |
150 | >= dev-libs/libxml2-2.7 |
151 | >= dev-libs/libpcre-8 |
152 | >= net-www/apache2-2.2" |
153 | } |
154 | |
155 | split_info_php5-embedded() |
156 | { |
157 | DESCRIPTION="PHP library for embedding in applications." |
158 | DEPEND="== dev-lang/php5-${PVER} |
159 | >= dev-libs/libxml2-2.7 |
160 | >= dev-libs/libpcre-8" |
161 | } |
162 | |
163 | split_info_php5-pear() |
164 | { |
165 | DESCRIPTION="PHP Extension and Application Repository." |
166 | DEPEND="== dev-lang/php5-${PVER}" |
167 | } |
168 | |
169 | split_info_php5-bcmath() |
170 | { |
171 | DESCRIPTION="A module for PHP applications for using the bcmath library." |
172 | DEPEND="== dev-lang/php5-${PVER}" |
173 | } |
174 | |
175 | split_info_php5-curl() |
176 | { |
177 | DESCRIPTION="A module for PHP applications that use curl." |
178 | DEPEND="== dev-lang/php5-${PVER} |
179 | >= net-dns/libidn-1.15 |
180 | >= net-misc/curl-7 |
181 | >= net-nds/openldap-2.4" |
182 | } |
183 | |
184 | split_info_php5-dba() |
185 | { |
186 | DESCRIPTION="A database abstraction layer module for PHP applications." |
187 | DEPEND="== dev-lang/php5-${PVER}" |
188 | } |
189 | |
190 | split_info_php5-enchant() |
191 | { |
192 | DESCRIPTION="Human Language and Character Encoding Support." |
193 | DEPEND="== dev-lang/php5-${PVER} |
194 | >= app-text/enchant-1.5" |
195 | } |
196 | |
197 | split_info_php5-gd() |
198 | { |
199 | DESCRIPTION="A module for PHP applications for using the gd graphics library." |
200 | DEPEND="== dev-lang/php5-${PVER} |
201 | >= media-libs/libjpeg-7 |
202 | >= media-libs/libpng-1.2.40 |
203 | >= x11-libs/libXpm-3.5 |
204 | >= media-libs/freetype-2.3 |
205 | >= media-libs/t1lib-5.1 |
206 | >= media-libs/gd-2.0.35" |
207 | } |
208 | |
209 | split_info_php5-gmp() |
210 | { |
211 | DESCRIPTION="A module for PHP applications for using the gmp library." |
212 | DEPEND="== dev-lang/php5-${PVER} |
213 | >= dev-libs/gmp-4.3" |
214 | } |
215 | |
216 | split_info_php5-ldap() |
217 | { |
218 | DESCRIPTION="A module for PHP applications that use LDAP." |
219 | DEPEND="== dev-lang/php5-${PVER} |
220 | >= dev-libs/cyrus-sasl-2.1.23 |
221 | >= net-nds/openldap-2.4" |
222 | } |
223 | |
224 | split_info_php5-mbstring() |
225 | { |
226 | DESCRIPTION="A module for PHP applications which need multi-byte string handling." |
227 | DEPEND="== dev-lang/php5-${PVER}" |
228 | } |
229 | |
230 | split_info_php5-mysql() |
231 | { |
232 | DESCRIPTION="Modules for PHP applications that use MySQL databases." |
233 | DEPEND="== dev-lang/php5-${PVER} |
234 | == dev-lang/php5-pdo-${PVER} |
235 | >= dev-db/mysql5-5.1" |
236 | } |
237 | |
238 | split_info_php5-odbc() |
239 | { |
240 | DESCRIPTION="Modules for PHP applications that use ODBC databases." |
241 | DEPEND="== dev-lang/php5-${PVER} |
242 | == dev-lang/php5-pdo-${PVER} |
243 | >= dev-db/unixodbc-2.2" |
244 | } |
245 | |
246 | split_info_php5-pdo() |
247 | { |
248 | DESCRIPTION="A database access abstraction module for PHP applications." |
249 | DEPEND="== dev-lang/php5-${PVER}" |
250 | } |
251 | |
252 | split_info_php5-process() |
253 | { |
254 | DESCRIPTION="Modules for PHP script using system process interfaces." |
255 | DEPEND="== dev-lang/php5-${PVER}" |
256 | } |
257 | |
258 | split_info_php5-pspell() |
259 | { |
260 | DESCRIPTION="A module for PHP applications for using pspell interfaces." |
261 | DEPEND="== dev-lang/php5-${PVER} |
262 | >= app-text/aspell-0.60" |
263 | } |
264 | |
265 | split_info_php5-soap() |
266 | { |
267 | DESCRIPTION="A module for PHP applications that use the SOAP protocol." |
268 | DEPEND="== dev-lang/php5-${PVER} |
269 | >= dev-libs/libxml2-2.7" |
270 | } |
271 | |
272 | split_info_php5-sqlite() |
273 | { |
274 | DESCRIPTION="Modules for PHP applications that use SQLite databases." |
275 | DEPEND="== dev-lang/php5-${PVER} |
276 | == dev-lang/php5-pdo-${PVER} |
277 | >= dev-db/sqlite-3.6" |
278 | } |
279 | |
280 | split_info_php5-tidy() |
281 | { |
282 | DESCRIPTION="Standard PHP module provides tidy library support." |
283 | DEPEND="== dev-lang/php5-${PVER} |
284 | >= app-text/htmltidy-1.46" |
285 | } |
286 | |
287 | split_info_php5-xml() |
288 | { |
289 | DESCRIPTION="Modules for PHP applications which use XML." |
290 | DEPEND="== dev-lang/php5-${PVER} |
291 | >= dev-libs/libxml2-2.7 |
292 | >= dev-libs/libxslt-1.1.26" |
293 | } |
294 | |
295 | split_info_php5-xmlrpc() |
296 | { |
297 | DESCRIPTION="A module for PHP applications which use the XML-RPC protocol." |
298 | DEPEND="== dev-lang/php5-${PVER} |
299 | >= dev-libs/libxml2-2.7" |
300 | } |
301 | |
302 | src_prepare() |
303 | { |
304 | munpack ${SRCFILE} || die |
305 | cd ${SRCDIR} |
306 | |
307 | # version branding |
308 | sed -i "s:^\(EXTRA_VERSION=\).*:\1-magellan-${PBUILD}:" configure.in || die |
309 | |
310 | # fixes multilib search pathes |
311 | mpatch ${PNAME}-5.2.4-multilib.patch || die |
312 | |
313 | # do not touch the system httpd.conf |
314 | mpatch ${PNAME}-5.2.3-httpd-config.patch || die |
315 | |
316 | # fixes build dir -> /usr/lib/php5/build |
317 | mpatch ${PNAME}-5.2.4-build-dir.patch || die |
318 | |
319 | # hardend php core patch |
320 | # see: http://www.hardened-php.net/suhosin/index.html |
321 | mpatch ${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch || die |
322 | |
323 | # fix phar install issues, see http://bugs.php.net/50578 |
324 | mpatch ${PNAME}-${PVER}-phar.patch || die |
325 | |
326 | # fully regenerate aclocal too |
327 | rm aclocal.m4 || die |
328 | |
329 | # rebuild configure |
330 | autoreconf --force --install --verbose || die |
331 | |
332 | # force use of system libtool |
333 | mlibtoolize || die |
334 | } |
335 | |
336 | src_compile() |
337 | { |
338 | local php_base_config |
339 | local php_extensions |
340 | local current_run |
341 | |
342 | # --with-libdir needed, doesn't honor --libdir |
343 | php_base_config="--with-libdir=$(mlibdir) \ |
344 | --with-config-file-path=/etc/php5 \ |
345 | --with-config-file-scan-dir=/etc/php5/conf.d \ |
346 | --enable-inline-optimization \ |
347 | --enable-discard-path \ |
348 | --disable-debug \ |
349 | --disable-static \ |
350 | --enable-shared \ |
351 | --without-pear" |
352 | |
353 | php_extensions="--with-zlib \ |
354 | --with-bz2=shared \ |
355 | --enable-bcmath=shared \ |
356 | --enable-calendar=shared \ |
357 | --enable-exif=shared \ |
358 | --enable-ftp=shared \ |
359 | --with-gettext=shared \ |
360 | --enable-mbstring=shared \ |
361 | --enable-mbregex \ |
362 | --with-ncurses=shared \ |
363 | --with-openssl=shared \ |
364 | --with-gd=shared,/usr \ |
365 | --enable-gd-native-ttf \ |
366 | --with-freetype-dir=shared,/usr \ |
367 | --with-ttf \ |
368 | --with-t1lib=/usr \ |
369 | --with-pcre-regex \ |
370 | --with-gmp=shared \ |
371 | --with-curl=shared \ |
372 | --with-curlwrappers \ |
373 | --enable-dba=shared \ |
374 | --with-db4=shared \ |
375 | --with-mysql=shared \ |
376 | --with-mysqli=shared \ |
377 | --with-unixODBC=shared,/usr \ |
378 | --with-sqlite=shared \ |
379 | --with-sqlite3=shared \ |
380 | --enable-pdo=shared \ |
381 | --with-pdo-odbc=shared,unixODBC,/usr \ |
382 | --with-pdo-mysql=shared,/usr \ |
383 | --with-pdo-sqlite=shared,/usr \ |
384 | --enable-dbase=shared \ |
385 | --enable-dom=shared \ |
386 | --with-xmlrpc=shared \ |
387 | --enable-xmlreader=shared \ |
388 | --enable-xmlwriter=shared \ |
389 | --with-xsl=shared,/usr \ |
390 | --enable-wddx=shared \ |
391 | --enable-soap=shared \ |
392 | --enable-json=shared \ |
393 | --enable-zip=shared \ |
394 | --enable-phar=shared \ |
395 | --enable-posix=shared \ |
396 | --enable-fileinfo=shared \ |
397 | --enable-sockets=shared \ |
398 | --enable-sysvsem=shared \ |
399 | --enable-sysvshm=shared \ |
400 | --enable-sysvmsg=shared \ |
401 | --with-tidy=shared \ |
402 | --with-ldap=shared \ |
403 | --with-ldap-sasl \ |
404 | --with-enchant=shared \ |
405 | --with-pspell=shared" |
406 | # ToDo: |
407 | # --with-mcrypt=shared \ |
408 | # --with-mhash=shared \ |
409 | # --with-imap=shared \ |
410 | # --with-imap-ssl \ |
411 | # --enable-maintainer-zts <- threaded apache2 support |
412 | |
413 | |
414 | # |
415 | # build php: |
416 | # |
417 | |
418 | # prepare build outside of the SRCDIR |
419 | install -d ${BUILDDIR}/build-php |
420 | cd ${BUILDDIR}/build-php |
421 | ln -snf ${SRCDIR}/configure |
422 | |
423 | mconfigure \ |
424 | --srcdir=${SRCDIR} \ |
425 | ${php_base_config} \ |
426 | --disable-cgi \ |
427 | --with-readline \ |
428 | ${php_extensions} \ |
429 | || die |
430 | |
431 | mmake || die |
432 | |
433 | |
434 | # |
435 | # build cgi/fastcgi |
436 | # |
437 | |
438 | # prepare build with the previous run, to save a lot of time |
439 | current_run=cgi |
440 | cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run} |
441 | cd ${BUILDDIR}/build-${current_run} |
442 | |
443 | mconfigure \ |
444 | --srcdir=${SRCDIR} \ |
445 | ${php_base_config} \ |
446 | --enable-cgi \ |
447 | --enable-force-cgi-redirect \ |
448 | --enable-fastcgi \ |
449 | --disable-cli \ |
450 | ${php_extensions} \ |
451 | || die |
452 | |
453 | mmake || die |
454 | |
455 | |
456 | # |
457 | # build apache mod |
458 | # |
459 | |
460 | # prepare build with the previous run, to save a lot of time |
461 | current_run=apache |
462 | cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run} |
463 | cd ${BUILDDIR}/build-${current_run} |
464 | |
465 | mconfigure \ |
466 | --srcdir=${SRCDIR} \ |
467 | ${php_base_config} \ |
468 | --with-apxs2 \ |
469 | --disable-cli \ |
470 | ${php_extensions} \ |
471 | || die |
472 | |
473 | mmake || die |
474 | |
475 | |
476 | # |
477 | # build embedded |
478 | # |
479 | |
480 | # prepare build with the previous run, to save a lot of time |
481 | current_run=embedded |
482 | cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run} |
483 | cd ${BUILDDIR}/build-${current_run} |
484 | |
485 | mconfigure \ |
486 | --srcdir=${SRCDIR} \ |
487 | ${php_base_config} \ |
488 | --enable-embed=shared \ |
489 | --disable-cli \ |
490 | ${php_extensions} \ |
491 | || die |
492 | |
493 | mmake || die |
494 | |
495 | |
496 | # |
497 | # build pear |
498 | # |
499 | |
500 | # prepare build with the previous run, to save a lot of time |
501 | current_run=pear |
502 | cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run} |
503 | cd ${BUILDDIR}/build-${current_run} |
504 | |
505 | mconfigure \ |
506 | --srcdir=${SRCDIR} \ |
507 | ${php_base_config} \ |
508 | --disable-cgi \ |
509 | --with-readline \ |
510 | --enable-pcntl \ |
511 | --with-pear \ |
512 | ${php_extensions} \ |
513 | || die |
514 | |
515 | mmake || die |
516 | } |
517 | |
518 | src_install_php5() |
519 | { |
520 | cd ${BUILDDIR}/build-php |
521 | mmake -j1 INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP5_EXTENSIONS_DIR} PEAR_INSTALLDIR=${PHP5_PEAR_INSTALLDIR} install || die |
522 | |
523 | # fix a broken symlink |
524 | mlink phar.phar /usr/bin/phar || die |
525 | |
526 | local php_ini=${SRCDIR}/php.ini-production |
527 | |
528 | # php config |
529 | minstalldir /etc/php5/conf.d || die |
530 | # remove windows remark |
531 | sed -i -e '/^; extension_dir = "ext"/d' -e '/^; On windows:$/d' ${php_ini} || die |
532 | # fix extensions dir location |
533 | sed -i "s:^; \(extension_dir =\).*:\1 ${PHP5_EXTENSIONS_DIR}:" ${php_ini} || die |
534 | # allow short php open-tags |
535 | sed -i "s:^\(short_open_tag =\).*:\1 On:" ${php_ini} || die |
536 | minstallfile ${php_ini} /etc/php5/php.ini || die |
537 | |
538 | # fix extension_dir also in phmp-config |
539 | sed -i "s:^\(extension_dir=\).*:\1${PHP5_EXTENSIONS_DIR}:" ${BINDIR}/usr/bin/php-config || die |
540 | |
541 | # remove all extensions provided by other split-packages |
542 | local ext |
543 | for ext in curl bcmath dba enchant gd gmp ldap mbstring mysql mysqli \ |
544 | pdo_mysql odbc pdo_odbc pdo pspell sqlite sqlite3 pdo_sqlite \ |
545 | soap sysvmsg sysvsem sysvshm posix tidy xsl wddx dom xmlreader \ |
546 | xmlwriter xmlrpc |
547 | do |
548 | rm ${BINDIR}/${PHP5_EXTENSIONS_DIR}/${ext}.so || die ${ext} |
549 | done |
550 | |
551 | # remove all static extensions too |
552 | rm ${BINDIR}/${PHP5_EXTENSIONS_DIR}/*.a || die |
553 | |
554 | # enable all default extensions |
555 | local i |
556 | for i in $(ls ${BINDIR}/${PHP5_EXTENSIONS_DIR}/*.so | sort ) |
557 | do |
558 | echo "extension=$(basename ${i})" \ |
559 | > ${BINDIR}/etc/php5/conf.d/$(basename ${i} .so).ini || die |
560 | done |
561 | |
562 | # disable config-protoct for modules conf dir |
563 | minstalldir /etc/env.d || die |
564 | echo 'CONFIG_PROTECT_MASK="/etc/php5/conf.d"' > ${BINDIR}/etc/env.d/30php5 || die |
565 | |
566 | minstalldocs CREDITS CODING_STANDARDS EXTENSIONS LICENSE NEWS README* TODO* || die |
567 | } |
568 | |
569 | src_install_php5-cgi() |
570 | { |
571 | cd ${BUILDDIR}/build-cgi |
572 | minstallexec sapi/cgi/php-cgi || die |
573 | } |
574 | |
575 | src_install_php5-apache() |
576 | { |
577 | cd ${BUILDDIR}/build-apache |
578 | |
579 | # install apache sapi |
580 | local APACHE_MOD_DIR="$(apxs -q LIBEXECDIR)" |
581 | minstalldir ${APACHE_MOD_DIR} || die |
582 | minstallexec libs/libphp5.so ${APACHE_MOD_DIR} || die |
583 | |
584 | # install apache module config |
585 | local APACHE_SYSCONFDIR="$(apxs -q SYSCONFDIR)" |
586 | minstalldir ${APACHE_SYSCONFDIR}/modules.d || die |
587 | minstallfile -s php5_module.conf ${APACHE_SYSCONFDIR}/modules.d/php5.conf || die |
588 | } |
589 | |
590 | src_install_php5-embedded() |
591 | { |
592 | cd ${BUILDDIR}/build-embedded |
593 | |
594 | # install sapi library |
595 | minstalldir /usr/$(mlibdir) || die |
596 | minstallexec libs/libphp5.so /usr/$(mlibdir)/libphp5.so || die |
597 | |
598 | # install include |
599 | minstalldir /usr/include/${PNAME}/sapi/embed || die |
600 | minstallfile ${SRCDIR}/sapi/embed/php_embed.h /usr/include/${PNAME}/sapi/embed || die |
601 | } |
602 | |
603 | src_install_php5-pear() |
604 | { |
605 | cd ${BUILDDIR}/build-pear |
606 | mmake INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP5_EXTENSIONS_DIR} PEAR_INSTALLDIR=${PHP5_PEAR_INSTALLDIR} install-pear || die |
607 | |
608 | local i |
609 | for i in $(find ${BINDIR}/ -name '.*') |
610 | do |
611 | if [[ -e ${i} ]] |
612 | then |
613 | rm -rf ${i} || die ${i} |
614 | fi |
615 | done |
616 | } |
617 | |
618 | # being a little tricky here: |
619 | for subpackage in ${SPLIT_PACKAGES} |
620 | do |
621 | # exclude all other packages than php5-addon-modules |
622 | case ${subpackage} in |
623 | php5) continue ;; |
624 | php5-cgi) continue ;; |
625 | php5-apache) continue ;; |
626 | php5-embedded) continue ;; |
627 | php5-pear) continue ;; |
628 | esac |
629 | |
630 | eval "src_install_${subpackage}(){ install_php5_extensions ${subpackage#*-} || die; }" |
631 | done |
632 | |
633 | # exceptions |
634 | src_install_php5-mysql() |
635 | { |
636 | install_php5_extensions mysql mysqli pdo_mysql || die |
637 | } |
638 | |
639 | src_install_php5-odbc() |
640 | { |
641 | install_php5_extensions odbc pdo_odbc || die |
642 | } |
643 | |
644 | src_install_php5-process() |
645 | { |
646 | install_php5_extensions sysvmsg sysvsem sysvshm posix || die |
647 | } |
648 | |
649 | src_install_php5-sqlite() |
650 | { |
651 | install_php5_extensions sqlite sqlite3 pdo_sqlite || die |
652 | } |
653 | |
654 | src_install_php5-xml() |
655 | { |
656 | install_php5_extensions dom wddx xmlreader xmlwriter xsl || die |
657 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |