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: ChangeLog php-5.4.0_rc5.ebuild
Date: Fri, 06 Jan 2012 20:55:10
Message-Id: 20120106205459.622F52004B@flycatcher.gentoo.org
1 olemarkus 12/01/06 20:54:59
2
3 Modified: ChangeLog
4 Added: php-5.4.0_rc5.ebuild
5 Log:
6 Added 5.4.0 RC5
7
8 (Portage version: 2.1.10.41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.535 dev-lang/php/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.535&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.535&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?r1=1.534&r2=1.535
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v
20 retrieving revision 1.534
21 retrieving revision 1.535
22 diff -u -r1.534 -r1.535
23 --- ChangeLog 24 Dec 2011 08:54:00 -0000 1.534
24 +++ ChangeLog 6 Jan 2012 20:54:59 -0000 1.535
25 @@ -1,6 +1,11 @@
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.534 2011/12/24 08:54:00 olemarkus Exp $
29 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.535 2012/01/06 20:54:59 olemarkus Exp $
31 +
32 +*php-5.4.0_rc5 (06 Jan 2012)
33 +
34 + 06 Jan 2012; Ole Markus With <olemarkus@g.o> +php-5.4.0_rc5.ebuild:
35 + Added 5.4.0 RC5
36
37 *php-5.4.0_rc4 (24 Dec 2011)
38 *php-5.3.9_rc4 (24 Dec 2011)
39
40
41
42 1.1 dev-lang/php/php-5.4.0_rc5.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.0_rc5.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.0_rc5.ebuild?rev=1.1&content-type=text/plain
46
47 Index: php-5.4.0_rc5.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.0_rc5.ebuild,v 1.1 2012/01/06 20:54:59 olemarkus Exp $
52
53 EAPI=4
54
55 inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
56
57 SUHOSIN_VERSION=""
58 FPM_VERSION="builtin"
59 EXPECTED_TEST_FAILURES=""
60
61 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
62
63 function php_get_uri ()
64 {
65 case "${1}" in
66 "php-stas")
67 echo "http://downloads.php.net/stas/${2}"
68 ;;
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_PV="${PHP_PV/_alpha/alpha}"
96 PHP_PV="${PHP_PV/_beta/beta}"
97 PHP_RELEASE="php-stas"
98 PHP_P="${PN}-${PHP_PV}"
99
100 PHP_PATCHSET_LOC="olemarkus"
101
102 PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
103
104 PHP_PATCHSET="0"
105 PHP_PATCHSET_URI="
106 $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
107
108 PHP_FPM_INIT_VER="4"
109 PHP_FPM_CONF_VER="1"
110
111 if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
112 # in some cases we use our own suhosin patch (very recent version,
113 # patch conflicts, etc.)
114 SUHOSIN_TYPE="gentoo"
115 else
116 SUHOSIN_TYPE="suhosin"
117 fi
118
119 if [[ -n ${SUHOSIN_VERSION} ]]; then
120 SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
121 SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
122 fi
123
124 SRC_URI="
125 ${PHP_SRC_URI}
126 ${PHP_PATCHSET_URI}"
127
128 if [[ -n ${SUHOSIN_VERSION} ]]; then
129 SRC_URI="${SRC_URI}
130 suhosin? ( ${SUHOSIN_URI} )"
131 fi
132
133 DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
134 HOMEPAGE="http://php.net/"
135 LICENSE="PHP-3"
136
137 SLOT="$(get_version_component_range 1-2)"
138 S="${WORKDIR}/${PHP_P}"
139
140 # We can build the following SAPIs in the given order
141 SAPIS="embed cli cgi fpm apache2"
142
143 # Gentoo-specific, common features
144 IUSE="kolab"
145
146 # SAPIs and SAPI-specific USE flags (cli SAPI is default on):
147 IUSE="${IUSE}
148 ${SAPIS/cli/+cli}
149 threads"
150
151 IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
152 crypt +ctype curl curlwrappers debug doc
153 enchant exif frontbase +fileinfo +filter firebird
154 flatfile ftp gd gdbm gmp +hash +iconv imap inifile
155 intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
156 mssql mysql mysqlnd mysqli nls
157 oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
158 readline recode +session sharedmem
159 +simplexml snmp soap sockets spell sqlite3 ssl
160 sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
161 +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
162
163 # Enable suhosin if available
164 [[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
165
166 DEPEND="!dev-lang/php:5
167 >=app-admin/eselect-php-0.6.2
168 >=dev-libs/libpcre-8.12[unicode]
169 apache2? ( www-servers/apache[threads=] )
170 berkdb? ( =sys-libs/db-4* )
171 bzip2? ( app-arch/bzip2 )
172 cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
173 cjk? ( !gd? (
174 virtual/jpeg
175 media-libs/libpng
176 sys-libs/zlib
177 ) )
178 crypt? ( >=dev-libs/libmcrypt-2.4 )
179 curl? ( >=net-misc/curl-7.10.5 )
180 enchant? ( app-text/enchant )
181 exif? ( !gd? (
182 virtual/jpeg
183 media-libs/libpng
184 sys-libs/zlib
185 ) )
186 firebird? ( dev-db/firebird )
187 gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
188 gdbm? ( >=sys-libs/gdbm-1.8.0 )
189 gmp? ( >=dev-libs/gmp-4.1.2 )
190 iconv? ( virtual/libiconv )
191 imap? ( virtual/imap-c-client[ssl=] )
192 intl? ( dev-libs/icu )
193 iodbc? ( dev-db/libiodbc )
194 kerberos? ( virtual/krb5 )
195 kolab? ( >=net-libs/c-client-2004g-r1 )
196 ldap? ( >=net-nds/openldap-1.2.11 )
197 ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
198 libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
199 mssql? ( dev-db/freetds[mssql] )
200 !mysqlnd? (
201 mysql? ( virtual/mysql )
202 mysqli? ( >=virtual/mysql-4.1 )
203 )
204 nls? ( sys-devel/gettext )
205 oci8-instant-client? ( dev-db/oracle-instantclient-basic )
206 odbc? ( >=dev-db/unixODBC-1.8.13 )
207 postgres? ( dev-db/postgresql-base )
208 qdbm? ( dev-db/qdbm )
209 readline? ( sys-libs/readline )
210 recode? ( app-text/recode )
211 sharedmem? ( dev-libs/mm )
212 simplexml? ( >=dev-libs/libxml2-2.6.8 )
213 snmp? ( >=net-analyzer/net-snmp-5.2 )
214 soap? ( >=dev-libs/libxml2-2.6.8 )
215 spell? ( >=app-text/aspell-0.50 )
216 sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
217 ssl? ( >=dev-libs/openssl-0.9.7 )
218 sybase-ct? ( dev-db/freetds )
219 tidy? ( app-text/htmltidy )
220 truetype? (
221 =media-libs/freetype-2*
222 >=media-libs/t1lib-5.0.0
223 !gd? (
224 virtual/jpeg media-libs/libpng sys-libs/zlib )
225 )
226 unicode? ( dev-libs/oniguruma )
227 wddx? ( >=dev-libs/libxml2-2.6.8 )
228 xml? ( >=dev-libs/libxml2-2.6.8 )
229 xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
230 xmlreader? ( >=dev-libs/libxml2-2.6.8 )
231 xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
232 xpm? (
233 x11-libs/libXpm
234 virtual/jpeg
235 media-libs/libpng sys-libs/zlib
236 )
237 xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
238 zip? ( sys-libs/zlib )
239 zlib? ( sys-libs/zlib )
240 virtual/mta
241 "
242
243 php="=${CATEGORY}/${PF}"
244
245 REQUIRED_USE="
246 truetype? ( gd )
247 cjk? ( gd )
248 exif? ( gd )
249
250 xpm? ( gd )
251 gd? ( zlib )
252 simplexml? ( xml )
253 soap? ( xml )
254 wddx? ( xml )
255 xmlrpc? ( || ( xml iconv ) )
256 xmlreader? ( xml )
257 xsl? ( xml )
258 ldap-sasl? ( ldap )
259 kolab? ( imap )
260 mhash? ( hash )
261 phar? ( hash )
262 mysqlnd? ( || (
263 mysql
264 mysqli
265 pdo
266 ) )
267
268 qdbm? ( !gdbm )
269 readline? ( !libedit )
270 recode? ( !imap !mysql !mysqli )
271 sharedmem? ( !threads )
272
273 !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
274
275 DEPEND="${DEPEND}
276 enchant? ( !dev-php/pecl-enchant )
277 fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
278 filter? ( !dev-php/pecl-filter )
279 json? ( !dev-php/pecl-json )
280 phar? ( !dev-php/pecl-phar )
281 zip? ( !dev-php/pecl-zip )"
282
283 [[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
284 =${CATEGORY}/${PN}-${SLOT}*[unicode] )"
285
286 DEPEND="${DEPEND}
287 sys-devel/flex
288 >=sys-devel/m4-1.4.3
289 >=sys-devel/libtool-1.5.18"
290
291 # They are in PDEPEND because we need PHP installed first!
292 PDEPEND="doc? ( app-doc/php-docs )"
293
294 # No longer depend on the extension. The suhosin USE flag only installs the
295 # patch
296 #[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
297
298 # Allow users to install production version if they want to
299
300 case "${PHP_INI_VERSION}" in
301 production|development)
302 ;;
303 *)
304 PHP_INI_VERSION="development"
305 ;;
306 esac
307
308 PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
309 PHP_INI_FILE="php.ini"
310
311 want_apache
312
313 # eblit-core
314 # Usage: <function> [version] [eval]
315 # Main eblit engine
316 eblit-core() {
317 [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
318 local e v func=$1 ver=$2 eval_=$3
319 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
320 e="${FILESDIR}/eblits/${func}${v}.eblit"
321 if [[ -e ${e} ]] ; then
322 . "${e}"
323 [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
324 return 0
325 fi
326 done
327 return 1
328 }
329
330 # eblit-include
331 # Usage: [--skip] <function> [version]
332 # Includes an "eblit" -- a chunk of common code among ebuilds in a given
333 # package so that its functions can be sourced and utilized within the
334 # ebuild.
335 eblit-include() {
336 local skipable=false r=0
337 [[ $1 == "--skip" ]] && skipable=true && shift
338 [[ $1 == pkg_* ]] && skipable=true
339
340 [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
341 eblit-core $1 $2
342 r="$?"
343 ${skipable} && return 0
344 [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
345 }
346
347 # eblit-run-maybe
348 # Usage: <function>
349 # Runs a function if it is defined in an eblit
350 eblit-run-maybe() {
351 [[ $(type -t "$@") == "function" ]] && "$@"
352 }
353
354 # eblit-run
355 # Usage: <function> [version]
356 # Runs a function defined in an eblit
357 eblit-run() {
358 eblit-include --skip common v2
359 eblit-include "$@"
360 eblit-run-maybe eblit-$1-pre
361 eblit-${PN}-$1
362 eblit-run-maybe eblit-$1-post
363 }
364
365 # eblit-pkg
366 # Usage: <phase> [version]
367 # Includes the given functions AND evals them so they're included in the binpkgs
368 eblit-pkg() {
369 [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
370 eblit-core $1 $2 1
371 }
372
373 eblit-pkg pkg_setup v3
374
375 src_prepare() { eblit-run src_prepare v4 ; }
376 src_configure() { eblit-run src_configure v54 ; }
377 src_compile() { eblit-run src_compile v2 ; }
378 src_install() { eblit-run src_install v3 ; }
379 src_test() { eblit-run src_test v1 ; }
380
381 #Do not use eblit for this because it will not get sourced when installing from
382 #binary package (bug #380845)
383 pkg_postinst() {
384 # Output some general info to the user
385 if use apache2 ; then
386 APACHE2_MOD_DEFINE="PHP5"
387 APACHE2_MOD_CONF="70_mod_php5"
388 apache-module_pkg_postinst
389 fi
390
391 # Create the symlinks for php
392 for m in ${SAPIS}; do
393 [[ ${m} == 'embed' ]] && continue;
394 if use $m ; then
395 local ci=$(eselect php show $m)
396 if [[ -z $ci ]]; then
397 eselect php set $m php${SLOT}
398 einfo "Switched ${m} to use php:${SLOT}"
399 einfo
400 elif [[ $ci != "php${SLOT}" ]] ; then
401 elog "To switch $m to use php:${SLOT}, run"
402 elog " eselect php set $m php${SLOT}"
403 elog
404 fi
405 fi
406 done
407
408 elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
409 elog "to compile extensions for the ${SLOT} ABI"
410 elog
411 if ! use readline && use cli ; then
412 ewarn "Note that in order to use php interactivly, you need to enable"
413 ewarn "the readline USE flag or php -a will hang"
414 fi
415 elog
416 elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
417 elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
418 elog "'production' or 'development' in /etc/make.conf"
419 ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
420
421 # check for not yet migrated old style config dirs
422 ls "${ROOT}"/etc/php/*-php5 &>/dev/null
423 if [[ $? -eq 0 ]]; then
424 ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
425 ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
426 fi
427 elog
428 elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
429 elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
430 elog
431
432 if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
433 ewarn "The suhosin USE flag now only installs the suhosin patch!"
434 ewarn "If you want the suhosin extension, make sure you install"
435 ewarn " dev-php/suhosin"
436 ewarn
437 fi
438 }