1 |
olemarkus 10/10/08 18:25:10 |
2 |
|
3 |
Modified: common-v1.eblit |
4 |
Added: src_prepare-v2.eblit common-v2.eblit |
5 |
src_configure-v521.eblit pkg_setup-v2.eblit |
6 |
pkg_postinst-v2.eblit src_configure-v2.eblit |
7 |
src_install-v2.eblit |
8 |
Log: |
9 |
Added ebuilds supporting minor version slotting |
10 |
(Portage version: 2.1.8.3/cvs/Linux i686) |
11 |
|
12 |
Revision Changes Path |
13 |
1.2 dev-lang/php/files/eblits/common-v1.eblit |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit?rev=1.2&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit?rev=1.2&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit?r1=1.1&r2=1.2 |
18 |
|
19 |
Index: common-v1.eblit |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit,v |
22 |
retrieving revision 1.1 |
23 |
retrieving revision 1.2 |
24 |
diff -u -r1.1 -r1.2 |
25 |
--- common-v1.eblit 27 May 2010 23:05:04 -0000 1.1 |
26 |
+++ common-v1.eblit 8 Oct 2010 18:25:10 -0000 1.2 |
27 |
@@ -1,9 +1,9 @@ |
28 |
# Copyright 1999-2010 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit,v 1.2 2010/10/08 18:25:10 olemarkus Exp $ |
32 |
|
33 |
php_set_ini_dir() { |
34 |
- PHP_INI_DIR="/etc/php/${1}-php${PHP_MV}" |
35 |
+ PHP_INI_DIR="/etc/php/${1}-php${SLOT}" |
36 |
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
37 |
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
38 |
} |
39 |
|
40 |
|
41 |
|
42 |
1.1 dev-lang/php/files/eblits/src_prepare-v2.eblit |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: src_prepare-v2.eblit |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ |
52 |
|
53 |
eblit-php-src_prepare() { |
54 |
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path |
55 |
# ([empty session.save_path]/session_mm_[sapi][gid].sem) |
56 |
# there is no easy way to circumvent that, all php calls during |
57 |
# install use -n, so no php.ini file will be used. |
58 |
# As such, this is the easiest way to get around |
59 |
addpredict /session_mm_cli250.sem |
60 |
addpredict /session_mm_cli0.sem |
61 |
|
62 |
# kolab support (support for imap annotations) |
63 |
use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch" |
64 |
|
65 |
# Change PHP branding |
66 |
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \ |
67 |
-i configure.in || die "Unable to change PHP branding" |
68 |
|
69 |
# Apply generic PHP patches |
70 |
EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \ |
71 |
EPATCH_FORCE="yes" \ |
72 |
EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch |
73 |
|
74 |
# Patch PHP to show Gentoo as the server platform |
75 |
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \ |
76 |
-i configure.in || die "Failed to fix server platform name" |
77 |
|
78 |
# Prevent PHP from activating the Apache config, |
79 |
# as we will do that ourselves |
80 |
sed -i \ |
81 |
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
82 |
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
83 |
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 |
84 |
|
85 |
# Patch PHP to support heimdal instead of mit-krb5 |
86 |
if has_version "app-crypt/heimdal" ; then |
87 |
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \ |
88 |
|| die "Failed to fix heimdal libname" |
89 |
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \ |
90 |
|| die "Failed to fix heimdal crypt library reference" |
91 |
fi |
92 |
|
93 |
# Suhosin support |
94 |
if use suhosin ; then |
95 |
epatch "${WORKDIR}/${SUHOSIN_PATCH}" |
96 |
fi |
97 |
|
98 |
# rebuild the whole autotools stuff as we are heavily patching it |
99 |
# (suhosin, fastbuild, ...) |
100 |
|
101 |
# eaclocal doesn't accept --force, so we try to force re-generation |
102 |
# this way |
103 |
rm aclocal.m4 |
104 |
|
105 |
# work around divert() issues with newer autoconf, bug #281697 |
106 |
if has_version '>=sys-devel/autoconf-2.64' ; then |
107 |
sed -i -r \ |
108 |
-e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \ |
109 |
$(grep -l divert $(find . -name '*.m4') configure.in) || die |
110 |
fi |
111 |
eautoreconf --force -W no-cross |
112 |
} |
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
1.3 dev-lang/php/files/eblits/common-v2.eblit |
119 |
|
120 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit?rev=1.3&view=markup |
121 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit?rev=1.3&content-type=text/plain |
122 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit?r1=1.2&r2=1.3 |
123 |
|
124 |
|
125 |
|
126 |
|
127 |
1.1 dev-lang/php/files/eblits/src_configure-v521.eblit |
128 |
|
129 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v521.eblit?rev=1.1&view=markup |
130 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v521.eblit?rev=1.1&content-type=text/plain |
131 |
|
132 |
Index: src_configure-v521.eblit |
133 |
=================================================================== |
134 |
# Copyright 1999-2010 Gentoo Foundation |
135 |
# Distributed under the terms of the GNU General Public License v2 |
136 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v521.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ |
137 |
|
138 |
eblit-php-src_configure() { |
139 |
export CFLAGS="${CFLAGS} -D_GNU_SOURCE" |
140 |
PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}" |
141 |
|
142 |
# This is a global variable and should be in caps. It isn't because the |
143 |
# phpconfutils eclass relies on exactly this name... |
144 |
my_conf=" |
145 |
--prefix="${PHP_DESTDIR}" |
146 |
--mandir="${PHP_DESTDIR}"/man |
147 |
--infodir="${PHP_DESTDIR}"/info |
148 |
--libdir="${PHP_DESTDIR}"/lib |
149 |
--with-libdir=$(get_libdir) |
150 |
--without-pear |
151 |
$(use_enable threads maintainer-zts)" |
152 |
|
153 |
phpconfutils_init |
154 |
|
155 |
# extension USE flag shared |
156 |
phpconfutils_extension_enable "bcmath" "bcmath" 1 |
157 |
phpconfutils_extension_with "bz2" "bzip2" 1 |
158 |
phpconfutils_extension_enable "calendar" "calendar" 1 |
159 |
phpconfutils_extension_disable "ctype" "ctype" 0 |
160 |
phpconfutils_extension_with "curl" "curl" 1 |
161 |
phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 |
162 |
phpconfutils_extension_enable "dbase" "dbase" 1 |
163 |
phpconfutils_extension_disable "dom" "xml" 0 |
164 |
phpconfutils_extension_enable "exif" "exif" 1 |
165 |
phpconfutils_extension_with "fbsql" "frontbase" 1 |
166 |
phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0" |
167 |
phpconfutils_extension_disable "filter" "filter" 0 |
168 |
phpconfutils_extension_enable "ftp" "ftp" 1 |
169 |
phpconfutils_extension_with "gettext" "nls" 1 |
170 |
phpconfutils_extension_with "gmp" "gmp" 1 |
171 |
phpconfutils_extension_disable "hash" "hash" 0 |
172 |
phpconfutils_extension_without "iconv" "iconv" 0 |
173 |
phpconfutils_extension_disable "ipv6" "ipv6" 0 |
174 |
phpconfutils_extension_disable "json" "json" 0 |
175 |
phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr" |
176 |
phpconfutils_extension_disable "libxml" "xml" 0 |
177 |
phpconfutils_extension_enable "mbstring" "unicode" 1 |
178 |
phpconfutils_extension_with "mcrypt" "crypt" 1 |
179 |
phpconfutils_extension_with "mhash" "mhash" 1 |
180 |
phpconfutils_extension_with "msql" "msql" 1 |
181 |
phpconfutils_extension_with "mssql" "mssql" 1 |
182 |
phpconfutils_extension_with "ncurses" "ncurses" 1 |
183 |
phpconfutils_extension_with "openssl" "ssl" 0 |
184 |
phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" |
185 |
phpconfutils_extension_enable "pcntl" "pcntl" 1 |
186 |
phpconfutils_extension_without "pcre-regex" "pcre" 0 |
187 |
phpconfutils_extension_disable "pdo" "pdo" 0 |
188 |
phpconfutils_extension_with "pgsql" "postgres" 1 |
189 |
phpconfutils_extension_disable "posix" "posix" 0 |
190 |
phpconfutils_extension_with "pspell" "spell" 1 |
191 |
phpconfutils_extension_with "recode" "recode" 1 |
192 |
phpconfutils_extension_disable "reflection" "reflection" 0 |
193 |
phpconfutils_extension_disable "simplexml" "simplexml" 0 |
194 |
phpconfutils_extension_enable "shmop" "sharedmem" 0 |
195 |
phpconfutils_extension_with "snmp" "snmp" 1 |
196 |
phpconfutils_extension_enable "soap" "soap" 1 |
197 |
phpconfutils_extension_enable "sockets" "sockets" 1 |
198 |
phpconfutils_extension_disable "spl" "spl" 0 |
199 |
phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 |
200 |
phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 |
201 |
phpconfutils_extension_enable "sysvsem" "sysvipc" 1 |
202 |
phpconfutils_extension_enable "sysvshm" "sysvipc" 1 |
203 |
phpconfutils_extension_with "tidy" "tidy" 1 |
204 |
phpconfutils_extension_disable "tokenizer" "tokenizer" 0 |
205 |
phpconfutils_extension_enable "wddx" "wddx" 1 |
206 |
phpconfutils_extension_disable "xml" "xml" 0 |
207 |
phpconfutils_extension_disable "xmlreader" "xmlreader" 0 |
208 |
phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0 |
209 |
phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 |
210 |
phpconfutils_extension_with "xsl" "xsl" 1 |
211 |
phpconfutils_extension_enable "zip" "zip" 1 |
212 |
phpconfutils_extension_with "zlib" "zlib" 1 |
213 |
phpconfutils_extension_enable "debug" "debug" 0 |
214 |
|
215 |
# DBA support |
216 |
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
217 |
|| use qdbm ; then |
218 |
my_conf="${my_conf} --enable-dba${shared}" |
219 |
fi |
220 |
|
221 |
# DBA drivers support |
222 |
phpconfutils_extension_with "cdb" "cdb" 0 |
223 |
phpconfutils_extension_with "db4" "berkdb" 0 |
224 |
phpconfutils_extension_enable "flatfile" "flatfile" 0 |
225 |
phpconfutils_extension_with "gdbm" "gdbm" 0 |
226 |
phpconfutils_extension_enable "inifile" "inifile" 0 |
227 |
phpconfutils_extension_with "qdbm" "qdbm" 0 |
228 |
|
229 |
# Support for the GD graphics library |
230 |
if use gd-external ; then |
231 |
phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" |
232 |
phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" |
233 |
phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 |
234 |
phpconfutils_extension_with "gd" "gd-external" 1 "/usr" |
235 |
else |
236 |
phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" |
237 |
phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" |
238 |
phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 |
239 |
phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr" |
240 |
phpconfutils_extension_with "png-dir" "gd" 0 "/usr" |
241 |
phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr" |
242 |
# enable gd last, so configure can pick up the previous settings |
243 |
phpconfutils_extension_with "gd" "gd" 0 |
244 |
fi |
245 |
|
246 |
# IMAP support |
247 |
if use imap ; then |
248 |
phpconfutils_extension_with "imap" "imap" 1 |
249 |
phpconfutils_extension_with "imap-ssl" "ssl" 0 |
250 |
fi |
251 |
|
252 |
phpconfutils_extension_with "interbase" "interbase" 0 "/opt" |
253 |
phpconfutils_extension_with "interbase" "firebird" 0 "/usr" |
254 |
|
255 |
# LDAP support |
256 |
if use ldap ; then |
257 |
if use oci8 ; then |
258 |
phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}" |
259 |
else |
260 |
phpconfutils_extension_with "ldap" "ldap" 1 |
261 |
phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 |
262 |
fi |
263 |
fi |
264 |
|
265 |
# MySQL support |
266 |
if use mysql ; then |
267 |
phpconfutils_extension_with "mysql" "mysql" 1 "/usr" |
268 |
phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock" |
269 |
fi |
270 |
|
271 |
# MySQLi support |
272 |
phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config" |
273 |
|
274 |
# ODBC support |
275 |
if use odbc ; then |
276 |
phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr" |
277 |
phpconfutils_extension_with "adabas" "adabas" 1 |
278 |
phpconfutils_extension_with "birdstep" "birdstep" 1 |
279 |
phpconfutils_extension_with "dbmaker" "dbmaker" 1 |
280 |
phpconfutils_extension_with "empress" "empress" 1 |
281 |
if use empress ; then |
282 |
phpconfutils_extension_with "empress-bcs" "empress-bcs" 0 |
283 |
fi |
284 |
phpconfutils_extension_with "esoob" "esoob" 1 |
285 |
# Needed to run conftest for IBM DB2 |
286 |
[[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`" |
287 |
phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}" |
288 |
phpconfutils_extension_with "sapdb" "sapdb" 1 |
289 |
phpconfutils_extension_with "solid" "solid" 1 |
290 |
fi |
291 |
|
292 |
if use iodbc ; then |
293 |
phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr" |
294 |
fi |
295 |
|
296 |
# Oracle support |
297 |
phpconfutils_extension_with "oci8" "oci8" 1 |
298 |
if use oci8-instant-client ; then |
299 |
OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \ |
300 |
sed -e 's|dev-db/oracle-instantclient-basic-||g' | \ |
301 |
sed -e 's|-r.*||g')" |
302 |
|
303 |
phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \ |
304 |
"instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib" |
305 |
fi |
306 |
|
307 |
# PDO support |
308 |
if use pdo ; then |
309 |
phpconfutils_extension_with "pdo-dblib" "mssql" 1 |
310 |
phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr" |
311 |
phpconfutils_extension_with "pdo-pgsql" "postgres" 1 |
312 |
phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr" |
313 |
phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr" |
314 |
if use oci8 ; then |
315 |
phpconfutils_extension_with "pdo-oci" "oci8" 1 |
316 |
fi |
317 |
if use oci8-instant-client ; then |
318 |
phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \ |
319 |
"instantclient,/usr,${OCI8IC_PKG}" |
320 |
fi |
321 |
fi |
322 |
|
323 |
# readline/libedit support |
324 |
phpconfutils_extension_with "readline" "readline" 0 |
325 |
phpconfutils_extension_with "libedit" "libedit" 0 |
326 |
|
327 |
# Session support |
328 |
if use session ; then |
329 |
phpconfutils_extension_with "mm" "sharedmem" 0 |
330 |
else |
331 |
phpconfutils_extension_disable "session" "session" 0 |
332 |
fi |
333 |
|
334 |
# SQLite support |
335 |
if use sqlite ; then |
336 |
phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr" |
337 |
phpconfutils_extension_enable "sqlite-utf8" "unicode" 0 |
338 |
else |
339 |
phpconfutils_extension_without "sqlite" "sqlite" 0 |
340 |
fi |
341 |
|
342 |
if use pic ; then |
343 |
my_conf="${my_conf} --with-pic" |
344 |
fi |
345 |
|
346 |
|
347 |
# we use the system copy of pcre |
348 |
# --with-pcre-regex affects ext/pcre |
349 |
# --with-pcre-dir affects ext/filter and ext/zip |
350 |
if use pcre ; then |
351 |
my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr" |
352 |
fi |
353 |
|
354 |
# Catch CFLAGS problems |
355 |
php_check_cflags |
356 |
|
357 |
# Support user-passed configuration parameters |
358 |
my_conf="${my_conf} ${EXTRA_ECONF:-}" |
359 |
|
360 |
# Support the Apache2 extras, they must be set globally for all |
361 |
# SAPIs to work correctly, especially for external PHP extensions |
362 |
|
363 |
mkdir -p "${WORKDIR}/sapis-build" |
364 |
for one_sapi in $SAPIS ; do |
365 |
use "${one_sapi}" || continue |
366 |
php_set_ini_dir "${one_sapi}" |
367 |
|
368 |
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}" |
369 |
cd "${WORKDIR}/sapis-build/${one_sapi}" |
370 |
|
371 |
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} |
372 |
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" |
373 |
|
374 |
for sapi in $SAPIS ; do |
375 |
case "$sapi" in |
376 |
cli|embed) |
377 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
378 |
sapi_conf="${sapi_conf} --enable-${sapi}" |
379 |
else |
380 |
sapi_conf="${sapi_conf} --disable-${sapi}" |
381 |
fi |
382 |
;; |
383 |
|
384 |
cgi) |
385 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
386 |
sapi_conf+=" --enable-cgi --enable-fastcgi" |
387 |
use discard-path && sapi_conf+=" --enable-discard-path" |
388 |
use force-cgi-redirect && sapi_conf+=" --enable-force-cgi-redirect" |
389 |
else |
390 |
sapi_conf+=" --disable-${sapi}" |
391 |
fi |
392 |
;; |
393 |
|
394 |
apache2) |
395 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
396 |
sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs" |
397 |
else |
398 |
sapi_conf="${sapi_conf} --without-apxs2" |
399 |
fi |
400 |
;; |
401 |
esac |
402 |
done |
403 |
|
404 |
econf ${sapi_conf} |
405 |
done |
406 |
} |
407 |
|
408 |
|
409 |
|
410 |
1.1 dev-lang/php/files/eblits/pkg_setup-v2.eblit |
411 |
|
412 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit?rev=1.1&view=markup |
413 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit?rev=1.1&content-type=text/plain |
414 |
|
415 |
Index: pkg_setup-v2.eblit |
416 |
=================================================================== |
417 |
# Copyright 1999-2010 Gentoo Foundation |
418 |
# Distributed under the terms of the GNU General Public License v2 |
419 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ |
420 |
|
421 |
eblit-php-pkg_setup() { |
422 |
# Mail support |
423 |
php_check_mta |
424 |
|
425 |
# imap support |
426 |
# if virtuals/imap-c-client goes to new style virtual, we can exchange this |
427 |
# for proper use-deps |
428 |
php_check_imap |
429 |
|
430 |
# Oracle support |
431 |
php_check_oracle_8 |
432 |
|
433 |
phpconfutils_warn_about_external_deps |
434 |
depend.apache_pkg_setup |
435 |
} |
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
1.1 dev-lang/php/files/eblits/pkg_postinst-v2.eblit |
442 |
|
443 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v2.eblit?rev=1.1&view=markup |
444 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v2.eblit?rev=1.1&content-type=text/plain |
445 |
|
446 |
Index: pkg_postinst-v2.eblit |
447 |
=================================================================== |
448 |
# Copyright 1999-2010 Gentoo Foundation |
449 |
# Distributed under the terms of the GNU General Public License v2 |
450 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ |
451 |
|
452 |
eblit-php-pkg_postinst() { |
453 |
# Output some general info to the user |
454 |
if use apache2 ; then |
455 |
APACHE2_MOD_DEFINE="PHP5" |
456 |
APACHE2_MOD_CONF="70_mod_php5" |
457 |
apache-module_pkg_postinst |
458 |
fi |
459 |
|
460 |
|
461 |
# Create the symlinks for php |
462 |
local m modules="cli apache2" |
463 |
for m in modules; do |
464 |
if use $m ; then |
465 |
local ci=$(eselect php show $m) |
466 |
if [[ -z $ci ]]; then |
467 |
eselect php set $m php${SLOT} |
468 |
elif [[ $ci != "php{$SLOT}" ]] ; then |
469 |
ewarn "To switch $m to use php-${SLOT}, run" |
470 |
ewarn " eselect php set $m php${SLOT}" |
471 |
ewarn |
472 |
fi |
473 |
fi |
474 |
done |
475 |
|
476 |
ewarn "You may have to recompile third-party extensions now" |
477 |
ewarn "(includes every dev-php5/pecl-* package and probably others in that category)" |
478 |
if ! use readline && use cli ; then |
479 |
ewarn "Note that in order to use php interactivly, you need to enable" |
480 |
ewarn "the readline USE flag or php -a will hang" |
481 |
fi |
482 |
ewarn |
483 |
} |
484 |
|
485 |
|
486 |
|
487 |
|
488 |
1.1 dev-lang/php/files/eblits/src_configure-v2.eblit |
489 |
|
490 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit?rev=1.1&view=markup |
491 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit?rev=1.1&content-type=text/plain |
492 |
|
493 |
Index: src_configure-v2.eblit |
494 |
=================================================================== |
495 |
# Copyright 1999-2010 Gentoo Foundation |
496 |
# Distributed under the terms of the GNU General Public License v2 |
497 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ |
498 |
|
499 |
eblit-php-src_configure() { |
500 |
PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}" |
501 |
|
502 |
# This is a global variable and should be in caps. It isn't because the |
503 |
# phpconfutils eclass relies on exactly this name... |
504 |
# for --with-libdir see bug #327025 |
505 |
my_conf=" |
506 |
--prefix="${PHP_DESTDIR}" |
507 |
--mandir="${PHP_DESTDIR}"/man |
508 |
--infodir="${PHP_DESTDIR}"/info |
509 |
--libdir="${PHP_DESTDIR}"/lib |
510 |
--with-libdir=$(get_libdir) |
511 |
--without-pear |
512 |
$(use_enable threads maintainer-zts)" |
513 |
|
514 |
phpconfutils_init |
515 |
|
516 |
# extension USE flag shared |
517 |
phpconfutils_extension_enable "bcmath" "bcmath" 1 |
518 |
phpconfutils_extension_with "bz2" "bzip2" 1 |
519 |
phpconfutils_extension_enable "calendar" "calendar" 1 |
520 |
phpconfutils_extension_disable "ctype" "ctype" 0 |
521 |
phpconfutils_extension_with "curl" "curl" 1 |
522 |
phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 |
523 |
phpconfutils_extension_disable "dom" "xml" 0 |
524 |
phpconfutils_extension_with "enchant" "enchant" 1 "/usr" |
525 |
phpconfutils_extension_enable "exif" "exif" 1 |
526 |
phpconfutils_extension_disable "fileinfo" "fileinfo" 1 |
527 |
phpconfutils_extension_disable "filter" "filter" 0 |
528 |
phpconfutils_extension_enable "ftp" "ftp" 1 |
529 |
phpconfutils_extension_with "gettext" "nls" 1 |
530 |
phpconfutils_extension_with "gmp" "gmp" 1 |
531 |
phpconfutils_extension_disable "hash" "hash" 0 |
532 |
phpconfutils_extension_without "iconv" "iconv" 0 |
533 |
phpconfutils_extension_enable "intl" "intl" 1 |
534 |
phpconfutils_extension_disable "ipv6" "ipv6" 0 |
535 |
phpconfutils_extension_disable "json" "json" 0 |
536 |
phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr" |
537 |
phpconfutils_extension_disable "libxml" "xml" 0 |
538 |
phpconfutils_extension_enable "mbstring" "unicode" 1 |
539 |
phpconfutils_extension_with "mcrypt" "crypt" 1 |
540 |
phpconfutils_extension_with "mssql" "mssql" 1 |
541 |
phpconfutils_extension_with "onig" "unicode" 0 "/usr" |
542 |
phpconfutils_extension_with "openssl" "ssl" 0 |
543 |
phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" |
544 |
phpconfutils_extension_enable "pcntl" "pcntl" 1 |
545 |
phpconfutils_extension_disable "phar" "phar" 1 |
546 |
phpconfutils_extension_disable "pdo" "pdo" 0 |
547 |
phpconfutils_extension_with "pgsql" "postgres" 1 |
548 |
phpconfutils_extension_disable "posix" "posix" 0 |
549 |
phpconfutils_extension_with "pspell" "spell" 1 |
550 |
phpconfutils_extension_with "recode" "recode" 1 |
551 |
phpconfutils_extension_disable "simplexml" "simplexml" 0 |
552 |
phpconfutils_extension_enable "shmop" "sharedmem" 0 |
553 |
phpconfutils_extension_with "snmp" "snmp" 1 |
554 |
phpconfutils_extension_enable "soap" "soap" 1 |
555 |
phpconfutils_extension_enable "sockets" "sockets" 1 |
556 |
phpconfutils_extension_without "sqlite3" "sqlite3" 1 "/usr" |
557 |
phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 |
558 |
phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 |
559 |
phpconfutils_extension_enable "sysvsem" "sysvipc" 1 |
560 |
phpconfutils_extension_enable "sysvshm" "sysvipc" 1 |
561 |
phpconfutils_extension_with "tidy" "tidy" 1 |
562 |
phpconfutils_extension_disable "tokenizer" "tokenizer" 0 |
563 |
phpconfutils_extension_enable "wddx" "wddx" 1 |
564 |
phpconfutils_extension_disable "xml" "xml" 0 |
565 |
phpconfutils_extension_disable "xmlreader" "xmlreader" 0 |
566 |
phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0 |
567 |
phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 |
568 |
phpconfutils_extension_with "xsl" "xsl" 1 |
569 |
phpconfutils_extension_enable "zip" "zip" 1 |
570 |
phpconfutils_extension_with "zlib" "zlib" 1 |
571 |
phpconfutils_extension_enable "debug" "debug" 0 |
572 |
|
573 |
# DBA support |
574 |
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
575 |
|| use qdbm ; then |
576 |
my_conf="${my_conf} --enable-dba${shared}" |
577 |
fi |
578 |
|
579 |
# DBA drivers support |
580 |
phpconfutils_extension_with "cdb" "cdb" 0 |
581 |
phpconfutils_extension_with "db4" "berkdb" 0 |
582 |
phpconfutils_extension_enable "flatfile" "flatfile" 0 |
583 |
phpconfutils_extension_with "gdbm" "gdbm" 0 |
584 |
phpconfutils_extension_enable "inifile" "inifile" 0 |
585 |
phpconfutils_extension_with "qdbm" "qdbm" 0 |
586 |
|
587 |
# Support for the GD graphics library |
588 |
if use gd-external ; then |
589 |
phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" |
590 |
phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" |
591 |
phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 |
592 |
phpconfutils_extension_with "gd" "gd-external" 1 "/usr" |
593 |
else |
594 |
phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" |
595 |
phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" |
596 |
phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 |
597 |
phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr" |
598 |
phpconfutils_extension_with "png-dir" "gd" 0 "/usr" |
599 |
phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr" |
600 |
# enable gd last, so configure can pick up the previous settings |
601 |
phpconfutils_extension_with "gd" "gd" 0 |
602 |
fi |
603 |
|
604 |
# IMAP support |
605 |
if use imap ; then |
606 |
phpconfutils_extension_with "imap" "imap" 1 |
607 |
phpconfutils_extension_with "imap-ssl" "ssl" 0 |
608 |
fi |
609 |
|
610 |
phpconfutils_extension_with "interbase" "interbase" 0 "/opt" |
611 |
phpconfutils_extension_with "interbase" "firebird" 0 "/usr" |
612 |
|
613 |
# LDAP support |
614 |
if use ldap ; then |
615 |
if use oci8 ; then |
616 |
phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}" |
617 |
else |
618 |
phpconfutils_extension_with "ldap" "ldap" 1 |
619 |
phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 |
620 |
fi |
621 |
fi |
622 |
|
623 |
# MySQL support |
624 |
if use mysql ; then |
625 |
if use mysqlnd ; then |
626 |
phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd" |
627 |
else |
628 |
phpconfutils_extension_with "mysql" "mysql" 1 "/usr" |
629 |
fi |
630 |
phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock" |
631 |
fi |
632 |
|
633 |
# MySQLi support |
634 |
if use mysqlnd ; then |
635 |
phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd" |
636 |
else |
637 |
phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config" |
638 |
fi |
639 |
|
640 |
# ODBC support |
641 |
if use odbc ; then |
642 |
phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr" |
643 |
phpconfutils_extension_with "adabas" "adabas" 1 |
644 |
phpconfutils_extension_with "birdstep" "birdstep" 1 |
645 |
phpconfutils_extension_with "dbmaker" "dbmaker" 1 |
646 |
phpconfutils_extension_with "empress" "empress" 1 |
647 |
if use empress ; then |
648 |
phpconfutils_extension_with "empress-bcs" "empress-bcs" 0 |
649 |
fi |
650 |
phpconfutils_extension_with "esoob" "esoob" 1 |
651 |
# Needed to run conftest for IBM DB2 |
652 |
[[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`" |
653 |
phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}" |
654 |
phpconfutils_extension_with "sapdb" "sapdb" 1 |
655 |
phpconfutils_extension_with "solid" "solid" 1 |
656 |
fi |
657 |
|
658 |
if use iodbc ; then |
659 |
phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr" |
660 |
fi |
661 |
|
662 |
# Oracle support |
663 |
phpconfutils_extension_with "oci8" "oci8" 1 |
664 |
if use oci8-instant-client ; then |
665 |
OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \ |
666 |
sed -e 's|dev-db/oracle-instantclient-basic-||g' | \ |
667 |
sed -e 's|-r.*||g')" |
668 |
|
669 |
phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \ |
670 |
"instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib" |
671 |
fi |
672 |
|
673 |
# PDO support |
674 |
if use pdo ; then |
675 |
phpconfutils_extension_with "pdo-dblib" "mssql" 1 |
676 |
if use mysqlnd ; then |
677 |
phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd" |
678 |
else |
679 |
phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr" |
680 |
fi |
681 |
phpconfutils_extension_with "pdo-pgsql" "postgres" 1 |
682 |
phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr" |
683 |
phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr" |
684 |
if use oci8 ; then |
685 |
phpconfutils_extension_with "pdo-oci" "oci8" 1 |
686 |
fi |
687 |
if use oci8-instant-client ; then |
688 |
phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \ |
689 |
"instantclient,/usr,${OCI8IC_PKG}" |
690 |
fi |
691 |
fi |
692 |
|
693 |
# readline/libedit support |
694 |
phpconfutils_extension_with "readline" "readline" 0 |
695 |
phpconfutils_extension_with "libedit" "libedit" 0 |
696 |
|
697 |
# Session support |
698 |
if use session ; then |
699 |
phpconfutils_extension_with "mm" "sharedmem" 0 |
700 |
else |
701 |
phpconfutils_extension_disable "session" "session" 0 |
702 |
fi |
703 |
|
704 |
# SQLite support |
705 |
if use sqlite ; then |
706 |
phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr" |
707 |
phpconfutils_extension_enable "sqlite-utf8" "unicode" 0 |
708 |
else |
709 |
phpconfutils_extension_without "sqlite" "sqlite" 0 |
710 |
fi |
711 |
|
712 |
if use pic ; then |
713 |
my_conf="${my_conf} --with-pic" |
714 |
fi |
715 |
|
716 |
if has fpm ${IUSE//+} && use fpm ; then |
717 |
my_conf="${my_conf} --with-libevent-dir=/usr/`get_libdir`" |
718 |
fi |
719 |
|
720 |
|
721 |
# we use the system copy of pcre |
722 |
# --with-pcre-regex affects ext/pcre |
723 |
# --with-pcre-dir affects ext/filter and ext/zip |
724 |
my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr" |
725 |
|
726 |
# Catch CFLAGS problems |
727 |
php_check_cflags |
728 |
|
729 |
# Support user-passed configuration parameters |
730 |
my_conf="${my_conf} ${EXTRA_ECONF:-}" |
731 |
|
732 |
# Support the Apache2 extras, they must be set globally for all |
733 |
# SAPIs to work correctly, especially for external PHP extensions |
734 |
|
735 |
mkdir -p "${WORKDIR}/sapis-build" |
736 |
for one_sapi in $SAPIS ; do |
737 |
use "${one_sapi}" || continue |
738 |
php_set_ini_dir "${one_sapi}" |
739 |
|
740 |
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}" |
741 |
cd "${WORKDIR}/sapis-build/${one_sapi}" |
742 |
|
743 |
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} |
744 |
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" |
745 |
|
746 |
for sapi in $SAPIS ; do |
747 |
case "$sapi" in |
748 |
cli|cgi|embed|fpm) |
749 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
750 |
sapi_conf="${sapi_conf} --enable-${sapi}" |
751 |
else |
752 |
sapi_conf="${sapi_conf} --disable-${sapi}" |
753 |
fi |
754 |
;; |
755 |
|
756 |
apache2) |
757 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
758 |
sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs" |
759 |
else |
760 |
sapi_conf="${sapi_conf} --without-apxs2" |
761 |
fi |
762 |
;; |
763 |
esac |
764 |
done |
765 |
|
766 |
econf ${sapi_conf} |
767 |
done |
768 |
} |
769 |
|
770 |
|
771 |
|
772 |
1.3 dev-lang/php/files/eblits/src_install-v2.eblit |
773 |
|
774 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit?rev=1.3&view=markup |
775 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit?rev=1.3&content-type=text/plain |
776 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit?r1=1.2&r2=1.3 |