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.6-r2.ebuild ChangeLog
Date: Wed, 29 Aug 2012 13:13:00
Message-Id: 20120829131248.B3CE320B47@flycatcher.gentoo.org
1 olemarkus 12/08/29 13:12:48
2
3 Modified: ChangeLog
4 Added: php-5.4.6-r2.ebuild
5 Log:
6 Revbump with some changes to postinst info and added some prerm. Bug #432962
7
8 (Portage version: 2.1.11.9/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.626 dev-lang/php/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.626&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.626&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?r1=1.625&r2=1.626
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v
20 retrieving revision 1.625
21 retrieving revision 1.626
22 diff -u -r1.625 -r1.626
23 --- ChangeLog 24 Aug 2012 14:19:41 -0000 1.625
24 +++ ChangeLog 29 Aug 2012 13:12:48 -0000 1.626
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.625 2012/08/24 14:19:41 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.626 2012/08/29 13:12:48 olemarkus Exp $
30 +
31 +*php-5.4.6-r2 (29 Aug 2012)
32 +
33 + 29 Aug 2012; Ole Markus With <olemarkus@g.o> +php-5.4.6-r2.ebuild:
34 + Revbump with some changes to postinst info and added some prerm. Bug #432962
35
36 24 Aug 2012; Jeroen Roovers <jer@g.o> php-5.4.6.ebuild:
37 Stable for HPPA (bug #427024).
38
39
40
41 1.1 dev-lang/php/php-5.4.6-r2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.6-r2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.4.6-r2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: php-5.4.6-r2.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.6-r2.ebuild,v 1.1 2012/08/29 13:12:48 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 ~mips ~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 selinux +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 RDEPEND="${RDEPEND} fpm? ( selinux? ( sec-policy/selinux-phpfpm ) )"
281
282 DEPEND="${DEPEND}
283 sys-devel/flex
284 >=sys-devel/m4-1.4.3
285 >=sys-devel/libtool-1.5.18"
286
287 # They are in PDEPEND because we need PHP installed first!
288 PDEPEND="doc? ( app-doc/php-docs )"
289
290 # No longer depend on the extension. The suhosin USE flag only installs the
291 # patch
292 #[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
293
294 # Allow users to install production version if they want to
295
296 case "${PHP_INI_VERSION}" in
297 production|development)
298 ;;
299 *)
300 PHP_INI_VERSION="development"
301 ;;
302 esac
303
304 PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
305 PHP_INI_FILE="php.ini"
306
307 want_apache
308
309 # eblit-core
310 # Usage: <function> [version] [eval]
311 # Main eblit engine
312 eblit-core() {
313 [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
314 local e v func=$1 ver=$2 eval_=$3
315 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
316 e="${FILESDIR}/eblits/${func}${v}.eblit"
317 if [[ -e ${e} ]] ; then
318 . "${e}"
319 [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
320 return 0
321 fi
322 done
323 return 1
324 }
325
326 # eblit-include
327 # Usage: [--skip] <function> [version]
328 # Includes an "eblit" -- a chunk of common code among ebuilds in a given
329 # package so that its functions can be sourced and utilized within the
330 # ebuild.
331 eblit-include() {
332 local skipable=false r=0
333 [[ $1 == "--skip" ]] && skipable=true && shift
334 [[ $1 == pkg_* ]] && skipable=true
335
336 [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
337 eblit-core $1 $2
338 r="$?"
339 ${skipable} && return 0
340 [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
341 }
342
343 # eblit-run-maybe
344 # Usage: <function>
345 # Runs a function if it is defined in an eblit
346 eblit-run-maybe() {
347 [[ $(type -t "$@") == "function" ]] && "$@"
348 }
349
350 # eblit-run
351 # Usage: <function> [version]
352 # Runs a function defined in an eblit
353 eblit-run() {
354 eblit-include --skip common v2
355 eblit-include "$@"
356 eblit-run-maybe eblit-$1-pre
357 eblit-${PN}-$1
358 eblit-run-maybe eblit-$1-post
359 }
360
361 # eblit-pkg
362 # Usage: <phase> [version]
363 # Includes the given functions AND evals them so they're included in the binpkgs
364 eblit-pkg() {
365 [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
366 eblit-core $1 $2 1
367 }
368
369 eblit-pkg pkg_setup v3
370
371 src_prepare() { eblit-run src_prepare v4 ; }
372 src_configure() { eblit-run src_configure v54 ; }
373 src_compile() { eblit-run src_compile v2 ; }
374 src_install() { eblit-run src_install v3 ; }
375 src_test() { eblit-run src_test v1 ; }
376
377 #Do not use eblit for this because it will not get sourced when installing from
378 #binary package (bug #380845)
379 pkg_postinst() {
380 # Output some general info to the user
381 if use apache2 ; then
382 APACHE2_MOD_DEFINE="PHP5"
383 APACHE2_MOD_CONF="70_mod_php5"
384 apache-module_pkg_postinst
385 fi
386
387 # Create the symlinks for php
388 for m in ${SAPIS}; do
389 [[ ${m} == 'embed' ]] && continue;
390 if use $m ; then
391 local ci=$(eselect php show $m)
392 if [[ -z $ci ]]; then
393 eselect php set $m php${SLOT}
394 einfo "Switched ${m} to use php:${SLOT}"
395 einfo
396 elif [[ $ci != "php${SLOT}" ]] ; then
397 elog "To switch $m to use php:${SLOT}, run"
398 elog " eselect php set $m php${SLOT}"
399 elog
400 fi
401 fi
402 done
403
404 elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
405 elog "to compile extensions for the ${SLOT} ABI"
406 elog
407 if ! use readline && use cli ; then
408 ewarn "Note that in order to use php interactivly, you need to enable"
409 ewarn "the readline USE flag or php -a will hang"
410 fi
411 elog
412 elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
413 elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
414 elog "'production' or 'development' in /etc/make.conf"
415 elog "Both versions of php.ini can be found in /usr/share/doc/${PF}"
416
417 elog
418 elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
419 elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
420 elog
421
422 if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
423 ewarn
424 ewarn "The suhosin USE flag now only installs the suhosin patch!"
425 ewarn "If you want the suhosin extension, make sure you install"
426 ewarn " dev-php/suhosin"
427 ewarn
428 fi
429 }
430
431 pkg_prerm() {
432 local sapi
433 local slot
434 for sapi in ${SAPIS}; do
435 slot=$(eselect php show $sapi 2> /dev/null)
436 slot=${slot/php/}
437 if [[ $slot == $SLOT ]]; then
438 ewarn "You have removed the active version of the $sapi SAPI"
439 ewarn "Fix the issue using \`eselect php\`"
440 fi
441 done
442 }