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.4_rc2.ebuild ChangeLog
Date: Tue, 05 Jun 2012 17:34:43
Message-Id: 20120605173432.CC5DE2004B@flycatcher.gentoo.org
1 olemarkus 12/06/05 17:34:32
2
3 Modified: ChangeLog
4 Added: php-5.4.4_rc2.ebuild
5 Log:
6 Added 5.4 RC 2 for testing
7
8 (Portage version: 2.1.10.49/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.597 dev-lang/php/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.597&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.597&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?r1=1.596&r2=1.597
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v
20 retrieving revision 1.596
21 retrieving revision 1.597
22 diff -u -r1.596 -r1.597
23 --- ChangeLog 5 Jun 2012 12:34:35 -0000 1.596
24 +++ ChangeLog 5 Jun 2012 17:34:32 -0000 1.597
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.596 2012/06/05 12:34:35 olemarkus Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.597 2012/06/05 17:34:32 olemarkus Exp $
30 +
31 +*php-5.4.4_rc2 (05 Jun 2012)
32 +
33 + 05 Jun 2012; Ole Markus With <olemarkus@g.o> +php-5.4.4_rc2.ebuild:
34 + Added 5.4 RC 2 for testing
35
36 *php-5.3.14_rc2 (05 Jun 2012)
37
38
39
40
41 1.1 dev-lang/php/php-5.4.4_rc2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.4_rc2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.4_rc2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: php-5.4.4_rc2.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.4_rc2.ebuild,v 1.1 2012/06/05 17:34:32 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 ~amd64-fbsd"
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://dev.gentoo.org/~olemarkus/php/${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 SLOT="$(get_version_component_range 1-2)"
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"
98 [[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-stas"
99 PHP_P="${PN}-${PHP_PV}"
100
101 PHP_PATCHSET_LOC="olemarkus"
102
103 PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
104
105 PHP_PATCHSET="2"
106 PHP_PATCHSET_URI="
107 $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
108
109 PHP_FPM_INIT_VER="4"
110 PHP_FPM_CONF_VER="1"
111
112 if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
113 # in some cases we use our own suhosin patch (very recent version,
114 # patch conflicts, etc.)
115 SUHOSIN_TYPE="gentoo"
116 else
117 SUHOSIN_TYPE="suhosin"
118 fi
119
120 if [[ -n ${SUHOSIN_VERSION} ]]; then
121 SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
122 SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
123 fi
124
125 SRC_URI="
126 ${PHP_SRC_URI}
127 ${PHP_PATCHSET_URI}"
128
129 if [[ -n ${SUHOSIN_VERSION} ]]; then
130 SRC_URI="${SRC_URI}
131 suhosin? ( ${SUHOSIN_URI} )"
132 fi
133
134 DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
135 HOMEPAGE="http://php.net/"
136 LICENSE="PHP-3"
137
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="
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 RDEPEND="${DEPEND}"
276
277 [[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
278 =${CATEGORY}/${PN}-${SLOT}*[unicode] )"
279
280 DEPEND="${DEPEND}
281 sys-devel/flex
282 >=sys-devel/m4-1.4.3
283 >=sys-devel/libtool-1.5.18"
284
285 # They are in PDEPEND because we need PHP installed first!
286 PDEPEND="doc? ( app-doc/php-docs )"
287
288 # No longer depend on the extension. The suhosin USE flag only installs the
289 # patch
290 #[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
291
292 # Allow users to install production version if they want to
293
294 case "${PHP_INI_VERSION}" in
295 production|development)
296 ;;
297 *)
298 PHP_INI_VERSION="development"
299 ;;
300 esac
301
302 PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
303 PHP_INI_FILE="php.ini"
304
305 want_apache
306
307 # eblit-core
308 # Usage: <function> [version] [eval]
309 # Main eblit engine
310 eblit-core() {
311 [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
312 local e v func=$1 ver=$2 eval_=$3
313 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
314 e="${FILESDIR}/eblits/${func}${v}.eblit"
315 if [[ -e ${e} ]] ; then
316 . "${e}"
317 [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
318 return 0
319 fi
320 done
321 return 1
322 }
323
324 # eblit-include
325 # Usage: [--skip] <function> [version]
326 # Includes an "eblit" -- a chunk of common code among ebuilds in a given
327 # package so that its functions can be sourced and utilized within the
328 # ebuild.
329 eblit-include() {
330 local skipable=false r=0
331 [[ $1 == "--skip" ]] && skipable=true && shift
332 [[ $1 == pkg_* ]] && skipable=true
333
334 [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
335 eblit-core $1 $2
336 r="$?"
337 ${skipable} && return 0
338 [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
339 }
340
341 # eblit-run-maybe
342 # Usage: <function>
343 # Runs a function if it is defined in an eblit
344 eblit-run-maybe() {
345 [[ $(type -t "$@") == "function" ]] && "$@"
346 }
347
348 # eblit-run
349 # Usage: <function> [version]
350 # Runs a function defined in an eblit
351 eblit-run() {
352 eblit-include --skip common v2
353 eblit-include "$@"
354 eblit-run-maybe eblit-$1-pre
355 eblit-${PN}-$1
356 eblit-run-maybe eblit-$1-post
357 }
358
359 # eblit-pkg
360 # Usage: <phase> [version]
361 # Includes the given functions AND evals them so they're included in the binpkgs
362 eblit-pkg() {
363 [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
364 eblit-core $1 $2 1
365 }
366
367 eblit-pkg pkg_setup v3
368
369 src_prepare() { eblit-run src_prepare v4 ; }
370 src_configure() { eblit-run src_configure v54 ; }
371 src_compile() { eblit-run src_compile v2 ; }
372 src_install() { eblit-run src_install v3 ; }
373 src_test() { eblit-run src_test v1 ; }
374
375 #Do not use eblit for this because it will not get sourced when installing from
376 #binary package (bug #380845)
377 pkg_postinst() {
378 # Output some general info to the user
379 if use apache2 ; then
380 APACHE2_MOD_DEFINE="PHP5"
381 APACHE2_MOD_CONF="70_mod_php5"
382 apache-module_pkg_postinst
383 fi
384
385 # Create the symlinks for php
386 for m in ${SAPIS}; do
387 [[ ${m} == 'embed' ]] && continue;
388 if use $m ; then
389 local ci=$(eselect php show $m)
390 if [[ -z $ci ]]; then
391 eselect php set $m php${SLOT}
392 einfo "Switched ${m} to use php:${SLOT}"
393 einfo
394 elif [[ $ci != "php${SLOT}" ]] ; then
395 elog "To switch $m to use php:${SLOT}, run"
396 elog " eselect php set $m php${SLOT}"
397 elog
398 fi
399 fi
400 done
401
402 elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
403 elog "to compile extensions for the ${SLOT} ABI"
404 elog
405 if ! use readline && use cli ; then
406 ewarn "Note that in order to use php interactivly, you need to enable"
407 ewarn "the readline USE flag or php -a will hang"
408 fi
409 elog
410 elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
411 elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
412 elog "'production' or 'development' in /etc/make.conf"
413 ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
414
415 # check for not yet migrated old style config dirs
416 ls "${ROOT}"/etc/php/*-php5 &>/dev/null
417 if [[ $? -eq 0 ]]; then
418 ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
419 ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
420 fi
421 elog
422 elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
423 elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
424 elog
425
426 if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
427 ewarn "The suhosin USE flag now only installs the suhosin patch!"
428 ewarn "If you want the suhosin extension, make sure you install"
429 ewarn " dev-php/suhosin"
430 ewarn
431 fi
432 }