1 |
olemarkus 13/03/31 06:32:29 |
2 |
|
3 |
Modified: php-5.5.0_beta2-r1.ebuild ChangeLog |
4 |
Added: php-5.5.0_beta2-r2.ebuild |
5 |
Log: |
6 |
Fixed using mysqlnd by default also for mysqli. (Bug 463950) |
7 |
|
8 |
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key C4A92BF5) |
9 |
|
10 |
Revision Changes Path |
11 |
1.3 dev-lang/php/php-5.5.0_beta2-r1.ebuild |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r1.ebuild?rev=1.3&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r1.ebuild?rev=1.3&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r1.ebuild?r1=1.2&r2=1.3 |
16 |
|
17 |
Index: php-5.5.0_beta2-r1.ebuild |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r1.ebuild,v |
20 |
retrieving revision 1.2 |
21 |
retrieving revision 1.3 |
22 |
diff -u -r1.2 -r1.3 |
23 |
--- php-5.5.0_beta2-r1.ebuild 30 Mar 2013 17:47:16 -0000 1.2 |
24 |
+++ php-5.5.0_beta2-r1.ebuild 31 Mar 2013 06:32:29 -0000 1.3 |
25 |
@@ -1,6 +1,6 @@ |
26 |
# Copyright 1999-2013 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r1.ebuild,v 1.2 2013/03/30 17:47:16 olemarkus Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r1.ebuild,v 1.3 2013/03/31 06:32:29 olemarkus Exp $ |
30 |
|
31 |
EAPI=5 |
32 |
|
33 |
@@ -452,10 +452,12 @@ |
34 |
|
35 |
# MySQL support |
36 |
local mysqllib="mysqlnd" |
37 |
+ local mysqlilib="mysqlnd" |
38 |
use libmysqlclient && mysqllib="${EPREFIX}/usr" |
39 |
+ use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config" |
40 |
|
41 |
my_conf+=" $(use_with mysql mysql $mysqllib)" |
42 |
- my_conf+=" $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)" |
43 |
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)" |
44 |
|
45 |
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)" |
46 |
if use mysql ; then |
47 |
|
48 |
|
49 |
|
50 |
1.693 dev-lang/php/ChangeLog |
51 |
|
52 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.693&view=markup |
53 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?rev=1.693&content-type=text/plain |
54 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/ChangeLog?r1=1.692&r2=1.693 |
55 |
|
56 |
Index: ChangeLog |
57 |
=================================================================== |
58 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v |
59 |
retrieving revision 1.692 |
60 |
retrieving revision 1.693 |
61 |
diff -u -r1.692 -r1.693 |
62 |
--- ChangeLog 30 Mar 2013 17:47:16 -0000 1.692 |
63 |
+++ ChangeLog 31 Mar 2013 06:32:29 -0000 1.693 |
64 |
@@ -1,6 +1,12 @@ |
65 |
# ChangeLog for dev-lang/php |
66 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
67 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.692 2013/03/30 17:47:16 olemarkus Exp $ |
68 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.693 2013/03/31 06:32:29 olemarkus Exp $ |
69 |
+ |
70 |
+*php-5.5.0_beta2-r2 (31 Mar 2013) |
71 |
+ |
72 |
+ 31 Mar 2013; Ole Markus With <olemarkus@g.o> |
73 |
+ +php-5.5.0_beta2-r2.ebuild, php-5.5.0_beta2-r1.ebuild: |
74 |
+ Fixed using mysqlnd by default also for mysqli. (Bug 463950) |
75 |
|
76 |
30 Mar 2013; Ole Markus With <olemarkus@g.o> |
77 |
+files/stricter-libc-client-symlink-check.patch, php-5.5.0_beta2-r1.ebuild: |
78 |
|
79 |
|
80 |
|
81 |
1.1 dev-lang/php/php-5.5.0_beta2-r2.ebuild |
82 |
|
83 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r2.ebuild?rev=1.1&view=markup |
84 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r2.ebuild?rev=1.1&content-type=text/plain |
85 |
|
86 |
Index: php-5.5.0_beta2-r2.ebuild |
87 |
=================================================================== |
88 |
# Copyright 1999-2013 Gentoo Foundation |
89 |
# Distributed under the terms of the GNU General Public License v2 |
90 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r2.ebuild,v 1.1 2013/03/31 06:32:29 olemarkus Exp $ |
91 |
|
92 |
EAPI=5 |
93 |
|
94 |
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool |
95 |
|
96 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
97 |
|
98 |
function php_get_uri () |
99 |
{ |
100 |
case "${1}" in |
101 |
"php-pre") |
102 |
echo "http://downloads.php.net/dsp/${2}" |
103 |
;; |
104 |
"php") |
105 |
echo "http://www.php.net/distributions/${2}" |
106 |
;; |
107 |
"olemarkus") |
108 |
echo "http://dev.gentoo.org/~olemarkus/php/${2}" |
109 |
;; |
110 |
"gentoo") |
111 |
echo "mirror://gentoo/${2}" |
112 |
;; |
113 |
*) |
114 |
die "unhandled case in php_get_uri" |
115 |
;; |
116 |
esac |
117 |
} |
118 |
|
119 |
PHP_MV="$(get_major_version)" |
120 |
SLOT="$(get_version_component_range 1-2)" |
121 |
|
122 |
# alias, so we can handle different types of releases (finals, rcs, alphas, |
123 |
# betas, ...) w/o changing the whole ebuild |
124 |
PHP_PV="${PV/_rc/RC}" |
125 |
PHP_PV="${PHP_PV/_alpha/alpha}" |
126 |
PHP_PV="${PHP_PV/_beta/beta}" |
127 |
PHP_RELEASE="php" |
128 |
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre" |
129 |
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre" |
130 |
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre" |
131 |
PHP_P="${PN}-${PHP_PV}" |
132 |
|
133 |
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")" |
134 |
|
135 |
PHP_FPM_CONF_VER="1" |
136 |
|
137 |
SRC_URI="${PHP_SRC_URI}" |
138 |
|
139 |
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs." |
140 |
HOMEPAGE="http://php.net/" |
141 |
LICENSE="PHP-3" |
142 |
|
143 |
S="${WORKDIR}/${PHP_P}" |
144 |
|
145 |
# We can build the following SAPIs in the given order |
146 |
SAPIS="embed cli cgi fpm apache2" |
147 |
|
148 |
# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
149 |
IUSE="${IUSE} |
150 |
${SAPIS/cli/+cli} |
151 |
threads" |
152 |
|
153 |
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk |
154 |
crypt +ctype curl curlwrappers debug doc |
155 |
enchant exif frontbase +fileinfo +filter firebird |
156 |
flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
157 |
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash |
158 |
mssql mysql libmysqlclient mysqli nls |
159 |
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
160 |
readline recode selinux +session sharedmem |
161 |
+simplexml snmp soap sockets spell sqlite ssl |
162 |
sybase-ct sysvipc tidy +tokenizer truetype unicode wddx |
163 |
+xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib" |
164 |
|
165 |
DEPEND=" |
166 |
>=app-admin/eselect-php-0.7.0[apache2?,fpm?] |
167 |
>=dev-libs/libpcre-8.32[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 |
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 |
libmysqlclient? ( |
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-3.7.6.3 ) |
215 |
ssl? ( >=dev-libs/openssl-0.9.7 ) |
216 |
sybase-ct? ( dev-db/freetds ) |
217 |
tidy? ( app-text/htmltidy ) |
218 |
truetype? ( |
219 |
=media-libs/freetype-2* |
220 |
>=media-libs/t1lib-5.0.0 |
221 |
!gd? ( |
222 |
virtual/jpeg media-libs/libpng sys-libs/zlib ) |
223 |
) |
224 |
unicode? ( dev-libs/oniguruma ) |
225 |
wddx? ( >=dev-libs/libxml2-2.6.8 ) |
226 |
xml? ( >=dev-libs/libxml2-2.6.8 ) |
227 |
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
228 |
xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
229 |
xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
230 |
xpm? ( |
231 |
x11-libs/libXpm |
232 |
virtual/jpeg |
233 |
media-libs/libpng sys-libs/zlib |
234 |
) |
235 |
xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
236 |
zip? ( sys-libs/zlib ) |
237 |
zlib? ( sys-libs/zlib ) |
238 |
virtual/mta |
239 |
" |
240 |
|
241 |
php="=${CATEGORY}/${PF}" |
242 |
|
243 |
REQUIRED_USE=" |
244 |
truetype? ( gd ) |
245 |
cjk? ( gd ) |
246 |
exif? ( gd ) |
247 |
|
248 |
xpm? ( gd ) |
249 |
gd? ( zlib ) |
250 |
simplexml? ( xml ) |
251 |
soap? ( xml ) |
252 |
wddx? ( xml ) |
253 |
xmlrpc? ( || ( xml iconv ) ) |
254 |
xmlreader? ( xml ) |
255 |
xsl? ( xml ) |
256 |
ldap-sasl? ( ldap ) |
257 |
mhash? ( hash ) |
258 |
phar? ( hash ) |
259 |
libmysqlclient? ( || ( |
260 |
mysql |
261 |
mysqli |
262 |
pdo |
263 |
) ) |
264 |
|
265 |
qdbm? ( !gdbm ) |
266 |
readline? ( !libedit ) |
267 |
recode? ( !imap !mysql !mysqli ) |
268 |
sharedmem? ( !threads ) |
269 |
|
270 |
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )" |
271 |
|
272 |
RDEPEND="${DEPEND}" |
273 |
|
274 |
RDEPEND="${RDEPEND} fpm? ( selinux? ( sec-policy/selinux-phpfpm ) )" |
275 |
|
276 |
DEPEND="${DEPEND} |
277 |
sys-devel/flex |
278 |
>=sys-devel/m4-1.4.3 |
279 |
>=sys-devel/libtool-1.5.18" |
280 |
|
281 |
# They are in PDEPEND because we need PHP installed first! |
282 |
PDEPEND="doc? ( app-doc/php-docs )" |
283 |
|
284 |
# Allow users to install production version if they want to |
285 |
|
286 |
case "${PHP_INI_VERSION}" in |
287 |
production|development) |
288 |
;; |
289 |
*) |
290 |
PHP_INI_VERSION="development" |
291 |
;; |
292 |
esac |
293 |
|
294 |
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}" |
295 |
PHP_INI_FILE="php.ini" |
296 |
|
297 |
want_apache |
298 |
|
299 |
pkg_setup() { |
300 |
depend.apache_pkg_setup |
301 |
} |
302 |
|
303 |
php_install_ini() { |
304 |
local phpsapi="${1}" |
305 |
|
306 |
# work out where we are installing the ini file |
307 |
php_set_ini_dir "${phpsapi}" |
308 |
|
309 |
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}" |
310 |
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" |
311 |
|
312 |
# default to /tmp for save_path, bug #282768 |
313 |
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" |
314 |
|
315 |
# Set the extension dir |
316 |
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" |
317 |
|
318 |
# Set the include path to point to where we want to find PEAR packages |
319 |
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" |
320 |
|
321 |
|
322 |
dodir "${PHP_INI_DIR#${EPREFIX}}" |
323 |
insinto "${PHP_INI_DIR#${EPREFIX}}" |
324 |
newins "${phpinisrc}" "${PHP_INI_FILE}" |
325 |
|
326 |
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
327 |
elog |
328 |
|
329 |
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
330 |
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
331 |
|
332 |
if use_if_iuse opcache; then |
333 |
elog "Adding opcache to $PHP_EXT_INI_DIR" |
334 |
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
335 |
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
336 |
fi |
337 |
|
338 |
# SAPI-specific handling |
339 |
|
340 |
if [[ "${sapi}" == "fpm" ]] ; then |
341 |
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0 |
342 |
einfo "Installing FPM CGI config file php-fpm.conf" |
343 |
insinto "${PHP_INI_DIR#${EPREFIX}}" |
344 |
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf |
345 |
|
346 |
# Remove bogus /etc/php-fpm.conf.default (bug 359906) |
347 |
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default" |
348 |
fi |
349 |
|
350 |
# Install PHP ini files into /usr/share/php |
351 |
|
352 |
dodoc php.ini-development |
353 |
dodoc php.ini-production |
354 |
|
355 |
} |
356 |
|
357 |
php_set_ini_dir() { |
358 |
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
359 |
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
360 |
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
361 |
} |
362 |
|
363 |
src_prepare() { |
364 |
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path |
365 |
# ([empty session.save_path]/session_mm_[sapi][gid].sem) |
366 |
# there is no easy way to circumvent that, all php calls during |
367 |
# install use -n, so no php.ini file will be used. |
368 |
# As such, this is the easiest way to get around |
369 |
addpredict /session_mm_cli250.sem |
370 |
addpredict /session_mm_cli0.sem |
371 |
|
372 |
# Change PHP branding |
373 |
# Get the alpha/beta/rc version |
374 |
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \ |
375 |
-i configure.in || die "Unable to change PHP branding" |
376 |
|
377 |
|
378 |
epatch "${FILESDIR}"/stricter-libc-client-symlink-check.patch |
379 |
epatch "${FILESDIR}"/all_strict_aliasing.patch |
380 |
|
381 |
# Patch PHP to show Gentoo as the server platform |
382 |
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \ |
383 |
-i configure.in || die "Failed to fix server platform name" |
384 |
|
385 |
# Prevent PHP from activating the Apache config, |
386 |
# as we will do that ourselves |
387 |
sed -i \ |
388 |
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
389 |
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
390 |
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 |
391 |
|
392 |
# Patch PHP to support heimdal instead of mit-krb5 |
393 |
if has_version "app-crypt/heimdal" ; then |
394 |
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \ |
395 |
|| die "Failed to fix heimdal libname" |
396 |
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \ |
397 |
|| die "Failed to fix heimdal crypt library reference" |
398 |
fi |
399 |
|
400 |
#Add user patches #357637 |
401 |
epatch_user |
402 |
|
403 |
#force rebuilding aclocal.m4 |
404 |
rm aclocal.m4 |
405 |
eautoreconf |
406 |
|
407 |
if [[ ${CHOST} == *-darwin* ]] ; then |
408 |
# http://bugs.php.net/bug.php?id=48795, bug #343481 |
409 |
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die |
410 |
fi |
411 |
} |
412 |
|
413 |
src_configure() { |
414 |
addpredict /usr/share/snmp/mibs/.index |
415 |
addpredict /var/lib/net-snmp/mib_indexes |
416 |
|
417 |
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
418 |
|
419 |
# This is a global variable and should be in caps. It isn't because the |
420 |
# phpconfutils eclass relies on exactly this name... |
421 |
# for --with-libdir see bug #327025 |
422 |
my_conf=" |
423 |
--prefix="${PHP_DESTDIR}" |
424 |
--mandir="${PHP_DESTDIR}"/man |
425 |
--infodir="${PHP_DESTDIR}"/info |
426 |
--libdir="${PHP_DESTDIR}"/lib |
427 |
--with-libdir=$(get_libdir) |
428 |
--without-pear |
429 |
$(use_enable threads maintainer-zts)" |
430 |
|
431 |
# extension USE flag shared |
432 |
my_conf+=" |
433 |
$(use_enable bcmath bcmath ) |
434 |
$(use_with bzip2 bz2 "${EPREFIX}"/usr) |
435 |
$(use_enable calendar calendar ) |
436 |
$(use_enable ctype ctype ) |
437 |
$(use_with curl curl "${EPREFIX}"/usr) |
438 |
$(use_with curlwrappers curlwrappers "${EPREFIX}"/usr) |
439 |
$(use_enable xml dom ) |
440 |
$(use_with enchant enchant "${EPREFIX}"/usr) |
441 |
$(use_enable exif exif ) |
442 |
$(use_enable fileinfo fileinfo ) |
443 |
$(use_enable filter filter ) |
444 |
$(use_enable ftp ftp ) |
445 |
$(use_with nls gettext "${EPREFIX}"/usr) |
446 |
$(use_with gmp gmp "${EPREFIX}"/usr) |
447 |
$(use_enable hash hash ) |
448 |
$(use_with mhash mhash "${EPREFIX}"/usr) |
449 |
$(use_with iconv iconv ) |
450 |
$(use_enable intl intl ) |
451 |
$(use_enable ipv6 ipv6 ) |
452 |
$(use_enable json json ) |
453 |
$(use_with kerberos kerberos "${EPREFIX}"/usr) |
454 |
$(use_enable xml libxml ) |
455 |
$(use_with xml libxml-dir "${EPREFIX}"/usr) |
456 |
$(use_enable unicode mbstring ) |
457 |
$(use_with crypt mcrypt "${EPREFIX}"/usr) |
458 |
$(use_with mssql mssql "${EPREFIX}"/usr) |
459 |
$(use_with unicode onig "${EPREFIX}"/usr) |
460 |
$(use_with ssl openssl "${EPREFIX}"/usr) |
461 |
$(use_with ssl openssl-dir "${EPREFIX}"/usr) |
462 |
$(use_enable pcntl pcntl ) |
463 |
$(use_enable phar phar ) |
464 |
$(use_enable pdo pdo ) |
465 |
$(use_enable opcache opcache ) |
466 |
$(use_with postgres pgsql "${EPREFIX}"/usr) |
467 |
$(use_enable posix posix ) |
468 |
$(use_with spell pspell "${EPREFIX}"/usr) |
469 |
$(use_with recode recode "${EPREFIX}"/usr) |
470 |
$(use_enable simplexml simplexml ) |
471 |
$(use_enable sharedmem shmop ) |
472 |
$(use_with snmp snmp "${EPREFIX}"/usr) |
473 |
$(use_enable soap soap ) |
474 |
$(use_enable sockets sockets ) |
475 |
$(use_with sqlite sqlite3 "${EPREFIX}"/usr) |
476 |
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr) |
477 |
$(use_enable sysvipc sysvmsg ) |
478 |
$(use_enable sysvipc sysvsem ) |
479 |
$(use_enable sysvipc sysvshm ) |
480 |
$(use_with tidy tidy "${EPREFIX}"/usr) |
481 |
$(use_enable tokenizer tokenizer ) |
482 |
$(use_enable wddx wddx ) |
483 |
$(use_enable xml xml ) |
484 |
$(use_enable xmlreader xmlreader ) |
485 |
$(use_enable xmlwriter xmlwriter ) |
486 |
$(use_with xmlrpc xmlrpc) |
487 |
$(use_with xsl xsl "${EPREFIX}"/usr) |
488 |
$(use_enable zip zip ) |
489 |
$(use_with zlib zlib "${EPREFIX}"/usr) |
490 |
$(use_enable debug debug )" |
491 |
|
492 |
# DBA support |
493 |
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
494 |
|| use qdbm ; then |
495 |
my_conf="${my_conf} --enable-dba${shared}" |
496 |
fi |
497 |
|
498 |
# DBA drivers support |
499 |
my_conf+=" |
500 |
$(use_with cdb cdb) |
501 |
$(use_with berkdb db4 ${EPREFIX}/usr) |
502 |
$(use_enable flatfile flatfile ) |
503 |
$(use_with gdbm gdbm ${EPREFIX}/usr) |
504 |
$(use_enable inifile inifile ) |
505 |
$(use_with qdbm qdbm ${EPREFIX}/usr)" |
506 |
|
507 |
# Support for the GD graphics library |
508 |
my_conf+=" |
509 |
$(use_with truetype freetype-dir ${EPREFIX}/usr) |
510 |
$(use_with truetype t1lib ${EPREFIX}/usr) |
511 |
$(use_enable cjk gd-jis-conv ) |
512 |
$(use_with gd jpeg-dir ${EPREFIX}/usr) |
513 |
$(use_with gd png-dir ${EPREFIX}/usr) |
514 |
$(use_with xpm xpm-dir ${EPREFIX}/usr)" |
515 |
# enable gd last, so configure can pick up the previous settings |
516 |
my_conf+=" |
517 |
$(use_with gd gd)" |
518 |
|
519 |
# IMAP support |
520 |
if use imap ; then |
521 |
my_conf+=" |
522 |
$(use_with imap imap ${EPREFIX}/usr) |
523 |
$(use_with ssl imap-ssl ${EPREFIX}/usr)" |
524 |
fi |
525 |
|
526 |
# Interbase/firebird support |
527 |
|
528 |
if use firebird ; then |
529 |
my_conf+=" |
530 |
$(use_with firebird interbase ${EPREFIX}/usr)" |
531 |
fi |
532 |
|
533 |
# LDAP support |
534 |
if use ldap ; then |
535 |
my_conf+=" |
536 |
$(use_with ldap ldap ${EPREFIX}/usr) |
537 |
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)" |
538 |
fi |
539 |
|
540 |
# MySQL support |
541 |
local mysqllib="mysqlnd" |
542 |
local mysqlilib="mysqlnd" |
543 |
use libmysqlclient && mysqllib="${EPREFIX}/usr" |
544 |
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config" |
545 |
|
546 |
my_conf+=" $(use_with mysql mysql $mysqllib)" |
547 |
my_conf+=" $(use_with mysqli mysqli $mysqlilib)" |
548 |
|
549 |
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)" |
550 |
if use mysql ; then |
551 |
my_conf+="${mysqlsock}" |
552 |
elif use mysqli ; then |
553 |
my_conf+="${mysqlsock}" |
554 |
fi |
555 |
|
556 |
# ODBC support |
557 |
if use odbc ; then |
558 |
my_conf+=" |
559 |
$(use_with odbc unixODBC ${EPREFIX}/usr)" |
560 |
fi |
561 |
|
562 |
if use iodbc ; then |
563 |
my_conf+=" |
564 |
$(use_with iodbc iodbc ${EPREFIX}/usr)" |
565 |
fi |
566 |
|
567 |
# Oracle support |
568 |
if use oci8-instant-client ; then |
569 |
my_conf+=" |
570 |
$(use_with oci8-instant-client oci8)" |
571 |
fi |
572 |
|
573 |
# PDO support |
574 |
if use pdo ; then |
575 |
my_conf+=" |
576 |
$(use_with mssql pdo-dblib ) |
577 |
$(use_with mysql pdo-mysql ${mysqllib}) |
578 |
$(use_with postgres pdo-pgsql ) |
579 |
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr) |
580 |
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)" |
581 |
if use oci8-instant-client ; then |
582 |
my_conf+=" |
583 |
$(use_with oci8-instant-client pdo-oci)" |
584 |
fi |
585 |
fi |
586 |
|
587 |
# readline/libedit support |
588 |
my_conf+=" |
589 |
$(use_with readline readline ${EPREFIX}/usr) |
590 |
$(use_with libedit libedit ${EPREFIX}/usr)" |
591 |
|
592 |
# Session support |
593 |
if use session ; then |
594 |
my_conf+=" |
595 |
$(use_with sharedmem mm ${EPREFIX}/usr)" |
596 |
else |
597 |
my_conf+=" |
598 |
$(use_enable session session )" |
599 |
fi |
600 |
|
601 |
# Use pic for shared modules such as apache2's mod_php |
602 |
my_conf="${my_conf} --with-pic" |
603 |
|
604 |
# we use the system copy of pcre |
605 |
# --with-pcre-regex affects ext/pcre |
606 |
# --with-pcre-dir affects ext/filter and ext/zip |
607 |
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr" |
608 |
|
609 |
# Catch CFLAGS problems |
610 |
# Fixes bug #14067. |
611 |
# Changed order to run it in reverse for bug #32022 and #12021. |
612 |
replace-cpu-flags "k6*" "i586" |
613 |
|
614 |
# Support user-passed configuration parameters |
615 |
my_conf="${my_conf} ${EXTRA_ECONF:-}" |
616 |
|
617 |
# Support the Apache2 extras, they must be set globally for all |
618 |
# SAPIs to work correctly, especially for external PHP extensions |
619 |
|
620 |
mkdir -p "${WORKDIR}/sapis-build" |
621 |
for one_sapi in $SAPIS ; do |
622 |
use "${one_sapi}" || continue |
623 |
php_set_ini_dir "${one_sapi}" |
624 |
|
625 |
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}" |
626 |
cd "${WORKDIR}/sapis-build/${one_sapi}" |
627 |
|
628 |
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} |
629 |
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" |
630 |
|
631 |
for sapi in $SAPIS ; do |
632 |
case "$sapi" in |
633 |
cli|cgi|embed|fpm) |
634 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
635 |
sapi_conf="${sapi_conf} --enable-${sapi}" |
636 |
else |
637 |
sapi_conf="${sapi_conf} --disable-${sapi}" |
638 |
fi |
639 |
;; |
640 |
|
641 |
apache2) |
642 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
643 |
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs" |
644 |
else |
645 |
sapi_conf="${sapi_conf} --without-apxs2" |
646 |
fi |
647 |
;; |
648 |
esac |
649 |
done |
650 |
|
651 |
econf ${sapi_conf} |
652 |
done |
653 |
} |
654 |
|
655 |
src_compile() { |
656 |
# snmp seems to run during src_compile, too (bug #324739) |
657 |
addpredict /usr/share/snmp/mibs/.index |
658 |
addpredict /var/lib/net-snmp/mib_indexes |
659 |
|
660 |
for sapi in ${SAPIS} ; do |
661 |
if use "${sapi}"; then |
662 |
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
663 |
emake || die "emake failed" |
664 |
fi |
665 |
done |
666 |
} |
667 |
|
668 |
src_install() { |
669 |
# see bug #324739 for what happens when we don't have that |
670 |
addpredict /usr/share/snmp/mibs/.index |
671 |
|
672 |
# grab the first SAPI that got built and install common files from there |
673 |
local first_sapi="" |
674 |
for sapi in $SAPIS ; do |
675 |
if use $sapi ; then |
676 |
first_sapi=$sapi |
677 |
break |
678 |
fi |
679 |
done |
680 |
|
681 |
# Makefile forgets to create this before trying to write to it... |
682 |
dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
683 |
|
684 |
# Install php environment (without any sapis) |
685 |
cd "${WORKDIR}/sapis-build/$first_sapi" |
686 |
emake INSTALL_ROOT="${D}" \ |
687 |
install-build install-headers install-programs \ |
688 |
|| die "emake install failed" |
689 |
|
690 |
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
691 |
|
692 |
# Create the directory where we'll put version-specific php scripts |
693 |
keepdir /usr/share/php${PHP_MV} |
694 |
|
695 |
local sapi="", file="" |
696 |
local sapi_list="" |
697 |
|
698 |
for sapi in ${SAPIS}; do |
699 |
if use "${sapi}" ; then |
700 |
einfo "Installing SAPI: ${sapi}" |
701 |
cd "${WORKDIR}/sapis-build/${sapi}" |
702 |
|
703 |
if [[ "${sapi}" == "apache2" ]] ; then |
704 |
# We're specifically not using emake install-sapi as libtool |
705 |
# may cause unnecessary relink failures (see bug #351266) |
706 |
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
707 |
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)" |
708 |
keepdir "/usr/$(get_libdir)/apache2/modules" |
709 |
else |
710 |
# needed each time, php_install_ini would reset it |
711 |
into "${PHP_DESTDIR#${EPREFIX}}" |
712 |
case "$sapi" in |
713 |
cli) |
714 |
source="sapi/cli/php" |
715 |
;; |
716 |
cgi) |
717 |
source="sapi/cgi/php-cgi" |
718 |
;; |
719 |
fpm) |
720 |
source="sapi/fpm/php-fpm" |
721 |
;; |
722 |
embed) |
723 |
source="libs/libphp${PHP_MV}$(get_libname)" |
724 |
;; |
725 |
*) |
726 |
die "unhandled sapi in src_install" |
727 |
;; |
728 |
esac |
729 |
|
730 |
if [[ "${source}" == *"$(get_libname)" ]]; then |
731 |
dolib.so "${source}" || die "Unable to install ${sapi} sapi" |
732 |
else |
733 |
dobin "${source}" || die "Unable to install ${sapi} sapi" |
734 |
fi |
735 |
fi |
736 |
|
737 |
php_install_ini "${sapi}" |
738 |
|
739 |
# construct correct SAPI string for php-config |
740 |
# thanks to ferringb for the bash voodoo |
741 |
if [[ "${sapi}" == "apache2" ]]; then |
742 |
sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
743 |
else |
744 |
sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
745 |
fi |
746 |
fi |
747 |
done |
748 |
|
749 |
# Installing opcache module |
750 |
if use_if_iuse opcache ; then |
751 |
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module" |
752 |
fi |
753 |
|
754 |
# Install env.d files |
755 |
newenvd "${FILESDIR}/20php5-envd" \ |
756 |
"20php${SLOT}" |
757 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i \ |
758 |
"${ED}/etc/env.d/20php${SLOT}" |
759 |
sed -e "s|php5|php${SLOT}|g" -i \ |
760 |
"${ED}/etc/env.d/20php${SLOT}" |
761 |
|
762 |
# set php-config variable correctly (bug #278439) |
763 |
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
764 |
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" |
765 |
} |
766 |
|
767 |
src_test() { |
768 |
echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
769 |
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
770 |
if [[ ! -x "${PHP_BIN}" ]] ; then |
771 |
ewarn "Test phase requires USE=cli, skipping" |
772 |
return |
773 |
else |
774 |
export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
775 |
fi |
776 |
|
777 |
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then |
778 |
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi" |
779 |
fi |
780 |
|
781 |
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \ |
782 |
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}" |
783 |
|
784 |
for name in ${EXPECTED_TEST_FAILURES}; do |
785 |
mv "${name}.out" "${name}.out.orig" 2>/dev/null |
786 |
done |
787 |
|
788 |
local failed="$(find -name '*.out')" |
789 |
if [[ ${failed} != "" ]] ; then |
790 |
ewarn "The following test cases failed unexpectedly:" |
791 |
for name in ${failed}; do |
792 |
ewarn " ${name/.out/}" |
793 |
done |
794 |
else |
795 |
einfo "No unexpected test failures, all fine" |
796 |
fi |
797 |
|
798 |
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
799 |
local passed="" |
800 |
for name in ${EXPECTED_TEST_FAILURES}; do |
801 |
[[ -f "${name}.diff" ]] && continue |
802 |
passed="${passed} ${name}" |
803 |
done |
804 |
if [[ ${passed} != "" ]] ; then |
805 |
einfo "The following test cases passed unexpectedly:" |
806 |
for name in ${passed}; do |
807 |
ewarn " ${passed}" |
808 |
done |
809 |
else |
810 |
einfo "None of the known-to-fail tests passed, all fine" |
811 |
fi |
812 |
fi |
813 |
} |
814 |
|
815 |
pkg_postinst() { |
816 |
# Output some general info to the user |
817 |
if use apache2 ; then |
818 |
APACHE2_MOD_DEFINE="PHP5" |
819 |
APACHE2_MOD_CONF="70_mod_php5" |
820 |
apache-module_pkg_postinst |
821 |
fi |
822 |
|
823 |
# Create the symlinks for php |
824 |
for m in ${SAPIS}; do |
825 |
[[ ${m} == 'embed' ]] && continue; |
826 |
if use $m ; then |
827 |
local ci=$(eselect php show $m) |
828 |
if [[ -z $ci ]]; then |
829 |
eselect php set $m php${SLOT} |
830 |
einfo "Switched ${m} to use php:${SLOT}" |
831 |
einfo |
832 |
elif [[ $ci != "php${SLOT}" ]] ; then |
833 |
elog "To switch $m to use php:${SLOT}, run" |
834 |
elog " eselect php set $m php${SLOT}" |
835 |
elog |
836 |
fi |
837 |
fi |
838 |
done |
839 |
|
840 |
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order" |
841 |
elog "to compile extensions for the ${SLOT} ABI" |
842 |
elog |
843 |
if ! use readline && use cli ; then |
844 |
ewarn "Note that in order to use php interactivly, you need to enable" |
845 |
ewarn "the readline USE flag or php -a will hang" |
846 |
fi |
847 |
elog |
848 |
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version." |
849 |
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either" |
850 |
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf" |
851 |
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}" |
852 |
|
853 |
elog |
854 |
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:" |
855 |
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml" |
856 |
elog |
857 |
} |
858 |
|
859 |
pkg_prerm() { |
860 |
eselect php cleanup |
861 |
} |