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.10-r2.ebuild ChangeLog php-5.3.10-r1.ebuild
Date: Mon, 06 Feb 2012 21:24:14
Message-Id: 20120206212403.20CCC2004B@flycatcher.gentoo.org
1 olemarkus 12/02/06 21:24:03
2
3 Modified: ChangeLog
4 Added: php-5.3.10-r2.ebuild
5 Removed: php-5.3.10-r1.ebuild
6 Log:
7 Another fix for bug 402357. Should be somewhat safer than the previous fix
8
9 (Portage version: 2.1.10.41/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.555 dev-lang/php/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.555&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.555&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?r1=1.554&r2=1.555
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v
21 retrieving revision 1.554
22 retrieving revision 1.555
23 diff -u -r1.554 -r1.555
24 --- ChangeLog 6 Feb 2012 20:15:24 -0000 1.554
25 +++ ChangeLog 6 Feb 2012 21:24:03 -0000 1.555
26 @@ -1,6 +1,12 @@
27 # ChangeLog for dev-lang/php
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.554 2012/02/06 20:15:24 ranger Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.555 2012/02/06 21:24:03 olemarkus Exp $
31 +
32 +*php-5.3.10-r2 (06 Feb 2012)
33 +
34 + 06 Feb 2012; Ole Markus With <olemarkus@g.o> +php-5.3.10-r2.ebuild,
35 + -php-5.3.10-r1.ebuild:
36 + Another fix for bug 402357. Should be somewhat safer than the previous fix
37
38 06 Feb 2012; Brent Baude <ranger@g.o> php-5.3.10.ebuild:
39 Marking php-5.3.10 ppc for bug 401997
40
41
42
43 1.1 dev-lang/php/php-5.3.10-r2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.3.10-r2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.3.10-r2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: php-5.3.10-r2.ebuild
49 ===================================================================
50 # Copyright 1999-2012 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.10-r2.ebuild,v 1.1 2012/02/06 21:24:03 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.9-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"
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="2"
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="olemarkus"
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 }