From 0536d6c2a28ab6f63b4ff88ed0ee43949aa83765 Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Mon, 31 Oct 2005 14:10:39 +0000 Subject: New-style PHP update, see dev-lang/php ChangeLog for more details. (Portage version: 2.0.53_rc6) --- dev-lang/php/ChangeLog | 76 ++++- dev-lang/php/Manifest | 85 ++++-- .../php/files/4-any/apache-1.3/70_mod_php.conf | 19 ++ .../php/files/4-any/apache-2.0/70_mod_php.conf | 19 ++ dev-lang/php/files/4-any/php4-fastbuild.patch | 250 ++++++++++++++++ dev-lang/php/files/4-any/php4-imap-symlink.diff | 15 + dev-lang/php/files/4-any/php4-iodbc-config.diff | 14 + dev-lang/php/files/4-any/php4-libtool-1.5.patch | 19 ++ .../files/4-any/php4-uClibc-have_dn_skipname.patch | 30 ++ dev-lang/php/files/4-any/php4-with-iodbc.diff | 13 + .../files/4.3.11/php4.3.11-fopen_wrappers.patch | 46 +++ .../php/files/4.3.11/php4.3.11-gd_safe_mode.patch | 39 +++ .../php/files/4.3.11/php4.3.11-pcre-security.patch | 20 ++ .../files/4.3.11/php4.3.11-pspell-ext-segf.patch | 317 ++++++++++++++++++++ .../4.3.11/php4.3.11-session_save_path-segf.patch | 154 ++++++++++ .../php/files/4.4.0/apache-1.3/70_mod_php.conf | 19 -- .../php/files/4.4.0/apache-2.0/70_mod_php.conf | 19 -- dev-lang/php/files/4.4.0/fastbuild.patch | 250 ---------------- dev-lang/php/files/4.4.0/php4-imap-symlink.diff | 15 - dev-lang/php/files/4.4.0/php4-iodbc-config.diff | 14 - dev-lang/php/files/4.4.0/php4-libtool-1.5.patch | 19 -- dev-lang/php/files/4.4.0/php4-with-iodbc.diff | 13 - .../php/files/4.4.0/php4.3.11-pcre-security.patch | 31 -- .../php/files/4.4.0/php4.4.0-fopen_wrappers.patch | 46 +++ .../php/files/4.4.0/php4.4.0-gd_safe_mode.patch | 20 ++ .../php/files/4.4.0/php4.4.0-pcre-security.patch | 11 - .../php/files/4.4.0/php4.4.0-pspell-ext-segf.patch | 317 ++++++++++++++++++++ .../4.4.0/php4.4.0-session_save_path-segf.patch | 127 ++++++++ .../php/files/5.0-any/apache-1.3/70_mod_php5.conf | 20 ++ .../php/files/5.0-any/apache-2.0/70_mod_php5.conf | 20 ++ dev-lang/php/files/5.0-any/php5-imap-symlink.diff | 15 + dev-lang/php/files/5.0-any/php5-iodbc-config.diff | 14 + dev-lang/php/files/5.0-any/php5-libtool-1.5.patch | 19 ++ dev-lang/php/files/5.0-any/php5-prefork.patch | 26 ++ .../5.0-any/php5-soap_persistence_session.diff | 35 +++ dev-lang/php/files/5.0-any/php5-with-iodbc.diff | 13 + dev-lang/php/files/5.0.0/php5-imap-symlink.diff | 15 - dev-lang/php/files/5.0.0/php5-iodbc-config.diff | 14 - dev-lang/php/files/5.0.0/php5-libtool-1.5.patch | 19 -- .../php/files/5.0.0/php5.0.4-pcre-security.patch | 31 -- .../php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff | 23 -- .../php/files/5.0.0/php5.0.5-obj-serialize.patch | 42 --- .../php/files/5.0.4/php5.0.4-fopen_wrappers.patch | 46 +++ .../php/files/5.0.4/php5.0.4-gd_safe_mode.patch | 29 ++ .../php/files/5.0.4/php5.0.4-pcre-security.patch | 20 ++ .../php/files/5.0.4/php5.0.4-pspell-ext-segf.patch | 320 ++++++++++++++++++++ .../5.0.4/php5.0.4-session_save_path-segf.patch | 164 +++++++++++ .../php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff | 23 ++ .../php/files/5.0.5/php5.0.5-fopen_wrappers.patch | 22 ++ .../php/files/5.0.5/php5.0.5-gd_safe_mode.patch | 20 ++ .../php/files/5.0.5/php5.0.5-obj-serialize.patch | 42 +++ .../php/files/5.0.5/php5.0.5-pspell-ext-segf.patch | 320 ++++++++++++++++++++ .../5.0.5/php5.0.5-session_save_path-segf.patch | 123 ++++++++ .../php/files/5.1-any/apache-1.3/70_mod_php5.conf | 20 ++ .../php/files/5.1-any/apache-2.0/70_mod_php5.conf | 20 ++ dev-lang/php/files/5.1-any/php5-fastbuild.patch | 234 +++++++++++++++ dev-lang/php/files/5.1-any/php5-imap-symlink.diff | 15 + dev-lang/php/files/5.1-any/php5-iodbc-config.diff | 14 + dev-lang/php/files/5.1-any/php5-prefork.patch | 26 ++ .../5.1-any/php5-soap_persistence_session.diff | 35 +++ dev-lang/php/files/5.1-any/php5-with-iodbc.diff | 13 + .../php/files/5.1.0/apache-1.3/70_mod_php5.conf | 20 -- .../php/files/5.1.0/apache-2.0/70_mod_php5.conf | 20 -- dev-lang/php/files/5.1.0/php5-imap-symlink.diff | 15 - dev-lang/php/files/5.1.0/php5-iodbc-config.diff | 14 - dev-lang/php/files/5.1.0/php5-prefork.patch | 26 -- dev-lang/php/files/5.1.0/php5-with-iodbc.diff | 13 - .../files/5.1.0/php5_soap_persistence_session.diff | 35 --- dev-lang/php/files/digest-php-4.3.11-r1 | 3 - dev-lang/php/files/digest-php-4.3.11-r2 | 3 + dev-lang/php/files/digest-php-4.4.0-r1 | 3 - dev-lang/php/files/digest-php-4.4.0-r2 | 3 + dev-lang/php/files/digest-php-5.0.4-r1 | 3 - dev-lang/php/files/digest-php-5.0.4-r2 | 3 + dev-lang/php/files/digest-php-5.0.5-r1 | 2 - dev-lang/php/files/digest-php-5.0.5-r2 | 2 + dev-lang/php/php-4.3.11-r1.ebuild | 303 ------------------- dev-lang/php/php-4.3.11-r2.ebuild | 321 +++++++++++++++++++++ dev-lang/php/php-4.4.0-r1.ebuild | 303 ------------------- dev-lang/php/php-4.4.0-r2.ebuild | 321 +++++++++++++++++++++ dev-lang/php/php-5.0.4-r1.ebuild | 201 ------------- dev-lang/php/php-5.0.4-r2.ebuild | 219 ++++++++++++++ dev-lang/php/php-5.0.5-r1.ebuild | 191 ------------ dev-lang/php/php-5.0.5-r2.ebuild | 209 ++++++++++++++ 84 files changed, 4343 insertions(+), 1719 deletions(-) create mode 100644 dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf create mode 100644 dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf create mode 100644 dev-lang/php/files/4-any/php4-fastbuild.patch create mode 100644 dev-lang/php/files/4-any/php4-imap-symlink.diff create mode 100644 dev-lang/php/files/4-any/php4-iodbc-config.diff create mode 100644 dev-lang/php/files/4-any/php4-libtool-1.5.patch create mode 100644 dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch create mode 100644 dev-lang/php/files/4-any/php4-with-iodbc.diff create mode 100644 dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch create mode 100644 dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch create mode 100644 dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch create mode 100644 dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch create mode 100644 dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch delete mode 100644 dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf delete mode 100644 dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf delete mode 100644 dev-lang/php/files/4.4.0/fastbuild.patch delete mode 100644 dev-lang/php/files/4.4.0/php4-imap-symlink.diff delete mode 100644 dev-lang/php/files/4.4.0/php4-iodbc-config.diff delete mode 100644 dev-lang/php/files/4.4.0/php4-libtool-1.5.patch delete mode 100644 dev-lang/php/files/4.4.0/php4-with-iodbc.diff delete mode 100644 dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch create mode 100644 dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch create mode 100644 dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch create mode 100644 dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch create mode 100644 dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch create mode 100644 dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf create mode 100644 dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf create mode 100644 dev-lang/php/files/5.0-any/php5-imap-symlink.diff create mode 100644 dev-lang/php/files/5.0-any/php5-iodbc-config.diff create mode 100644 dev-lang/php/files/5.0-any/php5-libtool-1.5.patch create mode 100644 dev-lang/php/files/5.0-any/php5-prefork.patch create mode 100644 dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff create mode 100644 dev-lang/php/files/5.0-any/php5-with-iodbc.diff delete mode 100644 dev-lang/php/files/5.0.0/php5-imap-symlink.diff delete mode 100644 dev-lang/php/files/5.0.0/php5-iodbc-config.diff delete mode 100644 dev-lang/php/files/5.0.0/php5-libtool-1.5.patch delete mode 100644 dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch delete mode 100644 dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff delete mode 100644 dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch create mode 100644 dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch create mode 100644 dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch create mode 100644 dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch create mode 100644 dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch create mode 100644 dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch create mode 100644 dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff create mode 100644 dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch create mode 100644 dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch create mode 100644 dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch create mode 100644 dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch create mode 100644 dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch create mode 100644 dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf create mode 100644 dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf create mode 100644 dev-lang/php/files/5.1-any/php5-fastbuild.patch create mode 100644 dev-lang/php/files/5.1-any/php5-imap-symlink.diff create mode 100644 dev-lang/php/files/5.1-any/php5-iodbc-config.diff create mode 100644 dev-lang/php/files/5.1-any/php5-prefork.patch create mode 100644 dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff create mode 100644 dev-lang/php/files/5.1-any/php5-with-iodbc.diff delete mode 100644 dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf delete mode 100644 dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf delete mode 100644 dev-lang/php/files/5.1.0/php5-imap-symlink.diff delete mode 100644 dev-lang/php/files/5.1.0/php5-iodbc-config.diff delete mode 100644 dev-lang/php/files/5.1.0/php5-prefork.patch delete mode 100644 dev-lang/php/files/5.1.0/php5-with-iodbc.diff delete mode 100644 dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff delete mode 100644 dev-lang/php/files/digest-php-4.3.11-r1 create mode 100644 dev-lang/php/files/digest-php-4.3.11-r2 delete mode 100644 dev-lang/php/files/digest-php-4.4.0-r1 create mode 100644 dev-lang/php/files/digest-php-4.4.0-r2 delete mode 100644 dev-lang/php/files/digest-php-5.0.4-r1 create mode 100644 dev-lang/php/files/digest-php-5.0.4-r2 delete mode 100644 dev-lang/php/files/digest-php-5.0.5-r1 create mode 100644 dev-lang/php/files/digest-php-5.0.5-r2 delete mode 100644 dev-lang/php/php-4.3.11-r1.ebuild create mode 100644 dev-lang/php/php-4.3.11-r2.ebuild delete mode 100644 dev-lang/php/php-4.4.0-r1.ebuild create mode 100644 dev-lang/php/php-4.4.0-r2.ebuild delete mode 100644 dev-lang/php/php-5.0.4-r1.ebuild create mode 100644 dev-lang/php/php-5.0.4-r2.ebuild delete mode 100644 dev-lang/php/php-5.0.5-r1.ebuild create mode 100644 dev-lang/php/php-5.0.5-r2.ebuild (limited to 'dev-lang/php') diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index 3e9bc262fca4..0cc8373746d3 100644 --- a/dev-lang/php/ChangeLog +++ b/dev-lang/php/ChangeLog @@ -1,6 +1,80 @@ # ChangeLog for dev-lang/php # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.48 2005/09/24 19:21:33 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.49 2005/10/31 14:10:39 chtekk Exp $ + +*php-5.0.5-r2 (31 Oct 2005) +*php-5.0.4-r2 (31 Oct 2005) +*php-4.4.0-r2 (31 Oct 2005) +*php-4.3.11-r2 (31 Oct 2005) + + 31 Oct 2005; Luca Longinotti + -files/4.4.0/php4.3.11-pcre-security.patch, + +files/4.4.0/php4.4.0-fopen_wrappers.patch, + +files/4.4.0/php4.4.0-gd_safe_mode.patch, + files/4.4.0/php4.4.0-pcre-security.patch, + +files/4.4.0/php4.4.0-pspell-ext-segf.patch, + +files/4.4.0/php4.4.0-session_save_path-segf.patch, + -files/4.4.0/apache-1.3/70_mod_php.conf, + -files/4.4.0/apache-2.0/70_mod_php.conf, + +files/4-any/php4-fastbuild.patch, +files/4-any/php4-imap-symlink.diff, + +files/4-any/php4-iodbc-config.diff, + +files/5.0-any/php5-imap-symlink.diff, + +files/4-any/php4-libtool-1.5.patch, + +files/4-any/php4-uClibc-have_dn_skipname.patch, + +files/4-any/php4-with-iodbc.diff, +files/5.0-any/php5-iodbc-config.diff, + +files/4-any/apache-1.3/70_mod_php.conf, + +files/5.0-any/php5-libtool-1.5.patch, + +files/4-any/apache-2.0/70_mod_php.conf, + +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-pcre-security.patch, + +files/4.3.11/php4.3.11-pspell-ext-segf.patch, + +files/4.3.11/php4.3.11-session_save_path-segf.patch, + -files/4.4.0/fastbuild.patch, -files/4.4.0/php4-imap-symlink.diff, + -files/4.4.0/php4-iodbc-config.diff, -files/4.4.0/php4-libtool-1.5.patch, + -files/4.4.0/php4-with-iodbc.diff, +files/5.0-any/php5-prefork.patch, + +files/5.0-any/php5-soap_persistence_session.diff, + +files/5.0-any/php5-with-iodbc.diff, + +files/5.0-any/apache-1.3/70_mod_php5.conf, + +files/5.0-any/apache-2.0/70_mod_php5.conf, + -files/5.0.0/php5-imap-symlink.diff, -files/5.0.0/php5-iodbc-config.diff, + -files/5.0.0/php5-libtool-1.5.patch, + -files/5.0.0/php5.0.4-pcre-security.patch, + -files/5.0.0/php5.0.4-xmlrcp-ccode.diff, + -files/5.0.0/php5.0.5-obj-serialize.patch, + +files/5.0.4/php5.0.4-fopen_wrappers.patch, + +files/5.0.4/php5.0.4-gd_safe_mode.patch, + +files/5.0.4/php5.0.4-pcre-security.patch, + +files/5.0.4/php5.0.4-pspell-ext-segf.patch, + +files/5.0.4/php5.0.4-session_save_path-segf.patch, + +files/5.0.4/php5.0.4-xmlrcp-ccode.diff, + +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-obj-serialize.patch, + +files/5.0.5/php5.0.5-pspell-ext-segf.patch, + +files/5.0.5/php5.0.5-session_save_path-segf.patch, + +files/5.1-any/php5-fastbuild.patch, + +files/5.1-any/php5-imap-symlink.diff, + +files/5.1-any/php5-iodbc-config.diff, +files/5.1-any/php5-prefork.patch, + +files/5.1-any/php5-soap_persistence_session.diff, + +files/5.1-any/php5-with-iodbc.diff, + +files/5.1-any/apache-1.3/70_mod_php5.conf, + +files/5.1-any/apache-2.0/70_mod_php5.conf, + -files/5.1.0/php5-imap-symlink.diff, -files/5.1.0/php5-iodbc-config.diff, + -files/5.1.0/php5-prefork.patch, -files/5.1.0/php5-with-iodbc.diff, + -files/5.1.0/php5_soap_persistence_session.diff, + -files/5.1.0/apache-1.3/70_mod_php5.conf, + -files/5.1.0/apache-2.0/70_mod_php5.conf, -php-4.3.11-r1.ebuild, + +php-4.3.11-r2.ebuild, -php-4.4.0-r1.ebuild, +php-4.4.0-r2.ebuild, + -php-5.0.4-r1.ebuild, +php-5.0.4-r2.ebuild, -php-5.0.5-r1.ebuild, + +php-5.0.5-r2.ebuild: + New-style PHP update: fix quotation of some vars, change URI of a mirror, + change ordering of patches in the files/ directory, add 'mnogosearch' USE + flag, add 'oci8-instant-client' USE flag, add 'pic' USE flag, add 'cjk' USE + flag, delete 'png' and 'jpeg' USE flags now directly controlled by 'gd' USE + flag, change PHP extensions enabling/disabling system, fix a bug with + Apache1 + fastbuild, fix elibtoolize call (bug #106176) and fix bugs #99312, + #109669, #102943, #107602, #99225, #108834. 24 Sep 2005; Jason Wever php-5.0.5-r1.ebuild: Added ~sparc keyword. diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 055014faeecd..9fcf8f819c22 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -1,32 +1,55 @@ +MD5 888fe634c3f15e95dc293481bc4940bf ChangeLog 7254 +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 +MD5 6d2047e069da7178fc841c4c7c890aa8 files/4-any/php4-imap-symlink.diff 620 +MD5 22ed61ab0175cd83985a90e5d2b3b8b2 files/4-any/php4-iodbc-config.diff 511 +MD5 a7036ee38aa3b37256c0a6fe2afdbbe2 files/4-any/php4-libtool-1.5.patch 613 +MD5 f1142e6ec88928aeb4eb0120c267e53c files/4-any/php4-uClibc-have_dn_skipname.patch 839 +MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/4-any/php4-with-iodbc.diff 443 +MD5 cb36a386184ed6a887f62d2205f57173 files/4.3.11/php4.3.11-fopen_wrappers.patch 1481 +MD5 4db8e0b66cde22dd4e4d9f51e59f6098 files/4.3.11/php4.3.11-gd_safe_mode.patch 1573 +MD5 3f80d0c6c58fd4ea02b7efdf69265721 files/4.3.11/php4.3.11-pcre-security.patch 1667 +MD5 48d9c939434e9b01d0696410d59c503c files/4.3.11/php4.3.11-pspell-ext-segf.patch 8482 +MD5 17b906361a7ab8a3008446871623eeae files/4.3.11/php4.3.11-session_save_path-segf.patch 4938 +MD5 cb36a386184ed6a887f62d2205f57173 files/4.4.0/php4.4.0-fopen_wrappers.patch 1481 +MD5 a540c54ba22dc16b157edcf1ecb6258f files/4.4.0/php4.4.0-gd_safe_mode.patch 883 +MD5 5f1f48c87cafe0949e73ef064c99e5ed files/4.4.0/php4.4.0-pcre-security.patch 1741 +MD5 48d9c939434e9b01d0696410d59c503c files/4.4.0/php4.4.0-pspell-ext-segf.patch 8482 +MD5 83fb9efb602c178741ea2e40e13b014f files/4.4.0/php4.4.0-session_save_path-segf.patch 4132 +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 +MD5 110af7b300bcbbfb821fbb58f7923d8b files/5.0-any/php5-iodbc-config.diff 511 +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 2eddbf70a0b940789a0e68f029beb2b3 files/5.0.4/php5.0.4-fopen_wrappers.patch 1554 +MD5 89b001b449fdd567ffba6aaf2a3e804f files/5.0.4/php5.0.4-gd_safe_mode.patch 1216 +MD5 03a57319b93ee44a2fe159a0fb67592e files/5.0.4/php5.0.4-pcre-security.patch 1659 +MD5 ab931f65aefab4da99c6353b2c503d70 files/5.0.4/php5.0.4-pspell-ext-segf.patch 9422 +MD5 a0b87571b3bf155e835edc4497d1c4bf files/5.0.4/php5.0.4-session_save_path-segf.patch 5127 +MD5 e157161249ad2b217dc532f5289ba74b files/5.0.4/php5.0.4-xmlrcp-ccode.diff 750 +MD5 9e31c5edb0ded1d57ed90859d3ef168c files/5.0.5/php5.0.5-fopen_wrappers.patch 942 +MD5 8f52c6df24afb096109118582c1bf3eb files/5.0.5/php5.0.5-gd_safe_mode.patch 875 +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 8845848ffde7cfee1a3f57f6feaae8dd files/5.0.5/php5.0.5-session_save_path-segf.patch 4090 +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 +MD5 2aca8867fada1d3345859f201ce7e428 files/5.1-any/php5-imap-symlink.diff 652 +MD5 63c7937867dd8cc04b5089c3678ef359 files/5.1-any/php5-iodbc-config.diff 519 +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 5f8f18e68edb61b60cfa21a4ff65170b files/digest-php-4.3.11-r2 223 +MD5 c9e2d252f3ae26871c06d35ebfe6fb1e files/digest-php-4.4.0-r2 221 +MD5 71facfede997494a03e635bc07a14a2f files/digest-php-5.0.4-r2 220 +MD5 96fdb35fc6f5b775c569db88d89200d7 files/digest-php-5.0.5-r2 143 MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157 -MD5 142f79a4a47f275dd036f5344a4d100d ChangeLog 3550 -MD5 f2678d1c71630ebde199536e31cbf5e3 php-5.0.5-r1.ebuild 4694 -MD5 460849bb111f94869e2060bd0ec66987 php-4.4.0-r1.ebuild 8137 -MD5 ddaf60731c56a3de8b6dece494393f3b php-4.3.11-r1.ebuild 8127 -MD5 b5bf2584732ca22824a9b928f83c77cb php-5.0.4-r1.ebuild 5202 -MD5 5a28614e8d33162ab224e75dcf7ac16b files/digest-php-5.0.4-r1 220 -MD5 93a34eb8acada7af6a38c91fc64aea5a files/digest-php-5.0.5-r1 143 -MD5 c404654d25a964dd2c39e36c12e041f3 files/digest-php-4.3.11-r1 223 -MD5 91f80296313ae803b3e43d8573fc30a7 files/digest-php-4.4.0-r1 221 -MD5 f0acca9c6387b8ca139d2849665bd16f files/4.4.0/fastbuild.patch 9012 -MD5 6d2047e069da7178fc841c4c7c890aa8 files/4.4.0/php4-imap-symlink.diff 620 -MD5 22ed61ab0175cd83985a90e5d2b3b8b2 files/4.4.0/php4-iodbc-config.diff 511 -MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/4.4.0/php4-with-iodbc.diff 443 -MD5 a7036ee38aa3b37256c0a6fe2afdbbe2 files/4.4.0/php4-libtool-1.5.patch 613 -MD5 9c1de19a11cbfdcb4ff77803d1f5a62b files/4.4.0/php4.3.11-pcre-security.patch 2043 -MD5 2d2a8fb57b52ce965d2f6564d7ab0817 files/4.4.0/php4.4.0-pcre-security.patch 2116 -MD5 7d198bde60f94cc8cea5ad9479901e21 files/5.0.0/php5-imap-symlink.diff 620 -MD5 110af7b300bcbbfb821fbb58f7923d8b files/5.0.0/php5-iodbc-config.diff 511 -MD5 7530065b6851a15b1c9d8b0ee5fb0a98 files/5.0.0/php5-libtool-1.5.patch 613 -MD5 27c7d2dcb301cd78314f8ca22ff59b6f files/5.0.0/php5.0.4-pcre-security.patch 2034 -MD5 e157161249ad2b217dc532f5289ba74b files/5.0.0/php5.0.4-xmlrcp-ccode.diff 750 -MD5 b95f630e058c1b0f9cc47e186ef182cf files/5.0.0/php5.0.5-obj-serialize.patch 1364 -MD5 2aca8867fada1d3345859f201ce7e428 files/5.1.0/php5-imap-symlink.diff 652 -MD5 63c7937867dd8cc04b5089c3678ef359 files/5.1.0/php5-iodbc-config.diff 519 -MD5 058042718bc876bf27ab902673919ca9 files/5.1.0/php5-prefork.patch 850 -MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/5.1.0/php5-with-iodbc.diff 443 -MD5 273799e60d5a41a1e6f5ac53781a152f files/5.1.0/php5_soap_persistence_session.diff 1976 -MD5 389638f1d46b6c41cd4d87b471572f4b files/4.4.0/apache-1.3/70_mod_php.conf 484 -MD5 ee36e31632adb08b7abf70f78b5b2125 files/4.4.0/apache-2.0/70_mod_php.conf 485 -MD5 96ed6efe383833dbb880fef3b6c562bb files/5.1.0/apache-1.3/70_mod_php5.conf 524 -MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.1.0/apache-2.0/70_mod_php5.conf 525 +MD5 cfb1fcb7f433303107d23329ee7fe723 php-4.3.11-r2.ebuild 8755 +MD5 9446542cccde9fc11f4c82716f3effb5 php-4.4.0-r2.ebuild 8757 +MD5 22d7c3b6a5ca3727ddc67edce737e606 php-5.0.4-r2.ebuild 5815 +MD5 f29cd9f7d7acfeecb8bf00145f7c55a8 php-5.0.5-r2.ebuild 5282 diff --git a/dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf b/dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf new file mode 100644 index 000000000000..34a41d81193c --- /dev/null +++ b/dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf @@ -0,0 +1,19 @@ +# vim: ft=apache sw=4 ts=4 + + + # Load the module first + + LoadModule php4_module modules/libphp4.so + + + # Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php-source .phps + + + AddDirectoryIndex index.php index.phtml + diff --git a/dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf b/dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf new file mode 100644 index 000000000000..ce680323f6e0 --- /dev/null +++ b/dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf @@ -0,0 +1,19 @@ +# vim: ft=apache sw=4 ts=4 + + + # Load the module first + + LoadModule php4_module modules/libphp4.so + + + # Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php-source .phps + + + AddDirectoryIndex index.php index.phtml + diff --git a/dev-lang/php/files/4-any/php4-fastbuild.patch b/dev-lang/php/files/4-any/php4-fastbuild.patch new file mode 100644 index 000000000000..47f0dc77a38d --- /dev/null +++ b/dev-lang/php/files/4-any/php4-fastbuild.patch @@ -0,0 +1,250 @@ +diff -u --recursive php-4.4.0/acinclude.m4 php-4.4.0-cgi/acinclude.m4 +--- php-4.4.0/acinclude.m4 2005-09-14 22:39:22.000000000 +0200 ++++ php-4.4.0-cgi/acinclude.m4 2005-09-14 22:39:54.000000000 +0200 +@@ -84,7 +84,7 @@ + dnl + dnl which array to append to? + AC_DEFUN([PHP_ADD_SOURCES],[ +- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))) ++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS)))) + ]) + dnl + dnl _PHP_ASSIGN_BUILD_VARS(type) +diff -u --recursive php-4.4.0/configure.in php-4.4.0-cgi/configure.in +--- php-4.4.0/configure.in 2005-07-11 08:45:09.000000000 +0100 ++++ php-4.4.0-cgi/configure.in 2005-09-01 08:00:54.000000000 +0100 +@@ -1216,20 +1216,20 @@ + INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" + CXXFLAGS="$CXXFLAGS $standard_libtool_flag" + +-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)' ++all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)' + install_targets="$install_modules $install_pear install-build install-headers install-programs" + +-case $PHP_SAPI in +- cgi) +- install_targets="install-sapi $install_targets" +- ;; +- cli) +- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" +- ;; +- *) +- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" +- ;; +-esac ++if test "$PHP_SAPI_CGI" != "no" ; then ++ install_targets="install-sapi $install_targets" ++fi ++ ++if test "$PHP_SAPI_CLI" != "no" ; then ++ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" ++fi ++ ++if test "$PHP_SAPI" != "default" ; then ++ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" ++fi + + PHP_SUBST(all_targets) + PHP_SUBST(install_targets) +diff -u --recursive php-4.4.0/sapi/cgi/Makefile.frag php-4.4.0-cgi/sapi/cgi/Makefile.frag +--- php-4.4.0/sapi/cgi/Makefile.frag 2003-07-02 02:06:29.000000000 +0100 ++++ php-4.4.0-cgi/sapi/cgi/Makefile.frag 2005-09-01 08:03:20.000000000 +0100 +@@ -1,2 +1,6 @@ +-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) ++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS) + $(BUILD_CGI) ++ ++install-cgi: $(SAPI_CGI_PATH) ++ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/" ++ @$(INSTALL_CGI) +diff -u --recursive php-4.4.0/sapi/cgi/config9.m4 php-4.4.0-cgi/sapi/cgi/config9.m4 +--- php-4.4.0/sapi/cgi/config9.m4 2004-12-30 07:02:18.000000000 +0000 ++++ php-4.4.0-cgi/sapi/cgi/config9.m4 2005-09-01 08:05:08.000000000 +0100 +@@ -81,93 +81,107 @@ + ]) + + +-if test "$PHP_SAPI" = "default"; then +- AC_MSG_CHECKING(for CGI build) +- if test "$PHP_SAPI_CGI" != "no"; then +- AC_MSG_RESULT(yes) +- +- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) +- case $host_alias in +- *cygwin* ) +- SAPI_CGI_PATH=sapi/cgi/php.exe +- ;; +- * ) +- SAPI_CGI_PATH=sapi/cgi/php +- ;; +- esac +- PHP_SUBST(SAPI_CGI_PATH) +- +- PHP_TEST_WRITE_STDOUT +- +- AC_MSG_CHECKING(whether to force Apache CGI redirect) +- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then +- REDIRECT=1 +- else +- REDIRECT=0 +- fi +- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) +- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) ++AC_MSG_CHECKING(for CGI build) ++if test "$PHP_SAPI_CGI" != "no"; then ++ AC_MSG_RESULT(yes) ++ ++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) ++ case $host_alias in ++ *cygwin* ) ++ SAPI_CGI_PATH=sapi/cgi/php.exe ++ ;; ++ * ) ++ SAPI_CGI_PATH=sapi/cgi/php ++ ;; ++ esac ++ PHP_SUBST(SAPI_CGI_PATH) + ++ PHP_TEST_WRITE_STDOUT + +- AC_MSG_CHECKING(whether to discard path_info + path_translated) +- if test "$PHP_DISCARD_PATH" = "yes"; then +- DISCARD_PATH=1 +- else +- DISCARD_PATH=0 +- fi +- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) +- AC_MSG_RESULT($PHP_DISCARD_PATH) ++ AC_MSG_CHECKING(whether to force Apache CGI redirect) ++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then ++ REDIRECT=1 ++ else ++ REDIRECT=0 ++ fi ++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) ++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) + +- AC_MSG_CHECKING(whether to enable path info checking) +- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then +- ENABLE_PATHINFO_CHECK=1 +- else +- ENABLE_PATHINFO_CHECK=0 +- fi +- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) +- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) + +- AC_MSG_CHECKING(whether to enable fastcgi support) +- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" +- if test -z $PHP_LIBFCGI_DIR; then +- echo "$PHP_LIBFCGI_DIR does not exist" +- exit 1 +- fi +- if test "$PHP_ENABLE_FASTCGI" = "yes"; then +- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) +- PHP_FASTCGI=1 +- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" +- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" +- PHP_FCGI_STATIC=1 +- else +- PHP_FASTCGI=0 +- PHP_FCGI_FILES="" +- PHP_FCGI_INCLUDE="" +- PHP_FCGI_STATIC=0 +- fi +- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) +- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) +- AC_MSG_RESULT($PHP_ENABLE_FASTCGI) +- +- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)" +- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)') +- +- case $host_alias in +- *darwin*) +- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ AC_MSG_CHECKING(whether to discard path_info + path_translated) ++ if test "$PHP_DISCARD_PATH" = "yes"; then ++ DISCARD_PATH=1 ++ else ++ DISCARD_PATH=0 ++ fi ++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) ++ AC_MSG_RESULT($PHP_DISCARD_PATH) ++ ++ AC_MSG_CHECKING(whether to enable path info checking) ++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then ++ ENABLE_PATHINFO_CHECK=1 ++ else ++ ENABLE_PATHINFO_CHECK=0 ++ fi ++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) ++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) ++ ++ AC_MSG_CHECKING(whether to enable fastcgi support) ++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" ++ if test -z $PHP_LIBFCGI_DIR; then ++ echo "$PHP_LIBFCGI_DIR does not exist" ++ exit 1 ++ fi ++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then ++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) ++ PHP_FASTCGI=1 ++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" ++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" ++ PHP_FCGI_STATIC=1 ++ else ++ PHP_FASTCGI=0 ++ PHP_FCGI_FILES="" ++ PHP_FCGI_INCLUDE="" ++ PHP_FCGI_STATIC=0 ++ fi ++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) ++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) ++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI) ++ ++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)" ++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi) ++ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi) ++ ++ case $host_alias in ++ *darwin*) ++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; +- *) +- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ *) ++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; +- esac ++ esac + +- PHP_SUBST(BUILD_CGI) ++ PHP_CGI_TARGET="$SAPI_CGI_PATH" ++ PHP_INSTALL_CGI_TARGET="install-cgi" + +- elif test "$PHP_SAPI_CLI" != "no"; then +- AC_MSG_RESULT(no) +- OVERALL_TARGET= +- PHP_SAPI=cli +- else +- AC_MSG_ERROR([No SAPIs selected.]) ++ PHP_SUBST(BUILD_CGI) ++ PHP_SUBST(INSTALL_CGI) ++ PHP_SUBST(PHP_CGI_OBJS) ++ PHP_SUBST(PHP_CGI_TARGET) ++ PHP_SUBST(PHP_INSTALL_CGI_TARGET) ++ ++ if test "$PHP_SAPI" = "default" ; then ++ PHP_BUILD_PROGRAM($SAPI_CGI_PATH) ++ fi ++ ++else ++ AC_MSG_RESULT(no) ++ if test "$PHP_SAPI" = "default" ; then ++ if test "$PHP_SAPI_CLI" != "no"; then ++ OVERALL_TARGET= ++ PHP_SAPI=cli ++ else ++ AC_MSG_ERROR([No SAPIs selected.]) ++ fi + fi + fi diff --git a/dev-lang/php/files/4-any/php4-imap-symlink.diff b/dev-lang/php/files/4-any/php4-imap-symlink.diff new file mode 100644 index 000000000000..cf74905e5c3e --- /dev/null +++ b/dev-lang/php/files/4-any/php4-imap-symlink.diff @@ -0,0 +1,15 @@ +--- ext/imap/config.m4 2005-09-04 02:48:47.000000000 +0200 ++++ ext/imap/config.m4 2005-09-04 02:49:05.000000000 +0200 +@@ -158,12 +158,6 @@ + AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) + fi + +- if test -r "$IMAP_DIR/c-client/c-client.a"; then +- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 +- elif test -r "$IMAP_DIR/lib/c-client.a"; then +- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1 +- fi +- + for lib in c-client4 c-client imap; do + IMAP_LIB=$lib + IMAP_LIB_CHK(lib) diff --git a/dev-lang/php/files/4-any/php4-iodbc-config.diff b/dev-lang/php/files/4-any/php4-iodbc-config.diff new file mode 100644 index 000000000000..a706916fad5e --- /dev/null +++ b/dev-lang/php/files/4-any/php4-iodbc-config.diff @@ -0,0 +1,14 @@ +--- ext/odbc/config.m4 2005-08-10 02:05:26.000000000 +0200 ++++ ext/odbc/config.m4 2005-08-10 02:06:10.000000000 +0200 +@@ -401,9 +401,9 @@ + fi + if test "$withval" != "no"; then + PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) +- PHP_ADD_INCLUDE($withval/include, 1) ++ PHP_ADD_INCLUDE($withval/include/iodbc, 1) + ODBC_TYPE=iodbc +- ODBC_INCLUDE=-I$withval/include ++ ODBC_INCLUDE=-I$withval/include/iodbc + ODBC_LFLAGS=-L$withval/lib + ODBC_LIBS=-liodbc + AC_DEFINE(HAVE_IODBC,1,[ ]) diff --git a/dev-lang/php/files/4-any/php4-libtool-1.5.patch b/dev-lang/php/files/4-any/php4-libtool-1.5.patch new file mode 100644 index 000000000000..076120384b4a --- /dev/null +++ b/dev-lang/php/files/4-any/php4-libtool-1.5.patch @@ -0,0 +1,19 @@ +--- acinclude.m4 2005-09-08 13:16:38.000000000 +0200 ++++ acinclude.m4 2005-09-08 13:21:09.000000000 +0200 +@@ -783,12 +783,12 @@ + dnl + AC_DEFUN([PHP_BUILD_PROGRAM],[ + OVERALL_TARGET=[]ifelse($1,,php,$1) +- php_c_pre='$(CC)' ++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' +- php_c_post=' && echo > $[@]' +- php_cxx_pre='$(CXX)' ++ php_c_post= ++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' +- php_cxx_post=' && echo > $[@]' ++ php_cxx_post= + php_lo=o + + case $with_pic in diff --git a/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch b/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch new file mode 100644 index 000000000000..3a86dfbb59b3 --- /dev/null +++ b/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch @@ -0,0 +1,30 @@ +--- ext/standard/dns.c ++++ ext/standard/dns.c +@@ -275,6 +275,7 @@ PHP_FUNCTION(checkdnsrr) + #define MAXHOSTNAMELEN 256 + #endif /* MAXHOSTNAMELEN */ + ++#if HAVE_DN_SKIPNAME + /* {{{ proto int getmxrr(string hostname, array mxhosts [, array weight]) + Get MX records corresponding to a given Internet host name */ + PHP_FUNCTION(getmxrr) +@@ -355,6 +356,7 @@ PHP_FUNCTION(getmxrr) + RETURN_TRUE; + } + /* }}} */ ++#endif /* HAVE_DN_SKIPNAME */ + + #endif + /* +--- ext/standard/basic_functions.c ++++ ext/standard/basic_functions.c +@@ -449,7 +449,9 @@ function_entry basic_functions[] = { + + #if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE)) + PHP_FE(checkdnsrr, NULL) ++# if HAVE_DN_SKIPNAME + PHP_FE(getmxrr,second_and_third_args_force_ref) ++# endif + #endif + + PHP_FE(getmyuid, NULL) diff --git a/dev-lang/php/files/4-any/php4-with-iodbc.diff b/dev-lang/php/files/4-any/php4-with-iodbc.diff new file mode 100644 index 000000000000..81afcc0f2de1 --- /dev/null +++ b/dev-lang/php/files/4-any/php4-with-iodbc.diff @@ -0,0 +1,13 @@ +--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000 ++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000 +@@ -91,8 +91,8 @@ + #elif defined(HAVE_IODBC) /* iODBC library */ + + #define ODBC_TYPE "iODBC" +-#include +-#include ++#include ++#include + #define HAVE_SQL_EXTENDED_FETCH 1 + #define SQL_FD_FETCH_ABSOLUTE 0x00000010L + #define SQL_CURSOR_DYNAMIC 2UL 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 new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- 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 | + +----------------------------------------------------------------------+ + */ +-/* $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 + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #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 + #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 new file mode 100644 index 000000000000..19011120eea2 --- /dev/null +++ b/dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch @@ -0,0 +1,39 @@ +--- ext/gd/gd.c 2005/01/17 17:07:57 1.221.2.54 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -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.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ 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; + } +@@ -1699,7 +1699,7 @@ static void _php_image_output(INTERNAL_F + 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 +3017,8 @@ static void php_imagettftext_common(INTE + { + 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; 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 new file mode 100644 index 000000000000..3e4414220aa7 --- /dev/null +++ b/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch @@ -0,0 +1,20 @@ +--- 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-pspell-ext-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- 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.3.11/php4.3.11-session_save_path-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch new file mode 100644 index 000000000000..3836776b14b4 --- /dev/null +++ b/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch @@ -0,0 +1,154 @@ +--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100 ++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:02:03.000000000 +0200 +@@ -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.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -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); + } +@@ -458,15 +453,34 @@ + 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(); \ ++ } \ ++ + 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 +489,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 +522,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 && 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.4.0/apache-1.3/70_mod_php.conf b/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf deleted file mode 100644 index 34a41d81193c..000000000000 --- a/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf +++ /dev/null @@ -1,19 +0,0 @@ -# vim: ft=apache sw=4 ts=4 - - - # Load the module first - - LoadModule php4_module modules/libphp4.so - - - # Set it to handle the files - - AddType application/x-httpd-php .php - AddType application/x-httpd-php .phtml - AddType application/x-httpd-php .php3 - AddType application/x-httpd-php .php4 - AddType application/x-httpd-php-source .phps - - - AddDirectoryIndex index.php index.phtml - diff --git a/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf b/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf deleted file mode 100644 index ce680323f6e0..000000000000 --- a/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf +++ /dev/null @@ -1,19 +0,0 @@ -# vim: ft=apache sw=4 ts=4 - - - # Load the module first - - LoadModule php4_module modules/libphp4.so - - - # Set it to handle the files - - AddType application/x-httpd-php .php - AddType application/x-httpd-php .phtml - AddType application/x-httpd-php .php3 - AddType application/x-httpd-php .php4 - AddType application/x-httpd-php-source .phps - - - AddDirectoryIndex index.php index.phtml - diff --git a/dev-lang/php/files/4.4.0/fastbuild.patch b/dev-lang/php/files/4.4.0/fastbuild.patch deleted file mode 100644 index 47f0dc77a38d..000000000000 --- a/dev-lang/php/files/4.4.0/fastbuild.patch +++ /dev/null @@ -1,250 +0,0 @@ -diff -u --recursive php-4.4.0/acinclude.m4 php-4.4.0-cgi/acinclude.m4 ---- php-4.4.0/acinclude.m4 2005-09-14 22:39:22.000000000 +0200 -+++ php-4.4.0-cgi/acinclude.m4 2005-09-14 22:39:54.000000000 +0200 -@@ -84,7 +84,7 @@ - dnl - dnl which array to append to? - AC_DEFUN([PHP_ADD_SOURCES],[ -- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))) -+ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS)))) - ]) - dnl - dnl _PHP_ASSIGN_BUILD_VARS(type) -diff -u --recursive php-4.4.0/configure.in php-4.4.0-cgi/configure.in ---- php-4.4.0/configure.in 2005-07-11 08:45:09.000000000 +0100 -+++ php-4.4.0-cgi/configure.in 2005-09-01 08:00:54.000000000 +0100 -@@ -1216,20 +1216,20 @@ - INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" - CXXFLAGS="$CXXFLAGS $standard_libtool_flag" - --all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)' -+all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)' - install_targets="$install_modules $install_pear install-build install-headers install-programs" - --case $PHP_SAPI in -- cgi) -- install_targets="install-sapi $install_targets" -- ;; -- cli) -- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" -- ;; -- *) -- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" -- ;; --esac -+if test "$PHP_SAPI_CGI" != "no" ; then -+ install_targets="install-sapi $install_targets" -+fi -+ -+if test "$PHP_SAPI_CLI" != "no" ; then -+ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" -+fi -+ -+if test "$PHP_SAPI" != "default" ; then -+ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" -+fi - - PHP_SUBST(all_targets) - PHP_SUBST(install_targets) -diff -u --recursive php-4.4.0/sapi/cgi/Makefile.frag php-4.4.0-cgi/sapi/cgi/Makefile.frag ---- php-4.4.0/sapi/cgi/Makefile.frag 2003-07-02 02:06:29.000000000 +0100 -+++ php-4.4.0-cgi/sapi/cgi/Makefile.frag 2005-09-01 08:03:20.000000000 +0100 -@@ -1,2 +1,6 @@ --$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) -+$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS) - $(BUILD_CGI) -+ -+install-cgi: $(SAPI_CGI_PATH) -+ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/" -+ @$(INSTALL_CGI) -diff -u --recursive php-4.4.0/sapi/cgi/config9.m4 php-4.4.0-cgi/sapi/cgi/config9.m4 ---- php-4.4.0/sapi/cgi/config9.m4 2004-12-30 07:02:18.000000000 +0000 -+++ php-4.4.0-cgi/sapi/cgi/config9.m4 2005-09-01 08:05:08.000000000 +0100 -@@ -81,93 +81,107 @@ - ]) - - --if test "$PHP_SAPI" = "default"; then -- AC_MSG_CHECKING(for CGI build) -- if test "$PHP_SAPI_CGI" != "no"; then -- AC_MSG_RESULT(yes) -- -- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) -- case $host_alias in -- *cygwin* ) -- SAPI_CGI_PATH=sapi/cgi/php.exe -- ;; -- * ) -- SAPI_CGI_PATH=sapi/cgi/php -- ;; -- esac -- PHP_SUBST(SAPI_CGI_PATH) -- -- PHP_TEST_WRITE_STDOUT -- -- AC_MSG_CHECKING(whether to force Apache CGI redirect) -- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then -- REDIRECT=1 -- else -- REDIRECT=0 -- fi -- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) -- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) -+AC_MSG_CHECKING(for CGI build) -+if test "$PHP_SAPI_CGI" != "no"; then -+ AC_MSG_RESULT(yes) -+ -+ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) -+ case $host_alias in -+ *cygwin* ) -+ SAPI_CGI_PATH=sapi/cgi/php.exe -+ ;; -+ * ) -+ SAPI_CGI_PATH=sapi/cgi/php -+ ;; -+ esac -+ PHP_SUBST(SAPI_CGI_PATH) - -+ PHP_TEST_WRITE_STDOUT - -- AC_MSG_CHECKING(whether to discard path_info + path_translated) -- if test "$PHP_DISCARD_PATH" = "yes"; then -- DISCARD_PATH=1 -- else -- DISCARD_PATH=0 -- fi -- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) -- AC_MSG_RESULT($PHP_DISCARD_PATH) -+ AC_MSG_CHECKING(whether to force Apache CGI redirect) -+ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then -+ REDIRECT=1 -+ else -+ REDIRECT=0 -+ fi -+ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) -+ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) - -- AC_MSG_CHECKING(whether to enable path info checking) -- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then -- ENABLE_PATHINFO_CHECK=1 -- else -- ENABLE_PATHINFO_CHECK=0 -- fi -- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) -- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) - -- AC_MSG_CHECKING(whether to enable fastcgi support) -- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" -- if test -z $PHP_LIBFCGI_DIR; then -- echo "$PHP_LIBFCGI_DIR does not exist" -- exit 1 -- fi -- if test "$PHP_ENABLE_FASTCGI" = "yes"; then -- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) -- PHP_FASTCGI=1 -- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" -- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" -- PHP_FCGI_STATIC=1 -- else -- PHP_FASTCGI=0 -- PHP_FCGI_FILES="" -- PHP_FCGI_INCLUDE="" -- PHP_FCGI_STATIC=0 -- fi -- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) -- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) -- AC_MSG_RESULT($PHP_ENABLE_FASTCGI) -- -- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)" -- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)') -- -- case $host_alias in -- *darwin*) -- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" -+ AC_MSG_CHECKING(whether to discard path_info + path_translated) -+ if test "$PHP_DISCARD_PATH" = "yes"; then -+ DISCARD_PATH=1 -+ else -+ DISCARD_PATH=0 -+ fi -+ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) -+ AC_MSG_RESULT($PHP_DISCARD_PATH) -+ -+ AC_MSG_CHECKING(whether to enable path info checking) -+ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then -+ ENABLE_PATHINFO_CHECK=1 -+ else -+ ENABLE_PATHINFO_CHECK=0 -+ fi -+ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) -+ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) -+ -+ AC_MSG_CHECKING(whether to enable fastcgi support) -+ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" -+ if test -z $PHP_LIBFCGI_DIR; then -+ echo "$PHP_LIBFCGI_DIR does not exist" -+ exit 1 -+ fi -+ if test "$PHP_ENABLE_FASTCGI" = "yes"; then -+ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) -+ PHP_FASTCGI=1 -+ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" -+ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" -+ PHP_FCGI_STATIC=1 -+ else -+ PHP_FASTCGI=0 -+ PHP_FCGI_FILES="" -+ PHP_FCGI_INCLUDE="" -+ PHP_FCGI_STATIC=0 -+ fi -+ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) -+ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) -+ AC_MSG_RESULT($PHP_ENABLE_FASTCGI) -+ -+ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)" -+ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi) -+ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi) -+ -+ case $host_alias in -+ *darwin*) -+ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" - ;; -- *) -- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" -+ *) -+ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" - ;; -- esac -+ esac - -- PHP_SUBST(BUILD_CGI) -+ PHP_CGI_TARGET="$SAPI_CGI_PATH" -+ PHP_INSTALL_CGI_TARGET="install-cgi" - -- elif test "$PHP_SAPI_CLI" != "no"; then -- AC_MSG_RESULT(no) -- OVERALL_TARGET= -- PHP_SAPI=cli -- else -- AC_MSG_ERROR([No SAPIs selected.]) -+ PHP_SUBST(BUILD_CGI) -+ PHP_SUBST(INSTALL_CGI) -+ PHP_SUBST(PHP_CGI_OBJS) -+ PHP_SUBST(PHP_CGI_TARGET) -+ PHP_SUBST(PHP_INSTALL_CGI_TARGET) -+ -+ if test "$PHP_SAPI" = "default" ; then -+ PHP_BUILD_PROGRAM($SAPI_CGI_PATH) -+ fi -+ -+else -+ AC_MSG_RESULT(no) -+ if test "$PHP_SAPI" = "default" ; then -+ if test "$PHP_SAPI_CLI" != "no"; then -+ OVERALL_TARGET= -+ PHP_SAPI=cli -+ else -+ AC_MSG_ERROR([No SAPIs selected.]) -+ fi - fi - fi diff --git a/dev-lang/php/files/4.4.0/php4-imap-symlink.diff b/dev-lang/php/files/4.4.0/php4-imap-symlink.diff deleted file mode 100644 index cf74905e5c3e..000000000000 --- a/dev-lang/php/files/4.4.0/php4-imap-symlink.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- ext/imap/config.m4 2005-09-04 02:48:47.000000000 +0200 -+++ ext/imap/config.m4 2005-09-04 02:49:05.000000000 +0200 -@@ -158,12 +158,6 @@ - AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) - fi - -- if test -r "$IMAP_DIR/c-client/c-client.a"; then -- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 -- elif test -r "$IMAP_DIR/lib/c-client.a"; then -- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1 -- fi -- - for lib in c-client4 c-client imap; do - IMAP_LIB=$lib - IMAP_LIB_CHK(lib) diff --git a/dev-lang/php/files/4.4.0/php4-iodbc-config.diff b/dev-lang/php/files/4.4.0/php4-iodbc-config.diff deleted file mode 100644 index a706916fad5e..000000000000 --- a/dev-lang/php/files/4.4.0/php4-iodbc-config.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ext/odbc/config.m4 2005-08-10 02:05:26.000000000 +0200 -+++ ext/odbc/config.m4 2005-08-10 02:06:10.000000000 +0200 -@@ -401,9 +401,9 @@ - fi - if test "$withval" != "no"; then - PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -- PHP_ADD_INCLUDE($withval/include, 1) -+ PHP_ADD_INCLUDE($withval/include/iodbc, 1) - ODBC_TYPE=iodbc -- ODBC_INCLUDE=-I$withval/include -+ ODBC_INCLUDE=-I$withval/include/iodbc - ODBC_LFLAGS=-L$withval/lib - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) diff --git a/dev-lang/php/files/4.4.0/php4-libtool-1.5.patch b/dev-lang/php/files/4.4.0/php4-libtool-1.5.patch deleted file mode 100644 index 076120384b4a..000000000000 --- a/dev-lang/php/files/4.4.0/php4-libtool-1.5.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- acinclude.m4 2005-09-08 13:16:38.000000000 +0200 -+++ acinclude.m4 2005-09-08 13:21:09.000000000 +0200 -@@ -783,12 +783,12 @@ - dnl - AC_DEFUN([PHP_BUILD_PROGRAM],[ - OVERALL_TARGET=[]ifelse($1,,php,$1) -- php_c_pre='$(CC)' -+ php_c_pre='$(LIBTOOL) --mode=compile $(CC)' - php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' -- php_c_post=' && echo > $[@]' -- php_cxx_pre='$(CXX)' -+ php_c_post= -+ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' - php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' -- php_cxx_post=' && echo > $[@]' -+ php_cxx_post= - php_lo=o - - case $with_pic in diff --git a/dev-lang/php/files/4.4.0/php4-with-iodbc.diff b/dev-lang/php/files/4.4.0/php4-with-iodbc.diff deleted file mode 100644 index 81afcc0f2de1..000000000000 --- a/dev-lang/php/files/4.4.0/php4-with-iodbc.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000 -+++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000 -@@ -91,8 +91,8 @@ - #elif defined(HAVE_IODBC) /* iODBC library */ - - #define ODBC_TYPE "iODBC" --#include --#include -+#include -+#include - #define HAVE_SQL_EXTENDED_FETCH 1 - #define SQL_FD_FETCH_ABSOLUTE 0x00000010L - #define SQL_CURSOR_DYNAMIC 2UL diff --git a/dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch b/dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch deleted file mode 100644 index 5f7d17b05c71..000000000000 --- a/dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- configure.in 2005-09-17 21:00:43.000000000 +0200 -+++ configure.in 2005-09-17 21:00:18.000000000 +0200 -@@ -41,7 +41,7 @@ - MAJOR_VERSION=4 - MINOR_VERSION=3 - RELEASE_VERSION=11 --EXTRA_VERSION="" -+EXTRA_VERSION="-pl1-gentoo" - VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION" - - dnl Define where extension directories are located in the configure context ---- 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.4.0/php4.4.0-fopen_wrappers.patch b/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- 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 | + +----------------------------------------------------------------------+ + */ +-/* $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 + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #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 + #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.4.0/php4.4.0-gd_safe_mode.patch b/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch new file mode 100644 index 000000000000..1e0d49d1373c --- /dev/null +++ b/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch @@ -0,0 +1,20 @@ +--- ext/gd/gd.c 2005/05/06 16:51:54 1.221.2.56 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ 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; + } diff --git a/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch b/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch index 6ac2b2e50727..978c582a6a79 100644 --- a/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch +++ b/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch @@ -1,14 +1,3 @@ ---- configure.in 2005-09-17 17:44:30.000000000 +0200 -+++ configure.in 2005-09-17 17:45:01.000000000 +0200 -@@ -41,7 +41,7 @@ - MAJOR_VERSION=4 - MINOR_VERSION=4 - RELEASE_VERSION=0 --EXTRA_VERSION="" -+EXTRA_VERSION="-pl1-gentoo" - VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION" - - dnl Define where extension directories are located in the configure context --- ext/pcre/config.m4 2005/05/31 12:22:27 1.29.2.7 +++ 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 diff --git a/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch b/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- 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.0/php4.4.0-session_save_path-segf.patch b/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch new file mode 100644 index 000000000000..8f936ae5ec39 --- /dev/null +++ b/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch @@ -0,0 +1,127 @@ +--- sapi/apache2handler/sapi_apache2.c 2005/04/08 20:35:02 1.1.2.40 ++++ sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36 1.1.2.40.2.5 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.40 2005/04/08 20:35:02 sniper Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -453,15 +453,34 @@ static int php_handler(request_rec *r) + 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(); \ ++ } \ ++ + 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; + } + } +@@ -470,32 +489,24 @@ static int php_handler(request_rec *r) + * 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; + } + +@@ -511,24 +522,30 @@ static int php_handler(request_rec *r) + + 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 && 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/5.0-any/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf new file mode 100644 index 000000000000..c6f14262e3f0 --- /dev/null +++ b/dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf @@ -0,0 +1,20 @@ +# vim: ft=apache sw=4 ts=4 + + + # Load the module first + + LoadModule php5_module modules/libphp5.so + + + # Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + + AddDirectoryIndex index.php index.phtml + diff --git a/dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf new file mode 100644 index 000000000000..40dfa869e4ff --- /dev/null +++ b/dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf @@ -0,0 +1,20 @@ +# vim: ft=apache sw=4 ts=4 + + + # Load the module first + + LoadModule php5_module modules/libphp5.so + + + # Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + + AddDirectoryIndex index.php index.phtml + diff --git a/dev-lang/php/files/5.0-any/php5-imap-symlink.diff b/dev-lang/php/files/5.0-any/php5-imap-symlink.diff new file mode 100644 index 000000000000..99cfc9b68976 --- /dev/null +++ b/dev-lang/php/files/5.0-any/php5-imap-symlink.diff @@ -0,0 +1,15 @@ +--- ext/imap/config.m4 2005-09-04 02:49:45.000000000 +0200 ++++ ext/imap/config.m4 2005-09-04 02:50:00.000000000 +0200 +@@ -146,12 +146,6 @@ + AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) + fi + +- if test -r "$IMAP_DIR/c-client/c-client.a"; then +- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 +- elif test -r "$IMAP_DIR/lib/c-client.a"; then +- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1 +- fi +- + for lib in c-client4 c-client imap; do + IMAP_LIB=$lib + IMAP_LIB_CHK(lib) diff --git a/dev-lang/php/files/5.0-any/php5-iodbc-config.diff b/dev-lang/php/files/5.0-any/php5-iodbc-config.diff new file mode 100644 index 000000000000..1e7a7c556439 --- /dev/null +++ b/dev-lang/php/files/5.0-any/php5-iodbc-config.diff @@ -0,0 +1,14 @@ +--- ext/odbc/config.m4 2005-08-31 01:16:38.000000000 +0200 ++++ ext/odbc/config.m4 2005-08-31 01:17:24.000000000 +0200 +@@ -408,9 +408,9 @@ + fi + if test "$withval" != "no"; then + PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) +- PHP_ADD_INCLUDE($withval/include, 1) ++ PHP_ADD_INCLUDE($withval/include/iodbc, 1) + ODBC_TYPE=iodbc +- ODBC_INCLUDE=-I$withval/include ++ ODBC_INCLUDE=-I$withval/include/iodbc + ODBC_LFLAGS=-L$withval/lib + ODBC_LIBS=-liodbc + AC_DEFINE(HAVE_IODBC,1,[ ]) diff --git a/dev-lang/php/files/5.0-any/php5-libtool-1.5.patch b/dev-lang/php/files/5.0-any/php5-libtool-1.5.patch new file mode 100644 index 000000000000..7404992272e1 --- /dev/null +++ b/dev-lang/php/files/5.0-any/php5-libtool-1.5.patch @@ -0,0 +1,19 @@ +--- acinclude.m4 2005-09-08 13:27:42.000000000 +0200 ++++ acinclude.m4 2005-09-08 13:28:28.000000000 +0200 +@@ -779,12 +779,12 @@ + dnl + AC_DEFUN([PHP_BUILD_PROGRAM],[ + OVERALL_TARGET=[]ifelse($1,,php,$1) +- php_c_pre='$(CC)' ++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' +- php_c_post=' && echo > $[@]' +- php_cxx_pre='$(CXX)' ++ php_c_post= ++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' +- php_cxx_post=' && echo > $[@]' ++ php_cxx_post= + php_lo=o + + case $with_pic in diff --git a/dev-lang/php/files/5.0-any/php5-prefork.patch b/dev-lang/php/files/5.0-any/php5-prefork.patch new file mode 100644 index 000000000000..135579c33d82 --- /dev/null +++ b/dev-lang/php/files/5.0-any/php5-prefork.patch @@ -0,0 +1,26 @@ +diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4 +--- php-5.0.4-orig/sapi/apache2filter/config.m4 2005-03-13 20:30:44.767051120 +0000 ++++ php-5.0.4/sapi/apache2filter/config.m4 2005-03-13 20:32:01.999310032 +0000 +@@ -115,9 +115,6 @@ + ;; + esac + +- if test "$APXS_MPM" != "prefork"; then +- PHP_BUILD_THREAD_SAFE +- fi + AC_MSG_RESULT(yes) + + PHP_SUBST(APXS) +diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4 +--- php-5.0.4-orig/sapi/apache2handler/config.m4 2005-03-13 20:30:44.771050512 +0000 ++++ php-5.0.4/sapi/apache2handler/config.m4 2005-03-13 20:31:50.106118072 +0000 +@@ -114,9 +114,6 @@ + ;; + esac + +- if test "$APXS_MPM" != "prefork"; then +- PHP_BUILD_THREAD_SAFE +- fi + AC_MSG_RESULT(yes) + + PHP_SUBST(APXS) diff --git a/dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff b/dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff new file mode 100644 index 000000000000..626ac67f9081 --- /dev/null +++ b/dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff @@ -0,0 +1,35 @@ +diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c +--- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300 ++++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300 +@@ -1341,16 +1341,21 @@ + soap_obj = NULL; + #if HAVE_PHP_SESSION + /* If persistent then set soap_obj from from the previous created session (if available) */ ++ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!! + if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { + zval **tmp_soap; + ++ bzero(soapname,32+sizeof("_bogus_session_name")); ++ strncpy(soapname,service->soap_class.ce->name,32); ++ strcat(soapname,"_bogus_session_name"); ++ + if (PS(session_status) != php_session_active && + PS(session_status) != php_session_disabled) { + php_session_start(TSRMLS_C); + } + + /* Find the soap object and assign */ +- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS && ++ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS && + Z_TYPE_PP(tmp_soap) == IS_OBJECT && + Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) { + soap_obj = *tmp_soap; +@@ -1432,7 +1437,7 @@ + /* If session then update session hash with new object */ + if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { + zval **tmp_soap_pp; +- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { ++ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { + soap_obj = *tmp_soap_pp; + } + } else { diff --git a/dev-lang/php/files/5.0-any/php5-with-iodbc.diff b/dev-lang/php/files/5.0-any/php5-with-iodbc.diff new file mode 100644 index 000000000000..81afcc0f2de1 --- /dev/null +++ b/dev-lang/php/files/5.0-any/php5-with-iodbc.diff @@ -0,0 +1,13 @@ +--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000 ++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000 +@@ -91,8 +91,8 @@ + #elif defined(HAVE_IODBC) /* iODBC library */ + + #define ODBC_TYPE "iODBC" +-#include +-#include ++#include ++#include + #define HAVE_SQL_EXTENDED_FETCH 1 + #define SQL_FD_FETCH_ABSOLUTE 0x00000010L + #define SQL_CURSOR_DYNAMIC 2UL diff --git a/dev-lang/php/files/5.0.0/php5-imap-symlink.diff b/dev-lang/php/files/5.0.0/php5-imap-symlink.diff deleted file mode 100644 index 99cfc9b68976..000000000000 --- a/dev-lang/php/files/5.0.0/php5-imap-symlink.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- ext/imap/config.m4 2005-09-04 02:49:45.000000000 +0200 -+++ ext/imap/config.m4 2005-09-04 02:50:00.000000000 +0200 -@@ -146,12 +146,6 @@ - AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) - fi - -- if test -r "$IMAP_DIR/c-client/c-client.a"; then -- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 -- elif test -r "$IMAP_DIR/lib/c-client.a"; then -- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1 -- fi -- - for lib in c-client4 c-client imap; do - IMAP_LIB=$lib - IMAP_LIB_CHK(lib) diff --git a/dev-lang/php/files/5.0.0/php5-iodbc-config.diff b/dev-lang/php/files/5.0.0/php5-iodbc-config.diff deleted file mode 100644 index 1e7a7c556439..000000000000 --- a/dev-lang/php/files/5.0.0/php5-iodbc-config.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ext/odbc/config.m4 2005-08-31 01:16:38.000000000 +0200 -+++ ext/odbc/config.m4 2005-08-31 01:17:24.000000000 +0200 -@@ -408,9 +408,9 @@ - fi - if test "$withval" != "no"; then - PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -- PHP_ADD_INCLUDE($withval/include, 1) -+ PHP_ADD_INCLUDE($withval/include/iodbc, 1) - ODBC_TYPE=iodbc -- ODBC_INCLUDE=-I$withval/include -+ ODBC_INCLUDE=-I$withval/include/iodbc - ODBC_LFLAGS=-L$withval/lib - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) diff --git a/dev-lang/php/files/5.0.0/php5-libtool-1.5.patch b/dev-lang/php/files/5.0.0/php5-libtool-1.5.patch deleted file mode 100644 index 7404992272e1..000000000000 --- a/dev-lang/php/files/5.0.0/php5-libtool-1.5.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- acinclude.m4 2005-09-08 13:27:42.000000000 +0200 -+++ acinclude.m4 2005-09-08 13:28:28.000000000 +0200 -@@ -779,12 +779,12 @@ - dnl - AC_DEFUN([PHP_BUILD_PROGRAM],[ - OVERALL_TARGET=[]ifelse($1,,php,$1) -- php_c_pre='$(CC)' -+ php_c_pre='$(LIBTOOL) --mode=compile $(CC)' - php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' -- php_c_post=' && echo > $[@]' -- php_cxx_pre='$(CXX)' -+ php_c_post= -+ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' - php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' -- php_cxx_post=' && echo > $[@]' -+ php_cxx_post= - php_lo=o - - case $with_pic in diff --git a/dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch b/dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch deleted file mode 100644 index 7aad99f52a9b..000000000000 --- a/dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- configure.in 2005-09-17 21:42:36.000000000 +0200 -+++ configure.in 2005-09-17 21:42:51.000000000 +0200 -@@ -41,7 +41,7 @@ - MAJOR_VERSION=5 - MINOR_VERSION=0 - RELEASE_VERSION=4 --EXTRA_VERSION="" -+EXTRA_VERSION="-pl1-gentoo" - VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION" - - dnl Define where extension directories are located in the configure context ---- ext/pcre/config.m4 2003/06/28 04:30:51 1.32 -+++ ext/pcre/config.m4 2005/08/22 16:55:56 1.32.2.2 -@@ -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/5.0.0/php5.0.4-xmlrcp-ccode.diff b/dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff deleted file mode 100644 index 15e5950d820f..000000000000 --- a/dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- ext/xmlrpc/libxmlrpc/xml_element.c 2004-06-01 22:16:06.000000000 +0200 -+++ ext/xmlrpc/libxmlrpc/xml_element.c 2005-04-22 13:54:17.000000000 +0200 -@@ -113,7 +116,7 @@ - #include "expat.h" - #include "encodings.h" - --#define my_free(thing) if(thing) {free(thing); thing = 0;} -+#define my_free(thing) if(thing) {free(thing); thing = NULL;} - - #define XML_DECL_START "children); - Q_Destroy(&root->attrs); -- my_free((char*)root->name); -+ if(root->name) { -+ free((char *)root->name); -+ root->name = NULL; -+ } - simplestring_free(&root->text); - my_free(root); - } diff --git a/dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch b/dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch deleted file mode 100644 index 8dbae7b26f40..000000000000 --- a/dev-lang/php/files/5.0.0/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.4/php5.0.4-fopen_wrappers.patch b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch new file mode 100644 index 000000000000..f645199fba24 --- /dev/null +++ b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/03/11 06:55:22 1.170.2.2 ++++ 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.2 2005/03/11 06:55:22 hyanantha Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -35,14 +35,6 @@ + #ifdef PHP_WIN32 + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -117,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'; + } + } +@@ -132,7 +124,7 @@ PHPAPI int php_check_specific_open_based + } + + /* Check the path */ +-#ifdef PHP_WIN32 ++#if defined(PHP_WIN32) || defined(NETWARE) + if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { + #else + if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { diff --git a/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch b/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch new file mode 100644 index 000000000000..91b0aaea3122 --- /dev/null +++ b/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch @@ -0,0 +1,29 @@ +--- ext/gd/gd.c 2005/01/17 17:07:47 1.294.2.11 ++++ ext/gd/gd.c 2005/10/06 20:42:56 1.294.2.13 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.294.2.11 2005/01/17 17:07:47 sniper Exp $ */ ++/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ 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; + } +@@ -1781,7 +1781,7 @@ static void _php_image_output(INTERNAL_F + 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; diff --git a/dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch b/dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch new file mode 100644 index 000000000000..41bfd23612f0 --- /dev/null +++ b/dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch @@ -0,0 +1,20 @@ +--- ext/pcre/config.m4 2003/06/28 04:30:51 1.32 ++++ ext/pcre/config.m4 2005/08/22 16:55:56 1.32.2.2 +@@ -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/5.0.4/php5.0.4-pspell-ext-segf.patch b/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch new file mode 100644 index 000000000000..5c32b144a490 --- /dev/null +++ b/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch @@ -0,0 +1,320 @@ +--- 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.4/php5.0.4-session_save_path-segf.patch b/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch new file mode 100644 index 000000000000..f984d73b0d64 --- /dev/null +++ b/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch @@ -0,0 +1,164 @@ +--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:23:57.000000000 +0100 ++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:09:39.000000000 +0200 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.40.2.7 2005/03/10 11:23:57 jorton Exp $ */ ++/* $Id: sapi_apache2.c,v 1.40.2.13 2005/10/17 19:35:39 rasmus Exp $ */ + + #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + +@@ -111,10 +111,8 @@ + } else { + apr_table_add(ctx->r->headers_out, sapi_header->header, val); + } +- +- sapi_free_header(sapi_header); + +- return 0; ++ return SAPI_HEADER_ADD; + } + + static int +@@ -264,22 +262,17 @@ + + 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); + } +@@ -453,15 +446,35 @@ + 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(); \ ++ } \ ++ + 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; + } + } +@@ -470,32 +483,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; + } + +@@ -511,24 +516,29 @@ + + 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; + 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 && 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/5.0.4/php5.0.4-xmlrcp-ccode.diff b/dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff new file mode 100644 index 000000000000..15e5950d820f --- /dev/null +++ b/dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff @@ -0,0 +1,23 @@ +--- ext/xmlrpc/libxmlrpc/xml_element.c 2004-06-01 22:16:06.000000000 +0200 ++++ ext/xmlrpc/libxmlrpc/xml_element.c 2005-04-22 13:54:17.000000000 +0200 +@@ -113,7 +116,7 @@ + #include "expat.h" + #include "encodings.h" + +-#define my_free(thing) if(thing) {free(thing); thing = 0;} ++#define my_free(thing) if(thing) {free(thing); thing = NULL;} + + #define XML_DECL_START "children); + Q_Destroy(&root->attrs); +- my_free((char*)root->name); ++ if(root->name) { ++ free((char *)root->name); ++ root->name = NULL; ++ } + simplestring_free(&root->text); + my_free(root); + } 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 new file mode 100644 index 000000000000..b945c11dcade --- /dev/null +++ b/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch @@ -0,0 +1,22 @@ +--- 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 new file mode 100644 index 000000000000..05bb35495bb1 --- /dev/null +++ b/dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch @@ -0,0 +1,20 @@ +--- ext/gd/gd.c 2005/05/06 16:49:04 1.294.2.12 ++++ ext/gd/gd.c 2005/10/06 20:42:56 1.294.2.13 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.294.2.12 2005/05/06 16:49:04 tony2001 Exp $ */ ++/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ 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; + } 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 new file mode 100644 index 000000000000..8dbae7b26f40 --- /dev/null +++ b/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch @@ -0,0 +1,42 @@ +--- 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 new file mode 100644 index 000000000000..5c32b144a490 --- /dev/null +++ b/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch @@ -0,0 +1,320 @@ +--- 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-session_save_path-segf.patch b/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch new file mode 100644 index 000000000000..aee032ff5603 --- /dev/null +++ b/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch @@ -0,0 +1,123 @@ +--- sapi/apache2handler/sapi_apache2.c 2005/09/02 13:51:26 1.40.2.11 ++++ sapi/apache2handler/sapi_apache2.c 2005/10/17 19:35:39 1.40.2.13 +@@ -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.13 2005/10/17 19:35:39 rasmus Exp $ */ + + #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + +@@ -446,15 +446,35 @@ static int php_handler(request_rec *r) + 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(); \ ++ } \ ++ + 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 +483,24 @@ static int php_handler(request_rec *r) + * 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 +516,24 @@ static int php_handler(request_rec *r) + + 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 && 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.1-any/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf new file mode 100644 index 000000000000..c6f14262e3f0 --- /dev/null +++ b/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf @@ -0,0 +1,20 @@ +# vim: ft=apache sw=4 ts=4 + + + # Load the module first + + LoadModule php5_module modules/libphp5.so + + + # Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + + AddDirectoryIndex index.php index.phtml + diff --git a/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf new file mode 100644 index 000000000000..40dfa869e4ff --- /dev/null +++ b/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf @@ -0,0 +1,20 @@ +# vim: ft=apache sw=4 ts=4 + + + # Load the module first + + LoadModule php5_module modules/libphp5.so + + + # Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + + AddDirectoryIndex index.php index.phtml + diff --git a/dev-lang/php/files/5.1-any/php5-fastbuild.patch b/dev-lang/php/files/5.1-any/php5-fastbuild.patch new file mode 100644 index 000000000000..5c3ea8504569 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-fastbuild.patch @@ -0,0 +1,234 @@ +diff -u --recursive php-5.1.0RC1/acinclude.m4 php-5.1.0RC1-cgi/acinclude.m4 +--- php-5.1.0RC1/acinclude.m4 2005-09-14 22:40:54.000000000 +0200 ++++ php-5.1.0RC1/acinclude.m4 2005-09-14 22:41:14.000000000 +0200 +@@ -194,7 +194,7 @@ + dnl + dnl which array to append to? + AC_DEFUN([PHP_ADD_SOURCES],[ +- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))) ++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS)))) + ]) + + dnl +@@ -962,12 +962,8 @@ + + if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then + dnl ---------------------------------------------- CLI static module +- if test "$PHP_SAPI" = "cgi"; then +- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) +- EXT_STATIC="$EXT_STATIC $1" +- else +- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) +- fi ++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) ++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi) + EXT_CLI_STATIC="$EXT_CLI_STATIC $1" + fi + PHP_ADD_BUILD_DIR($ext_builddir) +diff -u --recursive php-5.1.0RC1/sapi/cgi/Makefile.frag php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag +--- php-5.1.0RC1/sapi/cgi/Makefile.frag 2003-07-02 02:08:26.000000000 +0100 ++++ php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag 2005-08-31 08:38:32.000000000 +0100 +@@ -1,2 +1,6 @@ +-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) ++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS) + $(BUILD_CGI) ++ ++install-cgi: $(SAPI_CGI_PATH) ++ @echo "Installing CGI binary $(INSTALL_ROOT)$(bindir)/" ++ @$(INSTALL_CGI) +diff -u --recursive php-5.1.0RC1/sapi/cgi/config9.m4 php-5.1.0RC1-cgi/sapi/cgi/config9.m4 +--- php-5.1.0RC1/sapi/cgi/config9.m4 2005-07-07 06:54:43.000000000 +0100 ++++ php-5.1.0RC1-cgi/sapi/cgi/config9.m4 2005-08-31 08:54:01.000000000 +0100 +@@ -80,96 +80,109 @@ + ]) + + +-if test "$PHP_SAPI" = "default"; then +- AC_MSG_CHECKING(for CGI build) +- if test "$PHP_SAPI_CGI" != "no"; then +- AC_MSG_RESULT(yes) +- +- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) +- case $host_alias in +- *cygwin* ) +- SAPI_CGI_PATH=sapi/cgi/php.exe +- ;; +- * ) +- SAPI_CGI_PATH=sapi/cgi/php +- ;; +- esac +- PHP_SUBST(SAPI_CGI_PATH) +- +- PHP_TEST_WRITE_STDOUT +- +- AC_MSG_CHECKING(whether to force Apache CGI redirect) +- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then +- REDIRECT=1 +- else +- REDIRECT=0 +- fi +- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) +- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) ++AC_MSG_CHECKING(for CGI build) ++if test "$PHP_SAPI_CGI" != "no"; then ++ AC_MSG_RESULT(yes) ++ ++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) ++ case $host_alias in ++ *cygwin* ) ++ SAPI_CGI_PATH=sapi/cgi/php.exe ++ ;; ++ * ) ++ SAPI_CGI_PATH=sapi/cgi/php ++ ;; ++ esac ++ PHP_SUBST(SAPI_CGI_PATH) + ++ PHP_TEST_WRITE_STDOUT + +- AC_MSG_CHECKING(whether to discard path_info + path_translated) +- if test "$PHP_DISCARD_PATH" = "yes"; then +- DISCARD_PATH=1 +- else +- DISCARD_PATH=0 +- fi +- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) +- AC_MSG_RESULT($PHP_DISCARD_PATH) ++ AC_MSG_CHECKING(whether to force Apache CGI redirect) ++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then ++ REDIRECT=1 ++ else ++ REDIRECT=0 ++ fi ++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) ++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) + +- AC_MSG_CHECKING(whether to enable path info checking) +- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then +- ENABLE_PATHINFO_CHECK=1 +- else +- ENABLE_PATHINFO_CHECK=0 +- fi +- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) +- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) + +- AC_MSG_CHECKING(whether to enable fastcgi support) +- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" +- if test -z $PHP_LIBFCGI_DIR; then +- echo "$PHP_LIBFCGI_DIR does not exist" +- exit 1 +- fi +- if test "$PHP_ENABLE_FASTCGI" = "yes"; then +- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) +- PHP_FASTCGI=1 +- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" +- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" +- PHP_FCGI_STATIC=1 +- else +- PHP_FASTCGI=0 +- PHP_FCGI_FILES="" +- PHP_FCGI_INCLUDE="" +- PHP_FCGI_STATIC=0 +- fi +- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) +- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) +- AC_MSG_RESULT($PHP_ENABLE_FASTCGI) +- +- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)" +- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)') +- +- case $host_alias in +- *aix*) +- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" +- ;; +- *darwin*) +- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ AC_MSG_CHECKING(whether to discard path_info + path_translated) ++ if test "$PHP_DISCARD_PATH" = "yes"; then ++ DISCARD_PATH=1 ++ else ++ DISCARD_PATH=0 ++ fi ++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) ++ AC_MSG_RESULT($PHP_DISCARD_PATH) ++ ++ AC_MSG_CHECKING(whether to enable path info checking) ++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then ++ ENABLE_PATHINFO_CHECK=1 ++ else ++ ENABLE_PATHINFO_CHECK=0 ++ fi ++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) ++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) ++ ++ AC_MSG_CHECKING(whether to enable fastcgi support) ++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" ++ if test -z $PHP_LIBFCGI_DIR; then ++ echo "$PHP_LIBFCGI_DIR does not exist" ++ exit 1 ++ fi ++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then ++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) ++ PHP_FASTCGI=1 ++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" ++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" ++ PHP_FCGI_STATIC=1 ++ else ++ PHP_FASTCGI=0 ++ PHP_FCGI_FILES="" ++ PHP_FCGI_INCLUDE="" ++ PHP_FCGI_STATIC=0 ++ fi ++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) ++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) ++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI) ++ ++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)" ++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi) ++ PHP_ADD_SOURCES(/main, internal_functions_cli.c,,cgi) ++ ++ case $host_alias in ++ *aix*) ++ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ ;; ++ *darwin*) ++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; +- *) +- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ *) ++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; +- esac ++ esac + +- PHP_SUBST(BUILD_CGI) ++ PHP_CGI_TARGET="\$(SAPI_CGI_PATH)" ++ PHP_INSTALL_CGI_TARGET="install-cgi" + +- elif test "$PHP_SAPI_CLI" != "no"; then +- AC_MSG_RESULT(no) +- OVERALL_TARGET= +- PHP_SAPI=cli +- else +- AC_MSG_ERROR([No SAPIs selected.]) ++ PHP_SUBST(BUILD_CGI) ++ PHP_SUBST(INSTALL_CGI) ++ PHP_SUBST(PHP_CGI_OBJS) ++ PHP_SUBST(PHP_CGI_TARGET) ++ PHP_SUBST(PHP_INSTALL_CGI_TARGET) ++ ++ if test "$PHP_SAPI" = "default" ; then ++ PHP_BUILD_PROGRAM($SAP_CGI_PATH) ++ fi ++else ++ AC_MSG_RESULT(no) ++ if test "$PHP_SAPI" = "default" ; then ++ if test "$PHP_SAPI_CLI" != "no" ; then ++ OVERALL_TARGET= ++ PHP_SAPI=cli ++ else ++ AC_MSG_ERROR([No SAPIs selected.]) ++ fi + fi + fi diff --git a/dev-lang/php/files/5.1-any/php5-imap-symlink.diff b/dev-lang/php/files/5.1-any/php5-imap-symlink.diff new file mode 100644 index 000000000000..13c2bddcbb40 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-imap-symlink.diff @@ -0,0 +1,15 @@ +--- ext/imap/config.m4 2005-09-04 00:56:31.000000000 +0200 ++++ ext/imap/config.m4 2005-09-04 00:57:03.000000000 +0200 +@@ -146,12 +146,6 @@ + AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) + fi + +- if test -r "$IMAP_DIR/c-client/c-client.a"; then +- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 +- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then +- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 +- fi +- + for lib in c-client4 c-client imap; do + IMAP_LIB=$lib + IMAP_LIB_CHK($PHP_LIBDIR) diff --git a/dev-lang/php/files/5.1-any/php5-iodbc-config.diff b/dev-lang/php/files/5.1-any/php5-iodbc-config.diff new file mode 100644 index 000000000000..b6d1b68dc691 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-iodbc-config.diff @@ -0,0 +1,14 @@ +--- ext/odbc/config.m4 2005-08-10 02:08:48.000000000 +0200 ++++ ext/odbc/config.m4 2005-08-10 02:09:14.000000000 +0200 +@@ -440,9 +440,9 @@ + fi + if test "$withval" != "no"; then + PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) +- PHP_ADD_INCLUDE($withval/include, 1) ++ PHP_ADD_INCLUDE($withval/include/iodbc, 1) + ODBC_TYPE=iodbc +- ODBC_INCLUDE=-I$withval/include ++ ODBC_INCLUDE=-I$withval/include/iodbc + ODBC_LFLAGS=-L$withval/$PHP_LIBDIR + ODBC_LIBS=-liodbc + AC_DEFINE(HAVE_IODBC,1,[ ]) diff --git a/dev-lang/php/files/5.1-any/php5-prefork.patch b/dev-lang/php/files/5.1-any/php5-prefork.patch new file mode 100644 index 000000000000..135579c33d82 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-prefork.patch @@ -0,0 +1,26 @@ +diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4 +--- php-5.0.4-orig/sapi/apache2filter/config.m4 2005-03-13 20:30:44.767051120 +0000 ++++ php-5.0.4/sapi/apache2filter/config.m4 2005-03-13 20:32:01.999310032 +0000 +@@ -115,9 +115,6 @@ + ;; + esac + +- if test "$APXS_MPM" != "prefork"; then +- PHP_BUILD_THREAD_SAFE +- fi + AC_MSG_RESULT(yes) + + PHP_SUBST(APXS) +diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4 +--- php-5.0.4-orig/sapi/apache2handler/config.m4 2005-03-13 20:30:44.771050512 +0000 ++++ php-5.0.4/sapi/apache2handler/config.m4 2005-03-13 20:31:50.106118072 +0000 +@@ -114,9 +114,6 @@ + ;; + esac + +- if test "$APXS_MPM" != "prefork"; then +- PHP_BUILD_THREAD_SAFE +- fi + AC_MSG_RESULT(yes) + + PHP_SUBST(APXS) diff --git a/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff b/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff new file mode 100644 index 000000000000..626ac67f9081 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff @@ -0,0 +1,35 @@ +diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c +--- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300 ++++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300 +@@ -1341,16 +1341,21 @@ + soap_obj = NULL; + #if HAVE_PHP_SESSION + /* If persistent then set soap_obj from from the previous created session (if available) */ ++ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!! + if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { + zval **tmp_soap; + ++ bzero(soapname,32+sizeof("_bogus_session_name")); ++ strncpy(soapname,service->soap_class.ce->name,32); ++ strcat(soapname,"_bogus_session_name"); ++ + if (PS(session_status) != php_session_active && + PS(session_status) != php_session_disabled) { + php_session_start(TSRMLS_C); + } + + /* Find the soap object and assign */ +- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS && ++ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS && + Z_TYPE_PP(tmp_soap) == IS_OBJECT && + Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) { + soap_obj = *tmp_soap; +@@ -1432,7 +1437,7 @@ + /* If session then update session hash with new object */ + if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { + zval **tmp_soap_pp; +- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { ++ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { + soap_obj = *tmp_soap_pp; + } + } else { diff --git a/dev-lang/php/files/5.1-any/php5-with-iodbc.diff b/dev-lang/php/files/5.1-any/php5-with-iodbc.diff new file mode 100644 index 000000000000..81afcc0f2de1 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-with-iodbc.diff @@ -0,0 +1,13 @@ +--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000 ++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000 +@@ -91,8 +91,8 @@ + #elif defined(HAVE_IODBC) /* iODBC library */ + + #define ODBC_TYPE "iODBC" +-#include +-#include ++#include ++#include + #define HAVE_SQL_EXTENDED_FETCH 1 + #define SQL_FD_FETCH_ABSOLUTE 0x00000010L + #define SQL_CURSOR_DYNAMIC 2UL diff --git a/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf deleted file mode 100644 index c6f14262e3f0..000000000000 --- a/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf +++ /dev/null @@ -1,20 +0,0 @@ -# vim: ft=apache sw=4 ts=4 - - - # Load the module first - - LoadModule php5_module modules/libphp5.so - - - # Set it to handle the files - - AddType application/x-httpd-php .php - AddType application/x-httpd-php .phtml - AddType application/x-httpd-php .php3 - AddType application/x-httpd-php .php4 - AddType application/x-httpd-php .php5 - AddType application/x-httpd-php-source .phps - - - AddDirectoryIndex index.php index.phtml - diff --git a/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf deleted file mode 100644 index 40dfa869e4ff..000000000000 --- a/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf +++ /dev/null @@ -1,20 +0,0 @@ -# vim: ft=apache sw=4 ts=4 - - - # Load the module first - - LoadModule php5_module modules/libphp5.so - - - # Set it to handle the files - - AddType application/x-httpd-php .php - AddType application/x-httpd-php .phtml - AddType application/x-httpd-php .php3 - AddType application/x-httpd-php .php4 - AddType application/x-httpd-php .php5 - AddType application/x-httpd-php-source .phps - - - AddDirectoryIndex index.php index.phtml - diff --git a/dev-lang/php/files/5.1.0/php5-imap-symlink.diff b/dev-lang/php/files/5.1.0/php5-imap-symlink.diff deleted file mode 100644 index 13c2bddcbb40..000000000000 --- a/dev-lang/php/files/5.1.0/php5-imap-symlink.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- ext/imap/config.m4 2005-09-04 00:56:31.000000000 +0200 -+++ ext/imap/config.m4 2005-09-04 00:57:03.000000000 +0200 -@@ -146,12 +146,6 @@ - AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) - fi - -- if test -r "$IMAP_DIR/c-client/c-client.a"; then -- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 -- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then -- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 -- fi -- - for lib in c-client4 c-client imap; do - IMAP_LIB=$lib - IMAP_LIB_CHK($PHP_LIBDIR) diff --git a/dev-lang/php/files/5.1.0/php5-iodbc-config.diff b/dev-lang/php/files/5.1.0/php5-iodbc-config.diff deleted file mode 100644 index b6d1b68dc691..000000000000 --- a/dev-lang/php/files/5.1.0/php5-iodbc-config.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ext/odbc/config.m4 2005-08-10 02:08:48.000000000 +0200 -+++ ext/odbc/config.m4 2005-08-10 02:09:14.000000000 +0200 -@@ -440,9 +440,9 @@ - fi - if test "$withval" != "no"; then - PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) -- PHP_ADD_INCLUDE($withval/include, 1) -+ PHP_ADD_INCLUDE($withval/include/iodbc, 1) - ODBC_TYPE=iodbc -- ODBC_INCLUDE=-I$withval/include -+ ODBC_INCLUDE=-I$withval/include/iodbc - ODBC_LFLAGS=-L$withval/$PHP_LIBDIR - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) diff --git a/dev-lang/php/files/5.1.0/php5-prefork.patch b/dev-lang/php/files/5.1.0/php5-prefork.patch deleted file mode 100644 index 135579c33d82..000000000000 --- a/dev-lang/php/files/5.1.0/php5-prefork.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4 ---- php-5.0.4-orig/sapi/apache2filter/config.m4 2005-03-13 20:30:44.767051120 +0000 -+++ php-5.0.4/sapi/apache2filter/config.m4 2005-03-13 20:32:01.999310032 +0000 -@@ -115,9 +115,6 @@ - ;; - esac - -- if test "$APXS_MPM" != "prefork"; then -- PHP_BUILD_THREAD_SAFE -- fi - AC_MSG_RESULT(yes) - - PHP_SUBST(APXS) -diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4 ---- php-5.0.4-orig/sapi/apache2handler/config.m4 2005-03-13 20:30:44.771050512 +0000 -+++ php-5.0.4/sapi/apache2handler/config.m4 2005-03-13 20:31:50.106118072 +0000 -@@ -114,9 +114,6 @@ - ;; - esac - -- if test "$APXS_MPM" != "prefork"; then -- PHP_BUILD_THREAD_SAFE -- fi - AC_MSG_RESULT(yes) - - PHP_SUBST(APXS) diff --git a/dev-lang/php/files/5.1.0/php5-with-iodbc.diff b/dev-lang/php/files/5.1.0/php5-with-iodbc.diff deleted file mode 100644 index 81afcc0f2de1..000000000000 --- a/dev-lang/php/files/5.1.0/php5-with-iodbc.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000 -+++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000 -@@ -91,8 +91,8 @@ - #elif defined(HAVE_IODBC) /* iODBC library */ - - #define ODBC_TYPE "iODBC" --#include --#include -+#include -+#include - #define HAVE_SQL_EXTENDED_FETCH 1 - #define SQL_FD_FETCH_ABSOLUTE 0x00000010L - #define SQL_CURSOR_DYNAMIC 2UL diff --git a/dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff b/dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff deleted file mode 100644 index 626ac67f9081..000000000000 --- a/dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c ---- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300 -+++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300 -@@ -1341,16 +1341,21 @@ - soap_obj = NULL; - #if HAVE_PHP_SESSION - /* If persistent then set soap_obj from from the previous created session (if available) */ -+ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!! - if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { - zval **tmp_soap; - -+ bzero(soapname,32+sizeof("_bogus_session_name")); -+ strncpy(soapname,service->soap_class.ce->name,32); -+ strcat(soapname,"_bogus_session_name"); -+ - if (PS(session_status) != php_session_active && - PS(session_status) != php_session_disabled) { - php_session_start(TSRMLS_C); - } - - /* Find the soap object and assign */ -- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS && -+ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS && - Z_TYPE_PP(tmp_soap) == IS_OBJECT && - Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) { - soap_obj = *tmp_soap; -@@ -1432,7 +1437,7 @@ - /* If session then update session hash with new object */ - if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { - zval **tmp_soap_pp; -- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { -+ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { - soap_obj = *tmp_soap_pp; - } - } else { diff --git a/dev-lang/php/files/digest-php-4.3.11-r1 b/dev-lang/php/files/digest-php-4.3.11-r1 deleted file mode 100644 index 8eda7cdd6588..000000000000 --- a/dev-lang/php/files/digest-php-4.3.11-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 -MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574 -MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-4.3.11-r2 b/dev-lang/php/files/digest-php-4.3.11-r2 new file mode 100644 index 000000000000..65531066fd6b --- /dev/null +++ b/dev-lang/php/files/digest-php-4.3.11-r2 @@ -0,0 +1,3 @@ +MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574 +MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-4.4.0-r1 b/dev-lang/php/files/digest-php-4.4.0-r1 deleted file mode 100644 index dd3eed8b1d00..000000000000 --- a/dev-lang/php/files/digest-php-4.4.0-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 -MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840 -MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-4.4.0-r2 b/dev-lang/php/files/digest-php-4.4.0-r2 new file mode 100644 index 000000000000..5cf0a8b3bd28 --- /dev/null +++ b/dev-lang/php/files/digest-php-4.4.0-r2 @@ -0,0 +1,3 @@ +MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-5.0.4-r1 b/dev-lang/php/files/digest-php-5.0.4-r1 deleted file mode 100644 index a2bcd3e685a9..000000000000 --- a/dev-lang/php/files/digest-php-5.0.4-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383 -MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342 -MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-5.0.4-r2 b/dev-lang/php/files/digest-php-5.0.4-r2 new file mode 100644 index 000000000000..6b6d1ce71bb5 --- /dev/null +++ b/dev-lang/php/files/digest-php-5.0.4-r2 @@ -0,0 +1,3 @@ +MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342 +MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-lang/php/files/digest-php-5.0.5-r1 b/dev-lang/php/files/digest-php-5.0.5-r1 deleted file mode 100644 index c7aa92f99282..000000000000 --- a/dev-lang/php/files/digest-php-5.0.5-r1 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556 -MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173 diff --git a/dev-lang/php/files/digest-php-5.0.5-r2 b/dev-lang/php/files/digest-php-5.0.5-r2 new file mode 100644 index 000000000000..9a62d89ecd07 --- /dev/null +++ b/dev-lang/php/files/digest-php-5.0.5-r2 @@ -0,0 +1,2 @@ +MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173 +MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556 diff --git a/dev-lang/php/php-4.3.11-r1.ebuild b/dev-lang/php/php-4.3.11-r1.ebuild deleted file mode 100644 index 4025a8d29819..000000000000 --- a/dev-lang/php/php-4.3.11-r1.ebuild +++ /dev/null @@ -1,303 +0,0 @@ -# Copyright 1999-2005 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-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $ - -IUSE="cgi cli discard-path force-cgi-redirect" -KEYWORDS="~sparc ~x86" - -# NOTE: Portage doesn't support setting PROVIDE based on the USE flags -# that have been enabled, so we have to PROVIDE everything for now -# and hope for the best -# -# This will be sorted out when GLEP 37 is implemented - -PROVIDE="virtual/php virtual/httpd-php" - -# php package settings -SLOT="4" -MY_PHP_P="php-${PV}" -PHP_PACKAGE=1 - -inherit eutils php4_4-sapi apache-module - -want_apache - -DESCRIPTION="The PHP language runtime engine" - -DEPEND="${DEPEND} app-admin/eselect-php" -RDEPEND="${RDEPEND} app-admin/eselect-php" - -# fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" - -pkg_setup() { - # make sure the user has specified a SAPI - einfo "Determining SAPI(s) to build" - confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ] ; then - if ! useq threads ; then - APACHE2_SAFE_MPMS="peruser prefork" - else - APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" - fi - - ewarn - ewarn "If this package fails with a fatal error about Apache2 not having" - ewarn "been compiled with a compatible MPM, this is normally because you" - ewarn "need to toggle the 'threads' USE flag." - ewarn - ewarn "If 'threads' is off, try switching it on." - ewarn "If 'threads' is on, try switching it off." - ewarn - - apache-module_pkg_setup - fi - fi - - if useq fastbuild ; then - ewarn - ewarn "'fastbuild' attempts to build all SAPIs in a single pass." - ewarn "This is an experimental feature, which may fail to compile" - ewarn "and may produce PHP binaries which are broken." - ewarn - ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing" - ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net." - ewarn - fi - - php4_4-sapi_pkg_setup -} - -src_unpack() { - # custom src_unpack, used only for PHP ebuilds that need additional patches - # normally the eclass src_unpack is used - if [ "${PHP_PACKAGE}" == 1 ] ; then - unpack ${A} - fi - - cd ${S} - - # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/4.4.0/php4.3.11-pcre-security.patch - - # sobstitute the bundled PCRE library with a fixed version for bug #102373 - einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" - - # we call the eclass src_unpack, but don't want ${A} to be unpacked again - PHP_PACKAGE=0 - php4_4-sapi_src_unpack - PHP_PACKAGE=1 -} - -php_determine_sapis() { - - # holds the list of sapis that we want to build - PHPSAPIS= - - if useq cli ; then - PHPSAPIS="${PHPSAPIS} cli" - fi - - if useq cgi ; then - PHPSAPIS="${PHPSAPIS} cgi" - fi - - # note - we can only build one apache sapi for now - # note - apache SAPI comes after the simpler cli/cgi sapis - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ]; then - PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" - fi - fi -} - -src_compile() { - if useq fastbuild ; then - src_compile_fastbuild - else - src_compile_normal - fi -} - -src_compile_fastbuild() { - php_determine_sapis - - build_cli=0 - build_cgi=0 - build_apache=0 - - for x in ${PHPSAPIS} ; do - case ${x} in - cli) - build_cli=1 - ;; - cgi) - build_cgi=1 - ;; - apache*) - build_apache=1 - ;; - esac - done - - if [[ ${build_cli} = 1 ]] ; then - my_conf="${my_conf} --enable-cli" - else - my_conf="${my_conf} --disable-cli" - fi - - if [[ ${build_cgi} = 1 ]] ; then - my_conf="${my_conf} --enable-cgi --enable-fastcgi" - enable_extension_enable "discard-path" "discard-path" 0 - enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 - else - my_conf="${my_conf} --disable-cgi" - fi - - if [[ ${build_apache} = 1 ]] ; then - my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" - fi - - # now we know what we are building, build it - php4_4-sapi_src_compile - - # to keep the separate php.ini files for each SAPI, we change the - # build-defs.h and recompile - - if [[ ${build_cli} = 1 ]] ; then - einfo - einfo "Building CLI SAPI" - einfo - - sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h - sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h - for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do - [[ -f ${x} ]] && rm -f ${x} - done - make sapi/cli/php || die "Unable to make CLI SAPI" - cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" - fi - if [[ ${build_cgi} = 1 ]] ; then - einfo - einfo "Building CGI SAPI" - einfo - - sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h - sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h - for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do - [[ -f ${x} ]] && rm -f ${x} - done - make sapi/cgi/php || die "Unable to make CGI SAPI" - cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI" - fi - if [[ ${build_apache} = 1 ]] ; then - einfo - einfo "Building apache${USE_APACHE2} SAPI" - einfo - - sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h - sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h - for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do - [[ -f ${x} ]] && rm -f ${x} - done - make || die "Unable to build mod_php" - fi -} - -src_compile_normal() { - php_determine_sapis - - CLEAN_REQUIRED=0 - - for x in ${PHPSAPIS} ; do - if [ "${CLEAN_REQUIRED}" = 1 ]; then - make clean - # echo > /dev/null - fi - - PHPSAPI=${x} - case ${x} in - cli) - my_conf="--enable-cli --disable-cgi" - php4_4-sapi_src_compile - cp sapi/cli/php php-cli - ;; - cgi) - my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" - enable_extension_enable "discard-path" "discard-path" 0 - enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 - php4_4-sapi_src_compile - cp sapi/cgi/php php-cgi - ;; - apache*) - my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" - php4_4-sapi_src_compile - ;; - esac - - CLEAN_REQUIRED=1 - done -} - -src_install() { - php_determine_sapis - - destdir=/usr/$(get_libdir)/php4 - - # let the eclass do the heavy lifting - php4_4-sapi_src_install - - einfo - einfo "Installing SAPI(s) ${PHPSAPIS}" - einfo - - for x in ${PHPSAPIS} ; do - PHPSAPI=${x} - case ${x} in - cli) - einfo "Installing CLI SAPI" - into ${destdir} - newbin php-cli php || die "Unable to install ${x} sapi" - php4_4-sapi_install_ini - ;; - cgi) - einfo "Installing CGI SAPI" - into ${destdir} - dobin php-cgi || die "Unable to install ${x} sapi" - php4_4-sapi_install_ini - ;; - apache*) - einfo "Installing apache${USE_APACHE2} SAPI" - make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI" - if [ -n "${USE_APACHE2}" ] ; then - einfo "Installing Apache2 config for PHP (70_mod_php.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf" - else - einfo "Installing Apache config for PHP (70_mod_php.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf" - fi - php4_4-sapi_install_ini - ;; - esac - done - -} - -pkg_postinst() -{ - # Output some general info to the user - if useq apache || useq apache2 ; then - APACHE1_MOD_DEFINE="PHP4" - APACHE1_MOD_CONF="70_mod_php.conf" - APACHE2_MOD_DEFINE="PHP4" - APACHE2_MOD_CONF="70_mod_php.conf" - apache-module_pkg_postinst - fi - php4_4-sapi_pkg_postinst -} diff --git a/dev-lang/php/php-4.3.11-r2.ebuild b/dev-lang/php/php-4.3.11-r2.ebuild new file mode 100644 index 000000000000..be50106dbad6 --- /dev/null +++ b/dev-lang/php/php-4.3.11-r2.ebuild @@ -0,0 +1,321 @@ +# Copyright 1999-2005 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-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $ + +IUSE="cgi cli discard-path force-cgi-redirect" +KEYWORDS="~sparc ~x86" + +# NOTE: Portage doesn't support setting PROVIDE based on the USE flags +# that have been enabled, so we have to PROVIDE everything for now +# and hope for the best +# +# This will be sorted out when GLEP 37 is implemented + +PROVIDE="virtual/php virtual/httpd-php" + +# php package settings +SLOT="4" +MY_PHP_P="php-${PV}" +PHP_PACKAGE=1 + +inherit eutils php4_4-sapi apache-module + +want_apache + +DESCRIPTION="The PHP language runtime engine" + +DEPEND="${DEPEND} app-admin/eselect-php" +RDEPEND="${RDEPEND} app-admin/eselect-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +pkg_setup() { + # make sure the user has specified a SAPI + einfo "Determining SAPI(s) to build" + confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ] ; then + if ! useq threads ; then + APACHE2_SAFE_MPMS="peruser prefork" + else + APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" + fi + + ewarn + ewarn "If this package fails with a fatal error about Apache2 not having" + ewarn "been compiled with a compatible MPM, this is normally because you" + ewarn "need to toggle the 'threads' USE flag." + ewarn + ewarn "If 'threads' is off, try switching it on." + ewarn "If 'threads' is on, try switching it off." + ewarn + + apache-module_pkg_setup + fi + fi + + if useq fastbuild ; then + ewarn + ewarn "'fastbuild' attempts to build all SAPIs in a single pass." + ewarn "This is an experimental feature, which may fail to compile" + ewarn "and may produce PHP binaries which are broken." + ewarn + ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing" + ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net." + ewarn + fi + + php4_4-sapi_pkg_setup +} + +src_unpack() { + # custom src_unpack, used only for PHP ebuilds that need additional patches + # normally the eclass src_unpack is used + if [ "${PHP_PACKAGE}" == 1 ] ; then + unpack ${A} + fi + + cd "${S}" + + # fix PHP branding + sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/4.3.11/php4.3.11-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/4.3.11/php4.3.11-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/4.3.11/php4.3.11-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/4.3.11/php4.3.11-session_save_path-segf.patch" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/4.3.11/php4.3.11-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" + + # we call the eclass src_unpack, but don't want ${A} to be unpacked again + PHP_PACKAGE=0 + php4_4-sapi_src_unpack + PHP_PACKAGE=1 +} + +php_determine_sapis() { + + # holds the list of sapis that we want to build + PHPSAPIS= + + if useq cli ; then + PHPSAPIS="${PHPSAPIS} cli" + fi + + if useq cgi ; then + PHPSAPIS="${PHPSAPIS} cgi" + fi + + # note - we can only build one apache sapi for now + # note - apache SAPI comes after the simpler cli/cgi sapis + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ]; then + PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" + fi + fi +} + +src_compile() { + if useq fastbuild ; then + src_compile_fastbuild + else + src_compile_normal + fi +} + +src_compile_fastbuild() { + php_determine_sapis + + build_cli=0 + build_cgi=0 + build_apache=0 + + for x in ${PHPSAPIS} ; do + case ${x} in + cli) + build_cli=1 + ;; + cgi) + build_cgi=1 + ;; + apache*) + build_apache=1 + ;; + esac + done + + if [[ ${build_cli} = 1 ]] ; then + my_conf="${my_conf} --enable-cli" + else + my_conf="${my_conf} --disable-cli" + fi + + if [[ ${build_cgi} = 1 ]] ; then + my_conf="${my_conf} --enable-cgi --enable-fastcgi" + enable_extension_enable "discard-path" "discard-path" 0 + enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 + else + my_conf="${my_conf} --disable-cgi" + fi + + if [[ ${build_apache} = 1 ]] ; then + my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + fi + + # now we know what we are building, build it + php4_4-sapi_src_compile + + # to keep the separate php.ini files for each SAPI, we change the + # build-defs.h and recompile + + if [[ ${build_cli} = 1 ]] ; then + einfo + einfo "Building CLI SAPI" + einfo + + sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h + sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h + for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do + [[ -f ${x} ]] && rm -f ${x} + done + make sapi/cli/php || die "Unable to make CLI SAPI" + cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" + fi + if [[ ${build_cgi} = 1 ]] ; then + einfo + einfo "Building CGI SAPI" + einfo + + sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h + sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h + for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do + [[ -f ${x} ]] && rm -f ${x} + done + make sapi/cgi/php || die "Unable to make CGI SAPI" + cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI" + fi + if [[ ${build_apache} = 1 ]] ; then + einfo + einfo "Building apache${USE_APACHE2} SAPI" + einfo + + sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h + sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h + for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do + [[ -f ${x} ]] && rm -f ${x} + done + make || die "Unable to build mod_php" + fi +} + +src_compile_normal() { + php_determine_sapis + + CLEAN_REQUIRED=0 + + for x in ${PHPSAPIS} ; do + if [ "${CLEAN_REQUIRED}" = 1 ]; then + make clean + # echo > /dev/null + fi + + PHPSAPI=${x} + case ${x} in + cli) + my_conf="--enable-cli --disable-cgi" + php4_4-sapi_src_compile + cp sapi/cli/php php-cli + ;; + cgi) + my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" + enable_extension_enable "discard-path" "discard-path" 0 + enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 + php4_4-sapi_src_compile + cp sapi/cgi/php php-cgi + ;; + apache*) + my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + php4_4-sapi_src_compile + ;; + esac + + CLEAN_REQUIRED=1 + done +} + +src_install() { + php_determine_sapis + + destdir=/usr/$(get_libdir)/php4 + + # let the eclass do the heavy lifting + php4_4-sapi_src_install + + einfo + einfo "Installing SAPI(s) ${PHPSAPIS}" + einfo + + for x in ${PHPSAPIS} ; do + PHPSAPI=${x} + case ${x} in + cli) + einfo "Installing CLI SAPI" + into ${destdir} + newbin php-cli php || die "Unable to install ${x} sapi" + php4_4-sapi_install_ini + ;; + cgi) + einfo "Installing CGI SAPI" + into ${destdir} + dobin php-cgi || die "Unable to install ${x} sapi" + php4_4-sapi_install_ini + ;; + apache*) + einfo "Installing apache${USE_APACHE2} SAPI" + make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing Apache2 config for PHP (70_mod_php.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf" + else + einfo "Installing Apache config for PHP (70_mod_php.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf" + fi + php4_4-sapi_install_ini + ;; + esac + done + +} + +pkg_postinst() +{ + # Output some general info to the user + if useq apache || useq apache2 ; then + APACHE1_MOD_DEFINE="PHP4" + APACHE1_MOD_CONF="70_mod_php" + APACHE2_MOD_DEFINE="PHP4" + APACHE2_MOD_CONF="70_mod_php" + apache-module_pkg_postinst + fi + php4_4-sapi_pkg_postinst +} diff --git a/dev-lang/php/php-4.4.0-r1.ebuild b/dev-lang/php/php-4.4.0-r1.ebuild deleted file mode 100644 index 54ef4805588d..000000000000 --- a/dev-lang/php/php-4.4.0-r1.ebuild +++ /dev/null @@ -1,303 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.0-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $ - -IUSE="cgi cli discard-path force-cgi-redirect" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" - -# NOTE: Portage doesn't support setting PROVIDE based on the USE flags -# that have been enabled, so we have to PROVIDE everything for now -# and hope for the best -# -# This will be sorted out when GLEP 37 is implemented - -PROVIDE="virtual/php virtual/httpd-php" - -# php package settings -SLOT="4" -MY_PHP_P="php-${PV}" -PHP_PACKAGE=1 - -inherit eutils php4_4-sapi apache-module - -want_apache - -DESCRIPTION="The PHP language runtime engine" - -DEPEND="${DEPEND} app-admin/eselect-php" -RDEPEND="${RDEPEND} app-admin/eselect-php" - -# fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" - -pkg_setup() { - # make sure the user has specified a SAPI - einfo "Determining SAPI(s) to build" - confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ] ; then - if ! useq threads ; then - APACHE2_SAFE_MPMS="peruser prefork" - else - APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" - fi - - ewarn - ewarn "If this package fails with a fatal error about Apache2 not having" - ewarn "been compiled with a compatible MPM, this is normally because you" - ewarn "need to toggle the 'threads' USE flag." - ewarn - ewarn "If 'threads' is off, try switching it on." - ewarn "If 'threads' is on, try switching it off." - ewarn - - apache-module_pkg_setup - fi - fi - - if useq fastbuild ; then - ewarn - ewarn "'fastbuild' attempts to build all SAPIs in a single pass." - ewarn "This is an experimental feature, which may fail to compile" - ewarn "and may produce PHP binaries which are broken." - ewarn - ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing" - ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net." - ewarn - fi - - php4_4-sapi_pkg_setup -} - -src_unpack() { - # custom src_unpack, used only for PHP ebuilds that need additional patches - # normally the eclass src_unpack is used - if [ "${PHP_PACKAGE}" == 1 ] ; then - unpack ${A} - fi - - cd ${S} - - # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch - - # sobstitute the bundled PCRE library with a fixed version for bug #102373 - einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" - - # we call the eclass src_unpack, but don't want ${A} to be unpacked again - PHP_PACKAGE=0 - php4_4-sapi_src_unpack - PHP_PACKAGE=1 -} - -php_determine_sapis() { - - # holds the list of sapis that we want to build - PHPSAPIS= - - if useq cli ; then - PHPSAPIS="${PHPSAPIS} cli" - fi - - if useq cgi ; then - PHPSAPIS="${PHPSAPIS} cgi" - fi - - # note - we can only build one apache sapi for now - # note - apache SAPI comes after the simpler cli/cgi sapis - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ]; then - PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" - fi - fi -} - -src_compile() { - if useq fastbuild ; then - src_compile_fastbuild - else - src_compile_normal - fi -} - -src_compile_fastbuild() { - php_determine_sapis - - build_cli=0 - build_cgi=0 - build_apache=0 - - for x in ${PHPSAPIS} ; do - case ${x} in - cli) - build_cli=1 - ;; - cgi) - build_cgi=1 - ;; - apache*) - build_apache=1 - ;; - esac - done - - if [[ ${build_cli} = 1 ]] ; then - my_conf="${my_conf} --enable-cli" - else - my_conf="${my_conf} --disable-cli" - fi - - if [[ ${build_cgi} = 1 ]] ; then - my_conf="${my_conf} --enable-cgi --enable-fastcgi" - enable_extension_enable "discard-path" "discard-path" 0 - enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 - else - my_conf="${my_conf} --disable-cgi" - fi - - if [[ ${build_apache} = 1 ]] ; then - my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" - fi - - # now we know what we are building, build it - php4_4-sapi_src_compile - - # to keep the separate php.ini files for each SAPI, we change the - # build-defs.h and recompile - - if [[ ${build_cli} = 1 ]] ; then - einfo - einfo "Building CLI SAPI" - einfo - - sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h - sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h - for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do - [[ -f ${x} ]] && rm -f ${x} - done - make sapi/cli/php || die "Unable to make CLI SAPI" - cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" - fi - if [[ ${build_cgi} = 1 ]] ; then - einfo - einfo "Building CGI SAPI" - einfo - - sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h - sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h - for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do - [[ -f ${x} ]] && rm -f ${x} - done - make sapi/cgi/php || die "Unable to make CGI SAPI" - cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI" - fi - if [[ ${build_apache} = 1 ]] ; then - einfo - einfo "Building apache${USE_APACHE2} SAPI" - einfo - - sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h - sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h - for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do - [[ -f ${x} ]] && rm -f ${x} - done - make || die "Unable to build mod_php" - fi -} - -src_compile_normal() { - php_determine_sapis - - CLEAN_REQUIRED=0 - - for x in ${PHPSAPIS} ; do - if [ "${CLEAN_REQUIRED}" = 1 ]; then - make clean - # echo > /dev/null - fi - - PHPSAPI=${x} - case ${x} in - cli) - my_conf="--enable-cli --disable-cgi" - php4_4-sapi_src_compile - cp sapi/cli/php php-cli - ;; - cgi) - my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" - enable_extension_enable "discard-path" "discard-path" 0 - enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 - php4_4-sapi_src_compile - cp sapi/cgi/php php-cgi - ;; - apache*) - my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" - php4_4-sapi_src_compile - ;; - esac - - CLEAN_REQUIRED=1 - done -} - -src_install() { - php_determine_sapis - - destdir=/usr/$(get_libdir)/php4 - - # let the eclass do the heavy lifting - php4_4-sapi_src_install - - einfo - einfo "Installing SAPI(s) ${PHPSAPIS}" - einfo - - for x in ${PHPSAPIS} ; do - PHPSAPI=${x} - case ${x} in - cli) - einfo "Installing CLI SAPI" - into ${destdir} - newbin php-cli php || die "Unable to install ${x} sapi" - php4_4-sapi_install_ini - ;; - cgi) - einfo "Installing CGI SAPI" - into ${destdir} - dobin php-cgi || die "Unable to install ${x} sapi" - php4_4-sapi_install_ini - ;; - apache*) - einfo "Installing apache${USE_APACHE2} SAPI" - make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI" - if [ -n "${USE_APACHE2}" ] ; then - einfo "Installing Apache2 config for PHP (70_mod_php.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf" - else - einfo "Installing Apache config for PHP (70_mod_php.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf" - fi - php4_4-sapi_install_ini - ;; - esac - done - -} - -pkg_postinst() -{ - # Output some general info to the user - if useq apache || useq apache2 ; then - APACHE1_MOD_DEFINE="PHP4" - APACHE1_MOD_CONF="70_mod_php.conf" - APACHE2_MOD_DEFINE="PHP4" - APACHE2_MOD_CONF="70_mod_php.conf" - apache-module_pkg_postinst - fi - php4_4-sapi_pkg_postinst -} diff --git a/dev-lang/php/php-4.4.0-r2.ebuild b/dev-lang/php/php-4.4.0-r2.ebuild new file mode 100644 index 000000000000..a0c185f1b042 --- /dev/null +++ b/dev-lang/php/php-4.4.0-r2.ebuild @@ -0,0 +1,321 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.0-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $ + +IUSE="cgi cli discard-path force-cgi-redirect" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +# NOTE: Portage doesn't support setting PROVIDE based on the USE flags +# that have been enabled, so we have to PROVIDE everything for now +# and hope for the best +# +# This will be sorted out when GLEP 37 is implemented + +PROVIDE="virtual/php virtual/httpd-php" + +# php package settings +SLOT="4" +MY_PHP_P="php-${PV}" +PHP_PACKAGE=1 + +inherit eutils php4_4-sapi apache-module + +want_apache + +DESCRIPTION="The PHP language runtime engine" + +DEPEND="${DEPEND} app-admin/eselect-php" +RDEPEND="${RDEPEND} app-admin/eselect-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +pkg_setup() { + # make sure the user has specified a SAPI + einfo "Determining SAPI(s) to build" + confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ] ; then + if ! useq threads ; then + APACHE2_SAFE_MPMS="peruser prefork" + else + APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" + fi + + ewarn + ewarn "If this package fails with a fatal error about Apache2 not having" + ewarn "been compiled with a compatible MPM, this is normally because you" + ewarn "need to toggle the 'threads' USE flag." + ewarn + ewarn "If 'threads' is off, try switching it on." + ewarn "If 'threads' is on, try switching it off." + ewarn + + apache-module_pkg_setup + fi + fi + + if useq fastbuild ; then + ewarn + ewarn "'fastbuild' attempts to build all SAPIs in a single pass." + ewarn "This is an experimental feature, which may fail to compile" + ewarn "and may produce PHP binaries which are broken." + ewarn + ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing" + ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net." + ewarn + fi + + php4_4-sapi_pkg_setup +} + +src_unpack() { + # custom src_unpack, used only for PHP ebuilds that need additional patches + # normally the eclass src_unpack is used + if [ "${PHP_PACKAGE}" == 1 ] ; then + unpack ${A} + fi + + cd "${S}" + + # fix PHP branding + sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/4.4.0/php4.4.0-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/4.4.0/php4.4.0-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/4.4.0/php4.4.0-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/4.4.0/php4.4.0-session_save_path-segf.patch" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" + + # we call the eclass src_unpack, but don't want ${A} to be unpacked again + PHP_PACKAGE=0 + php4_4-sapi_src_unpack + PHP_PACKAGE=1 +} + +php_determine_sapis() { + + # holds the list of sapis that we want to build + PHPSAPIS= + + if useq cli ; then + PHPSAPIS="${PHPSAPIS} cli" + fi + + if useq cgi ; then + PHPSAPIS="${PHPSAPIS} cgi" + fi + + # note - we can only build one apache sapi for now + # note - apache SAPI comes after the simpler cli/cgi sapis + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ]; then + PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" + fi + fi +} + +src_compile() { + if useq fastbuild ; then + src_compile_fastbuild + else + src_compile_normal + fi +} + +src_compile_fastbuild() { + php_determine_sapis + + build_cli=0 + build_cgi=0 + build_apache=0 + + for x in ${PHPSAPIS} ; do + case ${x} in + cli) + build_cli=1 + ;; + cgi) + build_cgi=1 + ;; + apache*) + build_apache=1 + ;; + esac + done + + if [[ ${build_cli} = 1 ]] ; then + my_conf="${my_conf} --enable-cli" + else + my_conf="${my_conf} --disable-cli" + fi + + if [[ ${build_cgi} = 1 ]] ; then + my_conf="${my_conf} --enable-cgi --enable-fastcgi" + enable_extension_enable "discard-path" "discard-path" 0 + enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 + else + my_conf="${my_conf} --disable-cgi" + fi + + if [[ ${build_apache} = 1 ]] ; then + my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + fi + + # now we know what we are building, build it + php4_4-sapi_src_compile + + # to keep the separate php.ini files for each SAPI, we change the + # build-defs.h and recompile + + if [[ ${build_cli} = 1 ]] ; then + einfo + einfo "Building CLI SAPI" + einfo + + sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h + sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h + for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do + [[ -f ${x} ]] && rm -f ${x} + done + make sapi/cli/php || die "Unable to make CLI SAPI" + cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" + fi + if [[ ${build_cgi} = 1 ]] ; then + einfo + einfo "Building CGI SAPI" + einfo + + sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h + sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h + for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do + [[ -f ${x} ]] && rm -f ${x} + done + make sapi/cgi/php || die "Unable to make CGI SAPI" + cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI" + fi + if [[ ${build_apache} = 1 ]] ; then + einfo + einfo "Building apache${USE_APACHE2} SAPI" + einfo + + sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h + sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h + for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do + [[ -f ${x} ]] && rm -f ${x} + done + make || die "Unable to build mod_php" + fi +} + +src_compile_normal() { + php_determine_sapis + + CLEAN_REQUIRED=0 + + for x in ${PHPSAPIS} ; do + if [ "${CLEAN_REQUIRED}" = 1 ]; then + make clean + # echo > /dev/null + fi + + PHPSAPI=${x} + case ${x} in + cli) + my_conf="--enable-cli --disable-cgi" + php4_4-sapi_src_compile + cp sapi/cli/php php-cli + ;; + cgi) + my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" + enable_extension_enable "discard-path" "discard-path" 0 + enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 + php4_4-sapi_src_compile + cp sapi/cgi/php php-cgi + ;; + apache*) + my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + php4_4-sapi_src_compile + ;; + esac + + CLEAN_REQUIRED=1 + done +} + +src_install() { + php_determine_sapis + + destdir=/usr/$(get_libdir)/php4 + + # let the eclass do the heavy lifting + php4_4-sapi_src_install + + einfo + einfo "Installing SAPI(s) ${PHPSAPIS}" + einfo + + for x in ${PHPSAPIS} ; do + PHPSAPI=${x} + case ${x} in + cli) + einfo "Installing CLI SAPI" + into ${destdir} + newbin php-cli php || die "Unable to install ${x} sapi" + php4_4-sapi_install_ini + ;; + cgi) + einfo "Installing CGI SAPI" + into ${destdir} + dobin php-cgi || die "Unable to install ${x} sapi" + php4_4-sapi_install_ini + ;; + apache*) + einfo "Installing apache${USE_APACHE2} SAPI" + make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing Apache2 config for PHP (70_mod_php.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf" + else + einfo "Installing Apache config for PHP (70_mod_php.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf" + fi + php4_4-sapi_install_ini + ;; + esac + done + +} + +pkg_postinst() +{ + # Output some general info to the user + if useq apache || useq apache2 ; then + APACHE1_MOD_DEFINE="PHP4" + APACHE1_MOD_CONF="70_mod_php" + APACHE2_MOD_DEFINE="PHP4" + APACHE2_MOD_CONF="70_mod_php" + apache-module_pkg_postinst + fi + php4_4-sapi_pkg_postinst +} diff --git a/dev-lang/php/php-5.0.4-r1.ebuild b/dev-lang/php/php-5.0.4-r1.ebuild deleted file mode 100644 index 2e89faffd553..000000000000 --- a/dev-lang/php/php-5.0.4-r1.ebuild +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.4-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $ - -IUSE="cgi cli discard-path force-cgi-redirect" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" - -# NOTE: Portage doesn't support setting PROVIDE based on the USE flags -# that have been enabled, so we have to PROVIDE everything for now -# and hope for the best -# -# This will be sorted out when GLEP 37 is implemented - -PROVIDE="virtual/php virtual/httpd-php" - -# php package settings -SLOT="5" -MY_PHP_P="php-${PV}" -PHP_PACKAGE=1 - -inherit eutils php5_0-sapi apache-module - -want_apache - -DESCRIPTION="The PHP language runtime engine" - -DEPEND="${DEPEND} app-admin/eselect-php" -RDEPEND="${RDEPEND} app-admin/eselect-php" - -# fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" - -pkg_setup() { - # make sure the user has specified a SAPI - einfo "Determining SAPI(s) to build" - confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ] ; then - if ! useq threads ; then - APACHE2_SAFE_MPMS="peruser prefork" - else - APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" - fi - - ewarn - ewarn "If this package fails with a fatal error about Apache2 not having" - ewarn "been compiled with a compatible MPM, this is normally because you" - ewarn "need to toggle the 'threads' USE flag." - ewarn - ewarn "If 'threads' is off, try switching it on." - ewarn "If 'threads' is on, try switching it off." - ewarn - - apache-module_pkg_setup - fi - fi - - php5_0-sapi_pkg_setup -} - -src_unpack() { - # custom src_unpack, used only for PHP ebuilds that need additional patches - # normally the eclass src_unpack is used - if [ "${PHP_PACKAGE}" == 1 ] ; then - unpack ${A} - fi - - cd ${S} - - # fix a GCC4 compile bug in XMLRPC extension, bug #96813 - epatch ${FILESDIR}/5.0.0/php5.0.4-xmlrcp-ccode.diff - - # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/5.0.0/php5.0.4-pcre-security.patch - - # sobstitute the bundled PCRE library with a fixed version for bug #102373 - einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" - - # we call the eclass src_unpack, but don't want ${A} to be unpacked again - PHP_PACKAGE=0 - php5_0-sapi_src_unpack - PHP_PACKAGE=1 -} - -php_determine_sapis() { - - # holds the list of sapis that we want to build - PHPSAPIS= - - if useq cli ; then - PHPSAPIS="${PHPSAPIS} cli" - fi - - if useq cgi ; then - PHPSAPIS="${PHPSAPIS} cgi" - fi - - # note - we can only build one apache sapi for now - # note - apache SAPI comes after the simpler cli/cgi sapis - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ]; then - PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" - fi - fi -} - -src_compile() { - php_determine_sapis - - CLEAN_REQUIRED=0 - - for x in ${PHPSAPIS} ; do - if [ "${CLEAN_REQUIRED}" = 1 ]; then - make clean - # echo > /dev/null - fi - - PHPSAPI=${x} - case ${x} in - cli) - my_conf="--enable-cli --disable-cgi" - php5_0-sapi_src_compile - cp sapi/cli/php php-cli - ;; - cgi) - my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" - enable_extension_enable "discard-path" "discard-path" 0 - enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 - php5_0-sapi_src_compile - cp sapi/cgi/php php-cgi - ;; - apache*) - my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" - php5_0-sapi_src_compile - ;; - esac - - CLEAN_REQUIRED=1 - done -} - -src_install() { - php_determine_sapis - - destdir=/usr/$(get_libdir)/php5 - - # let the eclass do the heavy lifting - php5_0-sapi_src_install - - einfo - einfo "Installing SAPI(s) ${PHPSAPIS}" - einfo - - for x in ${PHPSAPIS} ; do - PHPSAPI=${x} - case ${x} in - cli) - einfo "Installing CLI SAPI" - into ${destdir} - newbin php-cli php || die "Unable to install ${x} sapi" - php5_0-sapi_install_ini - ;; - cgi) - einfo "Installing CGI SAPI" - into ${destdir} - dobin php-cgi || die "Unable to install ${x} sapi" - php5_0-sapi_install_ini - ;; - apache*) - einfo "Installing apache${USE_APACHE2} SAPI" - make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI" - if [ -n "${USE_APACHE2}" ] ; then - einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf" - else - einfo "Installing Apache config for PHP5 (70_mod_php5.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf" - fi - php5_0-sapi_install_ini - ;; - esac - done -} - -pkg_postinst() -{ - # Output some general info to the user - if useq apache || useq apache2 ; then - APACHE1_MOD_DEFINE="PHP5" - APACHE1_MOD_CONF="70_mod_php5.conf" - APACHE2_MOD_DEFINE="PHP5" - APACHE2_MOD_CONF="70_mod_php5.conf" - apache-module_pkg_postinst - fi - php5_0-sapi_pkg_postinst -} diff --git a/dev-lang/php/php-5.0.4-r2.ebuild b/dev-lang/php/php-5.0.4-r2.ebuild new file mode 100644 index 000000000000..02f914447afc --- /dev/null +++ b/dev-lang/php/php-5.0.4-r2.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.4-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $ + +IUSE="cgi cli discard-path force-cgi-redirect" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +# NOTE: Portage doesn't support setting PROVIDE based on the USE flags +# that have been enabled, so we have to PROVIDE everything for now +# and hope for the best +# +# This will be sorted out when GLEP 37 is implemented + +PROVIDE="virtual/php virtual/httpd-php" + +# php package settings +SLOT="5" +MY_PHP_P="php-${PV}" +PHP_PACKAGE=1 + +inherit eutils php5_0-sapi apache-module + +want_apache + +DESCRIPTION="The PHP language runtime engine" + +DEPEND="${DEPEND} app-admin/eselect-php" +RDEPEND="${RDEPEND} app-admin/eselect-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +pkg_setup() { + # make sure the user has specified a SAPI + einfo "Determining SAPI(s) to build" + confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ] ; then + if ! useq threads ; then + APACHE2_SAFE_MPMS="peruser prefork" + else + APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" + fi + + ewarn + ewarn "If this package fails with a fatal error about Apache2 not having" + ewarn "been compiled with a compatible MPM, this is normally because you" + ewarn "need to toggle the 'threads' USE flag." + ewarn + ewarn "If 'threads' is off, try switching it on." + ewarn "If 'threads' is on, try switching it off." + ewarn + + apache-module_pkg_setup + fi + fi + + php5_0-sapi_pkg_setup +} + +src_unpack() { + # custom src_unpack, used only for PHP ebuilds that need additional patches + # normally the eclass src_unpack is used + if [ "${PHP_PACKAGE}" == 1 ] ; then + unpack ${A} + fi + + cd "${S}" + + # fix PHP branding + sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in + + # fix a GCC4 compile bug in XMLRPC extension, bug #96813 + use xmlrpc && epatch "${FILESDIR}/5.0.4/php5.0.4-xmlrcp-ccode.diff" + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/5.0.4/php5.0.4-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/5.0.4/php5.0.4-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/5.0.4/php5.0.4-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/5.0.4/php5.0.4-session_save_path-segf.patch" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/5.0.4/php5.0.4-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" + + # we call the eclass src_unpack, but don't want ${A} to be unpacked again + PHP_PACKAGE=0 + php5_0-sapi_src_unpack + PHP_PACKAGE=1 +} + +php_determine_sapis() { + + # holds the list of sapis that we want to build + PHPSAPIS= + + if useq cli ; then + PHPSAPIS="${PHPSAPIS} cli" + fi + + if useq cgi ; then + PHPSAPIS="${PHPSAPIS} cgi" + fi + + # note - we can only build one apache sapi for now + # note - apache SAPI comes after the simpler cli/cgi sapis + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ]; then + PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" + fi + fi +} + +src_compile() { + php_determine_sapis + + CLEAN_REQUIRED=0 + + for x in ${PHPSAPIS} ; do + if [ "${CLEAN_REQUIRED}" = 1 ]; then + make clean + # echo > /dev/null + fi + + PHPSAPI=${x} + case ${x} in + cli) + my_conf="--enable-cli --disable-cgi" + php5_0-sapi_src_compile + cp sapi/cli/php php-cli + ;; + cgi) + my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" + enable_extension_enable "discard-path" "discard-path" 0 + enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 + php5_0-sapi_src_compile + cp sapi/cgi/php php-cgi + ;; + apache*) + my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + php5_0-sapi_src_compile + ;; + esac + + CLEAN_REQUIRED=1 + done +} + +src_install() { + php_determine_sapis + + destdir=/usr/$(get_libdir)/php5 + + # let the eclass do the heavy lifting + php5_0-sapi_src_install + + einfo + einfo "Installing SAPI(s) ${PHPSAPIS}" + einfo + + for x in ${PHPSAPIS} ; do + PHPSAPI=${x} + case ${x} in + cli) + einfo "Installing CLI SAPI" + into ${destdir} + newbin php-cli php || die "Unable to install ${x} sapi" + php5_0-sapi_install_ini + ;; + cgi) + einfo "Installing CGI SAPI" + into ${destdir} + dobin php-cgi || die "Unable to install ${x} sapi" + php5_0-sapi_install_ini + ;; + apache*) + einfo "Installing apache${USE_APACHE2} SAPI" + make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf" + else + einfo "Installing Apache config for PHP5 (70_mod_php5.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf" + fi + php5_0-sapi_install_ini + ;; + esac + done +} + +pkg_postinst() +{ + # Output some general info to the user + if useq apache || useq apache2 ; then + APACHE1_MOD_DEFINE="PHP5" + APACHE1_MOD_CONF="70_mod_php5" + APACHE2_MOD_DEFINE="PHP5" + APACHE2_MOD_CONF="70_mod_php5" + apache-module_pkg_postinst + fi + php5_0-sapi_pkg_postinst +} diff --git a/dev-lang/php/php-5.0.5-r1.ebuild b/dev-lang/php/php-5.0.5-r1.ebuild deleted file mode 100644 index 546d1707a35f..000000000000 --- a/dev-lang/php/php-5.0.5-r1.ebuild +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright 1999-2005 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-r1.ebuild,v 1.2 2005/09/24 19:21:33 weeve Exp $ - -IUSE="cgi cli discard-path force-cgi-redirect" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" - -# NOTE: Portage doesn't support setting PROVIDE based on the USE flags -# that have been enabled, so we have to PROVIDE everything for now -# and hope for the best -# -# This will be sorted out when GLEP 37 is implemented - -PROVIDE="virtual/php virtual/httpd-php" - -# php package settings -SLOT="5" -MY_PHP_P="php-${PV}" -PHP_PACKAGE=1 - -inherit eutils php5_0-sapi apache-module - -want_apache - -DESCRIPTION="The PHP language runtime engine" - -DEPEND="${DEPEND} app-admin/eselect-php" -RDEPEND="${RDEPEND} app-admin/eselect-php" - -pkg_setup() { - # make sure the user has specified a SAPI - einfo "Determining SAPI(s) to build" - confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ] ; then - if ! useq threads ; then - APACHE2_SAFE_MPMS="peruser prefork" - else - APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" - fi - - ewarn - ewarn "If this package fails with a fatal error about Apache2 not having" - ewarn "been compiled with a compatible MPM, this is normally because you" - ewarn "need to toggle the 'threads' USE flag." - ewarn - ewarn "If 'threads' is off, try switching it on." - ewarn "If 'threads' is on, try switching it off." - ewarn - - apache-module_pkg_setup - fi - fi - - php5_0-sapi_pkg_setup -} - -src_unpack() { - # custom src_unpack, used only for PHP ebuilds that need additional patches - # normally the eclass src_unpack is used - if [ "${PHP_PACKAGE}" == 1 ] ; then - unpack ${A} - fi - - cd ${S} - - # fix a object serialization bug, bug #105374 - epatch ${FILESDIR}/5.0.0/php5.0.5-obj-serialize.patch - - # we call the eclass src_unpack, but don't want ${A} to be unpacked again - PHP_PACKAGE=0 - php5_0-sapi_src_unpack - PHP_PACKAGE=1 -} - -php_determine_sapis() { - - # holds the list of sapis that we want to build - PHPSAPIS= - - if useq cli ; then - PHPSAPIS="${PHPSAPIS} cli" - fi - - if useq cgi ; then - PHPSAPIS="${PHPSAPIS} cgi" - fi - - # note - we can only build one apache sapi for now - # note - apache SAPI comes after the simpler cli/cgi sapis - - if useq apache || useq apache2 ; then - if [ "${APACHE_VERSION}" != "0" ]; then - PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" - fi - fi -} - -src_compile() { - php_determine_sapis - - CLEAN_REQUIRED=0 - - for x in ${PHPSAPIS} ; do - if [ "${CLEAN_REQUIRED}" = 1 ]; then - make clean - # echo > /dev/null - fi - - PHPSAPI=${x} - case ${x} in - cli) - my_conf="--enable-cli --disable-cgi" - php5_0-sapi_src_compile - cp sapi/cli/php php-cli - ;; - cgi) - my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" - enable_extension_enable "discard-path" "discard-path" 0 - enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 - php5_0-sapi_src_compile - cp sapi/cgi/php php-cgi - ;; - apache*) - my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" - php5_0-sapi_src_compile - ;; - esac - - CLEAN_REQUIRED=1 - done -} - -src_install() { - php_determine_sapis - - destdir=/usr/$(get_libdir)/php5 - - # let the eclass do the heavy lifting - php5_0-sapi_src_install - - einfo - einfo "Installing SAPI(s) ${PHPSAPIS}" - einfo - - for x in ${PHPSAPIS} ; do - PHPSAPI=${x} - case ${x} in - cli) - einfo "Installing CLI SAPI" - into ${destdir} - newbin php-cli php || die "Unable to install ${x} sapi" - php5_0-sapi_install_ini - ;; - cgi) - einfo "Installing CGI SAPI" - into ${destdir} - dobin php-cgi || die "Unable to install ${x} sapi" - php5_0-sapi_install_ini - ;; - apache*) - einfo "Installing apache${USE_APACHE2} SAPI" - make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI" - if [ -n "${USE_APACHE2}" ] ; then - einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf" - else - einfo "Installing Apache config for PHP5 (70_mod_php5.conf)" - insinto ${APACHE_MODULES_CONFDIR} - doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf" - fi - php5_0-sapi_install_ini - ;; - esac - done -} - -pkg_postinst() -{ - # Output some general info to the user - if useq apache || useq apache2 ; then - APACHE1_MOD_DEFINE="PHP5" - APACHE1_MOD_CONF="70_mod_php5.conf" - APACHE2_MOD_DEFINE="PHP5" - APACHE2_MOD_CONF="70_mod_php5.conf" - apache-module_pkg_postinst - fi - php5_0-sapi_pkg_postinst -} diff --git a/dev-lang/php/php-5.0.5-r2.ebuild b/dev-lang/php/php-5.0.5-r2.ebuild new file mode 100644 index 000000000000..177824a91cf8 --- /dev/null +++ b/dev-lang/php/php-5.0.5-r2.ebuild @@ -0,0 +1,209 @@ +# Copyright 1999-2005 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-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $ + +IUSE="cgi cli discard-path force-cgi-redirect" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +# NOTE: Portage doesn't support setting PROVIDE based on the USE flags +# that have been enabled, so we have to PROVIDE everything for now +# and hope for the best +# +# This will be sorted out when GLEP 37 is implemented + +PROVIDE="virtual/php virtual/httpd-php" + +# php package settings +SLOT="5" +MY_PHP_P="php-${PV}" +PHP_PACKAGE=1 + +inherit eutils php5_0-sapi apache-module + +want_apache + +DESCRIPTION="The PHP language runtime engine" + +DEPEND="${DEPEND} app-admin/eselect-php" +RDEPEND="${RDEPEND} app-admin/eselect-php" + +pkg_setup() { + # make sure the user has specified a SAPI + einfo "Determining SAPI(s) to build" + confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2 + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ] ; then + if ! useq threads ; then + APACHE2_SAFE_MPMS="peruser prefork" + else + APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" + fi + + ewarn + ewarn "If this package fails with a fatal error about Apache2 not having" + ewarn "been compiled with a compatible MPM, this is normally because you" + ewarn "need to toggle the 'threads' USE flag." + ewarn + ewarn "If 'threads' is off, try switching it on." + ewarn "If 'threads' is on, try switching it off." + ewarn + + apache-module_pkg_setup + fi + fi + + php5_0-sapi_pkg_setup +} + +src_unpack() { + # custom src_unpack, used only for PHP ebuilds that need additional patches + # normally the eclass src_unpack is used + if [ "${PHP_PACKAGE}" == 1 ] ; then + unpack ${A} + fi + + cd "${S}" + + # fix PHP branding + sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/5.0.5/php5.0.5-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/5.0.5/php5.0.5-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/5.0.5/php5.0.5-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/5.0.5/php5.0.5-session_save_path-segf.patch" + + # fix a object serialization bug, bug #105374 + epatch "${FILESDIR}/5.0.5/php5.0.5-obj-serialize.patch" + + # we call the eclass src_unpack, but don't want ${A} to be unpacked again + PHP_PACKAGE=0 + php5_0-sapi_src_unpack + PHP_PACKAGE=1 +} + +php_determine_sapis() { + + # holds the list of sapis that we want to build + PHPSAPIS= + + if useq cli ; then + PHPSAPIS="${PHPSAPIS} cli" + fi + + if useq cgi ; then + PHPSAPIS="${PHPSAPIS} cgi" + fi + + # note - we can only build one apache sapi for now + # note - apache SAPI comes after the simpler cli/cgi sapis + + if useq apache || useq apache2 ; then + if [ "${APACHE_VERSION}" != "0" ]; then + PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" + fi + fi +} + +src_compile() { + php_determine_sapis + + CLEAN_REQUIRED=0 + + for x in ${PHPSAPIS} ; do + if [ "${CLEAN_REQUIRED}" = 1 ]; then + make clean + # echo > /dev/null + fi + + PHPSAPI=${x} + case ${x} in + cli) + my_conf="--enable-cli --disable-cgi" + php5_0-sapi_src_compile + cp sapi/cli/php php-cli + ;; + cgi) + my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi" + enable_extension_enable "discard-path" "discard-path" 0 + enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 + php5_0-sapi_src_compile + cp sapi/cgi/php php-cgi + ;; + apache*) + my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + php5_0-sapi_src_compile + ;; + esac + + CLEAN_REQUIRED=1 + done +} + +src_install() { + php_determine_sapis + + destdir=/usr/$(get_libdir)/php5 + + # let the eclass do the heavy lifting + php5_0-sapi_src_install + + einfo + einfo "Installing SAPI(s) ${PHPSAPIS}" + einfo + + for x in ${PHPSAPIS} ; do + PHPSAPI=${x} + case ${x} in + cli) + einfo "Installing CLI SAPI" + into ${destdir} + newbin php-cli php || die "Unable to install ${x} sapi" + php5_0-sapi_install_ini + ;; + cgi) + einfo "Installing CGI SAPI" + into ${destdir} + dobin php-cgi || die "Unable to install ${x} sapi" + php5_0-sapi_install_ini + ;; + apache*) + einfo "Installing apache${USE_APACHE2} SAPI" + make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf" + else + einfo "Installing Apache config for PHP5 (70_mod_php5.conf)" + insinto ${APACHE_MODULES_CONFDIR} + doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf" + fi + php5_0-sapi_install_ini + ;; + esac + done +} + +pkg_postinst() +{ + # Output some general info to the user + if useq apache || useq apache2 ; then + APACHE1_MOD_DEFINE="PHP5" + APACHE1_MOD_CONF="70_mod_php5" + APACHE2_MOD_DEFINE="PHP5" + APACHE2_MOD_CONF="70_mod_php5" + apache-module_pkg_postinst + fi + php5_0-sapi_pkg_postinst +} -- cgit v1.2.3-65-gdbad