Gentoo Archives: gentoo-commits

From: "Ole Markus With (olemarkus)" <olemarkus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/php: php-5.3.9_rc4.ebuild ChangeLog php-5.4.0_rc4.ebuild
Date: Sat, 24 Dec 2011 08:54:11
Message-Id: 20111224085400.32BEF2004B@flycatcher.gentoo.org
1 olemarkus 11/12/24 08:54:00
2
3 Modified: ChangeLog
4 Added: php-5.3.9_rc4.ebuild php-5.4.0_rc4.ebuild
5 Log:
6 Bumping php release candidates
7
8 (Portage version: 2.2.0_alpha71/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.534 dev-lang/php/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.534&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.534&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?r1=1.533&r2=1.534
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v
20 retrieving revision 1.533
21 retrieving revision 1.534
22 diff -u -r1.533 -r1.534
23 --- ChangeLog 23 Dec 2011 17:16:42 -0000 1.533
24 +++ ChangeLog 24 Dec 2011 08:54:00 -0000 1.534
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-lang/php
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.533 2011/12/23 17:16:42 olemarkus Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.534 2011/12/24 08:54:00 olemarkus Exp $
30 +
31 +*php-5.4.0_rc4 (24 Dec 2011)
32 +*php-5.3.9_rc4 (24 Dec 2011)
33 +
34 + 24 Dec 2011; Ole Markus With <olemarkus@g.o> +php-5.3.9_rc4.ebuild,
35 + +php-5.4.0_rc4.ebuild:
36 + Bumping php release candidates
37
38 23 Dec 2011; Ole Markus With <olemarkus@g.o>
39 files/eblits/src_configure-v53.eblit:
40
41
42
43 1.1 dev-lang/php/php-5.3.9_rc4.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.3.9_rc4.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.3.9_rc4.ebuild?rev=1.1&content-type=text/plain
47
48 Index: php-5.3.9_rc4.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.3.9_rc4.ebuild,v 1.1 2011/12/24 08:54:00 olemarkus Exp $
53
54 EAPI=4
55
56 PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
57
58 inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
59
60 SUHOSIN_VERSION="5.3.7-0.9.10"
61 FPM_VERSION="builtin"
62 EXPECTED_TEST_FAILURES=""
63
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
65
66 function php_get_uri ()
67 {
68 case "${1}" in
69 "php-pre")
70 echo "http://downloads.php.net/johannes/${2}"
71 ;;
72 "php")
73 echo "http://www.php.net/distributions/${2}"
74 ;;
75 "suhosin")
76 echo "http://download.suhosin.org/${2}"
77 ;;
78 "olemarkus")
79 echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
80 ;;
81 "gentoo")
82 echo "mirror://gentoo/${2}"
83 ;;
84 *)
85 die "unhandled case in php_get_uri"
86 ;;
87 esac
88 }
89
90 PHP_MV="$(get_major_version)"
91
92 # alias, so we can handle different types of releases (finals, rcs, alphas,
93 # betas, ...) w/o changing the whole ebuild
94 PHP_PV="${PV/_rc/RC}"
95 PHP_RELEASE="php-pre"
96 PHP_P="${PN}-${PHP_PV}"
97
98 PHP_PATCHSET_LOC="olemarkus"
99
100 PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
101
102 PHP_PATCHSET="0"
103 PHP_PATCHSET_URI="
104 $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
105
106 PHP_FPM_INIT_VER="4"
107 PHP_FPM_CONF_VER="1"
108
109 if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
110 # in some cases we use our own suhosin patch (very recent version,
111 # patch conflicts, etc.)
112 SUHOSIN_TYPE="gentoo"
113 else
114 SUHOSIN_TYPE="suhosin"
115 fi
116
117 if [[ -n ${SUHOSIN_VERSION} ]]; then
118 SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
119 SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
120 fi
121
122 SRC_URI="
123 ${PHP_SRC_URI}
124 ${PHP_PATCHSET_URI}"
125
126 if [[ -n ${SUHOSIN_VERSION} ]]; then
127 SRC_URI="${SRC_URI}
128 suhosin? ( ${SUHOSIN_URI} )"
129 fi
130
131 DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
132 HOMEPAGE="http://php.net/"
133 LICENSE="PHP-3"
134
135 SLOT="$(get_version_component_range 1-2)"
136 S="${WORKDIR}/${PHP_P}"
137
138 # We can build the following SAPIs in the given order
139 SAPIS="embed cli cgi fpm apache2"
140
141 # Gentoo-specific, common features
142 IUSE="kolab"
143
144 # SAPIs and SAPI-specific USE flags (cli SAPI is default on):
145 IUSE="${IUSE}
146 ${SAPIS/cli/+cli}
147 threads"
148
149 IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
150 crypt +ctype curl curlwrappers debug doc
151 enchant exif frontbase +fileinfo +filter firebird
152 flatfile ftp gd gdbm gmp +hash +iconv imap inifile
153 intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
154 mssql mysql mysqlnd mysqli nls
155 oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
156 readline recode +session sharedmem
157 +simplexml snmp soap sockets spell sqlite sqlite3 ssl
158 sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
159 +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
160
161 # Enable suhosin if available
162 [[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
163
164 DEPEND="!dev-lang/php:5
165 >=app-admin/eselect-php-0.6.2
166 >=dev-libs/libpcre-8.12[unicode]
167 apache2? ( www-servers/apache[threads=] )
168 berkdb? ( =sys-libs/db-4* )
169 bzip2? ( app-arch/bzip2 )
170 cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
171 cjk? ( !gd? (
172 virtual/jpeg
173 media-libs/libpng
174 sys-libs/zlib
175 ) )
176 crypt? ( >=dev-libs/libmcrypt-2.4 )
177 curl? ( >=net-misc/curl-7.10.5 )
178 enchant? ( app-text/enchant )
179 exif? ( !gd? (
180 virtual/jpeg
181 media-libs/libpng
182 sys-libs/zlib
183 ) )
184 firebird? ( dev-db/firebird )
185 gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
186 gdbm? ( >=sys-libs/gdbm-1.8.0 )
187 gmp? ( >=dev-libs/gmp-4.1.2 )
188 iconv? ( virtual/libiconv )
189 imap? ( virtual/imap-c-client[ssl=] )
190 intl? ( dev-libs/icu )
191 iodbc? ( dev-db/libiodbc )
192 kerberos? ( virtual/krb5 )
193 kolab? ( >=net-libs/c-client-2004g-r1 )
194 ldap? ( >=net-nds/openldap-1.2.11 )
195 ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
196 libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
197 mssql? ( dev-db/freetds[mssql] )
198 !mysqlnd? (
199 mysql? ( virtual/mysql )
200 mysqli? ( >=virtual/mysql-4.1 )
201 )
202 nls? ( sys-devel/gettext )
203 oci8-instant-client? ( dev-db/oracle-instantclient-basic )
204 odbc? ( >=dev-db/unixODBC-1.8.13 )
205 postgres? ( dev-db/postgresql-base )
206 qdbm? ( dev-db/qdbm )
207 readline? ( sys-libs/readline )
208 recode? ( app-text/recode )
209 sharedmem? ( dev-libs/mm )
210 simplexml? ( >=dev-libs/libxml2-2.6.8 )
211 snmp? ( >=net-analyzer/net-snmp-5.2 )
212 soap? ( >=dev-libs/libxml2-2.6.8 )
213 spell? ( >=app-text/aspell-0.50 )
214 sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
215 sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
216 ssl? ( >=dev-libs/openssl-0.9.7 )
217 sybase-ct? ( dev-db/freetds )
218 tidy? ( app-text/htmltidy )
219 truetype? (
220 =media-libs/freetype-2*
221 >=media-libs/t1lib-5.0.0
222 !gd? (
223 virtual/jpeg media-libs/libpng sys-libs/zlib )
224 )
225 unicode? ( dev-libs/oniguruma )
226 wddx? ( >=dev-libs/libxml2-2.6.8 )
227 xml? ( >=dev-libs/libxml2-2.6.8 )
228 xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
229 xmlreader? ( >=dev-libs/libxml2-2.6.8 )
230 xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
231 xpm? (
232 x11-libs/libXpm
233 virtual/jpeg
234 media-libs/libpng sys-libs/zlib
235 )
236 xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
237 zip? ( sys-libs/zlib )
238 zlib? ( sys-libs/zlib )
239 virtual/mta
240 "
241
242 php="=${CATEGORY}/${PF}"
243
244 REQUIRED_USE="
245 truetype? ( gd )
246 cjk? ( gd )
247 exif? ( gd )
248
249 xpm? ( gd )
250 gd? ( zlib )
251 simplexml? ( xml )
252 soap? ( xml )
253 wddx? ( xml )
254 xmlrpc? ( || ( xml iconv ) )
255 xmlreader? ( xml )
256 xsl? ( xml )
257 ldap-sasl? ( ldap )
258 kolab? ( imap )
259 mhash? ( hash )
260 phar? ( hash )
261 mysqlnd? ( || (
262 mysql
263 mysqli
264 pdo
265 ) )
266
267 qdbm? ( !gdbm )
268 readline? ( !libedit )
269 recode? ( !imap !mysql !mysqli )
270 sharedmem? ( !threads )
271
272 !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
273
274 DEPEND="${DEPEND}
275 enchant? ( !dev-php5/pecl-enchant )
276 fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
277 filter? ( !dev-php5/pecl-filter )
278 json? ( !dev-php5/pecl-json )
279 phar? ( !dev-php5/pecl-phar )
280 zip? ( !dev-php5/pecl-zip )"
281
282 [[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
283 =${CATEGORY}/${PN}-${SLOT}*[unicode] )"
284
285 RDEPEND="${DEPEND}"
286
287 DEPEND="${DEPEND}
288 sys-devel/flex
289 >=sys-devel/m4-1.4.3
290 >=sys-devel/libtool-1.5.18"
291
292 # They are in PDEPEND because we need PHP installed first!
293 PDEPEND="doc? ( app-doc/php-docs )"
294
295 # No longer depend on the extension. The suhosin USE flag only installs the
296 # patch
297 #[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
298
299 # Allow users to install production version if they want to
300
301 case "${PHP_INI_VERSION}" in
302 production|development)
303 ;;
304 *)
305 PHP_INI_VERSION="development"
306 ;;
307 esac
308
309 PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
310 PHP_INI_FILE="php.ini"
311
312 want_apache
313
314 # eblit-core
315 # Usage: <function> [version] [eval]
316 # Main eblit engine
317 eblit-core() {
318 [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
319 local e v func=$1 ver=$2 eval_=$3
320 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
321 e="${FILESDIR}/eblits/${func}${v}.eblit"
322 if [[ -e ${e} ]] ; then
323 . "${e}"
324 [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
325 return 0
326 fi
327 done
328 return 1
329 }
330
331 # eblit-include
332 # Usage: [--skip] <function> [version]
333 # Includes an "eblit" -- a chunk of common code among ebuilds in a given
334 # package so that its functions can be sourced and utilized within the
335 # ebuild.
336 eblit-include() {
337 local skipable=false r=0
338 [[ $1 == "--skip" ]] && skipable=true && shift
339 [[ $1 == pkg_* ]] && skipable=true
340
341 [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
342 eblit-core $1 $2
343 r="$?"
344 ${skipable} && return 0
345 [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
346 }
347
348 # eblit-run-maybe
349 # Usage: <function>
350 # Runs a function if it is defined in an eblit
351 eblit-run-maybe() {
352 [[ $(type -t "$@") == "function" ]] && "$@"
353 }
354
355 # eblit-run
356 # Usage: <function> [version]
357 # Runs a function defined in an eblit
358 eblit-run() {
359 eblit-include --skip common "v2"
360 eblit-include "$@"
361 eblit-run-maybe eblit-$1-pre
362 eblit-${PN}-$1
363 eblit-run-maybe eblit-$1-post
364 }
365
366 # eblit-pkg
367 # Usage: <phase> [version]
368 # Includes the given functions AND evals them so they're included in the binpkgs
369 eblit-pkg() {
370 [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
371 eblit-core $1 $2 1
372 }
373
374 eblit-pkg pkg_setup v3
375
376 src_prepare() { eblit-run src_prepare v3 ; }
377 src_configure() { eblit-run src_configure v53 ; }
378 src_compile() { eblit-run src_compile v1 ; }
379 src_install() { eblit-run src_install v3 ; }
380 src_test() { eblit-run src_test v1 ; }
381
382 #Do not use eblit for this because it will not get sourced when installing from
383 #binary package (bug #380845)
384 pkg_postinst() {
385 # Output some general info to the user
386 if use apache2 ; then
387 APACHE2_MOD_DEFINE="PHP5"
388 APACHE2_MOD_CONF="70_mod_php5"
389 apache-module_pkg_postinst
390 fi
391
392 # Create the symlinks for php
393 for m in ${SAPIS}; do
394 [[ ${m} == 'embed' ]] && continue;
395 if use $m ; then
396 local ci=$(eselect php show $m)
397 if [[ -z $ci ]]; then
398 eselect php set $m php${SLOT}
399 einfo "Switched ${m} to use php:${SLOT}"
400 einfo
401 elif [[ $ci != "php${SLOT}" ]] ; then
402 elog "To switch $m to use php:${SLOT}, run"
403 elog " eselect php set $m php${SLOT}"
404 elog
405 fi
406 fi
407 done
408
409 elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
410 elog "to compile extensions for the ${SLOT} ABI"
411 elog
412 if ! use readline && use cli ; then
413 ewarn "Note that in order to use php interactivly, you need to enable"
414 ewarn "the readline USE flag or php -a will hang"
415 fi
416 elog
417 elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
418 elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
419 elog "'production' or 'development' in /etc/make.conf"
420 ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
421
422 # check for not yet migrated old style config dirs
423 ls "${ROOT}"/etc/php/*-php5 &>/dev/null
424 if [[ $? -eq 0 ]]; then
425 ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
426 ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
427 fi
428 elog
429 elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
430 elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
431 elog
432
433 if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
434 ewarn "The suhosin USE flag now only installs the suhosin patch!"
435 ewarn "If you want the suhosin extension, make sure you install"
436 ewarn " dev-php5/suhosin"
437 ewarn
438 fi
439 }
440
441
442
443 1.1 dev-lang/php/php-5.4.0_rc4.ebuild
444
445 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.0_rc4.ebuild?rev=1.1&view=markup
446 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.0_rc4.ebuild?rev=1.1&content-type=text/plain
447
448 Index: php-5.4.0_rc4.ebuild
449 ===================================================================
450 # Copyright 1999-2011 Gentoo Foundation
451 # Distributed under the terms of the GNU General Public License v2
452 # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.0_rc4.ebuild,v 1.1 2011/12/24 08:54:00 olemarkus Exp $
453
454 EAPI=4
455
456 inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
457
458 SUHOSIN_VERSION=""
459 FPM_VERSION="builtin"
460 EXPECTED_TEST_FAILURES=""
461
462 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
463
464 function php_get_uri ()
465 {
466 case "${1}" in
467 "php-stas")
468 echo "http://downloads.php.net/stas/${2}"
469 ;;
470 "php-pre")
471 echo "http://downloads.php.net/johannes/${2}"
472 ;;
473 "php")
474 echo "http://www.php.net/distributions/${2}"
475 ;;
476 "suhosin")
477 echo "http://download.suhosin.org/${2}"
478 ;;
479 "olemarkus")
480 echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
481 ;;
482 "gentoo")
483 echo "mirror://gentoo/${2}"
484 ;;
485 *)
486 die "unhandled case in php_get_uri"
487 ;;
488 esac
489 }
490
491 PHP_MV="$(get_major_version)"
492
493 # alias, so we can handle different types of releases (finals, rcs, alphas,
494 # betas, ...) w/o changing the whole ebuild
495 PHP_PV="${PV/_rc/RC}"
496 PHP_PV="${PHP_PV/_alpha/alpha}"
497 PHP_PV="${PHP_PV/_beta/beta}"
498 PHP_RELEASE="php-stas"
499 PHP_P="${PN}-${PHP_PV}"
500
501 PHP_PATCHSET_LOC="olemarkus"
502
503 PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
504
505 PHP_PATCHSET="0"
506 PHP_PATCHSET_URI="
507 $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
508
509 PHP_FPM_INIT_VER="4"
510 PHP_FPM_CONF_VER="1"
511
512 if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
513 # in some cases we use our own suhosin patch (very recent version,
514 # patch conflicts, etc.)
515 SUHOSIN_TYPE="gentoo"
516 else
517 SUHOSIN_TYPE="suhosin"
518 fi
519
520 if [[ -n ${SUHOSIN_VERSION} ]]; then
521 SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
522 SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
523 fi
524
525 SRC_URI="
526 ${PHP_SRC_URI}
527 ${PHP_PATCHSET_URI}"
528
529 if [[ -n ${SUHOSIN_VERSION} ]]; then
530 SRC_URI="${SRC_URI}
531 suhosin? ( ${SUHOSIN_URI} )"
532 fi
533
534 DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
535 HOMEPAGE="http://php.net/"
536 LICENSE="PHP-3"
537
538 SLOT="$(get_version_component_range 1-2)"
539 S="${WORKDIR}/${PHP_P}"
540
541 # We can build the following SAPIs in the given order
542 SAPIS="embed cli cgi fpm apache2"
543
544 # Gentoo-specific, common features
545 IUSE="kolab"
546
547 # SAPIs and SAPI-specific USE flags (cli SAPI is default on):
548 IUSE="${IUSE}
549 ${SAPIS/cli/+cli}
550 threads"
551
552 IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
553 crypt +ctype curl curlwrappers debug doc
554 enchant exif frontbase +fileinfo +filter firebird
555 flatfile ftp gd gdbm gmp +hash +iconv imap inifile
556 intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
557 mssql mysql mysqlnd mysqli nls
558 oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
559 readline recode +session sharedmem
560 +simplexml snmp soap sockets spell sqlite3 ssl
561 sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
562 +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
563
564 # Enable suhosin if available
565 [[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
566
567 DEPEND="!dev-lang/php:5
568 >=app-admin/eselect-php-0.6.2
569 >=dev-libs/libpcre-8.12[unicode]
570 apache2? ( www-servers/apache[threads=] )
571 berkdb? ( =sys-libs/db-4* )
572 bzip2? ( app-arch/bzip2 )
573 cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
574 cjk? ( !gd? (
575 virtual/jpeg
576 media-libs/libpng
577 sys-libs/zlib
578 ) )
579 crypt? ( >=dev-libs/libmcrypt-2.4 )
580 curl? ( >=net-misc/curl-7.10.5 )
581 enchant? ( app-text/enchant )
582 exif? ( !gd? (
583 virtual/jpeg
584 media-libs/libpng
585 sys-libs/zlib
586 ) )
587 firebird? ( dev-db/firebird )
588 gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
589 gdbm? ( >=sys-libs/gdbm-1.8.0 )
590 gmp? ( >=dev-libs/gmp-4.1.2 )
591 iconv? ( virtual/libiconv )
592 imap? ( virtual/imap-c-client[ssl=] )
593 intl? ( dev-libs/icu )
594 iodbc? ( dev-db/libiodbc )
595 kerberos? ( virtual/krb5 )
596 kolab? ( >=net-libs/c-client-2004g-r1 )
597 ldap? ( >=net-nds/openldap-1.2.11 )
598 ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
599 libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
600 mssql? ( dev-db/freetds[mssql] )
601 !mysqlnd? (
602 mysql? ( virtual/mysql )
603 mysqli? ( >=virtual/mysql-4.1 )
604 )
605 nls? ( sys-devel/gettext )
606 oci8-instant-client? ( dev-db/oracle-instantclient-basic )
607 odbc? ( >=dev-db/unixODBC-1.8.13 )
608 postgres? ( dev-db/postgresql-base )
609 qdbm? ( dev-db/qdbm )
610 readline? ( sys-libs/readline )
611 recode? ( app-text/recode )
612 sharedmem? ( dev-libs/mm )
613 simplexml? ( >=dev-libs/libxml2-2.6.8 )
614 snmp? ( >=net-analyzer/net-snmp-5.2 )
615 soap? ( >=dev-libs/libxml2-2.6.8 )
616 spell? ( >=app-text/aspell-0.50 )
617 sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
618 ssl? ( >=dev-libs/openssl-0.9.7 )
619 sybase-ct? ( dev-db/freetds )
620 tidy? ( app-text/htmltidy )
621 truetype? (
622 =media-libs/freetype-2*
623 >=media-libs/t1lib-5.0.0
624 !gd? (
625 virtual/jpeg media-libs/libpng sys-libs/zlib )
626 )
627 unicode? ( dev-libs/oniguruma )
628 wddx? ( >=dev-libs/libxml2-2.6.8 )
629 xml? ( >=dev-libs/libxml2-2.6.8 )
630 xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
631 xmlreader? ( >=dev-libs/libxml2-2.6.8 )
632 xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
633 xpm? (
634 x11-libs/libXpm
635 virtual/jpeg
636 media-libs/libpng sys-libs/zlib
637 )
638 xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
639 zip? ( sys-libs/zlib )
640 zlib? ( sys-libs/zlib )
641 virtual/mta
642 "
643
644 php="=${CATEGORY}/${PF}"
645
646 REQUIRED_USE="
647 truetype? ( gd )
648 cjk? ( gd )
649 exif? ( gd )
650
651 xpm? ( gd )
652 gd? ( zlib )
653 simplexml? ( xml )
654 soap? ( xml )
655 wddx? ( xml )
656 xmlrpc? ( || ( xml iconv ) )
657 xmlreader? ( xml )
658 xsl? ( xml )
659 ldap-sasl? ( ldap )
660 kolab? ( imap )
661 mhash? ( hash )
662 phar? ( hash )
663 mysqlnd? ( || (
664 mysql
665 mysqli
666 pdo
667 ) )
668
669 qdbm? ( !gdbm )
670 readline? ( !libedit )
671 recode? ( !imap !mysql !mysqli )
672 sharedmem? ( !threads )
673
674 !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
675
676 DEPEND="${DEPEND}
677 enchant? ( !dev-php/pecl-enchant )
678 fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
679 filter? ( !dev-php/pecl-filter )
680 json? ( !dev-php/pecl-json )
681 phar? ( !dev-php/pecl-phar )
682 zip? ( !dev-php/pecl-zip )"
683
684 [[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
685 =${CATEGORY}/${PN}-${SLOT}*[unicode] )"
686
687 DEPEND="${DEPEND}
688 sys-devel/flex
689 >=sys-devel/m4-1.4.3
690 >=sys-devel/libtool-1.5.18"
691
692 # They are in PDEPEND because we need PHP installed first!
693 PDEPEND="doc? ( app-doc/php-docs )"
694
695 # No longer depend on the extension. The suhosin USE flag only installs the
696 # patch
697 #[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
698
699 # Allow users to install production version if they want to
700
701 case "${PHP_INI_VERSION}" in
702 production|development)
703 ;;
704 *)
705 PHP_INI_VERSION="development"
706 ;;
707 esac
708
709 PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
710 PHP_INI_FILE="php.ini"
711
712 want_apache
713
714 # eblit-core
715 # Usage: <function> [version] [eval]
716 # Main eblit engine
717 eblit-core() {
718 [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
719 local e v func=$1 ver=$2 eval_=$3
720 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
721 e="${FILESDIR}/eblits/${func}${v}.eblit"
722 if [[ -e ${e} ]] ; then
723 . "${e}"
724 [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
725 return 0
726 fi
727 done
728 return 1
729 }
730
731 # eblit-include
732 # Usage: [--skip] <function> [version]
733 # Includes an "eblit" -- a chunk of common code among ebuilds in a given
734 # package so that its functions can be sourced and utilized within the
735 # ebuild.
736 eblit-include() {
737 local skipable=false r=0
738 [[ $1 == "--skip" ]] && skipable=true && shift
739 [[ $1 == pkg_* ]] && skipable=true
740
741 [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
742 eblit-core $1 $2
743 r="$?"
744 ${skipable} && return 0
745 [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
746 }
747
748 # eblit-run-maybe
749 # Usage: <function>
750 # Runs a function if it is defined in an eblit
751 eblit-run-maybe() {
752 [[ $(type -t "$@") == "function" ]] && "$@"
753 }
754
755 # eblit-run
756 # Usage: <function> [version]
757 # Runs a function defined in an eblit
758 eblit-run() {
759 eblit-include --skip common v2
760 eblit-include "$@"
761 eblit-run-maybe eblit-$1-pre
762 eblit-${PN}-$1
763 eblit-run-maybe eblit-$1-post
764 }
765
766 # eblit-pkg
767 # Usage: <phase> [version]
768 # Includes the given functions AND evals them so they're included in the binpkgs
769 eblit-pkg() {
770 [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
771 eblit-core $1 $2 1
772 }
773
774 eblit-pkg pkg_setup v3
775
776 src_prepare() { eblit-run src_prepare v4 ; }
777 src_configure() { eblit-run src_configure v54 ; }
778 src_compile() { eblit-run src_compile v2 ; }
779 src_install() { eblit-run src_install v3 ; }
780 src_test() { eblit-run src_test v1 ; }
781
782 #Do not use eblit for this because it will not get sourced when installing from
783 #binary package (bug #380845)
784 pkg_postinst() {
785 # Output some general info to the user
786 if use apache2 ; then
787 APACHE2_MOD_DEFINE="PHP5"
788 APACHE2_MOD_CONF="70_mod_php5"
789 apache-module_pkg_postinst
790 fi
791
792 # Create the symlinks for php
793 for m in ${SAPIS}; do
794 [[ ${m} == 'embed' ]] && continue;
795 if use $m ; then
796 local ci=$(eselect php show $m)
797 if [[ -z $ci ]]; then
798 eselect php set $m php${SLOT}
799 einfo "Switched ${m} to use php:${SLOT}"
800 einfo
801 elif [[ $ci != "php${SLOT}" ]] ; then
802 elog "To switch $m to use php:${SLOT}, run"
803 elog " eselect php set $m php${SLOT}"
804 elog
805 fi
806 fi
807 done
808
809 elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
810 elog "to compile extensions for the ${SLOT} ABI"
811 elog
812 if ! use readline && use cli ; then
813 ewarn "Note that in order to use php interactivly, you need to enable"
814 ewarn "the readline USE flag or php -a will hang"
815 fi
816 elog
817 elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
818 elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
819 elog "'production' or 'development' in /etc/make.conf"
820 ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
821
822 # check for not yet migrated old style config dirs
823 ls "${ROOT}"/etc/php/*-php5 &>/dev/null
824 if [[ $? -eq 0 ]]; then
825 ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
826 ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
827 fi
828 elog
829 elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
830 elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
831 elog
832
833 if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
834 ewarn "The suhosin USE flag now only installs the suhosin patch!"
835 ewarn "If you want the suhosin extension, make sure you install"
836 ewarn " dev-php/suhosin"
837 ewarn
838 fi
839 }