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