Magellan Linux

Contents of /branches/R11-stable/extras/php/php-5.4.10-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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