ChangeLog

# ChangeLog for dev-lang/php
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.298 2008/09/22 03:26:54 jer Exp $

22 Sep 2008; Jeroen Roovers php-5.2.6-r7.ebuild:
Stable for HPPA (bug #231528).

21 Sep 2008; Raúl Porcel php-5.2.6-r7.ebuild:
alpha/ia64/sparc stable wrt #231528

20 Sep 2008; Markus Meier php-5.2.6-r7.ebuild:
x86 stable, bug #231528

16 Sep 2008; Brent Baude php-5.2.6-r7.ebuild:
Marking php-5.2.6-r7 ppc64 and ppc for bug 231528

16 Sep 2008; Christian Hoffmann php-5.2.6-r7.ebuild:
stable on amd64 wrt bug 231528

*php-5.2.6-r7 (06 Sep 2008)

06 Sep 2008; Christian Hoffmann -php-5.2.6.ebuild,
-php-5.2.6-r2.ebuild, +php-5.2.6-r7.ebuild:
importing -r7 (patchset: r8) from php-testing overlay, including the snmp
memory leak fix from bug 231528; no need to upgrade for users with
USE=-snmp

23 Aug 2008; Jeroen Roovers metadata.xml:
Add GLEP 56 USE flag descriptions.

15 Aug 2008; Christian Hoffmann -php-5.2.6.ebuild,
-php-5.2.6-r2.ebuild:
removing old and vulnerable

09 Aug 2008; Christian Hoffmann -php-4.4.8.ebuild:
Removing php-4 (bug 189172); use the php-4 (layman) overlay instead, if
you really insist on keeping it installed

08 Aug 2008; Tobias Scherbaum php-5.2.6-r6.ebuild:
ppc stable, bug #234102

08 Aug 2008; Raúl Porcel php-5.2.6-r6.ebuild:
alpha/ia64/sparc stable wrt #234102

07 Aug 2008; Jeroen Roovers php-5.2.6-r6.ebuild:
Stable for HPPA (bug #234102).

07 Aug 2008; Markus Meier php-5.2.6-r6.ebuild:
x86 stable, bug #234102

07 Aug 2008; Markus Rothe php-5.2.6-r6.ebuild:
Stable on ppc64; bug #234102

07 Aug 2008; Christian Hoffmann php-5.2.6-r6.ebuild:
stable on amd64 wrt security bug 234102

07 Aug 2008; Christian Hoffmann php-5.2.6-r6.ebuild:
patchset bump (without rev bump) which changes the new-memory-corruption
patch to fix a build issue (it used to contain the bison-generated .c
version of zend_language_parser.y, we now rely on configure to invoke
bison, which seems to work better)

*php-5.2.6-r6 (07 Aug 2008)

07 Aug 2008; Christian Hoffmann -php-5.2.6_rc4.ebuild,
-php-5.2.6-r1.ebuild, -php-5.2.6-r5.ebuild, +php-5.2.6-r6.ebuild:
lots of new security/crash fixes, bug 234102 (CVE-2008-2665, CVE-2008-2666
and other issues); dropping old

24 Jul 2008; Christian Hoffmann php-5.2.6-r2.ebuild,
php-5.2.6-r5.ebuild:
changing explicit depend on c-client back to the virtual, now that a
recent enough uw-imap version is in the tree; stable dependencies are
still broken in case of uw-imap, as the needed version is not stable

20 Jul 2008; Christian Hoffmann php-5.2.6-r5.ebuild:
previous commit replaced CXXFLAGS by CFLAGS by accident, thanks to Rafał
Mużyło in bug 230809

20 Jul 2008; Christian Hoffmann php-5.2.6-r5.ebuild:
yet another attempt at fixing _GNU_SOURCE-related build problems
(configure screws up FFLAGS which isn't used at all, so we stop
manipulating it now), bug 230809

19 Jul 2008; Christian Hoffmann php-5.2.6-r5.ebuild:
build-time-specific (no revbump): fixing warnings (which sometimes seem to
be fatal) regarding to missing function prototypes because of _GNU_SOURCE
being defined too late (bug 230809)

*php-5.2.6-r5 (17 Jul 2008)

17 Jul 2008; Christian Hoffmann +php-5.2.6-r5.ebuild:
Fixing USE=suhosin on sparc and maybe other 'exotic' archs (gave SIGBUS,
bug 209501), adding >=freetds-0.82 compatibility patch for ext/mssql and
ext/pdo_dblib (thanks to matthias@dsx.at in bug 223891); other users don't
need to update [imported from php-testing overlay]

11 Jul 2008; Jeroen Roovers php-5.2.6-r2.ebuild:
Stable for HPPA (bug #230575).

10 Jul 2008; Christian Hoffmann php-5.2.6-r2.ebuild:
d'oh, the DEPEND on c-client was supposed to only show up for USE=imap,
thanks to Cardoe for noticing that

10 Jul 2008; Christian Hoffmann php-5.2.6-r2.ebuild:
the ext/imap security patch introduced in php-5.2.6-r2 raises the
dependency on c-client to version 2006k, fixing DEPEND accordingly, bug
231258

08 Jul 2008; Raúl Porcel php-5.2.6-r2.ebuild:
alpha/ia64/sparc stable wrt security #230575

07 Jul 2008; Markus Meier php-5.2.6-r2.ebuild:
x86 stable, bug #230575

07 Jul 2008; Thomas Anderson php-5.2.6-r2.ebuild:
stable amd64, security bug 230575

07 Jul 2008; Brent Baude php-5.2.6-r2.ebuild:
Marking php-5.2.6-r2 ppc64 and ppc for bug 230575

*php-5.2.6-r2 (02 Jul 2008)

02 Jul 2008; Christian Hoffmann +php-5.2.6-r2.ebuild:
revbump to include newer patchset, employing lots of security/crash fixes,
bug 230575

*php-5.2.6-r1 (05 May 2008)

05 May 2008; Christian Hoffmann +php-5.2.6-r1.ebuild:
using official suhosin for version 5.2.6 now, adding patch to fix bug
212679 (ext/ldap build failure with --as-needed, thanks to Peter Volkov)

01 May 2008; Christian Hoffmann
-php-4.4.8_pre20070816.ebuild:
removing php-4.4.8_pre, 4.4.8 still left; yes, it was latest stable for
all arches, but php-4* and everything depending on it are hardmasked
anyway and one shouldn't continue using it either...

01 May 2008; Christian Hoffmann php-5.2.6.ebuild:
only try to fix the open_basedir test cases when suhosin is enabled,
otherwise it breaks for non-suhosin

*php-5.2.6 (01 May 2008)

01 May 2008; Christian Hoffmann
-php-5.2.6_rc1-r1.ebuild, -php-5.2.6_rc3.ebuild, -php-5.2.6_rc3-r1.ebuild,
+php-5.2.6.ebuild:
version bump to 5.2.6, including kolab support (bug 210977, thanks to
wrobel and jakub), fixing bug 215623 in the same go; removing
old/vulnerable

16 Apr 2008; Tobias Scherbaum
php-5.2.6_rc4.ebuild:
ppc stable, bug #215266

16 Apr 2008; Christian Hoffmann php-5.2.6_rc4.ebuild:
workaround autoconf-2.62 behavior change which made build fail w/
USE=posix (bug 217392), no revbump

15 Apr 2008; Jeroen Roovers php-5.2.6_rc4.ebuild:
Stable for HPPA (bug #215266).

15 Apr 2008; Raúl Porcel php-5.2.6_rc4.ebuild:
alpha/ia64/sparc stable wrt security #215266

14 Apr 2008; Markus Meier php-5.2.6_rc4.ebuild:
amd64/x86 stable, security bug #215266

14 Apr 2008; Markus Rothe php-5.2.6_rc4.ebuild:
Stable on ppc64; bug #215266

*php-5.2.6_rc4 (05 Apr 2008)

05 Apr 2008; Christian Hoffmann +php-5.2.6_rc4.ebuild:
bump to rc4 to address even more possible security issues (stack overflow
in fastcgi handling, several imap-related crashes)

*php-5.2.6_rc3-r1 (30 Mar 2008)

30 Mar 2008; Christian Hoffmann
+php-5.2.6_rc3-r1.ebuild:
revbump with a patch to fix a regression in escapeshell{arg,cmd}()
functions in regards to multi-byte handling, phpbug 44564

29 Mar 2008; Markus Meier php-5.2.6_rc3.ebuild:
x86 stable, security bug #215266

29 Mar 2008; Raúl Porcel php-5.2.6_rc3.ebuild:
alpha/ia64/sparc stable wrt security #215266

29 Mar 2008; Christian Hoffmann php-5.2.6_rc3.ebuild:
stable on amd64, bug 215266

29 Mar 2008; Jeroen Roovers php-5.2.6_rc3.ebuild:
Stable for HPPA (bug #215266).

29 Mar 2008; Brent Baude php-5.2.6_rc3.ebuild:
Marking php-5.2.6_rc3 ppc64 and ppc for bug 215266

*php-5.2.6_rc3 (28 Mar 2008)

28 Mar 2008; Christian Hoffmann +php-5.2.6_rc3.ebuild:
bump, mainly to address the issues listed in security bug 215266

23 Mar 2008; Benedikt Böhm
php-4.4.8_pre20070816.ebuild, php-4.4.8.ebuild, php-5.2.5-r1.ebuild,
php-5.2.6_rc1-r1.ebuild:
fix depend.apache usage wrt #208033

19 Mar 2008; Christian Hoffmann
-php-5.2.4_pre200708051230-r2.ebuild, -php-5.2.5_p20080206-r3.ebuild,
-php-5.2.6_rc1.ebuild:
removing old and/or vulnerable versions

09 Mar 2008; Tobias Scherbaum
php-5.2.6_rc1-r1.ebuild:
ppc stable, bug #212211

08 Mar 2008; php-5.2.6_rc1-r1.ebuild:
amd64 stable, security bug #212211.

07 Mar 2008; Dawid Węgliński php-5.2.6_rc1-r1.ebuild:
Stable on x86 (bug #212211)

06 Mar 2008; Raúl Porcel php-5.2.6_rc1-r1.ebuild:
alpha/ia64/sparc stable wrt #212211

06 Mar 2008; Jeroen Roovers php-5.2.6_rc1-r1.ebuild:
Stable for HPPA (bug #212211).

06 Mar 2008; Brent Baude php-5.2.6_rc1-r1.ebuild:
Marking php-5.2.6_rc1-r1 ppc64 for bug 212211

*php-5.2.6_rc1-r1 (05 Mar 2008)

05 Mar 2008; Christian Hoffmann
+php-5.2.6_rc1-r1.ebuild:
revbump to -r1 to include new patchset which fixes a mysql_(p)connect crash
(introduced in >5.2.5-r1), several memory corruption issues, a crash in the
soap extension and several test failures

04 Mar 2008; Markus Rothe php-5.2.6_rc1.ebuild:
Stable on ppc64; bug #212211

04 Mar 2008; Raúl Porcel php-5.2.6_rc1.ebuild:
alpha/ia64/sparc stable wrt security #212211

03 Mar 2008; Jeroen Roovers php-5.2.6_rc1.ebuild:
Stable for HPPA (bug #212211).

03 Mar 2008; Markus Meier php-5.2.6_rc1.ebuild:
x86 stable, security bug #212211

*php-5.2.6_rc1 (03 Mar 2008)

03 Mar 2008; Christian Hoffmann +php-5.2.6_rc1.ebuild:
bump to 5.2.6_rc1

03 Mar 2008; Christian Hoffmann
-php-5.2.5_p20080206.ebuild, -php-5.2.5_p20080206-r2.ebuild:
removing old

28 Feb 2008; Steve Dibb
php-5.2.5_p20080206-r3.ebuild:
amd64 stable, bug 209148

24 Feb 2008; Brent Baude
php-5.2.5_p20080206-r3.ebuild:
Marking php-5.2.5_p20080206-r3 ppc64 for bug 209148

24 Feb 2008; Raúl Porcel
php-5.2.5_p20080206-r3.ebuild:
alpha/ia64/sparc stable wrt security #209148

22 Feb 2008; Tobias Scherbaum
php-5.2.5_p20080206-r3.ebuild:
ppc stable, bug #209148

21 Feb 2008; Markus Meier
php-5.2.5_p20080206-r3.ebuild:
x86 stable, security bug #209148

21 Feb 2008; Jeroen Roovers
php-5.2.5_p20080206-r3.ebuild:
Stable for HPPA (bug #209148).

13 Feb 2008; Christian Hoffmann
php-5.2.5_p20080206-r3.ebuild:
yet another attempt at fixing src_test (no revbump)

*php-5.2.5_p20080206-r3 (12 Feb 2008)

12 Feb 2008; Christian Hoffmann
+php-5.2.5_p20080206-r3.ebuild:
hopefully improved upstream patch for bug #209606

*php-5.2.5_p20080206-r2 (12 Feb 2008)

12 Feb 2008; Christian Hoffmann
+php-5.2.5_p20080206-r2.ebuild:
revbump to fix a pretty severe crash problem: fixes bug #209606 and maybe
bug #209501; also reworking src_test so that it works more reliable
(hopefully)

08 Feb 2008; Raúl Porcel php-5.2.5_p20080206.ebuild:
alpha/ia64/sparc stable wrt security #209148

08 Feb 2008; Jeroen Roovers php-5.2.5_p20080206.ebuild:
Stable for HPPA (bug #209148).

08 Feb 2008; Tobias Scherbaum
php-5.2.5_p20080206.ebuild:
ppc stable, bug #209148

08 Feb 2008; Brent Baude php-5.2.5_p20080206.ebuild:
Marking php-5.2.5_p20080206 ppc64 for bug 209148

07 Feb 2008; Dawid Węgliński
php-5.2.5_p20080206.ebuild:
Stable on x86 (bug #209148)

*php-5.2.5_p20080206 (06 Feb 2008)

06 Feb 2008; Christian Hoffmann
+php-5.2.5_p20080206.ebuild:
adding new snapshot 5.2.5_p20080206 for security bug 209148

31 Jan 2008; Christian Hoffmann
files/70_mod_php.conf-apache2, files/70_mod_php5_concurr.conf-apache2,
files/70_mod_php5.conf-apache2, files/70_mod_php_concurr.conf-apache2:
changing AddDirectoryIndex to DirectoryIndex in apache configs per bug 139451

*php-4.4.8 (08 Jan 2008)

08 Jan 2008; Christian Hoffmann +php-4.4.8.ebuild:
bumping to 4.4.8 by user request; completely untested except quick compile
test (it's hardmasked anyway, you should really switch to php-5*)

08 Jan 2008; Christian Hoffmann -php-5.2.5.ebuild:
removing php-5.2.5, -r1 is more secure and has same KEYWORDS

15 Dec 2007; php-5.2.5-r1.ebuild:
Stable on amd64; bug 201885

12 Dec 2007; Brent Baude php-5.2.5-r1.ebuild:
Marked php-5.2.5-r1 ppc & ppc64 stable for bug 201885

11 Dec 2007; Jeroen Roovers php-5.2.5-r1.ebuild:
Stable for HPPA (bug #201885).

11 Dec 2007; Raúl Porcel php-5.2.5-r1.ebuild:
alpha/ia64/sparc stable wrt security #201885

11 Dec 2007; Dawid Węgliński php-5.2.5-r1.ebuild:
Stable on x86 (bug #201885)

*php-5.2.5-r1 (08 Dec 2007)

08 Dec 2007; Christian Hoffmann +php-5.2.5-r1.ebuild:
revision bump w/ updated patchset to fix most of the security issues listed
in bug 199156

15 Nov 2007; Christian Hoffmann -php-4.4.7.ebuild,
-php-5.2.4.ebuild, -php-5.2.4_p20070914-r2.ebuild:
removing old/vulnerable versions 4.4.7, 5.2.4 and 5.2.4_p20070914-r2

14 Nov 2007; Alex Howells php-5.2.5.ebuild:
changing ~amd64 -> amd64 with regard to #198650

13 Nov 2007; Tobias Scherbaum php-5.2.5.ebuild:
ppc stable, bug #198650

12 Nov 2007; Markus Rothe php-5.2.5.ebuild:
Stable on ppc64; bug #198650

12 Nov 2007; Jeroen Roovers php-5.2.5.ebuild:
Stable for HPPA (bug #198650 ).

12 Nov 2007; Raúl Porcel php-5.2.5.ebuild:
alpha/ia64/sparc stable wrt #198650

11 Nov 2007; Dawid Węgliński php-5.2.5.ebuild:
Stable on x86 (bug #198650)

*php-5.2.5 (09 Nov 2007)

09 Nov 2007; Christian Hoffmann +php-5.2.5.ebuild:
bump to php-5.2.5, http://www.php.net/ChangeLog-5.php#5.2.5
Gentoo-wise improvements: zero or very little expected test failures, depending
on the USE flags

03 Nov 2007; Christian Hoffmann -php-5.1.6-r11.ebuild:
removing php-5.1*

21 Oct 2007; Christian Hoffmann -php-5.2.2-r1.ebuild,
-php-5.2.4_p20070914.ebuild:
cleanup old

25 Sep 2007; Raúl Porcel
php-5.2.4_p20070914-r2.ebuild:
sparc stable wrt security #191034

22 Sep 2007; Raúl Porcel
php-5.2.4_p20070914-r2.ebuild:
alpha/ia64 stable wrt security #191034

20 Sep 2007; Brent Baude
php-5.2.4_p20070914-r2.ebuild:
MArking php-5.2.4_p20070914-r2 ppc64 stable for 191034

20 Sep 2007; Chris Gianelloni
php-5.2.4_p20070914-r2.ebuild:
Stable on amd64/x86 wrt bug #191034.

20 Sep 2007; Tobias Scherbaum
php-5.2.4_p20070914-r2.ebuild:
ppc stable, bug #191034

20 Sep 2007; Jeroen Roovers
php-5.2.4_p20070914-r2.ebuild:
Stable for HPPA (bug #191034).

*php-5.2.4_p20070914-r2 (19 Sep 2007)

19 Sep 2007; Christian Hoffmann
+php-5.2.4_p20070914-r2.ebuild:
adding php-5.2.4_p20070914-r2 as per bug 191034
* fix CVE-2007-4887 (dl() segfault with very long filenames)
* fix CVE-2007-4783, CVE-2007-4840 (segfault in iconv functions with very
long charset parameters);
* use almost-official suhosin again (based on the patch for 5.2.4)
* fix crashes in xmlrpc

*php-5.2.4_p20070914 (14 Sep 2007)

14 Sep 2007; Christian Hoffmann
+php-5.2.4_p20070914.ebuild:
adding php-5.2.4_p20070914, bug 191034

*php-5.2.4 (08 Sep 2007)

08 Sep 2007; Christian Hoffmann -php-5.2.3-r3.ebuild,
+php-5.2.4.ebuild:
adding php-5.2.4, bug 191034; removing broken php-5.2.3*

29 Aug 2007; Markus Rothe
php-4.4.8_pre20070816.ebuild:
Stable on ppc64; bug #189172

24 Aug 2007; Raúl Porcel
php-4.4.8_pre20070816.ebuild:
alpha/ia64 stable wrt security #189172

23 Aug 2007; Christoph Mende
php-4.4.8_pre20070816.ebuild:
Stable on amd64 wrt security bug #189172

22 Aug 2007; Tobias Scherbaum
php-4.4.8_pre20070816.ebuild:
ppc stable, bug #189172

21 Aug 2007; Gustavo Zacarias
php-4.4.8_pre20070816.ebuild:
Stable on sparc wrt security #189172

20 Aug 2007; Markus Ullmann
php-4.4.8_pre20070816.ebuild:
Stable on x86 wrt security bug #189172

19 Aug 2007; Jeroen Roovers php-4.4.8_pre20070816.ebuild:
Stable for HPPA (bug #189172).

*php-4.4.8_pre20070816 (18 Aug 2007)

18 Aug 2007; Christian Hoffmann
+php-4.4.8_pre20070816.ebuild:
version bump to fix several security issues, see bug 189172

15 Aug 2007; Jeroen Roovers
php-5.2.4_pre200708051230-r2.ebuild:
Stable for HPPA (bug #180556).

14 Aug 2007; Tobias Scherbaum
php-5.2.4_pre200708051230-r2.ebuild:
ppc stable, bug #180556

14 Aug 2007; Markus Rothe
php-5.2.4_pre200708051230-r2.ebuild:
Stable on ppc64; bug #180556

13 Aug 2007; Gustavo Zacarias
php-5.2.4_pre200708051230-r2.ebuild:
Stable on sparc wrt #180556

12 Aug 2007; Steve Dibb
php-5.2.4_pre200708051230-r2.ebuild:
amd64 stable, bug 180556

11 Aug 2007; Raúl Porcel
php-5.2.4_pre200708051230-r2.ebuild:
alpha/ia64/x86 stable wrt #180556

*php-5.2.4_pre200708051230-r2 (09 Aug 2007)

09 Aug 2007; Tobias Scherbaum
+php-5.2.4_pre200708051230-r2.ebuild:
Import from the php-testing overlay wrt security bug #180556, thanks to
Christian Hoffmann!

30 Jul 2007; Gustavo Zacarias php-5.2.3-r3.ebuild:
Stable on sparc wrt security #180556

30 Jul 2007; Markus Rothe php-5.2.3-r3.ebuild:
Stable on ppc64; bug #180556

28 Jul 2007; Jeroen Roovers php-5.2.3-r3.ebuild:
Stable for HPPA (bug #180556).

28 Jul 2007; Steve Dibb php-5.2.3-r3.ebuild:
amd64 stable, security bug 180556

28 Jul 2007; Raúl Porcel php-5.2.3-r3.ebuild:
alpha/ia64/x86 stable wrt #180556

28 Jul 2007; Tobias Scherbaum php-5.2.3-r3.ebuild:
ppc stable, bug #180556

*php-5.2.3-r3 (22 Jul 2007)

22 Jul 2007; Tobias Scherbaum
+php-5.2.3-r3.ebuild:
Import php-5.2.3-r3 from the php-experimental overlay wrt security bug
#180556, thanks to Christian Hoffmann!

30 Jun 2007; Luca Longinotti -php-4.4.6.ebuild,
-php-5.2.1-r3.ebuild:
Remove old versions.

12 May 2007; Markus Rothe php-4.4.7.ebuild,
php-5.2.2-r1.ebuild:
Stable on ppc64; bug #169372

12 May 2007; Luca Longinotti
files/70_mod_php.conf-apache2, files/70_mod_php5_concurr.conf-apache2,
-files/70_mod_php5.conf-apache1, files/70_mod_php5.conf-apache2,
files/20php4-envd, files/20php5-envd, -files/70_mod_php.conf-apache1,
files/70_mod_php_concurr.conf-apache2, php-4.4.6.ebuild, php-4.4.7.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild, php-5.2.2-r1.ebuild:
Apache 1.X masking (fix ebuilds to not require apache-1*).

10 May 2007; Jeroen Roovers php-4.4.7.ebuild,
php-5.2.2-r1.ebuild:
Stable for HPPA (bug #169372).

10 May 2007; Jose Luis Rivero php-5.2.2-r1.ebuild:
Stable on alpha wrt security bug #169372

09 May 2007; Luca Longinotti php-4.4.7.ebuild,
php-5.2.2-r1.ebuild:
AMD64 stable for security bug #169372.

09 May 2007; Jose Luis Rivero php-4.4.7.ebuild:
Stable on alpha wrt security bug #169372

08 May 2007; Raúl Porcel php-4.4.7.ebuild,
php-5.2.2-r1.ebuild:
ia64 + x86 stable wrt security bug 169372

08 May 2007; Gustavo Zacarias php-4.4.7.ebuild,
php-5.2.2-r1.ebuild:
Stable on sparc wrt security #169372

08 May 2007; Tobias Scherbaum php-4.4.7.ebuild,
php-5.2.2-r1.ebuild:
ppc stable, bug #169372

*php-5.2.2-r1 (07 May 2007)
*php-4.4.7 (07 May 2007)

07 May 2007; Luca Longinotti +php-4.4.7.ebuild,
+php-5.2.2-r1.ebuild:
PHP 4.4.7 and 5.2.2, fixes various security issues, see bug #169372.

04 May 2007; Luca Longinotti -php-4.3.11-r5.ebuild,
-php-4.4.4-r6.ebuild, php-4.4.6.ebuild, -php-5.0.5-r5.ebuild,
-php-5.1.6-r6.ebuild, php-5.1.6-r11.ebuild:
Remove 4.3 and 5.0 and old versions.

31 Mar 2007; Raúl Porcel php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
ia64 stable wrt bug 153911

31 Mar 2007; Raúl Porcel php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
ia64 stable wrt security bug 153911

10 Mar 2007; Jose Luis Rivero php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
Stable on alpha wrt security #153911

08 Mar 2007; Gustavo Zacarias php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
Stable on sparc wrt security #153911

06 Mar 2007; René Nussbaumer php-5.1.6-r11.ebuild:
Stable on hppa. See bug #153911.

06 Mar 2007; Tobias Scherbaum php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
Stable on ppc wrt bug #153911.

06 Mar 2007; Christian Faulhammer php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
stable x86; security bug 153911

06 Mar 2007; Jeroen Roovers php-5.2.1-r3.ebuild:
Stable for HPPA (bug #153911).

06 Mar 2007; Markus Rothe php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
Stable on ppc64; bug #153911

06 Mar 2007; Jeroen Roovers php-4.4.6.ebuild:
Stable for HPPA (bug #153911).

05 Mar 2007; Luca Longinotti php-4.4.6.ebuild,
php-5.1.6-r11.ebuild, php-5.2.1-r3.ebuild:
Keyword on amd64 wrt bug #153911.

*php-5.2.1-r3 (05 Mar 2007)
*php-5.1.6-r11 (05 Mar 2007)
*php-4.4.6 (05 Mar 2007)

05 Mar 2007; Luca Longinotti +files/20php4-envd,
+files/20php5-envd, -php-4.4.4-r8.ebuild, +php-4.4.6.ebuild,
-php-5.1.6-r8.ebuild, +php-5.1.6-r11.ebuild, +php-5.2.1-r3.ebuild:
New PHP versions, fix lots of bugs, add Suhosin support.

26 Nov 2006; Luca Longinotti -php-4.4.3-r1.ebuild,
-php-4.4.4-r4.ebuild, -php-5.1.4-r6.ebuild, -php-5.1.6-r4.ebuild:
Cleanup old versions, thanks arch-teams!

29 Oct 2006; Bryan Østergaard php-4.4.4-r6.ebuild:
Stable on ia64, bug 150261.

*php-5.1.6-r8 (27 Oct 2006)
*php-4.4.4-r8 (27 Oct 2006)

27 Oct 2006; Luca Longinotti +php-4.4.4-r8.ebuild,
+php-5.1.6-r8.ebuild:
Add new PHP revisions, fix a few issues, improve a open_basedir check.

24 Oct 2006; Joshua Jackson php-4.4.4-r6.ebuild,
php-5.1.6-r6.ebuild:
Stable x86; bug #150261

15 Oct 2006; Tobias Scherbaum php-4.4.4-r6.ebuild,
php-5.1.6-r6.ebuild:
hppa stable, bug #150261

14 Oct 2006; Aron Griffis php-5.1.6-r6.ebuild:
Mark 5.1.6-r6 stable on ia64. #150261

11 Oct 2006; Fernando J. Pereda php-4.4.4-r6.ebuild,
php-5.1.6-r6.ebuild:
Stable on alpha as per security bug #150261

11 Oct 2006; Markus Rothe php-4.4.4-r6.ebuild,
php-5.1.6-r6.ebuild:
Stable on ppc64; bug #150261

11 Oct 2006; Gustavo Zacarias php-4.4.4-r6.ebuild,
php-5.1.6-r6.ebuild:
Stable on sparc wrt security #150261

11 Oct 2006; Tobias Scherbaum php-4.4.4-r6.ebuild,
php-5.1.6-r6.ebuild:
ppc stable, bug #150261

*php-5.1.6-r6 (07 Oct 2006)
*php-4.4.4-r6 (07 Oct 2006)

07 Oct 2006; Luca Longinotti +php-4.4.4-r6.ebuild,
+php-5.1.6-r6.ebuild:
Fix security bug #150261, amd64 stable.

16 Sep 2006; Rene Nussbaumer php-4.4.4-r4.ebuild,
php-5.1.6-r4.ebuild:
Stable on hppa. See bug #147061.

14 Sep 2006; Bryan Østergaard php-4.4.4-r4.ebuild,
php-5.1.6-r4.ebuild:
Stable on ia64, bug 147061.

11 Sep 2006; Tobias Scherbaum php-4.4.4-r4.ebuild,
php-5.1.6-r4.ebuild:
ppc stable, bug #147061

11 Sep 2006; Thomas Cort php-4.4.4-r4.ebuild,
php-5.1.6-r4.ebuild:
Stable on alpha and amd64 wrt security Bug #147061.

11 Sep 2006; Markus Rothe php-4.4.4-r4.ebuild,
php-5.1.6-r4.ebuild:
Stable on ppc64; bug #147061

11 Sep 2006; Jason Wever php-4.4.4-r4.ebuild,
php-5.1.6-r4.ebuild:
Stable on SPARC wrt security bug #147061.

10 Sep 2006; php-4.4.4-r4.ebuild, php-5.1.6-r4.ebuild:
Stable on x86, security bug #147061.

*php-5.1.6-r4 (10 Sep 2006)
*php-4.4.4-r4 (10 Sep 2006)

10 Sep 2006; Luca Longinotti -php-4.4.4-r2.ebuild,
+php-4.4.4-r4.ebuild, -php-5.1.6-r2.ebuild, +php-5.1.6-r4.ebuild:
Revision bump to fix INI restore issue and other bugs, updates Hardened-PHP
to 0.4.15. Cleanup old versions.

10 Sep 2006; Luca Longinotti -php-4.4.2.ebuild,
-php-4.4.2-r2.ebuild, -php-4.4.2-r6.ebuild:
Remove old versions.

08 Sep 2006; Bryan Østergaard php-4.4.3-r1.ebuild:
Stable on ia64.

05 Sep 2006; Luca Longinotti -php-5.1.4.ebuild,
-php-5.1.4-r4.ebuild:
Remove old versions.

03 Sep 2006; Bryan Østergaard php-5.1.4-r6.ebuild:
Stable on ia64.

*php-5.1.6-r2 (30 Aug 2006)
*php-4.4.4-r2 (30 Aug 2006)

30 Aug 2006; Luca Longinotti -php-4.4.4-r1.ebuild,
+php-4.4.4-r2.ebuild, -php-5.1.6-r1.ebuild, +php-5.1.6-r2.ebuild:
Revbump to force upgrading because of missing mbstring headers which can
break extension compiles.

*php-5.1.6-r1 (29 Aug 2006)
*php-4.4.4-r1 (29 Aug 2006)

29 Aug 2006; Luca Longinotti -php-4.4.4.ebuild,
+php-4.4.4-r1.ebuild, -php-5.1.6.ebuild, +php-5.1.6-r1.ebuild:
Revbump to force reverting back to bundled libpcre, the external one can
result is strange brokenness in PHP, see bug #145220 for more info.

*php-5.1.6 (29 Aug 2006)
*php-4.4.4 (29 Aug 2006)

29 Aug 2006; Luca Longinotti +php-4.4.4.ebuild,
+php-5.1.6.ebuild:
Version bump, add PHP 4.4.4 and PHP 5.1.6 with Hardened-PHP 0.4.14, fixes
bug #144297. Also switch the eclasses to use external libraries for PCRE and
SQLite support, fixes bug #145220.

15 Aug 2006; Joshua Jackson php-4.4.3-r1.ebuild,
php-5.1.4-r6.ebuild:
See below for the security bug that makes this x86 stable

14 Aug 2006; Jose Luis Rivero php-4.4.3-r1.ebuild,
php-5.1.4-r6.ebuild:
Stable on alpha wrt security bug #143126

12 Aug 2006; Jason Wever php-4.4.3-r1.ebuild:
Updated the patchset for php-4.4.3-r1 to fix bug #143508 (with permission
from jakub).

12 Aug 2006; Rene Nussbaumer php-4.4.3-r1.ebuild,
php-5.1.4-r6.ebuild:
Stable on hppa. See bug #143126.

12 Aug 2006; Markus Rothe php-4.4.3-r1.ebuild,
php-5.1.4-r6.ebuild:
Stable on ppc64; bug #143126

10 Aug 2006; Luca Longinotti php-4.4.3-r1.ebuild:
Retry with manually diffed patch, works here now, hopefully out there too. ;)

10 Aug 2006; Luca Longinotti php-4.4.3-r1.ebuild:
Revert, now it got even worse, fails on some of my systems too. :S

10 Aug 2006; Luca Longinotti php-4.4.3-r1.ebuild:
Update patchset for PHP 4.4.3, it seems one of the patches randomly failed
to apply on some systems, probably due to bad line-endings.

10 Aug 2006; Gustavo Zacarias php-4.4.3-r1.ebuild,
php-5.1.4-r6.ebuild:
Stable on sparc wrt security #143126

10 Aug 2006; Tobias Scherbaum php-4.4.3-r1.ebuild,
php-5.1.4-r6.ebuild:
ppc stable, bug #143126

*php-5.1.4-r6 (10 Aug 2006)
*php-4.4.3-r1 (10 Aug 2006)

10 Aug 2006; Luca Longinotti +php-4.4.3-r1.ebuild,
+php-5.1.4-r6.ebuild:
Version/revision bump, fixes security bug #143126. Add support for the PHP
test suite, activated by FEATURES="test".

20 Jul 2006; Luca Longinotti php-4.3.11-r5.ebuild,
php-4.4.2.ebuild, php-4.4.2-r2.ebuild, php-4.4.2-r6.ebuild,
php-5.0.5-r5.ebuild, php-5.1.4.ebuild, php-5.1.4-r4.ebuild:
Fix bug #141098.

18 Jul 2006; Luca Longinotti php-4.4.2-r6.ebuild,
php-5.1.4-r4.ebuild:
Stable on amd64 wrt bug #133524.

18 Jul 2006; Joshua Jackson php-4.4.2-r6.ebuild,
php-5.1.4-r4.ebuild:
Stable x86; security bug #133524

18 Jul 2006; Thomas Cort php-4.4.2-r6.ebuild,
php-5.1.4-r4.ebuild:
Stable on alpha wrt security Bug #133524.

17 Jul 2006; Markus Rothe php-4.4.2-r6.ebuild,
php-5.1.4-r4.ebuild:
Stable on ppc64; bug #133524

17 Jul 2006; Tobias Scherbaum php-4.4.2-r6.ebuild,
php-5.1.4-r4.ebuild:
ppc stable, bug #133524

16 Jul 2006; Jason Wever php-4.4.2-r6.ebuild,
php-5.1.4-r4.ebuild:
Stable on SPARC wrt security bug #133524.

*php-5.1.4-r4 (14 Jul 2006)
*php-4.4.2-r6 (14 Jul 2006)

14 Jul 2006; Luca Longinotti
+files/70_mod_php5_concurr.conf-apache2,
+files/70_mod_php_concurr.conf-apache2, +files/php4-ldvs,
+files/php5-ldvs, php-4.3.11-r5.ebuild, php-4.4.2.ebuild,
php-4.4.2-r2.ebuild, -php-4.4.2-r5.ebuild, +php-4.4.2-r6.ebuild,
php-5.0.5-r5.ebuild, php-5.1.4.ebuild, -php-5.1.4-r3.ebuild,
+php-5.1.4-r4.ebuild:
Restructure PHP ebuilds and eclasses to accomodate for future expansion and
new features, cleaner separation between eclasses and ebuilds. Fixes
security related bugs #133524, #136566, #138180, #135860 and bugs #137568,
#134171, #138665.

13 Jul 2006; Luca Longinotti -php-5.1.2.ebuild:
Remove PHP 5.1.2.

*php-5.1.4-r3 (20 Jun 2006)
*php-4.4.2-r5 (20 Jun 2006)

20 Jun 2006; Luca Longinotti -php-4.4.2-r3.ebuild,
+php-4.4.2-r5.ebuild, -php-5.1.4-r1.ebuild, +php-5.1.4-r3.ebuild:
Revision bumps. Fix bug #105489 and add a couple of other fixes for various
bugs.

18 Jun 2006; Bryan Østergaard php-4.4.2-r2.ebuild,
php-5.1.4.ebuild:
Stable on ia64, bug 131135.

*php-5.1.4-r1 (29 May 2006)
*php-4.4.2-r3 (29 May 2006)

29 May 2006; Luca Longinotti +php-4.4.2-r3.ebuild,
+php-5.1.4-r1.ebuild:
New revisions, fix a couple of bugs, and update Hardened-PHP patch to 0.4.11.

18 May 2006; Diego Pettenò php-4.4.2-r2.ebuild:
Add ~x86-fbsd keyword to 4.4 version.

06 May 2006; Jason Wever php-4.4.2-r2.ebuild:
Stable on SPARC wrt security bug #131135.

06 May 2006; Markus Rothe php-4.4.2-r2.ebuild,
php-5.1.4.ebuild:
Stable on ppc64; bug #131135

06 May 2006; Mark Loeser php-4.4.2-r2.ebuild,
php-5.1.4.ebuild:
Stable on x86; bug #131135

05 May 2006; php-4.4.2-r2.ebuild, php-5.1.4.ebuild:
Stable on alpha wrt security Bug #131135.

05 May 2006; Rene Nussbaumer php-4.4.2-r2.ebuild,
php-5.1.4.ebuild:
Stable on hppa. See bug #131135.

05 May 2006; Tobias Scherbaum php-4.4.2-r2.ebuild,
php-5.1.4.ebuild:
ppc stable, bug #131135

05 May 2006; Gustavo Zacarias php-5.1.4.ebuild:
Stable on sparc wrt security #131135

05 May 2006; Luca Longinotti php-5.1.4.ebuild:
Readd ~x86-fbsd keyword to PHP 5.1.4 which I dropped accidentally, sorry!
Update digests to reflect the fixed patchset, please make sure you have the
php-patchset-4.4.2-r3.tar.bz2 with the md5sum of
eac1d9e4aa78195953e33e566a1f39ce, thanks, and sorry again. ;)

05 May 2006; Jon Hood php-5.1.4.ebuild,
php-4.4.2-r2.ebuild:
Stable on amd64, #131135.

*php-5.1.4 (05 May 2006)
*php-4.4.2-r2 (05 May 2006)

05 May 2006; Luca Longinotti -php-4.4.2-r1.ebuild,
+php-4.4.2-r2.ebuild, -php-5.1.2-r1.ebuild, +php-5.1.4.ebuild:
Sync with PHP overlay, fixes various bugs and security bugs, see bug #131135
for more details.

23 Apr 2006; Diego Pettenò php-5.1.2-r1.ebuild:
Add ~x86-fbsd keyword.

20 Apr 2006; Luca Longinotti php-4.3.11-r5.ebuild,
php-4.4.2.ebuild, php-4.4.2-r1.ebuild, php-5.0.5-r5.ebuild,
php-5.1.2.ebuild, php-5.1.2-r1.ebuild:
Don't die on USE=-*, ebuild part.

*php-5.1.2-r1 (13 Apr 2006)
*php-4.4.2-r1 (13 Apr 2006)

13 Apr 2006; Luca Longinotti +php-4.4.2-r1.ebuild,
+php-5.1.2-r1.ebuild:
Add new revisions to fix an issue with the MySQL charsets.
See bug #129761 about it.

28 Mar 2006; Luca Longinotti
files/70_mod_php.conf-apache1, files/70_mod_php.conf-apache2,
files/70_mod_php5.conf-apache1, files/70_mod_php5.conf-apache2:
Revert config changes for bug #127645.

28 Mar 2006; Luca Longinotti
files/70_mod_php.conf-apache1, files/70_mod_php.conf-apache2,
files/70_mod_php5.conf-apache1, files/70_mod_php5.conf-apache2:
Change config files to fix bug #127645.

24 Mar 2006; Luca Longinotti
files/70_mod_php.conf-apache1, files/70_mod_php5.conf-apache1,
files/70_mod_php5.conf-apache2, php-4.3.11-r5.ebuild,
-php-4.4.1-r3.ebuild, php-4.4.2.ebuild, php-5.0.5-r5.ebuild,
php-5.1.2.ebuild:
Introduce usage of phpconfutils eclass to handle USE flag dependencies
automatically, allowing to build dev-lang/php without intervention on
default USE flags, solves bug #120088. Fix bug #122379.

14 Mar 2006; Joshua Jackson php-4.4.2.ebuild,
php-5.1.2.ebuild:
Stable php-4.4.2 and 5.1.2 for x86; bug #125878

13 Mar 2006; Rene Nussbaumer php-4.4.2.ebuild,
php-5.1.2.ebuild:
Stable on hppa. See bug #125878.

12 Mar 2006; Markus Rothe php-4.4.2.ebuild,
php-5.1.2.ebuild:
Stable on ppc64; bug #125878

12 Mar 2006; Tobias Scherbaum php-4.4.2.ebuild,
php-5.1.2.ebuild:
ppc stable, bug #125878

12 Mar 2006; Jason Wever php-4.4.2.ebuild,
php-5.1.2.ebuild:
Stable on SPARC wrt security bug #125878.

12 Mar 2006; Fernando J. Pereda php-5.1.2.ebuild:
Stable on alpha wrt security bug #125878

12 Mar 2006; Simon Stelling php-4.4.2.ebuild,
php-5.1.2.ebuild:
stable on amd64 wrt bug 125878

12 Mar 2006; Fernando J. Pereda php-4.4.2.ebuild:
Stable on alpha wrt security bug #125878

*php-5.1.2 (12 Mar 2006)
*php-4.4.2 (12 Mar 2006)

12 Mar 2006; Luca Longinotti
-files/4-any/php4-fastbuild.patch, -files/4-any/php4-imap-symlink.diff,
-files/4-any/php4-iodbc-config.diff, +files/70_mod_php.conf-apache1,
+files/70_mod_php.conf-apache2, -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/70_mod_php5.conf-apache1,
+files/70_mod_php5.conf-apache2, -files/4-any/apache-1.3/70_mod_php.conf,
-files/4-any/apache-2.0/70_mod_php.conf,
-files/5.0-any/php5-imap-symlink.diff,
-files/5.0-any/php5-iodbc-config.diff,
-files/5.0-any/php5-libtool-1.5.patch, -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.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, php-4.3.11-r5.ebuild,
php-4.4.1-r3.ebuild, +php-4.4.2.ebuild, php-5.0.5-r5.ebuild,
-php-5.1.1.ebuild, +php-5.1.2.ebuild:
Sync with PHP Overlay: reworked ebuilds, eclasses and patchsets to be easier
to maintain. Add PHP 4.4.2 and PHP 5.1.2 to the tree, fixing bugs #125878
and #118846. Fix too bugs #120908, #123376, #122724 and #121190.

24 Feb 2006; Jeroen Roovers php-5.0.5-r5.ebuild:
Stable on hppa (preparation for bug #119461).

21 Feb 2006; Jeroen Roovers php-5.0.5-r5.ebuild:
Marked ~hppa.

26 Jan 2006; Jeroen Roovers php-4.4.1-r3.ebuild:
Marked stable on hppa (bug #102649).

26 Jan 2006; Jeroen Roovers php-5.1.1.ebuild:
Marked ~hppa (bug #119461).

25 Jan 2006; Bryan Østergaard php-5.0.5-r5.ebuild:
Stable on alpha.

22 Jan 2006; Simon Stelling php-4.3.11-r5.ebuild,
php-4.4.1-r3.ebuild:
stable on amd64

22 Jan 2006; Simon Stelling php-5.0.5-r5.ebuild:
stable on amd64

22 Jan 2006; php-4.3.11-r5.ebuild:
Added ~ppc keyword to php-4.3.11-r5

21 Jan 2006; Jason Wever php-4.3.11-r5.ebuild,
php-4.4.1-r3.ebuild, php-5.0.5-r5.ebuild:
Stable on SPARC wrt bug #119461.

21 Jan 2006; php-5.0.5-r5.ebuild:
Added ppc keyword to php-4.4.1-r3, php-5.0.5-r5. bug 119461

19 Jan 2006; Krzysiek Pawlik php-4.3.11-r5.ebuild,
php-4.4.1-r3.ebuild, php-5.0.5-r5.ebuild:
Stable on x86.

18 Jan 2006; Markus Rothe php-4.4.1-r3.ebuild,
php-5.0.5-r5.ebuild:
Stable on ppc64; bug #119461

10 Jan 2006; Luca Longinotti
-files/4.3.11/php4.3.11-apache2sapi.patch,
-files/4.3.11/php4.3.11-apachesapi.patch,
-files/4.3.11/php4.3.11-curl-open_basedir.patch,
-files/4.3.11/php4.3.11-fopen_wrappers.patch,
-files/4.3.11/php4.3.11-gd-safe_mode.patch,
-files/4.3.11/php4.3.11-globals_overwrite.patch,
-files/4.3.11/php4.3.11-mbstring-header_inj.patch,
-files/4.3.11/php4.3.11-multilib-search-path.patch,
-files/4.3.11/php4.3.11-pcre-security.patch,
-files/4.3.11/php4.3.11-phpinfo_xss.patch,
-files/4.3.11/php4.3.11-pspell-ext-segf.patch,
-files/4.4.1/php4.4.1-apache2sapi.patch,
-files/4.4.1/php4.4.1-curl-open_basedir.patch,
-files/4.4.1/php4.4.1-current_key_by_reference.patch,
-files/4.4.1/php4.4.1-gd-safe_mode.patch,
-files/4.4.1/php4.4.1-mbstring-header_inj.patch,
-files/4.4.1/php4.4.1-multilib-search-path.patch,
-files/5.0.5/php5.0.5-apache2sapi.patch,
-files/5.0.5/php5.0.5-curl-open_basedir.patch,
-files/5.0.5/php5.0.5-fopen_wrappers.patch,
-files/5.0.5/php5.0.5-gd-safe_mode.patch,
-files/5.0.5/php5.0.5-globals_overwrite.patch,
-files/5.0.5/php5.0.5-mbstring-header_inj.patch,
-files/5.0.5/php5.0.5-multilib-search-path.patch,
-files/5.0.5/php5.0.5-obj-serialize.patch,
-files/5.0.5/php5.0.5-pspell-ext-segf.patch,
-files/5.0.5/php5.0.5-tsrm-gcc4.patch,
-files/5.1.1/php5.1.1-curl-gcry_threads.patch,
-files/5.1.1/php5.1.1-ming-config.patch,
-files/5.1.1/php5.1.1-multilib-search-path.patch, php-4.3.11-r5.ebuild,
php-4.4.1-r3.ebuild, php-5.0.5-r5.ebuild, php-5.1.1.ebuild:
Move version-specific patches into external tarballs.

05 Jan 2006; Luca Longinotti
+files/5.1.1/php5.1.1-curl-gcry_threads.patch, php-5.1.1.ebuild:
Fix bug #117767.

*php-5.1.1 (28 Dec 2005)
*php-5.0.5-r5 (28 Dec 2005)
*php-4.4.1-r3 (28 Dec 2005)
*php-4.3.11-r5 (28 Dec 2005)

28 Dec 2005; Luca Longinotti
files/4-any/php4-imap-symlink.diff, files/4-any/php4-iodbc-config.diff,
+files/4.3.11/php4.3.11-apache2sapi.patch,
+files/4.3.11/php4.3.11-apachesapi.patch,
+files/4.3.11/php4.3.11-curl-open_basedir.patch,
-files/4.3.11/php4.3.11-curl_safemode.patch,
+files/4.3.11/php4.3.11-gd-safe_mode.patch,
-files/4.3.11/php4.3.11-gd_safe_mode.patch,
+files/4.3.11/php4.3.11-mbstring-header_inj.patch,
+files/4.3.11/php4.3.11-multilib-search-path.patch,
-files/4.3.11/php4.3.11-session_save_path-segf.patch,
-files/4.4.0/php4.4.0-curl_safemode.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-globals_overwrite.patch,
-files/4.4.0/php4.4.0-pcre-security.patch,
-files/4.4.0/php4.4.0-phpinfo_xss.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.1/php4.4.1-apache2sapi.patch,
+files/4.4.1/php4.4.1-curl-open_basedir.patch,
+files/4.4.1/php4.4.1-gd-safe_mode.patch,
+files/4.4.1/php4.4.1-mbstring-header_inj.patch,
-files/4.4.1/php4.4.1-mod_rewrite-crash.patch,
+files/4.4.1/php4.4.1-multilib-search-path.patch,
files/5.0-any/php5-iodbc-config.diff,
-files/5.0.4/php5.0.4-curl_safemode.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-globals_overwrite.patch,
-files/5.0.4/php5.0.4-pcre-security.patch,
-files/5.0.4/php5.0.4-phpinfo_xss.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-apache2sapi.patch,
+files/5.0.5/php5.0.5-curl-open_basedir.patch,
-files/5.0.5/php5.0.5-curl_safemode.patch,
+files/5.0.5/php5.0.5-gd-safe_mode.patch,
-files/5.0.5/php5.0.5-gd_safe_mode.patch,
+files/5.0.5/php5.0.5-mbstring-header_inj.patch,
+files/5.0.5/php5.0.5-multilib-search-path.patch,
-files/5.0.5/php5.0.5-session_save_path-segf.patch,
+files/5.0.5/php5.0.5-tsrm-gcc4.patch,
files/5.1-any/php5-iodbc-config.diff,
+files/5.1.1/php5.1.1-ming-config.patch,
+files/5.1.1/php5.1.1-multilib-search-path.patch, -php-4.3.11-r4.ebuild,
+php-4.3.11-r5.ebuild, -php-4.4.0-r4.ebuild, -php-4.4.1-r2.ebuild,
+php-4.4.1-r3.ebuild, -php-5.0.4-r4.ebuild, -php-5.0.5-r4.ebuild,
+php-5.0.5-r5.ebuild, +php-5.1.1.ebuild:
Sync with PHP Overlay. Delete PHP 4.4.0 and PHP 5.0.4, add PHP 5.1.1. Update
a lot of patches, update Hardened-PHP patches, add lib64 patch for multilib
systems. Fixes many bugs.

19 Nov 2005; Markus Rothe php-4.4.1-r2.ebuild,
php-5.0.5-r4.ebuild:
Added ~ppc64 keywords; bug #102649

10 Nov 2005; Jason Wever php-4.4.1-r2.ebuild:
Added ~sparc keyword as all arches but ~x86 were dropped from the 4.4.1
ebuilds.

*php-5.0.5-r4 (04 Nov 2005)
*php-5.0.4-r4 (04 Nov 2005)
*php-4.4.1-r2 (04 Nov 2005)
*php-4.4.0-r4 (04 Nov 2005)
*php-4.3.11-r4 (04 Nov 2005)

04 Nov 2005; Luca Longinotti
files/4.3.11/php4.3.11-session_save_path-segf.patch,
files/5.0.4/php5.0.4-session_save_path-segf.patch,
files/4.4.0/php4.4.0-session_save_path-segf.patch,
files/5.0.5/php5.0.5-session_save_path-segf.patch, -php-4.3.11-r3.ebuild,
+php-4.3.11-r4.ebuild, -php-4.4.0-r3.ebuild, +php-4.4.0-r4.ebuild,
-php-4.4.1-r1.ebuild, +php-4.4.1-r2.ebuild, -php-5.0.4-r3.ebuild,
+php-5.0.4-r4.ebuild, -php-5.0.5-r3.ebuild, +php-5.0.5-r4.ebuild:
Revbump to fix a bug in the Apache2 SAPI and a bug with key() and current().

04 Nov 2005; Luca Longinotti
files/4.3.11/php4.3.11-globals_overwrite.patch,
files/4.4.0/php4.4.0-globals_overwrite.patch,
+files/4.4.1/php4.4.1-current_key_by_reference.patch,
files/5.0.4/php5.0.4-globals_overwrite.patch,
files/5.0.5/php5.0.5-globals_overwrite.patch, php-4.4.1-r1.ebuild:
Fix for http://bugs.php.net/bug.php?id=35067.

*php-4.4.1-r1 (03 Nov 2005)

03 Nov 2005; Luca Longinotti
+files/4.4.1/php4.4.1-mod_rewrite-crash.patch, -php-4.4.1.ebuild,
+php-4.4.1-r1.ebuild:
Update Hardened-PHP to latest version for PHP 4.4.1 and 5.0.5, fix bug in
the Apache2 SAPI of PHP 4.4.1 (mentioned in bug #111032).

*php-5.0.5-r3 (02 Nov 2005)
*php-5.0.4-r3 (02 Nov 2005)
*php-4.4.1 (02 Nov 2005)
*php-4.4.0-r3 (02 Nov 2005)
*php-4.3.11-r3 (02 Nov 2005)

02 Nov 2005; Luca Longinotti
+files/4.3.11/php4.3.11-curl_safemode.patch,
+files/4.3.11/php4.3.11-globals_overwrite.patch,
+files/4.3.11/php4.3.11-phpinfo_xss.patch,
+files/4.4.0/php4.4.0-curl_safemode.patch,
+files/4.4.0/php4.4.0-globals_overwrite.patch,
+files/4.4.0/php4.4.0-phpinfo_xss.patch,
+files/5.0.4/php5.0.4-curl_safemode.patch,
+files/5.0.4/php5.0.4-globals_overwrite.patch,
+files/5.0.4/php5.0.4-phpinfo_xss.patch,
+files/5.0.5/php5.0.5-curl_safemode.patch,
+files/5.0.5/php5.0.5-globals_overwrite.patch, -php-4.3.11-r2.ebuild,
+php-4.3.11-r3.ebuild, -php-4.4.0-r2.ebuild, +php-4.4.0-r3.ebuild,
+php-4.4.1.ebuild, -php-5.0.4-r2.ebuild, +php-5.0.4-r3.ebuild,
-php-5.0.5-r2.ebuild, +php-5.0.5-r3.ebuild:
Security-update: fix bugs #111032, #111015, #111011 and bug #111014. Also
add PHP 4.4.1 to the tree, wich fixes those vulnerabilities.

*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.

*php-5.0.5-r1 (18 Sep 2005)
*php-5.0.4-r1 (18 Sep 2005)
*php-4.4.0-r1 (18 Sep 2005)
*php-4.3.11-r1 (18 Sep 2005)

18 Sep 2005; Benedikt Boehm
+files/4.4.0/php4-libtool-1.5.patch, +files/5.0.0/php5-libtool-1.5.patch,
+files/4.4.0/php4.3.11-pcre-security.patch,
+files/4.4.0/php4.4.0-pcre-security.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/4.4.0/fastbuild.patch,
-files/5.0.0/php5-hphp-acinclude.patch,
-files/4.4.0/php4-hphp-acinclude.patch, -php-4.3.11.ebuild,
+php-4.3.11-r1.ebuild, -php-4.4.0.ebuild, +php-4.4.0-r1.ebuild,
-php-5.0.4.ebuild, +php-5.0.4-r1.ebuild, -php-5.0.5.ebuild,
+php-5.0.5-r1.ebuild:
Fix security issue in bundled PCRE lib for PHP 4.3.11, 4.4.0 and 5.0.4, bug #102373.
Fix object serialization bug in PHP 5.0.5, bug #105374.
Fix Hardened-PHP support for all PHP releases.
Various compilation fixes for all PHP releases.
Various dependency fixes for all PHP releases.
Deleted 'dbm' USE flag from all PHP ebuilds, it's not supported upstream.
Changed 'java' USE flag to 'java-internal' USE flag for PHP4.

17 Sep 2005; Marcus D. Hanwell php-5.0.4.ebuild:
Fixed up the remaining deps, tested here and looks good. Marking ~amd64, bug
102649.

17 Sep 2005; Marcus D. Hanwell php-4.4.0.ebuild:
Fixed up the remaining deps, tested here and looks good. Marking ~amd64, bug
102649.

17 Sep 2005; Brian Harring php-4.4.0.ebuild,
php-5.0.4.ebuild:
Backed out ~amd64 keywording. bad deps.

16 Sep 2005; Christian Parpart php-4.4.0.ebuild,
php-5.0.4.ebuild:
added to ~amd64

14 Sep 2005; Joseph Jezak php-5.0.4.ebuild:
Marked ~ppc for bug #105673.

14 Sep 2005; Joseph Jezak php-4.4.0.ebuild,
php-5.0.5.ebuild:
Marked ~ppc for bug #105673.

*php-4.3.11 (11 Sep 2005)

11 Sep 2005; Benedikt Boehm +php-4.3.11.ebuild:
add 4.3.11, b/c 4.4.0 breaks compatibility
remove some archs, get your deps tested!

09 Sep 2005; Jason Wever php-4.4.0.ebuild,
php-5.0.4.ebuild:
Added ~sparc keyword to help fix the broken dependencies of
dev-php/PEAR-Date-1.4.3-r1.

*php-4.4.0 (08 Sep 2005)

08 Sep 2005; Stuart Herbert
+files/4.4.0/php4-hphp-acinclude.patch,
+files/5.0.0/php5-hphp-acinclude.patch, php-4.4.0.ebuild, php-5.0.4.ebuild,
php-5.0.5.ebuild:
Hardened-PHP fix from the overlay
Slight change to symlink creation behaviour

07 Sep 2005; Konstantin Arkhipov php-5.0.4.ebuild,
php-5.0.5.ebuild:
Added to ~amd64.

*php-5.0.5 (06 Sep 2005)

06 Sep 2005; Sebastian Bergmann +php-5.0.5.ebuild:
Version bump.

04 Sep 2005; Stuart Herbert
+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:
Added missing patch files for PHP 5.0 from the overlay

05 Sep 2005; ChangeLog:
Initial version; replaces older dev-php/* packages

Manifest

AUX 20php4-envd 145 RMD160 fb57b2d202ab1031303e7525a8ef5b353dc04ef8 SHA1 34ef066d2de22f147fc86bbe884692af7631f726 SHA256 17cd1a952434988b4c2125e4d1eef1df7114809f404605d35f255674419dd5d5
AUX 20php5-envd 145 RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 SHA1 f1cef57c0def8e2c5422aaf136f40b4ff47801d2 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4
AUX 70_mod_php.conf-apache2 454 RMD160 7e99b278a010c958d698454a2aa43e1a351c69e8 SHA1 895e986f880a1dee9b0a45fdcd99ccce44999a6b SHA256 dd7116f3439e06ef2d6126403360c2722355f8481552fdce0cb601af331f81ee
AUX 70_mod_php5.conf-apache2 490 RMD160 745bdb5db622577f473703d5ee8dc7f3c66f8f0c SHA1 7daf9c9ec2e6d108f850981853f9f4f599be0b71 SHA256 5667d06cb7a18c30d11decd28d55b87e36287c76c4d3a450b1cb37271e7fdcd1
AUX 70_mod_php5_concurr.conf-apache2 414 RMD160 1783b6c830119f021c3fb6cb35a631f43c4fa70c SHA1 09f9076f35bc84994fc8c687b4befc0400475f1a SHA256 ccc3bc073eafc83f98049679a411801e80f84620bd51c37c36de2b9ee9492aa2
AUX 70_mod_php_concurr.conf-apache2 329 RMD160 364e071b494b84b78881c566b7c1b46261f62c19 SHA1 9d775784993b46a8be1a7e31f02a3482542385df SHA256 092178aa0cf3272b6411abc85b3820665322598932d249c284a8fa4108d5835a
AUX php4-ldvs 22 RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 SHA1 8c66355dfb80e2ecc6ee6faae30bf7dbb1727651 SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde
AUX php5-ldvs 22 RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 SHA1 592398c92575adb14ec972847ce2aca28a7b9c2c SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79
DIST php-5.2.5.tar.bz2 7773024 RMD160 2d5755f2ae8884e80f0a5c70e8fdfdb6deed46bc SHA1 6b46fd095891183b328163b70cdb5acd30a24b7a SHA256 5cac1e70df5019ebdfdab2e0b8b216f7fdf56b9895c9f68c993313918249bba3
DIST php-5.2.6.tar.bz2 9571312 RMD160 27f730d4b1ceb1c42ff03618dbfa0dc87a00990b SHA1 2a2b1afa657a7739a23784c869d57c3e0a7ad6b4 SHA256 1892b2dd50b56ae2c9aec027fcd9035b76673f113555bc2bc1007bab8ae4db81
DIST php-patchset-5.2.5-r1.tar.bz2 15350 RMD160 777f77e351ed024952f2adf323261db28f98c428 SHA1 d794d02e57ae400cf32638e1168f3dd6d213911b SHA256 50860764cf068465af09acc5ed32ad89f2e8ee0e03b02b2dd70fa19bd1176f10
DIST php-patchset-5.2.6-r7.tar.bz2 26988 RMD160 186e1b132ee8ffc7b9005d0784ef190fe42c0fb0 SHA1 826445f967a31aaa3ec65979ab0aa88861c96c0b SHA256 c6223eb75fbb487a317f715a84b1b40eb0f9e170b7818091edb6d4289a9a4579
DIST php-patchset-5.2.6-r8.tar.bz2 28070 RMD160 74a33ffb6f3437883510161fc7bd57fbfbff4310 SHA1 f57441d6b2e25256811f15a31d088b0c3e0505fc SHA256 58f6d4708c13eb2ff5800a96d7f8b9144bb824093cc444cee0399597e1138f7f
DIST suhosin-patch-5.2.5-0.9.6.2.patch.gz 23157 RMD160 25863ad76bea4a8e5bf50bd916835b5d9324452c SHA1 1102e2e1de922b5199462100a7bbbb7cef5c3f58 SHA256 fd77ccdeb90c83af7492876dda17518de95dd74a5b6feecc5a1bd2c8e322ab53
DIST suhosin-patch-5.2.6-0.9.6.2-r1.patch.gz 22987 RMD160 9c7bc7441e16686382a2b91f68c6e56a84683304 SHA1 0869e555e722615881d6bf1f642d656c53b41bd0 SHA256 40fdd5b92c4e1595250ffc58f317887acd1ef6681e6b6fdca098110c4bfa5bbc
EBUILD php-5.2.5-r1.ebuild 13997 RMD160 e9d8fb469d0e80011f756173029e058279a17bd3 SHA1 225b5ef6e2bb57fe102e6e2e42903913bb3cd898 SHA256 7b05895d96560cdc24b90310169a7da1034d53d8640dd3ba77a07546ae7ea7ab
EBUILD php-5.2.6-r6.ebuild 15511 RMD160 15b73a86cac0bafd5ff4f7726aabfb31a009c660 SHA1 7498ce1432bcd8158a4a95d0c0dc6c9b29bcc3be SHA256 7e681a66bb94d23d723ddc96ffd9edf37333cd6c70f270611a3bb5e235679858
EBUILD php-5.2.6-r7.ebuild 15504 RMD160 ec180e9b321c6b503ac276840d303b7d31395cf9 SHA1 dce480b15dcb400966473da94607eab5271b5e0a SHA256 79ac5e81a18961cd0ff707e0070387502c7ff47933045bb0b826d792f4aa6eba
MISC ChangeLog 53196 RMD160 4bcea31b2e21f8f83d5c450e91fc6a8432c009b5 SHA1 21bd6143db43672e755c68e1e3faa4b379253434 SHA256 1eb677e7d961fadfdd718aeaed056be438bb388db68516ae21533b68266ba9a8
MISC metadata.xml 1474 RMD160 968749dc68a355631d935d56178d35ec4993031e SHA1 927a686ce5ac5be695557cb48e5a506f77e4bda4 SHA256 7829b91b5e61e6c2a03540057b1a4e24b8568f20c9725617197b9a06a708ea2d

files

metadata.xml




php

Enable CLI SAPI
Make it possible to load both mod_php4 and mod_php5 into the same Apache2 instance (experimental)
Switch on common security setting for CGI SAPI
Build PHP quicker (experimental)
Add supports for Adobe's FDF toolkit.
Add filter extension support
Switch on common security setting for CGI SAPI
Enable the hash extension
Use the external java extension rather than the bundled one
Enable JSON support
Add SASL support for the PHP LDAP extension
Enable the bundled PDO extensions
Enable the reflection extension (Reflection API)
Add Suhosin support (patch and extension from http://www.suhosin.org/)
Enable XMLReader support
Enable XMLWriter support
Enable ZIP file support
Enable ZIP file support (external PECL extension)

php-5.2.5-r1.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.5-r1.ebuild,v 1.8 2008/03/23 11:53:04 hollow Exp $

CGI_SAPI_USE="discard-path force-cgi-redirect"
APACHE2_SAPI_USE="concurrentmodphp threads"
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild"

KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"

# 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
PROVIDE="virtual/php virtual/httpd-php"

# php package settings
SLOT="5"
MY_PHP_PV="${PV}"
MY_PHP_P="php-${MY_PHP_PV}"
PHP_PACKAGE="1"

# php patch settings, general
PHP_PATCHSET_REV="1"
SUHOSIN_PATCH="suhosin-patch-${PV}-0.9.6.2.patch.gz"
MULTILIB_PATCH="${MY_PHP_PV}/opt/multilib-search-path.patch"
# php patch settings, ebuild specific
FASTBUILD_PATCH="${MY_PHP_PV}/opt/fastbuild.patch"
CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/concurrent_apache_modules.patch"

inherit versionator php5_2-sapi apache-module

DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs."

DEPEND="app-admin/php-toolkit"
RDEPEND="${DEPEND}"

want_apache

pkg_setup() {
PHPCONFUTILS_AUTO_USE=""

# Make sure the user has specified at least one SAPI
einfo "Determining SAPI(s) to build"
phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2

# Threaded Apache2 support
if use apache2 ; then
has_apache_threads
fi

# Concurrent PHP Apache2 modules support
if use apache2 ; then
if use concurrentmodphp ; then
ewarn
ewarn "'concurrentmodphp' makes it possible to load multiple, differently"
ewarn "versioned mod_php's into the same Apache instance. This is done with"
ewarn "a few linker tricks and workarounds, and is not guaranteed to always"
ewarn "work correctly, so use it at your own risk. Especially, do not use"
ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones"
ewarn "you may find in the Portage tree or the PHP Overlay!"
ewarn "This is an experimental feature, so please rebuild PHP"
ewarn "without the 'concurrentmodphp' USE flag if you experience"
ewarn "any problems, and then reproduce any bugs before filing"
ewarn "them in Gentoo's Bugzilla or bugs.php.net."
ewarn "If you have conclusive evidence that a bug directly"
ewarn "derives from 'concurrentmodphp', please file a bug in"
ewarn "Gentoo's Bugzilla only."
ewarn
ebeep 5
fi
fi

# fastbuild support
if use fastbuild ; then
ewarn
ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
ewarn "This is an experimental feature, so please rebuild PHP"
ewarn "without the 'fastbuild' USE flag if you experience"
ewarn "any problems, and then reproduce any bugs before filing"
ewarn "them in Gentoo's Bugzilla or bugs.php.net."
ewarn "If you have conclusive evidence that a bug directly"
ewarn "derives from 'fastbuild', please file a bug in"
ewarn "Gentoo's Bugzilla only."
ewarn
fi

php5_2-sapi_pkg_setup
}

php_determine_sapis() {
# holds the list of sapis that we want to build
PHPSAPIS=

if use cli || phpconfutils_usecheck cli ; then
PHPSAPIS="${PHPSAPIS} cli"
fi

if use cgi ; then
PHPSAPIS="${PHPSAPIS} cgi"
fi

# note - apache SAPI comes after the simpler cli/cgi sapis
if use apache2 ; then
PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
fi
}

src_unpack() {
if [[ "${PHP_PACKAGE}" == 1 ]] ; then
unpack ${A}
fi

cd "${S}"

# Concurrent PHP Apache2 modules support
if use apache2 ; then
if use concurrentmodphp ; then
if [[ -n "${CONCURRENTMODPHP_PATCH}" ]] && [[ -f "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" ]] ; then
epatch "${WORKDIR}/${CONCURRENTMODPHP_PATCH}"
else
ewarn "There is no concurrent mod_php patch available for this PHP release yet!"
fi
fi
fi

# fastbuild support
if use fastbuild ; then
if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then
epatch "${WORKDIR}/${FASTBUILD_PATCH}"
else
ewarn "There is no fastbuild patch available for this PHP release yet!"
fi
fi

# Now let the eclass do the rest and regenerate the configure
php5_2-sapi_src_unpack

# Fix Makefile.global:test to consider the CGI SAPI if present
if use cgi ; then
sed -e "s|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\"|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\" \&\& test \! -z \"\$(top_builddir)/php-cgi\" \&\& test -x \"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
sed -e "s|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\"|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\" TEST_PHP_CGI_EXECUTABLE=\"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
fi

# try to fix some test cases which fail because of sandbox otherwise
sed -e 's:/no/such/:.\0:' -i ext/standard/tests/file/005_error.phpt \
ext/standard/tests/file/006_error.phpt \
ext/standard/tests/file/touch.phpt

# REMOVING BROKEN TESTS:
# removing this test as it has been broken for ages and is not easily
# fixable (depends on a lot of factors)
rm ext/standard/tests/general_functions/phpinfo.phpt

# never worked properly, no easy fix
rm ext/iconv/tests/bug16069.phpt ext/iconv/tests/iconv_stream_filter.phpt
}

src_compile() {
if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then
src_compile_fastbuild
else
src_compile_normal
fi
}

src_compile_fastbuild() {
php_determine_sapis

build_cli=0
build_cgi=0
build_apache2=0
my_conf=""

for x in ${PHPSAPIS} ; do
case ${x} in
cli)
build_cli=1
;;
cgi)
build_cgi=1
;;
apache2)
build_apache2=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"
phpconfutils_extension_enable "discard-path" "discard-path" 0
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
else
my_conf="${my_conf} --disable-cgi"
fi

if [[ ${build_apache2} = 1 ]] ; then
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"

# Threaded Apache2 support
if use threads ; then
my_conf="${my_conf} --enable-maintainer-zts"
ewarn "Enabling ZTS for Apache2 MPM"
fi

# Concurrent PHP Apache2 modules support
if use concurrentmodphp ; then
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
fi
fi

# Now we know what we are building, build it
php5_2-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-php5"|g;' -i main/build-defs.h
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php5/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-php5"|g;' -i main/build-defs.h
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php5/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-cgi || die "Unable to make CGI SAPI"
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
fi

if [[ ${build_apache2} = 1 ]] ; then
einfo
einfo "Building apache${APACHE_VERSION} SAPI"
einfo

sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php5\"|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}-php5/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 make apache${APACHE_VERSION} SAPI"
fi
}

src_compile_normal() {
php_determine_sapis

CLEAN_REQUIRED=0
my_conf=""

# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
if use apache2 ; then
# Concurrent PHP Apache2 modules support
if use concurrentmodphp ; then
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
fi
fi

for x in ${PHPSAPIS} ; do
# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
if use apache2 ; then
# Threaded Apache2 support
if use threads ; then
my_conf="${my_conf} --enable-maintainer-zts"
ewarn "Enabling ZTS for Apache2 MPM"
fi
fi

if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
make clean
fi

PHPSAPI="${x}"

case ${x} in
cli)
my_conf="${my_conf} --enable-cli --disable-cgi"
php5_2-sapi_src_compile
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
;;
cgi)
my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi"
phpconfutils_extension_enable "discard-path" "discard-path" 0
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
php5_2-sapi_src_compile
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
;;
apache2)
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
php5_2-sapi_src_compile
;;
esac

CLEAN_REQUIRED=1
my_conf=""
done
}

src_install() {
php_determine_sapis

destdir=/usr/$(get_libdir)/php5

# Let the eclass do the common work
php5_2-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_2-sapi_install_ini
;;
cgi)
einfo "Installing CGI SAPI"
into ${destdir}
dobin php-cgi || die "Unable to install ${x} sapi"
php5_2-sapi_install_ini
;;
apache2)
einfo "Installing Apache${APACHE_VERSION} SAPI"
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
if use concurrentmodphp ; then
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)"
insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf"

# Put the ld version script in the right place so it's always accessible
insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
doins "${FILESDIR}/php5-ldvs"

# Redefine the extension dir to have the modphp suffix
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned"
else
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
fi
php5_2-sapi_install_ini
;;
esac
done

# Install env.d files
newenvd "${FILESDIR}/20php5-envd" "20php5"
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5"
}

pkg_postinst() {
# Output some general info to the user
if use apache2 ; then
APACHE2_MOD_DEFINE="PHP5"
if use concurrentmodphp ; then
APACHE2_MOD_CONF="70_mod_php5_concurr"
else
APACHE2_MOD_CONF="70_mod_php5"
fi
apache-module_pkg_postinst
fi

# Update Apache2 to use mod_php
if use apache2 ; then
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 2 ]] ; then
php-select apache2 php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "Apache2 is configured to load a different version of PHP."
ewarn "To make Apache2 use PHP v5, use php-select:"
ewarn
ewarn " php-select apache2 php5"
ewarn
fi
fi

# Create the symlinks for php-cli
if use cli || phpconfutils_usecheck cli ; then
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 5 ]] ; then
php-select php php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "/usr/bin/php links to a different version of PHP."
ewarn "To make /usr/bin/php point to PHP v5, use php-select:"
ewarn
ewarn " php-select php php5"
ewarn
fi
fi

# Create the symlinks for php-cgi
if use cgi ; then
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 5 ]] ; then
php-select php-cgi php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "/usr/bin/php-cgi links to a different version of PHP."
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:"
ewarn
ewarn " php-select php-cgi php5"
ewarn
fi
fi

# Create the symlinks for php-devel
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1
exitStatus=$?
if [[ $exitStatus == 5 ]] ; then
php-select php-devel php5
elif [[ $exitStatus == 4 ]] ; then
ewarn
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a"
ewarn "different version of PHP. To make them point to PHP v5, use"
ewarn "php-select:"
ewarn
ewarn " php-select php-devel php5"
ewarn
fi

php5_2-sapi_pkg_postinst
}

src_test() {
vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
if ! use cli; then
einfo "Skipping tests as PHP was built without CLI support"
return
fi
REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php \
TEST_PHP_CGI_EXECUTABLE=./sapi/cgi/php-cgi ./sapi/cli/php -n ./run-tests.php -n
if [[ $? != 0 ]] ; then
eerror "Some tests failed!"
fi
}

php-5.2.6-r6.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.6-r6.ebuild,v 1.8 2008/08/08 19:22:11 dertobi123 Exp $

CGI_SAPI_USE="discard-path force-cgi-redirect"
APACHE2_SAPI_USE="concurrentmodphp threads"
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild"

KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"

# 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
PROVIDE="virtual/php virtual/httpd-php"

# php package settings
SLOT="5"
MY_PHP_PV="${PV}"
MY_PHP_P="php-${MY_PHP_PV}"
PHP_PACKAGE="1"

# php patch settings, general
PHP_PATCHSET_REV="7"
SUHOSIN_PATCH="suhosin-patch-5.2.6-0.9.6.2-r1.patch.gz"
MULTILIB_PATCH="${MY_PHP_PV}/opt/multilib-search-path.patch"
# php patch settings, ebuild specific
FASTBUILD_PATCH="${MY_PHP_PV}/opt/fastbuild.patch"
CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/concurrent_apache_modules.patch"
# kolab patch - http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/patches/php/
# bugs about this go to wrobel@gentoo.org
KOLAB_PATCH="${MY_PHP_PV}/opt/kolab-imap-annotations.patch"

inherit versionator php5_2-sapi apache-module

SRC_URI="http://home.hoffie.info/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2
${SRC_URI}"

# Suhosin patch support
[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )"

DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs."

DEPEND="app-admin/php-toolkit
imap? ( >=virtual/imap-c-client-2006k )"
RDEPEND="${DEPEND}"
if [[ -n "${KOLAB_PATCH}" ]] ; then
IUSE="${IUSE} kolab"
DEPEND="${DEPEND}
kolab? ( >=net-libs/c-client-2004g-r1 )"
fi

want_apache

pkg_setup() {
PHPCONFUTILS_AUTO_USE=""

# Make sure the user has specified at least one SAPI
einfo "Determining SAPI(s) to build"
phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2

# Threaded Apache2 support
if use apache2 ; then
has_apache_threads
fi

# Concurrent PHP Apache2 modules support
if use apache2 ; then
if use concurrentmodphp ; then
ewarn
ewarn "'concurrentmodphp' makes it possible to load multiple, differently"
ewarn "versioned mod_php's into the same Apache instance. This is done with"
ewarn "a few linker tricks and workarounds, and is not guaranteed to always"
ewarn "work correctly, so use it at your own risk. Especially, do not use"
ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones"
ewarn "you may find in the Portage tree or the PHP Overlay!"
ewarn "This is an experimental feature, so please rebuild PHP"
ewarn "without the 'concurrentmodphp' USE flag if you experience"
ewarn "any problems, and then reproduce any bugs before filing"
ewarn "them in Gentoo's Bugzilla or bugs.php.net."
ewarn "If you have conclusive evidence that a bug directly"
ewarn "derives from 'concurrentmodphp', please file a bug in"
ewarn "Gentoo's Bugzilla only."
ewarn
ebeep 5
fi
fi

# fastbuild support
if use fastbuild ; then
ewarn
ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
ewarn "This is an experimental feature, so please rebuild PHP"
ewarn "without the 'fastbuild' USE flag if you experience"
ewarn "any problems, and then reproduce any bugs before filing"
ewarn "them in Gentoo's Bugzilla or bugs.php.net."
ewarn "If you have conclusive evidence that a bug directly"
ewarn "derives from 'fastbuild', please file a bug in"
ewarn "Gentoo's Bugzilla only."
ewarn
fi

php5_2-sapi_pkg_setup
}

php_determine_sapis() {
# holds the list of sapis that we want to build
PHPSAPIS=

if use cli || phpconfutils_usecheck cli ; then
PHPSAPIS="${PHPSAPIS} cli"
fi

if use cgi ; then
PHPSAPIS="${PHPSAPIS} cgi"
fi

# note - apache SAPI comes after the simpler cli/cgi sapis
if use apache2 ; then
PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
fi
}

src_unpack() {
if [[ "${PHP_PACKAGE}" == 1 ]] ; then
unpack ${A}
fi

cd "${S}"

# Concurrent PHP Apache2 modules support
if use apache2 ; then
if use concurrentmodphp ; then
if [[ -n "${CONCURRENTMODPHP_PATCH}" ]] && [[ -f "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" ]] ; then
epatch "${WORKDIR}/${CONCURRENTMODPHP_PATCH}"
else
ewarn "There is no concurrent mod_php patch available for this PHP release yet!"
fi
fi
fi

# fastbuild support
if use fastbuild ; then
if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then
epatch "${WORKDIR}/${FASTBUILD_PATCH}"
else
ewarn "There is no fastbuild patch available for this PHP release yet!"
fi
fi

# kolab support
if [[ -n "${KOLAB_PATCH}" ]] ; then
use kolab && epatch "${WORKDIR}/${KOLAB_PATCH}"
fi

# pretend to not have flex, bug 221357
sed -re 's:( +)PHP_SUBST\(LEX\):\1LEX="exit 0;"\n\0:' -i acinclude.m4

# Now let the eclass do the rest and regenerate the configure
php5_2-sapi_src_unpack

# Fix Makefile.global:test to consider the CGI SAPI if present
if use cgi ; then
sed -e "s|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\"|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\" \&\& test \! -z \"\$(top_builddir)/php-cgi\" \&\& test -x \"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
sed -e "s|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\"|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\" TEST_PHP_CGI_EXECUTABLE=\"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
fi

# try to fix some test cases which fail because of sandbox otherwise
sed -e 's:/no/such/:.\0:' -i ext/standard/tests/file/005_error.phpt \
ext/standard/tests/file/006_error.phpt \
ext/standard/tests/file/touch.phpt

# REMOVING BROKEN TESTS:
# removing this test as it has been broken for ages and is not easily
# fixable (depends on a lot of factors)
rm ext/standard/tests/general_functions/phpinfo.phpt

# never worked properly, no easy fix
rm ext/iconv/tests/bug16069.phpt ext/iconv/tests/iconv_stream_filter.phpt

# needs write access to /tmp and others
rm ext/session/tests/session_save_path_variation5.phpt

# sandbox-related (sandbox checks for permissions before even looking
# at the fs, but the tests expect "No such file or directory"
sed -e 's:/blah:./bla:' -i \
ext/session/tests/session_save_path_variation{2,3}.phpt

# these tests behave differently with suhosin enabled, adapting them...
use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
ext/standard/tests/file/open_basedir*{.inc,.phpt}
}

src_compile() {
# bug 217392 (autconf-2.62 behavior changes)
export CFLAGS="${CFLAGS} -D_GNU_SOURCE"
export CXXFLAGS="${CXXFLAGS} -D_GNU_SOURCE"
if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then
src_compile_fastbuild
else
src_compile_normal
fi
}

src_compile_fastbuild() {
php_determine_sapis

build_cli=0
build_cgi=0
build_apache2=0
my_conf=""

for x in ${PHPSAPIS} ; do
case ${x} in
cli)
build_cli=1
;;
cgi)
build_cgi=1
;;
apache2)
build_apache2=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"
phpconfutils_extension_enable "discard-path" "discard-path" 0
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
else
my_conf="${my_conf} --disable-cgi"
fi

if [[ ${build_apache2} = 1 ]] ; then
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"

# Threaded Apache2 support
if use threads ; then
my_conf="${my_conf} --enable-maintainer-zts"
ewarn "Enabling ZTS for Apache2 MPM"
fi

# Concurrent PHP Apache2 modules support
if use concurrentmodphp ; then
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
fi
fi

# Now we know what we are building, build it
php5_2-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-php5"|g;' -i main/build-defs.h
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php5/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-php5"|g;' -i main/build-defs.h
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php5/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-cgi || die "Unable to make CGI SAPI"
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
fi

if [[ ${build_apache2} = 1 ]] ; then
einfo
einfo "Building apache${APACHE_VERSION} SAPI"
einfo

sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php5\"|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}-php5/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 make apache${APACHE_VERSION} SAPI"
fi
}

src_compile_normal() {
php_determine_sapis

CLEAN_REQUIRED=0
my_conf=""

# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
if use apache2 ; then
# Concurrent PHP Apache2 modules support
if use concurrentmodphp ; then
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
fi
fi

for x in ${PHPSAPIS} ; do
# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
if use apache2 ; then
# Threaded Apache2 support
if use threads ; then
my_conf="${my_conf} --enable-maintainer-zts"
ewarn "Enabling ZTS for Apache2 MPM"
fi
fi

if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
make clean
fi

PHPSAPI="${x}"

case ${x} in
cli)
my_conf="${my_conf} --enable-cli --disable-cgi"
php5_2-sapi_src_compile
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
;;
cgi)
my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi"
phpconfutils_extension_enable "discard-path" "discard-path" 0
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
php5_2-sapi_src_compile
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
;;
apache2)
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
php5_2-sapi_src_compile
;;
esac

CLEAN_REQUIRED=1
my_conf=""
done
}

src_install() {
php_determine_sapis

destdir=/usr/$(get_libdir)/php5

# Let the eclass do the common work
php5_2-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_2-sapi_install_ini
;;
cgi)
einfo "Installing CGI SAPI"
into ${destdir}
dobin php-cgi || die "Unable to install ${x} sapi"
php5_2-sapi_install_ini
;;
apache2)
einfo "Installing Apache${APACHE_VERSION} SAPI"
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
if use concurrentmodphp ; then
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)"
insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf"

# Put the ld version script in the right place so it's always accessible
insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
doins "${FILESDIR}/php5-ldvs"

# Redefine the extension dir to have the modphp suffix
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned"
else
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
fi
php5_2-sapi_install_ini
;;
esac
done

# Install env.d files
newenvd "${FILESDIR}/20php5-envd" "20php5"
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5"
}

pkg_postinst() {
# Output some general info to the user
if use apache2 ; then
APACHE2_MOD_DEFINE="PHP5"
if use concurrentmodphp ; then
APACHE2_MOD_CONF="70_mod_php5_concurr"
else
APACHE2_MOD_CONF="70_mod_php5"
fi
apache-module_pkg_postinst
fi

# Update Apache2 to use mod_php
if use apache2 ; then
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 2 ]] ; then
php-select apache2 php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "Apache2 is configured to load a different version of PHP."
ewarn "To make Apache2 use PHP v5, use php-select:"
ewarn
ewarn " php-select apache2 php5"
ewarn
fi
fi

# Create the symlinks for php-cli
if use cli || phpconfutils_usecheck cli ; then
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 5 ]] ; then
php-select php php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "/usr/bin/php links to a different version of PHP."
ewarn "To make /usr/bin/php point to PHP v5, use php-select:"
ewarn
ewarn " php-select php php5"
ewarn
fi
fi

# Create the symlinks for php-cgi
if use cgi ; then
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 5 ]] ; then
php-select php-cgi php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "/usr/bin/php-cgi links to a different version of PHP."
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:"
ewarn
ewarn " php-select php-cgi php5"
ewarn
fi
fi

# Create the symlinks for php-devel
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1
exitStatus=$?
if [[ $exitStatus == 5 ]] ; then
php-select php-devel php5
elif [[ $exitStatus == 4 ]] ; then
ewarn
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a"
ewarn "different version of PHP. To make them point to PHP v5, use"
ewarn "php-select:"
ewarn
ewarn " php-select php-devel php5"
ewarn
fi

php5_2-sapi_pkg_postinst
}

src_test() {
vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
if [[ ! -x "${S}"/php-cli ]]; then
ewarn "Running the php test suite requires USE=cli"
return
fi

export TEST_PHP_EXECUTABLE="${S}"/php-cli
if [[ -x "${S}"/php-cgi ]]; then
export TEST_PHP_CGI_EXECUTABLE="${S}"/php-cgi
fi
REPORT_EXIT_STATUS=1 "${S}"/php-cli -n "${S}"/run-tests.php -n

if [[ $? != 0 ]] ; then
eerror "Not all tests were successful!"
fi
}

php-5.2.6-r7.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.6-r7.ebuild,v 1.6 2008/09/22 03:26:54 jer Exp $

CGI_SAPI_USE="discard-path force-cgi-redirect"
APACHE2_SAPI_USE="concurrentmodphp threads"
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild"

KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"

# 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
PROVIDE="virtual/php virtual/httpd-php"

# php package settings
SLOT="5"
MY_PHP_PV="${PV}"
MY_PHP_P="php-${MY_PHP_PV}"
PHP_PACKAGE="1"

# php patch settings, general
PHP_PATCHSET_REV="8"
SUHOSIN_PATCH="suhosin-patch-5.2.6-0.9.6.2-r1.patch.gz"
MULTILIB_PATCH="${MY_PHP_PV}/opt/multilib-search-path.patch"
# php patch settings, ebuild specific
FASTBUILD_PATCH="${MY_PHP_PV}/opt/fastbuild.patch"
CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/concurrent_apache_modules.patch"
# kolab patch - http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/patches/php/
# bugs about this go to wrobel@gentoo.org
KOLAB_PATCH="${MY_PHP_PV}/opt/kolab-imap-annotations.patch"

inherit versionator php5_2-sapi apache-module

SRC_URI="http://home.hoffie.info/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2
${SRC_URI}"

# Suhosin patch support
[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )"

DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs."

DEPEND="app-admin/php-toolkit
imap? ( >=virtual/imap-c-client-2006k )"
RDEPEND="${DEPEND}"
if [[ -n "${KOLAB_PATCH}" ]] ; then
IUSE="${IUSE} kolab"
DEPEND="${DEPEND}
kolab? ( >=net-libs/c-client-2004g-r1 )"
fi

want_apache

pkg_setup() {
PHPCONFUTILS_AUTO_USE=""

# Make sure the user has specified at least one SAPI
einfo "Determining SAPI(s) to build"
phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2

# Threaded Apache2 support
if use apache2 ; then
has_apache_threads
fi

# Concurrent PHP Apache2 modules support
if use apache2 ; then
if use concurrentmodphp ; then
ewarn
ewarn "'concurrentmodphp' makes it possible to load multiple, differently"
ewarn "versioned mod_php's into the same Apache instance. This is done with"
ewarn "a few linker tricks and workarounds, and is not guaranteed to always"
ewarn "work correctly, so use it at your own risk. Especially, do not use"
ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones"
ewarn "you may find in the Portage tree or the PHP Overlay!"
ewarn "This is an experimental feature, so please rebuild PHP"
ewarn "without the 'concurrentmodphp' USE flag if you experience"
ewarn "any problems, and then reproduce any bugs before filing"
ewarn "them in Gentoo's Bugzilla or bugs.php.net."
ewarn "If you have conclusive evidence that a bug directly"
ewarn "derives from 'concurrentmodphp', please file a bug in"
ewarn "Gentoo's Bugzilla only."
ewarn
ebeep 5
fi
fi

# fastbuild support
if use fastbuild ; then
ewarn
ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
ewarn "This is an experimental feature, so please rebuild PHP"
ewarn "without the 'fastbuild' USE flag if you experience"
ewarn "any problems, and then reproduce any bugs before filing"
ewarn "them in Gentoo's Bugzilla or bugs.php.net."
ewarn "If you have conclusive evidence that a bug directly"
ewarn "derives from 'fastbuild', please file a bug in"
ewarn "Gentoo's Bugzilla only."
ewarn
fi

php5_2-sapi_pkg_setup
}

php_determine_sapis() {
# holds the list of sapis that we want to build
PHPSAPIS=

if use cli || phpconfutils_usecheck cli ; then
PHPSAPIS="${PHPSAPIS} cli"
fi

if use cgi ; then
PHPSAPIS="${PHPSAPIS} cgi"
fi

# note - apache SAPI comes after the simpler cli/cgi sapis
if use apache2 ; then
PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
fi
}

src_unpack() {
if [[ "${PHP_PACKAGE}" == 1 ]] ; then
unpack ${A}
fi

cd "${S}"

# Concurrent PHP Apache2 modules support
if use apache2 ; then
if use concurrentmodphp ; then
if [[ -n "${CONCURRENTMODPHP_PATCH}" ]] && [[ -f "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" ]] ; then
epatch "${WORKDIR}/${CONCURRENTMODPHP_PATCH}"
else
ewarn "There is no concurrent mod_php patch available for this PHP release yet!"
fi
fi
fi

# fastbuild support
if use fastbuild ; then
if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then
epatch "${WORKDIR}/${FASTBUILD_PATCH}"
else
ewarn "There is no fastbuild patch available for this PHP release yet!"
fi
fi

# kolab support
if [[ -n "${KOLAB_PATCH}" ]] ; then
use kolab && epatch "${WORKDIR}/${KOLAB_PATCH}"
fi

# pretend to not have flex, bug 221357
sed -re 's:( +)PHP_SUBST\(LEX\):\1LEX="exit 0;"\n\0:' -i acinclude.m4

# Now let the eclass do the rest and regenerate the configure
php5_2-sapi_src_unpack

# Fix Makefile.global:test to consider the CGI SAPI if present
if use cgi ; then
sed -e "s|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\"|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\" \&\& test \! -z \"\$(top_builddir)/php-cgi\" \&\& test -x \"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
sed -e "s|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\"|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\" TEST_PHP_CGI_EXECUTABLE=\"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
fi

# try to fix some test cases which fail because of sandbox otherwise
sed -e 's:/no/such/:.\0:' -i ext/standard/tests/file/005_error.phpt \
ext/standard/tests/file/006_error.phpt \
ext/standard/tests/file/touch.phpt

# REMOVING BROKEN TESTS:
# removing this test as it has been broken for ages and is not easily
# fixable (depends on a lot of factors)
rm ext/standard/tests/general_functions/phpinfo.phpt

# never worked properly, no easy fix
rm ext/iconv/tests/bug16069.phpt ext/iconv/tests/iconv_stream_filter.phpt

# needs write access to /tmp and others
rm ext/session/tests/session_save_path_variation5.phpt

# sandbox-related (sandbox checks for permissions before even looking
# at the fs, but the tests expect "No such file or directory"
sed -e 's:/blah:./bla:' -i \
ext/session/tests/session_save_path_variation{2,3}.phpt

# these tests behave differently with suhosin enabled, adapting them...
use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
ext/standard/tests/file/open_basedir*{.inc,.phpt}
}

src_compile() {
# bug 217392 (autconf-2.62 behavior changes)
export CFLAGS="${CFLAGS} -D_GNU_SOURCE"
export CXXFLAGS="${CXXFLAGS} -D_GNU_SOURCE"
if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then
src_compile_fastbuild
else
src_compile_normal
fi
}

src_compile_fastbuild() {
php_determine_sapis

build_cli=0
build_cgi=0
build_apache2=0
my_conf=""

for x in ${PHPSAPIS} ; do
case ${x} in
cli)
build_cli=1
;;
cgi)
build_cgi=1
;;
apache2)
build_apache2=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"
phpconfutils_extension_enable "discard-path" "discard-path" 0
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
else
my_conf="${my_conf} --disable-cgi"
fi

if [[ ${build_apache2} = 1 ]] ; then
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"

# Threaded Apache2 support
if use threads ; then
my_conf="${my_conf} --enable-maintainer-zts"
ewarn "Enabling ZTS for Apache2 MPM"
fi

# Concurrent PHP Apache2 modules support
if use concurrentmodphp ; then
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
fi
fi

# Now we know what we are building, build it
php5_2-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-php5"|g;' -i main/build-defs.h
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php5/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-php5"|g;' -i main/build-defs.h
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php5/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-cgi || die "Unable to make CGI SAPI"
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
fi

if [[ ${build_apache2} = 1 ]] ; then
einfo
einfo "Building apache${APACHE_VERSION} SAPI"
einfo

sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php5\"|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}-php5/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 make apache${APACHE_VERSION} SAPI"
fi
}

src_compile_normal() {
php_determine_sapis

CLEAN_REQUIRED=0
my_conf=""

# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
if use apache2 ; then
# Concurrent PHP Apache2 modules support
if use concurrentmodphp ; then
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
fi
fi

for x in ${PHPSAPIS} ; do
# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
if use apache2 ; then
# Threaded Apache2 support
if use threads ; then
my_conf="${my_conf} --enable-maintainer-zts"
ewarn "Enabling ZTS for Apache2 MPM"
fi
fi

if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
make clean
fi

PHPSAPI="${x}"

case ${x} in
cli)
my_conf="${my_conf} --enable-cli --disable-cgi"
php5_2-sapi_src_compile
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
;;
cgi)
my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi"
phpconfutils_extension_enable "discard-path" "discard-path" 0
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
php5_2-sapi_src_compile
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
;;
apache2)
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
php5_2-sapi_src_compile
;;
esac

CLEAN_REQUIRED=1
my_conf=""
done
}

src_install() {
php_determine_sapis

destdir=/usr/$(get_libdir)/php5

# Let the eclass do the common work
php5_2-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_2-sapi_install_ini
;;
cgi)
einfo "Installing CGI SAPI"
into ${destdir}
dobin php-cgi || die "Unable to install ${x} sapi"
php5_2-sapi_install_ini
;;
apache2)
einfo "Installing Apache${APACHE_VERSION} SAPI"
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
if use concurrentmodphp ; then
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)"
insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf"

# Put the ld version script in the right place so it's always accessible
insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
doins "${FILESDIR}/php5-ldvs"

# Redefine the extension dir to have the modphp suffix
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned"
else
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
fi
php5_2-sapi_install_ini
;;
esac
done

# Install env.d files
newenvd "${FILESDIR}/20php5-envd" "20php5"
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5"
}

pkg_postinst() {
# Output some general info to the user
if use apache2 ; then
APACHE2_MOD_DEFINE="PHP5"
if use concurrentmodphp ; then
APACHE2_MOD_CONF="70_mod_php5_concurr"
else
APACHE2_MOD_CONF="70_mod_php5"
fi
apache-module_pkg_postinst
fi

# Update Apache2 to use mod_php
if use apache2 ; then
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 2 ]] ; then
php-select apache2 php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "Apache2 is configured to load a different version of PHP."
ewarn "To make Apache2 use PHP v5, use php-select:"
ewarn
ewarn " php-select apache2 php5"
ewarn
fi
fi

# Create the symlinks for php-cli
if use cli || phpconfutils_usecheck cli ; then
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 5 ]] ; then
php-select php php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "/usr/bin/php links to a different version of PHP."
ewarn "To make /usr/bin/php point to PHP v5, use php-select:"
ewarn
ewarn " php-select php php5"
ewarn
fi
fi

# Create the symlinks for php-cgi
if use cgi ; then
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1
exitStatus=$?
if [[ ${exitStatus} == 5 ]] ; then
php-select php-cgi php5
elif [[ ${exitStatus} == 4 ]] ; then
ewarn
ewarn "/usr/bin/php-cgi links to a different version of PHP."
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:"
ewarn
ewarn " php-select php-cgi php5"
ewarn
fi
fi

# Create the symlinks for php-devel
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1
exitStatus=$?
if [[ $exitStatus == 5 ]] ; then
php-select php-devel php5
elif [[ $exitStatus == 4 ]] ; then
ewarn
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a"
ewarn "different version of PHP. To make them point to PHP v5, use"
ewarn "php-select:"
ewarn
ewarn " php-select php-devel php5"
ewarn
fi

php5_2-sapi_pkg_postinst
}

src_test() {
vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
if [[ ! -x "${S}"/php-cli ]]; then
ewarn "Running the php test suite requires USE=cli"
return
fi

export TEST_PHP_EXECUTABLE="${S}"/php-cli
if [[ -x "${S}"/php-cgi ]]; then
export TEST_PHP_CGI_EXECUTABLE="${S}"/php-cgi
fi
REPORT_EXIT_STATUS=1 "${S}"/php-cli -n "${S}"/run-tests.php -n

if [[ $? != 0 ]] ; then
eerror "Not all tests were successful!"
fi
}