diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2006-01-10 18:36:52 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2006-01-10 18:36:52 +0000 |
commit | 52c5d9fc282f560c554fb5952adfa312841d7c2b (patch) | |
tree | f3b51b0f09b7bcefeaa34b75f0ed2eb540838fae /dev-lang | |
parent | Added to ~hppa. (diff) | |
download | historical-52c5d9fc282f560c554fb5952adfa312841d7c2b.tar.gz historical-52c5d9fc282f560c554fb5952adfa312841d7c2b.tar.bz2 historical-52c5d9fc282f560c554fb5952adfa312841d7c2b.zip |
Move php patches to tarballs.
Package-Manager: portage-2.0.54
Diffstat (limited to 'dev-lang')
40 files changed, 93 insertions, 7706 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index 33bb7ce1d0f8..47d234bd669d 100644 --- a/dev-lang/php/ChangeLog +++ b/dev-lang/php/ChangeLog @@ -1,6 +1,40 @@ # ChangeLog for dev-lang/php # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.57 2006/01/05 17:23:22 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.58 2006/01/10 18:36:52 chtekk Exp $ + + 10 Jan 2006; Luca Longinotti <chtekk@gentoo.org> + -files/4.3.11/php4.3.11-apache2sapi.patch, + -files/4.3.11/php4.3.11-apachesapi.patch, + -files/4.3.11/php4.3.11-curl-open_basedir.patch, + -files/4.3.11/php4.3.11-fopen_wrappers.patch, + -files/4.3.11/php4.3.11-gd-safe_mode.patch, + -files/4.3.11/php4.3.11-globals_overwrite.patch, + -files/4.3.11/php4.3.11-mbstring-header_inj.patch, + -files/4.3.11/php4.3.11-multilib-search-path.patch, + -files/4.3.11/php4.3.11-pcre-security.patch, + -files/4.3.11/php4.3.11-phpinfo_xss.patch, + -files/4.3.11/php4.3.11-pspell-ext-segf.patch, + -files/4.4.1/php4.4.1-apache2sapi.patch, + -files/4.4.1/php4.4.1-curl-open_basedir.patch, + -files/4.4.1/php4.4.1-current_key_by_reference.patch, + -files/4.4.1/php4.4.1-gd-safe_mode.patch, + -files/4.4.1/php4.4.1-mbstring-header_inj.patch, + -files/4.4.1/php4.4.1-multilib-search-path.patch, + -files/5.0.5/php5.0.5-apache2sapi.patch, + -files/5.0.5/php5.0.5-curl-open_basedir.patch, + -files/5.0.5/php5.0.5-fopen_wrappers.patch, + -files/5.0.5/php5.0.5-gd-safe_mode.patch, + -files/5.0.5/php5.0.5-globals_overwrite.patch, + -files/5.0.5/php5.0.5-mbstring-header_inj.patch, + -files/5.0.5/php5.0.5-multilib-search-path.patch, + -files/5.0.5/php5.0.5-obj-serialize.patch, + -files/5.0.5/php5.0.5-pspell-ext-segf.patch, + -files/5.0.5/php5.0.5-tsrm-gcc4.patch, + -files/5.1.1/php5.1.1-curl-gcry_threads.patch, + -files/5.1.1/php5.1.1-ming-config.patch, + -files/5.1.1/php5.1.1-multilib-search-path.patch, php-4.3.11-r5.ebuild, + php-4.4.1-r3.ebuild, php-5.0.5-r5.ebuild, php-5.1.1.ebuild: + Move version-specific patches into external tarballs. 05 Jan 2006; Luca Longinotti <chtekk@gentoo.org> +files/5.1.1/php5.1.1-curl-gcry_threads.patch, php-5.1.1.ebuild: diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 0d58b183eef4..e41700581361 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -1,4 +1,4 @@ -MD5 4b79b83cdad91df61751094c7667b579 ChangeLog 12858 +MD5 4fcd1e41a4fb1a3f1717453755fa778d ChangeLog 14489 MD5 389638f1d46b6c41cd4d87b471572f4b files/4-any/apache-1.3/70_mod_php.conf 484 MD5 ee36e31632adb08b7abf70f78b5b2125 files/4-any/apache-2.0/70_mod_php.conf 485 MD5 f0acca9c6387b8ca139d2849665bd16f files/4-any/php4-fastbuild.patch 9012 @@ -7,23 +7,6 @@ MD5 6352b07a050227f0145d6e1cd759f036 files/4-any/php4-iodbc-config.diff 582 MD5 a7036ee38aa3b37256c0a6fe2afdbbe2 files/4-any/php4-libtool-1.5.patch 613 MD5 d3a9c21b313d418005ad021cc194d0aa files/4-any/php4-uClibc-have_dn_skipname.patch 968 MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/4-any/php4-with-iodbc.diff 443 -MD5 167dce0365452099df715b5a44577e96 files/4.3.11/php4.3.11-apache2sapi.patch 5362 -MD5 662343ff212ca6335aec5d361a2df96e files/4.3.11/php4.3.11-apachesapi.patch 1172 -MD5 1943cf6bd6734c154cadb37e868138d6 files/4.3.11/php4.3.11-curl-open_basedir.patch 5240 -MD5 cb36a386184ed6a887f62d2205f57173 files/4.3.11/php4.3.11-fopen_wrappers.patch 1481 -MD5 8b3b20b3ce5ef1d7ea4f633bf7b9f265 files/4.3.11/php4.3.11-gd-safe_mode.patch 4645 -MD5 89d12226b1726b681df274be79043411 files/4.3.11/php4.3.11-globals_overwrite.patch 18011 -MD5 272b88dd79370ec36b8d8eb276bcb918 files/4.3.11/php4.3.11-mbstring-header_inj.patch 4664 -MD5 07cfc066658ff69cc52e23cf8295a128 files/4.3.11/php4.3.11-multilib-search-path.patch 50376 -MD5 3f80d0c6c58fd4ea02b7efdf69265721 files/4.3.11/php4.3.11-pcre-security.patch 1667 -MD5 43b4113d1fb159955b0d5ed307cac143 files/4.3.11/php4.3.11-phpinfo_xss.patch 2518 -MD5 48d9c939434e9b01d0696410d59c503c files/4.3.11/php4.3.11-pspell-ext-segf.patch 8482 -MD5 9ba3afdebe85bd444b9d7cd63c1409cc files/4.4.1/php4.4.1-apache2sapi.patch 1764 -MD5 4d6932aa8d79c968028bc273641ef9d1 files/4.4.1/php4.4.1-curl-open_basedir.patch 1012 -MD5 e2dde7269b4d3315f2030622f016478c files/4.4.1/php4.4.1-current_key_by_reference.patch 864 -MD5 69f61d3cb96b977bdf11e8d9c771d41b files/4.4.1/php4.4.1-gd-safe_mode.patch 4189 -MD5 28164f11a7e4bba29b49ab57ae923ee0 files/4.4.1/php4.4.1-mbstring-header_inj.patch 4592 -MD5 e5543983a80e7a1673207a2174137581 files/4.4.1/php4.4.1-multilib-search-path.patch 50244 MD5 96ed6efe383833dbb880fef3b6c562bb files/5.0-any/apache-1.3/70_mod_php5.conf 524 MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.0-any/apache-2.0/70_mod_php5.conf 525 MD5 7d198bde60f94cc8cea5ad9479901e21 files/5.0-any/php5-imap-symlink.diff 620 @@ -32,16 +15,6 @@ MD5 7530065b6851a15b1c9d8b0ee5fb0a98 files/5.0-any/php5-libtool-1.5.patch 613 MD5 058042718bc876bf27ab902673919ca9 files/5.0-any/php5-prefork.patch 850 MD5 273799e60d5a41a1e6f5ac53781a152f files/5.0-any/php5-soap_persistence_session.diff 1976 MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/5.0-any/php5-with-iodbc.diff 443 -MD5 7d8aa2c37817c9fcf42987cfb82b0c4b files/5.0.5/php5.0.5-apache2sapi.patch 4422 -MD5 eb0bba9b225224f034170ae9e591ec6f files/5.0.5/php5.0.5-curl-open_basedir.patch 2263 -MD5 9e31c5edb0ded1d57ed90859d3ef168c files/5.0.5/php5.0.5-fopen_wrappers.patch 942 -MD5 9057d5d4cf274c2465809320f67db6b9 files/5.0.5/php5.0.5-gd-safe_mode.patch 3422 -MD5 54462370e3ddc7b0a1f46509ad43120c files/5.0.5/php5.0.5-globals_overwrite.patch 6287 -MD5 f9a39b759182e52c9584f5eb1f0535c7 files/5.0.5/php5.0.5-mbstring-header_inj.patch 4602 -MD5 44f68a51c9034e0234ff13b17afb00dc files/5.0.5/php5.0.5-multilib-search-path.patch 46548 -MD5 b95f630e058c1b0f9cc47e186ef182cf files/5.0.5/php5.0.5-obj-serialize.patch 1364 -MD5 ab931f65aefab4da99c6353b2c503d70 files/5.0.5/php5.0.5-pspell-ext-segf.patch 9422 -MD5 27702eb0e9b52da25df71aa3fb968ff6 files/5.0.5/php5.0.5-tsrm-gcc4.patch 554 MD5 96ed6efe383833dbb880fef3b6c562bb files/5.1-any/apache-1.3/70_mod_php5.conf 524 MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.1-any/apache-2.0/70_mod_php5.conf 525 MD5 8392d102bb64d0e136d7b74302f51752 files/5.1-any/php5-fastbuild.patch 9580 @@ -50,15 +23,12 @@ MD5 2a1f695fb5ff9959ed634e5a361fc46f files/5.1-any/php5-iodbc-config.diff 527 MD5 058042718bc876bf27ab902673919ca9 files/5.1-any/php5-prefork.patch 850 MD5 273799e60d5a41a1e6f5ac53781a152f files/5.1-any/php5-soap_persistence_session.diff 1976 MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/5.1-any/php5-with-iodbc.diff 443 -MD5 442a1c67483c8692f08a4960690c7715 files/5.1.1/php5.1.1-curl-gcry_threads.patch 326 -MD5 b2efb209e465415427bce146acac51cf files/5.1.1/php5.1.1-ming-config.patch 672 -MD5 ad1808326ee0e0fdcb843d8c3cd5efa9 files/5.1.1/php5.1.1-multilib-search-path.patch 10285 -MD5 ed010745cb9455e21309eae5409242d1 files/digest-php-4.3.11-r5 229 -MD5 53be86748517c9f34fe564a3b51c6867 files/digest-php-4.4.1-r3 150 -MD5 08a12fc32604e9d89b8c3b74d525734b files/digest-php-5.0.5-r5 150 -MD5 26bfa7c1848a7f8b36437db2e9fbeb8d files/digest-php-5.1.1 150 +MD5 ad1f5d7c6347b494cf8537ae7ccb8cb9 files/digest-php-4.3.11-r5 303 +MD5 5833ed70909d0ac1973fd925b58df6c5 files/digest-php-4.4.1-r3 223 +MD5 f63da77a9810ee794c4c3e15cf7aa682 files/digest-php-5.0.5-r5 223 +MD5 238222ae5f42f0c399eafc6042af3cb2 files/digest-php-5.1.1 222 MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157 -MD5 d7a463a0d91060881509adc142347561 php-4.3.11-r5.ebuild 9595 -MD5 e2e42f58f760c070c501612f987b4151 php-4.4.1-r3.ebuild 8588 -MD5 59d674522ef0955912a606869b0834af php-5.0.5-r5.ebuild 6036 -MD5 bf6b1493d9a2e0ef3ab2d93043ed2631 php-5.1.1.ebuild 8126 +MD5 6ee0dd18c16ac8381f1bf592ea850b63 php-4.3.11-r5.ebuild 9681 +MD5 5feaf53808942ddd736d6f80431c79a2 php-4.4.1-r3.ebuild 8679 +MD5 ca72c1911c7f42790f82687d4c370cb9 php-5.0.5-r5.ebuild 6123 +MD5 dd74477c71655739f1771934dc1e359e php-5.1.1.ebuild 8220 diff --git a/dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch b/dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch deleted file mode 100644 index e6b4337b5e78..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch +++ /dev/null @@ -1,170 +0,0 @@ ---- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100 -+++ sapi/apache2handler/sapi_apache2.c 2005-12-03 02:34:22.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */ -+/* $Id: sapi_apache2.c,v 1.1.2.40.2.8 2005/11/18 19:03:13 iliaa Exp $ */ - - #include <fcntl.h> - -@@ -268,23 +268,18 @@ - TSRMLS_FETCH(); - - ctx = SG(server_context); -- -- /* We use APLOG_STARTUP because it keeps us from printing the -- * data and time information at the beginning of the error log -- * line. Not sure if this is correct, but it mirrors what happens -- * with Apache 1.3 -- rbb -- */ -+ - if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */ - ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg); - } else { -- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg); -+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg); - } - } - - static void php_apache_sapi_log_message_ex(char *msg, request_rec *r) - { - if (r) { -- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename); -+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); - } else { - php_apache_sapi_log_message(msg); - } -@@ -448,6 +443,18 @@ - php_request_shutdown(NULL); - } - -+static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC) -+{ -+ if (strcmp(r->protocol, "INCLUDED")) { -+ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); -+ } -+ if (p) { -+ ((php_struct *)SG(server_context))->r = p; -+ } else { -+ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); -+ } -+} -+ - static int php_handler(request_rec *r) - { - php_struct *ctx; -@@ -458,15 +465,31 @@ - request_rec *parent_req = NULL; - TSRMLS_FETCH(); - -+#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC); -+ - conf = ap_get_module_config(r->per_dir_config, &php4_module); -+ -+ /* apply_config() needs r in some cases, so allocate server_context early */ -+ ctx = SG(server_context); -+ if (ctx == NULL) { -+ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); -+ /* register a cleanup so we clear out the SG(server_context) -+ * after each request. Note: We pass in the pointer to the -+ * server_context in case this is handled by a different thread. -+ */ -+ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); -+ ctx->r = r; -+ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ -+ } else { -+ parent_req = ctx->r; -+ ctx->r = r; -+ } - apply_config(conf); - - if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { - /* Check for xbithack in this case. */ - if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return DECLINED; - } - } -@@ -475,32 +498,24 @@ - * the configuration; default behaviour is to accept. */ - if (r->used_path_info == AP_REQ_REJECT_PATH_INFO - && r->path_info && r->path_info[0]) { -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return HTTP_NOT_FOUND; - } - - /* handle situations where user turns the engine off */ - if (!AP2(engine)) { -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return DECLINED; - } - - if (r->finfo.filetype == 0) { - php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return HTTP_NOT_FOUND; - } - if (r->finfo.filetype == APR_DIR) { - php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return HTTP_FORBIDDEN; - } - -@@ -516,24 +531,30 @@ - - zend_first_try { - -- ctx = SG(server_context); - if (ctx == NULL) { -- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); -- /* register a cleanup so we clear out the SG(server_context) -- * after each request. Note: We pass in the pointer to the -- * server_context in case this is handled by a different thread. -- */ -- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); -- -- ctx->r = r; -+normal: - brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); -+ ctx = SG(server_context); - ctx->brigade = brigade; - - if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { - zend_bailout(); - } - } else { -- parent_req = ctx->r; -+ if (!parent_req) { -+ parent_req = ctx->r; -+ } -+ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { -+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { -+ zend_bailout(); -+ } -+ } -+ -+ /* check if comming due to ErrorDocument */ -+ if (parent_req && parent_req->status != HTTP_OK) { -+ parent_req = NULL; -+ goto normal; -+ } - ctx->r = r; - brigade = ctx->brigade; - } diff --git a/dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch b/dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch deleted file mode 100644 index 82480c715a6d..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- sapi/apache/mod_php4.c 2004-07-21 18:25:28.000000000 +0200 -+++ sapi/apache/mod_php4.c 2005-05-19 18:14:46.000000000 +0200 -@@ -17,7 +17,7 @@ - | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | - +----------------------------------------------------------------------+ - */ --/* $Id: mod_php4.c,v 1.146.2.14 2004/07/21 16:25:28 sesser Exp $ */ -+/* $Id: mod_php4.c,v 1.146.2.15 2005/05/19 16:14:46 rasmus Exp $ */ - - #include "php_apache_http.h" - #include "http_conf_globals.h" -@@ -209,12 +209,18 @@ - */ - static int sapi_apache_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) - { -- if(SG(server_context) == NULL) { /* server_context is not here anymore */ -+ request_rec *r = SG(server_context); -+ -+ if(r == NULL) { /* server_context is not here anymore */ - return SAPI_HEADER_SEND_FAILED; - } - -- ((request_rec *) SG(server_context))->status = SG(sapi_headers).http_response_code; -- send_http_header((request_rec *) SG(server_context)); -+ r->status = SG(sapi_headers).http_response_code; -+ if(r->status==304) { -+ send_error_response(r,0); -+ } else { -+ send_http_header(r); -+ } - return SAPI_HEADER_SENT_SUCCESSFULLY; - } - /* }}} */ diff --git a/dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch b/dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch deleted file mode 100644 index 8817cab28ff0..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch +++ /dev/null @@ -1,143 +0,0 @@ ---- ext/curl/curl.c 2005-03-14 10:03:09.000000000 +0100 -+++ ext/curl/curl.c 2005-12-03 02:34:31.000000000 +0100 -@@ -16,7 +16,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: curl.c,v 1.124.2.29 2005/03/14 09:03:09 sniper Exp $ */ -+/* $Id: curl.c,v 1.124.2.30.2.3 2005/10/17 02:42:51 iliaa Exp $ */ - - #ifdef HAVE_CONFIG_H - #include "config.h" -@@ -66,8 +66,8 @@ - #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); - - #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ -- if (PG(open_basedir) && *PG(open_basedir) && \ -- strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \ -+ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \ -+ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \ - { \ - php_url *tmp_url; \ - \ -@@ -76,7 +76,7 @@ - RETURN_FALSE; \ - } \ - \ -- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ -+ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ - (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \ - ) { \ - php_url_free(tmp_url); \ -@@ -436,10 +436,12 @@ - zend_list_addref(ch->id); - ZVAL_STRINGL(argv[1], data, length, 1); - -+ ch->in_callback = 1; - error = call_user_function(EG(function_table), - NULL, - t->func, - retval, 2, argv TSRMLS_CC); -+ ch->in_callback = 0; - if (error == FAILURE) { - php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION", - get_active_function_name(TSRMLS_C)); -@@ -495,10 +497,12 @@ - zend_list_addref(t->fd); - ZVAL_LONG(argv[2], (int) size * nmemb); - -+ ch->in_callback = 1; - error = call_user_function(EG(function_table), - NULL, - t->func, - retval, 3, argv TSRMLS_CC); -+ ch->in_callback = 0; - if (error == FAILURE) { - php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION", - get_active_function_name(TSRMLS_C)); -@@ -553,10 +557,12 @@ - zend_list_addref(ch->id); - ZVAL_STRINGL(argv[1], data, length, 1); - -+ ch->in_callback = 1; - error = call_user_function(EG(function_table), - NULL, - t->func, - retval, 2, argv TSRMLS_CC); -+ ch->in_callback = 0; - if (error == FAILURE) { - php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION", - get_active_function_name(TSRMLS_C)); -@@ -606,10 +612,12 @@ - ZVAL_STRING(argv[1], prompt, 1); - ZVAL_LONG(argv[2], buflen); - -+ ch->in_callback = 1; - error = call_user_function(EG(function_table), - NULL, - func, - retval, 2, argv TSRMLS_CC); -+ ch->in_callback = 0; - if (error == FAILURE) { - php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C)); - } else if (Z_TYPE_P(retval) == IS_STRING) { -@@ -680,7 +688,9 @@ - (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); - (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); - memset(&(*ch)->err, 0, sizeof((*ch)->err)); -- -+ -+ (*ch)->in_callback = 0; -+ - zend_llist_init(&(*ch)->to_free.str, sizeof(char *), - (void(*)(void *)) curl_free_string, 0); - zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), -@@ -982,10 +992,15 @@ - - postval = Z_STRVAL_PP(current); - if (*postval == '@') { -+ ++postval; -+ /* safe_mode / open_basedir check */ -+ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) { -+ RETURN_FALSE; -+ } - error = curl_formadd(&first, &last, - CURLFORM_COPYNAME, string_key, - CURLFORM_NAMELENGTH, (long)string_key_len - 1, -- CURLFORM_FILE, ++postval, -+ CURLFORM_FILE, postval, - CURLFORM_END); - } - else { -@@ -1337,7 +1352,11 @@ - WRONG_PARAM_COUNT; - } - ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); -- -+ -+ if (ch->in_callback) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close CURL handle from a callback"); -+ return; -+ } - zend_list_delete(Z_LVAL_PP(zid)); - } - /* }}} */ ---- ext/curl/php_curl.h 2002-12-31 17:34:15.000000000 +0100 -+++ ext/curl/php_curl.h 2005-06-02 23:05:06.000000000 +0200 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: php_curl.h,v 1.29.2.1 2002/12/31 16:34:15 sebastian Exp $ */ -+/* $Id: php_curl.h,v 1.29.2.2 2005/06/02 21:05:06 tony2001 Exp $ */ - - #ifndef _PHP_CURL_H - #define _PHP_CURL_H -@@ -93,6 +93,7 @@ - struct _php_curl_free to_free; - long id; - unsigned int uses; -+ zend_bool in_callback; - } php_curl; - - /* streams support */ diff --git a/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch b/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch deleted file mode 100644 index 672da5ece63b..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 -+++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 -@@ -16,7 +16,7 @@ - | Jim Winstead <jimw@php.net> | - +----------------------------------------------------------------------+ - */ --/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ -+/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ - - /* {{{ includes - */ -@@ -36,14 +36,6 @@ - #include <winsock.h> - #define O_RDONLY _O_RDONLY - #include "win32/param.h" --#elif defined(NETWARE) --/*#include <ws2nlm.h>*/ --/*#include <sys/socket.h>*/ --#ifdef NEW_LIBC --#include <sys/param.h> --#else --#include "netware/param.h" --#endif - #else - #include <sys/param.h> - #endif -@@ -57,8 +49,6 @@ - #if HAVE_PWD_H - #ifdef PHP_WIN32 - #include "win32/pwd.h" --#elif defined(NETWARE) --#include "netware/pwd.h" - #else - #include <pwd.h> - #endif -@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based - /* Handler for basedirs that end with a / */ - resolved_basedir_len = strlen(resolved_basedir); - if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { -- if (resolved_basedir[resolved_basedir_len - 1] == '/') { -- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; -+ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { -+ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; - resolved_basedir[++resolved_basedir_len] = '\0'; - } - } diff --git a/dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch b/dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch deleted file mode 100644 index 15f2f95266e6..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch +++ /dev/null @@ -1,131 +0,0 @@ ---- ext/gd/gd.c 2005-01-17 18:07:57.000000000 +0100 -+++ ext/gd/gd.c 2005-12-03 02:34:41.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */ -+/* $Id: gd.c,v 1.221.2.56.2.3 2005/11/03 20:20:04 sniper Exp $ */ - - /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, - Cold Spring Harbor Labs. */ -@@ -623,7 +623,7 @@ - - convert_to_string_ex(file); - -- stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL); -+ stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL); - if (stream == NULL) { - RETURN_FALSE; - } -@@ -807,6 +807,10 @@ - convert_to_boolean_ex(dither); - convert_to_long_ex(ncolors); - -+ if (Z_LVAL_PP(ncolors) <= 0) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero"); -+ RETURN_FALSE; -+ } - gdImageTrueColorToPalette(im, Z_LVAL_PP(dither), Z_LVAL_PP(ncolors)); - - RETURN_TRUE; -@@ -1436,7 +1440,7 @@ - - fn = Z_STRVAL_PP(file); - -- stream = php_stream_open_wrapper(fn, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL); -+ stream = php_stream_open_wrapper(fn, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL); - if (stream == NULL) { - RETURN_FALSE; - } -@@ -1644,10 +1648,7 @@ - } - - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { -- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); - - fp = VCWD_FOPEN(fn, "wb"); - if (!fp) { -@@ -1699,7 +1700,7 @@ - char buf[4096]; - char *path; - -- tmp = php_open_temporary_file("", "", &path TSRMLS_CC); -+ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC); - if (tmp == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); - RETURN_FALSE; -@@ -3017,7 +3018,8 @@ - { - zval *IM, *EXT = NULL; - gdImagePtr im=NULL; -- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; -+ long col = -1, x = -1, y = -1; -+ int str_len, fontname_len, i, brect[8]; - double ptsize, angle; - unsigned char *str = NULL, *fontname = NULL; - char *error = NULL; -@@ -3741,16 +3743,10 @@ - } - - /* Check origin file */ -- if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn_org, "Invalid origin filename"); - - /* Check destination file */ -- if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn_dest, "Invalid destination filename"); - - /* Open origin file */ - org = VCWD_FOPEN(fn_org, "rb"); ---- ext/gd/gd_ctx.c 2004-01-28 17:27:42.000000000 +0100 -+++ ext/gd/gd_ctx.c 2005-12-03 02:34:41.000000000 +0100 -@@ -73,10 +73,7 @@ - } - - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { -- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); - - fp = VCWD_FOPEN(fn, "wb"); - if (!fp) { ---- ext/gd/php_gd.h 2003-03-31 10:49:30.000000000 +0200 -+++ ext/gd/php_gd.h 2005-12-03 02:34:41.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: php_gd.h,v 1.44.2.5 2003/03/31 08:49:30 sniper Exp $ */ -+/* $Id: php_gd.h,v 1.44.2.5.8.2 2005/11/15 08:15:36 sniper Exp $ */ - - #ifndef PHP_GD_H - #define PHP_GD_H -@@ -30,6 +30,15 @@ - - #if HAVE_LIBGD - -+/* open_basedir and safe_mode checks */ -+#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \ -+ if (!filename || filename == empty_string || php_check_open_basedir(filename TSRMLS_CC) || \ -+ (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \ -+ ) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \ -+ RETURN_FALSE; \ -+ } -+ - #define PHP_GDIMG_TYPE_GIF 1 - #define PHP_GDIMG_TYPE_PNG 2 - #define PHP_GDIMG_TYPE_JPG 3 diff --git a/dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch b/dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch deleted file mode 100644 index fea8c7a1ec50..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch +++ /dev/null @@ -1,548 +0,0 @@ ---- ext/standard/array.c 2004-12-23 17:40:03.000000000 +0100 -+++ ext/standard/array.c 2005-10-31 23:26:23.000000000 +0100 -@@ -22,7 +22,7 @@ - */ - - --/* $Id: array.c,v 1.199.2.42 2004/12/23 16:40:03 tony2001 Exp $ */ -+/* $Id: array.c,v 1.199.2.44.2.9 2005/10/03 14:05:07 iliaa Exp $ */ - - #include "php.h" - #include "php_ini.h" -@@ -631,7 +640,7 @@ - s = *((Bucket **) b); - - if (f->nKeyLength) { -- Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength); -+ Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength-1); - Z_STRLEN(key1) = f->nKeyLength-1; - Z_TYPE(key1) = IS_STRING; - } else { -@@ -639,7 +648,7 @@ - Z_TYPE(key1) = IS_LONG; - } - if (s->nKeyLength) { -- Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength); -+ Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength-1); - Z_STRLEN(key2) = s->nKeyLength-1; - Z_TYPE(key2) = IS_STRING; - } else { -@@ -1243,6 +1252,10 @@ - /* break omitted intentionally */ - - case EXTR_OVERWRITE: -+ /* GLOBALS protection */ -+ if (var_exists && !strcmp(var_name, "GLOBALS")) { -+ break; -+ } - smart_str_appendl(&final_name, var_name, var_name_len); - break; - -@@ -1291,14 +1304,18 @@ - zval **orig_var; - - if (zend_hash_find(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) &orig_var) == SUCCESS) { -- zval_ptr_dtor(orig_var); -- - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - zval_add_ref(entry); - -+ zval_ptr_dtor(orig_var); -+ - *orig_var = *entry; - } else { -- (*entry)->is_ref = 1; -+ if ((*var_array)->refcount > 1) { -+ SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); -+ } else { -+ (*entry)->is_ref = 1; -+ } - zval_add_ref(entry); - zend_hash_update(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) entry, sizeof(zval *), NULL); - } -@@ -1818,8 +1835,8 @@ - hashtable and replace it with new one */ - new_hash = php_splice(Z_ARRVAL_P(stack), 0, 0, &args[1], argc-1, NULL); - zend_hash_destroy(Z_ARRVAL_P(stack)); -- efree(Z_ARRVAL_P(stack)); -- Z_ARRVAL_P(stack) = new_hash; -+ *Z_ARRVAL_P(stack) = *new_hash; -+ FREE_HASHTABLE(new_hash); - - /* Clean up and return the number of elements in the stack */ - efree(args); -@@ -1896,8 +1913,8 @@ - - /* Replace input array's hashtable with the new one */ - zend_hash_destroy(Z_ARRVAL_P(array)); -- efree(Z_ARRVAL_P(array)); -- Z_ARRVAL_P(array) = new_hash; -+ *Z_ARRVAL_P(array) = *new_hash; -+ FREE_HASHTABLE(new_hash); - - /* Clean up */ - if (argc == 4) -@@ -2384,8 +2401,8 @@ - - /* Copy the result hash into return value */ - zend_hash_destroy(Z_ARRVAL_P(return_value)); -- efree(Z_ARRVAL_P(return_value)); -- Z_ARRVAL_P(return_value) = new_hash; -+ *Z_ARRVAL_P(return_value) = *new_hash; -+ FREE_HASHTABLE(new_hash); - - /* Clean up */ - efree(pads); -@@ -2483,7 +2500,7 @@ - zend_hash_index_update(Z_ARRVAL_P(return_value), num_key, entry, sizeof(entry), NULL); - break; - case HASH_KEY_IS_STRING: -- new_key=estrndup(string_key,str_key_len); -+ new_key=estrndup(string_key,str_key_len - 1); - if (change_to_upper) - php_strtoupper(new_key, str_key_len - 1); - else -@@ -2609,6 +2626,15 @@ - /* copy the argument array */ - *return_value = **args[0]; - zval_copy_ctor(return_value); -+ if (return_value->value.ht == &EG(symbol_table)) { -+ HashTable *ht; -+ zval *tmp; -+ -+ ALLOC_HASHTABLE(ht); -+ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0); -+ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); -+ return_value->value.ht = ht; -+ } - - /* go through the lists and look for common values */ - while (*ptrs[0]) { -@@ -2759,6 +2785,15 @@ - /* copy the argument array */ - *return_value = **args[0]; - zval_copy_ctor(return_value); -+ if (return_value->value.ht == &EG(symbol_table)) { -+ HashTable *ht; -+ zval *tmp; -+ -+ ALLOC_HASHTABLE(ht); -+ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0); -+ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); -+ return_value->value.ht = ht; -+ } - - /* go through the lists and look for values of ptr[0] - that are not in the others */ -@@ -3229,8 +3264,11 @@ - efree(callback_name); - - if (ZEND_NUM_ARGS() > 2) { -- convert_to_long_ex(initial); -- result = *initial; -+ ALLOC_ZVAL(result); -+ *result = **initial; -+ zval_copy_ctor(result); -+ convert_to_long(result); -+ INIT_PZVAL(result); - } else { - MAKE_STD_ZVAL(result); - ZVAL_NULL(result); -@@ -3246,6 +3284,7 @@ - if (result) { - *return_value = *result; - zval_copy_ctor(return_value); -+ zval_ptr_dtor(&result); - } - return; - } -@@ -3282,6 +3321,7 @@ - PHP_FUNCTION(array_filter) - { - zval **input, **callback = NULL; -+ zval *array, *func = NULL; - zval **operand; - zval **args[1]; - zval *retval = NULL; -@@ -3300,9 +3340,13 @@ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array"); - return; - } -+ if (callback) { -+ func = *callback; -+ } -+ array = *input; - - if (ZEND_NUM_ARGS() > 1) { -- if (!zend_is_callable(*callback, 0, &callback_name)) { -+ if (!zend_is_callable(func, 0, &callback_name)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument, '%s', should be a valid callback", callback_name); - efree(callback_name); - return; -@@ -3311,16 +3355,16 @@ - } - - array_init(return_value); -- if (zend_hash_num_elements(Z_ARRVAL_PP(input)) == 0) -+ if (zend_hash_num_elements(Z_ARRVAL_P(array)) == 0) - return; - -- for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos); -- zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&operand, &pos) == SUCCESS; -- zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &pos)) { -+ for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), &pos); -+ zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **)&operand, &pos) == SUCCESS; -+ zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) { - -- if (callback) { -+ if (func) { - args[0] = operand; -- if (call_user_function_ex(EG(function_table), NULL, *callback, &retval, 1, args, 0, NULL TSRMLS_CC) == SUCCESS && retval) { -+ if (call_user_function_ex(EG(function_table), NULL, func, &retval, 1, args, 0, NULL TSRMLS_CC) == SUCCESS && retval) { - if (!zend_is_true(retval)) { - zval_ptr_dtor(&retval); - continue; -@@ -3334,7 +3378,7 @@ - continue; - - zval_add_ref(operand); -- switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &pos)) { -+ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(array), &string_key, &string_key_len, &num_key, 0, &pos)) { - case HASH_KEY_IS_STRING: - zend_hash_update(Z_ARRVAL_P(return_value), string_key, - string_key_len, operand, sizeof(zval *), NULL); -@@ -3401,6 +3445,7 @@ - efree(array_pos); - return; - } -+ SEPARATE_ZVAL_IF_NOT_REF(pargs[i]); - args[i] = *pargs[i]; - array_len[i] = zend_hash_num_elements(Z_ARRVAL_PP(pargs[i])); - if (array_len[i] > maxlen) { ---- ext/standard/basic_functions.c 2005-01-18 12:01:20.000000000 +0100 -+++ ext/standard/basic_functions.c 2005-10-31 23:29:26.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: basic_functions.c,v 1.543.2.47 2005/01/18 11:01:20 sniper Exp $ */ -+/* $Id: basic_functions.c,v 1.543.2.51.2.3 2005/09/29 16:31:48 iliaa Exp $ */ - - #include "php.h" - #include "php_streams.h" -@@ -42,18 +42,7 @@ - #include <time.h> - #include <stdio.h> - --#ifndef NETWARE - #include <netdb.h> --#else --/*#include "netware/env.h"*/ /* Temporary */ --#ifdef NEW_LIBC /* Same headers hold good for Winsock and Berkeley sockets */ --#include <netinet/in.h> --/*#include <arpa/inet.h>*/ --#include <netdb.h> --#else --#include <sys/socket.h> --#endif --#endif - - #if HAVE_ARPA_INET_H - # include <arpa/inet.h> -@@ -944,6 +933,13 @@ - static void php_putenv_destructor(putenv_entry *pe) - { - if (pe->previous_value) { -+#if _MSC_VER -+ /* VS.Net has a bug in putenv() when setting a variable that -+ * is already set; if the SetEnvironmentVariable() API call -+ * fails, the Crt will double free() a string. -+ * We try to avoid this by setting our own value first */ -+ SetEnvironmentVariable(pe->key, "bugbug"); -+#endif - putenv(pe->previous_value); - } else { - # if HAVE_UNSETENV -@@ -1232,11 +1228,10 @@ - } - STR_FREE(BG(locale_string)); - -- if (FG(stream_wrappers)) { -- zend_hash_destroy(FG(stream_wrappers)); -- efree(FG(stream_wrappers)); -- FG(stream_wrappers) = NULL; -- } -+ /* -+ FG(stream_wrappers) are destroyed -+ during php_request_shutdown() -+ */ - - PHP_RSHUTDOWN(fsock) (SHUTDOWN_FUNC_ARGS_PASSTHRU); - PHP_RSHUTDOWN(filestat) (SHUTDOWN_FUNC_ARGS_PASSTHRU); -@@ -1430,6 +1425,14 @@ - } - } - -+#if _MSC_VER -+ /* VS.Net has a bug in putenv() when setting a variable that -+ * is already set; if the SetEnvironmentVariable() API call -+ * fails, the Crt will double free() a string. -+ * We try to avoid this by setting our own value first */ -+ SetEnvironmentVariable(pe.key, "bugbug"); -+#endif -+ - if (putenv(pe.putenv_string) == 0) { /* success */ - zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len+1, (void **) &pe, sizeof(putenv_entry), NULL); - #ifdef HAVE_TZSET -@@ -2089,17 +2092,21 @@ - static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) - { - zval retval; -+ char *function_name = NULL; - -- if (call_user_function( EG(function_table), NULL, -- shutdown_function_entry->arguments[0], -- &retval, -- shutdown_function_entry->arg_count - 1, -- shutdown_function_entry->arguments + 1 -- TSRMLS_CC ) == SUCCESS ) { -+ if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name)) { -+ php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name); -+ } else if (call_user_function(EG(function_table), NULL, -+ shutdown_function_entry->arguments[0], -+ &retval, -+ shutdown_function_entry->arg_count - 1, -+ shutdown_function_entry->arguments + 1 -+ TSRMLS_CC ) == SUCCESS) -+ { - zval_dtor(&retval); -- -- } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(shutdown_function_entry->arguments[0])); -+ } -+ if (function_name) { -+ efree(function_name); - } - return 0; - } -@@ -2192,6 +2199,7 @@ - PHP_FUNCTION(register_shutdown_function) - { - php_shutdown_function_entry shutdown_function_entry; -+ char *function_name = NULL; - int i; - - shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); -@@ -2200,26 +2208,31 @@ - WRONG_PARAM_COUNT; - } - -- shutdown_function_entry.arguments = (pval **) safe_emalloc(sizeof(pval *), shutdown_function_entry.arg_count, 0); -+ shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0); - - if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) { - RETURN_FALSE; - } - -- /* Prevent entering of anything but arrays/strings */ -- if (Z_TYPE_P(shutdown_function_entry.arguments[0]) != IS_ARRAY) { -- convert_to_string(shutdown_function_entry.arguments[0]); -- } -- -- if (!BG(user_shutdown_function_names)) { -- ALLOC_HASHTABLE(BG(user_shutdown_function_names)); -- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); -- } -+ /* Prevent entering of anything but valid callback (syntax check only!) */ -+ if (!zend_is_callable(shutdown_function_entry.arguments[0], 1, &function_name)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name); -+ efree(shutdown_function_entry.arguments); -+ RETVAL_FALSE; -+ } else { -+ if (!BG(user_shutdown_function_names)) { -+ ALLOC_HASHTABLE(BG(user_shutdown_function_names)); -+ zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); -+ } - -- for (i = 0; i < shutdown_function_entry.arg_count; i++) { -- shutdown_function_entry.arguments[i]->refcount++; -+ for (i = 0; i < shutdown_function_entry.arg_count; i++) { -+ shutdown_function_entry.arguments[i]->refcount++; -+ } -+ zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); -+ } -+ if (function_name) { -+ efree(function_name); - } -- zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); - } - /* }}} */ - -@@ -3014,11 +3027,25 @@ - prefix = va_arg(args, char *); - prefix_len = va_arg(args, uint); - -- new_key_len = prefix_len + hash_key->nKeyLength; -- new_key = (char *) emalloc(new_key_len); -+ if (!prefix_len) { -+ if (!hash_key->nKeyLength) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard."); -+ return 0; -+ } else if (!strcmp(hash_key->arKey, "GLOBALS")) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite."); -+ return 0; -+ } -+ } -+ -+ if (hash_key->nKeyLength) { -+ new_key_len = prefix_len + hash_key->nKeyLength; -+ new_key = (char *) emalloc(new_key_len); - -- memcpy(new_key, prefix, prefix_len); -- memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength); -+ memcpy(new_key, prefix, prefix_len); -+ memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength); -+ } else { -+ new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h); -+ } - - zend_hash_del(&EG(symbol_table), new_key, new_key_len); - ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0); ---- ext/standard/string.c 2005-01-20 18:57:41.000000000 +0100 -+++ ext/standard/string.c 2005-10-31 23:34:37.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: string.c,v 1.333.2.48 2005/01/20 17:57:41 iliaa Exp $ */ -+/* $Id: string.c,v 1.333.2.52.2.1 2005/09/28 22:34:04 iliaa Exp $ */ - - /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ - -@@ -1317,8 +1317,6 @@ - if (!Z_STRLEN_PP(needle)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); - efree(haystack_orig); -- zval_ptr_dtor(haystack); -- zval_ptr_dtor(needle); - RETURN_FALSE; - } - -@@ -1339,8 +1337,6 @@ - RETVAL_FALSE; - } - -- zval_ptr_dtor(haystack); -- zval_ptr_dtor(needle); - efree(haystack_orig); - } - /* }}} */ -@@ -1576,7 +1572,13 @@ - } - - if (chunklen > Z_STRLEN_PP(p_str)) { -- RETURN_STRINGL(Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str), 1); -+ /* to maintain BC, we must return original string + ending */ -+ result_len = endlen + Z_STRLEN_PP(p_str); -+ result = emalloc(result_len + 1); -+ memcpy(result, Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str)); -+ memcpy(result + Z_STRLEN_PP(p_str), end, endlen); -+ result[result_len] = '\0'; -+ RETURN_STRINGL(result, result_len, 0); - } - - if (!Z_STRLEN_PP(p_str)) { -@@ -3169,7 +3179,6 @@ - zval *sarg; - char *res = NULL; - int argCount; -- int old_rg; - - argCount = ARG_COUNT(ht); - if (argCount < 1 || argCount > 2 || zend_get_parameters_ex(argCount, &arg, &arrayArg) == FAILURE) { -@@ -3182,19 +3191,18 @@ - res = estrndup(Z_STRVAL_P(sarg), Z_STRLEN_P(sarg)); - } - -- old_rg = PG(register_globals); - if (argCount == 1) { -- PG(register_globals) = 1; -- sapi_module.treat_data(PARSE_STRING, res, NULL TSRMLS_CC); -+ zval tmp; -+ Z_ARRVAL(tmp) = EG(active_symbol_table); -+ -+ sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC); - } else { -- PG(register_globals) = 0; - /* Clear out the array that was passed in. */ - zval_dtor(*arrayArg); - array_init(*arrayArg); - - sapi_module.treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC); - } -- PG(register_globals) = old_rg; - } - /* }}} */ - ---- main/php_variables.c 2004-10-18 17:08:46.000000000 +0200 -+++ main/php_variables.c 2005-10-31 23:39:38.000000000 +0100 -@@ -16,7 +16,7 @@ - | Zeev Suraski <zeev@zend.com> | - +----------------------------------------------------------------------+ - */ --/* $Id: php_variables.c,v 1.45.2.8 2004/10/18 15:08:46 tony2001 Exp $ */ -+/* $Id: php_variables.c,v 1.45.2.13.2.4 2005/10/02 11:33:27 rrichards Exp $ */ - - #include <stdio.h> - #include "php.h" -@@ -73,6 +73,10 @@ - symtable1 = Z_ARRVAL_P(track_vars_array); - } else if (PG(register_globals)) { - symtable1 = EG(active_symbol_table); -+ /* GLOBALS hijack attempt, reject parameter */ -+ if (!strncmp("GLOBALS", var, sizeof("GLOBALS")) || !strncmp("GLOBALS", var, sizeof("GLOBALS[")-1)) { -+ return; -+ } - } - if (!symtable1) { - /* Nothing to do */ -@@ -99,6 +103,13 @@ - zval_dtor(val); - return; - } -+ -+ /* GLOBALS hijack attempt, reject parameter */ -+ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) { -+ zval_dtor(val); -+ return; -+ } -+ - /* ensure that we don't have spaces or dots in the variable name (not binary safe) */ - for (p=var; *p; p++) { - switch(*p) { -@@ -182,11 +193,25 @@ - if (!index) { - zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); - } else { -+ zval **tmp; -+ - if (PG(magic_quotes_gpc) && (index!=var)) { - char *escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC); -+ -+ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && -+ zend_hash_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) { -+ efree(escaped_index); -+ break; -+ } -+ - zend_hash_update(symtable1, escaped_index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); - efree(escaped_index); - } else { -+ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && -+ zend_hash_find(symtable1, index, index_len+1, (void **) &tmp) != FAILURE) { -+ break; -+ } -+ - zend_hash_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); - } - } diff --git a/dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch b/dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch deleted file mode 100644 index 1eb4c987232e..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch +++ /dev/null @@ -1,151 +0,0 @@ ---- ext/mbstring/mbstring.c 2005-02-21 09:03:47.000000000 +0100 -+++ ext/mbstring/mbstring.c 2005-12-03 02:34:47.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: mbstring.c,v 1.142.2.47 2005/02/21 08:03:47 moriyoshi Exp $ */ -+/* $Id: mbstring.c,v 1.142.2.47.2.5 2005/11/21 23:21:19 hirokawa Exp $ */ - - /* - * PHP4 Multibyte String module "mbstring" -@@ -55,6 +55,7 @@ - #include "mbstring.h" - #include "ext/standard/php_string.h" - #include "ext/standard/php_mail.h" -+#include "ext/standard/exec.h" - #include "ext/standard/url.h" - #include "main/php_output.h" - #include "ext/standard/info.h" -@@ -2923,16 +2924,17 @@ - } - /* }}} */ - --/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]]) -+/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]]) - Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */ - PHP_FUNCTION(mb_encode_mimeheader) - { -- pval **argv[4]; -+ pval **argv[5]; - enum mbfl_no_encoding charset, transenc; - mbfl_string string, result, *ret; - char *p, *linefeed; -+ int indent; - -- if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 4 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) { -+ if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 5 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) { - WRONG_PARAM_COUNT; - } - -@@ -2969,6 +2971,12 @@ - linefeed = Z_STRVAL_PP(argv[3]); - } - -+ indent = 0; -+ if (ZEND_NUM_ARGS() >= 5) { -+ convert_to_long_ex(argv[4]); -+ indent = Z_LVAL_PP(argv[4]); -+ } -+ - convert_to_string_ex(argv[0]); - mbfl_string_init(&string); - mbfl_string_init(&result); -@@ -2976,7 +2984,7 @@ - string.no_encoding = MBSTRG(current_internal_encoding); - string.val = Z_STRVAL_PP(argv[0]); - string.len = Z_STRLEN_PP(argv[0]); -- ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, 0); -+ ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent); - if (ret != NULL) { - RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */ - } else { -@@ -3459,6 +3467,22 @@ - * Sends an email message with MIME scheme - */ - #if HAVE_SENDMAIL -+#define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \ -+ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \ -+ pos += 3; \ -+ while (str[pos] == ' ' || str[pos] == '\t') { \ -+ pos++; \ -+ } \ -+ continue; \ -+ } \ -+ else if (str[pos] == '\n' && (str[pos + 1] == ' ' || str[pos + 1] == '\t')) { \ -+ pos += 2; \ -+ while (str[pos] == ' ' || str[pos] == '\t') { \ -+ pos++; \ -+ } \ -+ continue; \ -+ } \ -+ - PHP_FUNCTION(mb_send_mail) - { - int argc, n; -@@ -3474,6 +3498,8 @@ - mbfl_memory_device device; /* automatic allocateable buffer for additional header */ - const mbfl_language *lang; - int err = 0; -+ char *to_r; -+ int to_len, i; - - /* initialize */ - mbfl_memory_device_init(&device, 0, 0); -@@ -3500,6 +3526,32 @@ - convert_to_string_ex(argv[0]); - if (Z_STRVAL_PP(argv[0])) { - to = Z_STRVAL_PP(argv[0]); -+ to_len = Z_STRLEN_PP(argv[0]); -+ if (to_len > 0) { -+ to_r = estrndup(to, to_len); -+ for (; to_len; to_len--) { -+ if (!isspace((unsigned char) to_r[to_len - 1])) { -+ break; -+ } -+ to_r[to_len - 1] = '\0'; -+ } -+ for (i = 0; to_r[i]; i++) { -+ if (iscntrl((unsigned char) to_r[i])) { -+ /* According to RFC 822, section 3.1.1 long headers may be -+separated into -+ * parts using CRLF followed at least one linear-white-space -+character ('\t' or ' '). -+ * To prevent these separators from being replaced with a space, -+we use the -+ * SKIP_LONG_HEADER_SEP_MBSTRING to skip over them. -+ */ -+ SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i); -+ to_r[i] = ' '; -+ } -+ } -+ } else { -+ to_r = to; -+ } - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field"); - err = 1; -@@ -3594,12 +3646,22 @@ - extra_cmd = Z_STRVAL_PP(argv[4]); - } - -- if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) { -+ if (extra_cmd) { -+ extra_cmd = php_escape_shell_cmd(extra_cmd); -+ } -+ -+ if (!err && php_mail(to_r, subject, message, headers, extra_cmd TSRMLS_CC)) { - RETVAL_TRUE; - } else { - RETVAL_FALSE; - } - -+ if (to_r != to) { -+ efree(to_r); -+ } -+ if (extra_cmd) { -+ efree(extra_cmd); -+ } - if (subject_buf) { - efree((void *)subject_buf); - } diff --git a/dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch b/dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch deleted file mode 100644 index 6d994cf8f899..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch +++ /dev/null @@ -1,1488 +0,0 @@ -diff -Nru php-4.3.11.orig/acinclude.m4 php-4.3.11/acinclude.m4 ---- php-4.3.11.orig/acinclude.m4 2005-01-25 14:03:06.000000000 +0100 -+++ php-4.3.11/acinclude.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -194,7 +194,7 @@ - unset ac_new_flags - for i in [$]$1; do - case [$]i in -- -L/usr/lib|-L/usr/lib/[)] ;; -+ -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/[)] ;; - *[)] ac_new_flags="[$]ac_new_flags [$]i" ;; - esac - done -@@ -645,7 +645,7 @@ - ]) - - AC_DEFUN([PHP_PROG_SENDMAIL],[ --PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib -+PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64 - AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) - if test -n "$PROG_SENDMAIL"; then - AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) -@@ -856,7 +856,9 @@ - dnl add a library to linkpath/runpath - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/lib"; then -+ case x$1 in -+ x/usr/lib|x/usr/lib64) ;; -+ *) - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -866,8 +868,8 @@ - else - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl -@@ -1651,15 +1653,20 @@ - fi - - for i in $PHP_KERBEROS; do -- if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then -+ if test -f $i/lib/libkrb5.a -o -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then - PHP_KERBEROS_DIR=$i -+ PHP_KERBEROS_LIBDIR=$i/lib -+ break -+ elif test -f $i/lib64/libkrb5.a -o -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then -+ PHP_KERBEROS_DIR=$i -+ PHP_KERBEROS_LIBDIR=$i/lib64 - break - fi - done - - if test "$PHP_KERBEROS_DIR"; then - found_kerberos=yes -- PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1) -+ PHP_ADD_LIBPATH($PHP_KERBEROS_LIBDIR, $1) - PHP_ADD_LIBRARY(gssapi_krb5, 1, $1) - PHP_ADD_LIBRARY(krb5, 1, $1) - PHP_ADD_LIBRARY(k5crypto, 1, $1) -@@ -1727,6 +1734,9 @@ - if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib - fi -+ if test -r $i/lib64/libssl.a -o -r $i/lib64/libssl.$SHLIB_SUFFIX_NAME; then -+ OPENSSL_LIBDIR=$i/lib64 -+ fi - test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break - done - -@@ -1847,7 +1857,9 @@ - fi - - if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a || -- test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME -+ test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || -+ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.a || -+ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME - then - PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ - found_iconv=yes -diff -Nru php-4.3.11.orig/ext/bz2/config.m4 php-4.3.11/ext/bz2/config.m4 ---- php-4.3.11.orig/ext/bz2/config.m4 2004-01-21 06:04:50.000000000 +0100 -+++ php-4.3.11/ext/bz2/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -19,6 +19,12 @@ - done - fi - -+ for j in lib64 lib; do -+ if test -d $BZIP_DIR/$j; then -+ BZIP_LIBDIR=$BZIP_DIR/$j -+ fi -+ done -+ - if test -z "$BZIP_DIR"; then - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Please reinstall the BZip2 distribution) -@@ -27,12 +33,12 @@ - PHP_CHECK_LIBRARY(bz2, BZ2_bzerror, - [ - PHP_ADD_INCLUDE($BZIP_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_LIBDIR, BZ2_SHARED_LIBADD) - AC_DEFINE(HAVE_BZ2,1,[ ]) - ], [ - AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0) - ], [ -- -L$BZIP_DIR/lib -+ -L$BZIP_LIBDIR - ]) - - PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared) -diff -Nru php-4.3.11.orig/ext/curl/config.m4 php-4.3.11/ext/curl/config.m4 ---- php-4.3.11.orig/ext/curl/config.m4 2005-02-09 17:23:49.000000000 +0100 -+++ php-4.3.11/ext/curl/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -23,6 +23,12 @@ - done - fi - -+ for j in lib64 lib; do -+ if test -d $CURL_DIR/$j; then -+ CURL_LIBDIR=$CURL_DIR/$j -+ fi -+ done -+ - if test -z "$CURL_DIR"; then - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Please reinstall the libcurl distribution - -@@ -51,7 +57,7 @@ - - PHP_ADD_INCLUDE($CURL_DIR/include) - PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_LIBDIR, CURL_SHARED_LIBADD) - - PHP_CHECK_LIBRARY(curl,curl_easy_perform, - [ -@@ -59,14 +65,14 @@ - ],[ - AC_MSG_ERROR(There is something wrong. Please check config.log for more information.) - ],[ -- $CURL_LIBS -L$CURL_DIR/lib -+ $CURL_LIBS -L$CURL_LIBDIR - ]) - - PHP_CHECK_LIBRARY(curl,curl_version_info, - [ - AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ]) - ],[],[ -- $CURL_LIBS -L$CURL_DIR/lib -+ $CURL_LIBS -L$CURL_LIBDIR - ]) - - dnl if test "$PHP_CURLWRAPPERS" != "no" ; then -diff -Nru php-4.3.11.orig/ext/dba/config.m4 php-4.3.11/ext/dba/config.m4 ---- php-4.3.11.orig/ext/dba/config.m4 2005-01-22 02:37:12.000000000 +0100 -+++ php-4.3.11/ext/dba/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -80,12 +80,18 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - PHP_CHECK_LIBRARY(gdbm, gdbm_open, [ - AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_GDBM, 1, [ ]) - THIS_LIBS=gdbm -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - fi - - PHP_DBA_STD_ASSIGN -@@ -110,14 +116,20 @@ - break - fi - done -- -+ -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in ndbm db1 c; do - PHP_CHECK_LIBRARY($LIB, dbm_open, [ - AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_NDBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -135,25 +147,28 @@ - dnl parameters(version, library list, function) - AC_DEFUN([PHP_DBA_DB_CHECK],[ - for LIB in $2; do -- if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then -- PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[ -- AC_TRY_LINK([ -+ for LIBDIR in lib64 lib; do -+ if test -f $THIS_PREFIX/$LIBDIR/lib$LIB.a -o -f $THIS_PREFIX/$LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then -+ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$LIBDIR, -l$LIB,[ -+ AC_TRY_LINK([ - #include "$THIS_INCLUDE" -- ],[ -- $3; -- ],[ -- AC_EGREP_CPP(yes,[ -+ ],[ -+ $3; -+ ],[ -+ AC_EGREP_CPP(yes,[ - #include "$THIS_INCLUDE" - #if DB_VERSION_MAJOR == $1 -- yes -+ yes - #endif -- ],[ -- THIS_LIBS=$LIB -- break -+ ],[ -+ THIS_LIBS=$LIB -+ break -+ ]) - ]) - ]) -- ]) -- fi -+ fi -+ done -+ test -n "$THIS_LIBS" && break - done - if test -z "$THIS_LIBS"; then - AC_MSG_CHECKING(for db$1 major version) -@@ -314,6 +329,12 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in dbm c gdbm; do - PHP_CHECK_LIBRARY($LIB, dbminit, [ -@@ -328,7 +349,7 @@ - fi - AC_DEFINE(DBA_DBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -364,13 +385,19 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in cdb c; do - PHP_CHECK_LIBRARY($LIB, cdb_read, [ - AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_CDB, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -diff -Nru php-4.3.11.orig/ext/domxml/config.m4 php-4.3.11/ext/domxml/config.m4 ---- php-4.3.11.orig/ext/domxml/config.m4 2004-12-30 08:02:17.000000000 +0100 -+++ php-4.3.11/ext/domxml/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -48,13 +48,15 @@ - AC_MSG_ERROR(Please reinstall the libxml >= 2.4.14 distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $DOMXML_DIR/$j; then -+ DOMXML_LIBDIR=$DOMXML_DIR/$j -+ fi -+ done -+ - PHP_DOM_CHECK_VERSION - -- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then -- DOM_LIBNAME=xml2 -- else -- DOM_LIBNAME=xml -- fi -+ DOM_LIBNAME=xml2 - - XML2_CONFIG=$DOMXML_DIR/bin/xml2-config - -@@ -62,7 +64,7 @@ - DOM_LIBS=`$XML2_CONFIG --libs` - PHP_EVAL_LIBLINE($DOM_LIBS, DOMXML_SHARED_LIBADD) - else -- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD) - fi - - PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD) -@@ -70,7 +72,13 @@ - if test "$PHP_ZLIB_DIR" = "no"; then - AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>) - else -- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, DOMXML_SHARED_LIBADD) -+ for j in lib64 lib; do -+ if test -d $PHP_ZLIB_DIR/$j; then -+ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j -+ fi -+ done -+ -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIBDIR, DOMXML_SHARED_LIBADD) - fi - - AC_DEFINE(HAVE_DOMXML,1,[ ]) -@@ -135,27 +143,35 @@ - AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $DOMXSLT_DIR/$j; then -+ DOMXSLT_LIBDIR=$DOMXSLT_DIR/$j -+ fi -+ done -+ - PHP_DOM_XSLT_CHECK_VERSION - -- PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_DIR/lib, DOMXML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_LIBDIR, DOMXML_SHARED_LIBADD) - - PHP_ADD_INCLUDE($DOMXSLT_DIR/include) - - if test "$PHP_DOM" = "no"; then - AC_MSG_ERROR(DOMXSLT requires DOMXML. Use --with-dom=<DIR>) - fi -- -- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then -- DOM_LIBNAME=xml2 -- else -- DOM_LIBNAME=xml -- fi - -- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD) -+ for j in lib64 lib; do -+ if test -d $DOMXML_DIR/$j; then -+ DOMXML_LIBDIR=$DOMXML_DIR/$j -+ fi -+ done -+ -+ DOM_LIBNAME=xml2 -+ -+ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD) - PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD) - -- if test -f $DOMXML_DIR/lib/libxsltbreakpoint.a -o -f $DOMXML_DIR/lib/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then -- PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD) -+ if test -f $DOMXML_LIBDIR/libxsltbreakpoint.a -o -f $DOMXML_LIBDIR/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then -+ PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD) - fi - - AC_DEFINE(HAVE_DOMXSLT,1,[ ]) -@@ -185,9 +201,15 @@ - AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $DOMEXSLT_DIR/$j; then -+ DOMEXSLT_LIBDIR=$DOMEXSLT_DIR/$j -+ fi -+ done -+ - PHP_DOM_EXSLT_CHECK_VERSION - -- PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_DIR/lib, DOMXML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_LIBDIR, DOMXML_SHARED_LIBADD) - - PHP_ADD_INCLUDE($DOMEXSLT_DIR/include) - -diff -Nru php-4.3.11.orig/ext/gd/config.m4 php-4.3.11/ext/gd/config.m4 ---- php-4.3.11.orig/ext/gd/config.m4 2005-01-04 07:52:18.000000000 +0100 -+++ php-4.3.11/ext/gd/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -50,8 +50,15 @@ - AC_DEFUN([PHP_GD_JPEG],[ - if test "$PHP_JPEG_DIR" != "no"; then - -- for i in $PHP_JPEG_DIR /usr/local /usr; do -- test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_JPEG_DIR /usr/local /usr; do -+ if test -f "$i/$j/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libjpeg.a"; then -+ GD_JPEG_DIR=$i -+ GD_JPEG_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_JPEG_DIR" && break - done - - if test -z "$GD_JPEG_DIR"; then -@@ -61,11 +68,11 @@ - PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, - [ - PHP_ADD_INCLUDE($GD_JPEG_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libjpeg.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_JPEG_DIR/lib -+ -L$GD_JPEG_LIB_DIR - ]) - else - AC_MSG_RESULT([If configure fails try --with-jpeg-dir=<DIR>]) -@@ -75,8 +82,15 @@ - AC_DEFUN([PHP_GD_PNG],[ - if test "$PHP_PNG_DIR" != "no"; then - -- for i in $PHP_PNG_DIR /usr/local /usr; do -- test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_PNG_DIR /usr/local /usr; do -+ if test -f "$i/$j/libpng.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libpng.a"; then -+ GD_PNG_DIR=$i -+ GD_PNG_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_PNG_DIR" && break - done - - if test -z "$GD_PNG_DIR"; then -@@ -94,12 +108,12 @@ - PHP_CHECK_LIBRARY(png,png_write_image, - [ - PHP_ADD_INCLUDE($GD_PNG_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, GD_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIB_DIR, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.]) - ],[ -- -L$PHP_ZLIB_DIR/lib -lz -L$GD_PNG_DIR/lib -+ -L$PHP_ZLIB_LIB_DIR -lz -L$GD_PNG_LIB_DIR - ]) - - else -@@ -110,8 +124,15 @@ - AC_DEFUN([PHP_GD_XPM],[ - if test "$PHP_XPM_DIR" != "no"; then - -- for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do -- test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do -+ if test -f "$i/$j/libXpm.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libXpm.a"; then -+ GD_XPM_DIR=$i -+ GD_XPM_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_XPM_DIR" && break - done - - if test -z "$GD_XPM_DIR"; then -@@ -129,12 +150,12 @@ - PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage, - [ - PHP_ADD_INCLUDE($GD_XPM_INC) -- PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_XPM_DIR/lib -lX11 -+ -L$GD_XPM_LIB_DIR -lX11 - ]) - else - AC_MSG_RESULT(If configure fails try --with-xpm-dir=<DIR>) -@@ -145,25 +166,29 @@ - if test "$PHP_TTF" != "no"; then - if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then - if test -n "$PHP_TTF"; then -- for i in $PHP_TTF /usr/local /usr; do -- if test -f "$i/include/freetype.h"; then -- TTF_DIR=$i -- unset TTF_INC_DIR -- fi -- if test -f "$i/include/freetype/freetype.h"; then -- TTF_DIR=$i -- TTF_INC_DIR=$i/include/freetype -- fi -- if test -f "$i/include/freetype1/freetype/freetype.h"; then -- TTF_DIR=$i -- TTF_INC_DIR=$i/include/freetype1/freetype -- fi -+ for j in lib64 lib; do -+ for i in $PHP_TTF /usr/local /usr; do -+ if test -f "$i/$j/libttf.a" -o -f "$i/$j/libttf.$SHLIB_SUFFIX_NAME"; then -+ TTF_DIR=$i -+ TTF_LIB_DIR=$i/$j -+ if test -f "$i/include/freetype.h"; then -+ unset TTF_INC_DIR -+ elif test -f "$i/include/freetype/freetype.h"; then -+ TTF_INC_DIR=$i/include/freetype -+ elif test -f "$i/include/freetype1/freetype/freetype.h"; then -+ TTF_INC_DIR=$i/include/freetype1/freetype -+ else -+ unset TTF_DIR -+ fi -+ fi -+ test -n "$TTF_DIR" && break -+ done - test -n "$TTF_DIR" && break - done - fi - if test -n "$TTF_DIR" ; then - AC_DEFINE(HAVE_LIBTTF,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_LIB_DIR, GD_SHARED_LIBADD) - fi - if test -z "$TTF_INC_DIR"; then - TTF_INC_DIR=$TTF_DIR/include -@@ -178,16 +203,21 @@ - AC_DEFUN([PHP_GD_FREETYPE2],[ - if test "$PHP_FREETYPE_DIR" != "no"; then - -- for i in $PHP_FREETYPE_DIR /usr/local /usr; do -- if test -f "$i/include/freetype2/freetype/freetype.h"; then -- FREETYPE2_DIR=$i -- FREETYPE2_INC_DIR=$i/include/freetype2 -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do -+ if test -f "$i/include/freetype2/freetype/freetype.h" && \ -+ test -f "$i/$j/libfreetype.a" -o -f "$i/$j/libfreetype.$SHLIB_SUFFIX_NAME"; then -+ FREETYPE2_DIR=$i -+ FREETYPE2_LIB_DIR=$i/$j -+ FREETYPE2_INC_DIR=$i/include/freetype2 -+ break -+ fi -+ done -+ test -n "$FREETYPE2_DIR" && break - done - - if test -n "$FREETYPE2_DIR" ; then -- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_LIB_DIR, GD_SHARED_LIBADD) - PHP_ADD_INCLUDE($FREETYPE2_DIR/include) - PHP_ADD_INCLUDE($FREETYPE2_INC_DIR) - AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) -@@ -203,8 +233,16 @@ - AC_DEFUN([PHP_GD_T1LIB],[ - if test "$PHP_T1LIB" != "no"; then - -- for i in $PHP_T1LIB /usr/local /usr; do -- test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_T1LIB /usr/local /usr; do -+ if test -f "$i/include/t1lib.h" && \ -+ test -f "$i/$j/libt1.a" -o -f "$i/$j/libt1.$SHLIB_SUFFIX_NAME"; then -+ GD_T1_DIR=$i -+ GD_T1_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_T1_DIR" && break - done - - if test -z "$GD_T1_DIR"; then -@@ -215,11 +253,11 @@ - [ - AC_DEFINE(HAVE_LIBT1,1,[ ]) - PHP_ADD_INCLUDE($GD_T1_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_T1_DIR/lib -+ -L$GD_T1_LIB_DIR - ]) - fi - ]) -@@ -364,7 +402,7 @@ - done - - dnl Library path -- for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do -+ for i in lib/gd1.3 lib64/gd1.3 lib/gd lib64/gd lib lib64 gd1.3 gd ""; do - test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i" - done - -diff -Nru php-4.3.11.orig/ext/gettext/config.m4 php-4.3.11/ext/gettext/config.m4 ---- php-4.3.11.orig/ext/gettext/config.m4 2003-10-01 04:53:58.000000000 +0200 -+++ php-4.3.11/ext/gettext/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -14,11 +14,15 @@ - AC_MSG_ERROR(Cannot locate header file libintl.h) - fi - -- GETTEXT_LIBDIR=$GETTEXT_DIR/lib -+ for j in lib64 lib; do -+ if test -d $GETTEXT_DIR/$j; then -+ GETTEXT_LIBDIR=$GETTEXT_DIR/$j -+ fi -+ done -+ - GETTEXT_INCDIR=$GETTEXT_DIR/include - - O_LDFLAGS=$LDFLAGS -- LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" - AC_CHECK_LIB(intl, bindtextdomain, [ - GETTEXT_LIBS=intl - GETTEXT_CHECK_IN_LIB=intl -diff -Nru php-4.3.11.orig/ext/gmp/config.m4 php-4.3.11/ext/gmp/config.m4 ---- php-4.3.11.orig/ext/gmp/config.m4 2003-11-19 05:44:24.000000000 +0100 -+++ php-4.3.11/ext/gmp/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -14,20 +14,26 @@ - if test -z "$GMP_DIR"; then - AC_MSG_ERROR(Unable to locate gmp.h) - fi -- -+ -+ for j in lib64 lib; do -+ if test -d $GMP_DIR/$j; then -+ GMP_LIBDIR=$GMP_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size, - [],[ - PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size, - [],[ - AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.]) - ],[ -- -L$GMP_DIR/lib -+ -L$GMP_LIBDIR - ]) - ],[ -- -L$GMP_DIR/lib -+ -L$GMP_LIBDIR - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_LIBDIR, GMP_SHARED_LIBADD) - PHP_ADD_INCLUDE($GMP_DIR/include) - - PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared) -diff -Nru php-4.3.11.orig/ext/iconv/config.m4 php-4.3.11/ext/iconv/config.m4 ---- php-4.3.11.orig/ext/iconv/config.m4 2005-01-10 22:38:56.000000000 +0100 -+++ php-4.3.11/ext/iconv/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -23,8 +23,14 @@ - PHP_ICONV_PREFIX="$ICONV_DIR" - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_ICONV_PREFIX/$j; then -+ PHP_ICONV_PREFIX_LIBDIR=$PHP_ICONV_PREFIX/$j -+ fi -+ done -+ - CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" -- LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS" -+ LDFLAGS="-L$PHP_ICONV_PREFIX_LIBDIR $LDFLAGS" - - if test -r $PHP_ICONV_PREFIX/include/giconv.h; then - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" -diff -Nru php-4.3.11.orig/ext/imap/config.m4 php-4.3.11/ext/imap/config.m4 ---- php-4.3.11.orig/ext/imap/config.m4 2005-01-11 05:56:57.000000000 +0100 -+++ php-4.3.11/ext/imap/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -167,6 +167,7 @@ - for lib in c-client4 c-client imap; do - IMAP_LIB=$lib - IMAP_LIB_CHK(lib) -+ IMAP_LIB_CHK(lib64) - IMAP_LIB_CHK(c-client) - done - -diff -Nru php-4.3.11.orig/ext/interbase/config.m4 php-4.3.11/ext/interbase/config.m4 ---- php-4.3.11.orig/ext/interbase/config.m4 2003-04-25 10:59:00.000000000 +0200 -+++ php-4.3.11/ext/interbase/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -9,10 +9,18 @@ - if test "$PHP_INTERBASE" != "no"; then - if test "$PHP_INTERBASE" = "yes"; then - IBASE_INCDIR=/usr/interbase/include -- IBASE_LIBDIR=/usr/interbase/lib -+ for j in lib64 lib; do -+ if test -d /usr/interbase/$j; then -+ IBASE_LIBDIR=/usr/interbase/$j -+ fi -+ done - else - IBASE_INCDIR=$PHP_INTERBASE/include -- IBASE_LIBDIR=$PHP_INTERBASE/lib -+ for j in lib64 lib; do -+ if test -d $PHP_INTERBASE/$j; then -+ IBASE_LIBDIR=$PHP_INTERBASE/$j -+ fi -+ done - fi - - PHP_CHECK_LIBRARY(gds, isc_detach_database, -diff -Nru php-4.3.11.orig/ext/ldap/config.m4 php-4.3.11/ext/ldap/config.m4 ---- php-4.3.11.orig/ext/ldap/config.m4 2004-12-30 08:02:17.000000000 +0100 -+++ php-4.3.11/ext/ldap/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -6,7 +6,8 @@ - if test -f $1/include/ldap.h; then - LDAP_DIR=$1 - LDAP_INCDIR=$1/include -- LDAP_LIBDIR=$1/lib -+ test -f $1/lib/libldap.so && LDAP_LIBDIR=$1/lib -+ test -f $1/lib64/libldap.so && LDAP_LIBDIR=$1/lib64 - elif test -f $1/include/umich-ldap/ldap.h; then - LDAP_DIR=$1 - LDAP_INCDIR=$1/include/umich-ldap -diff -Nru php-4.3.11.orig/ext/mbstring/config.m4 php-4.3.11/ext/mbstring/config.m4 ---- php-4.3.11.orig/ext/mbstring/config.m4 2005-02-21 08:10:13.000000000 +0100 -+++ php-4.3.11/ext/mbstring/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -167,12 +167,18 @@ - PHP_ADD_INCLUDE([$PHP_LIBMBFL_INCLUDE]) - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_LIBMBFL/$j; then -+ PHP_LIBMBFL_LIBDIR=$PHP_LIBMBFL/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mbfl, mbfl_buffer_converter_new, [ -- PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL/lib, MBSTRING_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL_LIBDIR, MBSTRING_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) - ], [ -- -LPHP_LIBMBFL/lib -+ -L$PHP_LIBMBFL_LIBDIR - ]) - fi - ]) -diff -Nru php-4.3.11.orig/ext/mcal/config.m4 php-4.3.11/ext/mcal/config.m4 ---- php-4.3.11.orig/ext/mcal/config.m4 2002-03-27 11:26:16.000000000 +0100 -+++ php-4.3.11/ext/mcal/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -19,7 +19,7 @@ - fi - done - -- for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib; do -+ for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib64/mcal $MCAL_DIR/lib $MCAL_DIR/lib64; do - if test -r "$i/libmcal.a"; then - MCAL_LIBRARY=$i - fi -diff -Nru php-4.3.11.orig/ext/mcrypt/config.m4 php-4.3.11/ext/mcrypt/config.m4 ---- php-4.3.11.orig/ext/mcrypt/config.m4 2005-01-22 02:37:12.000000000 +0100 -+++ php-4.3.11/ext/mcrypt/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -14,6 +14,12 @@ - AC_MSG_ERROR(mcrypt.h not found. Please reinstall libmcrypt.) - fi - -+ for j in lib64 lib; do -+ if test -d $MCRYPT_DIR/$j; then -+ MCRYPT_LIBDIR=$MCRYPT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, - [ - PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD) -@@ -23,7 +29,7 @@ - [ - AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ]) - ],[],[ -- -L$MCRYPT_DIR/lib -lltdl -+ -L$MCRYPT_LIBDIR -lltdl - ]) - - ],[ -@@ -35,7 +41,7 @@ - [ - AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ]) - ],[],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ - PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, -@@ -44,16 +50,16 @@ - ],[ - AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.]) - ],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ -- -L$MCRYPT_DIR/lib -lltdl -+ -L$MCRYPT_LIBDIR -lltdl - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD) - PHP_ADD_INCLUDE($MCRYPT_DIR/include) - - PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared) -diff -Nru php-4.3.11.orig/ext/mcve/config.m4 php-4.3.11/ext/mcve/config.m4 ---- php-4.3.11.orig/ext/mcve/config.m4 2004-12-08 07:48:11.000000000 +0100 -+++ php-4.3.11/ext/mcve/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -67,8 +67,14 @@ - - CPPFLAGS=$saved_CPPFLAGS - -+ for j in lib64 lib; do -+ if test -d $MCVE_DIR/$j; then -+ MCVE_LIBDIR=$MCVE_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MCVE_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_LIBDIR, MCVE_SHARED_LIBADD) - - dnl Build test. Check for libmcve or libmonetra - dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion -diff -Nru php-4.3.11.orig/ext/mhash/config.m4 php-4.3.11/ext/mhash/config.m4 ---- php-4.3.11.orig/ext/mhash/config.m4 2003-10-01 04:54:01.000000000 +0200 -+++ php-4.3.11/ext/mhash/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -14,8 +14,14 @@ - AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h) - fi - -+ for j in lib64 lib; do -+ if test -d $MHASH_DIR/$j; then -+ MHASH_LIBDIR=$MHASH_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MHASH_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD) - - PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared) - PHP_SUBST(MHASH_SHARED_LIBADD) -diff -Nru php-4.3.11.orig/ext/ming/config.m4 php-4.3.11/ext/ming/config.m4 ---- php-4.3.11.orig/ext/ming/config.m4 2003-07-11 09:48:33.000000000 +0200 -+++ php-4.3.11/ext/ming/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -8,10 +8,12 @@ - if test "$PHP_MING" != "no"; then - AC_CHECK_LIB(m, sin) - -- for i in $PHP_MING /usr/local /usr; do -- if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then -+ for j in lib64 lib; do -+ for i in $PHP_MING /usr/local /usr; do -+ if test -f $i/$j/libming.$SHLIB_SUFFIX_NAME -o -f $i/$j/libming.a; then - MING_DIR=$i -- fi -+ fi -+ done - done - - if test -z "$MING_DIR"; then -@@ -28,16 +30,22 @@ - AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.) - fi - -+ for j in lib64 lib; do -+ if test -d $MING_DIR/$j; then -+ MING_LIBDIR=$MING_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [ - AC_DEFINE(HAVE_MING,1,[ ]) - ],[ - AC_MSG_ERROR([Ming library 0.2a or greater required.]) - ],[ -- -L$MING_DIR/lib -+ -L$MING_LIBDIR - ]) - - PHP_ADD_INCLUDE($MING_INC_DIR) -- PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_LIBDIR, MING_SHARED_LIBADD) - - AC_MSG_CHECKING([for destroySWFBlock]) - AC_TRY_RUN([ -diff -Nru php-4.3.11.orig/ext/msession/config.m4 php-4.3.11/ext/msession/config.m4 ---- php-4.3.11.orig/ext/msession/config.m4 2002-03-12 17:25:11.000000000 +0100 -+++ php-4.3.11/ext/msession/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -8,13 +8,17 @@ - if test "$PHP_MSESSION" != "no"; then - if test -r $PHP_MSESSION/lib/libphoenix.a; then - PHOENIX_DIR=$PHP_MSESSION -+ PHOENIX_LIBDIR=$PHP_MSESSION/lib - else - AC_MSG_CHECKING(for msession in default path) -- for i in /usr/local/phoenix /usr/local /usr; do -- if test -r $i/lib/libphoenix.a; then -- PHOENIX_DIR=$i -- AC_MSG_RESULT(found in $i) -- fi -+ for j in lib64 lib; do -+ for i in /usr/local/phoenix /usr/local /usr; do -+ if test -r $i/$j/libphoenix.a; then -+ PHOENIX_DIR=$i -+ PHOENIX_LIBDIR=$i/$j -+ AC_MSG_RESULT(found in $i) -+ fi -+ done - done - fi - -@@ -25,7 +29,7 @@ - - - AC_DEFINE(HAVE_MSESSION, 1, [ ]) -- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB) -+ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB) - PHOENIX_INCLUDE="-I$PHOENIX_DIR" - PHP_SUBST(PHOENIX_LIB) - -diff -Nru php-4.3.11.orig/ext/mssql/config.m4 php-4.3.11/ext/mssql/config.m4 ---- php-4.3.11.orig/ext/mssql/config.m4 2004-12-08 19:59:11.000000000 +0100 -+++ php-4.3.11/ext/mssql/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -19,6 +19,12 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $FREETDS_INSTALLATION_DIR/$j; then -+ FREETDS_INSTALLATION_DIR_LIBDIR=$FREETDS_INSTALLATION_DIR/$j -+ fi -+ done -+ - if test -z "$FREETDS_INSTALLATION_DIR"; then - AC_MSG_ERROR(Cannot find FreeTDS in known installation directories) - fi -@@ -32,12 +38,12 @@ - fi - fi - -- if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then -- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so]) -+ if test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.so"; then -+ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR_LIBDIR/libtds.[a|so]) - fi - - MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include -- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib -+ MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR_LIBDIR - - PHP_ADD_INCLUDE($MSSQL_INCDIR) - PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD) -diff -Nru php-4.3.11.orig/ext/mysql/config.m4 php-4.3.11/ext/mysql/config.m4 ---- php-4.3.11.orig/ext/mysql/config.m4 2004-12-30 08:02:17.000000000 +0100 -+++ php-4.3.11/ext/mysql/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -114,7 +114,7 @@ - - MYSQL_MODULE_TYPE=external - -- for i in lib lib/mysql; do -+ for i in lib64 lib64/mysql lib lib/mysql; do - MYSQL_LIB_CHK($i) - done - -@@ -125,13 +125,18 @@ - PHP_CHECK_LIBRARY(mysqlclient, mysql_close, [ ], - [ - if test "$PHP_ZLIB_DIR" != "no"; then -+ for j in lib64 lib; do -+ if test -d $PHP_ZLIB_DIR/$j; then -+ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j -+ fi -+ done - PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, MYSQL_SHARED_LIBADD) - PHP_CHECK_LIBRARY(mysqlclient, mysql_error, [], [ - AC_MSG_ERROR([mysql configure failed. Please check config.log for more information.]) - ], [ -- -L$PHP_ZLIB_DIR/lib -L$MYSQL_LIB_DIR -+ -L$PHP_ZLIB_LIBDIR -L$MYSQL_LIB_DIR - ]) -- MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -lz" -+ MYSQL_LIBS="-L$PHP_ZLIB_LIBDIR -lz" - else - PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD) - PHP_CHECK_LIBRARY(mysqlclient, mysql_errno, [], [ -diff -Nru php-4.3.11.orig/ext/ncurses/config.m4 php-4.3.11/ext/ncurses/config.m4 ---- php-4.3.11.orig/ext/ncurses/config.m4 2003-12-09 21:33:22.000000000 +0100 -+++ php-4.3.11/ext/ncurses/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -38,20 +38,26 @@ - LIBNAME=ncurses - LIBSYMBOL=initscr - -+ for j in lib64 lib; do -+ if test -d $NCURSES_DIR/$j; then -+ NCURSES_LIBDIR=$NCURSES_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [ - AC_DEFINE(HAVE_NCURSESLIB,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD) - - PHP_CHECK_LIBRARY(panel, new_panel, [ - AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD) - ], [], [ -- -L$NCURSES_DIR/lib -l$LIBNAME -lm -+ -L$NCURSES_LIBDIR -l$LIBNAME -lm - ]) - ], [ - AC_MSG_ERROR(Wrong ncurses lib version or lib not found) - ], [ -- -L$NCURSES_DIR/lib -lm -+ -L$NCURSES_LIBDIR -lm - ]) - - AC_CHECK_LIB($LIBNAME, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])]) -diff -Nru php-4.3.11.orig/ext/odbc/config.m4 php-4.3.11/ext/odbc/config.m4 ---- php-4.3.11.orig/ext/odbc/config.m4 2005-01-18 22:21:16.000000000 +0100 -+++ php-4.3.11/ext/odbc/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -47,19 +47,8 @@ - # - # Check for the library files, and setup the ODBC_LIBS path... - # --if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ -- ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then -- # -- # we have an error and should bail out, as we can't find the libs! -- # -- echo "" -- echo "*********************************************************************" -- echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -- echo "* Please correct this by creating the following links and reconfiguring:" -- echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -- echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" -- echo "*********************************************************************" --else -+if test -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ -+ -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then - ODBC_LFLAGS=-L$1 - ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} - fi -@@ -100,8 +89,12 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ADABAS_LIBDIR=$withval/$i -+ test -f "$ADABAS_LIBDIR/odbclib.a" && break -+ done - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($ADABAS_LIBDIR) - ODBC_OBJS="$withval/lib/odbclib.a" - ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a" - $srcdir/build/shtool mkdir -f -p ext/odbc -@@ -132,8 +125,12 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ SAPDB_LIBDIR=$withval/$i -+ test -f "$SAPDB_LIBDIR/libsqlod.a" -o -f "$SAPDB_LIBDIR/libsqlod.$SHLIB_SUFFIX_NAME" && break -+ done - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($SAPDB_LIBDIR) - PHP_ADD_LIBRARY(sqlod) - ODBC_TYPE=sapdb - AC_DEFINE(HAVE_SAPDB,1,[ ]) -@@ -158,19 +155,36 @@ - withval=/usr/local/solid - fi - if test "$withval" != "no"; then -- ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib -- ODBC_INCLUDE=-I$ODBC_INCDIR -- ODBC_TYPE=solid -- if test -f $ODBC_LIBDIR/soc*35.a; then -- AC_DEFINE(HAVE_SOLID_35,1,[ ]) -- elif test -f $ODBC_LIBDIR/scl*30.a; then -- AC_DEFINE(HAVE_SOLID_30,1,[ ]) -- elif test -f $ODBC_LIBDIR/scl*23.a; then -- AC_DEFINE(HAVE_SOLID,1,[ ]) -+ for i in lib64 lib; do -+ SOLID_LIBDIR=$withval/$i -+ ODBC_INCDIR=$withval/include -+ ODBC_LIBDIR=$withval/$j -+ ODBC_INCLUDE=-I$ODBC_INCDIR -+ ODBC_TYPE=solid -+ if test -f $ODBC_LIBDIR/soc*35.a; then -+ AC_DEFINE(HAVE_SOLID_35,1,[ ]) -+ elif test -f $ODBC_LIBDIR/scl*30.a; then -+ AC_DEFINE(HAVE_SOLID_30,1,[ ]) -+ elif test -f $ODBC_LIBDIR/scl*23.a; then -+ AC_DEFINE(HAVE_SOLID,1,[ ]) -+ fi -+ AC_MSG_RESULT(yes) -+ ODBC_LIBS= -+ AC_FIND_SOLID_LIBS($ODBC_LIBDIR) -+ test -n "$ODBC_LIBS" && break -+ done -+ if test -z "$ODBC_LIBS"; then -+ # -+ # we have an error and should bail out, as we can't find the libs! -+ # -+ echo "" -+ echo "*********************************************************************" -+ echo "* Unable to locate ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -+ echo "* Please correct this by creating the following links and reconfiguring:" -+ echo "* ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -+ echo "* ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" -+ echo "*********************************************************************" - fi -- AC_MSG_RESULT(yes) -- AC_FIND_SOLID_LIBS($ODBC_LIBDIR) - else - AC_MSG_RESULT(no) - fi -@@ -375,11 +389,15 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -+ for i in lib64 lib; do -+ IODBC_LIBDIR=$withval/$i -+ test -f "$IODBC_LIBDIR/libiodbc.a" -o -f "$IODBC_LIBDIR/libiodbc.$SHLIB_SUFFIX_NAME" && break -+ done -+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $IODBC_LIBDIR) - PHP_ADD_INCLUDE($withval/include, 1) - ODBC_TYPE=iodbc - ODBC_INCLUDE=-I$withval/include -- ODBC_LFLAGS=-L$withval/lib -+ ODBC_LFLAGS=-L$IODBC_LIBDIR - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) - AC_DEFINE(HAVE_ODBC2,1,[ ]) -@@ -404,8 +422,11 @@ - withval=/usr/local/easysoft/oob/client - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ODBC_LIBDIR=$withval/$i -+ test -f "$ODBC_LIBDIR/libesoobclient.a" -o -f "$ODBC_LIBDIR/libesoobclient.$SHLIB_SUFFIX_NAME" && break -+ done - ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib - ODBC_LFLAGS=-L$ODBC_LIBDIR - ODBC_INCLUDE=-I$ODBC_INCDIR - ODBC_LIBS=-lesoobclient -@@ -431,8 +452,11 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ODBC_LIBDIR=$withval/$i -+ test -f "$ODBC_LIBDIR/libodbc.a" -o -f "$ODBC_LIBDIR/libodbc.$SHLIB_SUFFIX_NAME" && break -+ done - ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib - ODBC_LFLAGS=-L$ODBC_LIBDIR - ODBC_INCLUDE=-I$ODBC_INCDIR - ODBC_LIBS=-lodbc -diff -Nru php-4.3.11.orig/ext/pcre/config.m4 php-4.3.11/ext/pcre/config.m4 ---- php-4.3.11.orig/ext/pcre/config.m4 2003-12-16 23:14:55.000000000 +0100 -+++ php-4.3.11/ext/pcre/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -25,7 +25,7 @@ - AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX]) - fi - -- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do -+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib64 $PHP_PCRE_REGEX/lib; do - test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j - done - -diff -Nru php-4.3.11.orig/ext/pgsql/config.m4 php-4.3.11/ext/pgsql/config.m4 ---- php-4.3.11.orig/ext/pgsql/config.m4 2004-12-30 08:02:18.000000000 +0100 -+++ php-4.3.11/ext/pgsql/config.m4 2005-12-01 09:14:33.000000000 +0100 -@@ -26,7 +26,7 @@ - fi - done - -- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do -+ for j in lib64 lib lib64/pgsql lib/pgsql lib64/postgres lib/postgres lib64/postgresql lib/postgresql ""; do - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then - PGSQL_LIBDIR=$i/$j - fi -diff -Nru php-4.3.11.orig/ext/pspell/config.m4 php-4.3.11/ext/pspell/config.m4 ---- php-4.3.11.orig/ext/pspell/config.m4 2005-02-17 04:51:50.000000000 +0100 -+++ php-4.3.11/ext/pspell/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -27,7 +27,11 @@ - AC_MSG_ERROR(Cannot find pspell) - fi - -- PSPELL_LIBDIR=$PSPELL_DIR/lib -+ for j in lib64 lib; do -+ if test -d $PSPELL_DIR/$j; then -+ PSPELL_LIBDIR=$PSPELL_DIR/$j -+ fi -+ done - - PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD) - -diff -Nru php-4.3.11.orig/ext/readline/config.m4 php-4.3.11/ext/readline/config.m4 ---- php-4.3.11.orig/ext/readline/config.m4 2003-10-01 04:54:04.000000000 +0200 -+++ php-4.3.11/ext/readline/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -29,22 +29,28 @@ - ]) - ]) - -+ for j in lib64 lib; do -+ if test -d $READLINE_DIR/$j; then -+ READLINE_LIBDIR=$READLINE_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(readline, readline, - [ -- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(readline library not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_CHECK_LIBRARY(history, add_history, - [ -- PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(history library required by readline not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -@@ -73,13 +79,19 @@ - ]) - ]) - -+ for j in lib64 lib; do -+ if test -d $LIBEDIT_DIR/$j; then -+ LIBEDIT_LIBDIR=$LIBEDIT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(edit, readline, - [ -- PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(edit library required by readline not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -diff -Nru php-4.3.11.orig/ext/session/config.m4 php-4.3.11/ext/session/config.m4 ---- php-4.3.11.orig/ext/session/config.m4 2003-10-01 04:54:06.000000000 +0200 -+++ php-4.3.11/ext/session/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -24,8 +24,14 @@ - if test -z "$MM_DIR" ; then - AC_MSG_ERROR(cannot find mm library) - fi -- -- PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib, SESSION_SHARED_LIBADD) -+ -+ for j in lib64 lib; do -+ if test -d $MM_DIR/$j; then -+ MM_LIBDIR=$MM_DIR/$j -+ fi -+ done -+ -+ PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_LIBDIR, SESSION_SHARED_LIBADD) - PHP_ADD_INCLUDE($MM_DIR/include) - AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm]) - fi -diff -Nru php-4.3.11.orig/ext/snmp/config.m4 php-4.3.11/ext/snmp/config.m4 ---- php-4.3.11.orig/ext/snmp/config.m4 2003-09-23 10:16:47.000000000 +0200 -+++ php-4.3.11/ext/snmp/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -45,8 +45,8 @@ - test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp - test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp - done -- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do -- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib -+ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do -+ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i - done - else - SNMP_INCDIR=$PHP_SNMP/include -diff -Nru php-4.3.11.orig/ext/xml/config.m4 php-4.3.11/ext/xml/config.m4 ---- php-4.3.11.orig/ext/xml/config.m4 2004-12-20 21:38:18.000000000 +0100 -+++ php-4.3.11/ext/xml/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -33,6 +33,10 @@ - for i in $PHP_XML $PHP_EXPAT_DIR; do - if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then - EXPAT_DIR=$i -+ EXPAT_LIBDIR=$i/lib -+ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME ; then -+ EXPAT_DIR=$i -+ EXPAT_LIBDIR=$i/lib64 - fi - done - -@@ -41,7 +45,7 @@ - fi - - PHP_ADD_INCLUDE($EXPAT_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_LIBDIR, XML_SHARED_LIBADD) - PHP_SUBST(XML_SHARED_LIBADD) - fi - fi -diff -Nru php-4.3.11.orig/ext/xmlrpc/config.m4 php-4.3.11/ext/xmlrpc/config.m4 ---- php-4.3.11.orig/ext/xmlrpc/config.m4 2003-10-03 07:25:43.000000000 +0200 -+++ php-4.3.11/ext/xmlrpc/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -29,6 +29,12 @@ - PHP_ADD_INCLUDE($i/include) - testval=yes - break -+ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then -+ AC_DEFINE(HAVE_LIBEXPAT2,1,[ ]) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XMLRPC_SHARED_LIBADD) -+ PHP_ADD_INCLUDE($i/include) -+ testval=yes -+ break - fi - done - -@@ -87,6 +93,12 @@ - AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $XMLRPC_DIR/$j; then -+ XMLRPC_LIBDIR=$XMLRPC_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($XMLRPC_DIR) -- PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_LIBDIR, XMLRPC_SHARED_LIBADD) - fi -diff -Nru php-4.3.11.orig/ext/xslt/config.m4 php-4.3.11/ext/xslt/config.m4 ---- php-4.3.11.orig/ext/xslt/config.m4 2004-08-18 07:14:16.000000000 +0200 -+++ php-4.3.11/ext/xslt/config.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -104,6 +104,12 @@ - PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XSLT_SHARED_LIBADD) - found_expat=yes - break -+ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then -+ AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ]) -+ PHP_ADD_INCLUDE($i/include) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XSLT_SHARED_LIBADD) -+ found_expat=yes -+ break - fi - done - -@@ -124,29 +130,38 @@ - ]) - - if test "$PHP_SABLOT_JS" != "no"; then -- for i in $PHP_SABLOT_JS /usr/local /usr; do -- if test -f $i/lib/libjs.a -o -f $i/lib/libjs.$SHLIB_SUFFIX_NAME; then -- PHP_SABLOT_JS_DIR=$i -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_SABLOT_JS /usr/local /usr; do -+ if test -f $i/$j/libjs.a -o -f $i/$j/libjs.$SHLIB_SUFFIX_NAME; then -+ PHP_SABLOT_JS_DIR=$i -+ PHP_SABLOT_JS_LIBDIR=$i/$j -+ break -+ fi -+ done - done - - PHP_CHECK_LIBRARY(js, JS_GetRuntime, - [ -- PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_DIR/lib, XSLT_SHARED_LIBADD) -- PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_DIR/lib -ljs" -+ PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_LIBDIR, XSLT_SHARED_LIBADD) -+ PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_LIBDIR -ljs" - ], [ - AC_MSG_ERROR([libjs not found. Please check config.log for more information.]) - ], [ -- -L$PHP_SABLOT_JS_DIR/lib -+ -L$PHP_SABLOT_JS_LIBDIR - ]) - fi - -+ for j in lib64 lib; do -+ if test -d $XSLT_DIR/$j; then -+ XSLT_LIBDIR=$XSLT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(sablot, SablotSetEncoding, - [ - AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ]) - ], [], [ -- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS -+ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS - ]) - - dnl SablotSetOptions implemented in Sablotron CVS > 2002/10/31 -@@ -154,14 +169,14 @@ - [ - AC_DEFINE(HAVE_SABLOT_GET_OPTIONS, 1, [Whether Sablotron supports SablotGetOptions]) - ], [], [ -- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS -+ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS - ]) - - AC_DEFINE(HAVE_SABLOT_BACKEND, 1, [ ]) - fi - - PHP_ADD_INCLUDE($XSLT_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_DIR/lib, XSLT_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_LIBDIR, XSLT_SHARED_LIBADD) - - AC_DEFINE(HAVE_XSLT, 1, [ ]) - fi -diff -Nru php-4.3.11.orig/ext/zlib/config0.m4 php-4.3.11/ext/zlib/config0.m4 ---- php-4.3.11.orig/ext/zlib/config0.m4 2003-07-02 01:54:44.000000000 +0200 -+++ php-4.3.11/ext/zlib/config0.m4 2005-12-01 08:54:41.000000000 +0100 -@@ -36,15 +36,21 @@ - AC_MSG_ERROR(Cannot find libz) - fi - -+ for j in lib64 lib; do -+ if test -d $ZLIB_DIR/$j; then -+ ZLIB_LIBDIR=$ZLIB_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(z, gzgets, [ - AC_DEFINE(HAVE_ZLIB,1,[ ]) - ],[ - AC_MSG_ERROR(ZLIB extension requires zlib >= 1.0.9) - ],[ -- -L$ZLIB_DIR/lib -+ -L$ZLIB_LIBDIR - ]) - -- PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD) -+ PHP_ADD_LIBPATH($ZLIB_LIBDIR, ZLIB_SHARED_LIBADD) - - PHP_ZLIB_DIR=$ZLIB_DIR - PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD) diff --git a/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch b/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch deleted file mode 100644 index 3e4414220aa7..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ext/pcre/config.m4 2003/12/16 22:14:55 1.29.2.5 -+++ ext/pcre/config.m4 2005/08/09 17:41:56 1.29.2.7.2.1 -@@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support - - if test "$PHP_PCRE_REGEX" != "no"; then - if test "$PHP_PCRE_REGEX" = "yes"; then -- PHP_NEW_EXTENSION(pcre, pcrelib/maketables.c pcrelib/get.c pcrelib/study.c pcrelib/pcre.c php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I@ext_srcdir@/pcrelib) -+ PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_dfa_exec.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_printint.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_ucp_findchar.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib) - PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) - AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) - else -@@ -50,7 +50,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then - - AC_DEFINE(HAVE_PCRE, 1, [ ]) - PHP_ADD_INCLUDE($PCRE_INCDIR) -- PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10) -+ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000) - fi - PHP_SUBST(PCRE_SHARED_LIBADD) - fi diff --git a/dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch b/dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch deleted file mode 100644 index 2c7d9991794f..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- ext/standard/info.c 2004-06-09 17:10:19.000000000 +0200 -+++ ext/standard/info.c 2005-11-01 01:22:42.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: info.c,v 1.218.2.16 2004/06/09 15:10:19 iliaa Exp $ */ -+/* $Id: info.c,v 1.218.2.18.2.4 2005/08/16 00:26:02 iliaa Exp $ */ - - #include "php.h" - #include "php_ini.h" -@@ -133,10 +133,21 @@ - PUTS(" => "); - } - if (Z_TYPE_PP(tmp) == IS_ARRAY) { -+ zval *tmp3; -+ MAKE_STD_ZVAL(tmp3); - if (!sapi_module.phpinfo_as_text) { - PUTS("<pre>"); - } -+ php_start_ob_buffer(NULL, 4096, 1 TSRMLS_CC); - zend_print_zval_r(*tmp, 0); -+ php_ob_get_buffer(tmp3 TSRMLS_CC); -+ php_end_ob_buffer(0, 0 TSRMLS_CC); -+ -+ elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC); -+ PUTS(elem_esc); -+ efree(elem_esc); -+ zval_ptr_dtor(&tmp3); -+ - if (!sapi_module.phpinfo_as_text) { - PUTS("</pre>"); - } -@@ -196,7 +207,7 @@ - PHPAPI char *php_info_html_esc(char *string TSRMLS_DC) - { - int new_len; -- return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_NOQUOTES, NULL TSRMLS_CC); -+ return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC); - } - /* }}} */ - -@@ -408,7 +419,9 @@ - if (expose_php && !sapi_module.phpinfo_as_text) { - PUTS("<a href=\"http://www.php.net/\"><img border=\"0\" src=\""); - if (SG(request_info).request_uri) { -- PUTS(SG(request_info).request_uri); -+ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC); -+ PUTS(elem_esc); -+ efree(elem_esc); - } - if ((ta->tm_mon==3) && (ta->tm_mday==1)) { - PUTS("?="PHP_EGG_LOGO_GUID"\" alt=\"Nadia!\" /></a>"); -@@ -510,7 +529,9 @@ - if (expose_php && !sapi_module.phpinfo_as_text) { - PUTS("<a href=\"http://www.zend.com/\"><img border=\"0\" src=\""); - if (SG(request_info).request_uri) { -- PUTS(SG(request_info).request_uri); -+ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC); -+ PUTS(elem_esc); -+ efree(elem_esc); - } - PUTS("?="ZEND_LOGO_GUID"\" alt=\"Zend logo\" /></a>\n"); - } -@@ -525,7 +546,9 @@ - php_info_print_hr(); - PUTS("<h1><a href=\""); - if (SG(request_info).request_uri) { -- PUTS(SG(request_info).request_uri); -+ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC); -+ PUTS(elem_esc); -+ efree(elem_esc); - } - PUTS("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">"); - PUTS("PHP Credits"); diff --git a/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch deleted file mode 100644 index a62c42fec553..000000000000 --- a/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch +++ /dev/null @@ -1,317 +0,0 @@ ---- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 -+++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 -@@ -16,7 +16,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ -+/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ - - #define IS_EXT_MODULE - -@@ -99,6 +99,22 @@ - delete_pspell_config(config); - } - -+#define PSPELL_FETCH_CONFIG \ -+ convert_to_long_ex(conf); \ -+ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ -+ if (config == NULL || type != le_pspell_config) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ -+ RETURN_FALSE; \ -+ } \ -+ -+#define PSPELL_FETCH_MANAGER \ -+ convert_to_long_ex(scin); \ -+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ -+ if (!manager || type != le_pspell) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ -+ RETURN_FALSE; \ -+ } \ -+ - /* {{{ PHP_MINIT_FUNCTION - */ - PHP_MINIT_FUNCTION(pspell) -@@ -350,14 +366,8 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(conf); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); -+ PSPELL_FETCH_CONFIG; - -- if (config == NULL || type != le_pspell_config) { -- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); -- RETURN_FALSE; -- } -- - ret = new_pspell_manager(config); - - if(pspell_error_number(ret) != 0){ -@@ -385,13 +395,9 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ -+ PSPELL_FETCH_MANAGER; - - if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ - RETURN_TRUE; -@@ -417,13 +423,9 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ -+ PSPELL_FETCH_MANAGER; - - array_init(return_value); - -@@ -455,14 +457,10 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(miss); - convert_to_string_ex(corr); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ -+ PSPELL_FETCH_MANAGER; - - pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); - if(pspell_manager_error_number(manager) == 0){ -@@ -488,13 +486,9 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ -+ PSPELL_FETCH_MANAGER; - - /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ - if(Z_STRLEN_PP(word) == 0){ -@@ -525,13 +519,9 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ -+ PSPELL_FETCH_MANAGER; - - /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ - if(Z_STRLEN_PP(word) == 0){ -@@ -562,12 +552,7 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - pspell_manager_clear_session(manager); - if(pspell_manager_error_number(manager) == 0){ -@@ -593,12 +578,7 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - pspell_manager_save_all_word_lists(manager); - -@@ -666,22 +646,17 @@ - PHP_FUNCTION(pspell_config_runtogether) - { - int type; -- zval **sccin, **runtogether; -+ zval **conf, **runtogether; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_boolean_ex(runtogether); - pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); -@@ -695,22 +670,17 @@ - PHP_FUNCTION(pspell_config_mode) - { - int type; -- zval **sccin, **mode; -+ zval **conf, **mode; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_long_ex(mode); - -@@ -732,7 +702,7 @@ - PHP_FUNCTION(pspell_config_ignore) - { - int type; -- zval **sccin, **pignore; -+ zval **conf, **pignore; - int argc; - - int loc = PSPELL_LARGEST_WORD; -@@ -742,16 +712,11 @@ - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_long_ex(pignore); - ignore = Z_LVAL_PP(pignore); -@@ -782,22 +747,17 @@ - PHP_FUNCTION(pspell_config_personal) - { - int type; -- zval **sccin, **personal; -+ zval **conf, **personal; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_string_ex(personal); - -@@ -820,22 +780,17 @@ - PHP_FUNCTION(pspell_config_repl) - { - int type; -- zval **sccin, **repl; -+ zval **conf, **repl; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - pspell_config_replace(config, "save-repl", "true"); - -@@ -860,22 +815,17 @@ - PHP_FUNCTION(pspell_config_save_repl) - { - int type; -- zval **sccin, **save; -+ zval **conf, **save; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_boolean_ex(save); - pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch b/dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch deleted file mode 100644 index 49f5c9546196..000000000000 --- a/dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- sapi/apache2handler/sapi_apache2.c 2005-10-12 23:41:36.000000000 +0200 -+++ sapi/apache2handler/sapi_apache2.c 2005-11-18 21:19:33.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ -+/* $Id: sapi_apache2.c,v 1.1.2.40.2.8 2005/11/18 19:03:13 iliaa Exp $ */ - - #include <fcntl.h> - -@@ -443,6 +443,18 @@ - php_request_shutdown(NULL); - } - -+static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC) -+{ -+ if (strcmp(r->protocol, "INCLUDED")) { -+ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); -+ } -+ if (p) { -+ ((php_struct *)SG(server_context))->r = p; -+ } else { -+ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); -+ } -+} -+ - static int php_handler(request_rec *r) - { - php_struct *ctx; -@@ -453,10 +465,7 @@ - request_rec *parent_req = NULL; - TSRMLS_FETCH(); - --#define PHPAP_INI_OFF \ -- if (strcmp(r->protocol, "INCLUDED")) { \ -- zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ -- } \ -+#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC); - - conf = ap_get_module_config(r->per_dir_config, &php4_module); - -@@ -535,7 +544,7 @@ - if (!parent_req) { - parent_req = ctx->r; - } -- if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { -+ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { - if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { - zend_bailout(); - } diff --git a/dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch b/dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch deleted file mode 100644 index 60094c0f37f4..000000000000 --- a/dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ext/curl/curl.c 2005-12-02 23:34:12.000000000 +0100 -+++ ext/curl/curl.c 2005-12-03 01:13:51.000000000 +0100 -@@ -67,7 +67,7 @@ - - #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ - if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \ -- strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \ -+ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \ - { \ - php_url *tmp_url; \ - \ -@@ -76,7 +76,7 @@ - RETURN_FALSE; \ - } \ - \ -- if (tmp_url->query || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ -+ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ - (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \ - ) { \ - php_url_free(tmp_url); \ diff --git a/dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch b/dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch deleted file mode 100644 index cf3754dc3ca7..000000000000 --- a/dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- ext/standard/basic_functions.c 2005/09/29 16:31:48 1.543.2.51.2.3 -+++ ext/standard/basic_functions.c 2005/11/02 17:58:00 1.543.2.51.2.4 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: basic_functions.c,v 1.543.2.51.2.3 2005/09/29 16:31:48 iliaa Exp $ */ -+/* $Id: basic_functions.c,v 1.543.2.51.2.4 2005/11/02 17:58:00 iliaa Exp $ */ - - #include "php.h" - #include "php_streams.h" -@@ -802,8 +802,8 @@ function_entry basic_functions[] = { - PHP_FE(prev, first_arg_force_ref) - PHP_FE(next, first_arg_force_ref) - PHP_FE(reset, first_arg_force_ref) -- PHP_FE(current, NULL) -- PHP_FE(key, NULL) -+ PHP_FE(current, first_arg_force_ref) -+ PHP_FE(key, first_arg_force_ref) - PHP_FE(min, NULL) - PHP_FE(max, NULL) - PHP_FE(in_array, NULL) diff --git a/dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch b/dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch deleted file mode 100644 index a35c28a43fd3..000000000000 --- a/dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- ext/gd/gd.c 2005-10-06 22:44:52.000000000 +0200 -+++ ext/gd/gd.c 2005-11-03 21:42:59.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ -+/* $Id: gd.c,v 1.221.2.56.2.3 2005/11/03 20:20:04 sniper Exp $ */ - - /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, - Cold Spring Harbor Labs. */ -@@ -623,7 +623,7 @@ - - convert_to_string_ex(file); - -- stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL); -+ stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL); - if (stream == NULL) { - RETURN_FALSE; - } -@@ -807,6 +807,10 @@ - convert_to_boolean_ex(dither); - convert_to_long_ex(ncolors); - -+ if (Z_LVAL_PP(ncolors) <= 0) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero"); -+ RETURN_FALSE; -+ } - gdImageTrueColorToPalette(im, Z_LVAL_PP(dither), Z_LVAL_PP(ncolors)); - - RETURN_TRUE; -@@ -1436,7 +1440,7 @@ - - fn = Z_STRVAL_PP(file); - -- stream = php_stream_open_wrapper(fn, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL); -+ stream = php_stream_open_wrapper(fn, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL); - if (stream == NULL) { - RETURN_FALSE; - } -@@ -1644,10 +1648,7 @@ - } - - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { -- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); - - fp = VCWD_FOPEN(fn, "wb"); - if (!fp) { -@@ -3742,16 +3743,10 @@ - } - - /* Check origin file */ -- if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn_org, "Invalid origin filename"); - - /* Check destination file */ -- if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn_dest, "Invalid destination filename"); - - /* Open origin file */ - org = VCWD_FOPEN(fn_org, "rb"); ---- ext/gd/gd_ctx.c 2005-10-06 22:44:52.000000000 +0200 -+++ ext/gd/gd_ctx.c 2005-11-03 21:42:59.000000000 +0100 -@@ -73,10 +73,7 @@ - } - - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { -- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); - - fp = VCWD_FOPEN(fn, "wb"); - if (!fp) { ---- ext/gd/php_gd.h 2003-03-31 10:49:30.000000000 +0200 -+++ ext/gd/php_gd.h 2005-11-15 11:15:27.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: php_gd.h,v 1.44.2.5 2003/03/31 08:49:30 sniper Exp $ */ -+/* $Id: php_gd.h,v 1.44.2.5.8.2 2005/11/15 08:15:36 sniper Exp $ */ - - #ifndef PHP_GD_H - #define PHP_GD_H -@@ -30,6 +30,15 @@ - - #if HAVE_LIBGD - -+/* open_basedir and safe_mode checks */ -+#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \ -+ if (!filename || filename == empty_string || php_check_open_basedir(filename TSRMLS_CC) || \ -+ (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \ -+ ) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \ -+ RETURN_FALSE; \ -+ } -+ - #define PHP_GDIMG_TYPE_GIF 1 - #define PHP_GDIMG_TYPE_PNG 2 - #define PHP_GDIMG_TYPE_JPG 3 diff --git a/dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch b/dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch deleted file mode 100644 index adbf35a214b6..000000000000 --- a/dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch +++ /dev/null @@ -1,145 +0,0 @@ ---- ext/mbstring/mbstring.c 2005-09-21 15:19:19.000000000 +0200 -+++ ext/mbstring/mbstring.c 2005-11-22 01:00:03.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: mbstring.c,v 1.142.2.47.2.1 2005/09/21 13:19:19 iliaa Exp $ */ -+/* $Id: mbstring.c,v 1.142.2.47.2.5 2005/11/21 23:21:19 hirokawa Exp $ */ - - /* - * PHP4 Multibyte String module "mbstring" -@@ -2924,16 +2924,17 @@ - } - /* }}} */ - --/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]]) -+/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]]) - Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */ - PHP_FUNCTION(mb_encode_mimeheader) - { -- pval **argv[4]; -+ pval **argv[5]; - enum mbfl_no_encoding charset, transenc; - mbfl_string string, result, *ret; - char *p, *linefeed; -+ int indent; - -- if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 4 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) { -+ if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 5 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) { - WRONG_PARAM_COUNT; - } - -@@ -2970,6 +2971,12 @@ - linefeed = Z_STRVAL_PP(argv[3]); - } - -+ indent = 0; -+ if (ZEND_NUM_ARGS() >= 5) { -+ convert_to_long_ex(argv[4]); -+ indent = Z_LVAL_PP(argv[4]); -+ } -+ - convert_to_string_ex(argv[0]); - mbfl_string_init(&string); - mbfl_string_init(&result); -@@ -2977,7 +2984,7 @@ - string.no_encoding = MBSTRG(current_internal_encoding); - string.val = Z_STRVAL_PP(argv[0]); - string.len = Z_STRLEN_PP(argv[0]); -- ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, 0); -+ ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent); - if (ret != NULL) { - RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */ - } else { -@@ -3460,6 +3467,22 @@ - * Sends an email message with MIME scheme - */ - #if HAVE_SENDMAIL -+#define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \ -+ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \ -+ pos += 3; \ -+ while (str[pos] == ' ' || str[pos] == '\t') { \ -+ pos++; \ -+ } \ -+ continue; \ -+ } \ -+ else if (str[pos] == '\n' && (str[pos + 1] == ' ' || str[pos + 1] == '\t')) { \ -+ pos += 2; \ -+ while (str[pos] == ' ' || str[pos] == '\t') { \ -+ pos++; \ -+ } \ -+ continue; \ -+ } \ -+ - PHP_FUNCTION(mb_send_mail) - { - int argc, n; -@@ -3474,8 +3497,9 @@ - body_enc; /* body transfar encoding */ - mbfl_memory_device device; /* automatic allocateable buffer for additional header */ - const mbfl_language *lang; -- char *force_extra_parameters = INI_STR("mail.force_extra_parameters"); - int err = 0; -+ char *to_r; -+ int to_len, i; - - /* initialize */ - mbfl_memory_device_init(&device, 0, 0); -@@ -3502,6 +3526,32 @@ - convert_to_string_ex(argv[0]); - if (Z_STRVAL_PP(argv[0])) { - to = Z_STRVAL_PP(argv[0]); -+ to_len = Z_STRLEN_PP(argv[0]); -+ if (to_len > 0) { -+ to_r = estrndup(to, to_len); -+ for (; to_len; to_len--) { -+ if (!isspace((unsigned char) to_r[to_len - 1])) { -+ break; -+ } -+ to_r[to_len - 1] = '\0'; -+ } -+ for (i = 0; to_r[i]; i++) { -+ if (iscntrl((unsigned char) to_r[i])) { -+ /* According to RFC 822, section 3.1.1 long headers may be -+separated into -+ * parts using CRLF followed at least one linear-white-space -+character ('\t' or ' '). -+ * To prevent these separators from being replaced with a space, -+we use the -+ * SKIP_LONG_HEADER_SEP_MBSTRING to skip over them. -+ */ -+ SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i); -+ to_r[i] = ' '; -+ } -+ } -+ } else { -+ to_r = to; -+ } - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field"); - err = 1; -@@ -3596,18 +3646,19 @@ - extra_cmd = Z_STRVAL_PP(argv[4]); - } - -- if (force_extra_parameters) { -- extra_cmd = estrdup(force_extra_parameters); -- } else if (extra_cmd) { -+ if (extra_cmd) { - extra_cmd = php_escape_shell_cmd(extra_cmd); - } - -- if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) { -+ if (!err && php_mail(to_r, subject, message, headers, extra_cmd TSRMLS_CC)) { - RETVAL_TRUE; - } else { - RETVAL_FALSE; - } - -+ if (to_r != to) { -+ efree(to_r); -+ } - if (extra_cmd) { - efree(extra_cmd); - } diff --git a/dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch b/dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch deleted file mode 100644 index 26df78362086..000000000000 --- a/dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch +++ /dev/null @@ -1,1488 +0,0 @@ -diff -Nru php-4.4.1.orig/acinclude.m4 php-4.4.1/acinclude.m4 ---- php-4.4.1.orig/acinclude.m4 2005-09-23 11:20:22.000000000 +0200 -+++ php-4.4.1/acinclude.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -194,7 +194,7 @@ - unset ac_new_flags - for i in [$]$1; do - case [$]i in -- -L/usr/lib|-L/usr/lib/[)] ;; -+ -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/[)] ;; - *[)] ac_new_flags="[$]ac_new_flags [$]i" ;; - esac - done -@@ -645,7 +645,7 @@ - ]) - - AC_DEFUN([PHP_PROG_SENDMAIL],[ --PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib -+PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64 - AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) - if test -n "$PROG_SENDMAIL"; then - AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) -@@ -856,7 +856,9 @@ - dnl add a library to linkpath/runpath - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/lib"; then -+ case x$1 in -+ x/usr/lib|x/usr/lib64) ;; -+ *) - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -866,8 +868,8 @@ - else - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl -@@ -1671,15 +1673,20 @@ - fi - - for i in $PHP_KERBEROS; do -- if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then -+ if test -f $i/lib/libkrb5.a -o -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then - PHP_KERBEROS_DIR=$i -+ PHP_KERBEROS_LIBDIR=$i/lib -+ break -+ elif test -f $i/lib64/libkrb5.a -o -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then -+ PHP_KERBEROS_DIR=$i -+ PHP_KERBEROS_LIBDIR=$i/lib64 - break - fi - done - - if test "$PHP_KERBEROS_DIR"; then - found_kerberos=yes -- PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1) -+ PHP_ADD_LIBPATH($PHP_KERBEROS_LIBDIR, $1) - PHP_ADD_LIBRARY(gssapi_krb5, 1, $1) - PHP_ADD_LIBRARY(krb5, 1, $1) - PHP_ADD_LIBRARY(k5crypto, 1, $1) -@@ -1751,6 +1758,9 @@ - if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib - fi -+ if test -r $i/lib64/libssl.a -o -r $i/lib64/libssl.$SHLIB_SUFFIX_NAME; then -+ OPENSSL_LIBDIR=$i/lib64 -+ fi - test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break - done - -@@ -1871,7 +1881,9 @@ - fi - - if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a || -- test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME -+ test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || -+ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.a || -+ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME - then - PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ - found_iconv=yes -diff -Nru php-4.4.1.orig/ext/bz2/config.m4 php-4.4.1/ext/bz2/config.m4 ---- php-4.4.1.orig/ext/bz2/config.m4 2004-01-21 06:04:50.000000000 +0100 -+++ php-4.4.1/ext/bz2/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -19,6 +19,12 @@ - done - fi - -+ for j in lib64 lib; do -+ if test -d $BZIP_DIR/$j; then -+ BZIP_LIBDIR=$BZIP_DIR/$j -+ fi -+ done -+ - if test -z "$BZIP_DIR"; then - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Please reinstall the BZip2 distribution) -@@ -27,12 +33,12 @@ - PHP_CHECK_LIBRARY(bz2, BZ2_bzerror, - [ - PHP_ADD_INCLUDE($BZIP_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_LIBDIR, BZ2_SHARED_LIBADD) - AC_DEFINE(HAVE_BZ2,1,[ ]) - ], [ - AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0) - ], [ -- -L$BZIP_DIR/lib -+ -L$BZIP_LIBDIR - ]) - - PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared) -diff -Nru php-4.4.1.orig/ext/curl/config.m4 php-4.4.1/ext/curl/config.m4 ---- php-4.4.1.orig/ext/curl/config.m4 2005-02-09 17:23:49.000000000 +0100 -+++ php-4.4.1/ext/curl/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -23,6 +23,12 @@ - done - fi - -+ for j in lib64 lib; do -+ if test -d $CURL_DIR/$j; then -+ CURL_LIBDIR=$CURL_DIR/$j -+ fi -+ done -+ - if test -z "$CURL_DIR"; then - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Please reinstall the libcurl distribution - -@@ -51,7 +57,7 @@ - - PHP_ADD_INCLUDE($CURL_DIR/include) - PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_LIBDIR, CURL_SHARED_LIBADD) - - PHP_CHECK_LIBRARY(curl,curl_easy_perform, - [ -@@ -59,14 +65,14 @@ - ],[ - AC_MSG_ERROR(There is something wrong. Please check config.log for more information.) - ],[ -- $CURL_LIBS -L$CURL_DIR/lib -+ $CURL_LIBS -L$CURL_LIBDIR - ]) - - PHP_CHECK_LIBRARY(curl,curl_version_info, - [ - AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ]) - ],[],[ -- $CURL_LIBS -L$CURL_DIR/lib -+ $CURL_LIBS -L$CURL_LIBDIR - ]) - - dnl if test "$PHP_CURLWRAPPERS" != "no" ; then -diff -Nru php-4.4.1.orig/ext/dba/config.m4 php-4.4.1/ext/dba/config.m4 ---- php-4.4.1.orig/ext/dba/config.m4 2005-08-22 21:59:42.000000000 +0200 -+++ php-4.4.1/ext/dba/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -80,12 +80,18 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - PHP_CHECK_LIBRARY(gdbm, gdbm_open, [ - AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_GDBM, 1, [ ]) - THIS_LIBS=gdbm -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - fi - - PHP_DBA_STD_ASSIGN -@@ -110,14 +116,20 @@ - break - fi - done -- -+ -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in ndbm db1 c; do - PHP_CHECK_LIBRARY($LIB, dbm_open, [ - AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_NDBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -135,25 +147,28 @@ - dnl parameters(version, library list, function) - AC_DEFUN([PHP_DBA_DB_CHECK],[ - for LIB in $2; do -- if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then -- PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[ -- AC_TRY_LINK([ -+ for LIBDIR in lib64 lib; do -+ if test -f $THIS_PREFIX/$LIBDIR/lib$LIB.a -o -f $THIS_PREFIX/$LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then -+ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$LIBDIR, -l$LIB,[ -+ AC_TRY_LINK([ - #include "$THIS_INCLUDE" -- ],[ -- $3; -- ],[ -- AC_EGREP_CPP(yes,[ -+ ],[ -+ $3; -+ ],[ -+ AC_EGREP_CPP(yes,[ - #include "$THIS_INCLUDE" - #if DB_VERSION_MAJOR == $1 -- yes -+ yes - #endif -- ],[ -- THIS_LIBS=$LIB -- break -+ ],[ -+ THIS_LIBS=$LIB -+ break -+ ]) - ]) - ]) -- ]) -- fi -+ fi -+ done -+ test -n "$THIS_LIBS" && break - done - if test -z "$THIS_LIBS"; then - AC_MSG_CHECKING(for db$1 major version) -@@ -314,6 +329,12 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in dbm c gdbm; do - PHP_CHECK_LIBRARY($LIB, dbminit, [ -@@ -328,7 +349,7 @@ - fi - AC_DEFINE(DBA_DBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -364,13 +385,19 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in cdb c; do - PHP_CHECK_LIBRARY($LIB, cdb_read, [ - AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_CDB, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -diff -Nru php-4.4.1.orig/ext/domxml/config.m4 php-4.4.1/ext/domxml/config.m4 ---- php-4.4.1.orig/ext/domxml/config.m4 2004-12-30 08:02:17.000000000 +0100 -+++ php-4.4.1/ext/domxml/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -48,13 +48,15 @@ - AC_MSG_ERROR(Please reinstall the libxml >= 2.4.14 distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $DOMXML_DIR/$j; then -+ DOMXML_LIBDIR=$DOMXML_DIR/$j -+ fi -+ done -+ - PHP_DOM_CHECK_VERSION - -- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then -- DOM_LIBNAME=xml2 -- else -- DOM_LIBNAME=xml -- fi -+ DOM_LIBNAME=xml2 - - XML2_CONFIG=$DOMXML_DIR/bin/xml2-config - -@@ -62,7 +64,7 @@ - DOM_LIBS=`$XML2_CONFIG --libs` - PHP_EVAL_LIBLINE($DOM_LIBS, DOMXML_SHARED_LIBADD) - else -- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD) - fi - - PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD) -@@ -70,7 +72,13 @@ - if test "$PHP_ZLIB_DIR" = "no"; then - AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>) - else -- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, DOMXML_SHARED_LIBADD) -+ for j in lib64 lib; do -+ if test -d $PHP_ZLIB_DIR/$j; then -+ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j -+ fi -+ done -+ -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIBDIR, DOMXML_SHARED_LIBADD) - fi - - AC_DEFINE(HAVE_DOMXML,1,[ ]) -@@ -135,27 +143,35 @@ - AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $DOMXSLT_DIR/$j; then -+ DOMXSLT_LIBDIR=$DOMXSLT_DIR/$j -+ fi -+ done -+ - PHP_DOM_XSLT_CHECK_VERSION - -- PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_DIR/lib, DOMXML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_LIBDIR, DOMXML_SHARED_LIBADD) - - PHP_ADD_INCLUDE($DOMXSLT_DIR/include) - - if test "$PHP_DOM" = "no"; then - AC_MSG_ERROR(DOMXSLT requires DOMXML. Use --with-dom=<DIR>) - fi -- -- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then -- DOM_LIBNAME=xml2 -- else -- DOM_LIBNAME=xml -- fi - -- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD) -+ for j in lib64 lib; do -+ if test -d $DOMXML_DIR/$j; then -+ DOMXML_LIBDIR=$DOMXML_DIR/$j -+ fi -+ done -+ -+ DOM_LIBNAME=xml2 -+ -+ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD) - PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD) - -- if test -f $DOMXML_DIR/lib/libxsltbreakpoint.a -o -f $DOMXML_DIR/lib/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then -- PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD) -+ if test -f $DOMXML_LIBDIR/libxsltbreakpoint.a -o -f $DOMXML_LIBDIR/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then -+ PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD) - fi - - AC_DEFINE(HAVE_DOMXSLT,1,[ ]) -@@ -185,9 +201,15 @@ - AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $DOMEXSLT_DIR/$j; then -+ DOMEXSLT_LIBDIR=$DOMEXSLT_DIR/$j -+ fi -+ done -+ - PHP_DOM_EXSLT_CHECK_VERSION - -- PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_DIR/lib, DOMXML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_LIBDIR, DOMXML_SHARED_LIBADD) - - PHP_ADD_INCLUDE($DOMEXSLT_DIR/include) - -diff -Nru php-4.4.1.orig/ext/gd/config.m4 php-4.4.1/ext/gd/config.m4 ---- php-4.4.1.orig/ext/gd/config.m4 2005-05-17 14:23:09.000000000 +0200 -+++ php-4.4.1/ext/gd/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -50,8 +50,15 @@ - AC_DEFUN([PHP_GD_JPEG],[ - if test "$PHP_JPEG_DIR" != "no"; then - -- for i in $PHP_JPEG_DIR /usr/local /usr; do -- test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_JPEG_DIR /usr/local /usr; do -+ if test -f "$i/$j/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libjpeg.a"; then -+ GD_JPEG_DIR=$i -+ GD_JPEG_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_JPEG_DIR" && break - done - - if test -z "$GD_JPEG_DIR"; then -@@ -61,11 +68,11 @@ - PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, - [ - PHP_ADD_INCLUDE($GD_JPEG_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libjpeg.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_JPEG_DIR/lib -+ -L$GD_JPEG_LIB_DIR - ]) - else - AC_MSG_RESULT([If configure fails try --with-jpeg-dir=<DIR>]) -@@ -75,8 +82,15 @@ - AC_DEFUN([PHP_GD_PNG],[ - if test "$PHP_PNG_DIR" != "no"; then - -- for i in $PHP_PNG_DIR /usr/local /usr; do -- test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_PNG_DIR /usr/local /usr; do -+ if test -f "$i/$j/libpng.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libpng.a"; then -+ GD_PNG_DIR=$i -+ GD_PNG_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_PNG_DIR" && break - done - - if test -z "$GD_PNG_DIR"; then -@@ -94,12 +108,12 @@ - PHP_CHECK_LIBRARY(png,png_write_image, - [ - PHP_ADD_INCLUDE($GD_PNG_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, GD_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIB_DIR, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.]) - ],[ -- -L$PHP_ZLIB_DIR/lib -lz -L$GD_PNG_DIR/lib -+ -L$PHP_ZLIB_LIB_DIR -lz -L$GD_PNG_LIB_DIR - ]) - - else -@@ -110,8 +124,15 @@ - AC_DEFUN([PHP_GD_XPM],[ - if test "$PHP_XPM_DIR" != "no"; then - -- for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do -- test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do -+ if test -f "$i/$j/libXpm.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libXpm.a"; then -+ GD_XPM_DIR=$i -+ GD_XPM_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_XPM_DIR" && break - done - - if test -z "$GD_XPM_DIR"; then -@@ -129,12 +150,12 @@ - PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage, - [ - PHP_ADD_INCLUDE($GD_XPM_INC) -- PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_XPM_DIR/lib -lX11 -+ -L$GD_XPM_LIB_DIR -lX11 - ]) - else - AC_MSG_RESULT(If configure fails try --with-xpm-dir=<DIR>) -@@ -145,25 +166,29 @@ - if test "$PHP_TTF" != "no"; then - if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then - if test -n "$PHP_TTF"; then -- for i in $PHP_TTF /usr/local /usr; do -- if test -f "$i/include/freetype.h"; then -- TTF_DIR=$i -- unset TTF_INC_DIR -- fi -- if test -f "$i/include/freetype/freetype.h"; then -- TTF_DIR=$i -- TTF_INC_DIR=$i/include/freetype -- fi -- if test -f "$i/include/freetype1/freetype/freetype.h"; then -- TTF_DIR=$i -- TTF_INC_DIR=$i/include/freetype1/freetype -- fi -+ for j in lib64 lib; do -+ for i in $PHP_TTF /usr/local /usr; do -+ if test -f "$i/$j/libttf.a" -o -f "$i/$j/libttf.$SHLIB_SUFFIX_NAME"; then -+ TTF_DIR=$i -+ TTF_LIB_DIR=$i/$j -+ if test -f "$i/include/freetype.h"; then -+ unset TTF_INC_DIR -+ elif test -f "$i/include/freetype/freetype.h"; then -+ TTF_INC_DIR=$i/include/freetype -+ elif test -f "$i/include/freetype1/freetype/freetype.h"; then -+ TTF_INC_DIR=$i/include/freetype1/freetype -+ else -+ unset TTF_DIR -+ fi -+ fi -+ test -n "$TTF_DIR" && break -+ done - test -n "$TTF_DIR" && break - done - fi - if test -n "$TTF_DIR" ; then - AC_DEFINE(HAVE_LIBTTF,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_LIB_DIR, GD_SHARED_LIBADD) - fi - if test -z "$TTF_INC_DIR"; then - TTF_INC_DIR=$TTF_DIR/include -@@ -178,16 +203,21 @@ - AC_DEFUN([PHP_GD_FREETYPE2],[ - if test "$PHP_FREETYPE_DIR" != "no"; then - -- for i in $PHP_FREETYPE_DIR /usr/local /usr; do -- if test -f "$i/include/freetype2/freetype/freetype.h"; then -- FREETYPE2_DIR=$i -- FREETYPE2_INC_DIR=$i/include/freetype2 -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do -+ if test -f "$i/include/freetype2/freetype/freetype.h" && \ -+ test -f "$i/$j/libfreetype.a" -o -f "$i/$j/libfreetype.$SHLIB_SUFFIX_NAME"; then -+ FREETYPE2_DIR=$i -+ FREETYPE2_LIB_DIR=$i/$j -+ FREETYPE2_INC_DIR=$i/include/freetype2 -+ break -+ fi -+ done -+ test -n "$FREETYPE2_DIR" && break - done - - if test -n "$FREETYPE2_DIR" ; then -- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_LIB_DIR, GD_SHARED_LIBADD) - PHP_ADD_INCLUDE($FREETYPE2_DIR/include) - PHP_ADD_INCLUDE($FREETYPE2_INC_DIR) - AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) -@@ -203,8 +233,16 @@ - AC_DEFUN([PHP_GD_T1LIB],[ - if test "$PHP_T1LIB" != "no"; then - -- for i in $PHP_T1LIB /usr/local /usr; do -- test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_T1LIB /usr/local /usr; do -+ if test -f "$i/include/t1lib.h" && \ -+ test -f "$i/$j/libt1.a" -o -f "$i/$j/libt1.$SHLIB_SUFFIX_NAME"; then -+ GD_T1_DIR=$i -+ GD_T1_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_T1_DIR" && break - done - - if test -z "$GD_T1_DIR"; then -@@ -215,11 +253,11 @@ - [ - AC_DEFINE(HAVE_LIBT1,1,[ ]) - PHP_ADD_INCLUDE($GD_T1_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_T1_DIR/lib -+ -L$GD_T1_LIB_DIR - ]) - fi - ]) -@@ -365,7 +403,7 @@ - done - - dnl Library path -- for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do -+ for i in lib/gd1.3 lib64/gd1.3 lib/gd lib64/gd lib lib64 gd1.3 gd ""; do - test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i" - done - -diff -Nru php-4.4.1.orig/ext/gettext/config.m4 php-4.4.1/ext/gettext/config.m4 ---- php-4.4.1.orig/ext/gettext/config.m4 2003-10-01 04:53:58.000000000 +0200 -+++ php-4.4.1/ext/gettext/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -14,11 +14,15 @@ - AC_MSG_ERROR(Cannot locate header file libintl.h) - fi - -- GETTEXT_LIBDIR=$GETTEXT_DIR/lib -+ for j in lib64 lib; do -+ if test -d $GETTEXT_DIR/$j; then -+ GETTEXT_LIBDIR=$GETTEXT_DIR/$j -+ fi -+ done -+ - GETTEXT_INCDIR=$GETTEXT_DIR/include - - O_LDFLAGS=$LDFLAGS -- LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" - AC_CHECK_LIB(intl, bindtextdomain, [ - GETTEXT_LIBS=intl - GETTEXT_CHECK_IN_LIB=intl -diff -Nru php-4.4.1.orig/ext/gmp/config.m4 php-4.4.1/ext/gmp/config.m4 ---- php-4.4.1.orig/ext/gmp/config.m4 2003-11-19 05:44:24.000000000 +0100 -+++ php-4.4.1/ext/gmp/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -14,20 +14,26 @@ - if test -z "$GMP_DIR"; then - AC_MSG_ERROR(Unable to locate gmp.h) - fi -- -+ -+ for j in lib64 lib; do -+ if test -d $GMP_DIR/$j; then -+ GMP_LIBDIR=$GMP_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size, - [],[ - PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size, - [],[ - AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.]) - ],[ -- -L$GMP_DIR/lib -+ -L$GMP_LIBDIR - ]) - ],[ -- -L$GMP_DIR/lib -+ -L$GMP_LIBDIR - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_LIBDIR, GMP_SHARED_LIBADD) - PHP_ADD_INCLUDE($GMP_DIR/include) - - PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared) -diff -Nru php-4.4.1.orig/ext/iconv/config.m4 php-4.4.1/ext/iconv/config.m4 ---- php-4.4.1.orig/ext/iconv/config.m4 2005-01-10 22:38:56.000000000 +0100 -+++ php-4.4.1/ext/iconv/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -23,8 +23,14 @@ - PHP_ICONV_PREFIX="$ICONV_DIR" - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_ICONV_PREFIX/$j; then -+ PHP_ICONV_PREFIX_LIBDIR=$PHP_ICONV_PREFIX/$j -+ fi -+ done -+ - CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" -- LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS" -+ LDFLAGS="-L$PHP_ICONV_PREFIX_LIBDIR $LDFLAGS" - - if test -r $PHP_ICONV_PREFIX/include/giconv.h; then - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" -diff -Nru php-4.4.1.orig/ext/imap/config.m4 php-4.4.1/ext/imap/config.m4 ---- php-4.4.1.orig/ext/imap/config.m4 2005-01-11 05:56:57.000000000 +0100 -+++ php-4.4.1/ext/imap/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -167,6 +167,7 @@ - for lib in c-client4 c-client imap; do - IMAP_LIB=$lib - IMAP_LIB_CHK(lib) -+ IMAP_LIB_CHK(lib64) - IMAP_LIB_CHK(c-client) - done - -diff -Nru php-4.4.1.orig/ext/interbase/config.m4 php-4.4.1/ext/interbase/config.m4 ---- php-4.4.1.orig/ext/interbase/config.m4 2003-04-25 10:59:00.000000000 +0200 -+++ php-4.4.1/ext/interbase/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -9,10 +9,18 @@ - if test "$PHP_INTERBASE" != "no"; then - if test "$PHP_INTERBASE" = "yes"; then - IBASE_INCDIR=/usr/interbase/include -- IBASE_LIBDIR=/usr/interbase/lib -+ for j in lib64 lib; do -+ if test -d /usr/interbase/$j; then -+ IBASE_LIBDIR=/usr/interbase/$j -+ fi -+ done - else - IBASE_INCDIR=$PHP_INTERBASE/include -- IBASE_LIBDIR=$PHP_INTERBASE/lib -+ for j in lib64 lib; do -+ if test -d $PHP_INTERBASE/$j; then -+ IBASE_LIBDIR=$PHP_INTERBASE/$j -+ fi -+ done - fi - - PHP_CHECK_LIBRARY(gds, isc_detach_database, -diff -Nru php-4.4.1.orig/ext/ldap/config.m4 php-4.4.1/ext/ldap/config.m4 ---- php-4.4.1.orig/ext/ldap/config.m4 2005-05-08 18:06:24.000000000 +0200 -+++ php-4.4.1/ext/ldap/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -6,7 +6,8 @@ - if test -f $1/include/ldap.h; then - LDAP_DIR=$1 - LDAP_INCDIR=$1/include -- LDAP_LIBDIR=$1/lib -+ test -f $1/lib/libldap.so && LDAP_LIBDIR=$1/lib -+ test -f $1/lib64/libldap.so && LDAP_LIBDIR=$1/lib64 - elif test -f $1/include/umich-ldap/ldap.h; then - LDAP_DIR=$1 - LDAP_INCDIR=$1/include/umich-ldap -diff -Nru php-4.4.1.orig/ext/mbstring/config.m4 php-4.4.1/ext/mbstring/config.m4 ---- php-4.4.1.orig/ext/mbstring/config.m4 2005-02-21 08:10:13.000000000 +0100 -+++ php-4.4.1/ext/mbstring/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -167,12 +167,18 @@ - PHP_ADD_INCLUDE([$PHP_LIBMBFL_INCLUDE]) - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_LIBMBFL/$j; then -+ PHP_LIBMBFL_LIBDIR=$PHP_LIBMBFL/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mbfl, mbfl_buffer_converter_new, [ -- PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL/lib, MBSTRING_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL_LIBDIR, MBSTRING_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) - ], [ -- -LPHP_LIBMBFL/lib -+ -L$PHP_LIBMBFL_LIBDIR - ]) - fi - ]) -diff -Nru php-4.4.1.orig/ext/mcal/config.m4 php-4.4.1/ext/mcal/config.m4 ---- php-4.4.1.orig/ext/mcal/config.m4 2002-03-27 11:26:16.000000000 +0100 -+++ php-4.4.1/ext/mcal/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -19,7 +19,7 @@ - fi - done - -- for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib; do -+ for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib64/mcal $MCAL_DIR/lib $MCAL_DIR/lib64; do - if test -r "$i/libmcal.a"; then - MCAL_LIBRARY=$i - fi -diff -Nru php-4.4.1.orig/ext/mcrypt/config.m4 php-4.4.1/ext/mcrypt/config.m4 ---- php-4.4.1.orig/ext/mcrypt/config.m4 2005-01-22 02:37:12.000000000 +0100 -+++ php-4.4.1/ext/mcrypt/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -14,6 +14,12 @@ - AC_MSG_ERROR(mcrypt.h not found. Please reinstall libmcrypt.) - fi - -+ for j in lib64 lib; do -+ if test -d $MCRYPT_DIR/$j; then -+ MCRYPT_LIBDIR=$MCRYPT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, - [ - PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD) -@@ -23,7 +29,7 @@ - [ - AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ]) - ],[],[ -- -L$MCRYPT_DIR/lib -lltdl -+ -L$MCRYPT_LIBDIR -lltdl - ]) - - ],[ -@@ -35,7 +41,7 @@ - [ - AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ]) - ],[],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ - PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, -@@ -44,16 +50,16 @@ - ],[ - AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.]) - ],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ -- -L$MCRYPT_DIR/lib -lltdl -+ -L$MCRYPT_LIBDIR -lltdl - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD) - PHP_ADD_INCLUDE($MCRYPT_DIR/include) - - PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared) -diff -Nru php-4.4.1.orig/ext/mcve/config.m4 php-4.4.1/ext/mcve/config.m4 ---- php-4.4.1.orig/ext/mcve/config.m4 2004-12-08 07:48:11.000000000 +0100 -+++ php-4.4.1/ext/mcve/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -67,8 +67,14 @@ - - CPPFLAGS=$saved_CPPFLAGS - -+ for j in lib64 lib; do -+ if test -d $MCVE_DIR/$j; then -+ MCVE_LIBDIR=$MCVE_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MCVE_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_LIBDIR, MCVE_SHARED_LIBADD) - - dnl Build test. Check for libmcve or libmonetra - dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion -diff -Nru php-4.4.1.orig/ext/mhash/config.m4 php-4.4.1/ext/mhash/config.m4 ---- php-4.4.1.orig/ext/mhash/config.m4 2003-10-01 04:54:01.000000000 +0200 -+++ php-4.4.1/ext/mhash/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -14,8 +14,14 @@ - AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h) - fi - -+ for j in lib64 lib; do -+ if test -d $MHASH_DIR/$j; then -+ MHASH_LIBDIR=$MHASH_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MHASH_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD) - - PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared) - PHP_SUBST(MHASH_SHARED_LIBADD) -diff -Nru php-4.4.1.orig/ext/ming/config.m4 php-4.4.1/ext/ming/config.m4 ---- php-4.4.1.orig/ext/ming/config.m4 2003-07-11 09:48:33.000000000 +0200 -+++ php-4.4.1/ext/ming/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -8,10 +8,12 @@ - if test "$PHP_MING" != "no"; then - AC_CHECK_LIB(m, sin) - -- for i in $PHP_MING /usr/local /usr; do -- if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then -+ for j in lib64 lib; do -+ for i in $PHP_MING /usr/local /usr; do -+ if test -f $i/$j/libming.$SHLIB_SUFFIX_NAME -o -f $i/$j/libming.a; then - MING_DIR=$i -- fi -+ fi -+ done - done - - if test -z "$MING_DIR"; then -@@ -28,16 +30,22 @@ - AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.) - fi - -+ for j in lib64 lib; do -+ if test -d $MING_DIR/$j; then -+ MING_LIBDIR=$MING_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [ - AC_DEFINE(HAVE_MING,1,[ ]) - ],[ - AC_MSG_ERROR([Ming library 0.2a or greater required.]) - ],[ -- -L$MING_DIR/lib -+ -L$MING_LIBDIR - ]) - - PHP_ADD_INCLUDE($MING_INC_DIR) -- PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_LIBDIR, MING_SHARED_LIBADD) - - AC_MSG_CHECKING([for destroySWFBlock]) - AC_TRY_RUN([ -diff -Nru php-4.4.1.orig/ext/msession/config.m4 php-4.4.1/ext/msession/config.m4 ---- php-4.4.1.orig/ext/msession/config.m4 2002-03-12 17:25:11.000000000 +0100 -+++ php-4.4.1/ext/msession/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -8,13 +8,17 @@ - if test "$PHP_MSESSION" != "no"; then - if test -r $PHP_MSESSION/lib/libphoenix.a; then - PHOENIX_DIR=$PHP_MSESSION -+ PHOENIX_LIBDIR=$PHP_MSESSION/lib - else - AC_MSG_CHECKING(for msession in default path) -- for i in /usr/local/phoenix /usr/local /usr; do -- if test -r $i/lib/libphoenix.a; then -- PHOENIX_DIR=$i -- AC_MSG_RESULT(found in $i) -- fi -+ for j in lib64 lib; do -+ for i in /usr/local/phoenix /usr/local /usr; do -+ if test -r $i/$j/libphoenix.a; then -+ PHOENIX_DIR=$i -+ PHOENIX_LIBDIR=$i/$j -+ AC_MSG_RESULT(found in $i) -+ fi -+ done - done - fi - -@@ -25,7 +29,7 @@ - - - AC_DEFINE(HAVE_MSESSION, 1, [ ]) -- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB) -+ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB) - PHOENIX_INCLUDE="-I$PHOENIX_DIR" - PHP_SUBST(PHOENIX_LIB) - -diff -Nru php-4.4.1.orig/ext/mssql/config.m4 php-4.4.1/ext/mssql/config.m4 ---- php-4.4.1.orig/ext/mssql/config.m4 2004-12-08 19:59:11.000000000 +0100 -+++ php-4.4.1/ext/mssql/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -19,6 +19,12 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $FREETDS_INSTALLATION_DIR/$j; then -+ FREETDS_INSTALLATION_DIR_LIBDIR=$FREETDS_INSTALLATION_DIR/$j -+ fi -+ done -+ - if test -z "$FREETDS_INSTALLATION_DIR"; then - AC_MSG_ERROR(Cannot find FreeTDS in known installation directories) - fi -@@ -32,12 +38,12 @@ - fi - fi - -- if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then -- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so]) -+ if test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.so"; then -+ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR_LIBDIR/libtds.[a|so]) - fi - - MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include -- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib -+ MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR_LIBDIR - - PHP_ADD_INCLUDE($MSSQL_INCDIR) - PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD) -diff -Nru php-4.4.1.orig/ext/mysql/config.m4 php-4.4.1/ext/mysql/config.m4 ---- php-4.4.1.orig/ext/mysql/config.m4 2005-07-26 16:02:00.000000000 +0200 -+++ php-4.4.1/ext/mysql/config.m4 2005-12-01 09:12:18.000000000 +0100 -@@ -121,7 +121,7 @@ - ;; - esac - -- for i in lib lib/mysql; do -+ for i in lib64 lib64/mysql lib lib/mysql; do - MYSQL_LIB_CHK($i) - done - -@@ -132,13 +132,18 @@ - PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_close, [ ], - [ - if test "$PHP_ZLIB_DIR" != "no"; then -+ for j in lib64 lib; do -+ if test -d $PHP_ZLIB_DIR/$j; then -+ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j -+ fi -+ done - PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, MYSQL_SHARED_LIBADD) - PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_error, [], [ - AC_MSG_ERROR([mysql configure failed. Please check config.log for more information.]) - ], [ -- -L$PHP_ZLIB_DIR/lib -L$MYSQL_LIB_DIR -+ -L$PHP_ZLIB_LIBDIR -L$MYSQL_LIB_DIR - ]) -- MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -lz" -+ MYSQL_LIBS="-L$PHP_ZLIB_LIBDIR -lz" - else - PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD) - PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_errno, [], [ -diff -Nru php-4.4.1.orig/ext/ncurses/config.m4 php-4.4.1/ext/ncurses/config.m4 ---- php-4.4.1.orig/ext/ncurses/config.m4 2003-12-09 21:33:22.000000000 +0100 -+++ php-4.4.1/ext/ncurses/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -38,20 +38,26 @@ - LIBNAME=ncurses - LIBSYMBOL=initscr - -+ for j in lib64 lib; do -+ if test -d $NCURSES_DIR/$j; then -+ NCURSES_LIBDIR=$NCURSES_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [ - AC_DEFINE(HAVE_NCURSESLIB,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD) - - PHP_CHECK_LIBRARY(panel, new_panel, [ - AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD) - ], [], [ -- -L$NCURSES_DIR/lib -l$LIBNAME -lm -+ -L$NCURSES_LIBDIR -l$LIBNAME -lm - ]) - ], [ - AC_MSG_ERROR(Wrong ncurses lib version or lib not found) - ], [ -- -L$NCURSES_DIR/lib -lm -+ -L$NCURSES_LIBDIR -lm - ]) - - AC_CHECK_LIB($LIBNAME, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])]) -diff -Nru php-4.4.1.orig/ext/odbc/config.m4 php-4.4.1/ext/odbc/config.m4 ---- php-4.4.1.orig/ext/odbc/config.m4 2005-04-22 01:02:23.000000000 +0200 -+++ php-4.4.1/ext/odbc/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -47,19 +47,8 @@ - # - # Check for the library files, and setup the ODBC_LIBS path... - # --if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ -- ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then -- # -- # we have an error and should bail out, as we can't find the libs! -- # -- echo "" -- echo "*********************************************************************" -- echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -- echo "* Please correct this by creating the following links and reconfiguring:" -- echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -- echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" -- echo "*********************************************************************" --else -+if test -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ -+ -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then - ODBC_LFLAGS=-L$1 - ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} - fi -@@ -100,8 +89,12 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ADABAS_LIBDIR=$withval/$i -+ test -f "$ADABAS_LIBDIR/odbclib.a" && break -+ done - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($ADABAS_LIBDIR) - ODBC_OBJS="$withval/lib/odbclib.a" - ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a" - $srcdir/build/shtool mkdir -f -p ext/odbc -@@ -132,8 +125,12 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ SAPDB_LIBDIR=$withval/$i -+ test -f "$SAPDB_LIBDIR/libsqlod.a" -o -f "$SAPDB_LIBDIR/libsqlod.$SHLIB_SUFFIX_NAME" && break -+ done - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($SAPDB_LIBDIR) - PHP_ADD_LIBRARY(sqlod) - ODBC_TYPE=sapdb - AC_DEFINE(HAVE_SAPDB,1,[ ]) -@@ -158,19 +155,36 @@ - withval=/usr/local/solid - fi - if test "$withval" != "no"; then -- ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib -- ODBC_INCLUDE=-I$ODBC_INCDIR -- ODBC_TYPE=solid -- if test -f $ODBC_LIBDIR/soc*35.a; then -- AC_DEFINE(HAVE_SOLID_35,1,[ ]) -- elif test -f $ODBC_LIBDIR/scl*30.a; then -- AC_DEFINE(HAVE_SOLID_30,1,[ ]) -- elif test -f $ODBC_LIBDIR/scl*23.a; then -- AC_DEFINE(HAVE_SOLID,1,[ ]) -+ for i in lib64 lib; do -+ SOLID_LIBDIR=$withval/$i -+ ODBC_INCDIR=$withval/include -+ ODBC_LIBDIR=$withval/$j -+ ODBC_INCLUDE=-I$ODBC_INCDIR -+ ODBC_TYPE=solid -+ if test -f $ODBC_LIBDIR/soc*35.a; then -+ AC_DEFINE(HAVE_SOLID_35,1,[ ]) -+ elif test -f $ODBC_LIBDIR/scl*30.a; then -+ AC_DEFINE(HAVE_SOLID_30,1,[ ]) -+ elif test -f $ODBC_LIBDIR/scl*23.a; then -+ AC_DEFINE(HAVE_SOLID,1,[ ]) -+ fi -+ AC_MSG_RESULT(yes) -+ ODBC_LIBS= -+ AC_FIND_SOLID_LIBS($ODBC_LIBDIR) -+ test -n "$ODBC_LIBS" && break -+ done -+ if test -z "$ODBC_LIBS"; then -+ # -+ # we have an error and should bail out, as we can't find the libs! -+ # -+ echo "" -+ echo "*********************************************************************" -+ echo "* Unable to locate ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -+ echo "* Please correct this by creating the following links and reconfiguring:" -+ echo "* ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -+ echo "* ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" -+ echo "*********************************************************************" - fi -- AC_MSG_RESULT(yes) -- AC_FIND_SOLID_LIBS($ODBC_LIBDIR) - else - AC_MSG_RESULT(no) - fi -@@ -400,11 +414,15 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -+ for i in lib64 lib; do -+ IODBC_LIBDIR=$withval/$i -+ test -f "$IODBC_LIBDIR/libiodbc.a" -o -f "$IODBC_LIBDIR/libiodbc.$SHLIB_SUFFIX_NAME" && break -+ done -+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $IODBC_LIBDIR) - PHP_ADD_INCLUDE($withval/include, 1) - ODBC_TYPE=iodbc - ODBC_INCLUDE=-I$withval/include -- ODBC_LFLAGS=-L$withval/lib -+ ODBC_LFLAGS=-L$IODBC_LIBDIR - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) - AC_DEFINE(HAVE_ODBC2,1,[ ]) -@@ -429,8 +447,11 @@ - withval=/usr/local/easysoft/oob/client - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ODBC_LIBDIR=$withval/$i -+ test -f "$ODBC_LIBDIR/libesoobclient.a" -o -f "$ODBC_LIBDIR/libesoobclient.$SHLIB_SUFFIX_NAME" && break -+ done - ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib - ODBC_LFLAGS=-L$ODBC_LIBDIR - ODBC_INCLUDE=-I$ODBC_INCDIR - ODBC_LIBS=-lesoobclient -@@ -456,8 +477,11 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ODBC_LIBDIR=$withval/$i -+ test -f "$ODBC_LIBDIR/libodbc.a" -o -f "$ODBC_LIBDIR/libodbc.$SHLIB_SUFFIX_NAME" && break -+ done - ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib - ODBC_LFLAGS=-L$ODBC_LIBDIR - ODBC_INCLUDE=-I$ODBC_INCDIR - ODBC_LIBS=-lodbc -diff -Nru php-4.4.1.orig/ext/pcre/config.m4 php-4.4.1/ext/pcre/config.m4 ---- php-4.4.1.orig/ext/pcre/config.m4 2005-08-09 19:41:56.000000000 +0200 -+++ php-4.4.1/ext/pcre/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -25,7 +25,7 @@ - AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX]) - fi - -- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do -+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib64 $PHP_PCRE_REGEX/lib; do - test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j - done - -diff -Nru php-4.4.1.orig/ext/pgsql/config.m4 php-4.4.1/ext/pgsql/config.m4 ---- php-4.4.1.orig/ext/pgsql/config.m4 2005-07-25 01:11:45.000000000 +0200 -+++ php-4.4.1/ext/pgsql/config.m4 2005-12-01 09:13:30.000000000 +0100 -@@ -44,7 +44,7 @@ - fi - done - -- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do -+ for j in lib64 lib lib64/pgsql lib/pgsql lib64/postgres lib/postgres lib64/postgresql lib/postgresql ""; do - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then - PGSQL_LIBDIR=$i/$j - fi -diff -Nru php-4.4.1.orig/ext/pspell/config.m4 php-4.4.1/ext/pspell/config.m4 ---- php-4.4.1.orig/ext/pspell/config.m4 2005-02-17 04:51:50.000000000 +0100 -+++ php-4.4.1/ext/pspell/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -27,7 +27,11 @@ - AC_MSG_ERROR(Cannot find pspell) - fi - -- PSPELL_LIBDIR=$PSPELL_DIR/lib -+ for j in lib64 lib; do -+ if test -d $PSPELL_DIR/$j; then -+ PSPELL_LIBDIR=$PSPELL_DIR/$j -+ fi -+ done - - PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD) - -diff -Nru php-4.4.1.orig/ext/readline/config.m4 php-4.4.1/ext/readline/config.m4 ---- php-4.4.1.orig/ext/readline/config.m4 2003-10-01 04:54:04.000000000 +0200 -+++ php-4.4.1/ext/readline/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -29,22 +29,28 @@ - ]) - ]) - -+ for j in lib64 lib; do -+ if test -d $READLINE_DIR/$j; then -+ READLINE_LIBDIR=$READLINE_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(readline, readline, - [ -- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(readline library not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_CHECK_LIBRARY(history, add_history, - [ -- PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(history library required by readline not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -@@ -73,13 +79,19 @@ - ]) - ]) - -+ for j in lib64 lib; do -+ if test -d $LIBEDIT_DIR/$j; then -+ LIBEDIT_LIBDIR=$LIBEDIT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(edit, readline, - [ -- PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(edit library required by readline not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -diff -Nru php-4.4.1.orig/ext/session/config.m4 php-4.4.1/ext/session/config.m4 ---- php-4.4.1.orig/ext/session/config.m4 2003-10-01 04:54:06.000000000 +0200 -+++ php-4.4.1/ext/session/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -24,8 +24,14 @@ - if test -z "$MM_DIR" ; then - AC_MSG_ERROR(cannot find mm library) - fi -- -- PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib, SESSION_SHARED_LIBADD) -+ -+ for j in lib64 lib; do -+ if test -d $MM_DIR/$j; then -+ MM_LIBDIR=$MM_DIR/$j -+ fi -+ done -+ -+ PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_LIBDIR, SESSION_SHARED_LIBADD) - PHP_ADD_INCLUDE($MM_DIR/include) - AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm]) - fi -diff -Nru php-4.4.1.orig/ext/snmp/config.m4 php-4.4.1/ext/snmp/config.m4 ---- php-4.4.1.orig/ext/snmp/config.m4 2003-09-23 10:16:47.000000000 +0200 -+++ php-4.4.1/ext/snmp/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -45,8 +45,8 @@ - test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp - test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp - done -- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do -- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib -+ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do -+ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i - done - else - SNMP_INCDIR=$PHP_SNMP/include -diff -Nru php-4.4.1.orig/ext/xml/config.m4 php-4.4.1/ext/xml/config.m4 ---- php-4.4.1.orig/ext/xml/config.m4 2004-12-20 21:38:18.000000000 +0100 -+++ php-4.4.1/ext/xml/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -33,6 +33,10 @@ - for i in $PHP_XML $PHP_EXPAT_DIR; do - if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then - EXPAT_DIR=$i -+ EXPAT_LIBDIR=$i/lib -+ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME ; then -+ EXPAT_DIR=$i -+ EXPAT_LIBDIR=$i/lib64 - fi - done - -@@ -41,7 +45,7 @@ - fi - - PHP_ADD_INCLUDE($EXPAT_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_LIBDIR, XML_SHARED_LIBADD) - PHP_SUBST(XML_SHARED_LIBADD) - fi - fi -diff -Nru php-4.4.1.orig/ext/xmlrpc/config.m4 php-4.4.1/ext/xmlrpc/config.m4 ---- php-4.4.1.orig/ext/xmlrpc/config.m4 2003-10-03 07:25:43.000000000 +0200 -+++ php-4.4.1/ext/xmlrpc/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -29,6 +29,12 @@ - PHP_ADD_INCLUDE($i/include) - testval=yes - break -+ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then -+ AC_DEFINE(HAVE_LIBEXPAT2,1,[ ]) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XMLRPC_SHARED_LIBADD) -+ PHP_ADD_INCLUDE($i/include) -+ testval=yes -+ break - fi - done - -@@ -87,6 +93,12 @@ - AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $XMLRPC_DIR/$j; then -+ XMLRPC_LIBDIR=$XMLRPC_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($XMLRPC_DIR) -- PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_LIBDIR, XMLRPC_SHARED_LIBADD) - fi -diff -Nru php-4.4.1.orig/ext/xslt/config.m4 php-4.4.1/ext/xslt/config.m4 ---- php-4.4.1.orig/ext/xslt/config.m4 2004-08-18 07:14:16.000000000 +0200 -+++ php-4.4.1/ext/xslt/config.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -104,6 +104,12 @@ - PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XSLT_SHARED_LIBADD) - found_expat=yes - break -+ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then -+ AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ]) -+ PHP_ADD_INCLUDE($i/include) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XSLT_SHARED_LIBADD) -+ found_expat=yes -+ break - fi - done - -@@ -124,29 +130,38 @@ - ]) - - if test "$PHP_SABLOT_JS" != "no"; then -- for i in $PHP_SABLOT_JS /usr/local /usr; do -- if test -f $i/lib/libjs.a -o -f $i/lib/libjs.$SHLIB_SUFFIX_NAME; then -- PHP_SABLOT_JS_DIR=$i -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_SABLOT_JS /usr/local /usr; do -+ if test -f $i/$j/libjs.a -o -f $i/$j/libjs.$SHLIB_SUFFIX_NAME; then -+ PHP_SABLOT_JS_DIR=$i -+ PHP_SABLOT_JS_LIBDIR=$i/$j -+ break -+ fi -+ done - done - - PHP_CHECK_LIBRARY(js, JS_GetRuntime, - [ -- PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_DIR/lib, XSLT_SHARED_LIBADD) -- PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_DIR/lib -ljs" -+ PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_LIBDIR, XSLT_SHARED_LIBADD) -+ PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_LIBDIR -ljs" - ], [ - AC_MSG_ERROR([libjs not found. Please check config.log for more information.]) - ], [ -- -L$PHP_SABLOT_JS_DIR/lib -+ -L$PHP_SABLOT_JS_LIBDIR - ]) - fi - -+ for j in lib64 lib; do -+ if test -d $XSLT_DIR/$j; then -+ XSLT_LIBDIR=$XSLT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(sablot, SablotSetEncoding, - [ - AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ]) - ], [], [ -- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS -+ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS - ]) - - dnl SablotSetOptions implemented in Sablotron CVS > 2002/10/31 -@@ -154,14 +169,14 @@ - [ - AC_DEFINE(HAVE_SABLOT_GET_OPTIONS, 1, [Whether Sablotron supports SablotGetOptions]) - ], [], [ -- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS -+ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS - ]) - - AC_DEFINE(HAVE_SABLOT_BACKEND, 1, [ ]) - fi - - PHP_ADD_INCLUDE($XSLT_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_DIR/lib, XSLT_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_LIBDIR, XSLT_SHARED_LIBADD) - - AC_DEFINE(HAVE_XSLT, 1, [ ]) - fi -diff -Nru php-4.4.1.orig/ext/zlib/config0.m4 php-4.4.1/ext/zlib/config0.m4 ---- php-4.4.1.orig/ext/zlib/config0.m4 2003-07-02 01:54:44.000000000 +0200 -+++ php-4.4.1/ext/zlib/config0.m4 2005-12-01 08:55:02.000000000 +0100 -@@ -36,15 +36,21 @@ - AC_MSG_ERROR(Cannot find libz) - fi - -+ for j in lib64 lib; do -+ if test -d $ZLIB_DIR/$j; then -+ ZLIB_LIBDIR=$ZLIB_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(z, gzgets, [ - AC_DEFINE(HAVE_ZLIB,1,[ ]) - ],[ - AC_MSG_ERROR(ZLIB extension requires zlib >= 1.0.9) - ],[ -- -L$ZLIB_DIR/lib -+ -L$ZLIB_LIBDIR - ]) - -- PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD) -+ PHP_ADD_LIBPATH($ZLIB_LIBDIR, ZLIB_SHARED_LIBADD) - - PHP_ZLIB_DIR=$ZLIB_DIR - PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD) diff --git a/dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch b/dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch deleted file mode 100644 index 2fa5fb30e139..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- sapi/apache2handler/sapi_apache2.c 2005-09-02 15:51:26.000000000 +0200 -+++ sapi/apache2handler/sapi_apache2.c 2005-12-08 18:43:54.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: sapi_apache2.c,v 1.40.2.11 2005/09/02 13:51:26 sniper Exp $ */ -+/* $Id: sapi_apache2.c,v 1.40.2.15 2005/11/29 13:30:11 dmitry Exp $ */ - - #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS - -@@ -436,6 +436,18 @@ - php_request_shutdown(NULL); - } - -+static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC) -+{ -+ if (strcmp(r->protocol, "INCLUDED")) { -+ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); -+ } -+ if (p) { -+ ((php_struct *)SG(server_context))->r = p; -+ } else { -+ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); -+ } -+} -+ - static int php_handler(request_rec *r) - { - php_struct *ctx; -@@ -446,15 +458,32 @@ - request_rec *parent_req = NULL; - TSRMLS_FETCH(); - -+#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC); -+ - conf = ap_get_module_config(r->per_dir_config, &php5_module); -+ -+ /* apply_config() needs r in some cases, so allocate server_context early */ -+ ctx = SG(server_context); -+ if (ctx == NULL) { -+normal: -+ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); -+ /* register a cleanup so we clear out the SG(server_context) -+ * after each request. Note: We pass in the pointer to the -+ * server_context in case this is handled by a different thread. -+ */ -+ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); -+ ctx->r = r; -+ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ -+ } else { -+ parent_req = ctx->r; -+ ctx->r = r; -+ } - apply_config(conf); - - if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { - /* Check for xbithack in this case. */ - if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return DECLINED; - } - } -@@ -463,32 +492,24 @@ - * the configuration; default behaviour is to accept. */ - if (r->used_path_info == AP_REQ_REJECT_PATH_INFO - && r->path_info && r->path_info[0]) { -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return HTTP_NOT_FOUND; - } - - /* handle situations where user turns the engine off */ - if (!AP2(engine)) { -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return DECLINED; - } - - if (r->finfo.filetype == 0) { - php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return HTTP_NOT_FOUND; - } - if (r->finfo.filetype == APR_DIR) { - php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); -- zend_try { -- zend_ini_deactivate(TSRMLS_C); -- } zend_end_try(); -+ PHPAP_INI_OFF; - return HTTP_FORBIDDEN; - } - -@@ -504,25 +525,24 @@ - - zend_first_try { - -- ctx = SG(server_context); - if (ctx == NULL) { --normal: -- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); -- /* register a cleanup so we clear out the SG(server_context) -- * after each request. Note: We pass in the pointer to the -- * server_context in case this is handled by a different thread. -- */ -- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); -- -- ctx->r = r; - brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); -+ ctx = SG(server_context); - ctx->brigade = brigade; - - if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { - zend_bailout(); - } - } else { -- parent_req = ctx->r; -+ if (!parent_req) { -+ parent_req = ctx->r; -+ } -+ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { -+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { -+ zend_bailout(); -+ } -+ } -+ - /* check if comming due to ErrorDocument */ - if (parent_req && parent_req->status != HTTP_OK) { - parent_req = NULL; diff --git a/dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch b/dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch deleted file mode 100644 index 4f16430d496f..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- ext/curl/interface.c 2005/06/02 21:04:43 1.46.2.8 -+++ ext/curl/interface.c 2005/11/29 11:03:29 1.46.2.13 -@@ -16,7 +16,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: interface.c,v 1.46.2.8 2005/06/02 21:04:43 tony2001 Exp $ */ -+/* $Id: interface.c,v 1.46.2.13 2005/11/29 11:03:29 dmitry Exp $ */ - - #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS - -@@ -62,8 +62,8 @@ static void _php_curl_close(zend_rsrc_li - #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); - - #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ -- if (PG(open_basedir) && *PG(open_basedir) && \ -- strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \ -+ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \ -+ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \ - { \ - php_url *tmp_url; \ - \ -@@ -72,7 +72,7 @@ static void _php_curl_close(zend_rsrc_li - RETURN_FALSE; \ - } \ - \ -- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ -+ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ - (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \ - ) { \ - php_url_free(tmp_url); \ -@@ -1128,10 +1128,15 @@ PHP_FUNCTION(curl_setopt) - * must be explicitly cast to long in curl_formadd - * use since curl needs a long not an int. */ - if (*postval == '@') { -+ ++postval; -+ /* safe_mode / open_basedir check */ -+ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) { -+ RETURN_FALSE; -+ } - error = curl_formadd(&first, &last, - CURLFORM_COPYNAME, string_key, - CURLFORM_NAMELENGTH, (long)string_key_len - 1, -- CURLFORM_FILE, ++postval, -+ CURLFORM_FILE, postval, - CURLFORM_END); - } else { - error = curl_formadd(&first, &last, diff --git a/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch b/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch deleted file mode 100644 index b945c11dcade..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- main/fopen_wrappers.c 2005/07/16 12:14:44 1.170.2.4 -+++ main/fopen_wrappers.c 2005/09/27 15:08:11 1.170.2.5 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: fopen_wrappers.c,v 1.170.2.4 2005/07/16 12:14:44 hyanantha Exp $ */ -+/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */ - - /* {{{ includes - */ -@@ -109,8 +109,8 @@ PHPAPI int php_check_specific_open_based - /* Handler for basedirs that end with a / */ - resolved_basedir_len = strlen(resolved_basedir); - if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { -- if (resolved_basedir[resolved_basedir_len - 1] == '/') { -- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; -+ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { -+ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; - resolved_basedir[++resolved_basedir_len] = '\0'; - } - } diff --git a/dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch b/dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch deleted file mode 100644 index 8b094320b510..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch +++ /dev/null @@ -1,95 +0,0 @@ ---- ext/gd/gd.c 2005-12-08 15:44:36.000000000 +0100 -+++ ext/gd/gd.c 2005-12-08 17:21:55.000000000 +0100 -@@ -705,7 +705,7 @@ - - convert_to_string_ex(file); - -- stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL); -+ stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL); - if (stream == NULL) { - RETURN_FALSE; - } -@@ -889,6 +889,10 @@ - convert_to_boolean_ex(dither); - convert_to_long_ex(ncolors); - -+ if (Z_LVAL_PP(ncolors) <= 0) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero"); -+ RETURN_FALSE; -+ } - gdImageTrueColorToPalette(im, Z_LVAL_PP(dither), Z_LVAL_PP(ncolors)); - - RETURN_TRUE; -@@ -1518,7 +1522,7 @@ - - fn = Z_STRVAL_PP(file); - -- stream = php_stream_open_wrapper(fn, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL); -+ stream = php_stream_open_wrapper(fn, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL); - if (stream == NULL) { - RETURN_FALSE; - } -@@ -1726,10 +1730,7 @@ - } - - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { -- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); - - fp = VCWD_FOPEN(fn, "wb"); - if (!fp) { -@@ -3824,16 +3825,10 @@ - } - - /* Check origin file */ -- if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn_org, "Invalid origin filename"); - - /* Check destination file */ -- if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest); -- RETURN_FALSE; -- } -+ PHP_GD_CHECK_OPEN_BASEDIR(fn_dest, "Invalid destination filename"); - - /* Open origin file */ - org = VCWD_FOPEN(fn_org, "rb"); ---- ext/gd/gd_ctx.c 2005-12-08 15:44:42.000000000 +0100 -+++ ext/gd/gd_ctx.c 2005-12-08 17:25:24.000000000 +0100 -@@ -82,10 +82,8 @@ - } - - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { -- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); -- RETURN_FALSE; -- } -+ -+ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); - - fp = VCWD_FOPEN(fn, "wb"); - if (!fp) { ---- ext/gd/php_gd.h 2005-12-08 15:44:49.000000000 +0100 -+++ ext/gd/php_gd.h 2005-12-08 17:29:53.000000000 +0100 -@@ -30,6 +30,15 @@ - - #if HAVE_LIBGD - -+/* open_basedir and safe_mode checks */ -+#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \ -+ if (!filename || php_check_open_basedir(filename TSRMLS_CC) || \ -+ (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \ -+ ) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \ -+ RETURN_FALSE; \ -+ } -+ - #define PHP_GDIMG_TYPE_GIF 1 - #define PHP_GDIMG_TYPE_PNG 2 - #define PHP_GDIMG_TYPE_JPG 3 diff --git a/dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch b/dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch deleted file mode 100644 index 20cedc94c588..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch +++ /dev/null @@ -1,192 +0,0 @@ ---- ext/standard/array.c 2005-09-01 14:01:01.000000000 +0200 -+++ ext/standard/array.c 2005-11-01 01:15:13.000000000 +0100 -@@ -21,7 +21,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: array.c,v 1.266.2.25 2005/09/01 12:01:01 dmitry Exp $ */ -+/* $Id: array.c,v 1.266.2.29 2005/10/28 09:57:15 dmitry Exp $ */ - - #include "php.h" - #include "php_ini.h" -@@ -1050,6 +1050,7 @@ - if (recursive && Z_TYPE_PP(args[0]) == IS_ARRAY) { - HashTable *thash; - -+ SEPARATE_ZVAL_TO_MAKE_IS_REF(args[0]); - thash = HASH_OF(*(args[0])); - if (thash == target_hash) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected"); -@@ -1373,6 +1374,10 @@ - /* break omitted intentionally */ - - case EXTR_OVERWRITE: -+ /* GLOBALS protection */ -+ if (var_exists && !strcmp(var_name, "GLOBALS")) { -+ break; -+ } - smart_str_appendl(&final_name, var_name, var_name_len); - break; - -@@ -2487,8 +2492,9 @@ - Z_LVAL_PP(tmp)++; - } - } else if (Z_TYPE_PP(entry) == IS_STRING) { -- /* make sure our array does not end up with numeric string keys */ -- if (is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) { -+ /* make sure our array does not end up with numeric string keys -+ * but don't touch those strings that start with 0 */ -+ if (!(Z_STRLEN_PP(entry) > 1 && Z_STRVAL_PP(entry)[0] == '0') && is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) { - zval tmp_entry; - - tmp_entry = **entry; -@@ -3975,7 +3981,7 @@ - PHP_FUNCTION(array_filter) - { - zval **input, **callback = NULL; -- zval *array; -+ zval *array, *func = NULL; - zval **operand; - zval **args[1]; - zval *retval = NULL; -@@ -3995,10 +4001,13 @@ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array"); - return; - } -+ if (callback) { -+ func = *callback; -+ } - array = *input; - - if (ZEND_NUM_ARGS() > 1) { -- if (!zend_is_callable(*callback, 0, &callback_name)) { -+ if (!zend_is_callable(func, 0, &callback_name)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument, '%s', should be a valid callback", callback_name); - efree(callback_name); - return; -@@ -4015,14 +4024,14 @@ - zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **)&operand, &pos) == SUCCESS; - zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) { - -- if (callback) { -+ if (func) { - zend_fcall_info fci; - - args[0] = operand; - - fci.size = sizeof(fci); - fci.function_table = EG(function_table); -- fci.function_name = *callback; -+ fci.function_name = func; - fci.symbol_table = NULL; - fci.object_pp = NULL; - fci.retval_ptr_ptr = &retval; ---- ext/standard/basic_functions.c 2005-08-21 20:36:33.000000000 +0200 -+++ ext/standard/basic_functions.c 2005-11-01 01:15:20.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: basic_functions.c,v 1.673.2.18 2005/08/21 18:36:33 zeev Exp $ */ -+/* $Id: basic_functions.c,v 1.673.2.21 2005/09/29 16:31:20 iliaa Exp $ */ - - #include "php.h" - #include "php_streams.h" -@@ -3076,11 +3077,25 @@ - prefix = va_arg(args, char *); - prefix_len = va_arg(args, uint); - -- new_key_len = prefix_len + hash_key->nKeyLength; -- new_key = (char *) emalloc(new_key_len); -+ if (!prefix_len) { -+ if (!hash_key->nKeyLength) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard."); -+ return 0; -+ } else if (!strcmp(hash_key->arKey, "GLOBALS")) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite."); -+ return 0; -+ } -+ } -+ -+ if (hash_key->nKeyLength) { -+ new_key_len = prefix_len + hash_key->nKeyLength; -+ new_key = (char *) emalloc(new_key_len); - -- memcpy(new_key, prefix, prefix_len); -- memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength); -+ memcpy(new_key, prefix, prefix_len); -+ memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength); -+ } else { -+ new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h); -+ } - - zend_hash_del(&EG(symbol_table), new_key, new_key_len); - ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0); ---- ext/standard/string.c 2005-07-16 13:18:35.000000000 +0200 -+++ ext/standard/string.c 2005-11-01 01:15:27.000000000 +0100 -@@ -18,7 +18,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: string.c,v 1.420.2.12 2005/07/16 11:18:35 hyanantha Exp $ */ -+/* $Id: string.c,v 1.420.2.13 2005/09/28 22:35:43 iliaa Exp $ */ - - /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ - -@@ -3809,7 +3809,6 @@ - zval *sarg; - char *res = NULL; - int argCount; -- int old_rg; - - argCount = ZEND_NUM_ARGS(); - if (argCount < 1 || argCount > 2 || zend_get_parameters_ex(argCount, &arg, &arrayArg) == FAILURE) { -@@ -3822,19 +3821,18 @@ - res = estrndup(Z_STRVAL_P(sarg), Z_STRLEN_P(sarg)); - } - -- old_rg = PG(register_globals); - if (argCount == 1) { -- PG(register_globals) = 1; -- sapi_module.treat_data(PARSE_STRING, res, NULL TSRMLS_CC); -+ zval tmp; -+ Z_ARRVAL(tmp) = EG(active_symbol_table); -+ -+ sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC); - } else { -- PG(register_globals) = 0; - /* Clear out the array that was passed in. */ - zval_dtor(*arrayArg); - array_init(*arrayArg); - - sapi_module.treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC); - } -- PG(register_globals) = old_rg; - } - /* }}} */ - ---- main/php_variables.c 2005-09-01 21:15:51.000000000 +0200 -+++ main/php_variables.c 2005-11-01 01:16:22.000000000 +0100 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: php_variables.c,v 1.81.2.12 2005/09/01 19:15:51 iliaa Exp $ */ -+/* $Id: php_variables.c,v 1.81.2.13 2005/09/28 22:35:42 iliaa Exp $ */ - - #include <stdio.h> - #include "php.h" -@@ -103,6 +103,13 @@ - zval_dtor(val); - return; - } -+ -+ /* GLOBALS hijack attempt, reject parameter */ -+ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) { -+ zval_dtor(val); -+ return; -+ } -+ - /* ensure that we don't have spaces or dots in the variable name (not binary safe) */ - for (p=var; *p; p++) { - switch(*p) { diff --git a/dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch b/dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch deleted file mode 100644 index 93701e976e1f..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- ext/mbstring/mbstring.c 2005/02/21 15:15:08 1.214.2.4 -+++ ext/mbstring/mbstring.c 2005/11/25 22:18:45 1.214.2.7 -@@ -17,7 +17,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: mbstring.c,v 1.214.2.4 2005/02/21 15:15:08 moriyoshi Exp $ */ -+/* $Id: mbstring.c,v 1.214.2.7 2005/11/25 22:18:45 hirokawa Exp $ */ - - /* - * PHP 4 Multibyte String module "mbstring" -@@ -2267,7 +2267,7 @@ PHP_FUNCTION(mb_list_encodings) - } - /* }}} */ - --/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]]) -+/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]]) - Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */ - PHP_FUNCTION(mb_encode_mimeheader) - { -@@ -2279,12 +2279,13 @@ PHP_FUNCTION(mb_encode_mimeheader) - int trans_enc_name_len; - char *linefeed = "\r\n"; - int linefeed_len; -+ int indent = 0; - - mbfl_string_init(&string); - string.no_language = MBSTRG(current_language); - string.no_encoding = MBSTRG(current_internal_encoding); - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sss", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) { - return; - } - -@@ -2314,7 +2315,7 @@ PHP_FUNCTION(mb_encode_mimeheader) - } - - mbfl_string_init(&result); -- ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, 0); -+ ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent); - if (ret != NULL) { - RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */ - } else { -@@ -2770,6 +2771,15 @@ PHP_FUNCTION(mb_decode_numericentity) - */ - #if HAVE_SENDMAIL - -+#define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \ -+ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \ -+ pos += 3; \ -+ while (str[pos] == ' ' || str[pos] == '\t') { \ -+ pos++; \ -+ } \ -+ continue; \ -+ } -+ - #define APPEND_ONE_CHAR(ch) do { \ - if (token.a > 0) { \ - smart_str_appendc(&token, ch); \ -@@ -2981,6 +2991,9 @@ PHP_FUNCTION(mb_send_mail) - int subject_len; - char *extra_cmd=NULL; - int extra_cmd_len; -+ int i; -+ char *to_r; -+ char *force_extra_parameters = INI_STR("mail.force_extra_parameters"); - struct { - int cnt_type:1; - int cnt_trans_enc:1; -@@ -3086,7 +3099,30 @@ PHP_FUNCTION(mb_send_mail) - } - - /* To: */ -- if (to == NULL || to_len <= 0) { -+ if (to != NULL) { -+ if (to_len > 0) { -+ to_r = estrndup(to, to_len); -+ for (; to_len; to_len--) { -+ if (!isspace((unsigned char) to_r[to_len - 1])) { -+ break; -+ } -+ to_r[to_len - 1] = '\0'; -+ } -+ for (i = 0; to_r[i]; i++) { -+ if (iscntrl((unsigned char) to_r[i])) { -+ /* According to RFC 822, section 3.1.1 long headers may be separated into -+ * parts using CRLF followed at least one linear-white-space character ('\t' or ' '). -+ * To prevent these separators from being replaced with a space, we use the -+ * SKIP_LONG_HEADER_SEP_MBSTRING to skip over them. -+ */ -+ SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i); -+ to_r[i] = ' '; -+ } -+ } -+ } else { -+ to_r = to; -+ } -+ } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field"); - err = 1; - } -@@ -3182,12 +3218,20 @@ PHP_FUNCTION(mb_send_mail) - mbfl_memory_device_output('\0', &device); - headers = (char *)device.buffer; - -- if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) { -+ if (force_extra_parameters) { -+ extra_cmd = estrdup(force_extra_parameters); -+ } else if (extra_cmd) { -+ extra_cmd = php_escape_shell_cmd(extra_cmd); -+ } -+ -+ if (!err && php_mail(to_r, subject, message, headers, extra_cmd TSRMLS_CC)) { - RETVAL_TRUE; - } else { - RETVAL_FALSE; - } -- -+ if (to_r != to) { -+ efree(to_r); -+ } - if (subject_buf) { - efree((void *)subject_buf); - } -@@ -3198,6 +3242,7 @@ PHP_FUNCTION(mb_send_mail) - zend_hash_destroy(&ht_headers); - } - -+#undef SKIP_LONG_HEADER_SEP_MBSTRING - #undef APPEND_ONE_CHAR - #undef SEPARATE_SMART_STR - #undef PHP_MBSTR_MAIL_MIME_HEADER1 diff --git a/dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch b/dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch deleted file mode 100644 index 6580e1b1d8cd..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch +++ /dev/null @@ -1,1372 +0,0 @@ -diff -Nru php-5.0.5.orig/acinclude.m4 php-5.0.5/acinclude.m4 ---- php-5.0.5.orig/acinclude.m4 2005-07-26 00:31:07.000000000 +0200 -+++ php-5.0.5/acinclude.m4 2005-12-04 16:12:45.000000000 +0100 -@@ -190,7 +190,7 @@ - unset ac_new_flags - for i in [$]$1; do - case [$]i in -- -L/usr/lib|-L/usr/lib/[)] ;; -+ -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/[)] ;; - *[)] ac_new_flags="[$]ac_new_flags [$]i" ;; - esac - done -@@ -641,7 +641,7 @@ - ]) - - AC_DEFUN([PHP_PROG_SENDMAIL],[ --PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib -+PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64 - AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) - if test -n "$PROG_SENDMAIL"; then - AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) -@@ -852,7 +852,9 @@ - dnl add a library to linkpath/runpath - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/lib"; then -+ case x$1 in -+ x/usr/lib|x/usr/lib64) ;; -+ *) - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -862,8 +864,8 @@ - else - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl -@@ -1669,15 +1671,20 @@ - fi - - for i in $PHP_KERBEROS; do -- if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then -+ if test -f $i/lib/libkrb5.a -o -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then - PHP_KERBEROS_DIR=$i -+ PHP_KERBEROS_LIBDIR=$i/lib -+ break -+ elif test -f $i/lib64/libkrb5.a -o -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then -+ PHP_KERBEROS_DIR=$i -+ PHP_KERBEROS_LIBDIR=$i/lib64 - break - fi - done - - if test "$PHP_KERBEROS_DIR"; then - found_kerberos=yes -- PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1) -+ PHP_ADD_LIBPATH($PHP_KERBEROS_LIBDIR, $1) - PHP_ADD_LIBRARY(gssapi_krb5, 1, $1) - PHP_ADD_LIBRARY(krb5, 1, $1) - PHP_ADD_LIBRARY(k5crypto, 1, $1) -@@ -1749,6 +1756,9 @@ - if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib - fi -+ if test -r $i/lib64/libssl.a -o -r $i/lib64/libssl.$SHLIB_SUFFIX_NAME; then -+ OPENSSL_LIBDIR=$i/lib64 -+ fi - test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break - done - -@@ -1869,7 +1879,9 @@ - fi - - if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a || -- test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME -+ test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || -+ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.a || -+ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME - then - PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ - found_iconv=yes -diff -Nru php-5.0.5.orig/ext/bz2/config.m4 php-5.0.5/ext/bz2/config.m4 ---- php-5.0.5.orig/ext/bz2/config.m4 2004-01-21 06:04:30.000000000 +0100 -+++ php-5.0.5/ext/bz2/config.m4 2005-12-04 16:41:58.000000000 +0100 -@@ -19,6 +19,12 @@ - done - fi - -+ for j in lib64 lib; do -+ if test -d $BZIP_DIR/$j; then -+ BZIP_LIBDIR=$BZIP_DIR/$j -+ fi -+ done -+ - if test -z "$BZIP_DIR"; then - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Please reinstall the BZip2 distribution) -@@ -27,12 +33,12 @@ - PHP_CHECK_LIBRARY(bz2, BZ2_bzerror, - [ - PHP_ADD_INCLUDE($BZIP_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_LIBDIR, BZ2_SHARED_LIBADD) - AC_DEFINE(HAVE_BZ2,1,[ ]) - ], [ - AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0) - ], [ -- -L$BZIP_DIR/lib -+ -L$BZIP_LIBDIR - ]) - - PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared) -diff -Nru php-5.0.5.orig/ext/curl/config.m4 php-5.0.5/ext/curl/config.m4 ---- php-5.0.5.orig/ext/curl/config.m4 2005-02-09 17:23:31.000000000 +0100 -+++ php-5.0.5/ext/curl/config.m4 2005-12-04 16:43:25.000000000 +0100 -@@ -49,9 +49,15 @@ - AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support) - fi - -+ for j in lib64 lib; do -+ if test -d $CURL_DIR/$j; then -+ CURL_LIBDIR=$CURL_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($CURL_DIR/include) - PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_LIBDIR, CURL_SHARED_LIBADD) - - PHP_CHECK_LIBRARY(curl,curl_easy_perform, - [ -@@ -59,14 +65,14 @@ - ],[ - AC_MSG_ERROR(There is something wrong. Please check config.log for more information.) - ],[ -- $CURL_LIBS -L$CURL_DIR/lib -+ $CURL_LIBS -L$CURL_LIBDIR - ]) - - PHP_CHECK_LIBRARY(curl,curl_version_info, - [ - AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ]) - ],[],[ -- $CURL_LIBS -L$CURL_DIR/lib -+ $CURL_LIBS -L$CURL_LIBDIR - ]) - - if test "$PHP_CURLWRAPPERS" != "no" ; then -diff -Nru php-5.0.5.orig/ext/dba/config.m4 php-5.0.5/ext/dba/config.m4 ---- php-5.0.5.orig/ext/dba/config.m4 2005-08-22 21:59:36.000000000 +0200 -+++ php-5.0.5/ext/dba/config.m4 2005-12-04 16:58:22.000000000 +0100 -@@ -80,13 +80,19 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in qdbm; do - PHP_CHECK_LIBRARY($LIB, dpopen, [ - AC_DEFINE_UNQUOTED(QDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_QDBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -115,12 +121,18 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - PHP_CHECK_LIBRARY(gdbm, gdbm_open, [ - AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_GDBM, 1, [ ]) - THIS_LIBS=gdbm -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - fi - - PHP_DBA_STD_ASSIGN -@@ -145,14 +157,20 @@ - break - fi - done -- -+ -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in ndbm db1 c; do - PHP_CHECK_LIBRARY($LIB, dbm_open, [ - AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_NDBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -170,25 +188,28 @@ - dnl parameters(version, library list, function) - AC_DEFUN([PHP_DBA_DB_CHECK],[ - for LIB in $2; do -- if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then -- PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[ -- AC_TRY_LINK([ -+ for LIBDIR in lib64 lib; do -+ if test -f $THIS_PREFIX/$LIBDIR/lib$LIB.a -o -f $THIS_PREFIX/$LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then -+ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$LIBDIR, -l$LIB,[ -+ AC_TRY_LINK([ - #include "$THIS_INCLUDE" -- ],[ -- $3; -- ],[ -- AC_EGREP_CPP(yes,[ -+ ],[ -+ $3; -+ ],[ -+ AC_EGREP_CPP(yes,[ - #include "$THIS_INCLUDE" - #if DB_VERSION_MAJOR == $1 -- yes -+ yes - #endif -- ],[ -- THIS_LIBS=$LIB -- break -+ ],[ -+ THIS_LIBS=$LIB -+ break -+ ]) - ]) - ]) -- ]) -- fi -+ fi -+ done -+ test -n "$THIS_LIBS" && break - done - if test -z "$THIS_LIBS"; then - AC_MSG_CHECKING(for db$1 major version) -@@ -352,6 +373,12 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in dbm c gdbm; do - PHP_CHECK_LIBRARY($LIB, dbminit, [ -@@ -366,7 +393,7 @@ - fi - AC_DEFINE(DBA_DBM, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -@@ -402,13 +429,19 @@ - fi - done - -+ for j in lib64 lib; do -+ if test -d $THIS_PREFIX/$j; then -+ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j -+ fi -+ done -+ - if test -n "$THIS_INCLUDE"; then - for LIB in cdb c; do - PHP_CHECK_LIBRARY($LIB, cdb_read, [ - AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_CDB, 1, [ ]) - THIS_LIBS=$LIB -- ], [], [-L$THIS_PREFIX/lib]) -+ ], [], [-L$THIS_PREFIX_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi -diff -Nru php-5.0.5.orig/ext/gd/config.m4 php-5.0.5/ext/gd/config.m4 ---- php-5.0.5.orig/ext/gd/config.m4 2005-05-17 14:23:02.000000000 +0200 -+++ php-5.0.5/ext/gd/config.m4 2005-12-04 17:20:08.000000000 +0100 -@@ -50,8 +50,15 @@ - AC_DEFUN([PHP_GD_JPEG],[ - if test "$PHP_JPEG_DIR" != "no"; then - -- for i in $PHP_JPEG_DIR /usr/local /usr; do -- test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_JPEG_DIR /usr/local /usr; do -+ if test -f "$i/$j/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libjpeg.a"; then -+ GD_JPEG_DIR=$i -+ GD_JPEG_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_JPEG_DIR" && break - done - - if test -z "$GD_JPEG_DIR"; then -@@ -61,11 +68,11 @@ - PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, - [ - PHP_ADD_INCLUDE($GD_JPEG_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libjpeg.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_JPEG_DIR/lib -+ -L$GD_JPEG_LIB_DIR - ]) - else - AC_MSG_RESULT([If configure fails try --with-jpeg-dir=<DIR>]) -@@ -75,8 +82,15 @@ - AC_DEFUN([PHP_GD_PNG],[ - if test "$PHP_PNG_DIR" != "no"; then - -- for i in $PHP_PNG_DIR /usr/local /usr; do -- test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_PNG_DIR /usr/local /usr; do -+ if test -f "$i/$j/libpng.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libpng.a"; then -+ GD_PNG_DIR=$i -+ GD_PNG_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_PNG_DIR" && break - done - - if test -z "$GD_PNG_DIR"; then -@@ -91,15 +105,21 @@ - AC_MSG_ERROR([png.h not found.]) - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_ZLIB_DIR/$j; then -+ PHP_ZLIB_LIB_DIR=$PHP_ZLIB_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(png,png_write_image, - [ - PHP_ADD_INCLUDE($GD_PNG_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, GD_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIB_DIR, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.]) - ],[ -- -L$PHP_ZLIB_DIR/lib -lz -L$GD_PNG_DIR/lib -+ -L$PHP_ZLIB_LIB_DIR -lz -L$GD_PNG_LIB_DIR - ]) - - else -@@ -110,8 +130,15 @@ - AC_DEFUN([PHP_GD_XPM],[ - if test "$PHP_XPM_DIR" != "no"; then - -- for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do -- test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do -+ if test -f "$i/$j/libXpm.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libXpm.a"; then -+ GD_XPM_DIR=$i -+ GD_XPM_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_XPM_DIR" && break - done - - if test -z "$GD_XPM_DIR"; then -@@ -129,12 +156,12 @@ - PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage, - [ - PHP_ADD_INCLUDE($GD_XPM_INC) -- PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD) -- PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_XPM_DIR/lib -lX11 -+ -L$GD_XPM_LIB_DIR -lX11 - ]) - else - AC_MSG_RESULT(If configure fails try --with-xpm-dir=<DIR>) -@@ -145,25 +172,29 @@ - if test "$PHP_TTF" != "no"; then - if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then - if test -n "$PHP_TTF"; then -- for i in $PHP_TTF /usr/local /usr; do -- if test -f "$i/include/freetype.h"; then -- TTF_DIR=$i -- unset TTF_INC_DIR -- fi -- if test -f "$i/include/freetype/freetype.h"; then -- TTF_DIR=$i -- TTF_INC_DIR=$i/include/freetype -- fi -- if test -f "$i/include/freetype1/freetype/freetype.h"; then -- TTF_DIR=$i -- TTF_INC_DIR=$i/include/freetype1/freetype -- fi -+ for j in lib64 lib; do -+ for i in $PHP_TTF /usr/local /usr; do -+ if test -f "$i/$j/libttf.a" -o -f "$i/$j/libttf.$SHLIB_SUFFIX_NAME"; then -+ TTF_DIR=$i -+ TTF_LIB_DIR=$i/$j -+ if test -f "$i/include/freetype.h"; then -+ unset TTF_INC_DIR -+ elif test -f "$i/include/freetype/freetype.h"; then -+ TTF_INC_DIR=$i/include/freetype -+ elif test -f "$i/include/freetype1/freetype/freetype.h"; then -+ TTF_INC_DIR=$i/include/freetype1/freetype -+ else -+ unset TTF_DIR -+ fi -+ fi -+ test -n "$TTF_DIR" && break -+ done - test -n "$TTF_DIR" && break - done - fi - if test -n "$TTF_DIR" ; then - AC_DEFINE(HAVE_LIBTTF,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_LIB_DIR, GD_SHARED_LIBADD) - fi - if test -z "$TTF_INC_DIR"; then - TTF_INC_DIR=$TTF_DIR/include -@@ -179,16 +210,21 @@ - AC_DEFUN([PHP_GD_FREETYPE2],[ - if test "$PHP_FREETYPE_DIR" != "no"; then - -- for i in $PHP_FREETYPE_DIR /usr/local /usr; do -- if test -f "$i/include/freetype2/freetype/freetype.h"; then -- FREETYPE2_DIR=$i -- FREETYPE2_INC_DIR=$i/include/freetype2 -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do -+ if test -f "$i/include/freetype2/freetype/freetype.h" && \ -+ test -f "$i/$j/libfreetype.a" -o -f "$i/$j/libfreetype.$SHLIB_SUFFIX_NAME"; then -+ FREETYPE2_DIR=$i -+ FREETYPE2_LIB_DIR=$i/$j -+ FREETYPE2_INC_DIR=$i/include/freetype2 -+ break -+ fi -+ done -+ test -n "$FREETYPE2_DIR" && break - done - - if test -n "$FREETYPE2_DIR" ; then -- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_LIB_DIR, GD_SHARED_LIBADD) - PHP_ADD_INCLUDE($FREETYPE2_DIR/include) - PHP_ADD_INCLUDE($FREETYPE2_INC_DIR) - AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) -@@ -204,8 +240,16 @@ - AC_DEFUN([PHP_GD_T1LIB],[ - if test "$PHP_T1LIB" != "no"; then - -- for i in $PHP_T1LIB /usr/local /usr; do -- test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break -+ for j in lib64 lib; do -+ for i in $PHP_T1LIB /usr/local /usr; do -+ if test -f "$i/include/t1lib.h" && \ -+ test -f "$i/$j/libt1.a" -o -f "$i/$j/libt1.$SHLIB_SUFFIX_NAME"; then -+ GD_T1_DIR=$i -+ GD_T1_LIB_DIR=$i/$j -+ break -+ fi -+ done -+ test -n "$GD_T1_DIR" && break - done - - if test -z "$GD_T1_DIR"; then -@@ -216,11 +260,11 @@ - [ - AC_DEFINE(HAVE_LIBT1,1,[ ]) - PHP_ADD_INCLUDE($GD_T1_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_DIR/lib, GD_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_LIB_DIR, GD_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.]) - ],[ -- -L$GD_T1_DIR/lib -+ -L$GD_T1_LIB_DIR - ]) - fi - ]) -@@ -366,7 +410,7 @@ - done - - dnl Library path -- for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do -+ for i in lib/gd1.3 lib64/gd1.3 lib/gd lib64/gd lib lib64 gd1.3 gd ""; do - test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i" - done - -diff -Nru php-5.0.5.orig/ext/gettext/config.m4 php-5.0.5/ext/gettext/config.m4 ---- php-5.0.5.orig/ext/gettext/config.m4 2003-10-01 04:53:07.000000000 +0200 -+++ php-5.0.5/ext/gettext/config.m4 2005-12-04 17:04:33.000000000 +0100 -@@ -14,11 +14,15 @@ - AC_MSG_ERROR(Cannot locate header file libintl.h) - fi - -- GETTEXT_LIBDIR=$GETTEXT_DIR/lib -+ for j in lib64 lib; do -+ if test -d $GETTEXT_DIR/$j; then -+ GETTEXT_LIBDIR=$GETTEXT_DIR/$j -+ fi -+ done -+ - GETTEXT_INCDIR=$GETTEXT_DIR/include - - O_LDFLAGS=$LDFLAGS -- LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" - AC_CHECK_LIB(intl, bindtextdomain, [ - GETTEXT_LIBS=intl - GETTEXT_CHECK_IN_LIB=intl -diff -Nru php-5.0.5.orig/ext/gmp/config.m4 php-5.0.5/ext/gmp/config.m4 ---- php-5.0.5.orig/ext/gmp/config.m4 2003-11-19 05:44:06.000000000 +0100 -+++ php-5.0.5/ext/gmp/config.m4 2005-12-04 17:05:51.000000000 +0100 -@@ -14,20 +14,26 @@ - if test -z "$GMP_DIR"; then - AC_MSG_ERROR(Unable to locate gmp.h) - fi -- -+ -+ for j in lib64 lib; do -+ if test -d $GMP_DIR/$j; then -+ GMP_LIBDIR=$GMP_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size, - [],[ - PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size, - [],[ - AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.]) - ],[ -- -L$GMP_DIR/lib -+ -L$GMP_LIBDIR - ]) - ],[ -- -L$GMP_DIR/lib -+ -L$GMP_LIBDIR - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_LIBDIR, GMP_SHARED_LIBADD) - PHP_ADD_INCLUDE($GMP_DIR/include) - - PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared) -diff -Nru php-5.0.5.orig/ext/iconv/config.m4 php-5.0.5/ext/iconv/config.m4 ---- php-5.0.5.orig/ext/iconv/config.m4 2005-01-10 22:37:59.000000000 +0100 -+++ php-5.0.5/ext/iconv/config.m4 2005-12-04 17:13:26.000000000 +0100 -@@ -23,8 +23,14 @@ - PHP_ICONV_PREFIX="$ICONV_DIR" - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_ICONV_PREFIX/$j; then -+ PHP_ICONV_PREFIX_LIBDIR=$PHP_ICONV_PREFIX/$j -+ fi -+ done -+ - CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" -- LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS" -+ LDFLAGS="-L$PHP_ICONV_PREFIX_LIBDIR $LDFLAGS" - - if test -r $PHP_ICONV_PREFIX/include/giconv.h; then - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" -diff -Nru php-5.0.5.orig/ext/imap/config.m4 php-5.0.5/ext/imap/config.m4 ---- php-5.0.5.orig/ext/imap/config.m4 2005-01-11 05:56:44.000000000 +0100 -+++ php-5.0.5/ext/imap/config.m4 2005-12-04 16:10:26.000000000 +0100 -@@ -155,6 +155,7 @@ - for lib in c-client4 c-client imap; do - IMAP_LIB=$lib - IMAP_LIB_CHK(lib) -+ IMAP_LIB_CHK(lib64) - IMAP_LIB_CHK(c-client) - done - -diff -Nru php-5.0.5.orig/ext/interbase/config.m4 php-5.0.5/ext/interbase/config.m4 ---- php-5.0.5.orig/ext/interbase/config.m4 2004-05-12 16:29:42.000000000 +0200 -+++ php-5.0.5/ext/interbase/config.m4 2005-12-04 19:10:10.000000000 +0100 -@@ -9,10 +9,18 @@ - if test "$PHP_INTERBASE" != "no"; then - if test "$PHP_INTERBASE" = "yes"; then - IBASE_INCDIR=/usr/interbase/include -- IBASE_LIBDIR=/usr/interbase/lib -+ for j in lib64 lib; do -+ if test -d /usr/interbase/$j; then -+ IBASE_LIBDIR=/usr/interbase/$j -+ fi -+ done - else - IBASE_INCDIR=$PHP_INTERBASE/include -- IBASE_LIBDIR=$PHP_INTERBASE/lib -+ for j in lib64 lib; do -+ if test -d $PHP_INTERBASE/$j; then -+ IBASE_LIBDIR=$PHP_INTERBASE/$j -+ fi -+ done - fi - - PHP_CHECK_LIBRARY(fbclient, isc_detach_database, -diff -Nru php-5.0.5.orig/ext/ldap/config.m4 php-5.0.5/ext/ldap/config.m4 ---- php-5.0.5.orig/ext/ldap/config.m4 2005-05-08 17:59:18.000000000 +0200 -+++ php-5.0.5/ext/ldap/config.m4 2005-12-04 19:15:50.000000000 +0100 -@@ -6,7 +6,8 @@ - if test -f $1/include/ldap.h; then - LDAP_DIR=$1 - LDAP_INCDIR=$1/include -- LDAP_LIBDIR=$1/lib -+ test -f $1/lib/libldap.so && LDAP_LIBDIR=$1/lib -+ test -f $1/lib64/libldap.so && LDAP_LIBDIR=$1/lib64 - elif test -f $1/include/umich-ldap/ldap.h; then - LDAP_DIR=$1 - LDAP_INCDIR=$1/include/umich-ldap -@@ -39,7 +40,11 @@ - - if test "$LDAP_SASL_DIR"; then - LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include -- LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/lib -+ for j in lib64 lib; do -+ if test -d $LDAP_SASL_DIR/$j; then -+ LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$j -+ fi -+ done - else - AC_MSG_ERROR([sasl.h not found!]) - fi -diff -Nru php-5.0.5.orig/ext/mbstring/config.m4 php-5.0.5/ext/mbstring/config.m4 ---- php-5.0.5.orig/ext/mbstring/config.m4 2005-02-21 00:02:48.000000000 +0100 -+++ php-5.0.5/ext/mbstring/config.m4 2005-12-04 19:18:03.000000000 +0100 -@@ -235,12 +235,18 @@ - PHP_ADD_INCLUDE([$PHP_LIBMBFL_INCLUDE]) - fi - -+ for j in lib64 lib; do -+ if test -d $PHP_LIBMBFL/$j; then -+ PHP_LIBMBFL_LIBDIR=$PHP_LIBMBFL/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mbfl, mbfl_buffer_converter_new, [ -- PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL/lib, MBSTRING_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL_LIBDIR, MBSTRING_SHARED_LIBADD) - ],[ - AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) - ], [ -- -LPHP_LIBMBFL/lib -+ -L$PHP_LIBMBFL_LIBDIR - ]) - fi - ]) -diff -Nru php-5.0.5.orig/ext/mcrypt/config.m4 php-5.0.5/ext/mcrypt/config.m4 ---- php-5.0.5.orig/ext/mcrypt/config.m4 2005-01-22 02:36:56.000000000 +0100 -+++ php-5.0.5/ext/mcrypt/config.m4 2005-12-04 19:33:28.000000000 +0100 -@@ -34,6 +34,12 @@ - - PHP_MCRYPT_CHECK_VERSION - -+ for j in lib64 lib; do -+ if test -d $MCRYPT_DIR/$j; then -+ MCRYPT_LIBDIR=MCRYPT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, - [ - PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD) -@@ -45,13 +51,13 @@ - ],[ - AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.]) - ],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ -- -L$MCRYPT_DIR/lib -lltdl -+ -L$MCRYPT_LIBDIR -lltdl - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD) - PHP_ADD_INCLUDE($MCRYPT_DIR/include) - - PHP_SUBST(MCRYPT_SHARED_LIBADD) -diff -Nru php-5.0.5.orig/ext/mcve/config.m4 php-5.0.5/ext/mcve/config.m4 ---- php-5.0.5.orig/ext/mcve/config.m4 2004-12-08 07:47:07.000000000 +0100 -+++ php-5.0.5/ext/mcve/config.m4 2005-12-04 19:35:35.000000000 +0100 -@@ -67,8 +67,14 @@ - - CPPFLAGS=$saved_CPPFLAGS - -+ for j in lib64 lib; do -+ if test -d $MCVE_DIR/$j; then -+ MCVE_LIBDIR=MCVE_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MCVE_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_LIBDIR, MCVE_SHARED_LIBADD) - - dnl Build test. Check for libmcve or libmonetra - dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion -diff -Nru php-5.0.5.orig/ext/mhash/config.m4 php-5.0.5/ext/mhash/config.m4 ---- php-5.0.5.orig/ext/mhash/config.m4 2003-10-01 04:53:11.000000000 +0200 -+++ php-5.0.5/ext/mhash/config.m4 2005-12-04 20:18:36.000000000 +0100 -@@ -14,8 +14,14 @@ - AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h) - fi - -+ for j in lib64 lib; do -+ if test -d $MHASH_DIR/$j; then -+ MHASH_LIBDIR=$MHASH_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MHASH_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD) - - PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared) - PHP_SUBST(MHASH_SHARED_LIBADD) -diff -Nru php-5.0.5.orig/ext/ming/config.m4 php-5.0.5/ext/ming/config.m4 ---- php-5.0.5.orig/ext/ming/config.m4 2005-07-25 23:03:27.000000000 +0200 -+++ php-5.0.5/ext/ming/config.m4 2005-12-04 20:22:21.000000000 +0100 -@@ -8,11 +8,13 @@ - if test "$PHP_MING" != "no"; then - AC_CHECK_LIB(m, sin) - -- for i in $PHP_MING /usr/local /usr; do -- if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then -- MING_DIR=$i -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_MING /usr/local /usr; do -+ if test -f $i/$j/libming.$SHLIB_SUFFIX_NAME -o -f $i/$j/libming.a; then -+ MING_DIR=$i -+ break -+ fi -+ done - done - - if test -z "$MING_DIR"; then -@@ -29,16 +31,22 @@ - AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.) - fi - -+ for j in lib64 lib; do -+ if test -d $MING_DIR/$j; then -+ MING_LIBDIR=$MING_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [ - AC_DEFINE(HAVE_MING,1,[ ]) - ],[ - AC_MSG_ERROR([Ming library 0.2a or greater required.]) - ],[ -- -L$MING_DIR/lib -+ -L$MING_LIBDIR - ]) - - PHP_ADD_INCLUDE($MING_INC_DIR) -- PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_LIBDIR, MING_SHARED_LIBADD) - - AC_MSG_CHECKING([for destroySWFBlock]) - AC_TRY_RUN([ -diff -Nru php-5.0.5.orig/ext/msession/config.m4 php-5.0.5/ext/msession/config.m4 ---- php-5.0.5.orig/ext/msession/config.m4 2003-02-12 19:34:20.000000000 +0100 -+++ php-5.0.5/ext/msession/config.m4 2005-12-04 20:26:49.000000000 +0100 -@@ -8,13 +8,17 @@ - if test "$PHP_MSESSION" != "no"; then - if test -r $PHP_MSESSION/lib/libphoenix.a; then - PHOENIX_DIR=$PHP_MSESSION -+ PHOENIX_LIBDIR=$PHP_MSESSION/lib - else - AC_MSG_CHECKING(for msession in default path) -- for i in /usr/local/phoenix /usr/local /usr; do -- if test -r $i/lib/libphoenix.a; then -- PHOENIX_DIR=$i -- AC_MSG_RESULT(found in $i) -- fi -+ for j in lib64 lib; do -+ for i in /usr/local/phoenix /usr/local /usr; do -+ if test -r $i/$j/libphoenix.a; then -+ PHOENIX_DIR=$i -+ PHOENIX_LIBDIR=$i/$j -+ AC_MSG_RESULT(found in $i) -+ fi -+ done - done - fi - -@@ -25,7 +29,7 @@ - - - AC_DEFINE(HAVE_MSESSION, 1, [ ]) -- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB) -+ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB) - PHOENIX_INCLUDE="-I$PHOENIX_DIR" - PHP_SUBST(PHOENIX_LIB) - -diff -Nru php-5.0.5.orig/ext/mssql/config.m4 php-5.0.5/ext/mssql/config.m4 ---- php-5.0.5.orig/ext/mssql/config.m4 2004-12-08 19:58:25.000000000 +0100 -+++ php-5.0.5/ext/mssql/config.m4 2005-12-04 22:12:15.000000000 +0100 -@@ -30,14 +30,20 @@ - else - AC_MSG_ERROR(Directory $PHP_MSSQL is not a FreeTDS installation directory) - fi -- fi -+ fi -+ -+ for j in lib64 lib; do -+ if test -d $FREETDS_INSTALLATION_DIR/$j; then -+ FREETDS_INSTALLATION_DIR_LIBDIR=$FREETDS_INSTALLATION_DIR/$j -+ fi -+ done - -- if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then -- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so]) -+ if test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.so"; then -+ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR_LIBDIR/libtds.[a|so]) - fi - - MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include -- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib -+ MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR_LIBDIR - - PHP_ADD_INCLUDE($MSSQL_INCDIR) - PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD) -diff -Nru php-5.0.5.orig/ext/mysql/config.m4 php-5.0.5/ext/mysql/config.m4 ---- php-5.0.5.orig/ext/mysql/config.m4 2005-06-20 15:46:02.000000000 +0200 -+++ php-5.0.5/ext/mysql/config.m4 2005-12-04 22:43:27.000000000 +0100 -@@ -90,7 +90,7 @@ - ;; - esac - -- for i in lib lib/mysql lib64 lib64/mysql; do -+ for i in lib64 lib64/mysql lib lib/mysql; do - MYSQL_LIB_CHK($i) - done - -@@ -102,13 +102,18 @@ - PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_close, [ ], - [ - if test "$PHP_ZLIB_DIR" != "no"; then -+ for j in lib64 lib; do -+ if test -d $PHP_ZLIB_DIR/$j; then -+ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j -+ fi -+ done - PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, MYSQL_SHARED_LIBADD) - PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_error, [], [ - AC_MSG_ERROR([mysql configure failed. Please check config.log for more information.]) - ], [ -- -L$PHP_ZLIB_DIR/lib -L$MYSQL_LIB_DIR -+ -L$PHP_ZLIB_LIBDIR -L$MYSQL_LIB_DIR - ]) -- MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -lz" -+ MYSQL_LIBS="-L$PHP_ZLIB_LIBDIR -lz" - else - PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD) - PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_errno, [], [ -diff -Nru php-5.0.5.orig/ext/ncurses/config.m4 php-5.0.5/ext/ncurses/config.m4 ---- php-5.0.5.orig/ext/ncurses/config.m4 2003-12-09 21:33:08.000000000 +0100 -+++ php-5.0.5/ext/ncurses/config.m4 2005-12-04 22:47:05.000000000 +0100 -@@ -38,20 +38,26 @@ - LIBNAME=ncurses - LIBSYMBOL=initscr - -+ for j in lib64 lib; do -+ if test -d $NCURSES_DIR/$j; then -+ NCURSES_LIBDIR=$NCURSES_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [ - AC_DEFINE(HAVE_NCURSESLIB,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD) - - PHP_CHECK_LIBRARY(panel, new_panel, [ - AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ]) -- PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD) - ], [], [ -- -L$NCURSES_DIR/lib -l$LIBNAME -lm -+ -L$NCURSES_LIBDIR -l$LIBNAME -lm - ]) - ], [ - AC_MSG_ERROR(Wrong ncurses lib version or lib not found) - ], [ -- -L$NCURSES_DIR/lib -lm -+ -L$NCURSES_LIBDIR -lm - ]) - - AC_CHECK_LIB($LIBNAME, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])]) -diff -Nru php-5.0.5.orig/ext/odbc/config.m4 php-5.0.5/ext/odbc/config.m4 ---- php-5.0.5.orig/ext/odbc/config.m4 2005-04-22 01:02:15.000000000 +0200 -+++ php-5.0.5/ext/odbc/config.m4 2005-12-05 18:19:09.000000000 +0100 -@@ -47,19 +47,8 @@ - # - # Check for the library files, and setup the ODBC_LIBS path... - # --if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ -- ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then -- # -- # we have an error and should bail out, as we can't find the libs! -- # -- echo "" -- echo "*********************************************************************" -- echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -- echo "* Please correct this by creating the following links and reconfiguring:" -- echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -- echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" -- echo "*********************************************************************" --else -+if test -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ -+ -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then - ODBC_LFLAGS=-L$1 - ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} - fi -@@ -100,8 +89,12 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ADABAS_LIBDIR=$withval/$i -+ test -f "$ADABAS_LIBDIR/odbclib.a" && break -+ done - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($ADABAS_LIBDIR) - ODBC_OBJS="$withval/lib/odbclib.a" - ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a" - $srcdir/build/shtool mkdir -f -p ext/odbc -@@ -132,8 +125,12 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ SAPDB_LIBDIR=$withval/$i -+ test -f "$SAPDB_LIBDIR/libsqlod.a" -o -f "$SAPDB_LIBDIR/libsqlod.$SHLIB_SUFFIX_NAME" && break -+ done - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($SAPDB_LIBDIR) - PHP_ADD_LIBRARY(sqlod) - ODBC_TYPE=sapdb - AC_DEFINE(HAVE_SAPDB,1,[ ]) -@@ -158,19 +155,36 @@ - withval=/usr/local/solid - fi - if test "$withval" != "no"; then -- ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib -- ODBC_INCLUDE=-I$ODBC_INCDIR -- ODBC_TYPE=solid -- if test -f $ODBC_LIBDIR/soc*35.a; then -- AC_DEFINE(HAVE_SOLID_35,1,[ ]) -- elif test -f $ODBC_LIBDIR/scl*30.a; then -- AC_DEFINE(HAVE_SOLID_30,1,[ ]) -- elif test -f $ODBC_LIBDIR/scl*23.a; then -- AC_DEFINE(HAVE_SOLID,1,[ ]) -+ for i in lib64 lib; do -+ SOLID_LIBDIR=$withval/$i -+ ODBC_INCDIR=$withval/include -+ ODBC_LIBDIR=$withval/$j -+ ODBC_INCLUDE=-I$ODBC_INCDIR -+ ODBC_TYPE=solid -+ if test -f $ODBC_LIBDIR/soc*35.a; then -+ AC_DEFINE(HAVE_SOLID_35,1,[ ]) -+ elif test -f $ODBC_LIBDIR/scl*30.a; then -+ AC_DEFINE(HAVE_SOLID_30,1,[ ]) -+ elif test -f $ODBC_LIBDIR/scl*23.a; then -+ AC_DEFINE(HAVE_SOLID,1,[ ]) -+ fi -+ AC_MSG_RESULT(yes) -+ ODBC_LIBS= -+ AC_FIND_SOLID_LIBS($ODBC_LIBDIR) -+ test -n "$ODBC_LIBS" && break -+ done -+ if test -z "$ODBC_LIBS"; then -+ # -+ # we have an error and should bail out, as we can't find the libs! -+ # -+ echo "" -+ echo "*********************************************************************" -+ echo "* Unable to locate ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -+ echo "* Please correct this by creating the following links and reconfiguring:" -+ echo "* ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" -+ echo "* ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" -+ echo "*********************************************************************" - fi -- AC_MSG_RESULT(yes) -- AC_FIND_SOLID_LIBS($ODBC_LIBDIR) - else - AC_MSG_RESULT(no) - fi -@@ -407,11 +421,15 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -+ for i in lib64 lib; do -+ IODBC_LIBDIR=$withval/$i -+ test -f "$IODBC_LIBDIR/libiodbc.a" -o -f "$IODBC_LIBDIR/libiodbc.$SHLIB_SUFFIX_NAME" && break -+ done -+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $IODBC_LIBDIR) - PHP_ADD_INCLUDE($withval/include, 1) - ODBC_TYPE=iodbc - ODBC_INCLUDE=-I$withval/include -- ODBC_LFLAGS=-L$withval/lib -+ ODBC_LFLAGS=-L$IODBC_LIBDIR - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) - AC_DEFINE(HAVE_ODBC2,1,[ ]) -@@ -436,8 +454,11 @@ - withval=/usr/local/easysoft/oob/client - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ODBC_LIBDIR=$withval/$i -+ test -f "$ODBC_LIBDIR/libesoobclient.a" -o -f "$ODBC_LIBDIR/libesoobclient.$SHLIB_SUFFIX_NAME" && break -+ done - ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib - ODBC_LFLAGS=-L$ODBC_LIBDIR - ODBC_INCLUDE=-I$ODBC_INCDIR - ODBC_LIBS=-lesoobclient -@@ -463,8 +484,11 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -+ for i in lib64 lib; do -+ ODBC_LIBDIR=$withval/$i -+ test -f "$ODBC_LIBDIR/libodbc.a" -o -f "$ODBC_LIBDIR/libodbc.$SHLIB_SUFFIX_NAME" && break -+ done - ODBC_INCDIR=$withval/include -- ODBC_LIBDIR=$withval/lib - ODBC_LFLAGS=-L$ODBC_LIBDIR - ODBC_INCLUDE=-I$ODBC_INCDIR - ODBC_LIBS=-lodbc -diff -Nru php-5.0.5.orig/ext/pcre/config.m4 php-5.0.5/ext/pcre/config.m4 ---- php-5.0.5.orig/ext/pcre/config.m4 2005-08-22 18:55:56.000000000 +0200 -+++ php-5.0.5/ext/pcre/config.m4 2005-12-04 16:10:26.000000000 +0100 -@@ -25,7 +25,7 @@ - AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX]) - fi - -- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do -+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib64 $PHP_PCRE_REGEX/lib; do - test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j - done - -diff -Nru php-5.0.5.orig/ext/pgsql/config.m4 php-5.0.5/ext/pgsql/config.m4 ---- php-5.0.5.orig/ext/pgsql/config.m4 2005-04-03 15:06:33.000000000 +0200 -+++ php-5.0.5/ext/pgsql/config.m4 2005-12-05 18:22:38.000000000 +0100 -@@ -44,7 +44,7 @@ - fi - done - -- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do -+ for j in lib64 lib lib64/pgsql lib/pgsql lib64/postgres lib/postgres lib64/postgresql lib/postgresql ""; do - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then - PGSQL_LIBDIR=$i/$j - fi -diff -Nru php-5.0.5.orig/ext/pspell/config.m4 php-5.0.5/ext/pspell/config.m4 ---- php-5.0.5.orig/ext/pspell/config.m4 2005-02-17 04:51:35.000000000 +0100 -+++ php-5.0.5/ext/pspell/config.m4 2005-12-05 18:23:49.000000000 +0100 -@@ -27,7 +27,11 @@ - AC_MSG_ERROR(Cannot find pspell) - fi - -- PSPELL_LIBDIR=$PSPELL_DIR/lib -+ for j in lib64 lib; do -+ if test -d $PSPELL_DIR/$j; then -+ PSPELL_LIBDIR=$PSPELL_DIR/$j -+ fi -+ done - - PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD) - -diff -Nru php-5.0.5.orig/ext/readline/config.m4 php-5.0.5/ext/readline/config.m4 ---- php-5.0.5.orig/ext/readline/config.m4 2003-10-01 04:53:13.000000000 +0200 -+++ php-5.0.5/ext/readline/config.m4 2005-12-05 18:27:29.000000000 +0100 -@@ -29,22 +29,28 @@ - ]) - ]) - -+ for j in lib64 lib; do -+ if test -d $READLINE_DIR/$j; then -+ READLINE_LIBDIR=$READLINE_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(readline, readline, - [ -- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(readline library not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_CHECK_LIBRARY(history, add_history, - [ -- PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(history library required by readline not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -@@ -73,13 +79,19 @@ - ]) - ]) - -+ for j in lib64 lib; do -+ if test -d $LIBEDIT_DIR/$j; then -+ LIBEDIT_LIBDIR=$LIBEDIT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(edit, readline, - [ -- PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/lib, READLINE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_LIBDIR, READLINE_SHARED_LIBADD) - ], [ - AC_MSG_ERROR(edit library required by readline not found) - ], [ -- -L$READLINE_DIR/lib -+ -L$READLINE_LIBDIR - ]) - - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -diff -Nru php-5.0.5.orig/ext/session/config.m4 php-5.0.5/ext/session/config.m4 ---- php-5.0.5.orig/ext/session/config.m4 2003-10-01 04:53:15.000000000 +0200 -+++ php-5.0.5/ext/session/config.m4 2005-12-05 18:28:36.000000000 +0100 -@@ -24,8 +24,14 @@ - if test -z "$MM_DIR" ; then - AC_MSG_ERROR(cannot find mm library) - fi -- -- PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib, SESSION_SHARED_LIBADD) -+ -+ for j in lib64 lib; do -+ if test -d $MM_DIR/$j; then -+ MM_LIBDIR=$MM_DIR/$j -+ fi -+ done -+ -+ PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_LIBDIR, SESSION_SHARED_LIBADD) - PHP_ADD_INCLUDE($MM_DIR/include) - AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm]) - fi -diff -Nru php-5.0.5.orig/ext/snmp/config.m4 php-5.0.5/ext/snmp/config.m4 ---- php-5.0.5.orig/ext/snmp/config.m4 2003-09-23 10:15:49.000000000 +0200 -+++ php-5.0.5/ext/snmp/config.m4 2005-12-04 16:10:26.000000000 +0100 -@@ -45,8 +45,8 @@ - test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp - test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp - done -- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do -- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib -+ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do -+ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i - done - else - SNMP_INCDIR=$PHP_SNMP/include -diff -Nru php-5.0.5.orig/ext/sqlite/config.m4 php-5.0.5/ext/sqlite/config.m4 ---- php-5.0.5.orig/ext/sqlite/config.m4 2005-08-29 01:20:20.000000000 +0200 -+++ php-5.0.5/ext/sqlite/config.m4 2005-12-05 18:31:39.000000000 +0100 -@@ -38,14 +38,20 @@ - LIBNAME=sqlite - LIBSYMBOL=sqlite_open - -+ for j in lib64 lib; do -+ if test -d $SQLITE_DIR/$j; then -+ SQLITE_LIBDIR=$SQLITE_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, - [ -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SQLITE_DIR/lib, SQLITE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SQLITE_LIBDIR, SQLITE_SHARED_LIBADD) - AC_DEFINE(HAVE_SQLITELIB,1,[ ]) - ],[ - AC_MSG_ERROR([wrong sqlite lib version or lib not found]) - ],[ -- -L$SQLITE_DIR/lib -lm -+ -L$SQLITE_LIBDIR -lm - ]) - - PHP_SUBST(SQLITE_SHARED_LIBADD) -diff -Nru php-5.0.5.orig/ext/tidy/config.m4 php-5.0.5/ext/tidy/config.m4 ---- php-5.0.5.orig/ext/tidy/config.m4 2003-12-18 20:59:58.000000000 +0100 -+++ php-5.0.5/ext/tidy/config.m4 2005-12-05 18:32:54.000000000 +0100 -@@ -27,7 +27,11 @@ - AC_MSG_ERROR(Cannot find libtidy) - fi - -- TIDY_LIBDIR=$TIDY_DIR/lib -+ for j in lib64 lib; do -+ if test -d $TIDY_DIR/$j; then -+ TIDY_LIBDIR=$TIDY_DIR/$j -+ fi -+ done - - PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD) - PHP_ADD_INCLUDE($TIDY_INCDIR) -diff -Nru php-5.0.5.orig/ext/xml/config.m4 php-5.0.5/ext/xml/config.m4 ---- php-5.0.5.orig/ext/xml/config.m4 2005-04-27 15:13:38.000000000 +0200 -+++ php-5.0.5/ext/xml/config.m4 2005-12-04 16:10:26.000000000 +0100 -@@ -35,11 +35,15 @@ - dnl Check for expat only if --with-libexpat-dir is used. - dnl - if test "$PHP_LIBEXPAT_DIR" != "no"; then -- for i in $PHP_XML $PHP_LIBEXPAT_DIR; do -- if test -f "$i/lib/libexpat.a" || test -f "$i/lib/libexpat.$SHLIB_SUFFIX_NAME"; then -- EXPAT_DIR=$i -- break -- fi -+ for j in lib64 lib; do -+ for i in $PHP_XML $PHP_LIBEXPAT_DIR; do -+ if test -f "$i/$j/libexpat.a" || test -f "$i/$j/libexpat.$SHLIB_SUFFIX_NAME"; then -+ EXPAT_DIR=$i -+ EXPAT_LIBDIR=$i/$j -+ break -+ fi -+ done -+ test -n "$EXPAT_DIR" && break - done - - if test -z "$EXPAT_DIR"; then -@@ -47,7 +51,7 @@ - fi - - PHP_ADD_INCLUDE($EXPAT_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_LIBDIR, XML_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBEXPAT, 1, [ ]) - fi - -diff -Nru php-5.0.5.orig/ext/xmlrpc/config.m4 php-5.0.5/ext/xmlrpc/config.m4 ---- php-5.0.5.orig/ext/xmlrpc/config.m4 2003-10-01 04:53:15.000000000 +0200 -+++ php-5.0.5/ext/xmlrpc/config.m4 2005-12-05 18:40:33.000000000 +0100 -@@ -30,6 +30,13 @@ - testval=yes - break - fi -+ if test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then -+ AC_DEFINE(HAVE_LIBEXPAT2,1,[ ]) -+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XMLRPC_SHARED_LIBADD) -+ PHP_ADD_INCLUDE($i/include) -+ testval=yes -+ break -+ fi - done - - if test "$testval" = "no"; then -@@ -87,7 +94,13 @@ - AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution) - fi - -+ for j in lib64 lib; do -+ if test -d $XMLRPC_DIR/$j; then -+ XMLRPC_LIBDIR=$XMLRCP_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($XMLRPC_DIR) -- PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_LIBDIR, XMLRPC_SHARED_LIBADD) - fi - -diff -Nru php-5.0.5.orig/ext/xsl/config.m4 php-5.0.5/ext/xsl/config.m4 ---- php-5.0.5.orig/ext/xsl/config.m4 2005-04-27 15:13:38.000000000 +0200 -+++ php-5.0.5/ext/xsl/config.m4 2005-12-05 18:42:56.000000000 +0100 -@@ -48,8 +48,13 @@ - if test -z "$PHP_XSL_EXSL_DIR"; then - AC_MSG_RESULT(not found) - else -+ for j in lib64 lib; do -+ if test -d $PHP_XSL_EXSL_DIR/$j; then -+ PHP_XSL_EXSL_LIBDIR=$PHP_XSL_EXSL_DIR/$j -+ fi -+ done - AC_MSG_RESULT(found) -- PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/lib, XSL_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_LIBDIR, XSL_SHARED_LIBADD) - PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include) - AC_DEFINE(HAVE_XSL_EXSLT,1,[ ]) - fi -diff -Nru php-5.0.5.orig/ext/zlib/config0.m4 php-5.0.5/ext/zlib/config0.m4 ---- php-5.0.5.orig/ext/zlib/config0.m4 2003-06-27 02:37:21.000000000 +0200 -+++ php-5.0.5/ext/zlib/config0.m4 2005-12-05 18:35:49.000000000 +0100 -@@ -36,10 +36,11 @@ - AC_MSG_ERROR(Cannot find libz) - fi - -- case $ZLIB_DIR in -- /usr) ac_extra= ;; -- *) ac_extra=-L$ZLIB_DIR/lib ;; -- esac -+ for j in lib64 lib; do -+ if test -d $ZLIB_DIR/$j; then -+ ZLIB_LIBDIR=$ZLIB_DIR/$j -+ fi -+ done - - PHP_CHECK_LIBRARY(z, gzgets, [ - AC_DEFINE(HAVE_ZLIB,1,[ ]) -@@ -49,7 +50,7 @@ - $ac_extra - ]) - -- PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD) -+ PHP_ADD_LIBPATH($ZLIB_LIBDIR, ZLIB_SHARED_LIBADD) - - PHP_ZLIB_DIR=$ZLIB_DIR - PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD) diff --git a/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch b/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch deleted file mode 100644 index 8dbae7b26f40..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- ext/standard/incomplete_class.c 2004-11-25 20:28:37.000000000 +0000 -+++ ext/standard/incomplete_class.c 2005-09-09 13:00:39.000000000 +0100 -@@ -122,7 +122,7 @@ - - /* {{{ php_lookup_class_name - */ --char *php_lookup_class_name(zval *object, size_t *nlen) -+char *php_lookup_class_name(zval *object, zend_uint *nlen) - { - zval **val; - char *retval = NULL; -@@ -144,7 +144,7 @@ - - /* {{{ php_store_class_name - */ --void php_store_class_name(zval *object, const char *name, size_t len) -+void php_store_class_name(zval *object, const char *name, zend_uint len) - { - zval *val; - TSRMLS_FETCH(); ---- ext/standard/php_incomplete_class.h 2005-06-29 10:29:08.000000000 +0100 -+++ ext/standard/php_incomplete_class.h 2005-09-09 13:00:31.000000000 +0100 -@@ -42,7 +42,7 @@ - - #define PHP_CLASS_ATTRIBUTES \ - char *class_name; \ -- size_t name_len; \ -+ zend_uint name_len; \ - zend_bool free_class_name = 0; \ - zend_bool incomplete_class = 0 - -@@ -55,8 +55,8 @@ - - zend_class_entry *php_create_incomplete_class(TSRMLS_D); - --char *php_lookup_class_name(zval *object, size_t *nlen); --void php_store_class_name(zval *object, const char *name, size_t len); -+char *php_lookup_class_name(zval *object, zend_uint *nlen); -+void php_store_class_name(zval *object, const char *name, zend_uint len); - - #ifdef __cplusplus - }; diff --git a/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch b/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch deleted file mode 100644 index 5c32b144a490..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch +++ /dev/null @@ -1,320 +0,0 @@ ---- ext/pspell/pspell.c 2004-05-18 14:32:05.000000000 +0200 -+++ ext/pspell/pspell.c 2005-10-26 23:30:48.000000000 +0200 -@@ -2,7 +2,7 @@ - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ -- | Copyright (c) 1997-2004 The PHP Group | -+ | Copyright (c) 1997-2005 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | -@@ -16,7 +16,7 @@ - +----------------------------------------------------------------------+ - */ - --/* $Id: pspell.c,v 1.44 2004/05/18 12:32:05 edink Exp $ */ -+/* $Id: pspell.c,v 1.47 2005/10/17 15:29:55 iliaa Exp $ */ - - #define IS_EXT_MODULE - -@@ -101,6 +101,22 @@ - delete_pspell_config(config); - } - -+#define PSPELL_FETCH_CONFIG \ -+ convert_to_long_ex(conf); \ -+ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ -+ if (config == NULL || type != le_pspell_config) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ -+ RETURN_FALSE; \ -+ } \ -+ -+#define PSPELL_FETCH_MANAGER \ -+ convert_to_long_ex(scin); \ -+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ -+ if (!manager || type != le_pspell) { \ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ -+ RETURN_FALSE; \ -+ } \ -+ - /* {{{ PHP_MINIT_FUNCTION - */ - PHP_MINIT_FUNCTION(pspell) -@@ -352,13 +368,7 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(conf); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); -- -- if (config == NULL || type != le_pspell_config) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - ret = new_pspell_manager(config); - -@@ -387,13 +397,9 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ -+ PSPELL_FETCH_MANAGER; - - if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ - RETURN_TRUE; -@@ -419,13 +425,8 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - array_init(return_value); - -@@ -457,14 +458,9 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(miss); - convert_to_string_ex(corr); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); - if(pspell_manager_error_number(manager) == 0){ -@@ -490,13 +486,8 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ - if(Z_STRLEN_PP(word) == 0){ -@@ -527,13 +518,8 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); - convert_to_string_ex(word); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ - if(Z_STRLEN_PP(word) == 0){ -@@ -564,12 +550,7 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - pspell_manager_clear_session(manager); - if(pspell_manager_error_number(manager) == 0){ -@@ -595,12 +576,7 @@ - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(scin); -- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); -- if(!manager){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_MANAGER; - - pspell_manager_save_all_word_lists(manager); - -@@ -694,22 +670,17 @@ - PHP_FUNCTION(pspell_config_runtogether) - { - int type; -- zval **sccin, **runtogether; -+ zval **conf, **runtogether; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_boolean_ex(runtogether); - pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); -@@ -723,22 +694,17 @@ - PHP_FUNCTION(pspell_config_mode) - { - int type; -- zval **sccin, **mode; -+ zval **conf, **mode; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_long_ex(mode); - -@@ -760,7 +726,7 @@ - PHP_FUNCTION(pspell_config_ignore) - { - int type; -- zval **sccin, **pignore; -+ zval **conf, **pignore; - int argc; - - int loc = PSPELL_LARGEST_WORD; -@@ -770,16 +736,11 @@ - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_long_ex(pignore); - ignore = Z_LVAL_PP(pignore); -@@ -808,21 +769,16 @@ - static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option) - { - int type; -- zval **sccin, **value; -+ zval **conf, **value; - int argc; - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc, &sccin, &value) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc, &conf, &value) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if (!config) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_string_ex(value); - -@@ -868,22 +824,17 @@ - PHP_FUNCTION(pspell_config_repl) - { - int type; -- zval **sccin, **repl; -+ zval **conf, **repl; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - pspell_config_replace(config, "save-repl", "true"); - -@@ -908,22 +859,17 @@ - PHP_FUNCTION(pspell_config_save_repl) - { - int type; -- zval **sccin, **save; -+ zval **conf, **save; - int argc; - - PspellConfig *config; - - argc = ZEND_NUM_ARGS(); -- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { -+ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { - WRONG_PARAM_COUNT; - } - -- convert_to_long_ex(sccin); -- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); -- if(!config){ -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin)); -- RETURN_FALSE; -- } -+ PSPELL_FETCH_CONFIG; - - convert_to_boolean_ex(save); - pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch b/dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch deleted file mode 100644 index ee4fee587817..000000000000 --- a/dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- TSRM/TSRM.h 2005-12-02 19:04:27.000000000 +0100 -+++ TSRM/TSRM.h 2005-12-02 19:05:01.000000000 +0100 -@@ -137,7 +137,7 @@ - - #define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL) - #define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx --#define TSRMLS_SET_CTX(ctx) (void ***) ctx = tsrm_ls -+#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls - #define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element) - #define TSRMLS_D void ***tsrm_ls - #define TSRMLS_DC , TSRMLS_D diff --git a/dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch b/dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch deleted file mode 100644 index 486006aebbe7..000000000000 --- a/dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/curl/interface.c 2006-01-05 13:50:45.000000000 +0100 -+++ ext/curl/interface.c 2006-01-05 13:51:03.000000000 +0100 -@@ -1673,7 +1673,7 @@ - } - - static struct gcry_thread_cbs php_curl_gnutls_tsl = { -- GCRY_THREAD_OPTIONS_USER, -+ GCRY_THREAD_OPTION_USER, - NULL, - php_curl_ssl_mutex_create, - php_curl_ssl_mutex_destroy, diff --git a/dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch b/dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch deleted file mode 100644 index 735e1461c40d..000000000000 --- a/dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- ext/ming/config.m4 2005/11/24 00:51:42 1.22.2.3 -+++ ext/ming/config.m4 2005/11/27 23:22:42 1.22.2.4 -@@ -72,13 +72,13 @@ yes - AC_DEFINE(HAVE_NEW_MING, 1, [ ]) - dnl FIXME: This is now unconditional..better check coming later. - AC_DEFINE(HAVE_MING_ZLIB, 1, [ ]) -- AC_TRY_COMPILE([ --#include <ming.h> --int main(int,void) { -- SWFMovie_output(NULL, NULL, NULL, 0)); -- return 0; --} -- ], [ AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, []) ]) -+ -+ AC_TRY_COMPILE([#include <ming.h>], -+ [ -+int main(int,void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; } -+ ], [ -+ AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, [ ]) -+ ], []) - ]) - CPPFLAGS=$old_CPPFLAGS - diff --git a/dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch b/dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch deleted file mode 100644 index 0e21e062eb91..000000000000 --- a/dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch +++ /dev/null @@ -1,265 +0,0 @@ -diff -Nru php-5.1.1.orig/acinclude.m4 php-5.1.1/acinclude.m4 ---- php-5.1.1.orig/acinclude.m4 2005-11-22 00:08:01.000000000 +0100 -+++ php-5.1.1/acinclude.m4 2005-12-07 19:20:13.000000000 +0100 -@@ -441,7 +441,7 @@ - dnl Adds a path to linkpath/runpath (LDFLAGS) - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then -+ if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib" && test "$1" != "/usr/lib64"; then - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -1932,7 +1932,7 @@ - dnl Search for the sendmail binary - dnl - AC_DEFUN([PHP_PROG_SENDMAIL], [ -- PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib -+ PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64 - AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) - if test -n "$PROG_SENDMAIL"; then - AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) -diff -Nru php-5.1.1.orig/ext/interbase/config.m4 php-5.1.1/ext/interbase/config.m4 ---- php-5.1.1.orig/ext/interbase/config.m4 2004-05-12 16:29:42.000000000 +0200 -+++ php-5.1.1/ext/interbase/config.m4 2005-12-07 19:29:06.000000000 +0100 -@@ -9,10 +9,18 @@ - if test "$PHP_INTERBASE" != "no"; then - if test "$PHP_INTERBASE" = "yes"; then - IBASE_INCDIR=/usr/interbase/include -- IBASE_LIBDIR=/usr/interbase/lib -+ for j in lib64 lib; do -+ if test -d /usr/interbase/$j; then -+ IBASE_LIBDIR=/usr/interbase/$j -+ fi -+ done - else - IBASE_INCDIR=$PHP_INTERBASE/include -- IBASE_LIBDIR=$PHP_INTERBASE/lib -+ for j in lib64 lib; do -+ if test -d $PHP_INTERBASE/$j; then -+ IBASE_LIBDIR=$PHP_INTERBASE/$j -+ fi -+ done - fi - - PHP_CHECK_LIBRARY(fbclient, isc_detach_database, -diff -Nru php-5.1.1.orig/ext/mbstring/config.m4 php-5.1.1/ext/mbstring/config.m4 ---- php-5.1.1.orig/ext/mbstring/config.m4 2005-10-28 09:52:58.000000000 +0200 -+++ php-5.1.1/ext/mbstring/config.m4 2005-12-07 21:08:10.000000000 +0100 -@@ -261,7 +261,7 @@ - ],[ - AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) - ], [ -- -LPHP_LIBMBFL/$PHP_LIBDIR -+ -L$PHP_LIBMBFL/$PHP_LIBDIR - ]) - fi - ]) -diff -Nru php-5.1.1.orig/ext/mcrypt/config.m4 php-5.1.1/ext/mcrypt/config.m4 ---- php-5.1.1.orig/ext/mcrypt/config.m4 2005-05-30 01:16:41.000000000 +0200 -+++ php-5.1.1/ext/mcrypt/config.m4 2005-12-07 20:36:01.000000000 +0100 -@@ -34,6 +34,12 @@ - - PHP_MCRYPT_CHECK_VERSION - -+ for j in lib64 lib; do -+ if test -d $MCRYPT_DIR/$j; then -+ MCRYPT_LIBDIR=MCRYPT_DIR/$j -+ fi -+ done -+ - PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, - [ - PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD) -@@ -45,13 +51,13 @@ - ],[ - AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.]) - ],[ -- -L$MCRYPT_DIR/lib -+ -L$MCRYPT_LIBDIR - ]) - ],[ -- -L$MCRYPT_DIR/lib -lltdl -+ -L$MCRYPT_LIBDIR -lltdl - ]) - -- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD) - PHP_ADD_INCLUDE($MCRYPT_DIR/include) - - PHP_SUBST(MCRYPT_SHARED_LIBADD) -diff -Nru php-5.1.1.orig/ext/mhash/config.m4 php-5.1.1/ext/mhash/config.m4 ---- php-5.1.1.orig/ext/mhash/config.m4 2005-05-30 01:16:41.000000000 +0200 -+++ php-5.1.1/ext/mhash/config.m4 2005-12-07 20:39:31.000000000 +0100 -@@ -14,8 +14,14 @@ - AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h) - fi - -+ for j in lib64 lib; do -+ if test -d $MHASH_DIR/$j; then -+ MHASH_LIBDIR=$MHASH_DIR/$j -+ fi -+ done -+ - PHP_ADD_INCLUDE($MHASH_DIR/include) -- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD) - - PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared) - PHP_SUBST(MHASH_SHARED_LIBADD) -diff -Nru php-5.1.1.orig/ext/msession/config.m4 php-5.1.1/ext/msession/config.m4 ---- php-5.1.1.orig/ext/msession/config.m4 2003-02-12 19:34:20.000000000 +0100 -+++ php-5.1.1/ext/msession/config.m4 2005-12-07 20:44:41.000000000 +0100 -@@ -8,13 +8,17 @@ - if test "$PHP_MSESSION" != "no"; then - if test -r $PHP_MSESSION/lib/libphoenix.a; then - PHOENIX_DIR=$PHP_MSESSION -+ PHOENIX_LIBDIR=$PHP_MSESSION/lib - else - AC_MSG_CHECKING(for msession in default path) -- for i in /usr/local/phoenix /usr/local /usr; do -- if test -r $i/lib/libphoenix.a; then -- PHOENIX_DIR=$i -- AC_MSG_RESULT(found in $i) -- fi -+ for j in lib64 lib; do -+ for i in /usr/local/phoenix /usr/local /usr; do -+ if test -r $i/$j/libphoenix.a; then -+ PHOENIX_DIR=$i -+ PHOENIX_LIBDIR=$i/$j -+ AC_MSG_RESULT(found in $i) -+ fi -+ done - done - fi - -@@ -25,7 +29,7 @@ - - - AC_DEFINE(HAVE_MSESSION, 1, [ ]) -- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB) -+ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB) - PHOENIX_INCLUDE="-I$PHOENIX_DIR" - PHP_SUBST(PHOENIX_LIB) - -diff -Nru php-5.1.1.orig/ext/odbc/config.m4 php-5.1.1/ext/odbc/config.m4 ---- php-5.1.1.orig/ext/odbc/config.m4 2005-11-21 20:06:02.000000000 +0100 -+++ php-5.1.1/ext/odbc/config.m4 2005-12-07 21:03:38.000000000 +0100 -@@ -141,7 +141,7 @@ - fi - if test "$withval" != "no"; then - PHP_ADD_INCLUDE($withval/incl) -- PHP_ADD_LIBPATH($withval/lib) -+ PHP_ADD_LIBPATH($withval/$PHP_LIBDIR) - PHP_ADD_LIBRARY(sqlod) - ODBC_TYPE=sapdb - AC_DEFINE(HAVE_SAPDB,1,[ ]) -@@ -439,7 +439,7 @@ - withval=/usr/local - fi - if test "$withval" != "no"; then -- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/$PHP_LIBDIR) - PHP_ADD_INCLUDE($withval/include, 1) - ODBC_TYPE=iodbc - ODBC_INCLUDE=-I$withval/include -diff -Nru php-5.1.1.orig/ext/pdo_firebird/config.m4 php-5.1.1/ext/pdo_firebird/config.m4 ---- php-5.1.1.orig/ext/pdo_firebird/config.m4 2005-06-14 02:00:52.000000000 +0200 -+++ php-5.1.1/ext/pdo_firebird/config.m4 2005-12-07 21:15:34.000000000 +0100 -@@ -14,7 +14,11 @@ - FIREBIRD_LIBDIR=/opt/firebird/lib - else - FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include -- FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/lib -+ for j in lib64 lib; do -+ if test -d $PHP_PDO_FIREBIRD/$j; then -+ FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$j -+ fi -+ done - fi - - PHP_CHECK_LIBRARY(fbclient, isc_detach_database, -diff -Nru php-5.1.1.orig/ext/pdo_mysql/config.m4 php-5.1.1/ext/pdo_mysql/config.m4 ---- php-5.1.1.orig/ext/pdo_mysql/config.m4 2005-11-25 18:07:49.000000000 +0100 -+++ php-5.1.1/ext/pdo_mysql/config.m4 2005-12-07 21:21:27.000000000 +0100 -@@ -65,7 +65,11 @@ - else - PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include - fi -- if test -r $PDO_MYSQL_DIR/lib/mysql; then -+ if test -r $PDO_MYSQL_DIR/lib64/mysql; then -+ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib64/mysql -+ elif test -r $PDO_MYSQL_DIR/lib64; then -+ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib64 -+ elif test -r $PDO_MYSQL_DIR/lib/mysql; then - PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib/mysql - else - PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib -diff -Nru php-5.1.1.orig/ext/pdo_odbc/config.m4 php-5.1.1/ext/pdo_odbc/config.m4 ---- php-5.1.1.orig/ext/pdo_odbc/config.m4 2005-07-27 05:22:02.000000000 +0200 -+++ php-5.1.1/ext/pdo_odbc/config.m4 2005-12-07 21:40:11.000000000 +0100 -@@ -99,7 +99,7 @@ - - if test -n "$pdo_odbc_dir"; then - PDO_ODBC_INCDIR="$pdo_odbc_dir/include" -- PDO_ODBC_LIBDIR="$pdo_odbc_dir/lib" -+ PDO_ODBC_LIBDIR="$pdo_odbc_dir/$PHP_LIBDIR" - else - PDO_ODBC_INCDIR="$pdo_odbc_def_incdir" - PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir" -diff -Nru php-5.1.1.orig/ext/pdo_pgsql/config.m4 php-5.1.1/ext/pdo_pgsql/config.m4 ---- php-5.1.1.orig/ext/pdo_pgsql/config.m4 2005-07-27 04:51:01.000000000 +0200 -+++ php-5.1.1/ext/pdo_pgsql/config.m4 2005-12-07 21:52:03.000000000 +0100 -@@ -46,7 +46,7 @@ - fi - done - -- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do -+ for j in lib64 lib $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then - PGSQL_LIBDIR=$i/$j - fi -diff -Nru php-5.1.1.orig/ext/pdo_sqlite/config.m4 php-5.1.1/ext/pdo_sqlite/config.m4 ---- php-5.1.1.orig/ext/pdo_sqlite/config.m4 2005-11-01 04:13:32.000000000 +0100 -+++ php-5.1.1/ext/pdo_sqlite/config.m4 2005-12-07 21:49:57.000000000 +0100 -@@ -54,12 +54,12 @@ - - PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, - [ -- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_SQLITE_DIR/lib, PDO_SQLITE_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_SQLITE_DIR/$PHP_LIBDIR, PDO_SQLITE_SHARED_LIBADD) - AC_DEFINE(HAVE_PDO_SQLITELIB,1,[ ]) - ],[ - AC_MSG_ERROR([wrong sqlite lib version or lib not found]) - ],[ -- -L$PDO_SQLITE_DIR/lib -lm -+ -L$PDO_SQLITE_DIR/$PHP_LIBDIR -lm - ]) - PHP_CHECK_LIBRARY(sqlite3,sqlite3_key,[ - AC_DEFINE(HAVE_SQLITE3_KEY,1, [have commercial sqlite3 with crypto support]) -diff -Nru php-5.1.1.orig/ext/snmp/config.m4 php-5.1.1/ext/snmp/config.m4 ---- php-5.1.1.orig/ext/snmp/config.m4 2005-05-30 01:16:44.000000000 +0200 -+++ php-5.1.1/ext/snmp/config.m4 2005-12-07 21:53:42.000000000 +0100 -@@ -45,8 +45,8 @@ - test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp - test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp - done -- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do -- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib -+ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do -+ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i - done - else - SNMP_INCDIR=$PHP_SNMP/include -diff -Nru php-5.1.1.orig/ext/tidy/config.m4 php-5.1.1/ext/tidy/config.m4 ---- php-5.1.1.orig/ext/tidy/config.m4 2005-05-30 01:16:45.000000000 +0200 -+++ php-5.1.1/ext/tidy/config.m4 2005-12-07 21:54:51.000000000 +0100 -@@ -27,7 +27,7 @@ - AC_MSG_ERROR(Cannot find libtidy) - fi - -- TIDY_LIBDIR=$TIDY_DIR/lib -+ TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR - - PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD) - PHP_ADD_INCLUDE($TIDY_INCDIR) diff --git a/dev-lang/php/files/digest-php-4.3.11-r5 b/dev-lang/php/files/digest-php-4.3.11-r5 index c19dd7e98c08..0bb4f5e2e5df 100644 --- a/dev-lang/php/files/digest-php-4.3.11-r5 +++ b/dev-lang/php/files/digest-php-4.3.11-r5 @@ -1,3 +1,4 @@ MD5 9b0c4b722e6102aa95b475074caac5f7 hardening-patch-4.3.11-0.4.3-gentoo.patch.gz 85180 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 +MD5 2c64ed2986e72404055e12444b23b9d4 php-patchset-4.3.11-r1.tar.bz2 21875 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-4.4.1-r3 b/dev-lang/php/files/digest-php-4.4.1-r3 index 3f1e132db2d9..c52289d9db94 100644 --- a/dev-lang/php/files/digest-php-4.4.1-r3 +++ b/dev-lang/php/files/digest-php-4.4.1-r3 @@ -1,2 +1,3 @@ MD5 615d27d7c39017e1e45f15bc8eed3c94 hardening-patch-4.4.1-0.4.8-gentoo.patch.gz 59878 MD5 6b5726471189f8a1f26dd7cc5e19b442 php-4.4.1.tar.bz2 4157749 +MD5 6df61423378f90decbd063fcbefa750c php-patchset-4.4.1-r1.tar.bz2 12559 diff --git a/dev-lang/php/files/digest-php-5.0.5-r5 b/dev-lang/php/files/digest-php-5.0.5-r5 index 1ebee2f2ed0c..162a5c61ce6f 100644 --- a/dev-lang/php/files/digest-php-5.0.5-r5 +++ b/dev-lang/php/files/digest-php-5.0.5-r5 @@ -1,2 +1,3 @@ MD5 dd3aaa1c68bfd1626901721686474700 hardening-patch-5.0.5-0.4.8-gentoo.patch.gz 57864 MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556 +MD5 fc8196ec8809faf8f8482df9152c1b83 php-patchset-5.0.5-r1.tar.bz2 16809 diff --git a/dev-lang/php/files/digest-php-5.1.1 b/dev-lang/php/files/digest-php-5.1.1 index ca64fefe85ca..279a51844fba 100644 --- a/dev-lang/php/files/digest-php-5.1.1 +++ b/dev-lang/php/files/digest-php-5.1.1 @@ -1,2 +1,3 @@ MD5 79725da7da569045a6ad2e790b08fbb8 hardening-patch-5.1.1-0.4.8-gentoo.patch.gz 57546 MD5 70a7c90de182d1a1901c390b844153c7 php-5.1.1.tar.bz2 6149470 +MD5 3ef236ff9de57e7329f5dc2a89eba7c4 php-patchset-5.1.1-r1.tar.bz2 3195 diff --git a/dev-lang/php/php-4.3.11-r5.ebuild b/dev-lang/php/php-4.3.11-r5.ebuild index e559f9fb1590..6f934c69303e 100644 --- a/dev-lang/php/php-4.3.11-r5.ebuild +++ b/dev-lang/php/php-4.3.11-r5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.3.11-r5.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.3.11-r5.ebuild,v 1.2 2006/01/10 18:36:52 chtekk Exp $ IUSE="cgi cli discard-path force-cgi-redirect" KEYWORDS="~alpha ~arm ~ia64 ~s390 ~sparc ~x86" @@ -34,6 +34,9 @@ RDEPEND="${RDEPEND} app-admin/php-toolkit" # fixed PCRE library for security issues, bug #102373 SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +# PHP patchsets +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${PV}-r1.tar.bz2" + pkg_setup() { # make sure the user has specified a SAPI einfo "Determining SAPI(s) to build" @@ -87,37 +90,37 @@ src_unpack() { sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl5-gentoo"|g' -i configure.in # patch to fix pspell extension, bug #99312 (new patch by upstream) - use spell && epatch "${FILESDIR}/${PV}/php${PV}-pspell-ext-segf.patch" + use spell && epatch "${WORKDIR}/${PV}/php${PV}-pspell-ext-segf.patch" # patch fo fix safe_mode bypass in CURL extension, bug #111032 - use curl && epatch "${FILESDIR}/${PV}/php${PV}-curl-open_basedir.patch" + use curl && epatch "${WORKDIR}/${PV}/php${PV}-curl-open_basedir.patch" # fix header injection in mbstring extension - use nls && epatch "${FILESDIR}/${PV}/php${PV}-mbstring-header_inj.patch" + use nls && epatch "${WORKDIR}/${PV}/php${PV}-mbstring-header_inj.patch" # patch to fix safe_mode bypass in GD extension, bug #109669 if use gd || use gd-external ; then - epatch "${FILESDIR}/${PV}/php${PV}-gd-safe_mode.patch" + epatch "${WORKDIR}/${PV}/php${PV}-gd-safe_mode.patch" fi # patch open_basedir directory bypass, bug #102943 - epatch "${FILESDIR}/${PV}/php${PV}-fopen_wrappers.patch" + epatch "${WORKDIR}/${PV}/php${PV}-fopen_wrappers.patch" # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014 - epatch "${FILESDIR}/${PV}/php${PV}-globals_overwrite.patch" + epatch "${WORKDIR}/${PV}/php${PV}-globals_overwrite.patch" # patch phpinfo() XSS vulnerability, bug #111015 - epatch "${FILESDIR}/${PV}/php${PV}-phpinfo_xss.patch" + epatch "${WORKDIR}/${PV}/php${PV}-phpinfo_xss.patch" # patch to fix session.save_path segfault and other issues in # the apache2handler SAPI, bug #107602 - epatch "${FILESDIR}/${PV}/php${PV}-apache2sapi.patch" + epatch "${WORKDIR}/${PV}/php${PV}-apache2sapi.patch" # patch to fix some issues in the apache SAPI - epatch "${FILESDIR}/${PV}/php${PV}-apachesapi.patch" + epatch "${WORKDIR}/${PV}/php${PV}-apachesapi.patch" # patch to fix PCRE library security issues, bug #102373 - epatch "${FILESDIR}/${PV}/php${PV}-pcre-security.patch" + epatch "${WORKDIR}/${PV}/php${PV}-pcre-security.patch" # sobstitute the bundled PCRE library with a fixed version for bug #102373 einfo "Updating bundled PCRE library" diff --git a/dev-lang/php/php-4.4.1-r3.ebuild b/dev-lang/php/php-4.4.1-r3.ebuild index 8e022e2b0eb1..7206e24e77ab 100644 --- a/dev-lang/php/php-4.4.1-r3.ebuild +++ b/dev-lang/php/php-4.4.1-r3.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.1-r3.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.1-r3.ebuild,v 1.2 2006/01/10 18:36:52 chtekk Exp $ IUSE="cgi cli discard-path force-cgi-redirect" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" @@ -31,6 +31,9 @@ DESCRIPTION="The PHP language runtime engine" DEPEND="${DEPEND} app-admin/php-toolkit" RDEPEND="${RDEPEND} app-admin/php-toolkit" +# PHP patchsets +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${PV}-r1.tar.bz2" + pkg_setup() { # make sure the user has specified a SAPI einfo "Determining SAPI(s) to build" @@ -84,22 +87,22 @@ src_unpack() { sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in # fix open_basedir bypass in CURL extension - use curl && epatch "${FILESDIR}/${PV}/php${PV}-curl-open_basedir.patch" + use curl && epatch "${WORKDIR}/${PV}/php${PV}-curl-open_basedir.patch" # fix header injection in mbstring extension - use nls && epatch "${FILESDIR}/${PV}/php${PV}-mbstring-header_inj.patch" + use nls && epatch "${WORKDIR}/${PV}/php${PV}-mbstring-header_inj.patch" # fix safe_mode bypass in GD extension if use gd || use gd-external ; then - epatch "${FILESDIR}/${PV}/php${PV}-gd-safe_mode.patch" + epatch "${WORKDIR}/${PV}/php${PV}-gd-safe_mode.patch" fi # patch crash with mod_rewrite mentioned in bug #111032 and other Apache2 # SAPI bugs fixed by upstream - epatch "${FILESDIR}/${PV}/php${PV}-apache2sapi.patch" + epatch "${WORKDIR}/${PV}/php${PV}-apache2sapi.patch" # fix for http://bugs.php.net/bug.php?id=35067 - epatch "${FILESDIR}/${PV}/php${PV}-current_key_by_reference.patch" + epatch "${WORKDIR}/${PV}/php${PV}-current_key_by_reference.patch" # we call the eclass src_unpack, but don't want ${A} to be unpacked again PHP_PACKAGE=0 diff --git a/dev-lang/php/php-5.0.5-r5.ebuild b/dev-lang/php/php-5.0.5-r5.ebuild index 62b006e4c92a..d965b4d64491 100644 --- a/dev-lang/php/php-5.0.5-r5.ebuild +++ b/dev-lang/php/php-5.0.5-r5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.5-r5.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.5-r5.ebuild,v 1.2 2006/01/10 18:36:52 chtekk Exp $ IUSE="cgi cli discard-path force-cgi-redirect" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" @@ -31,6 +31,9 @@ DESCRIPTION="The PHP language runtime engine" DEPEND="${DEPEND} app-admin/php-toolkit" RDEPEND="${RDEPEND} app-admin/php-toolkit" +# PHP patchsets +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${PV}-r1.tar.bz2" + pkg_setup() { # make sure the user has specified a SAPI einfo "Determining SAPI(s) to build" @@ -73,34 +76,34 @@ src_unpack() { sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl5-gentoo"|g' -i configure.in # patch to fix pspell extension, bug #99312 (new patch by upstream) - use spell && epatch "${FILESDIR}/${PV}/php${PV}-pspell-ext-segf.patch" + use spell && epatch "${WORKDIR}/${PV}/php${PV}-pspell-ext-segf.patch" # patch fo fix safe_mode bypass in CURL extension, bug #111032 - use curl && epatch "${FILESDIR}/${PV}/php${PV}-curl-open_basedir.patch" + use curl && epatch "${WORKDIR}/${PV}/php${PV}-curl-open_basedir.patch" # fix header injection in mbstring extension - use nls && epatch "${FILESDIR}/${PV}/php${PV}-mbstring-header_inj.patch" + use nls && epatch "${WORKDIR}/${PV}/php${PV}-mbstring-header_inj.patch" # patch to fix safe_mode bypass in GD extension, bug #109669 if use gd || use gd-external ; then - epatch "${FILESDIR}/${PV}/php${PV}-gd-safe_mode.patch" + epatch "${WORKDIR}/${PV}/php${PV}-gd-safe_mode.patch" fi # patch open_basedir directory bypass, bug #102943 - epatch "${FILESDIR}/${PV}/php${PV}-fopen_wrappers.patch" + epatch "${WORKDIR}/${PV}/php${PV}-fopen_wrappers.patch" # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014 - epatch "${FILESDIR}/${PV}/php${PV}-globals_overwrite.patch" + epatch "${WORKDIR}/${PV}/php${PV}-globals_overwrite.patch" # patch to fix session.save_path segfault and other issues in # the apache2handler SAPI, bug #107602 - epatch "${FILESDIR}/${PV}/php${PV}-apache2sapi.patch" + epatch "${WORKDIR}/${PV}/php${PV}-apache2sapi.patch" # patch to fix a GCC4 compile problem, bug #111261 - epatch "${FILESDIR}/${PV}/php${PV}-tsrm-gcc4.patch" + epatch "${WORKDIR}/${PV}/php${PV}-tsrm-gcc4.patch" # fix a object serialization bug, bug #105374 - epatch "${FILESDIR}/${PV}/php${PV}-obj-serialize.patch" + epatch "${WORKDIR}/${PV}/php${PV}-obj-serialize.patch" # we call the eclass src_unpack, but don't want ${A} to be unpacked again PHP_PACKAGE=0 diff --git a/dev-lang/php/php-5.1.1.ebuild b/dev-lang/php/php-5.1.1.ebuild index 128c32043caa..55fc2bafe0cd 100644 --- a/dev-lang/php/php-5.1.1.ebuild +++ b/dev-lang/php/php-5.1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.1.1.ebuild,v 1.2 2006/01/05 17:23:22 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.1.1.ebuild,v 1.3 2006/01/10 18:36:52 chtekk Exp $ IUSE="cgi cli discard-path force-cgi-redirect" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" @@ -31,6 +31,9 @@ DESCRIPTION="The PHP language runtime engine" DEPEND="${DEPEND} app-admin/php-toolkit" RDEPEND="${RDEPEND} app-admin/php-toolkit" +# PHP patchsets +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${PV}-r1.tar.bz2" + pkg_setup() { # make sure the user has specified a SAPI einfo "Determining SAPI(s) to build" @@ -84,10 +87,10 @@ src_unpack() { sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-gentoo"|g' -i configure.in # fix CURL compilation error, bug #117767 - epatch "${FILESDIR}/${PV}/php${PV}-curl-gcry_threads.patch" + epatch "${WORKDIR}/${PV}/php${PV}-curl-gcry_threads.patch" # fix ming error in configure - epatch "${FILESDIR}/${PV}/php${PV}-ming-config.patch" + epatch "${WORKDIR}/${PV}/php${PV}-ming-config.patch" # we call the eclass src_unpack, but don't want ${A} to be unpacked again PHP_PACKAGE=0 |