remove deprecated php eclasses
Hanno Böck

Hanno Böck commited on 2011-02-02 22:41:33
Zeige 2 geänderte Dateien mit 0 Einfügungen und 1457 Löschungen.

... ...
@@ -1,734 +0,0 @@
1
-# Copyright 1999-2007 Gentoo Foundation
2
-# Distributed under the terms of the GNU General Public License v2
3
-# $Header: /var/cvsroot/gentoo-x86/eclass/php5_2-sapi.eclass,v 1.34 2010/07/23 19:53:30 ssuominen Exp $
4
-
5
-# ========================================================================
6
-# Based on robbat2's work on the php4 sapi eclass
7
-#
8
-# Author: Stuart Herbert <stuart@gentoo.org>
9
-# Author: Luca Longinotti <chtekk@gentoo.org>
10
-#
11
-# ========================================================================
12
-
13
-# @ECLASS: php5_2-sapi.eclass
14
-# @MAINTAINER:
15
-# Gentoo PHP team <php-bugs@gentoo.org>
16
-# @BLURB: Eclass for building different php-5.2 SAPI instances.
17
-# @DESCRIPTION:
18
-# Eclass for building different php-5.2 SAPI instances. Use it for the
19
-# new-style =dev-lang/php-5.2* ebuilds.
20
-
21
-
22
-PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase interbase msql oci8 sapdb solid sybase sybase-ct"
23
-
24
-WANT_AUTOCONF="latest"
25
-WANT_AUTOMAKE="latest"
26
-
27
-inherit db-use flag-o-matic autotools toolchain-funcs libtool eutils phpconfutils php-common-r1
28
-
29
-# @ECLASS-VARIABLE: MY_PHP_P
30
-# @DESCRIPTION:
31
-# Set MY_PHP_P in the ebuild as needed to match tarball version.
32
-
33
-# @ECLASS-VARIABLE: PHP_PACKAGE
34
-# @DESCRIPTION:
35
-# We only set this variable if we are building a copy of php which can be
36
-# installed as a package in its own.
37
-# Copies of php which are compiled into other packages (e.g. php support
38
-# for the thttpd web server) don't need this variable.
39
-if [[ "${PHP_PACKAGE}" == 1 ]] ; then
40
-	HOMEPAGE="http://www.php.net/"
41
-	LICENSE="PHP-3"
42
-	SRC_URI="http://www.php.net/distributions/${MY_PHP_P}.tar.bz2"
43
-	S="${WORKDIR}/${MY_PHP_P}"
44
-fi
45
-
46
-IUSE="adabas bcmath berkdb birdstep bzip2 calendar cdb cjk crypt ctype curl curlwrappers db2 dbase dbmaker debug doc empress empress-bcs esoob exif frontbase fdftk filter firebird flatfile ftp gd gd-external gdbm gmp hash iconv imap inifile interbase iodbc ipv6 java-external json kerberos ldap ldap-sasl libedit mcve mhash msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc pcntl pcre pdo pic posix postgres qdbm readline reflection recode sapdb session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl suhosin sybase sybase-ct sysvipc tidy tokenizer truetype unicode wddx xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
47
-
48
-# these USE flags should have the correct dependencies
49
-DEPEND="adabas? ( >=dev-db/unixODBC-1.8.13 )
50
-		berkdb? ( =sys-libs/db-4* )
51
-		birdstep? ( >=dev-db/unixODBC-1.8.13 )
52
-		bzip2? ( app-arch/bzip2 )
53
-		cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
54
-		cjk? ( !gd? ( !gd-external? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) ) )
55
-		crypt? ( >=dev-libs/libmcrypt-2.4 )
56
-		curl? ( >=net-misc/curl-7.10.5 )
57
-		db2? ( >=dev-db/unixODBC-1.8.13 )
58
-		dbmaker? ( >=dev-db/unixODBC-1.8.13 )
59
-		empress? ( >=dev-db/unixODBC-1.8.13 )
60
-		empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
61
-		esoob? ( >=dev-db/unixODBC-1.8.13 )
62
-		exif? ( !gd? ( !gd-external? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) ) )
63
-		fdftk? ( app-text/fdftk )
64
-		firebird? ( dev-db/firebird )
65
-		gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
66
-		gd-external? ( media-libs/gd )
67
-		gdbm? ( >=sys-libs/gdbm-1.8.0 )
68
-		gmp? ( >=dev-libs/gmp-4.1.2 )
69
-		iconv? ( virtual/libiconv )
70
-		imap? ( virtual/imap-c-client )
71
-		iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 )
72
-		kerberos? ( virtual/krb5 )
73
-		ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
74
-		ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
75
-		libedit? ( dev-libs/libedit )
76
-		mcve? ( >=dev-libs/openssl-0.9.7 )
77
-		mhash? ( app-crypt/mhash )
78
-		mssql? ( dev-db/freetds )
79
-		mysql? ( virtual/mysql )
80
-		mysqli? ( >=virtual/mysql-4.1 )
81
-		ncurses? ( sys-libs/ncurses )
82
-		nls? ( sys-devel/gettext )
83
-		oci8-instant-client? ( dev-db/oracle-instantclient-basic )
84
-		odbc? ( >=dev-db/unixODBC-1.8.13 )
85
-		postgres? ( || ( >=dev-db/libpq-7.1 ( app-admin/eselect-postgresql
86
-			>=dev-db/postgresql-base-7.1 ) ) )
87
-		qdbm? ( dev-db/qdbm )
88
-		readline? ( sys-libs/readline )
89
-		recode? ( app-text/recode )
90
-		sapdb? ( >=dev-db/unixODBC-1.8.13 )
91
-		sharedmem? ( dev-libs/mm )
92
-		simplexml? ( >=dev-libs/libxml2-2.6.8 )
93
-		snmp? ( >=net-analyzer/net-snmp-5.2 )
94
-		soap? ( >=dev-libs/libxml2-2.6.8 )
95
-		solid? ( >=dev-db/unixODBC-1.8.13 )
96
-		spell? ( >=app-text/aspell-0.50 )
97
-		sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
98
-		ssl? ( >=dev-libs/openssl-0.9.7 )
99
-		sybase? ( dev-db/freetds )
100
-		tidy? ( app-text/htmltidy )
101
-		truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 !gd? ( !gd-external? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) ) )
102
-		wddx? ( >=dev-libs/libxml2-2.6.8 )
103
-		xml? ( >=dev-libs/libxml2-2.6.8 )
104
-		xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
105
-		xmlreader? ( >=dev-libs/libxml2-2.6.8 )
106
-		xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
107
-		xpm? ( x11-libs/libXpm virtual/jpeg media-libs/libpng sys-libs/zlib )
108
-		xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
109
-		zip? ( sys-libs/zlib )
110
-		zlib? ( sys-libs/zlib )
111
-		virtual/mta"
112
-
113
-# libswf conflicts with ming and should not
114
-# be installed with the new PHP ebuilds
115
-DEPEND="${DEPEND}
116
-		!media-libs/libswf"
117
-
118
-# simplistic for now
119
-RDEPEND="${DEPEND}"
120
-
121
-# those are only needed at compile-time
122
-DEPEND="${DEPEND}
123
-		>=sys-devel/m4-1.4.3
124
-		>=sys-devel/libtool-1.5.18"
125
-
126
-# Additional features
127
-#
128
-# They are in PDEPEND because we need PHP installed first!
129
-PDEPEND="doc? ( app-doc/php-docs )
130
-		filter? ( !dev-php5/pecl-filter )
131
-		java-external? ( dev-php5/php-java-bridge )
132
-		json? ( !dev-php5/pecl-json )
133
-		mcve? ( dev-php5/pecl-mcve )
134
-		pdo? ( !dev-php5/pecl-pdo )
135
-		suhosin? ( dev-php5/suhosin )
136
-		yaz? ( dev-php5/pecl-yaz )"
137
-
138
-# ========================================================================
139
-# php.ini Support
140
-# ========================================================================
141
-
142
-PHP_INI_FILE="php.ini"
143
-PHP_INI_UPSTREAM="php.ini-dist"
144
-
145
-# ========================================================================
146
-
147
-# @ECLASS-VARIABLE: PHP_PATCHSET_REV
148
-# @DESCRIPTION:
149
-# Provides PHP patchsets support.
150
-# This condition will help non php maintainers in fixing bugs and let them to
151
-# upload patchset tarballs somewhere else.
152
-if [[ ! -n ${PHP_PATCHSET_URI} ]]; then
153
-	SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
154
-else
155
-	SRC_URI="${SRC_URI} ${PHP_PATCHSET_URI}"
156
-fi
157
-
158
-# @ECLASS-VARIABLE: SUHOSIN_PATCH
159
-# @DESCRIPTION:
160
-# Tarball name for Suhosin patch (see http://www.suhosin.org/).
161
-# This feature will not be available in php if unset.
162
-[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )"
163
-
164
-
165
-# ========================================================================
166
-
167
-EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst
168
-
169
-# ========================================================================
170
-# INTERNAL FUNCTIONS
171
-# ========================================================================
172
-
173
-php5_2-sapi_check_use_flags() {
174
-	# Multiple USE dependencies
175
-	phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external"
176
-	phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external"
177
-	phpconfutils_use_depend_any "exif" "gd" "gd" "gd-external"
178
-
179
-	# Simple USE dependencies
180
-	phpconfutils_use_depend_all "xpm"			"gd"
181
-	phpconfutils_use_depend_all "gd"			"zlib"
182
-	phpconfutils_use_depend_all "simplexml"			"xml"
183
-	phpconfutils_use_depend_all "soap"			"xml"
184
-	phpconfutils_use_depend_all "wddx"			"xml"
185
-	phpconfutils_use_depend_all "xmlrpc"			"xml"
186
-	phpconfutils_use_depend_all "xmlreader"			"xml"
187
-	phpconfutils_use_depend_all "xmlwriter"			"xml"
188
-	phpconfutils_use_depend_all "xsl"			"xml"
189
-	phpconfutils_use_depend_all "filter"			"pcre"
190
-	phpconfutils_use_depend_all "xmlrpc"			"iconv"
191
-	phpconfutils_use_depend_all "java-external"		"session"
192
-	phpconfutils_use_depend_all "ldap-sasl"			"ldap"
193
-	phpconfutils_use_depend_all "mcve"			"ssl"
194
-	phpconfutils_use_depend_all "suhosin"			"unicode"
195
-	phpconfutils_use_depend_all "adabas"			"odbc"
196
-	phpconfutils_use_depend_all "birdstep"			"odbc"
197
-	phpconfutils_use_depend_all "dbmaker"			"odbc"
198
-	phpconfutils_use_depend_all "empress-bcs"		"odbc" "empress"
199
-	phpconfutils_use_depend_all "empress"			"odbc"
200
-	phpconfutils_use_depend_all "esoob"			"odbc"
201
-	phpconfutils_use_depend_all "db2"			"odbc"
202
-	phpconfutils_use_depend_all "iodbc"			"odbc"
203
-	phpconfutils_use_depend_all "sapdb"			"odbc"
204
-	phpconfutils_use_depend_all "solid"			"odbc"
205
-	phpconfutils_use_depend_all "kolab"			"imap"
206
-
207
-	# Direct USE conflicts
208
-	phpconfutils_use_conflict "gd" "gd-external"
209
-	phpconfutils_use_conflict "oci8" "oci8-instant-client"
210
-	phpconfutils_use_conflict "oci8" "ldap-sasl"
211
-	phpconfutils_use_conflict "qdbm" "gdbm"
212
-	phpconfutils_use_conflict "readline" "libedit"
213
-	phpconfutils_use_conflict "recode" "mysql" "imap" "yaz" "kolab"
214
-	phpconfutils_use_conflict "sharedmem" "threads"
215
-	phpconfutils_use_conflict "firebird" "interbase"
216
-
217
-	# IMAP support
218
-	php_check_imap
219
-
220
-	# Mail support
221
-	php_check_mta
222
-
223
-	# PostgreSQL support
224
-	php_check_pgsql
225
-
226
-	# Oracle support
227
-	php_check_oracle_8
228
-
229
-	phpconfutils_warn_about_external_deps
230
-
231
-	export PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE}"
232
-}
233
-
234
-php5_2-sapi_set_php_ini_dir() {
235
-	PHP_INI_DIR="/etc/php52/${PHPSAPI}-php5"
236
-	PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
237
-	PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
238
-}
239
-
240
-php5_2-sapi_install_ini() {
241
-	destdir=/usr/$(get_libdir)/php52
242
-
243
-	# get the extension dir, if not already defined
244
-	[[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`"
245
-
246
-	# work out where we are installing the ini file
247
-	php5_2-sapi_set_php_ini_dir
248
-
249
-	cp "${PHP_INI_UPSTREAM}" "${PHP_INI_UPSTREAM}-${PHPSAPI}"
250
-	local phpinisrc="${PHP_INI_UPSTREAM}-${PHPSAPI}"
251
-
252
-	# Set the extension dir
253
-	einfo "Setting extension_dir in php.ini"
254
-	sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc}
255
-
256
-	# A patch for PHP for security
257
-	einfo "Securing fopen wrappers"
258
-	sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc}
259
-
260
-	# Set the include path to point to where we want to find PEAR packages
261
-	einfo "Setting correct include_path"
262
-	sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc}
263
-
264
-	# Add needed MySQL extensions charset configuration
265
-	local phpmycnfcharset=""
266
-
267
-	if [[ "${PHPSAPI}" == "cli" ]] ; then
268
-		phpmycnfcharset="`php_get_mycnf_charset cli`"
269
-		einfo "MySQL extensions charset for 'cli' SAPI is: ${phpmycnfcharset}"
270
-	elif [[ "${PHPSAPI}" == "cgi" ]] ; then
271
-		phpmycnfcharset="`php_get_mycnf_charset cgi-fcgi`"
272
-		einfo "MySQL extensions charset for 'cgi' SAPI is: ${phpmycnfcharset}"
273
-	elif [[ "${PHPSAPI}" == "apache2" ]] ; then
274
-		phpmycnfcharset="`php_get_mycnf_charset apache2handler`"
275
-		einfo "MySQL extensions charset for 'apache2' SAPI is: ${phpmycnfcharset}"
276
-	else
277
-		einfo "No supported SAPI found for which to get the MySQL charset."
278
-	fi
279
-
280
-	if [[ -n "${phpmycnfcharset}" ]] && [[ "${phpmycnfcharset}" != "empty" ]] ; then
281
-		einfo "Setting MySQL extensions charset to ${phpmycnfcharset}"
282
-		echo "" >> ${phpinisrc}
283
-		echo "; MySQL extensions default connection charset settings" >> ${phpinisrc}
284
-		echo "mysql.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc}
285
-		echo "mysqli.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc}
286
-		echo "pdo_mysql.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc}
287
-	else
288
-		echo "" >> ${phpinisrc}
289
-		echo "; MySQL extensions default connection charset settings" >> ${phpinisrc}
290
-		echo ";mysql.connect_charset = utf8" >> ${phpinisrc}
291
-		echo ";mysqli.connect_charset = utf8" >> ${phpinisrc}
292
-		echo ";pdo_mysql.connect_charset = utf8" >> ${phpinisrc}
293
-	fi
294
-
295
-	dodir ${PHP_INI_DIR}
296
-	insinto ${PHP_INI_DIR}
297
-	newins ${phpinisrc} ${PHP_INI_FILE}
298
-
299
-	dodir ${PHP_EXT_INI_DIR}
300
-	dodir ${PHP_EXT_INI_DIR_ACTIVE}
301
-
302
-	# Install any extensions built as shared objects
303
-	if use sharedext ; then
304
-		for x in `ls "${D}/${PHPEXTDIR}/"*.so | sort` ; do
305
-			inifilename=${x/.so/.ini}
306
-			inifilename=`basename ${inifilename}`
307
-			echo "extension=`basename ${x}`" >> "${D}/${PHP_EXT_INI_DIR}/${inifilename}"
308
-			dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
309
-		done
310
-	fi
311
-}
312
-
313
-# ========================================================================
314
-# EXPORTED FUNCTIONS
315
-# ========================================================================
316
-
317
-# @FUNCTION: php5_2-sapi_pkg_setup
318
-# @DESCRIPTION:
319
-# Performs all the USE flag testing and magic before we do anything else.
320
-# This way saves a lot of time.
321
-php5_2-sapi_pkg_setup() {
322
-	php5_2-sapi_check_use_flags
323
-}
324
-
325
-# @FUNCTION: php5_2-sapi_src_unpack
326
-# @DESCRIPTION:
327
-# Takes care of unpacking, patching and autotools magic and disables
328
-# interactive tests.
329
-
330
-# @VARIABLE: PHP_EXTRA_BRANDING
331
-# @DESCRIPTION:
332
-# This variable allows an ebuild to add additional information like
333
-# snapshot dates to the version line.
334
-php5_2-sapi_src_unpack() {
335
-	cd "${S}"
336
-
337
-	[[ -z "${PHP_EXTRA_BRANDING}" ]] && PHP_EXTRA_BRANDING=""
338
-
339
-	# Change PHP branding
340
-	PHPPR=${PR/r/}
341
-	# >=php-5.2.4 has PHP_EXTRA_VERSION, previous had EXTRA_VERSION
342
-	sed -re "s|^(PHP_)?EXTRA_VERSION=\".*\"|\1EXTRA_VERSION=\"${PHP_EXTRA_BRANDING}-pl${PHPPR}-gentoo\"|g" -i configure.in \
343
-		|| die "Unable to change PHP branding to ${PHP_EXTRA_BRANDING}-pl${PHPPR}-gentoo"
344
-
345
-	# multilib-strict support
346
-	if [[ -n "${MULTILIB_PATCH}" ]] && [[ -f "${WORKDIR}/${MULTILIB_PATCH}" ]] ; then
347
-		epatch "${WORKDIR}/${MULTILIB_PATCH}"
348
-	else
349
-		ewarn "There is no multilib-strict patch available for this PHP release yet!"
350
-	fi
351
-
352
-	# Apply general PHP5 patches
353
-	if [[ -d "${WORKDIR}/${MY_PHP_PV}/php5" ]] ; then
354
-		EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/php5" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
355
-	fi
356
-
357
-	# Apply version-specific PHP patches
358
-	if [[ -d "${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" ]] ; then
359
-		EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
360
-	fi
361
-
362
-	# Patch PHP to show Gentoo as the server platform
363
-	sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in || die "Failed to fix server platform name"
364
-
365
-	# Disable interactive make test
366
-	sed -e 's/'`echo "\!getenv('NO_INTERACTION')"`'/false/g' -i run-tests.php
367
-
368
-	# Stop PHP from activating the Apache config, as we will do that ourselves
369
-	for i in configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 ; do
370
-		sed -i.orig -e 's,-i -a -n php5,-i -n php5,g' ${i}
371
-		sed -i.orig -e 's,-i -A -n php5,-i -n php5,g' ${i}
372
-	done
373
-
374
-	# Patch PHP to support heimdal instead of mit-krb5
375
-	if has_version "app-crypt/heimdal" ; then
376
-		sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 || die "Failed to fix heimdal libname"
377
-		sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 || die "Failed to fix heimdal crypt library reference"
378
-	fi
379
-
380
-	# Patch for PostgreSQL support
381
-	if use postgres ; then
382
-		sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 || die "Failed to fix PostgreSQL include paths"
383
-	fi
384
-
385
-	# Suhosin support
386
-	if use suhosin ; then
387
-		if [[ -n "${SUHOSIN_PATCH}" ]] && [[ -f "${DISTDIR}/${SUHOSIN_PATCH}" ]] ; then
388
-			epatch "${DISTDIR}/${SUHOSIN_PATCH}"
389
-		else
390
-			ewarn "There is no Suhosin patch available for this PHP release yet!"
391
-		fi
392
-	fi
393
-
394
-	# We are heavily patching autotools base files (configure.in) because
395
-	# of suhosin etc., so let's regenerate the whole stuff now
396
-
397
-	# work around divert() issues with newer autoconf #281697
398
-	if has_version '>=sys-devel/autoconf-2.64' ; then
399
-		sed -i -r \
400
-			-e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
401
-			$(grep -l divert $(find . -name '*.m4') configure.in) || die
402
-	fi
403
-
404
-	# eaclocal doesn't accept --force, so we try to force re-generation
405
-	# this way
406
-	rm aclocal.m4
407
-	eautoreconf --force -W no-cross
408
-
409
-}
410
-
411
-# @FUNCTION: php5_2-sapi_src_compile
412
-# @DESCRIPTION:
413
-# Takes care of compiling php according to USE flags set by user (and those automagically
414
-# enabled via phpconfutils eclass if unavoidable).
415
-php5_2-sapi_src_compile() {
416
-	destdir=/usr/$(get_libdir)/php52
417
-
418
-	php5_2-sapi_set_php_ini_dir
419
-
420
-	cd "${S}"
421
-
422
-	phpconfutils_init
423
-
424
-	my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE} --without-pear"
425
-
426
-	#				extension		USE flag		shared support?
427
-	phpconfutils_extension_enable	"bcmath"		"bcmath"		1
428
-	phpconfutils_extension_with	"bz2"			"bzip2"			1
429
-	phpconfutils_extension_enable	"calendar"		"calendar"		1
430
-	phpconfutils_extension_disable	"ctype"			"ctype"			0
431
-	phpconfutils_extension_with	"curl"			"curl"			1
432
-	phpconfutils_extension_with	"curlwrappers"		"curlwrappers"		0
433
-	phpconfutils_extension_enable	"dbase"			"dbase"			1
434
-	phpconfutils_extension_disable	"dom"			"xml"			0
435
-	phpconfutils_extension_enable	"exif"			"exif"			1
436
-	phpconfutils_extension_with	"fbsql"			"frontbase"		1
437
-	phpconfutils_extension_with	"fdftk"			"fdftk"			1 "/opt/fdftk-6.0"
438
-	phpconfutils_extension_disable	"filter"		"filter"		0
439
-	phpconfutils_extension_enable	"ftp"			"ftp"			1
440
-	phpconfutils_extension_with	"gettext"		"nls"			1
441
-	phpconfutils_extension_with	"gmp"			"gmp"			1
442
-	phpconfutils_extension_disable	"hash"			"hash"			0
443
-	phpconfutils_extension_without	"iconv"			"iconv"			0
444
-	phpconfutils_extension_disable	"ipv6"			"ipv6"			0
445
-	phpconfutils_extension_disable	"json"			"json"			0
446
-	phpconfutils_extension_with	"kerberos"		"kerberos"		0 "/usr"
447
-	phpconfutils_extension_disable	"libxml"		"xml"			0
448
-	phpconfutils_extension_enable	"mbstring"		"unicode"		1
449
-	phpconfutils_extension_with	"mcrypt"		"crypt"			1
450
-	phpconfutils_extension_with	"mhash"			"mhash"			1
451
-	phpconfutils_extension_with	"msql"			"msql"			1
452
-	phpconfutils_extension_with	"mssql"			"mssql"			1
453
-	phpconfutils_extension_with	"ncurses"		"ncurses"		1
454
-	phpconfutils_extension_with	"openssl"		"ssl"			0
455
-	phpconfutils_extension_with	"openssl-dir"		"ssl"			0 "/usr"
456
-	phpconfutils_extension_enable	"pcntl" 		"pcntl" 		1
457
-	phpconfutils_extension_without	"pcre-regex"		"pcre"			0
458
-	phpconfutils_extension_disable	"pdo"			"pdo"			0
459
-	phpconfutils_extension_with	"pgsql"			"postgres"		1
460
-	phpconfutils_extension_disable	"posix"			"posix"			0
461
-	phpconfutils_extension_with	"pspell"		"spell"			1
462
-	phpconfutils_extension_with	"recode"		"recode"		1
463
-	phpconfutils_extension_disable	"reflection"		"reflection"		0
464
-	phpconfutils_extension_disable	"simplexml"		"simplexml"		0
465
-	phpconfutils_extension_enable	"shmop"			"sharedmem"		0
466
-	phpconfutils_extension_with	"snmp"			"snmp"			1
467
-	phpconfutils_extension_enable	"soap"			"soap"			1
468
-	phpconfutils_extension_enable	"sockets"		"sockets"		1
469
-	phpconfutils_extension_disable	"spl"			"spl"			0
470
-	phpconfutils_extension_with	"sybase"		"sybase"		1
471
-	phpconfutils_extension_with	"sybase-ct"		"sybase-ct"		1
472
-	phpconfutils_extension_enable	"sysvmsg"		"sysvipc"		1
473
-	phpconfutils_extension_enable	"sysvsem"		"sysvipc"		1
474
-	phpconfutils_extension_enable	"sysvshm"		"sysvipc"		1
475
-	phpconfutils_extension_with	"tidy"			"tidy"			1
476
-	phpconfutils_extension_disable	"tokenizer"		"tokenizer"		0
477
-	phpconfutils_extension_enable	"wddx"			"wddx"			1
478
-	phpconfutils_extension_disable	"xml"			"xml"			0
479
-	phpconfutils_extension_disable	"xmlreader"		"xmlreader"		0
480
-	phpconfutils_extension_disable	"xmlwriter"		"xmlwriter"		0
481
-	phpconfutils_extension_with	"xmlrpc"		"xmlrpc"		1
482
-	phpconfutils_extension_with	"xsl"			"xsl"			1
483
-	phpconfutils_extension_enable	"zip"			"zip"			1
484
-	phpconfutils_extension_with	"zlib"			"zlib"			1
485
-	phpconfutils_extension_enable	"debug"			"debug"			0
486
-
487
-	# DBA support
488
-	if use cdb || use berkdb || use flatfile || use gdbm || use inifile || use qdbm ; then
489
-		my_conf="${my_conf} --enable-dba${shared}"
490
-	fi
491
-
492
-	# Tell PHP where the db.h is on FreeBSD
493
-#	if use berkdb ; then
494
-#		append-cppflags "-I$(db_includedir)"
495
-#	fi
496
-
497
-	# DBA drivers support
498
-	phpconfutils_extension_with 	"cdb"			"cdb"			0
499
-	phpconfutils_extension_with 	"db4"			"berkdb"		0
500
-	phpconfutils_extension_disable 	"flatfile"		"flatfile"		0
501
-	phpconfutils_extension_with 	"gdbm"			"gdbm"			0
502
-	phpconfutils_extension_disable 	"inifile"		"inifile"		0
503
-	phpconfutils_extension_with	"qdbm"			"qdbm"			0
504
-
505
-	# Support for the GD graphics library
506
-	if use gd-external || phpconfutils_usecheck gd-external ; then
507
-		phpconfutils_extension_with	"freetype-dir"	"truetype"		0 "/usr"
508
-		phpconfutils_extension_with	"t1lib"		"truetype"		0 "/usr"
509
-		phpconfutils_extension_enable	"gd-jis-conv"	"cjk" 			0
510
-		phpconfutils_extension_with 	"gd" 		"gd-external"		1 "/usr"
511
-	else
512
-		phpconfutils_extension_with	"freetype-dir"	"truetype"		0 "/usr"
513
-		phpconfutils_extension_with	"t1lib"		"truetype"		0 "/usr"
514
-		phpconfutils_extension_enable	"gd-jis-conv"	"cjk"			0
515
-		phpconfutils_extension_with	"jpeg-dir"	"gd"			0 "/usr"
516
-		phpconfutils_extension_with 	"png-dir" 	"gd" 			0 "/usr"
517
-		phpconfutils_extension_with 	"xpm-dir" 	"xpm" 			0 "/usr"
518
-		# enable gd last, so configure can pick up the previous settings
519
-		phpconfutils_extension_with 	"gd" 		"gd" 			0
520
-	fi
521
-
522
-	# IMAP support
523
-	if use imap || phpconfutils_usecheck imap ; then
524
-		phpconfutils_extension_with	"imap"		"imap"			1
525
-		phpconfutils_extension_with	"imap-ssl"	"ssl"			0
526
-	fi
527
-
528
-	# Interbase support
529
-	if use interbase ; then
530
-		my_conf="${my_conf} --with-interbase=/opt"
531
-	fi
532
-
533
-	# Firebird support - see Bug 186791
534
-	if use firebird ; then
535
-		my_conf="${my_conf} --with-interbase=/usr"
536
-	fi
537
-
538
-	# LDAP support
539
-	if use ldap || phpconfutils_usecheck ldap ; then
540
-		if use oci8 ; then
541
-			phpconfutils_extension_with	"ldap"		"ldap"		1 "${ORACLE_HOME}"
542
-		else
543
-			phpconfutils_extension_with	"ldap"		"ldap"		1
544
-			phpconfutils_extension_with	"ldap-sasl"	"ldap-sasl"	0
545
-		fi
546
-	fi
547
-
548
-	# MySQL support
549
-	if use mysql ; then
550
-		phpconfutils_extension_with	"mysql"			"mysql"		1 "/usr"
551
-		phpconfutils_extension_with	"mysql-sock"		"mysql"		0 "/var/run/mysqld/mysqld.sock"
552
-	fi
553
-
554
-	# MySQLi support
555
-	phpconfutils_extension_with		"mysqli"		"mysqli"	1 "/usr/bin/mysql_config"
556
-
557
-	# ODBC support
558
-	if use odbc || phpconfutils_usecheck odbc ; then
559
-		phpconfutils_extension_with	"unixODBC"		"odbc"		1 "/usr"
560
-
561
-		phpconfutils_extension_with	"adabas"		"adabas"	1
562
-		phpconfutils_extension_with	"birdstep"		"birdstep"	1
563
-		phpconfutils_extension_with	"dbmaker"		"dbmaker"	1
564
-		phpconfutils_extension_with	"empress"		"empress"	1
565
-		if use empress || phpconfutils_usecheck empress ; then
566
-			phpconfutils_extension_with	"empress-bcs"	"empress-bcs"	0
567
-		fi
568
-		phpconfutils_extension_with	"esoob"			"esoob"		1
569
-		phpconfutils_extension_with	"ibm-db2"		"db2"		1
570
-		phpconfutils_extension_with	"iodbc"			"iodbc"		1 "/usr"
571
-		phpconfutils_extension_with	"sapdb"			"sapdb"		1
572
-		phpconfutils_extension_with	"solid"			"solid"		1
573
-	fi
574
-
575
-	# Oracle support
576
-	if use oci8 ; then
577
-		phpconfutils_extension_with	"oci8"			"oci8"		1
578
-	fi
579
-	if use oci8-instant-client ; then
580
-		OCI8IC_PKG="`best_version dev-db/oracle-instantclient-basic`"
581
-		OCI8IC_PKG="`printf ${OCI8IC_PKG} | sed -e 's|dev-db/oracle-instantclient-basic-||g' | sed -e 's|-r.*||g'`"
582
-		phpconfutils_extension_with	"oci8"			"oci8-instant-client"	1	"instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
583
-	fi
584
-
585
-	# PDO support
586
-	if use pdo || phpconfutils_usecheck pdo ; then
587
-		phpconfutils_extension_with		"pdo-dblib"	"mssql"		1
588
-		# The PDO-Firebird driver is broken and unmaintained upstream
589
-		# phpconfutils_extension_with	"pdo-firebird"	"firebird"		1
590
-		phpconfutils_extension_with		"pdo-mysql"	"mysql"		1 "/usr"
591
-		if use oci8 ; then
592
-			phpconfutils_extension_with	"pdo-oci"	"oci8"		1
593
-		fi
594
-		if use oci8-instant-client ; then
595
-			OCI8IC_PKG="`best_version dev-db/oracle-instantclient-basic`"
596
-			OCI8IC_PKG="`printf ${OCI8IC_PKG} | sed -e 's|dev-db/oracle-instantclient-basic-||g' | sed -e 's|-r.*||g'`"
597
-			phpconfutils_extension_with	"pdo-oci"	"oci8-instant-client"	1	"instantclient,/usr,${OCI8IC_PKG}"
598
-		fi
599
-		phpconfutils_extension_with		"pdo-odbc"	"odbc"		1 "unixODBC,/usr"
600
-		phpconfutils_extension_with		"pdo-pgsql"	"postgres"	1
601
-		phpconfutils_extension_with		"pdo-sqlite"	"sqlite"	1 "/usr"
602
-	fi
603
-
604
-	# readline/libedit support
605
-	# You can use readline or libedit, but you can't use both
606
-	phpconfutils_extension_with			"readline"	"readline"	0
607
-	phpconfutils_extension_with			"libedit"	"libedit"	0
608
-
609
-	# Session support
610
-	if ! use session && ! phpconfutils_usecheck session ; then
611
-		phpconfutils_extension_disable		"session"	"session"	0
612
-	else
613
-		phpconfutils_extension_with		"mm"		"sharedmem"	0
614
-	fi
615
-
616
-	# SQLite support
617
-	if ! use sqlite && ! phpconfutils_usecheck sqlite ; then
618
-		phpconfutils_extension_without		"sqlite"	"sqlite"	0
619
-	else
620
-		phpconfutils_extension_with		"sqlite"	"sqlite"	0 "/usr"
621
-		phpconfutils_extension_enable		"sqlite-utf8"	"unicode"	0
622
-	fi
623
-
624
-	# Fix ELF-related problems
625
-	if use pic || phpconfutils_usecheck pic ; then
626
-		einfo "Enabling PIC support"
627
-		my_conf="${my_conf} --with-pic"
628
-	fi
629
-
630
-	# Catch CFLAGS problems
631
-	php_check_cflags
632
-
633
-	# multilib support
634
-	if [[ $(get_libdir) != lib ]] ; then
635
-		my_conf="--with-libdir=$(get_libdir) ${my_conf}"
636
-	fi
637
-
638
-	# Support user-passed configuration parameters
639
-	[[ -z "${EXTRA_ECONF}" ]] && EXTRA_ECONF=""
640
-
641
-	# Set the correct compiler for cross-compilation
642
-	tc-export CC
643
-
644
-	# We don't use econf, because we need to override all of its settings
645
-	./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed"
646
-	emake || die "make failed"
647
-}
648
-
649
-# @FUNCTION: php5_2-sapi_src_install
650
-# @DESCRIPTION:
651
-# Takes care of installing php (and its shared extensions if enabled).
652
-php5_2-sapi_src_install() {
653
-	destdir=/usr/$(get_libdir)/php52
654
-
655
-	cd "${S}"
656
-
657
-	addpredict /usr/share/snmp/mibs/.index
658
-
659
-	# Install PHP
660
-	emake -j1 INSTALL_ROOT="${D}" install-build install-headers install-programs || die "make install failed"
661
-
662
-	# Install missing header files
663
-	if use unicode || phpconfutils_usecheck unicode ; then
664
-		dodir ${destdir}/include/php/ext/mbstring
665
-		insinto ${destdir}/include/php/ext/mbstring
666
-		for x in `ls "${S}/ext/mbstring/"*.h` ; do
667
-			file=`basename ${x}`
668
-			doins ext/mbstring/${file}
669
-		done
670
-		dodir ${destdir}/include/php/ext/mbstring/oniguruma
671
-		insinto ${destdir}/include/php/ext/mbstring/oniguruma
672
-		for x in `ls "${S}/ext/mbstring/oniguruma/"*.h` ; do
673
-			file=`basename ${x}`
674
-			doins ext/mbstring/oniguruma/${file}
675
-		done
676
-		dodir ${destdir}/include/php/ext/mbstring/libmbfl/mbfl
677
-		insinto ${destdir}/include/php/ext/mbstring/libmbfl/mbfl
678
-		for x in `ls "${S}/ext/mbstring/libmbfl/mbfl/"*.h` ; do
679
-			file=`basename ${x}`
680
-			doins ext/mbstring/libmbfl/mbfl/${file}
681
-		done
682
-	fi
683
-
684
-	# Get the extension dir, if not already defined
685
-	[[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`"
686
-
687
-	# And install the modules to it
688
-	if use sharedext ; then
689
-		for x in `ls "${S}/modules/"*.so | sort` ; do
690
-			module=`basename ${x}`
691
-			modulename=${module/.so/}
692
-			insinto "${PHPEXTDIR}"
693
-			einfo "Installing PHP ${modulename} extension"
694
-			doins "modules/${module}"
695
-		done
696
-	fi
697
-
698
-	# Generate the USE file for PHP
699
-	phpconfutils_generate_usefile
700
-
701
-	# Create the directory where we'll put php5-only php scripts
702
-	keepdir /usr/share/php5
703
-}
704
-
705
-# @FUNCTION: php5_2-sapi_pkg_postinst
706
-# @DESCRIPTION:
707
-# Provides important information to users after install is finished.
708
-php5_2-sapi_pkg_postinst() {
709
-	ewarn "If you have additional third party PHP extensions (such as"
710
-	ewarn "dev-php5/phpdbg) you may need to recompile them now."
711
-	ewarn
712
-
713
-	if use sharedext ; then
714
-		ewarn "Make sure to use etc-update or dispatch-conf so that extension-specific"
715
-		ewarn "ini files get merged properly"
716
-		ewarn
717
-	fi
718
-
719
-	if has kolab ${IUSE} && use kolab ; then
720
-		ewarn "Please note that kolab support is still experimental!"
721
-		ewarn "Issues specific to USE=kolab must be reported to Gentoo bugzilla only!"
722
-		ewarn
723
-		ewarn "Kolab groupware server requires annotations support for IMAP, which is enabled"
724
-		ewarn "by a third-party patch. Please do NOT report issues with the imap extension"
725
-		ewarn "to bugs.php.net until you have recompiled both PHP and net-libs/c-client"
726
-		ewarn "with USE=\"-kolab\" and confirmed that those issues still exist!"
727
-		ewarn
728
-	fi
729
-
730
-		ewarn "USE=\"pic\" slows down PHP but has to be enabled on setups where TEXTRELs"
731
-		ewarn "are disabled (e.g. when using PaX in the kernel). On hardened profiles this"
732
-		ewarn "USE flag is enabled automatically"
733
-		ewarn
734
-}
... ...
@@ -1,723 +0,0 @@
1
-# Copyright 1999-2007 Gentoo Foundation
2
-# Distributed under the terms of the GNU General Public License v2
3
-# $Header: /var/cvsroot/gentoo-x86/eclass/php5_3-sapi.eclass,v 1.25 2009/07/20 10:32:34 flameeyes Exp $
4
-
5
-# ========================================================================
6
-# Based on robbat2's work on the php4 sapi eclass
7
-#
8
-# Author: Stuart Herbert <stuart@gentoo.org>
9
-# Author: Luca Longinotti <chtekk@gentoo.org>
10
-#
11
-# ========================================================================
12
-
13
-# @ECLASS: php5_3-sapi.eclass
14
-# @MAINTAINER:
15
-# Gentoo PHP team <php-bugs@gentoo.org>
16
-# @BLURB: Eclass for building different php-5.3 SAPI instances.
17
-# @DESCRIPTION:
18
-# Eclass for building different php-5.3 SAPI instances. Use it for the
19
-# new-style =dev-lang/php-5.3* ebuilds.
20
-
21
-
22
-PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase interbase oci8 sapdb solid sybase-ct"
23
-
24
-WANT_AUTOCONF="latest"
25
-WANT_AUTOMAKE="latest"
26
-
27
-inherit db-use flag-o-matic autotools toolchain-funcs libtool eutils phpconfutils php-common-r1
28
-
29
-# @ECLASS-VARIABLE: MY_PHP_P
30
-# @DESCRIPTION:
31
-# Set MY_PHP_P in the ebuild as needed to match tarball version.
32
-
33
-# @ECLASS-VARIABLE: PHP_PACKAGE
34
-# @DESCRIPTION:
35
-# We only set this variable if we are building a copy of php which can be
36
-# installed as a package in its own.
37
-# Copies of php which are compiled into other packages (e.g. php support
38
-# for the thttpd web server) don't need this variable.
39
-if [[ "${PHP_PACKAGE}" == 1 ]] ; then
40
-	HOMEPAGE="http://www.php.net/"
41
-	LICENSE="PHP-3"
42
-	SRC_URI="http://www.php.net/distributions/${MY_PHP_P}.tar.bz2"
43
-	S="${WORKDIR}/${MY_PHP_P}"
44
-fi
45
-
46
-IUSE="adabas bcmath berkdb birdstep bzip2 calendar cdb cjk crypt ctype curl curlwrappers db2 dbmaker debug doc empress empress-bcs enchant esoob exif frontbase filter firebird flatfile ftp gd gd-external gdbm gmp hash iconv imap inifile interbase intl iodbc ipv6 java-external json kerberos ldap ldap-sasl libedit mcve mhash mssql mysql mysqli nls oci8 oci8-instant-client odbc pcntl pcre pdo phar pic posix postgres qdbm readline reflection recode sapdb session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl suhosin sybase-ct sysvipc tidy tokenizer truetype unicode wddx xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
47
-
48
-# these USE flags should have the correct dependencies
49
-DEPEND="adabas? ( >=dev-db/unixODBC-1.8.13 )
50
-		berkdb? ( =sys-libs/db-4* )
51
-		birdstep? ( >=dev-db/unixODBC-1.8.13 )
52
-		bzip2? ( app-arch/bzip2 )
53
-		cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
54
-		cjk? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) )
55
-		crypt? ( >=dev-libs/libmcrypt-2.4 )
56
-		curl? ( >=net-misc/curl-7.10.5 )
57
-		db2? ( >=dev-db/unixODBC-1.8.13 )
58
-		dbmaker? ( >=dev-db/unixODBC-1.8.13 )
59
-		empress? ( >=dev-db/unixODBC-1.8.13 )
60
-		empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
61
-		esoob? ( >=dev-db/unixODBC-1.8.13 )
62
-		exif? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) )
63
-		firebird? ( dev-db/firebird )
64
-		gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
65
-		gd-external? ( media-libs/gd )
66
-		gdbm? ( >=sys-libs/gdbm-1.8.0 )
67
-		gmp? ( >=dev-libs/gmp-4.1.2 )
68
-		iconv? ( virtual/libiconv )
69
-		imap? ( virtual/imap-c-client )
70
-		iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 )
71
-		kerberos? ( virtual/krb5 )
72
-		ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
73
-		ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
74
-		libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
75
-		mcve? ( >=dev-libs/openssl-0.9.7 )
76
-		mhash? ( app-crypt/mhash )
77
-		mssql? ( dev-db/freetds )
78
-		mysql? ( virtual/mysql )
79
-		mysqli? ( >=virtual/mysql-4.1 )
80
-		nls? ( sys-devel/gettext )
81
-		oci8-instant-client? ( dev-db/oracle-instantclient-basic )
82
-		odbc? ( >=dev-db/unixODBC-1.8.13 )
83
-		postgres? ( || ( >=dev-db/libpq-7.1 ( app-admin/eselect-postgresql
84
-			>=dev-db/postgresql-base-7.1 ) ) )
85
-		qdbm? ( dev-db/qdbm )
86
-		readline? ( sys-libs/readline )
87
-		recode? ( app-text/recode )
88
-		sapdb? ( >=dev-db/unixODBC-1.8.13 )
89
-		sharedmem? ( dev-libs/mm )
90
-		simplexml? ( >=dev-libs/libxml2-2.6.8 )
91
-		snmp? ( >=net-analyzer/net-snmp-5.2 )
92
-		soap? ( >=dev-libs/libxml2-2.6.8 )
93
-		solid? ( >=dev-db/unixODBC-1.8.13 )
94
-		spell? ( >=app-text/aspell-0.50 )
95
-		sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
96
-		ssl? ( >=dev-libs/openssl-0.9.7 )
97
-		tidy? ( app-text/htmltidy )
98
-		truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) )
99
-		wddx? ( >=dev-libs/libxml2-2.6.8 )
100
-		xml? ( >=dev-libs/libxml2-2.6.8 )
101
-		xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
102
-		xmlreader? ( >=dev-libs/libxml2-2.6.8 )
103
-		xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
104
-		xpm? ( x11-libs/libXpm >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
105
-		xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
106
-		zip? ( sys-libs/zlib )
107
-		zlib? ( sys-libs/zlib )
108
-		enchant? ( app-text/enchant )
109
-		intl? ( dev-libs/icu )
110
-		virtual/mta"
111
-
112
-# libswf conflicts with ming and should not
113
-# be installed with the new PHP ebuilds
114
-DEPEND="${DEPEND}
115
-		!media-libs/libswf"
116
-
117
-# simplistic for now
118
-RDEPEND="${DEPEND}"
119
-
120
-# those are only needed at compile-time
121
-DEPEND="${DEPEND}
122
-		>=sys-devel/m4-1.4.3
123
-		>=sys-devel/libtool-1.5.18"
124
-
125
-# Additional features
126
-#
127
-# They are in PDEPEND because we need PHP installed first!
128
-PDEPEND="doc? ( app-doc/php-docs )
129
-		filter? ( !dev-php5/pecl-filter )
130
-		java-external? ( dev-php5/php-java-bridge )
131
-		json? ( !dev-php5/pecl-json )
132
-		mcve? ( dev-php5/pecl-mcve )
133
-		pdo? ( !dev-php5/pecl-pdo )
134
-		suhosin? ( dev-php5/suhosin )
135
-		yaz? ( dev-php5/pecl-yaz )"
136
-
137
-# ========================================================================
138
-# php.ini Support
139
-# ========================================================================
140
-
141
-PHP_INI_FILE="php.ini"
142
-PHP_INI_UPSTREAM="php.ini-production"
143
-
144
-# ========================================================================
145
-
146
-# @ECLASS-VARIABLE: PHP_PATCHSET_REV
147
-# @DESCRIPTION:
148
-# Provides PHP patchsets support.
149
-SRC_URI="${SRC_URI} http://perso.musedev.org/gentoo/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
150
-
151
-# @ECLASS-VARIABLE: SUHOSIN_PATCH
152
-# @DESCRIPTION:
153
-# Tarball name for Suhosin patch (see http://www.suhosin.org/).
154
-# This feature will not be available in php if unset.
155
-[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://perso.musedev.org/gentoo/${SUHOSIN_PATCH} )"
156
-
157
-
158
-# ========================================================================
159
-
160
-EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst
161
-
162
-# ========================================================================
163
-# INTERNAL FUNCTIONS
164
-# ========================================================================
165
-
166
-php5_3-sapi_check_use_flags() {
167
-	# Multiple USE dependencies
168
-	phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external"
169
-	phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external"
170
-	phpconfutils_use_depend_any "exif" "gd" "gd" "gd-external"
171
-
172
-	# Simple USE dependencies
173
-	phpconfutils_use_depend_all "xpm"			"gd"
174
-	phpconfutils_use_depend_all "gd"			"zlib"
175
-	phpconfutils_use_depend_all "simplexml"			"xml"
176
-	phpconfutils_use_depend_all "soap"			"xml"
177
-	phpconfutils_use_depend_all "wddx"			"xml"
178
-	phpconfutils_use_depend_all "xmlrpc"			"xml"
179
-	phpconfutils_use_depend_all "xmlreader"			"xml"
180
-	phpconfutils_use_depend_all "xmlwriter"			"xml"
181
-	phpconfutils_use_depend_all "xsl"			"xml"
182
-	phpconfutils_use_depend_all "filter"			"pcre"
183
-	phpconfutils_use_depend_all "xmlrpc"			"iconv"
184
-	phpconfutils_use_depend_all "java-external"		"session"
185
-	phpconfutils_use_depend_all "ldap-sasl"			"ldap"
186
-	phpconfutils_use_depend_all "mcve"			"ssl"
187
-	phpconfutils_use_depend_all "suhosin"			"unicode"
188
-	phpconfutils_use_depend_all "adabas"			"odbc"
189
-	phpconfutils_use_depend_all "birdstep"			"odbc"
190
-	phpconfutils_use_depend_all "dbmaker"			"odbc"
191
-	phpconfutils_use_depend_all "empress-bcs"		"odbc" "empress"
192
-	phpconfutils_use_depend_all "empress"			"odbc"
193
-	phpconfutils_use_depend_all "esoob"			"odbc"
194
-	phpconfutils_use_depend_all "db2"			"odbc"
195
-	phpconfutils_use_depend_all "iodbc"			"odbc"
196
-	phpconfutils_use_depend_all "sapdb"			"odbc"
197
-	phpconfutils_use_depend_all "solid"			"odbc"
198
-	phpconfutils_use_depend_all "kolab"			"imap"
199
-
200
-	# Direct USE conflicts
201
-	phpconfutils_use_conflict "gd" "gd-external"
202
-	phpconfutils_use_conflict "oci8" "oci8-instant-client"
203
-	phpconfutils_use_conflict "oci8" "ldap-sasl"
204
-	phpconfutils_use_conflict "qdbm" "gdbm"
205
-	phpconfutils_use_conflict "readline" "libedit"
206
-	phpconfutils_use_conflict "recode" "mysql" "imap" "yaz" "kolab"
207
-	phpconfutils_use_conflict "sharedmem" "threads"
208
-	phpconfutils_use_conflict "firebird" "interbase"
209
-
210
-	# IMAP support
211
-	php_check_imap
212
-
213
-	# Mail support
214
-	php_check_mta
215
-
216
-	# PostgreSQL support
217
-	php_check_pgsql
218
-
219
-	# Oracle support
220
-	php_check_oracle_8
221
-
222
-	phpconfutils_warn_about_external_deps
223
-
224
-	export PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE}"
225
-}
226
-
227
-php5_3-sapi_set_php_ini_dir() {
228
-	if [ $SLOT != "5" ]; then
229
-		PHP_INI_DIR="/etc/php${SLOT/./}/${PHPSAPI}-php5"
230
-	else
231
-		PHP_INI_DIR="/etc/php/${PHPSAPI}-php5"
232
-	fi
233
-	PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
234
-	PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
235
-}
236
-
237
-php5_3-sapi_install_ini() {
238
-	destdir=/usr/$(get_libdir)/php${SLOT/./}
239
-
240
-	# get the extension dir, if not already defined
241
-	[[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`"
242
-
243
-	# work out where we are installing the ini file
244
-	php5_3-sapi_set_php_ini_dir
245
-
246
-	cp "${PHP_INI_UPSTREAM}" "${PHP_INI_UPSTREAM}-${PHPSAPI}"
247
-	local phpinisrc="${PHP_INI_UPSTREAM}-${PHPSAPI}"
248
-
249
-	# Set the extension dir
250
-	einfo "Setting extension_dir in php.ini"
251
-	sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc}
252
-
253
-	# A patch for PHP for security
254
-	einfo "Securing fopen wrappers"
255
-	sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc}
256
-
257
-	# Set the include path to point to where we want to find PEAR packages
258
-	einfo "Setting correct include_path"
259
-	sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc}
260
-
261
-	# Add needed MySQL extensions charset configuration
262
-	local phpmycnfcharset=""
263
-
264
-	if [[ "${PHPSAPI}" == "cli" ]] ; then
265
-		phpmycnfcharset="`php_get_mycnf_charset cli`"
266
-		einfo "MySQL extensions charset for 'cli' SAPI is: ${phpmycnfcharset}"
267
-	elif [[ "${PHPSAPI}" == "cgi" ]] ; then
268
-		phpmycnfcharset="`php_get_mycnf_charset cgi-fcgi`"
269
-		einfo "MySQL extensions charset for 'cgi' SAPI is: ${phpmycnfcharset}"
270
-	elif [[ "${PHPSAPI}" == "apache2" ]] ; then
271
-		phpmycnfcharset="`php_get_mycnf_charset apache2handler`"
272
-		einfo "MySQL extensions charset for 'apache2' SAPI is: ${phpmycnfcharset}"
273
-	else
274
-		einfo "No supported SAPI found for which to get the MySQL charset."
275
-	fi
276
-
277
-	if [[ -n "${phpmycnfcharset}" ]] && [[ "${phpmycnfcharset}" != "empty" ]] ; then
278
-		einfo "Setting MySQL extensions charset to ${phpmycnfcharset}"
279
-		echo "" >> ${phpinisrc}
280
-		echo "; MySQL extensions default connection charset settings" >> ${phpinisrc}
281
-		echo "mysql.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc}
282
-		echo "mysqli.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc}
283
-		echo "pdo_mysql.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc}
284
-	else
285
-		echo "" >> ${phpinisrc}
286
-		echo "; MySQL extensions default connection charset settings" >> ${phpinisrc}
287
-		echo ";mysql.connect_charset = utf8" >> ${phpinisrc}
288
-		echo ";mysqli.connect_charset = utf8" >> ${phpinisrc}
289
-		echo ";pdo_mysql.connect_charset = utf8" >> ${phpinisrc}
290
-	fi
291
-
292
-	dodir ${PHP_INI_DIR}
293
-	insinto ${PHP_INI_DIR}
294
-	newins ${phpinisrc} ${PHP_INI_FILE}
295
-
296
-	dodir ${PHP_EXT_INI_DIR}
297
-	dodir ${PHP_EXT_INI_DIR_ACTIVE}
298
-
299
-	# Install any extensions built as shared objects
300
-	if use sharedext ; then
301
-		for x in `ls "${D}/${PHPEXTDIR}/"*.so | sort` ; do
302
-			inifilename=${x/.so/.ini}
303
-			inifilename=`basename ${inifilename}`
304
-			echo "extension=`basename ${x}`" >> "${D}/${PHP_EXT_INI_DIR}/${inifilename}"
305
-			dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
306
-		done
307
-	fi
308
-}
309
-
310
-# ========================================================================
311
-# EXPORTED FUNCTIONS
312
-# ========================================================================
313
-
314
-# @FUNCTION: php5_3-sapi_pkg_setup
315
-# @DESCRIPTION:
316
-# Performs all the USE flag testing and magic before we do anything else.
317
-# This way saves a lot of time.
318
-php5_3-sapi_pkg_setup() {
319
-	php5_3-sapi_check_use_flags
320
-}
321
-
322
-# @FUNCTION: php5_3-sapi_src_unpack
323
-# @DESCRIPTION:
324
-# Takes care of unpacking, patching and autotools magic and disables
325
-# interactive tests.
326
-
327
-# @VARIABLE: PHP_EXTRA_BRANDING
328
-# @DESCRIPTION:
329
-# This variable allows an ebuild to add additional information like
330
-# snapshot dates to the version line.
331
-php5_3-sapi_src_unpack() {
332
-	cd "${S}"
333
-
334
-	[[ -z "${PHP_EXTRA_BRANDING}" ]] && PHP_EXTRA_BRANDING=""
335
-
336
-	# Change PHP branding
337
-	PHPPR=${PR/r/}
338
-	# >=php-5.2.4 has PHP_EXTRA_VERSION, previous had EXTRA_VERSION
339
-	sed -re "s|^(PHP_)?EXTRA_VERSION=\".*\"|\1EXTRA_VERSION=\"${PHP_EXTRA_BRANDING}-pl${PHPPR}-gentoo\"|g" -i configure.in \
340
-		|| die "Unable to change PHP branding to ${PHP_EXTRA_BRANDING}-pl${PHPPR}-gentoo"
341
-
342
-	# multilib-strict support
343
-	if [[ -n "${MULTILIB_PATCH}" ]] && [[ -f "${WORKDIR}/${MULTILIB_PATCH}" ]] ; then
344
-		epatch "${WORKDIR}/${MULTILIB_PATCH}"
345
-	else
346
-		ewarn "There is no multilib-strict patch available for this PHP release yet!"
347
-	fi
348
-
349
-	# Apply general PHP5 patches
350
-	if [[ -d "${WORKDIR}/${MY_PHP_PV}/php5" ]] ; then
351
-		EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/php5" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
352
-	fi
353
-
354
-	# Apply version-specific PHP patches
355
-	if [[ -d "${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" ]] ; then
356
-		EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
357
-	fi
358
-
359
-	# Patch PHP to show Gentoo as the server platform
360
-	sed -e "s/PHP_UNAME=\`uname -a | xargs\`/PHP_UNAME=\`uname -s -n -r -v | xargs\`/g" -i configure.in || die "Failed to fix server platform name"
361
-
362
-	# Disable interactive make test
363
-	sed -e 's/'`echo "\!getenv('NO_INTERACTION')"`'/false/g' -i run-tests.php
364
-
365
-	# Stop PHP from activating the Apache config, as we will do that ourselves
366
-	for i in configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 ; do
367
-		sed -i.orig -e 's,-i -a -n php5,-i -n php5,g' ${i}
368
-		sed -i.orig -e 's,-i -A -n php5,-i -n php5,g' ${i}
369
-	done
370
-
371
-	# Patch PHP to support heimdal instead of mit-krb5
372
-	if has_version "app-crypt/heimdal" ; then
373
-		sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 || die "Failed to fix heimdal libname"
374
-		sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 || die "Failed to fix heimdal crypt library reference"
375
-	fi
376
-
377
-	# Patch for PostgreSQL support
378
-	if use postgres ; then
379
-		sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 || die "Failed to fix PostgreSQL include paths"
380
-	fi
381
-
382
-	# Suhosin support
383
-	if use suhosin ; then
384
-		if [[ -n "${SUHOSIN_PATCH}" ]] && [[ -f "${DISTDIR}/${SUHOSIN_PATCH}" ]] ; then
385
-			epatch "${DISTDIR}/${SUHOSIN_PATCH}"
386
-		else
387
-			ewarn "There is no Suhosin patch available for this PHP release yet!"
388
-		fi
389
-	fi
390
-
391
-	# We are heavily patching autotools base files (configure.in) because
392
-	# of suhosin etc., so let's regenerate the whole stuff now
393
-
394
-	# eaclocal doesn't accept --force, so we try to force re-generation
395
-	# this way
396
-	rm aclocal.m4
397
-	echo foo
398
-	eautoreconf --force -W no-cross
399
-	echo bar
400
-
401
-}
402
-
403
-# @FUNCTION: php5_3-sapi_src_compile
404
-# @DESCRIPTION:
405
-# Takes care of compiling php according to USE flags set by user (and those automagically
406
-# enabled via phpconfutils eclass if unavoidable).
407
-php5_3-sapi_src_compile() {
408
-	destdir=/usr/$(get_libdir)/php${SLOT/./}
409
-
410
-	php5_3-sapi_set_php_ini_dir
411
-
412
-	cd "${S}"
413
-
414
-	phpconfutils_init
415
-
416
-	my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE} --without-pear"
417
-
418
-	#				extension		USE flag		shared support?
419
-	phpconfutils_extension_enable	"bcmath"		"bcmath"		1
420
-	phpconfutils_extension_with	"bz2"			"bzip2"			1
421
-	phpconfutils_extension_enable	"calendar"		"calendar"		1
422
-	phpconfutils_extension_disable	"ctype"			"ctype"			0
423
-	phpconfutils_extension_with	"curl"			"curl"			1
424
-	phpconfutils_extension_with	"curlwrappers"		"curlwrappers"		0
425
-	phpconfutils_extension_disable	"dom"			"xml"			0
426
-	phpconfutils_extension_enable	"exif"			"exif"			1
427
-	phpconfutils_extension_disable	"filter"		"filter"		0
428
-	phpconfutils_extension_enable	"ftp"			"ftp"			1
429
-	phpconfutils_extension_with	"gettext"		"nls"			1
430
-	phpconfutils_extension_with	"gmp"			"gmp"			1
431
-	phpconfutils_extension_disable	"hash"			"hash"			0
432
-	phpconfutils_extension_without	"iconv"			"iconv"			0
433
-	phpconfutils_extension_disable	"ipv6"			"ipv6"			0
434
-	phpconfutils_extension_disable	"json"			"json"			0
435
-	phpconfutils_extension_with	"kerberos"		"kerberos"		0 "/usr"
436
-	phpconfutils_extension_disable	"libxml"		"xml"			0
437
-	phpconfutils_extension_enable	"mbstring"		"unicode"		1
438
-	phpconfutils_extension_with	"mcrypt"		"crypt"			1
439
-	phpconfutils_extension_with	"mhash"			"mhash"			1
440
-	phpconfutils_extension_with	"mssql"			"mssql"			1
441
-	phpconfutils_extension_with	"openssl"		"ssl"			0
442
-	phpconfutils_extension_with	"openssl-dir"		"ssl"			0 "/usr"
443
-	phpconfutils_extension_enable	"pcntl" 		"pcntl" 		1
444
-	phpconfutils_extension_without	"pcre-regex"		"pcre"			0
445
-	phpconfutils_extension_disable	"pdo"			"pdo"			0
446
-	phpconfutils_extension_with	"pgsql"			"postgres"		1
447
-	phpconfutils_extension_disable	"posix"			"posix"			0
448
-	phpconfutils_extension_with	"pspell"		"spell"			1
449
-	phpconfutils_extension_with	"recode"		"recode"		1
450
-	phpconfutils_extension_disable	"reflection"		"reflection"		0
451
-	phpconfutils_extension_disable	"simplexml"		"simplexml"		0
452
-	phpconfutils_extension_enable	"shmop"			"sharedmem"		0
453
-	phpconfutils_extension_with	"snmp"			"snmp"			1
454
-	phpconfutils_extension_enable	"soap"			"soap"			1
455
-	phpconfutils_extension_enable	"sockets"		"sockets"		1
456
-	phpconfutils_extension_disable	"spl"			"spl"			0
457
-	phpconfutils_extension_with	"sybase-ct"		"sybase-ct"		1
458
-	phpconfutils_extension_enable	"sysvmsg"		"sysvipc"		1
459
-	phpconfutils_extension_enable	"sysvsem"		"sysvipc"		1
460
-	phpconfutils_extension_enable	"sysvshm"		"sysvipc"		1
461
-	phpconfutils_extension_with	"tidy"			"tidy"			1
462
-	phpconfutils_extension_disable	"tokenizer"		"tokenizer"		0
463
-	phpconfutils_extension_enable	"wddx"			"wddx"			1
464
-	phpconfutils_extension_disable	"xml"			"xml"			0
465
-	phpconfutils_extension_disable	"xmlreader"		"xmlreader"		0
466
-	phpconfutils_extension_disable	"xmlwriter"		"xmlwriter"		0
467
-	phpconfutils_extension_with	"xmlrpc"		"xmlrpc"		1
468
-	phpconfutils_extension_with	"xsl"			"xsl"			1
469
-	phpconfutils_extension_enable	"zip"			"zip"			1
470
-	phpconfutils_extension_with	"zlib"			"zlib"			1
471
-	phpconfutils_extension_enable	"debug"			"debug"			0
472
-	phpconfutils_extension_with	"enchant"		"enchant"		1
473
-	phpconfutils_extension_enable	"intl"			"intl"			0
474
-	phpconfutils_extension_enable	"phar"			"phar"			0
475
-
476
-	# DBA support
477
-	if use cdb || use berkdb || use flatfile || use gdbm || use inifile || use qdbm ; then
478
-		my_conf="${my_conf} --enable-dba${shared}"
479
-	fi
480
-
481
-	# Tell PHP where the db.h is on FreeBSD
482
-#	if use berkdb ; then
483
-#		append-cppflags "-I$(db_includedir)"
484
-#	fi
485
-
486
-	# DBA drivers support
487
-	phpconfutils_extension_with 	"cdb"			"cdb"			0
488
-	phpconfutils_extension_with 	"db4"			"berkdb"		0
489
-	phpconfutils_extension_disable 	"flatfile"		"flatfile"		0
490
-	phpconfutils_extension_with 	"gdbm"			"gdbm"			0
491
-	phpconfutils_extension_disable 	"inifile"		"inifile"		0
492
-	phpconfutils_extension_with	"qdbm"			"qdbm"			0
493
-
494
-	# Support for the GD graphics library
495
-	if use gd-external || phpconfutils_usecheck gd-external ; then
496
-		phpconfutils_extension_with	"freetype-dir"	"truetype"		0 "/usr"
497
-		phpconfutils_extension_with	"t1lib"		"truetype"		0 "/usr"
498
-		phpconfutils_extension_enable	"gd-jis-conv"	"cjk" 			0
499
-		phpconfutils_extension_with 	"gd" 		"gd-external"		1 "/usr"
500
-	else
501
-		phpconfutils_extension_with	"freetype-dir"	"truetype"		0 "/usr"
502
-		phpconfutils_extension_with	"t1lib"		"truetype"		0 "/usr"
503
-		phpconfutils_extension_enable	"gd-jis-conv"	"cjk"			0
504
-		phpconfutils_extension_with	"jpeg-dir"	"gd"			0 "/usr"
505
-		phpconfutils_extension_with 	"png-dir" 	"gd" 			0 "/usr"
506
-		phpconfutils_extension_with 	"xpm-dir" 	"xpm" 			0 "/usr"
507
-		# enable gd last, so configure can pick up the previous settings
508
-		phpconfutils_extension_with 	"gd" 		"gd" 			0
509
-	fi
510
-
511
-	# IMAP support
512
-	if use imap || phpconfutils_usecheck imap ; then
513
-		phpconfutils_extension_with	"imap"		"imap"			1
514
-		phpconfutils_extension_with	"imap-ssl"	"ssl"			0
515
-	fi
516
-
517
-	# Interbase support
518
-	if use interbase ; then
519
-		my_conf="${my_conf} --with-interbase=/opt"
520
-	fi
521
-
522
-	# Firebird support - see Bug 186791
523
-	if use firebird ; then
524
-		my_conf="${my_conf} --with-interbase=/usr"
525
-	fi
526
-
527
-	# LDAP support
528
-	if use ldap || phpconfutils_usecheck ldap ; then
529
-		if use oci8 ; then
530
-			phpconfutils_extension_with	"ldap"		"ldap"		1 "${ORACLE_HOME}"
531
-		else
532
-			phpconfutils_extension_with	"ldap"		"ldap"		1
533
-			phpconfutils_extension_with	"ldap-sasl"	"ldap-sasl"	0
534
-		fi
535
-	fi
536
-
537
-	# MySQL support
538
-	if use mysql ; then
539
-		phpconfutils_extension_with	"mysql"			"mysql"		1 "/usr"
540
-		phpconfutils_extension_with	"mysql-sock"		"mysql"		0 "/var/run/mysqld/mysqld.sock"
541
-	fi
542
-
543
-	# MySQLi support
544
-	phpconfutils_extension_with		"mysqli"		"mysqli"	1 "/usr/bin/mysql_config"
545
-
546
-	# ODBC support
547
-	if use odbc || phpconfutils_usecheck odbc ; then
548
-		phpconfutils_extension_with	"unixODBC"		"odbc"		1 "/usr"
549
-
550
-		phpconfutils_extension_with	"adabas"		"adabas"	1
551
-		phpconfutils_extension_with	"birdstep"		"birdstep"	1
552
-		phpconfutils_extension_with	"dbmaker"		"dbmaker"	1
553
-		phpconfutils_extension_with	"empress"		"empress"	1
554
-		if use empress || phpconfutils_usecheck empress ; then
555
-			phpconfutils_extension_with	"empress-bcs"	"empress-bcs"	0
556
-		fi
557
-		phpconfutils_extension_with	"esoob"			"esoob"		1
558
-		phpconfutils_extension_with	"ibm-db2"		"db2"		1
559
-		phpconfutils_extension_with	"iodbc"			"iodbc"		1 "/usr"
560
-		phpconfutils_extension_with	"sapdb"			"sapdb"		1
561
-		phpconfutils_extension_with	"solid"			"solid"		1
562
-	fi
563
-
564
-	# Oracle support
565
-	if use oci8 ; then
566
-		phpconfutils_extension_with	"oci8"			"oci8"		1
567
-	fi
568
-	if use oci8-instant-client ; then
569
-		OCI8IC_PKG="`best_version dev-db/oracle-instantclient-basic`"
570
-		OCI8IC_PKG="`printf ${OCI8IC_PKG} | sed -e 's|dev-db/oracle-instantclient-basic-||g' | sed -e 's|-r.*||g'`"
571
-		phpconfutils_extension_with	"oci8"			"oci8-instant-client"	1	"instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
572
-	fi
573
-
574
-	# PDO support
575
-	if use pdo || phpconfutils_usecheck pdo ; then
576
-		phpconfutils_extension_with		"pdo-dblib"	"mssql"		1
577
-		# The PDO-Firebird driver is broken and unmaintained upstream
578
-		# phpconfutils_extension_with	"pdo-firebird"	"firebird"		1
579
-		phpconfutils_extension_with		"pdo-mysql"	"mysql"		1 "/usr"
580
-		if use oci8 ; then
581
-			phpconfutils_extension_with	"pdo-oci"	"oci8"		1
582
-		fi
583
-		if use oci8-instant-client ; then
584
-			OCI8IC_PKG="`best_version dev-db/oracle-instantclient-basic`"
585
-			OCI8IC_PKG="`printf ${OCI8IC_PKG} | sed -e 's|dev-db/oracle-instantclient-basic-||g' | sed -e 's|-r.*||g'`"
586
-			phpconfutils_extension_with	"pdo-oci"	"oci8-instant-client"	1	"instantclient,/usr,${OCI8IC_PKG}"
587
-		fi
588
-		phpconfutils_extension_with		"pdo-odbc"	"odbc"		1 "unixODBC,/usr"
589
-		phpconfutils_extension_with		"pdo-pgsql"	"postgres"	1
590
-		phpconfutils_extension_with		"pdo-sqlite"	"sqlite"	1 "/usr"
591
-	fi
592
-
593
-	# readline/libedit support
594
-	# You can use readline or libedit, but you can't use both
595
-	phpconfutils_extension_with			"readline"	"readline"	0
596
-	phpconfutils_extension_with			"libedit"	"libedit"	0
597
-
598
-	# Session support
599
-	if ! use session && ! phpconfutils_usecheck session ; then
600
-		phpconfutils_extension_disable		"session"	"session"	0
601
-	else
602
-		phpconfutils_extension_with		"mm"		"sharedmem"	0
603
-	fi
604
-
605
-	# SQLite support
606
-	if ! use sqlite && ! phpconfutils_usecheck sqlite ; then
607
-		phpconfutils_extension_without		"sqlite"	"sqlite"	0
608
-	else
609
-		phpconfutils_extension_with		"sqlite"	"sqlite"	0 "/usr"
610
-		phpconfutils_extension_enable		"sqlite-utf8"	"unicode"	0
611
-	fi
612
-
613
-	# Fix ELF-related problems
614
-	if use pic || phpconfutils_usecheck pic ; then
615
-		einfo "Enabling PIC support"
616
-		my_conf="${my_conf} --with-pic"
617
-	fi
618
-
619
-	# Catch CFLAGS problems
620
-	php_check_cflags
621
-
622
-	# multilib support
623
-	if [[ $(get_libdir) != lib ]] ; then
624
-		my_conf="--with-libdir=$(get_libdir) ${my_conf}"
625
-	fi
626
-
627
-	# Support user-passed configuration parameters
628
-	[[ -z "${EXTRA_ECONF}" ]] && EXTRA_ECONF=""
629
-
630
-	# Set the correct compiler for cross-compilation
631
-	tc-export CC
632
-
633
-	# We don't use econf, because we need to override all of its settings
634
-	./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed"
635
-	emake || die "make failed"
636
-}
637
-
638
-# @FUNCTION: php5_3-sapi_src_install
639
-# @DESCRIPTION:
640
-# Takes care of installing php (and its shared extensions if enabled).
641
-php5_3-sapi_src_install() {
642
-	destdir=/usr/$(get_libdir)/php${SLOT/./}
643
-
644
-	cd "${S}"
645
-
646
-	addpredict /usr/share/snmp/mibs/.index
647
-
648
-	# Install PHP
649
-	emake -j1 INSTALL_ROOT="${D}" install-build install-headers install-programs || die "make install failed"
650
-
651
-	# Install missing header files
652
-	if use unicode || phpconfutils_usecheck unicode ; then
653
-		dodir ${destdir}/include/php/ext/mbstring
654
-		insinto ${destdir}/include/php/ext/mbstring
655
-		for x in `ls "${S}/ext/mbstring/"*.h` ; do
656
-			file=`basename ${x}`
657
-			doins ext/mbstring/${file}
658
-		done
659
-		dodir ${destdir}/include/php/ext/mbstring/oniguruma
660
-		insinto ${destdir}/include/php/ext/mbstring/oniguruma
661
-		for x in `ls "${S}/ext/mbstring/oniguruma/"*.h` ; do
662
-			file=`basename ${x}`
663
-			doins ext/mbstring/oniguruma/${file}
664
-		done
665
-		dodir ${destdir}/include/php/ext/mbstring/libmbfl/mbfl
666
-		insinto ${destdir}/include/php/ext/mbstring/libmbfl/mbfl
667
-		for x in `ls "${S}/ext/mbstring/libmbfl/mbfl/"*.h` ; do
668
-			file=`basename ${x}`
669
-			doins ext/mbstring/libmbfl/mbfl/${file}
670
-		done
671
-	fi
672
-
673
-	# Get the extension dir, if not already defined
674
-	[[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`"
675
-
676
-	# And install the modules to it
677
-	if use sharedext ; then
678
-		for x in `ls "${S}/modules/"*.so | sort` ; do
679
-			module=`basename ${x}`
680
-			modulename=${module/.so/}
681
-			insinto "${PHPEXTDIR}"
682
-			einfo "Installing PHP ${modulename} extension"
683
-			doins "modules/${module}"
684
-		done
685
-	fi
686
-
687
-	# Generate the USE file for PHP
688
-	phpconfutils_generate_usefile
689
-
690
-	# Create the directory where we'll put php5-only php scripts
691
-	keepdir /usr/share/php5
692
-}
693
-
694
-# @FUNCTION: php5_3-sapi_pkg_postinst
695
-# @DESCRIPTION:
696
-# Provides important information to users after install is finished.
697
-php5_3-sapi_pkg_postinst() {
698
-	ewarn "If you have additional third party PHP extensions (such as"
699
-	ewarn "dev-php5/phpdbg) you may need to recompile them now."
700
-	ewarn
701
-
702
-	if use sharedext ; then
703
-		ewarn "Make sure to use etc-update or dispatch-conf so that extension-specific"
704
-		ewarn "ini files get merged properly"
705
-		ewarn
706
-	fi
707
-
708
-	if has kolab ${IUSE} && use kolab ; then
709
-		ewarn "Please note that kolab support is still experimental!"
710
-		ewarn "Issues specific to USE=kolab must be reported to Gentoo bugzilla only!"
711
-		ewarn
712
-		ewarn "Kolab groupware server requires annotations support for IMAP, which is enabled"
713
-		ewarn "by a third-party patch. Please do NOT report issues with the imap extension"
714
-		ewarn "to bugs.php.net until you have recompiled both PHP and net-libs/c-client"
715
-		ewarn "with USE=\"-kolab\" and confirmed that those issues still exist!"
716
-		ewarn
717
-	fi
718
-
719
-		ewarn "USE=\"pic\" slows down PHP but has to be enabled on setups where TEXTRELs"
720
-		ewarn "are disabled (e.g. when using PaX in the kernel). On hardened profiles this"
721
-		ewarn "USE flag is enabled automatically"
722
-		ewarn
723
-}
724 0