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/files/eblits: src_configure-v3.eblit src_prepare-v4.eblit
Date: Wed, 29 Jun 2011 06:38:58
Message-Id: 20110629063838.D4F5020054@flycatcher.gentoo.org
1 olemarkus 11/06/29 06:38:38
2
3 Added: src_configure-v3.eblit src_prepare-v4.eblit
4 Log:
5 Added php 5.4 alpha 1
6
7 (Portage version: 2.1.10.3/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-lang/php/files/eblits/src_configure-v3.eblit
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit?rev=1.1&content-type=text/plain
14
15 Index: src_configure-v3.eblit
16 ===================================================================
17 # Copyright 1999-2011 Gentoo Foundation
18 # Distributed under the terms of the GNU General Public License v2
19 # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
20
21 eblit-php-src_configure() {
22 PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
23
24 # This is a global variable and should be in caps. It isn't because the
25 # phpconfutils eclass relies on exactly this name...
26 # for --with-libdir see bug #327025
27 my_conf="
28 --prefix="${PHP_DESTDIR}"
29 --mandir="${PHP_DESTDIR}"/man
30 --infodir="${PHP_DESTDIR}"/info
31 --libdir="${PHP_DESTDIR}"/lib
32 --with-libdir=$(get_libdir)
33 --without-pear
34 $(use_enable threads maintainer-zts)"
35
36 phpconfutils_init
37
38 # extension USE flag shared
39 phpconfutils_extension_enable "bcmath" "bcmath" 1
40 phpconfutils_extension_with "bz2" "bzip2" 1
41 phpconfutils_extension_enable "calendar" "calendar" 1
42 phpconfutils_extension_disable "ctype" "ctype" 0
43 phpconfutils_extension_with "curl" "curl" 1
44 phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
45 phpconfutils_extension_disable "dom" "xml" 0
46 phpconfutils_extension_with "enchant" "enchant" 1 "/usr"
47 phpconfutils_extension_enable "exif" "exif" 1
48 phpconfutils_extension_disable "fileinfo" "fileinfo" 1
49 phpconfutils_extension_disable "filter" "filter" 0
50 phpconfutils_extension_enable "ftp" "ftp" 1
51 phpconfutils_extension_with "gettext" "nls" 1
52 phpconfutils_extension_with "gmp" "gmp" 1
53 phpconfutils_extension_disable "hash" "hash" 0
54 phpconfutils_extension_with "mhash" "mhash" 0
55 phpconfutils_extension_without "iconv" "iconv" 0
56 phpconfutils_extension_enable "intl" "intl" 1
57 phpconfutils_extension_disable "ipv6" "ipv6" 0
58 phpconfutils_extension_disable "json" "json" 0
59 phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
60 phpconfutils_extension_disable "libxml" "xml" 0
61 phpconfutils_extension_enable "mbstring" "unicode" 1
62 phpconfutils_extension_with "mcrypt" "crypt" 1
63 phpconfutils_extension_with "mssql" "mssql" 1
64 phpconfutils_extension_with "onig" "unicode" 0 "/usr"
65 phpconfutils_extension_with "openssl" "ssl" 0
66 phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
67 phpconfutils_extension_enable "pcntl" "pcntl" 1
68 phpconfutils_extension_disable "phar" "phar" 1
69 phpconfutils_extension_disable "pdo" "pdo" 0
70 phpconfutils_extension_with "pgsql" "postgres" 1
71 phpconfutils_extension_disable "posix" "posix" 0
72 phpconfutils_extension_with "pspell" "spell" 1
73 phpconfutils_extension_with "recode" "recode" 1
74 phpconfutils_extension_disable "simplexml" "simplexml" 0
75 phpconfutils_extension_enable "shmop" "sharedmem" 0
76 phpconfutils_extension_with "snmp" "snmp" 1
77 phpconfutils_extension_enable "soap" "soap" 1
78 phpconfutils_extension_enable "sockets" "sockets" 1
79 phpconfutils_extension_without "sqlite3" "sqlite3" 1 "/usr"
80 phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 "/usr"
81 phpconfutils_extension_enable "sysvmsg" "sysvipc" 1
82 phpconfutils_extension_enable "sysvsem" "sysvipc" 1
83 phpconfutils_extension_enable "sysvshm" "sysvipc" 1
84 phpconfutils_extension_with "tidy" "tidy" 1
85 phpconfutils_extension_disable "tokenizer" "tokenizer" 0
86 phpconfutils_extension_enable "wddx" "wddx" 1
87 phpconfutils_extension_disable "xml" "xml" 0
88 phpconfutils_extension_disable "xmlreader" "xmlreader" 0
89 phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0
90 phpconfutils_extension_with "xmlrpc" "xmlrpc" 1
91 phpconfutils_extension_with "xsl" "xsl" 1
92 phpconfutils_extension_enable "zip" "zip" 1
93 phpconfutils_extension_with "zlib" "zlib" 1
94 phpconfutils_extension_enable "debug" "debug" 0
95
96 # DBA support
97 if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
98 || use qdbm ; then
99 my_conf="${my_conf} --enable-dba${shared}"
100 fi
101
102 # DBA drivers support
103 phpconfutils_extension_with "cdb" "cdb" 0
104 phpconfutils_extension_with "db4" "berkdb" 0
105 phpconfutils_extension_enable "flatfile" "flatfile" 0
106 phpconfutils_extension_with "gdbm" "gdbm" 0
107 phpconfutils_extension_enable "inifile" "inifile" 0
108 phpconfutils_extension_with "qdbm" "qdbm" 0
109
110 # Support for the GD graphics library
111 phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
112 phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
113 phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
114 phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
115 phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
116 phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
117 # enable gd last, so configure can pick up the previous settings
118 phpconfutils_extension_with "gd" "gd" 0
119
120 # IMAP support
121 if use imap ; then
122 phpconfutils_extension_with "imap" "imap" 1
123 phpconfutils_extension_with "imap-ssl" "ssl" 0
124 fi
125
126 # Interbase/firebird support
127
128 if use firebird ; then
129 phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
130 fi
131
132 # LDAP support
133 if use ldap ; then
134 phpconfutils_extension_with "ldap" "ldap" 1
135 phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
136 fi
137
138 # MySQL support
139 if use mysql ; then
140 if use mysqlnd ; then
141 phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd"
142 else
143 phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
144 fi
145 phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
146 fi
147
148 # MySQLi support
149 if use mysqlnd ; then
150 phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd"
151 else
152 phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
153 fi
154
155 # ODBC support
156 if use odbc ; then
157 phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
158 fi
159
160 if use iodbc ; then
161 phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
162 fi
163
164 # Oracle support
165 if use oci8-instant-client ; then
166 OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
167 sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
168 sed -e 's|-r.*||g')"
169
170 phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
171 "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
172 fi
173
174 # PDO support
175 if use pdo ; then
176 phpconfutils_extension_with "pdo-dblib" "mssql" 1
177 if use mysqlnd ; then
178 phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd"
179 else
180 phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
181 fi
182 phpconfutils_extension_with "pdo-pgsql" "postgres" 1
183 phpconfutils_extension_with "pdo-sqlite" "sqlite3" 1 "/usr"
184 phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
185 if use oci8-instant-client ; then
186 phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
187 "instantclient,/usr,${OCI8IC_PKG}"
188 fi
189 fi
190
191 # readline/libedit support
192 phpconfutils_extension_with "readline" "readline" 0
193 phpconfutils_extension_with "libedit" "libedit" 0
194
195 # Session support
196 if use session ; then
197 phpconfutils_extension_with "mm" "sharedmem" 0
198 else
199 phpconfutils_extension_disable "session" "session" 0
200 fi
201
202 # SQLite support
203 if use sqlite ; then
204 phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
205 phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
206 else
207 phpconfutils_extension_without "sqlite" "sqlite" 0
208 fi
209
210 if use pic ; then
211 my_conf="${my_conf} --with-pic"
212 fi
213
214 # we use the system copy of pcre
215 # --with-pcre-regex affects ext/pcre
216 # --with-pcre-dir affects ext/filter and ext/zip
217 my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
218
219 # Catch CFLAGS problems
220 php_check_cflags
221
222 # Support user-passed configuration parameters
223 my_conf="${my_conf} ${EXTRA_ECONF:-}"
224
225 # Support the Apache2 extras, they must be set globally for all
226 # SAPIs to work correctly, especially for external PHP extensions
227
228 mkdir -p "${WORKDIR}/sapis-build"
229 for one_sapi in $SAPIS ; do
230 use "${one_sapi}" || continue
231 php_set_ini_dir "${one_sapi}"
232
233 cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
234 cd "${WORKDIR}/sapis-build/${one_sapi}"
235
236 sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
237 --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
238
239 for sapi in $SAPIS ; do
240 case "$sapi" in
241 cli|cgi|embed|fpm)
242 if [[ "${one_sapi}" == "${sapi}" ]] ; then
243 sapi_conf="${sapi_conf} --enable-${sapi}"
244 else
245 sapi_conf="${sapi_conf} --disable-${sapi}"
246 fi
247 ;;
248
249 apache2)
250 if [[ "${one_sapi}" == "${sapi}" ]] ; then
251 sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
252 else
253 sapi_conf="${sapi_conf} --without-apxs2"
254 fi
255 ;;
256 esac
257 done
258
259 econf ${sapi_conf}
260 done
261 }
262
263
264
265 1.1 dev-lang/php/files/eblits/src_prepare-v4.eblit
266
267 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v4.eblit?rev=1.1&view=markup
268 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v4.eblit?rev=1.1&content-type=text/plain
269
270 Index: src_prepare-v4.eblit
271 ===================================================================
272 # Copyright 1999-2011 Gentoo Foundation
273 # Distributed under the terms of the GNU General Public License v2
274 # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v4.eblit,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
275
276 eblit-php-src_prepare() {
277 # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
278 # ([empty session.save_path]/session_mm_[sapi][gid].sem)
279 # there is no easy way to circumvent that, all php calls during
280 # install use -n, so no php.ini file will be used.
281 # As such, this is the easiest way to get around
282 addpredict /session_mm_cli250.sem
283 addpredict /session_mm_cli0.sem
284
285 # kolab support (support for imap annotations)
286 use kolab && epatch "${WORKDIR}/patches/opt/imap-kolab-annotations.patch"
287
288 # Change PHP branding
289 # Get the alpha/beta/rc version
290 local ver=$(get_version_component_range 4)
291 sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-${ver}-pl${PR/r/}-gentoo\2|g" \
292 -i configure.in || die "Unable to change PHP branding"
293
294 # Apply generic PHP patches
295 EPATCH_SOURCE="${WORKDIR}/patches/generic" EPATCH_SUFFIX="patch" \
296 EPATCH_FORCE="yes" \
297 EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
298
299 # Patch PHP to show Gentoo as the server platform
300 sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
301 -i configure.in || die "Failed to fix server platform name"
302
303 # Prevent PHP from activating the Apache config,
304 # as we will do that ourselves
305 sed -i \
306 -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
307 -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
308 configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
309
310 # Patch PHP to support heimdal instead of mit-krb5
311 if has_version "app-crypt/heimdal" ; then
312 sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
313 || die "Failed to fix heimdal libname"
314 sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
315 || die "Failed to fix heimdal crypt library reference"
316 fi
317
318 # Suhosin support
319 if [[ -n $SUHOSIN_VERSION ]] ; then
320 if use suhosin ; then
321 epatch "${WORKDIR}/${SUHOSIN_PATCH}"
322 fi
323 else
324 ewarn "Please note that this version of PHP does not yet come with a suhosin patch"
325 fi
326
327 #Add user patches #357637
328 epatch_user
329
330 #force rebuilding aclocal.m4
331 rm aclocal.m4
332 eautoreconf
333 }