Magellan Linux

Contents of /trunk/extras/php/php-5.6.19-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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