1 |
armin76 07/12/24 12:29:36 |
2 |
|
3 |
Modified: depend.php.eclass php5_0-sapi.eclass |
4 |
Log: |
5 |
Changes from the php-overlay |
6 |
|
7 |
Revision Changes Path |
8 |
1.22 eclass/depend.php.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.php.eclass?rev=1.22&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.php.eclass?rev=1.22&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.php.eclass?r1=1.21&r2=1.22 |
13 |
|
14 |
Index: depend.php.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v |
17 |
retrieving revision 1.21 |
18 |
retrieving revision 1.22 |
19 |
diff -u -r1.21 -r1.22 |
20 |
--- depend.php.eclass 1 Sep 2007 15:58:17 -0000 1.21 |
21 |
+++ depend.php.eclass 24 Dec 2007 12:29:36 -0000 1.22 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2007 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.21 2007/09/01 15:58:17 jokey Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.22 2007/12/24 12:29:36 armin76 Exp $ |
27 |
|
28 |
# Author: Stuart Herbert <stuart@g.o> |
29 |
# Author: Luca Longinotti <chtekk@g.o> |
30 |
@@ -60,9 +60,9 @@ |
31 |
PHPCONFIG="/usr/${libdir}/php4/bin/php-config" |
32 |
PHPCLI="/usr/${libdir}/php4/bin/php" |
33 |
PHPCGI="/usr/${libdir}/php4/bin/php-cgi" |
34 |
- PHP_PKG="`best_version =dev-lang/php-4*`" |
35 |
+ PHP_PKG="$(best_version =dev-lang/php-4*)" |
36 |
PHPPREFIX="/usr/${libdir}/php4" |
37 |
- EXT_DIR="`${PHPCONFIG} --extension-dir 2>/dev/null`" |
38 |
+ EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" |
39 |
|
40 |
einfo |
41 |
einfo "Using ${PHP_PKG}" |
42 |
@@ -111,9 +111,9 @@ |
43 |
PHPCONFIG="/usr/${libdir}/php5/bin/php-config" |
44 |
PHPCLI="/usr/${libdir}/php5/bin/php" |
45 |
PHPCGI="/usr/${libdir}/php5/bin/php-cgi" |
46 |
- PHP_PKG="`best_version =dev-lang/php-5*`" |
47 |
+ PHP_PKG="$(best_version =dev-lang/php-5*)" |
48 |
PHPPREFIX="/usr/${libdir}/php5" |
49 |
- EXT_DIR="`${PHPCONFIG} --extension-dir 2>/dev/null`" |
50 |
+ EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" |
51 |
|
52 |
einfo |
53 |
einfo "Using ${PHP_PKG}" |
54 |
@@ -397,6 +397,9 @@ |
55 |
# @FUNCTION: require_pdo |
56 |
# @DESCRIPTION: |
57 |
# Require a PHP built with PDO support (PHP5 only). |
58 |
+# This function is now redundant and DEPRECATED since |
59 |
+# pdo-external use flag and pecl-pdo-* ebuilds were removed. |
60 |
+# You should use require_php_with_use pdo instead now. |
61 |
# @RETURN: die if feature is missing |
62 |
require_pdo() { |
63 |
has_php |
64 |
@@ -406,9 +409,8 @@ |
65 |
eerror |
66 |
eerror "This package requires PDO." |
67 |
eerror "PDO is only available for PHP 5." |
68 |
- eerror "You must install >=dev-lang/php-5.1 with" |
69 |
- eerror "either the 'pdo' or the 'pdo-external'" |
70 |
- eerror "USE flags turned on." |
71 |
+ eerror "You must install >=dev-lang/php-5.1 with USE=\"pdo\"." |
72 |
+ eerror "pdo USE flags turned on." |
73 |
eerror |
74 |
die "PHP 5 not installed" |
75 |
fi |
76 |
@@ -416,28 +418,15 @@ |
77 |
# Was PHP5 compiled with internal PDO support? |
78 |
if built_with_use =${PHP_PKG} pdo || phpconfutils_built_with_use =${PHP_PKG} pdo ; then |
79 |
return |
80 |
+ else |
81 |
+ eerror |
82 |
+ eerror "No PDO extension for PHP found." |
83 |
+ eerror "Please note that PDO only exists for PHP 5." |
84 |
+ eerror "Please install a PDO extension for PHP 5." |
85 |
+ eerror "You must install >=dev-lang/php-5.1 with USE=\"pdo\"." |
86 |
+ eerror |
87 |
+ die "No PDO extension for PHP 5 found" |
88 |
fi |
89 |
- |
90 |
- # Ok, maybe PDO was built as an external extension? |
91 |
- if ( built_with_use =${PHP_PKG} pdo-external || phpconfutils_built_with_use =${PHP_PKG} pdo-external ) && has_version 'dev-php5/pecl-pdo' ; then |
92 |
- return |
93 |
- fi |
94 |
- |
95 |
- # Ok, as last resort, it suffices that pecl-pdo was installed to have PDO support |
96 |
- if has_version 'dev-php5/pecl-pdo' ; then |
97 |
- return |
98 |
- fi |
99 |
- |
100 |
- # If we get here, then we don't have PDO support |
101 |
- eerror |
102 |
- eerror "No PDO extension for PHP found." |
103 |
- eerror "Please note that PDO only exists for PHP 5." |
104 |
- eerror "Please install a PDO extension for PHP 5," |
105 |
- eerror "you must install >=dev-lang/php-5.1 with" |
106 |
- eerror "either the 'pdo' or the 'pdo-external'" |
107 |
- eerror "USE flags turned on." |
108 |
- eerror |
109 |
- die "No PDO extension for PHP 5 found" |
110 |
} |
111 |
|
112 |
# @FUNCTION: require_php_cli |
113 |
@@ -458,7 +447,7 @@ |
114 |
# Detect which PHP version we have installed |
115 |
if has_version '=dev-lang/php-4*' ; then |
116 |
PHP_PACKAGE_FOUND="1" |
117 |
- pkg="`best_version '=dev-lang/php-4*'`" |
118 |
+ pkg="$(best_version '=dev-lang/php-4*')" |
119 |
if built_with_use =${pkg} cli || phpconfutils_built_with_use =${pkg} cli ; then |
120 |
PHP_VERSION="4" |
121 |
fi |
122 |
@@ -466,7 +455,7 @@ |
123 |
|
124 |
if has_version '=dev-lang/php-5*' ; then |
125 |
PHP_PACKAGE_FOUND="1" |
126 |
- pkg="`best_version '=dev-lang/php-5*'`" |
127 |
+ pkg="$(best_version '=dev-lang/php-5*')" |
128 |
if built_with_use =${pkg} cli || phpconfutils_built_with_use =${pkg} cli ; then |
129 |
PHP_VERSION="5" |
130 |
fi |
131 |
@@ -502,7 +491,7 @@ |
132 |
# Detect which PHP version we have installed |
133 |
if has_version '=dev-lang/php-4*' ; then |
134 |
PHP_PACKAGE_FOUND="1" |
135 |
- pkg="`best_version '=dev-lang/php-4*'`" |
136 |
+ pkg="$(best_version '=dev-lang/php-4*')" |
137 |
if built_with_use =${pkg} cgi || phpconfutils_built_with_use =${pkg} cgi ; then |
138 |
PHP_VERSION="4" |
139 |
fi |
140 |
@@ -510,7 +499,7 @@ |
141 |
|
142 |
if has_version '=dev-lang/php-5*' ; then |
143 |
PHP_PACKAGE_FOUND="1" |
144 |
- pkg="`best_version '=dev-lang/php-5*'`" |
145 |
+ pkg="$(best_version '=dev-lang/php-5*')" |
146 |
if built_with_use =${pkg} cgi || phpconfutils_built_with_use =${pkg} cgi ; then |
147 |
PHP_VERSION="5" |
148 |
fi |
149 |
|
150 |
|
151 |
|
152 |
1.37 eclass/php5_0-sapi.eclass |
153 |
|
154 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/php5_0-sapi.eclass?rev=1.37&view=markup |
155 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/php5_0-sapi.eclass?rev=1.37&content-type=text/plain |
156 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/php5_0-sapi.eclass?r1=1.36&r2=1.37 |
157 |
|
158 |
Index: php5_0-sapi.eclass |
159 |
=================================================================== |
160 |
RCS file: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v |
161 |
retrieving revision 1.36 |
162 |
retrieving revision 1.37 |
163 |
diff -u -r1.36 -r1.37 |
164 |
--- php5_0-sapi.eclass 12 May 2007 04:59:41 -0000 1.36 |
165 |
+++ php5_0-sapi.eclass 24 Dec 2007 12:29:36 -0000 1.37 |
166 |
@@ -1,6 +1,6 @@ |
167 |
# Copyright 1999-2007 Gentoo Foundation |
168 |
# Distributed under the terms of the GNU General Public License v2 |
169 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.36 2007/05/12 04:59:41 chtekk Exp $ |
170 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/php5_0-sapi.eclass,v 1.37 2007/12/24 12:29:36 armin76 Exp $ |
171 |
|
172 |
# ======================================================================== |
173 |
# |
174 |
@@ -19,614 +19,50 @@ |
175 |
# |
176 |
# ======================================================================== |
177 |
|
178 |
-PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase hyperwave-api informix interbase mnogosearch msql oci8 oracle7 ovrimos pfpro sapdb solid sybase sybase-ct" |
179 |
+# DEPRECATED!!! |
180 |
+# STOP USING THIS ECLASS, use php5_2-sapi eclass instead! |
181 |
|
182 |
-WANT_AUTOCONF="latest" |
183 |
-WANT_AUTOMAKE="latest" |
184 |
+inherit php5_2-sapi |
185 |
|
186 |
-inherit flag-o-matic autotools toolchain-funcs libtool eutils phpconfutils php-common-r1 |
187 |
- |
188 |
-# set MY_PHP_P in the ebuild |
189 |
- |
190 |
-# we only set these variables if we're building a copy of php which can be |
191 |
-# installed as a package in its own right |
192 |
-# |
193 |
-# copies of php which are compiled into other packages (e.g. php support |
194 |
-# for the thttpd web server) don't need these variables |
195 |
- |
196 |
-if [[ "${PHP_PACKAGE}" == 1 ]] ; then |
197 |
- HOMEPAGE="http://www.php.net/" |
198 |
- LICENSE="PHP-3" |
199 |
- SRC_URI="http://www.php.net/distributions/${MY_PHP_P}.tar.bz2" |
200 |
- S="${WORKDIR}/${MY_PHP_P}" |
201 |
-fi |
202 |
- |
203 |
-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 filepro firebird flatfile ftp gd gd-external gdbm gmp hyperwave-api iconv imap informix inifile interbase iodbc ipv6 java-external kerberos ldap ldap-sasl libedit mcve memlimit mhash ming mnogosearch msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc oracle7 ovrimos pcntl pcre pdo-external pfpro pic posix postgres qdbm readline 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 xmlrpc xpm xsl yaz zip zlib" |
204 |
- |
205 |
-# these USE flags should have the correct dependencies |
206 |
-DEPEND="adabas? ( >=dev-db/unixODBC-1.8.13 ) |
207 |
- berkdb? ( =sys-libs/db-4* ) |
208 |
- birdstep? ( >=dev-db/unixODBC-1.8.13 ) |
209 |
- bzip2? ( app-arch/bzip2 ) |
210 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
211 |
- cjk? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) |
212 |
- crypt? ( >=dev-libs/libmcrypt-2.4 ) |
213 |
- curl? ( >=net-misc/curl-7.10.5 ) |
214 |
- db2? ( >=dev-db/unixODBC-1.8.13 ) |
215 |
- dbmaker? ( >=dev-db/unixODBC-1.8.13 ) |
216 |
- empress? ( >=dev-db/unixODBC-1.8.13 ) |
217 |
- empress-bcs? ( >=dev-db/unixODBC-1.8.13 ) |
218 |
- esoob? ( >=dev-db/unixODBC-1.8.13 ) |
219 |
- exif? ( !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) |
220 |
- fdftk? ( app-text/fdftk ) |
221 |
- firebird? ( dev-db/firebird ) |
222 |
- gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) |
223 |
- gd-external? ( media-libs/gd ) |
224 |
- gdbm? ( >=sys-libs/gdbm-1.8.0 ) |
225 |
- gmp? ( >=dev-libs/gmp-4.1.2 ) |
226 |
- iconv? ( virtual/libiconv ) |
227 |
- imap? ( virtual/imap-c-client ) |
228 |
- iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 ) |
229 |
- kerberos? ( virtual/krb5 ) |
230 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
231 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
232 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
233 |
- mcve? ( >=dev-libs/openssl-0.9.7 ) |
234 |
- mhash? ( app-crypt/mhash ) |
235 |
- ming? ( media-libs/ming ) |
236 |
- mssql? ( dev-db/freetds ) |
237 |
- mysql? ( virtual/mysql ) |
238 |
- mysqli? ( >=virtual/mysql-4.1 ) |
239 |
- ncurses? ( sys-libs/ncurses ) |
240 |
- nls? ( sys-devel/gettext ) |
241 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
242 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
243 |
- postgres? ( >=dev-db/libpq-7.1 ) |
244 |
- qdbm? ( dev-db/qdbm ) |
245 |
- readline? ( sys-libs/readline ) |
246 |
- recode? ( app-text/recode ) |
247 |
- sapdb? ( >=dev-db/unixODBC-1.8.13 ) |
248 |
- sharedmem? ( dev-libs/mm ) |
249 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
250 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
251 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
252 |
- solid? ( >=dev-db/unixODBC-1.8.13 ) |
253 |
- spell? ( >=app-text/aspell-0.50 ) |
254 |
- sqlite? ( =dev-db/sqlite-2* ) |
255 |
- ssl? ( >=dev-libs/openssl-0.9.7 ) |
256 |
- sybase? ( dev-db/freetds ) |
257 |
- tidy? ( app-text/htmltidy ) |
258 |
- truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 !gd? ( !gd-external? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) ) |
259 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
260 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
261 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
262 |
- xpm? ( x11-libs/libXpm >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) |
263 |
- xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
264 |
- zlib? ( sys-libs/zlib ) |
265 |
- virtual/mta" |
266 |
- |
267 |
-# libswf conflicts with ming and should not |
268 |
-# be installed with the new PHP ebuilds |
269 |
-DEPEND="${DEPEND} |
270 |
- !media-libs/libswf" |
271 |
- |
272 |
-# simplistic for now |
273 |
-RDEPEND="${DEPEND}" |
274 |
- |
275 |
-# those are only needed at compile-time |
276 |
-DEPEND="${DEPEND} |
277 |
- >=sys-devel/m4-1.4.3 |
278 |
- >=sys-devel/libtool-1.5.18" |
279 |
- |
280 |
-# Additional features |
281 |
-# |
282 |
-# They are in PDEPEND because we need PHP installed first! |
283 |
-PDEPEND="doc? ( app-doc/php-docs ) |
284 |
- java-external? ( dev-php5/php-java-bridge ) |
285 |
- mcve? ( dev-php5/pecl-mcve ) |
286 |
- pdo-external? ( dev-php5/pecl-pdo ) |
287 |
- yaz? ( dev-php5/pecl-yaz ) |
288 |
- zip? ( dev-php5/pecl-zip )" |
289 |
- |
290 |
-# Until Suhosin is stable on all archs |
291 |
-#PDEPEND="${PDEPEND} suhosin? ( dev-php5/suhosin )" |
292 |
- |
293 |
-# ======================================================================== |
294 |
-# php.ini Support |
295 |
-# ======================================================================== |
296 |
- |
297 |
-PHP_INI_FILE="php.ini" |
298 |
-PHP_INI_UPSTREAM="php.ini-dist" |
299 |
- |
300 |
-# ======================================================================== |
301 |
- |
302 |
-# PHP patchsets support |
303 |
-SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2" |
304 |
- |
305 |
-# Suhosin patch support |
306 |
-[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )" |
307 |
- |
308 |
-# ======================================================================== |
309 |
- |
310 |
-EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst |
311 |
- |
312 |
-# ======================================================================== |
313 |
-# INTERNAL FUNCTIONS |
314 |
-# ======================================================================== |
315 |
+deprecation_warning() { |
316 |
+ eerror "Please upgrade ${PF} to use php5_2-sapi eclass instead!" |
317 |
+} |
318 |
|
319 |
php5_0-sapi_check_use_flags() { |
320 |
- # Multiple USE dependencies |
321 |
- phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external" |
322 |
- phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external" |
323 |
- phpconfutils_use_depend_any "exif" "gd" "gd" "gd-external" |
324 |
- |
325 |
- # Simple USE dependencies |
326 |
- phpconfutils_use_depend_all "xpm" "gd" |
327 |
- phpconfutils_use_depend_all "gd" "zlib" |
328 |
- phpconfutils_use_depend_all "simplexml" "xml" |
329 |
- phpconfutils_use_depend_all "soap" "xml" |
330 |
- phpconfutils_use_depend_all "wddx" "xml" |
331 |
- phpconfutils_use_depend_all "xmlrpc" "xml" |
332 |
- phpconfutils_use_depend_all "xsl" "xml" |
333 |
- phpconfutils_use_depend_all "xmlrpc" "iconv" |
334 |
- phpconfutils_use_depend_all "java-external" "session" |
335 |
- phpconfutils_use_depend_all "ldap-sasl" "ldap" |
336 |
- phpconfutils_use_depend_all "mcve" "ssl" |
337 |
- phpconfutils_use_depend_all "suhosin" "unicode" |
338 |
- phpconfutils_use_depend_all "adabas" "odbc" |
339 |
- phpconfutils_use_depend_all "birdstep" "odbc" |
340 |
- phpconfutils_use_depend_all "dbmaker" "odbc" |
341 |
- phpconfutils_use_depend_all "empress-bcs" "odbc" "empress" |
342 |
- phpconfutils_use_depend_all "empress" "odbc" |
343 |
- phpconfutils_use_depend_all "esoob" "odbc" |
344 |
- phpconfutils_use_depend_all "db2" "odbc" |
345 |
- phpconfutils_use_depend_all "iodbc" "odbc" |
346 |
- phpconfutils_use_depend_all "sapdb" "odbc" |
347 |
- phpconfutils_use_depend_all "solid" "odbc" |
348 |
- |
349 |
- # Direct USE conflicts |
350 |
- phpconfutils_use_conflict "gd" "gd-external" |
351 |
- phpconfutils_use_conflict "oci8" "oci8-instant-client" |
352 |
- phpconfutils_use_conflict "qdbm" "gdbm" |
353 |
- phpconfutils_use_conflict "readline" "libedit" |
354 |
- phpconfutils_use_conflict "recode" "mysql" "imap" "yaz" |
355 |
- phpconfutils_use_conflict "sharedmem" "threads" |
356 |
- |
357 |
- # IMAP support |
358 |
- php_check_imap |
359 |
- |
360 |
- # Mail support |
361 |
- php_check_mta |
362 |
- |
363 |
- # PostgreSQL support |
364 |
- php_check_pgsql |
365 |
- |
366 |
- # Oracle support |
367 |
- php_check_oracle_all |
368 |
- |
369 |
- phpconfutils_warn_about_external_deps |
370 |
- |
371 |
- export PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE}" |
372 |
+ deprecation_warning |
373 |
+ php5_2-sapi_check_use_flags |
374 |
} |
375 |
|
376 |
php5_0-sapi_set_php_ini_dir() { |
377 |
- PHP_INI_DIR="/etc/php/${PHPSAPI}-php5" |
378 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
379 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
380 |
+ deprecation_warning |
381 |
+ php5_2-sapi_set_php_ini_dir |
382 |
} |
383 |
|
384 |
php5_0-sapi_install_ini() { |
385 |
- destdir=/usr/$(get_libdir)/php5 |
386 |
- |
387 |
- # get the extension dir, if not already defined |
388 |
- [[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" |
389 |
- |
390 |
- # work out where we are installing the ini file |
391 |
- php5_0-sapi_set_php_ini_dir |
392 |
- |
393 |
- local phpinisrc=${PHP_INI_UPSTREAM} |
394 |
- |
395 |
- # Set the extension dir |
396 |
- einfo "Setting extension_dir in php.ini" |
397 |
- sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc} |
398 |
- |
399 |
- # A patch for PHP for security |
400 |
- einfo "Securing fopen wrappers" |
401 |
- sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc} |
402 |
- |
403 |
- # Set the include path to point to where we want to find PEAR packages |
404 |
- einfo "Setting correct include_path" |
405 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc} |
406 |
- |
407 |
- dodir ${PHP_INI_DIR} |
408 |
- insinto ${PHP_INI_DIR} |
409 |
- newins ${phpinisrc} ${PHP_INI_FILE} |
410 |
- |
411 |
- dodir ${PHP_EXT_INI_DIR} |
412 |
- dodir ${PHP_EXT_INI_DIR_ACTIVE} |
413 |
- |
414 |
- # Install any extensions built as shared objects |
415 |
- if use sharedext ; then |
416 |
- for x in `ls "${D}/${PHPEXTDIR}/"*.so | sort` ; do |
417 |
- inifilename=${x/.so/.ini} |
418 |
- inifilename=`basename ${inifilename}` |
419 |
- echo "extension=`basename ${x}`" >> "${D}/${PHP_EXT_INI_DIR}/${inifilename}" |
420 |
- dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}" |
421 |
- done |
422 |
- fi |
423 |
+ deprecation_warning |
424 |
+ php5_2-sapi_install_ini |
425 |
} |
426 |
|
427 |
-# ======================================================================== |
428 |
-# EXPORTED FUNCTIONS |
429 |
-# ======================================================================== |
430 |
- |
431 |
php5_0-sapi_pkg_setup() { |
432 |
- # let's do all the USE flag testing before we do anything else |
433 |
- # this way saves a lot of time |
434 |
php5_0-sapi_check_use_flags |
435 |
} |
436 |
|
437 |
php5_0-sapi_src_unpack() { |
438 |
- cd "${S}" |
439 |
- |
440 |
- # Change PHP branding |
441 |
- PHPPR=${PR/r/} |
442 |
- sed -e "s|^EXTRA_VERSION=\"\"|EXTRA_VERSION=\"-pl${PHPPR}-gentoo\"|g" -i configure.in || die "Unable to change PHP branding to -pl${PHPPR}-gentoo" |
443 |
- |
444 |
- # multilib-strict support |
445 |
- if [[ -n "${MULTILIB_PATCH}" ]] && [[ -f "${WORKDIR}/${MULTILIB_PATCH}" ]] ; then |
446 |
- epatch "${WORKDIR}/${MULTILIB_PATCH}" |
447 |
- else |
448 |
- ewarn "There is no multilib-strict patch available for this PHP release yet!" |
449 |
- fi |
450 |
- |
451 |
- # Apply general PHP5 patches |
452 |
- if [[ -d "${WORKDIR}/${MY_PHP_PV}/php5" ]] ; then |
453 |
- EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/php5" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch |
454 |
- fi |
455 |
- |
456 |
- # Apply version-specific PHP patches |
457 |
- if [[ -d "${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" ]] ; then |
458 |
- EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch |
459 |
- fi |
460 |
- |
461 |
- # Patch PHP to show Gentoo as the server platform |
462 |
- 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" |
463 |
- |
464 |
- # Disable interactive make test |
465 |
- sed -e 's/'`echo "\!getenv('NO_INTERACTION')"`'/false/g' -i run-tests.php |
466 |
- |
467 |
- # Stop PHP from activating the Apache config, as we will do that ourselves |
468 |
- for i in configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 ; do |
469 |
- sed -i.orig -e 's,-i -a -n php5,-i -n php5,g' ${i} |
470 |
- sed -i.orig -e 's,-i -A -n php5,-i -n php5,g' ${i} |
471 |
- done |
472 |
- |
473 |
- # Patch PHP to support heimdal instead of mit-krb5 |
474 |
- if has_version "app-crypt/heimdal" ; then |
475 |
- sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 || die "Failed to fix heimdal libname" |
476 |
- sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 || die "Failed to fix heimdal crypt library reference" |
477 |
- fi |
478 |
- |
479 |
- # Patch for PostgreSQL support |
480 |
- if use postgres ; then |
481 |
- sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 || die "Failed to fix PostgreSQL include paths" |
482 |
- fi |
483 |
- |
484 |
- # Suhosin support |
485 |
- if use suhosin ; then |
486 |
- if [[ -n "${SUHOSIN_PATCH}" ]] && [[ -f "${DISTDIR}/${SUHOSIN_PATCH}" ]] ; then |
487 |
- epatch "${DISTDIR}/${SUHOSIN_PATCH}" |
488 |
- else |
489 |
- ewarn "There is no Suhosin patch available for this PHP release yet!" |
490 |
- fi |
491 |
- fi |
492 |
- |
493 |
- # Fix configure scripts to correctly support Suhosin |
494 |
- einfo "Running aclocal" |
495 |
- aclocal --force || die "Unable to run aclocal successfully" |
496 |
- einfo "Running libtoolize" |
497 |
- libtoolize --copy --force || die "Unable to run libtoolize successfully" |
498 |
- |
499 |
- # Rebuild configure to make sure it's up to date |
500 |
- einfo "Rebuilding configure script" |
501 |
- autoreconf --force -W no-cross || die "Unable to regenerate configure script successfully" |
502 |
- |
503 |
- # Run elibtoolize |
504 |
- elibtoolize |
505 |
- |
506 |
- # Just in case ;-) |
507 |
- chmod 0755 configure || die "Failed to chmod configure to 0755" |
508 |
+ deprecation_warning |
509 |
+ php5_2-sapi_src_unpack |
510 |
} |
511 |
|
512 |
php5_0-sapi_src_compile() { |
513 |
- destdir=/usr/$(get_libdir)/php5 |
514 |
- |
515 |
- php5_0-sapi_set_php_ini_dir |
516 |
- |
517 |
- cd "${S}" |
518 |
- |
519 |
- phpconfutils_init |
520 |
- |
521 |
- my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE} --without-pear" |
522 |
- |
523 |
- # extension USE flag shared support? |
524 |
- phpconfutils_extension_enable "bcmath" "bcmath" 1 |
525 |
- phpconfutils_extension_with "bz2" "bzip2" 1 |
526 |
- phpconfutils_extension_enable "calendar" "calendar" 1 |
527 |
- phpconfutils_extension_disable "ctype" "ctype" 0 |
528 |
- phpconfutils_extension_with "curl" "curl" 1 |
529 |
- phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 |
530 |
- phpconfutils_extension_enable "dbase" "dbase" 1 |
531 |
- phpconfutils_extension_disable "dom" "xml" 0 |
532 |
- phpconfutils_extension_enable "exif" "exif" 1 |
533 |
- phpconfutils_extension_with "fbsql" "frontbase" 1 |
534 |
- phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0" |
535 |
- phpconfutils_extension_enable "filepro" "filepro" 1 |
536 |
- phpconfutils_extension_enable "ftp" "ftp" 1 |
537 |
- phpconfutils_extension_with "gettext" "nls" 1 |
538 |
- phpconfutils_extension_with "gmp" "gmp" 1 |
539 |
- phpconfutils_extension_with "hwapi" "hyperwave-api" 1 |
540 |
- phpconfutils_extension_without "iconv" "iconv" 0 |
541 |
- phpconfutils_extension_with "informix" "informix" 1 |
542 |
- phpconfutils_extension_disable "ipv6" "ipv6" 0 |
543 |
- phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr" |
544 |
- phpconfutils_extension_disable "libxml" "xml" 0 |
545 |
- phpconfutils_extension_enable "mbstring" "unicode" 1 |
546 |
- phpconfutils_extension_with "mcrypt" "crypt" 1 |
547 |
- phpconfutils_extension_enable "memory-limit" "memlimit" 0 |
548 |
- phpconfutils_extension_with "mhash" "mhash" 1 |
549 |
- phpconfutils_extension_with "ming" "ming" 1 |
550 |
- phpconfutils_extension_with "mnogosearch" "mnogosearch" 1 |
551 |
- phpconfutils_extension_with "msql" "msql" 1 |
552 |
- phpconfutils_extension_with "mssql" "mssql" 1 |
553 |
- phpconfutils_extension_with "ncurses" "ncurses" 1 |
554 |
- phpconfutils_extension_with "oci8" "oci8" 1 |
555 |
- phpconfutils_extension_with "oci8-instant-client" "oci8-instant-client" 1 |
556 |
- phpconfutils_extension_with "oracle" "oracle7" 1 |
557 |
- phpconfutils_extension_with "openssl" "ssl" 0 |
558 |
- phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" |
559 |
- phpconfutils_extension_with "ovrimos" "ovrimos" 1 |
560 |
- phpconfutils_extension_enable "pcntl" "pcntl" 1 |
561 |
- phpconfutils_extension_without "pcre-regex" "pcre" 0 |
562 |
- phpconfutils_extension_with "pfpro" "pfpro" 1 |
563 |
- phpconfutils_extension_with "pgsql" "postgres" 1 |
564 |
- phpconfutils_extension_disable "posix" "posix" 0 |
565 |
- phpconfutils_extension_with "pspell" "spell" 1 |
566 |
- phpconfutils_extension_with "recode" "recode" 1 |
567 |
- phpconfutils_extension_disable "simplexml" "simplexml" 0 |
568 |
- phpconfutils_extension_enable "shmop" "sharedmem" 0 |
569 |
- phpconfutils_extension_with "snmp" "snmp" 1 |
570 |
- phpconfutils_extension_enable "soap" "soap" 1 |
571 |
- phpconfutils_extension_enable "sockets" "sockets" 1 |
572 |
- phpconfutils_extension_disable "spl" "spl" 0 |
573 |
- phpconfutils_extension_with "sybase" "sybase" 1 |
574 |
- phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 |
575 |
- phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 |
576 |
- phpconfutils_extension_enable "sysvsem" "sysvipc" 1 |
577 |
- phpconfutils_extension_enable "sysvshm" "sysvipc" 1 |
578 |
- phpconfutils_extension_with "tidy" "tidy" 1 |
579 |
- phpconfutils_extension_disable "tokenizer" "tokenizer" 0 |
580 |
- phpconfutils_extension_enable "wddx" "wddx" 1 |
581 |
- phpconfutils_extension_disable "xml" "xml" 0 |
582 |
- phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 |
583 |
- phpconfutils_extension_with "xsl" "xsl" 1 |
584 |
- phpconfutils_extension_with "zlib" "zlib" 1 |
585 |
- phpconfutils_extension_enable "debug" "debug" 0 |
586 |
- |
587 |
- # DBA support |
588 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile || use qdbm ; then |
589 |
- my_conf="${my_conf} --enable-dba${shared}" |
590 |
- fi |
591 |
- |
592 |
- # DBA drivers support |
593 |
- phpconfutils_extension_with "cdb" "cdb" 0 |
594 |
- phpconfutils_extension_with "db4" "berkdb" 0 |
595 |
- phpconfutils_extension_with "flatfile" "flatfile" 0 |
596 |
- phpconfutils_extension_with "gdbm" "gdbm" 0 |
597 |
- phpconfutils_extension_with "inifile" "inifile" 0 |
598 |
- phpconfutils_extension_with "qdbm" "qdbm" 0 |
599 |
- |
600 |
- # Support for the GD graphics library |
601 |
- if use gd-external || phpconfutils_usecheck gd-external ; then |
602 |
- phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" |
603 |
- phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" |
604 |
- phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 |
605 |
- phpconfutils_extension_with "gd" "gd-external" 1 "/usr" |
606 |
- else |
607 |
- phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" |
608 |
- phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" |
609 |
- phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 |
610 |
- phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr" |
611 |
- phpconfutils_extension_with "png-dir" "gd" 0 "/usr" |
612 |
- phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr/X11R6" |
613 |
- # enable gd last, so configure can pick up the previous settings |
614 |
- phpconfutils_extension_with "gd" "gd" 0 |
615 |
- fi |
616 |
- |
617 |
- # IMAP support |
618 |
- if use imap || phpconfutils_usecheck imap ; then |
619 |
- phpconfutils_extension_with "imap" "imap" 1 |
620 |
- phpconfutils_extension_with "imap-ssl" "ssl" 0 |
621 |
- fi |
622 |
- |
623 |
- # Interbase support |
624 |
- if use firebird || use interbase ; then |
625 |
- my_conf="${my_conf} --with-interbase=/usr" |
626 |
- fi |
627 |
- |
628 |
- # LDAP support |
629 |
- if use ldap || phpconfutils_usecheck ldap ; then |
630 |
- phpconfutils_extension_with "ldap" "ldap" 1 |
631 |
- phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 |
632 |
- fi |
633 |
- |
634 |
- # MySQL support |
635 |
- if use mysql ; then |
636 |
- phpconfutils_extension_with "mysql" "mysql" 1 "/usr" |
637 |
- phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock" |
638 |
- fi |
639 |
- |
640 |
- # MySQLi support |
641 |
- phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config" |
642 |
- |
643 |
- # ODBC support |
644 |
- if use odbc || phpconfutils_usecheck odbc ; then |
645 |
- phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr" |
646 |
- |
647 |
- phpconfutils_extension_with "adabas" "adabas" 1 |
648 |
- phpconfutils_extension_with "birdstep" "birdstep" 1 |
649 |
- phpconfutils_extension_with "dbmaker" "dbmaker" 1 |
650 |
- phpconfutils_extension_with "empress" "empress" 1 |
651 |
- if use empress || phpconfutils_usecheck empress ; then |
652 |
- phpconfutils_extension_with "empress-bcs" "empress-bcs" 0 |
653 |
- fi |
654 |
- phpconfutils_extension_with "esoob" "esoob" 1 |
655 |
- phpconfutils_extension_with "ibm-db2" "db2" 1 |
656 |
- phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr" |
657 |
- phpconfutils_extension_with "sapdb" "sapdb" 1 |
658 |
- phpconfutils_extension_with "solid" "solid" 1 |
659 |
- fi |
660 |
- |
661 |
- # readline/libedit support |
662 |
- # You can use readline or libedit, but you can't use both |
663 |
- phpconfutils_extension_with "readline" "readline" 0 |
664 |
- phpconfutils_extension_with "libedit" "libedit" 0 |
665 |
- |
666 |
- # Session support |
667 |
- if ! use session && ! phpconfutils_usecheck session ; then |
668 |
- phpconfutils_extension_disable "session" "session" 0 |
669 |
- else |
670 |
- phpconfutils_extension_with "mm" "sharedmem" 0 |
671 |
- fi |
672 |
- |
673 |
- # SQLite support |
674 |
- if ! use sqlite && ! phpconfutils_usecheck sqlite ; then |
675 |
- phpconfutils_extension_without "sqlite" "sqlite" 0 |
676 |
- else |
677 |
- phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr" |
678 |
- phpconfutils_extension_enable "sqlite-utf8" "unicode" 0 |
679 |
- fi |
680 |
- |
681 |
- # Fix ELF-related problems |
682 |
- if use pic || phpconfutils_usecheck pic ; then |
683 |
- einfo "Enabling PIC support" |
684 |
- my_conf="${my_conf} --with-pic" |
685 |
- fi |
686 |
- |
687 |
- # Catch CFLAGS problems |
688 |
- php_check_cflags |
689 |
- |
690 |
- # multilib support |
691 |
- if [[ $(get_libdir) != lib ]] ; then |
692 |
- my_conf="--with-libdir=$(get_libdir) ${my_conf}" |
693 |
- fi |
694 |
- |
695 |
- # Support user-passed configuration parameters |
696 |
- [[ -z "${EXTRA_ECONF}" ]] && EXTRA_ECONF="" |
697 |
- |
698 |
- # Set the correct compiler for cross-compilation |
699 |
- tc-export CC |
700 |
- |
701 |
- # We don't use econf, because we need to override all of its settings |
702 |
- ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed" |
703 |
- emake || die "make failed" |
704 |
+ deprecation_warning |
705 |
+ php5_2-sapi_src_compile |
706 |
} |
707 |
|
708 |
php5_0-sapi_src_install() { |
709 |
- destdir=/usr/$(get_libdir)/php5 |
710 |
- |
711 |
- cd "${S}" |
712 |
- |
713 |
- addpredict /usr/share/snmp/mibs/.index |
714 |
- |
715 |
- # Install PHP |
716 |
- make INSTALL_ROOT="${D}" install-build install-headers install-programs || die "make install failed" |
717 |
- |
718 |
- # Install missing header files |
719 |
- if use unicode || phpconfutils_usecheck unicode ; then |
720 |
- dodir ${destdir}/include/php/ext/mbstring |
721 |
- insinto ${destdir}/include/php/ext/mbstring |
722 |
- for x in `ls "${S}/ext/mbstring/"*.h` ; do |
723 |
- file=`basename ${x}` |
724 |
- doins ext/mbstring/${file} |
725 |
- done |
726 |
- dodir ${destdir}/include/php/ext/mbstring/oniguruma |
727 |
- insinto ${destdir}/include/php/ext/mbstring/oniguruma |
728 |
- for x in `ls "${S}/ext/mbstring/oniguruma/"*.h` ; do |
729 |
- file=`basename ${x}` |
730 |
- doins ext/mbstring/oniguruma/${file} |
731 |
- done |
732 |
- dodir ${destdir}/include/php/ext/mbstring/libmbfl/mbfl |
733 |
- insinto ${destdir}/include/php/ext/mbstring/libmbfl/mbfl |
734 |
- for x in `ls "${S}/ext/mbstring/libmbfl/mbfl/"*.h` ; do |
735 |
- file=`basename ${x}` |
736 |
- doins ext/mbstring/libmbfl/mbfl/${file} |
737 |
- done |
738 |
- fi |
739 |
- |
740 |
- # Get the extension dir, if not already defined |
741 |
- [[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" |
742 |
- |
743 |
- # And install the modules to it |
744 |
- if use sharedext ; then |
745 |
- for x in `ls "${S}/modules/"*.so | sort` ; do |
746 |
- module=`basename ${x}` |
747 |
- modulename=${module/.so/} |
748 |
- insinto "${PHPEXTDIR}" |
749 |
- einfo "Installing PHP ${modulename} extension" |
750 |
- doins "modules/${module}" |
751 |
- done |
752 |
- fi |
753 |
- |
754 |
- # Generate the USE file for PHP |
755 |
- phpconfutils_generate_usefile |
756 |
- |
757 |
- # Create the directory where we'll put php5-only php scripts |
758 |
- keepdir /usr/share/php5 |
759 |
+ deprecation_warning |
760 |
+ php5_2-sapi_src_install |
761 |
} |
762 |
|
763 |
php5_0-sapi_pkg_postinst() { |
764 |
- ewarn |
765 |
- ewarn "If you have additional third party PHP extensions (such as" |
766 |
- ewarn "dev-php5/phpdbg) you may need to recompile them now." |
767 |
- ewarn "A new way of enabling/disabling PHP extensions was introduced" |
768 |
- ewarn "with the newer PHP packages releases, so please reemerge any" |
769 |
- ewarn "PHP extensions you have installed to automatically adapt to" |
770 |
- ewarn "the new configuration layout." |
771 |
- if use sharedext ; then |
772 |
- ewarn "The core PHP extensions are now loaded through external" |
773 |
- ewarn ".ini files, not anymore using a 'extension=name.so' line" |
774 |
- ewarn "in the php.ini file. Portage will take care of this by" |
775 |
- ewarn "creating new, updated config-files, please make sure to" |
776 |
- ewarn "install those using etc-update or dispatch-conf." |
777 |
- fi |
778 |
- ewarn |
779 |
- |
780 |
- if use curl ; then |
781 |
- ewarn "Please be aware that CURL can allow the bypass of open_basedir restrictions." |
782 |
- ewarn "This can be a security risk!" |
783 |
- ewarn |
784 |
- fi |
785 |
- |
786 |
- ewarn "The 'pic' USE flag was added to newer releases of dev-lang/php." |
787 |
- ewarn "With PIC enabled, your PHP installation may become slower, but" |
788 |
- ewarn "PIC is required on Hardened-Gentoo platforms (where the USE flag" |
789 |
- ewarn "is enabled automatically). You may also need this on other" |
790 |
- ewarn "configurations where TEXTRELs are disabled, for example when using" |
791 |
- ewarn "certain PaX options in the kernel." |
792 |
- ewarn |
793 |
- |
794 |
- ewarn "The configure option --enable-gd-native-ttf (enabled by the" |
795 |
- ewarn "'truetype' USE flag) was removed at upstreams request," |
796 |
- ewarn "as it's considered old and broken." |
797 |
- ewarn "Hardened-PHP was also removed from the PHP 5.0 ebuilds in" |
798 |
- ewarn "favour of its successor Suhosin, enable the 'suhosin' USE" |
799 |
- ewarn "flag to install it." |
800 |
- ewarn |
801 |
- |
802 |
- ewarn "The 'xml' and 'xml2' USE flags were unified in only the 'xml' USE" |
803 |
- ewarn "flag. To get the features that were once controlled by the 'xml2'" |
804 |
- ewarn "USE flag, turn the 'xml' USE flag on." |
805 |
- ewarn |
806 |
+ deprecation_warning |
807 |
+ php5_2-sapi_pkg_postinst |
808 |
} |
809 |
|
810 |
|
811 |
|
812 |
-- |
813 |
gentoo-commits@g.o mailing list |