summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Darlow <mail@mcgruff.plus.com>2012-07-02 01:26:30 +0100
committerNoel Darlow <mail@mcgruff.plus.com>2012-07-02 01:26:30 +0100
commit5b54caac764dd2e608ad111f819871dd2818a277 (patch)
tree1e5c4dd3b2b4c952675847394aa2ce81262ee29a
parent3 (diff)
downloadunderlay-5b54caac764dd2e608ad111f819871dd2818a277.tar.gz
underlay-5b54caac764dd2e608ad111f819871dd2818a277.tar.bz2
underlay-5b54caac764dd2e608ad111f819871dd2818a277.zip
still trying..
-rw-r--r--dev-lang/php/CVS/Entries193
-rw-r--r--dev-lang/php/CVS/Repository1
-rw-r--r--dev-lang/php/CVS/Root1
-rw-r--r--dev-lang/php/CVS/Tag1
-rw-r--r--dev-lang/php/ChangeLog13
-rw-r--r--dev-lang/php/Manifest162
-rw-r--r--dev-lang/php/files/.frozen1
-rw-r--r--dev-lang/php/files/20php4-envd2
-rw-r--r--dev-lang/php/files/20php5-envd2
-rw-r--r--dev-lang/php/files/4-any/CVS/Entries8
-rw-r--r--dev-lang/php/files/4-any/CVS/Repository1
-rw-r--r--dev-lang/php/files/4-any/CVS/Root1
-rw-r--r--dev-lang/php/files/4-any/CVS/Tag1
-rw-r--r--dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf19
-rw-r--r--dev-lang/php/files/4-any/apache-1.3/CVS/Entries2
-rw-r--r--dev-lang/php/files/4-any/apache-1.3/CVS/Repository1
-rw-r--r--dev-lang/php/files/4-any/apache-1.3/CVS/Root1
-rw-r--r--dev-lang/php/files/4-any/apache-1.3/CVS/Tag1
-rw-r--r--dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf19
-rw-r--r--dev-lang/php/files/4-any/apache-2.0/CVS/Entries2
-rw-r--r--dev-lang/php/files/4-any/apache-2.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/4-any/apache-2.0/CVS/Root1
-rw-r--r--dev-lang/php/files/4-any/apache-2.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/4-any/php4-fastbuild.patch250
-rw-r--r--dev-lang/php/files/4-any/php4-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/4-any/php4-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/4-any/php4-libtool-1.5.patch19
-rw-r--r--dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch30
-rw-r--r--dev-lang/php/files/4-any/php4-with-iodbc.diff13
-rw-r--r--dev-lang/php/files/4.3.11/CVS/Entries15
-rw-r--r--dev-lang/php/files/4.3.11/CVS/Repository1
-rw-r--r--dev-lang/php/files/4.3.11/CVS/Root1
-rw-r--r--dev-lang/php/files/4.3.11/CVS/Tag1
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch170
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch33
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch143
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-curl_safemode.patch141
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch46
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch131
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch39
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch559
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch151
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch1488
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch20
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch75
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch317
-rw-r--r--dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch154
-rw-r--r--dev-lang/php/files/4.4.0/CVS/Entries17
-rw-r--r--dev-lang/php/files/4.4.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/4.4.0/CVS/Root1
-rw-r--r--dev-lang/php/files/4.4.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf19
-rw-r--r--dev-lang/php/files/4.4.0/apache-1.3/CVS/Entries2
-rw-r--r--dev-lang/php/files/4.4.0/apache-1.3/CVS/Repository1
-rw-r--r--dev-lang/php/files/4.4.0/apache-1.3/CVS/Root1
-rw-r--r--dev-lang/php/files/4.4.0/apache-1.3/CVS/Tag1
-rw-r--r--dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf19
-rw-r--r--dev-lang/php/files/4.4.0/apache-2.0/CVS/Entries2
-rw-r--r--dev-lang/php/files/4.4.0/apache-2.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/4.4.0/apache-2.0/CVS/Root1
-rw-r--r--dev-lang/php/files/4.4.0/apache-2.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/4.4.0/fastbuild.patch250
-rw-r--r--dev-lang/php/files/4.4.0/php4-hphp-acinclude.patch19
-rw-r--r--dev-lang/php/files/4.4.0/php4-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/4.4.0/php4-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/4.4.0/php4-libtool-1.5.patch19
-rw-r--r--dev-lang/php/files/4.4.0/php4-with-iodbc.diff13
-rw-r--r--dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch38
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-curl_safemode.patch46
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch46
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch20
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-globals_overwrite.patch314
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch38
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-phpinfo_xss.patch42
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch317
-rw-r--r--dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch127
-rw-r--r--dev-lang/php/files/4.4.1/CVS/Entries8
-rw-r--r--dev-lang/php/files/4.4.1/CVS/Repository1
-rw-r--r--dev-lang/php/files/4.4.1/CVS/Root1
-rw-r--r--dev-lang/php/files/4.4.1/CVS/Tag1
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch51
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch20
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch22
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch112
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch145
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-mod_rewrite-crash.patch20
-rw-r--r--dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch1488
-rw-r--r--dev-lang/php/files/5.0-any/CVS/Entries8
-rw-r--r--dev-lang/php/files/5.0-any/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.0-any/CVS/Root1
-rw-r--r--dev-lang/php/files/5.0-any/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.0-any/apache-1.3/CVS/Entries2
-rw-r--r--dev-lang/php/files/5.0-any/apache-1.3/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.0-any/apache-1.3/CVS/Root1
-rw-r--r--dev-lang/php/files/5.0-any/apache-1.3/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.0-any/apache-2.0/CVS/Entries2
-rw-r--r--dev-lang/php/files/5.0-any/apache-2.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.0-any/apache-2.0/CVS/Root1
-rw-r--r--dev-lang/php/files/5.0-any/apache-2.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.0-any/php5-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/5.0-any/php5-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/5.0-any/php5-libtool-1.5.patch19
-rw-r--r--dev-lang/php/files/5.0-any/php5-prefork.patch26
-rw-r--r--dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff35
-rw-r--r--dev-lang/php/files/5.0-any/php5-with-iodbc.diff13
-rw-r--r--dev-lang/php/files/5.0.0/CVS/Entries8
-rw-r--r--dev-lang/php/files/5.0.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.0.0/CVS/Root1
-rw-r--r--dev-lang/php/files/5.0.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.0.0/php5-hphp-acinclude.patch19
-rw-r--r--dev-lang/php/files/5.0.0/php5-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/5.0.0/php5-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/5.0.0/php5-libtool-1.5.patch19
-rw-r--r--dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch38
-rw-r--r--dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff23
-rw-r--r--dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch42
-rw-r--r--dev-lang/php/files/5.0.4/CVS/Entries10
-rw-r--r--dev-lang/php/files/5.0.4/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.0.4/CVS/Root1
-rw-r--r--dev-lang/php/files/5.0.4/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-curl_safemode.patch161
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch46
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch29
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-globals_overwrite.patch1013
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch20
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-phpinfo_xss.patch79
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch320
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch164
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff23
-rw-r--r--dev-lang/php/files/5.0.5/CVS/Entries14
-rw-r--r--dev-lang/php/files/5.0.5/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.0.5/CVS/Root1
-rw-r--r--dev-lang/php/files/5.0.5/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch139
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch48
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-curl_safemode.patch46
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch22
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch95
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch20
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch203
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch133
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch1372
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch42
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch320
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch123
-rw-r--r--dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch11
-rw-r--r--dev-lang/php/files/5.1-any/CVS/Entries8
-rw-r--r--dev-lang/php/files/5.1-any/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1-any/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1-any/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.1-any/apache-1.3/CVS/Entries2
-rw-r--r--dev-lang/php/files/5.1-any/apache-1.3/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1-any/apache-1.3/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1-any/apache-1.3/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.1-any/apache-2.0/CVS/Entries2
-rw-r--r--dev-lang/php/files/5.1-any/apache-2.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1-any/apache-2.0/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1-any/apache-2.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1-any/php5-fastbuild.patch234
-rw-r--r--dev-lang/php/files/5.1-any/php5-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/5.1-any/php5-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/5.1-any/php5-prefork.patch26
-rw-r--r--dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff35
-rw-r--r--dev-lang/php/files/5.1-any/php5-with-iodbc.diff13
-rw-r--r--dev-lang/php/files/5.1.0/CVS/Entries7
-rw-r--r--dev-lang/php/files/5.1.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1.0/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.1.0/apache-1.3/CVS/Entries2
-rw-r--r--dev-lang/php/files/5.1.0/apache-1.3/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1.0/apache-1.3/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1.0/apache-1.3/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.1.0/apache-2.0/CVS/Entries2
-rw-r--r--dev-lang/php/files/5.1.0/apache-2.0/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1.0/apache-2.0/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1.0/apache-2.0/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1.0/php5-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/5.1.0/php5-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/5.1.0/php5-prefork.patch26
-rw-r--r--dev-lang/php/files/5.1.0/php5-with-iodbc.diff13
-rw-r--r--dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff35
-rw-r--r--dev-lang/php/files/5.1.1/CVS/Entries4
-rw-r--r--dev-lang/php/files/5.1.1/CVS/Repository1
-rw-r--r--dev-lang/php/files/5.1.1/CVS/Root1
-rw-r--r--dev-lang/php/files/5.1.1/CVS/Tag1
-rw-r--r--dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch11
-rw-r--r--dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch23
-rw-r--r--dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch265
-rw-r--r--dev-lang/php/files/70_mod_php.conf-apache118
-rw-r--r--dev-lang/php/files/70_mod_php.conf-apache218
-rw-r--r--dev-lang/php/files/70_mod_php5.conf-apache119
-rw-r--r--dev-lang/php/files/70_mod_php5.conf-apache219
-rw-r--r--dev-lang/php/files/70_mod_php5.conf-apache2-r117
-rw-r--r--dev-lang/php/files/70_mod_php5_concurr.conf-apache217
-rw-r--r--dev-lang/php/files/70_mod_php5_concurr.conf-apache2-r117
-rw-r--r--dev-lang/php/files/70_mod_php_concurr.conf-apache215
-rw-r--r--dev-lang/php/files/CVS/Entries134
-rw-r--r--dev-lang/php/files/CVS/Repository1
-rw-r--r--dev-lang/php/files/CVS/Root1
-rw-r--r--dev-lang/php/files/CVS/Tag1
-rw-r--r--dev-lang/php/files/digest-php-4.0.4_p12
-rw-r--r--dev-lang/php/files/digest-php-4.0.51
-rw-r--r--dev-lang/php/files/digest-php-4.0.61
-rw-r--r--dev-lang/php/files/digest-php-4.0.6-r11
-rw-r--r--dev-lang/php/files/digest-php-4.0.6-r21
-rw-r--r--dev-lang/php/files/digest-php-4.0.6-r31
-rw-r--r--dev-lang/php/files/digest-php-4.0.6-r41
-rw-r--r--dev-lang/php/files/digest-php-4.0.6-r51
-rw-r--r--dev-lang/php/files/digest-php-4.0.6-r7001
-rw-r--r--dev-lang/php/files/digest-php-4.1.11
-rw-r--r--dev-lang/php/files/digest-php-4.1.1-r11
-rw-r--r--dev-lang/php/files/digest-php-4.1.1-r21
-rw-r--r--dev-lang/php/files/digest-php-4.1.1-r31
-rw-r--r--dev-lang/php/files/digest-php-4.1.1-r41
-rw-r--r--dev-lang/php/files/digest-php-4.1.1-r51
-rw-r--r--dev-lang/php/files/digest-php-4.1.21
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r11
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r21
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r31
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r41
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r51
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r61
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r71
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r81
-rw-r--r--dev-lang/php/files/digest-php-4.1.2-r91
-rw-r--r--dev-lang/php/files/digest-php-4.2.01
-rw-r--r--dev-lang/php/files/digest-php-4.2.11
-rw-r--r--dev-lang/php/files/digest-php-4.2.1-r11
-rw-r--r--dev-lang/php/files/digest-php-4.2.1-r21
-rw-r--r--dev-lang/php/files/digest-php-4.2.1-r31
-rw-r--r--dev-lang/php/files/digest-php-4.3.112
-rw-r--r--dev-lang/php/files/digest-php-4.3.11-r13
-rw-r--r--dev-lang/php/files/digest-php-4.3.11-r23
-rw-r--r--dev-lang/php/files/digest-php-4.3.11-r33
-rw-r--r--dev-lang/php/files/digest-php-4.3.11-r43
-rw-r--r--dev-lang/php/files/digest-php-4.3.11-r53
-rw-r--r--dev-lang/php/files/digest-php-4.4.02
-rw-r--r--dev-lang/php/files/digest-php-4.4.0-r13
-rw-r--r--dev-lang/php/files/digest-php-4.4.0-r23
-rw-r--r--dev-lang/php/files/digest-php-4.4.0-r33
-rw-r--r--dev-lang/php/files/digest-php-4.4.0-r43
-rw-r--r--dev-lang/php/files/digest-php-4.4.11
-rw-r--r--dev-lang/php/files/digest-php-4.4.1-r12
-rw-r--r--dev-lang/php/files/digest-php-4.4.1-r22
-rw-r--r--dev-lang/php/files/digest-php-4.4.1-r32
-rw-r--r--dev-lang/php/files/digest-php-4.4.29
-rw-r--r--dev-lang/php/files/digest-php-4.4.2-r19
-rw-r--r--dev-lang/php/files/digest-php-4.4.2-r29
-rw-r--r--dev-lang/php/files/digest-php-4.4.2-r39
-rw-r--r--dev-lang/php/files/digest-php-4.4.2-r59
-rw-r--r--dev-lang/php/files/digest-php-4.4.2-r69
-rw-r--r--dev-lang/php/files/digest-php-4.4.3-r19
-rw-r--r--dev-lang/php/files/digest-php-4.4.49
-rw-r--r--dev-lang/php/files/digest-php-4.4.4-r19
-rw-r--r--dev-lang/php/files/digest-php-4.4.4-r29
-rw-r--r--dev-lang/php/files/digest-php-4.4.4-r49
-rw-r--r--dev-lang/php/files/digest-php-4.4.4-r69
-rw-r--r--dev-lang/php/files/digest-php-4.4.4-r89
-rw-r--r--dev-lang/php/files/digest-php-4.4.69
-rw-r--r--dev-lang/php/files/digest-php-4.4.79
-rw-r--r--dev-lang/php/files/digest-php-4.4.89
-rw-r--r--dev-lang/php/files/digest-php-4.4.8_pre200708169
-rw-r--r--dev-lang/php/files/digest-php-5.0.42
-rw-r--r--dev-lang/php/files/digest-php-5.0.4-r13
-rw-r--r--dev-lang/php/files/digest-php-5.0.4-r23
-rw-r--r--dev-lang/php/files/digest-php-5.0.4-r33
-rw-r--r--dev-lang/php/files/digest-php-5.0.4-r43
-rw-r--r--dev-lang/php/files/digest-php-5.0.51
-rw-r--r--dev-lang/php/files/digest-php-5.0.5-r12
-rw-r--r--dev-lang/php/files/digest-php-5.0.5-r22
-rw-r--r--dev-lang/php/files/digest-php-5.0.5-r32
-rw-r--r--dev-lang/php/files/digest-php-5.0.5-r42
-rw-r--r--dev-lang/php/files/digest-php-5.0.5-r52
-rw-r--r--dev-lang/php/files/digest-php-5.1.12
-rw-r--r--dev-lang/php/files/digest-php-5.1.29
-rw-r--r--dev-lang/php/files/digest-php-5.1.2-r19
-rw-r--r--dev-lang/php/files/digest-php-5.1.49
-rw-r--r--dev-lang/php/files/digest-php-5.1.4-r19
-rw-r--r--dev-lang/php/files/digest-php-5.1.4-r39
-rw-r--r--dev-lang/php/files/digest-php-5.1.4-r49
-rw-r--r--dev-lang/php/files/digest-php-5.1.4-r69
-rw-r--r--dev-lang/php/files/digest-php-5.1.69
-rw-r--r--dev-lang/php/files/digest-php-5.1.6-r19
-rw-r--r--dev-lang/php/files/digest-php-5.1.6-r119
-rw-r--r--dev-lang/php/files/digest-php-5.1.6-r29
-rw-r--r--dev-lang/php/files/digest-php-5.1.6-r49
-rw-r--r--dev-lang/php/files/digest-php-5.1.6-r69
-rw-r--r--dev-lang/php/files/digest-php-5.1.6-r89
-rw-r--r--dev-lang/php/files/digest-php-5.2.1-r39
-rw-r--r--dev-lang/php/files/digest-php-5.2.2-r19
-rw-r--r--dev-lang/php/files/digest-php-5.2.3-r39
-rw-r--r--dev-lang/php/files/digest-php-5.2.49
-rw-r--r--dev-lang/php/files/digest-php-5.2.4_p200709149
-rw-r--r--dev-lang/php/files/digest-php-5.2.4_p20070914-r29
-rw-r--r--dev-lang/php/files/digest-php-5.2.4_pre200708051230-r29
-rw-r--r--dev-lang/php/files/digest-php-5.2.59
-rw-r--r--dev-lang/php/files/digest-php-5.2.5-r19
-rw-r--r--dev-lang/php/files/eblits/CVS/Entries27
-rw-r--r--dev-lang/php/files/eblits/CVS/Repository1
-rw-r--r--dev-lang/php/files/eblits/CVS/Root1
-rw-r--r--dev-lang/php/files/eblits/CVS/Tag1
-rw-r--r--dev-lang/php/files/eblits/common-v1.eblit9
-rw-r--r--dev-lang/php/files/eblits/common-v2.eblit5
-rw-r--r--dev-lang/php/files/eblits/pkg_postinst-v1.eblit72
-rw-r--r--dev-lang/php/files/eblits/pkg_postinst-v2.eblit37
-rw-r--r--dev-lang/php/files/eblits/pkg_setup-v1.eblit23
-rw-r--r--dev-lang/php/files/eblits/pkg_setup-v2.eblit9
-rw-r--r--dev-lang/php/files/eblits/src_compile-v1.eblit96
-rw-r--r--dev-lang/php/files/eblits/src_compile-v2.eblit82
-rw-r--r--dev-lang/php/files/eblits/src_configure-snapshots.eblit268
-rw-r--r--dev-lang/php/files/eblits/src_configure-v1.eblit236
-rw-r--r--dev-lang/php/files/eblits/src_configure-v2.eblit24
-rw-r--r--dev-lang/php/files/eblits/src_configure-v3.eblit245
-rw-r--r--dev-lang/php/files/eblits/src_configure-v52.eblit233
-rw-r--r--dev-lang/php/files/eblits/src_configure-v53.eblit23
-rw-r--r--dev-lang/php/files/eblits/src_configure-v54.eblit12
-rw-r--r--dev-lang/php/files/eblits/src_install-v1.eblit121
-rw-r--r--dev-lang/php/files/eblits/src_install-v2.eblit100
-rw-r--r--dev-lang/php/files/eblits/src_install-v3.eblit62
-rw-r--r--dev-lang/php/files/eblits/src_prepare-snapshots.eblit73
-rw-r--r--dev-lang/php/files/eblits/src_prepare-v1.eblit73
-rw-r--r--dev-lang/php/files/eblits/src_prepare-v2.eblit13
-rw-r--r--dev-lang/php/files/eblits/src_test-v1.eblit16
-rw-r--r--dev-lang/php/files/mod_php.conf6
-rw-r--r--dev-lang/php/files/php-5.2.10-pdo_dblib.patch16
-rw-r--r--dev-lang/php/files/php-5.2.12-libpng14.patch11
-rw-r--r--dev-lang/php/files/php-fpm-gentooified-5.3.4.patch41
-rw-r--r--dev-lang/php/files/php-fpm-gentooified.patch55
-rw-r--r--dev-lang/php/files/php-fpm-r0.conf310
-rw-r--r--dev-lang/php/files/php-fpm-r1.conf311
-rwxr-xr-xdev-lang/php/files/php-fpm-r1.init33
-rwxr-xr-xdev-lang/php/files/php-fpm-r3.init47
-rwxr-xr-xdev-lang/php/files/php-fpm-r4.init41
-rw-r--r--dev-lang/php/files/php-fpm.conf310
-rwxr-xr-xdev-lang/php/files/php-fpm.init22
-rw-r--r--dev-lang/php/files/php4-ldvs1
-rw-r--r--dev-lang/php/files/php5-ldvs1
-rw-r--r--dev-lang/php/metadata.xml5
-rw-r--r--dev-lang/php/php-4.0.4_p1.ebuild125
-rw-r--r--dev-lang/php/php-4.0.5.ebuild125
-rw-r--r--dev-lang/php/php-4.0.6-r1.ebuild158
-rw-r--r--dev-lang/php/php-4.0.6-r2.ebuild164
-rw-r--r--dev-lang/php/php-4.0.6-r3.ebuild169
-rw-r--r--dev-lang/php/php-4.0.6-r4.ebuild146
-rw-r--r--dev-lang/php/php-4.0.6-r5.ebuild160
-rw-r--r--dev-lang/php/php-4.0.6.ebuild154
-rw-r--r--dev-lang/php/php-4.1.1-r1.ebuild183
-rw-r--r--dev-lang/php/php-4.1.1-r2.ebuild151
-rw-r--r--dev-lang/php/php-4.1.1-r3.ebuild168
-rw-r--r--dev-lang/php/php-4.1.1-r4.ebuild177
-rw-r--r--dev-lang/php/php-4.1.1-r5.ebuild182
-rw-r--r--dev-lang/php/php-4.1.1.ebuild172
-rw-r--r--dev-lang/php/php-4.1.2-r1.ebuild183
-rw-r--r--dev-lang/php/php-4.1.2-r2.ebuild193
-rw-r--r--dev-lang/php/php-4.1.2-r3.ebuild193
-rw-r--r--dev-lang/php/php-4.1.2-r4.ebuild210
-rw-r--r--dev-lang/php/php-4.1.2-r5.ebuild203
-rw-r--r--dev-lang/php/php-4.1.2-r6.ebuild204
-rw-r--r--dev-lang/php/php-4.1.2-r7.ebuild205
-rw-r--r--dev-lang/php/php-4.1.2-r8.ebuild185
-rw-r--r--dev-lang/php/php-4.1.2-r9.ebuild192
-rw-r--r--dev-lang/php/php-4.1.2.ebuild183
-rw-r--r--dev-lang/php/php-4.2.0.ebuild193
-rw-r--r--dev-lang/php/php-4.2.1-r1.ebuild208
-rw-r--r--dev-lang/php/php-4.2.1-r2.ebuild218
-rw-r--r--dev-lang/php/php-4.2.1-r3.ebuild217
-rw-r--r--dev-lang/php/php-4.2.1.ebuild206
-rw-r--r--dev-lang/php/php-4.3.11-r1.ebuild303
-rw-r--r--dev-lang/php/php-4.3.11-r2.ebuild321
-rw-r--r--dev-lang/php/php-4.3.11-r3.ebuild330
-rw-r--r--dev-lang/php/php-4.3.11-r4.ebuild330
-rw-r--r--dev-lang/php/php-4.3.11-r5.ebuild340
-rw-r--r--dev-lang/php/php-4.3.11.ebuild279
-rw-r--r--dev-lang/php/php-4.4.0-r1.ebuild303
-rw-r--r--dev-lang/php/php-4.4.0-r2.ebuild321
-rw-r--r--dev-lang/php/php-4.4.0-r3.ebuild330
-rw-r--r--dev-lang/php/php-4.4.0-r4.ebuild330
-rw-r--r--dev-lang/php/php-4.4.0.ebuild290
-rw-r--r--dev-lang/php/php-4.4.1-r1.ebuild299
-rw-r--r--dev-lang/php/php-4.4.1-r2.ebuild302
-rw-r--r--dev-lang/php/php-4.4.1-r3.ebuild318
-rw-r--r--dev-lang/php/php-4.4.1.ebuild278
-rw-r--r--dev-lang/php/php-4.4.2-r1.ebuild286
-rw-r--r--dev-lang/php/php-4.4.2-r2.ebuild288
-rw-r--r--dev-lang/php/php-4.4.2-r3.ebuild290
-rw-r--r--dev-lang/php/php-4.4.2-r5.ebuild290
-rw-r--r--dev-lang/php/php-4.4.2-r6.ebuild498
-rw-r--r--dev-lang/php/php-4.4.2.ebuild286
-rw-r--r--dev-lang/php/php-4.4.3-r1.ebuild512
-rw-r--r--dev-lang/php/php-4.4.4-r1.ebuild512
-rw-r--r--dev-lang/php/php-4.4.4-r2.ebuild512
-rw-r--r--dev-lang/php/php-4.4.4-r4.ebuild512
-rw-r--r--dev-lang/php/php-4.4.4-r6.ebuild512
-rw-r--r--dev-lang/php/php-4.4.4-r8.ebuild512
-rw-r--r--dev-lang/php/php-4.4.4.ebuild512
-rw-r--r--dev-lang/php/php-4.4.6.ebuild516
-rw-r--r--dev-lang/php/php-4.4.7.ebuild516
-rw-r--r--dev-lang/php/php-4.4.8.ebuild477
-rw-r--r--dev-lang/php/php-4.4.8_pre20070816.ebuild487
-rw-r--r--dev-lang/php/php-5.0.4-r1.ebuild201
-rw-r--r--dev-lang/php/php-5.0.4-r2.ebuild219
-rw-r--r--dev-lang/php/php-5.0.4-r3.ebuild228
-rw-r--r--dev-lang/php/php-5.0.4-r4.ebuild228
-rw-r--r--dev-lang/php/php-5.0.4.ebuild184
-rw-r--r--dev-lang/php/php-5.0.5-r1.ebuild191
-rw-r--r--dev-lang/php/php-5.0.5-r2.ebuild209
-rw-r--r--dev-lang/php/php-5.0.5-r3.ebuild215
-rw-r--r--dev-lang/php/php-5.0.5-r4.ebuild215
-rw-r--r--dev-lang/php/php-5.0.5-r5.ebuild225
-rw-r--r--dev-lang/php/php-5.0.5.ebuild184
-rw-r--r--dev-lang/php/php-5.1.1.ebuild302
-rw-r--r--dev-lang/php/php-5.1.2-r1.ebuild286
-rw-r--r--dev-lang/php/php-5.1.2.ebuild286
-rw-r--r--dev-lang/php/php-5.1.4-r1.ebuild290
-rw-r--r--dev-lang/php/php-5.1.4-r3.ebuild290
-rw-r--r--dev-lang/php/php-5.1.4-r4.ebuild498
-rw-r--r--dev-lang/php/php-5.1.4-r6.ebuild512
-rw-r--r--dev-lang/php/php-5.1.4.ebuild288
-rw-r--r--dev-lang/php/php-5.1.6-r1.ebuild512
-rw-r--r--dev-lang/php/php-5.1.6-r11.ebuild516
-rw-r--r--dev-lang/php/php-5.1.6-r2.ebuild512
-rw-r--r--dev-lang/php/php-5.1.6-r4.ebuild512
-rw-r--r--dev-lang/php/php-5.1.6-r6.ebuild512
-rw-r--r--dev-lang/php/php-5.1.6-r8.ebuild512
-rw-r--r--dev-lang/php/php-5.1.6.ebuild512
-rw-r--r--dev-lang/php/php-5.2.1-r3.ebuild516
-rw-r--r--dev-lang/php/php-5.2.10-r1.ebuild547
-rw-r--r--dev-lang/php/php-5.2.10-r2.ebuild550
-rw-r--r--dev-lang/php/php-5.2.10.ebuild547
-rw-r--r--dev-lang/php/php-5.2.11-r1.ebuild551
-rw-r--r--dev-lang/php/php-5.2.11.ebuild547
-rw-r--r--dev-lang/php/php-5.2.12.ebuild548
-rw-r--r--dev-lang/php/php-5.2.13.ebuild551
-rw-r--r--dev-lang/php/php-5.2.14-r1.ebuild313
-rw-r--r--dev-lang/php/php-5.2.14-r2.ebuild327
-rw-r--r--dev-lang/php/php-5.2.14.ebuild314
-rw-r--r--dev-lang/php/php-5.2.16-r1.ebuild341
-rw-r--r--dev-lang/php/php-5.2.16.ebuild341
-rw-r--r--dev-lang/php/php-5.2.17.ebuild96
-rw-r--r--dev-lang/php/php-5.2.2-r1.ebuild516
-rw-r--r--dev-lang/php/php-5.2.3-r3.ebuild483
-rw-r--r--dev-lang/php/php-5.2.4.ebuild477
-rw-r--r--dev-lang/php/php-5.2.4_p20070914-r2.ebuild494
-rw-r--r--dev-lang/php/php-5.2.4_p20070914.ebuild494
-rw-r--r--dev-lang/php/php-5.2.4_pre200708051230-r2.ebuild493
-rw-r--r--dev-lang/php/php-5.2.5-r1.ebuild495
-rw-r--r--dev-lang/php/php-5.2.5.ebuild496
-rw-r--r--dev-lang/php/php-5.2.5_p20080206-r2.ebuild509
-rw-r--r--dev-lang/php/php-5.2.5_p20080206-r3.ebuild509
-rw-r--r--dev-lang/php/php-5.2.5_p20080206.ebuild504
-rw-r--r--dev-lang/php/php-5.2.6-r1.ebuild504
-rw-r--r--dev-lang/php/php-5.2.6-r2.ebuild507
-rw-r--r--dev-lang/php/php-5.2.6-r5.ebuild511
-rw-r--r--dev-lang/php/php-5.2.6-r6.ebuild511
-rw-r--r--dev-lang/php/php-5.2.6-r7.ebuild511
-rw-r--r--dev-lang/php/php-5.2.6.ebuild505
-rw-r--r--dev-lang/php/php-5.2.6_rc1-r1.ebuild508
-rw-r--r--dev-lang/php/php-5.2.6_rc1.ebuild508
-rw-r--r--dev-lang/php/php-5.2.6_rc3-r1.ebuild481
-rw-r--r--dev-lang/php/php-5.2.6_rc3.ebuild481
-rw-r--r--dev-lang/php/php-5.2.6_rc4.ebuild481
-rw-r--r--dev-lang/php/php-5.2.8-r1.ebuild549
-rw-r--r--dev-lang/php/php-5.2.8-r2.ebuild546
-rw-r--r--dev-lang/php/php-5.2.8.ebuild544
-rw-r--r--dev-lang/php/php-5.2.9-r1.ebuild546
-rw-r--r--dev-lang/php/php-5.2.9-r2.ebuild546
-rw-r--r--dev-lang/php/php-5.2.9.ebuild546
-rw-r--r--dev-lang/php/php-5.3.10-r1.ebuild390
-rw-r--r--dev-lang/php/php-5.3.10-r2.ebuild390
-rw-r--r--dev-lang/php/php-5.3.10.ebuild390
-rw-r--r--dev-lang/php/php-5.3.11.ebuild392
-rw-r--r--dev-lang/php/php-5.3.11_rc2.ebuild392
-rw-r--r--dev-lang/php/php-5.3.12.ebuild392
-rw-r--r--dev-lang/php/php-5.3.13.ebuild392
-rw-r--r--dev-lang/php/php-5.3.14.ebuild392
-rw-r--r--dev-lang/php/php-5.3.14_rc2.ebuild392
-rw-r--r--dev-lang/php/php-5.3.2.ebuild338
-rw-r--r--dev-lang/php/php-5.3.3-r1.ebuild337
-rw-r--r--dev-lang/php/php-5.3.3-r2.ebuild337
-rw-r--r--dev-lang/php/php-5.3.3-r3.ebuild346
-rw-r--r--dev-lang/php/php-5.3.3.ebuild335
-rw-r--r--dev-lang/php/php-5.3.4-r1.ebuild353
-rw-r--r--dev-lang/php/php-5.3.4.ebuild353
-rw-r--r--dev-lang/php/php-5.3.5-r1.ebuild353
-rw-r--r--dev-lang/php/php-5.3.5.ebuild353
-rw-r--r--dev-lang/php/php-5.3.6-r1.ebuild351
-rw-r--r--dev-lang/php/php-5.3.6.ebuild349
-rw-r--r--dev-lang/php/php-5.3.6_rc1.ebuild355
-rw-r--r--dev-lang/php/php-5.3.6_rc2.ebuild354
-rw-r--r--dev-lang/php/php-5.3.6_rc3.ebuild354
-rw-r--r--dev-lang/php/php-5.3.7.ebuild354
-rw-r--r--dev-lang/php/php-5.3.7_rc1.ebuild351
-rw-r--r--dev-lang/php/php-5.3.7_rc2.ebuild351
-rw-r--r--dev-lang/php/php-5.3.7_rc3.ebuild354
-rw-r--r--dev-lang/php/php-5.3.7_rc5.ebuild354
-rw-r--r--dev-lang/php/php-5.3.8.ebuild354
-rw-r--r--dev-lang/php/php-5.3.9.ebuild390
-rw-r--r--dev-lang/php/php-5.3.9_rc1.ebuild415
-rw-r--r--dev-lang/php/php-5.3.9_rc2.ebuild414
-rw-r--r--dev-lang/php/php-5.3.9_rc3.ebuild397
-rw-r--r--dev-lang/php/php-5.3.9_rc4.ebuild390
-rw-r--r--dev-lang/php/php-5.4.0.ebuild382
-rw-r--r--dev-lang/php/php-5.4.0_alpha1.ebuild330
-rw-r--r--dev-lang/php/php-5.4.0_alpha3.ebuild328
-rw-r--r--dev-lang/php/php-5.4.0_beta1.ebuild329
-rw-r--r--dev-lang/php/php-5.4.0_beta2.ebuild329
-rw-r--r--dev-lang/php/php-5.4.0_pre201104301030.ebuild354
-rw-r--r--dev-lang/php/php-5.4.0_pre201105151030.ebuild353
-rw-r--r--dev-lang/php/php-5.4.0_pre201105211430.ebuild352
-rw-r--r--dev-lang/php/php-5.4.0_rc1.ebuild332
-rw-r--r--dev-lang/php/php-5.4.0_rc2.ebuild332
-rw-r--r--dev-lang/php/php-5.4.0_rc3.ebuild332
-rw-r--r--dev-lang/php/php-5.4.0_rc4.ebuild390
-rw-r--r--dev-lang/php/php-5.4.0_rc5.ebuild390
-rw-r--r--dev-lang/php/php-5.4.0_rc6.ebuild390
-rw-r--r--dev-lang/php/php-5.4.0_rc7-r1.ebuild390
-rw-r--r--dev-lang/php/php-5.4.0_rc7.ebuild390
-rw-r--r--dev-lang/php/php-5.4.0_rc8.ebuild391
-rw-r--r--dev-lang/php/php-5.4.1.ebuild384
-rw-r--r--dev-lang/php/php-5.4.1_rc1.ebuild384
-rw-r--r--dev-lang/php/php-5.4.1_rc2.ebuild384
-rw-r--r--dev-lang/php/php-5.4.2.ebuild384
-rw-r--r--dev-lang/php/php-5.4.3.ebuild384
-rw-r--r--dev-lang/php/php-5.4.4.ebuild385
-rw-r--r--dev-lang/php/php-5.4.4_rc2.ebuild385
-rw-r--r--dev-lang/php/php-5.5.0_pre201105211430.ebuild353
532 files changed, 84769 insertions, 295 deletions
diff --git a/dev-lang/php/CVS/Entries b/dev-lang/php/CVS/Entries
new file mode 100644
index 0000000..f4fe8a7
--- /dev/null
+++ b/dev-lang/php/CVS/Entries
@@ -0,0 +1,193 @@
+D/files////
+/.frozen/1.1/Thu Jul 3 02:11:34 2003//T1.1
+/ChangeLog/1.1/Mon Jul 2 00:18:59 2012//T1.1
+/Manifest/1.1/Mon Jul 2 00:18:59 2012//T1.1
+/metadata.xml/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php-4.0.4_p1.ebuild/1.1/Sat Apr 28 18:54:42 2001//T1.1
+/php-4.0.5.ebuild/1.1/Sun May 6 18:06:22 2001//T1.1
+/php-4.0.6-r1.ebuild/1.1/Tue Jul 3 16:50:57 2001//T1.1
+/php-4.0.6-r2.ebuild/1.1/Sat Oct 6 14:36:55 2001//T1.1
+/php-4.0.6-r3.ebuild/1.1/Sun Nov 11 13:12:00 2001//T1.1
+/php-4.0.6-r4.ebuild/1.1/Tue Feb 12 17:44:44 2002//T1.1
+/php-4.0.6-r5.ebuild/1.1/Mon Feb 18 21:01:05 2002//T1.1
+/php-4.0.6.ebuild/1.1/Sun Jul 1 21:03:17 2001//T1.1
+/php-4.1.1-r1.ebuild/1.1/Wed Feb 6 17:00:46 2002//T1.1
+/php-4.1.1-r2.ebuild/1.1/Tue Feb 12 17:44:44 2002//T1.1
+/php-4.1.1-r3.ebuild/1.1/Mon Feb 18 21:01:05 2002//T1.1
+/php-4.1.1-r4.ebuild/1.1/Sat Feb 23 20:35:19 2002//T1.1
+/php-4.1.1-r5.ebuild/1.1/Mon Feb 25 19:50:23 2002//T1.1
+/php-4.1.1.ebuild/1.1/Thu Jan 3 15:50:25 2002//T1.1
+/php-4.1.2-r1.ebuild/1.1/Thu Feb 28 07:07:57 2002//T1.1
+/php-4.1.2-r2.ebuild/1.1/Thu Mar 7 08:25:46 2002//T1.1
+/php-4.1.2-r3.ebuild/1.1/Thu Mar 14 18:49:39 2002//T1.1
+/php-4.1.2-r4.ebuild/1.1/Tue Apr 9 23:59:01 2002//T1.1
+/php-4.1.2-r5.ebuild/1.1/Thu Apr 11 04:34:21 2002//T1.1
+/php-4.1.2-r6.ebuild/1.1/Fri Apr 12 21:20:16 2002//T1.1
+/php-4.1.2-r7.ebuild/1.1/Mon Apr 15 20:12:42 2002//T1.1
+/php-4.1.2-r8.ebuild/1.1/Sat Apr 27 09:26:07 2002//T1.1
+/php-4.1.2-r9.ebuild/1.1/Sun May 5 23:45:44 2002//T1.1
+/php-4.1.2.ebuild/1.1/Thu Feb 28 05:29:22 2002//T1.1
+/php-4.2.0.ebuild/1.1/Wed May 8 07:01:25 2002//T1.1
+/php-4.2.1-r1.ebuild/1.1/Tue May 21 15:45:15 2002//T1.1
+/php-4.2.1-r2.ebuild/1.1/Mon Jul 8 15:24:41 2002//T1.1
+/php-4.2.1-r3.ebuild/1.1/Tue Jul 9 19:10:58 2002//T1.1
+/php-4.2.1.ebuild/1.1/Sun May 19 23:04:16 2002//T1.1
+/php-4.3.11-r1.ebuild/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php-4.3.11-r2.ebuild/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/php-4.3.11-r3.ebuild/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/php-4.3.11-r4.ebuild/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/php-4.3.11-r5.ebuild/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/php-4.3.11.ebuild/1.1/Sun Sep 11 18:57:09 2005//T1.1
+/php-4.4.0-r1.ebuild/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php-4.4.0-r2.ebuild/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/php-4.4.0-r3.ebuild/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/php-4.4.0-r4.ebuild/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/php-4.4.0.ebuild/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php-4.4.1-r1.ebuild/1.1/Thu Nov 3 23:54:59 2005//T1.1
+/php-4.4.1-r2.ebuild/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/php-4.4.1-r3.ebuild/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/php-4.4.1.ebuild/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/php-4.4.2-r1.ebuild/1.1/Thu Apr 13 20:28:58 2006//T1.1
+/php-4.4.2-r2.ebuild/1.1/Fri May 5 10:28:58 2006//T1.1
+/php-4.4.2-r3.ebuild/1.1/Mon May 29 22:07:20 2006//T1.1
+/php-4.4.2-r5.ebuild/1.1/Tue Jun 20 20:38:58 2006//T1.1
+/php-4.4.2-r6.ebuild/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/php-4.4.2.ebuild/1.1/Sun Mar 12 13:25:34 2006//T1.1
+/php-4.4.3-r1.ebuild/1.1/Thu Aug 10 16:31:49 2006//T1.1
+/php-4.4.4-r1.ebuild/1.1/Tue Aug 29 23:05:20 2006//T1.1
+/php-4.4.4-r2.ebuild/1.1/Wed Aug 30 11:17:26 2006//T1.1
+/php-4.4.4-r4.ebuild/1.1/Sun Sep 10 12:48:50 2006//T1.1
+/php-4.4.4-r6.ebuild/1.1/Sat Oct 7 20:22:39 2006//T1.1
+/php-4.4.4-r8.ebuild/1.1/Fri Oct 27 12:17:35 2006//T1.1
+/php-4.4.4.ebuild/1.1/Tue Aug 29 19:55:32 2006//T1.1
+/php-4.4.6.ebuild/1.1/Mon Mar 5 02:14:43 2007//T1.1
+/php-4.4.7.ebuild/1.1/Mon May 7 21:56:24 2007//T1.1
+/php-4.4.8.ebuild/1.1/Tue Jan 8 17:28:26 2008//T1.1
+/php-4.4.8_pre20070816.ebuild/1.1/Sat Aug 18 13:11:23 2007//T1.1
+/php-5.0.4-r1.ebuild/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php-5.0.4-r2.ebuild/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/php-5.0.4-r3.ebuild/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/php-5.0.4-r4.ebuild/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/php-5.0.4.ebuild/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php-5.0.5-r1.ebuild/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php-5.0.5-r2.ebuild/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/php-5.0.5-r3.ebuild/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/php-5.0.5-r4.ebuild/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/php-5.0.5-r5.ebuild/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/php-5.0.5.ebuild/1.1/Tue Sep 6 14:54:15 2005//T1.1
+/php-5.1.1.ebuild/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/php-5.1.2-r1.ebuild/1.1/Thu Apr 13 20:28:58 2006//T1.1
+/php-5.1.2.ebuild/1.1/Sun Mar 12 13:25:34 2006//T1.1
+/php-5.1.4-r1.ebuild/1.1/Mon May 29 22:07:20 2006//T1.1
+/php-5.1.4-r3.ebuild/1.1/Tue Jun 20 20:38:58 2006//T1.1
+/php-5.1.4-r4.ebuild/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/php-5.1.4-r6.ebuild/1.1/Thu Aug 10 16:31:49 2006//T1.1
+/php-5.1.4.ebuild/1.1/Fri May 5 10:28:58 2006//T1.1
+/php-5.1.6-r1.ebuild/1.1/Tue Aug 29 23:05:20 2006//T1.1
+/php-5.1.6-r11.ebuild/1.1/Mon Mar 5 02:14:43 2007//T1.1
+/php-5.1.6-r2.ebuild/1.1/Wed Aug 30 11:17:26 2006//T1.1
+/php-5.1.6-r4.ebuild/1.1/Sun Sep 10 12:48:50 2006//T1.1
+/php-5.1.6-r6.ebuild/1.1/Sat Oct 7 20:22:39 2006//T1.1
+/php-5.1.6-r8.ebuild/1.1/Fri Oct 27 12:17:35 2006//T1.1
+/php-5.1.6.ebuild/1.1/Tue Aug 29 19:55:32 2006//T1.1
+/php-5.2.1-r3.ebuild/1.1/Mon Mar 5 02:14:43 2007//T1.1
+/php-5.2.10-r1.ebuild/1.1/Sun Jul 5 23:26:08 2009//T1.1
+/php-5.2.10-r2.ebuild/1.1/Thu Sep 24 23:36:54 2009//T1.1
+/php-5.2.10.ebuild/1.1/Fri Jun 19 14:40:22 2009//T1.1
+/php-5.2.11-r1.ebuild/1.1/Fri Nov 13 16:11:51 2009//T1.1
+/php-5.2.11.ebuild/1.1/Tue Sep 29 16:37:04 2009//T1.1
+/php-5.2.12.ebuild/1.1/Wed Dec 30 13:34:10 2009//T1.1
+/php-5.2.13.ebuild/1.1/Sat Mar 20 14:33:03 2010//T1.1
+/php-5.2.14-r1.ebuild/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/php-5.2.14-r2.ebuild/1.1/Sun Oct 31 19:01:55 2010//T1.1
+/php-5.2.14.ebuild/1.1/Mon Aug 2 16:56:41 2010//T1.1
+/php-5.2.16-r1.ebuild/1.1/Wed Jan 5 11:23:16 2011//T1.1
+/php-5.2.16.ebuild/1.1/Sun Dec 19 14:24:49 2010//T1.1
+/php-5.2.17.ebuild/1.1/Thu Jan 6 23:35:43 2011//T1.1
+/php-5.2.2-r1.ebuild/1.1/Mon May 7 21:56:24 2007//T1.1
+/php-5.2.3-r3.ebuild/1.1/Sun Jul 22 21:16:52 2007//T1.1
+/php-5.2.4.ebuild/1.1/Sat Sep 8 18:26:36 2007//T1.1
+/php-5.2.4_p20070914-r2.ebuild/1.1/Wed Sep 19 20:06:05 2007//T1.1
+/php-5.2.4_p20070914.ebuild/1.1/Fri Sep 14 15:33:29 2007//T1.1
+/php-5.2.4_pre200708051230-r2.ebuild/1.1/Thu Aug 9 20:01:48 2007//T1.1
+/php-5.2.5-r1.ebuild/1.1/Sat Dec 8 23:23:38 2007//T1.1
+/php-5.2.5.ebuild/1.1/Fri Nov 9 22:44:30 2007//T1.1
+/php-5.2.5_p20080206-r2.ebuild/1.1/Tue Feb 12 16:46:19 2008//T1.1
+/php-5.2.5_p20080206-r3.ebuild/1.1/Tue Feb 12 21:58:56 2008//T1.1
+/php-5.2.5_p20080206.ebuild/1.1/Wed Feb 6 15:15:54 2008//T1.1
+/php-5.2.6-r1.ebuild/1.1/Mon May 5 21:01:17 2008//T1.1
+/php-5.2.6-r2.ebuild/1.1/Thu Jul 3 09:52:58 2008//T1.1
+/php-5.2.6-r5.ebuild/1.1/Thu Jul 17 13:54:24 2008//T1.1
+/php-5.2.6-r6.ebuild/1.1/Thu Aug 7 10:25:21 2008//T1.1
+/php-5.2.6-r7.ebuild/1.1/Sat Sep 6 20:48:36 2008//T1.1
+/php-5.2.6.ebuild/1.1/Thu May 1 14:58:11 2008//T1.1
+/php-5.2.6_rc1-r1.ebuild/1.1/Wed Mar 5 19:11:13 2008//T1.1
+/php-5.2.6_rc1.ebuild/1.1/Mon Mar 3 12:14:56 2008//T1.1
+/php-5.2.6_rc3-r1.ebuild/1.1/Sun Mar 30 14:15:55 2008//T1.1
+/php-5.2.6_rc3.ebuild/1.1/Fri Mar 28 23:09:10 2008//T1.1
+/php-5.2.6_rc4.ebuild/1.1/Sat Apr 5 22:47:01 2008//T1.1
+/php-5.2.8-r1.ebuild/1.1/Thu Dec 18 23:23:32 2008//T1.1
+/php-5.2.8-r2.ebuild/1.1/Sun Jan 11 21:16:32 2009//T1.1
+/php-5.2.8.ebuild/1.1/Mon Dec 8 23:30:02 2008//T1.1
+/php-5.2.9-r1.ebuild/1.1/Fri Apr 10 10:25:55 2009//T1.1
+/php-5.2.9-r2.ebuild/1.1/Thu Apr 16 18:28:43 2009//T1.1
+/php-5.2.9.ebuild/1.1/Fri Apr 10 10:25:55 2009//T1.1
+/php-5.3.10-r1.ebuild/1.1/Mon Feb 6 13:41:27 2012//T1.1
+/php-5.3.10-r2.ebuild/1.1/Mon Feb 6 21:24:03 2012//T1.1
+/php-5.3.10.ebuild/1.1/Thu Feb 2 22:29:16 2012//T1.1
+/php-5.3.11.ebuild/1.1/Thu Apr 26 10:22:22 2012//T1.1
+/php-5.3.11_rc2.ebuild/1.1/Fri Apr 13 06:43:50 2012//T1.1
+/php-5.3.12.ebuild/1.1/Thu May 3 20:15:23 2012//T1.1
+/php-5.3.13.ebuild/1.1/Tue May 8 17:22:11 2012//T1.1
+/php-5.3.14.ebuild/1.1/Thu Jun 14 22:10:11 2012//T1.1
+/php-5.3.14_rc2.ebuild/1.1/Tue Jun 5 12:34:35 2012//T1.1
+/php-5.3.2.ebuild/1.1/Thu May 27 23:05:04 2010//T1.1
+/php-5.3.3-r1.ebuild/1.1/Sun Aug 8 20:32:23 2010//T1.1
+/php-5.3.3-r2.ebuild/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/php-5.3.3-r3.ebuild/1.1/Sun Oct 31 19:01:55 2010//T1.1
+/php-5.3.3.ebuild/1.1/Mon Jul 26 12:26:41 2010//T1.1
+/php-5.3.4-r1.ebuild/1.1/Wed Jan 5 11:23:16 2011//T1.1
+/php-5.3.4.ebuild/1.1/Sun Dec 19 14:24:49 2010//T1.1
+/php-5.3.5-r1.ebuild/1.1/Sat Jan 29 22:05:22 2011//T1.1
+/php-5.3.5.ebuild/1.1/Thu Jan 6 23:35:43 2011//T1.1
+/php-5.3.6-r1.ebuild/1.1/Tue Apr 19 16:44:56 2011//T1.1
+/php-5.3.6.ebuild/1.1/Thu Mar 17 16:36:51 2011//T1.1
+/php-5.3.6_rc1.ebuild/1.1/Fri Feb 18 09:18:38 2011//T1.1
+/php-5.3.6_rc2.ebuild/1.1/Thu Mar 3 15:44:11 2011//T1.1
+/php-5.3.6_rc3.ebuild/1.1/Thu Mar 10 18:58:47 2011//T1.1
+/php-5.3.7.ebuild/1.1/Sun Aug 21 13:58:36 2011//T1.1
+/php-5.3.7_rc1.ebuild/1.1/Fri Jun 17 10:03:02 2011//T1.1
+/php-5.3.7_rc2.ebuild/1.1/Fri Jul 1 11:45:01 2011//T1.1
+/php-5.3.7_rc3.ebuild/1.1/Sat Jul 23 10:14:46 2011//T1.1
+/php-5.3.7_rc5.ebuild/1.1/Fri Aug 12 07:40:09 2011//T1.1
+/php-5.3.8.ebuild/1.1/Wed Aug 24 07:08:30 2011//T1.1
+/php-5.3.9.ebuild/1.1/Wed Jan 11 06:35:28 2012//T1.1
+/php-5.3.9_rc1.ebuild/1.1/Fri Nov 4 10:21:20 2011//T1.1
+/php-5.3.9_rc2.ebuild/1.1/Fri Nov 25 09:10:47 2011//T1.1
+/php-5.3.9_rc3.ebuild/1.1/Fri Dec 16 09:02:43 2011//T1.1
+/php-5.3.9_rc4.ebuild/1.1/Sat Dec 24 08:54:00 2011//T1.1
+/php-5.4.0.ebuild/1.1/Thu Mar 1 21:51:51 2012//T1.1
+/php-5.4.0_alpha1.ebuild/1.1/Wed Jun 29 06:38:38 2011//T1.1
+/php-5.4.0_alpha3.ebuild/1.1/Mon Aug 8 16:15:47 2011//T1.1
+/php-5.4.0_beta1.ebuild/1.1/Fri Sep 16 07:04:41 2011//T1.1
+/php-5.4.0_beta2.ebuild/1.1/Thu Oct 20 08:27:33 2011//T1.1
+/php-5.4.0_pre201104301030.ebuild/1.1/Sun May 1 20:15:53 2011//T1.1
+/php-5.4.0_pre201105151030.ebuild/1.1/Sun May 15 19:17:23 2011//T1.1
+/php-5.4.0_pre201105211430.ebuild/1.1/Sun May 22 07:17:51 2011//T1.1
+/php-5.4.0_rc1.ebuild/1.1/Fri Nov 11 13:14:36 2011//T1.1
+/php-5.4.0_rc2.ebuild/1.1/Fri Nov 25 09:10:47 2011//T1.1
+/php-5.4.0_rc3.ebuild/1.1/Fri Dec 9 09:45:13 2011//T1.1
+/php-5.4.0_rc4.ebuild/1.1/Sat Dec 24 08:54:00 2011//T1.1
+/php-5.4.0_rc5.ebuild/1.1/Fri Jan 6 20:54:59 2012//T1.1
+/php-5.4.0_rc6.ebuild/1.1/Fri Jan 20 14:40:05 2012//T1.1
+/php-5.4.0_rc7-r1.ebuild/1.1/Thu Feb 9 16:59:39 2012//T1.1
+/php-5.4.0_rc7.ebuild/1.1/Fri Feb 3 09:51:09 2012//T1.1
+/php-5.4.0_rc8.ebuild/1.1/Thu Feb 16 19:22:11 2012//T1.1
+/php-5.4.1.ebuild/1.1/Thu Apr 26 11:33:41 2012//T1.1
+/php-5.4.1_rc1.ebuild/1.1/Fri Mar 30 11:23:07 2012//T1.1
+/php-5.4.1_rc2.ebuild/1.1/Fri Apr 13 06:43:50 2012//T1.1
+/php-5.4.2.ebuild/1.1/Thu May 3 20:15:23 2012//T1.1
+/php-5.4.3.ebuild/1.1/Tue May 8 17:22:11 2012//T1.1
+/php-5.4.4.ebuild/1.1/Thu Jun 14 22:10:11 2012//T1.1
+/php-5.4.4_rc2.ebuild/1.1/Tue Jun 5 17:34:32 2012//T1.1
+/php-5.5.0_pre201105211430.ebuild/1.1/Sun May 22 07:17:51 2011//T1.1
diff --git a/dev-lang/php/CVS/Repository b/dev-lang/php/CVS/Repository
new file mode 100644
index 0000000..ab0a56b
--- /dev/null
+++ b/dev-lang/php/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php
diff --git a/dev-lang/php/CVS/Root b/dev-lang/php/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/CVS/Tag b/dev-lang/php/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog
new file mode 100644
index 0000000..0414397
--- /dev/null
+++ b/dev-lang/php/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for dev-lang/php
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.1 2002/02/01 21:53:11 gbevin Exp $
+
+*php-4.1.1 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
index d52cdef..ab7dc08 100644
--- a/dev-lang/php/Manifest
+++ b/dev-lang/php/Manifest
@@ -1,19 +1,157 @@
-AUX eblits/common-v2.eblit 379 RMD160 595fd6c6be1e0ac15012ea78497a4d2c287c6754 SHA1 98e28261e32bda53c7dfef88def615f633af7c44 SHA256 8c15442b04b0216342ef6f2b8565cb3510f6850fe67745d5697861e2f7759194
-AUX eblits/pkg_setup-v2.eblit 393 RMD160 430ab1f0227011172d422886862bd59d3886034a SHA1 2fdb587135cd0fe84ea51bfee8cf4ea9fd67dcb5 SHA256 17f9316065960ff0ca56aeec918c2c9e6c80ffdf951a238f7271a589753e320c
+AUX 20php4-envd 179 RMD160 6492d9930759b59476ece852e5c84ca3476afea8 SHA1 d0c5739c4a1bc9dbb5a0383b363d9a51e02785a8 SHA256 75e562ca48d425f5efddfc3cfd99e6c462d528d28b324b70126d327e6a425d42
+AUX 20php5-envd 179 RMD160 e9022db3454eb992b13acaf76635baa65ee2f061 SHA1 20556ed7628859263ee8686de87344a97570f40a SHA256 b1ffdf6663818df7f8fc488bb91f68ba7b860bcb1ba9da571f71259c8db5dc2c
+AUX 4-any/apache-1.3/70_mod_php.conf 484 RMD160 a39e519414c7ac3c81198c0447d8466986432c29 SHA1 85751cc64cddd5595dfe5baf62e33242bd5dd8e7 SHA256 40f8161df164177b3cb9d285014ed97b000ad85a621a3858539e8ccf959755b1
+AUX 4-any/apache-2.0/70_mod_php.conf 485 RMD160 6257eff7856e149d18528381a501ab50efed46e1 SHA1 ca58da2610b541c241b59efe8cd09cd4593e562d SHA256 a1fbc68cca42e75620a975fce075038605c1064b44d7205c4b75ff32742ad899
+AUX 4-any/php4-fastbuild.patch 9012 RMD160 c7bd59dfed7fea8bdbbebcda790913d3602c4e35 SHA1 01cfab0ac46d94e497c8c4bebcb634db16ce3105 SHA256 0cf4058ef9e7cc1ba70e409c61f714fb59369d372d0664968f0b35b81ab67778
+AUX 4-any/php4-imap-symlink.diff 620 RMD160 fe81e5bc291ed4e3e16f25ea9c7e13b3f4397e64 SHA1 3f3d09086b2a4892244a3ec45145672454d00170 SHA256 71c1c4c655875fd77e27a406a3de5892558789aa2dc482cbc794e684ad724493
+AUX 4-any/php4-iodbc-config.diff 511 RMD160 455d2d950dcbe6ef7d21bf8c69bd80da0977714d SHA1 edd7fb5ba77fb76bf28a03127541af327bc90745 SHA256 7640a8a386dc71ce9329587b1888b0e61bbe921331a01873002122d9bfbefc44
+AUX 4-any/php4-libtool-1.5.patch 613 RMD160 934e0f32d2ac45f301d8fa8b532bce6de91a3e66 SHA1 9857015125f0f8ede027d7094516f5337a38c71a SHA256 ff47ef9c1ce1ba7bcd61971c5691072bf6a9594c0e9780b348062c4a7ca823a1
+AUX 4-any/php4-uClibc-have_dn_skipname.patch 839 RMD160 59cf3cef5b2dd7a522ba8a4c19397f30d1772f06 SHA1 ed3ed726df21a537006856186b97ff7047a14ebc SHA256 b490758ce32ef01c4c67926fc1860455175309fd6b93ee9c653e65c4a2519fa8
+AUX 4-any/php4-with-iodbc.diff 443 RMD160 a673b44e7bacb4411ca3ef227f736aceba01d0fc SHA1 ffc926c2224054596034244cfdcd6f9c3450ad6c SHA256 d07c4d169ac6aaed0be31e6023db6fb369c124af6707a39d43ae41ea13dd87d2
+AUX 4.3.11/php4.3.11-apache2sapi.patch 5362 RMD160 28b830afd3124613af3f04d727ac3902d63241b2 SHA1 21f773c2d8b97ccb86b7c0ec998c3cd76c9e62ae SHA256 abddd38911cbbc97741bd3858a06893d37be347d978fab4063e835d09c417acb
+AUX 4.3.11/php4.3.11-apachesapi.patch 1172 RMD160 80f0de40d3f13ba0208591182e9d93cce95b2d6c SHA1 47be690ef71ce80096601faa69d2a3cb2d4baee2 SHA256 3217f522c212b2e9a3c8f4b0ed6fa1406bf133b36cdafaa756780ef5c327cfdf
+AUX 4.3.11/php4.3.11-curl-open_basedir.patch 5240 RMD160 82b91667f9e09953d01de244ca8523a957ea1723 SHA1 647e718c11edae297873bf5ce1d89ca48ebb7ac2 SHA256 79ecb6cb894f5d73b331418b396fc986dc279731c0a25dd69bdb1035ea49aba1
+AUX 4.3.11/php4.3.11-curl_safemode.patch 5129 RMD160 150cb7bf9db093d4fa10b7f2e9564ee83c9c6b59 SHA1 d40b6d840128daec1918fc7cf9c878fccacd23f9 SHA256 c70fc8c00c5702d55ac8cef5447d2d67bf387d70ebfaab06057550f3290707d7
+AUX 4.3.11/php4.3.11-fopen_wrappers.patch 1481 RMD160 584002693e3689dae96d884f00c258a469131318 SHA1 e0c35b546e2088787462bacda58b2c9999651a76 SHA256 266f41e3304bb47c72cd77306b75de3dcc3e0ee2d2713ae5e6b5031b37fcfea9
+AUX 4.3.11/php4.3.11-gd-safe_mode.patch 4645 RMD160 97133ce81caddd220d93d8815c9bedcb9705eb09 SHA1 c93ef9158be57e8778d1869b6ab6982a20b32b26 SHA256 d17777eddefd44783c1291665b1970b6fb111785173f526338339eadc2d2d183
+AUX 4.3.11/php4.3.11-gd_safe_mode.patch 1573 RMD160 d7f89f4c823f8e88fb96713de745f33de22b1fbc SHA1 a2208a7a9de427697abbe456502f90ad14afb225 SHA256 bcdb721a5238622a7aa23498eae86a71c7e5473785063d2e30bad39a0c16ca1f
+AUX 4.3.11/php4.3.11-globals_overwrite.patch 18395 RMD160 e511bb0690653e2bc2c35e5b409ee0e5489d1cd9 SHA1 0f4aff75d01cc66551af9affc14fcf49d7a89363 SHA256 0a8e6707d212e54f85c135a0e104c57df95d00370e3988ce0fced288902486d7
+AUX 4.3.11/php4.3.11-mbstring-header_inj.patch 4664 RMD160 90277ca01bcd1734c841a8a4c26c99a661786203 SHA1 ac19834781db409b3c4f911828e7ba5537a08d3f SHA256 55e1ae89c5549f9e5054a78440a837294522f61bc2e500778d37052b49027c5c
+AUX 4.3.11/php4.3.11-multilib-search-path.patch 50376 RMD160 b4bd12bc48af8dcd3475920aa8fb2c17b0133644 SHA1 4f79c670966e87634dd9e670d0a046f94b97fdcf SHA256 9365391a8dfd801ef7af0d88cb444374cd87cf46caa4ffc22861793e97ef3bb6
+AUX 4.3.11/php4.3.11-pcre-security.patch 1667 RMD160 494e82ddb33d3cbf7fbf8cad7fa872ee54ad1762 SHA1 695327fd611e4a1188daad19a52f97c9f7af7d7c SHA256 2324b4a593f9d90bd3e9c8f2d20834ae1110985af194bbde4379806642cb3a24
+AUX 4.3.11/php4.3.11-phpinfo_xss.patch 2518 RMD160 943115562c29a566e54dfaa45dbc2a9dff7d7e30 SHA1 b3c0b6a8b4bc3c0ed214c7f43c0e597b4cde7a27 SHA256 f44651b5f0e7fd48e56153ade13659d1ea495903786697c13d987aa2e1bff2ca
+AUX 4.3.11/php4.3.11-pspell-ext-segf.patch 8482 RMD160 ddf8243e1d92d5d954f4b12d76c6c40be94c60df SHA1 fc65e0e47677f29dcc0bcf57408cf3a4e14cb5cd SHA256 f389ad160c694bb5dc18c203fec89660d9b66404789b2a2592f92b7f35fcbceb
+AUX 4.3.11/php4.3.11-session_save_path-segf.patch 4938 RMD160 4c07fdb0f22107aa35af48ac01a30f2a0379bfa3 SHA1 2f0fc64db82f66d8a0536b8b66dbf85cebf81efd SHA256 d0043120a0cb5e7040135509a8b7ca8f993e29f9c3e08ea7c7b331fbd96ae2d6
+AUX 4.4.0/apache-1.3/70_mod_php.conf 484 RMD160 a39e519414c7ac3c81198c0447d8466986432c29 SHA1 85751cc64cddd5595dfe5baf62e33242bd5dd8e7 SHA256 40f8161df164177b3cb9d285014ed97b000ad85a621a3858539e8ccf959755b1
+AUX 4.4.0/apache-2.0/70_mod_php.conf 485 RMD160 6257eff7856e149d18528381a501ab50efed46e1 SHA1 ca58da2610b541c241b59efe8cd09cd4593e562d SHA256 a1fbc68cca42e75620a975fce075038605c1064b44d7205c4b75ff32742ad899
+AUX 4.4.0/fastbuild.patch 9004 RMD160 ca5f7c936cea63778034be920df15818d3d3a0c1 SHA1 8da10773bbf0ba9a0380326d242bbec52d9a6bbc SHA256 07d1aa9bb57dcc44364b1c30dc907f4852e6c67666d00bfb9e0573fd291b3dfc
+AUX 4.4.0/php4-hphp-acinclude.patch 618 RMD160 6a2bd8d2140cc679575c5d0103b1ac499311f4cb SHA1 1a4ca63e31329da1b63d9c03b56ac8746f48ab98 SHA256 65ce1f8acaedad021a4af63d65bef01d7e97a76dca11120832612e469c5c47b2
+AUX 4.4.0/php4-imap-symlink.diff 620 RMD160 fe81e5bc291ed4e3e16f25ea9c7e13b3f4397e64 SHA1 3f3d09086b2a4892244a3ec45145672454d00170 SHA256 71c1c4c655875fd77e27a406a3de5892558789aa2dc482cbc794e684ad724493
+AUX 4.4.0/php4-iodbc-config.diff 511 RMD160 455d2d950dcbe6ef7d21bf8c69bd80da0977714d SHA1 edd7fb5ba77fb76bf28a03127541af327bc90745 SHA256 7640a8a386dc71ce9329587b1888b0e61bbe921331a01873002122d9bfbefc44
+AUX 4.4.0/php4-libtool-1.5.patch 613 RMD160 934e0f32d2ac45f301d8fa8b532bce6de91a3e66 SHA1 9857015125f0f8ede027d7094516f5337a38c71a SHA256 ff47ef9c1ce1ba7bcd61971c5691072bf6a9594c0e9780b348062c4a7ca823a1
+AUX 4.4.0/php4-with-iodbc.diff 443 RMD160 a673b44e7bacb4411ca3ef227f736aceba01d0fc SHA1 ffc926c2224054596034244cfdcd6f9c3450ad6c SHA256 d07c4d169ac6aaed0be31e6023db6fb369c124af6707a39d43ae41ea13dd87d2
+AUX 4.4.0/php4.3.11-pcre-security.patch 2299 RMD160 23f1e710a76db29a4025058efc7898bf2a61d670 SHA1 9b894979f72e2af5a60f14828e22d722735cebe8 SHA256 313843d5b002e42992aeb502a931322b726c2b36cc148e3eb66f20283d0635b1
+AUX 4.4.0/php4.4.0-curl_safemode.patch 1937 RMD160 8534ad8228ad28049ede7cd6d5df1b2b826c6344 SHA1 2c3c991bb85befbf8ee260e3c6c9fd161b4886e4 SHA256 5c9f8c3e45dd65595e50aa526b6ad1d541f7264104703ed892b4ec6b98cb323a
+AUX 4.4.0/php4.4.0-fopen_wrappers.patch 1481 RMD160 584002693e3689dae96d884f00c258a469131318 SHA1 e0c35b546e2088787462bacda58b2c9999651a76 SHA256 266f41e3304bb47c72cd77306b75de3dcc3e0ee2d2713ae5e6b5031b37fcfea9
+AUX 4.4.0/php4.4.0-gd_safe_mode.patch 883 RMD160 5e2aebde4f617ebd86ee509fc0923643ea79e7c6 SHA1 4916ec6f619d5bb185f5b5b061d88fda09d9a868 SHA256 7a9cc9502934ef3736c19147f0cd28f4dc1538aa951789582c714ef552cb3e2f
+AUX 4.4.0/php4.4.0-globals_overwrite.patch 10115 RMD160 3df60201f34ac4b35365e833de918241da8c0c7a SHA1 97ef2e062a9b18ef800f32b6116710dc6521de32 SHA256 a2955e40842b51c6372796d21b9a179a2054946496fe3a6f62a5e5fcc36c2dc2
+AUX 4.4.0/php4.4.0-pcre-security.patch 2346 RMD160 2495c6953a189f528d327cf2f985ae2371ddf8d2 SHA1 3e62bb851a78859b504e79cc995ec700b9d673f2 SHA256 8a1660cf5a422f936dc500ac32345e85a6b3f0b8c2633ba71d51ac6331d3eb01
+AUX 4.4.0/php4.4.0-phpinfo_xss.patch 1284 RMD160 00bc57d1b2ff4e81d26211a163c2aa9e6e163aa5 SHA1 f5f3a7f87b87490d35f44b0ba776d96a17d4dfaf SHA256 496ac4070ea6c5458122489af1b4eb797ae028b981e01cd7488acbb713c5a863
+AUX 4.4.0/php4.4.0-pspell-ext-segf.patch 8482 RMD160 ddf8243e1d92d5d954f4b12d76c6c40be94c60df SHA1 fc65e0e47677f29dcc0bcf57408cf3a4e14cb5cd SHA256 f389ad160c694bb5dc18c203fec89660d9b66404789b2a2592f92b7f35fcbceb
+AUX 4.4.0/php4.4.0-session_save_path-segf.patch 4132 RMD160 32b84942121a88eb67c9e180229c90a7973f31a6 SHA1 020cd94b650ab809c537b24ae462d6382d37d511 SHA256 6e15dd949cf8bc7f77001f969affc9e7d9805e3bb1f8684e6cbd8623f6776e9b
+AUX 4.4.1/php4.4.1-apache2sapi.patch 1764 RMD160 121df513851add44437fd5228ff553802688e33b SHA1 a58a27c4397c94e18095f8f1fbb83a25281fe970 SHA256 d1e98e9b1ee5498065c608e18244422f7f2b6055971acf215b2baaea72695fe1
+AUX 4.4.1/php4.4.1-curl-open_basedir.patch 1012 RMD160 7f88f2d20973be9826c9449bb6686002b91af483 SHA1 f32938057d692896f31ab6e42bd34ca39dafede3 SHA256 8b6595094fed374e4035c9b35621fda777b2b39b23678d4ded7e9a3138b0dd76
+AUX 4.4.1/php4.4.1-current_key_by_reference.patch 864 RMD160 c66bdbdb6120e504eb0aa7c718a9c2ca9cad6a20 SHA1 c4f53bdb5b5dda768e70e43e9129ad9eeb56d3c6 SHA256 32e6ab7b1bc17ed0e38b76a7d1ccc58f37f4bacc01523c84987070ce770fa55d
+AUX 4.4.1/php4.4.1-gd-safe_mode.patch 4189 RMD160 333f47857899e3de980565c6e6089d921d30d366 SHA1 2baa45464c88d475dfb1baa4a52b86e403e32efb SHA256 3cad97ce521565de38e31d634195823e3d693409c8ef3a381765c09811b650f8
+AUX 4.4.1/php4.4.1-mbstring-header_inj.patch 4592 RMD160 7451eacc218e3a093bc8386a93c43d3c77f286fb SHA1 8572ebfec3c3fb0d102904395a344cdbd3d49cf8 SHA256 71f4c441739ddde7569ae154c0a1c83fe5bda82d8663c34c01974459989ff7c9
+AUX 4.4.1/php4.4.1-mod_rewrite-crash.patch 940 RMD160 be828959a9a93c7fdc129e86f5b5537554d4b387 SHA1 abd4b03d80e6f8975a4ba4eeb8b32dcf62b34b56 SHA256 cacb7079a6c2d5374983cae1337a5602cec551e453f5194da1813f0cb5d128ac
+AUX 4.4.1/php4.4.1-multilib-search-path.patch 50244 RMD160 e32ae422570d16253582791cf35b868822087a32 SHA1 4e314c2b07d9be594391518cf8d511c933d5df3c SHA256 74178caedee1b76ef1e4cfab466876d91f442cd08e4ecd7a19340ff2b4314b31
+AUX 5.0-any/apache-1.3/70_mod_php5.conf 524 RMD160 9e47ca575d90b5904064a7d16d371ab7c09bad81 SHA1 6e8ac31b72008b8dd75e11468620305be5126dcd SHA256 0b9d33dec2558afd861173aeac4e984f5deeb39948544ed3a3188901e845987f
+AUX 5.0-any/apache-2.0/70_mod_php5.conf 525 RMD160 f02f849abcc01c560d8e094815367235c671c62d SHA1 9217175eb59109030949d239cb90d0d28edfb69f SHA256 f711da9d5f726aa8ac174889c0af6367e37083f0c98e136997e9341f219c3092
+AUX 5.0-any/php5-imap-symlink.diff 620 RMD160 05c02beb77a3b9d091f4bb5aa3cdd2d2e2d85248 SHA1 916ada318392d417e6275bb561fc344f41e9a3fe SHA256 e2d6e9660e71582710d1ca3fd904557c8effe3ca69a3015e4e171bef32fd2203
+AUX 5.0-any/php5-iodbc-config.diff 511 RMD160 d2c03538de2286c9fd76f338cf0009b482483510 SHA1 ca037383e1c7824aa215e6e7b95bcefea011e665 SHA256 40a99ff56a82011dac2e1fa467ba2365725cc58f893a79877420fc02d1d490b2
+AUX 5.0-any/php5-libtool-1.5.patch 613 RMD160 bee2bff690f964b9ef42b35eb36643b8e1870f0c SHA1 4d887c0878a14e487372aaa0db962f76ace4bf58 SHA256 5b6bee45d2ec428d0c2f9c359c718b87867f66f8091f4a6f45057da30b7d8414
+AUX 5.0-any/php5-prefork.patch 850 RMD160 5855e08aeb2d8b9f9ee5b6499da404fc9ac73d40 SHA1 77f2055654556d260d0e5d9ea3f30af2adf96780 SHA256 c65dc75d914400479c5d38d732992c45322296cca77ecadd259bae7e57a8e718
+AUX 5.0-any/php5-soap_persistence_session.diff 1976 RMD160 ba0575f535773d3b0e7b164b684e5feaeeb1e19f SHA1 8ab7717d9d980081892274a624b1e008b88f5e97 SHA256 af72cb89ea33c236f32f7a8d029ac447bd324a6e054821ad9ea0b13d33654771
+AUX 5.0-any/php5-with-iodbc.diff 443 RMD160 a673b44e7bacb4411ca3ef227f736aceba01d0fc SHA1 ffc926c2224054596034244cfdcd6f9c3450ad6c SHA256 d07c4d169ac6aaed0be31e6023db6fb369c124af6707a39d43ae41ea13dd87d2
+AUX 5.0.0/php5-hphp-acinclude.patch 618 RMD160 9cc694f7a606fc2038d3c374ed7098b484fd8c5a SHA1 17e98a9ab7e30b72b005ebcd094b2c2a7d5a8440 SHA256 35e3d280f06ef684b2bbfebd9ffdb0de7f3f5938c79ceb13b01ce5e4e41dfd38
+AUX 5.0.0/php5-imap-symlink.diff 620 RMD160 05c02beb77a3b9d091f4bb5aa3cdd2d2e2d85248 SHA1 916ada318392d417e6275bb561fc344f41e9a3fe SHA256 e2d6e9660e71582710d1ca3fd904557c8effe3ca69a3015e4e171bef32fd2203
+AUX 5.0.0/php5-iodbc-config.diff 511 RMD160 d2c03538de2286c9fd76f338cf0009b482483510 SHA1 ca037383e1c7824aa215e6e7b95bcefea011e665 SHA256 40a99ff56a82011dac2e1fa467ba2365725cc58f893a79877420fc02d1d490b2
+AUX 5.0.0/php5-libtool-1.5.patch 613 RMD160 bee2bff690f964b9ef42b35eb36643b8e1870f0c SHA1 4d887c0878a14e487372aaa0db962f76ace4bf58 SHA256 5b6bee45d2ec428d0c2f9c359c718b87867f66f8091f4a6f45057da30b7d8414
+AUX 5.0.0/php5.0.4-pcre-security.patch 2288 RMD160 4fee56f2a940f4f4a108e827d20e24a85ffe57f3 SHA1 a5c4c7ddfccac69ac9926f1a635a4a7eac31ac42 SHA256 aa15071c4164dab4a80558757a8490f645b90872552d34e95520c4e1816f2b64
+AUX 5.0.0/php5.0.4-xmlrcp-ccode.diff 750 RMD160 6d9a75031d18b760d346d12da048968aa76e8f54 SHA1 1ebc5c6ba3fa2e8634b17aaa30954298278b57c6 SHA256 258d9eeaf3987a44a61ea4257fc6f86d9b78e140aaa32a648b94581c4ce7b5d3
+AUX 5.0.0/php5.0.5-obj-serialize.patch 1377 RMD160 28c15d04bd0d9c496710a7a1bb00a8f17606fa76 SHA1 1993e499db4117cab994c856e37eeb177f26711d SHA256 700fb09e2650da813582effe30fd1c0df12aaf12c55a86c7ab8125c503684354
+AUX 5.0.4/php5.0.4-curl_safemode.patch 5262 RMD160 f8b3c5f471ee625f9b04874b2a8123abb6f2a85b SHA1 a0446678d397588c41e9a96fed1ff2a10f89911c SHA256 77cce658b24ee49f3897058bd1622de7e6660d6f91d7a379e100c1044c8fd92b
+AUX 5.0.4/php5.0.4-fopen_wrappers.patch 1554 RMD160 e54624fa39364c98e1267cb9ecb3b7c3bebd54cc SHA1 d235731a3b50d5f8f5740651535ed7dc776a4092 SHA256 e4f58cfa877a185058bb7cd2df0f2b37460d36c53c1d6d2aeb5bf1ba188344ca
+AUX 5.0.4/php5.0.4-gd_safe_mode.patch 1216 RMD160 d142339ad3ca8f5f0d28905c4958a6580caf8e70 SHA1 86ce47317fef8bc0776456261f06b985723f3302 SHA256 383da9dcb68e445be5f0d90db6498490f7ef831c3bfc91e058274905f82f75a0
+AUX 5.0.4/php5.0.4-globals_overwrite.patch 32692 RMD160 d309c426c952f5715eaba2e744ee906086294fb8 SHA1 7242c1e58a84affbe37f1f67f6cc0998ce13e20d SHA256 797616d6eb72b868a6b2853ee4039d7e0f7b7047e0dc62bedfce515e3187b89d
+AUX 5.0.4/php5.0.4-pcre-security.patch 1659 RMD160 f1fdb21e077cb4af2b5a27b2d6072aec45750b09 SHA1 7585b03190954ccc0e709c684de339a2bfb7b0ba SHA256 eae5dc8aace7c656b3f54145182fb90d90fe5063b1fbb39ee5b1f9f1f7724d77
+AUX 5.0.4/php5.0.4-phpinfo_xss.patch 2476 RMD160 bb9a92b01088230a3bcd42a4bbf450ee24ff799f SHA1 5ead465d8761799aa75f4969f561023e31b29cda SHA256 a8c0d927a65b2147ce07df5aa889acec22f0ba5da18e27a0da36bdb4d469cd2d
+AUX 5.0.4/php5.0.4-pspell-ext-segf.patch 9422 RMD160 d61cf09cc96cb25772afe1cbada4b885c31be78c SHA1 cd69f371953e04cedf1c3329e7d4038eca8392ab SHA256 d90d491f2abe162c26aa97fb267a879f47293b759bb0250221420c2d61e89603
+AUX 5.0.4/php5.0.4-session_save_path-segf.patch 5127 RMD160 42132485992fd58064c0fcfc00e899ef3e9931b7 SHA1 c3a835cff98189ad12c7165bb871c104e8176641 SHA256 584db65223aee145450c240514643c7084727beac7fd03bbabffcf3372493292
+AUX 5.0.4/php5.0.4-xmlrcp-ccode.diff 750 RMD160 6d9a75031d18b760d346d12da048968aa76e8f54 SHA1 1ebc5c6ba3fa2e8634b17aaa30954298278b57c6 SHA256 258d9eeaf3987a44a61ea4257fc6f86d9b78e140aaa32a648b94581c4ce7b5d3
+AUX 5.0.5/php5.0.5-apache2sapi.patch 4422 RMD160 60d831b3c00475aa9d563717289f6d4b9f6cbd0c SHA1 14f33050b62ba7c4e0a981d9626151052d06a565 SHA256 2115d814c2968a1c5fe001503b7224ee65e7c4c3a6edadb4252626ec9f9e60bf
+AUX 5.0.5/php5.0.5-curl-open_basedir.patch 2263 RMD160 be7b6ed5f7628b040f354b8bb62997e3e0b1f493 SHA1 a186deabd9f73df366d250f961827261957894d2 SHA256 593bcb56917fd8ee0e7567eb96e84367fce922c4a6afaa2be007d70f75c584e3
+AUX 5.0.5/php5.0.5-curl_safemode.patch 2061 RMD160 74af0c2bbea7c88cbecd86dd9d03f7181790edce SHA1 554eada3e703bfcb269de32d1550c2b0163a64c8 SHA256 480f3aef616170c4cc0a00e5a38262bd9943477cbc56d18a5dd73b2d37d8ab78
+AUX 5.0.5/php5.0.5-fopen_wrappers.patch 942 RMD160 52f74ed867e5e1c34d9dd809e0e14056cc327942 SHA1 24417e01130abcaa6b62a22275d769c24ffb588d SHA256 9f9bf4aa5a5e002dd1ff7d6718747d97853ebe11b96b5a069eeafa735c27726a
+AUX 5.0.5/php5.0.5-gd-safe_mode.patch 3422 RMD160 712b5704ed8b7ae84051a513bece7ce142dfb18b SHA1 049f9afe33575d698a421c9c6e8bb0b8fe86d92b SHA256 7c2520edc3a979a5e128c330e6ab66a3e10ab39ff02a51b989bfc97c11f3c59d
+AUX 5.0.5/php5.0.5-gd_safe_mode.patch 875 RMD160 128d1bd4f624b0d5f115c1dea82071de07a7fe7a SHA1 0bebb2d52c0b5d8665bbb8d13d3cf738657c6f90 SHA256 419059a774257f23ef388ffb44159f8ef8358197c79b75f822cf4707e78d37a9
+AUX 5.0.5/php5.0.5-globals_overwrite.patch 6671 RMD160 c5fb94150653fc624f7e8cd0ff5150050bd1b097 SHA1 f7b10958cdc9cc82ad89df86017648b8465ab670 SHA256 912ede1b3938bb544c6eaaa624c881dbf91864c072c91b888ec062963b7105bb
+AUX 5.0.5/php5.0.5-mbstring-header_inj.patch 4602 RMD160 dd0224d03ee189c2d3ed54925a11fd37679710ec SHA1 fda866ea536897c22c0f1ca636eaf5a120549491 SHA256 4836cd32c67abc34f7b1fa00b167971dc6bc78c36aaed7ca734b71c7cfd89933
+AUX 5.0.5/php5.0.5-multilib-search-path.patch 46548 RMD160 13b93cb7f8ff138c952c80eff81d399c5d305580 SHA1 ae95fa1398781246774bbe60a0a162fa8195a5ac SHA256 1d063b685e3a60d983c28c3379dd9300199044d5825e54b02d089a3d4beea929
+AUX 5.0.5/php5.0.5-obj-serialize.patch 1364 RMD160 94e3e4ac94b7c31bc02c79aa4c77acd300f13435 SHA1 ed14d76ff74debd68accd9399a6a7187ad5f9e63 SHA256 6478f0867a45bf34065f2667e6b30e6d6b11ab9b5cb617ea0e8c3275ec8f6da8
+AUX 5.0.5/php5.0.5-pspell-ext-segf.patch 9422 RMD160 d61cf09cc96cb25772afe1cbada4b885c31be78c SHA1 cd69f371953e04cedf1c3329e7d4038eca8392ab SHA256 d90d491f2abe162c26aa97fb267a879f47293b759bb0250221420c2d61e89603
+AUX 5.0.5/php5.0.5-session_save_path-segf.patch 4090 RMD160 b977ce2472978a4a61796239837dfd72c196b810 SHA1 8c4dc306185d8ddb3c1cd1815c7990ba5e894212 SHA256 315db76cf5a411f456f0de7d4726b8d50fb4c211a55a886578365f7cfa374808
+AUX 5.0.5/php5.0.5-tsrm-gcc4.patch 554 RMD160 7113e4b14742fc2c9d96031f1838878be954e0a2 SHA1 36ea1e76703bf602d6f6106ecb0dcc3380cd8ed6 SHA256 a45f75cb2d41bab0d9787ec8b8cbbb9f98d7ae69c45ba160f6368441449dadc8
+AUX 5.1-any/apache-1.3/70_mod_php5.conf 524 RMD160 9e47ca575d90b5904064a7d16d371ab7c09bad81 SHA1 6e8ac31b72008b8dd75e11468620305be5126dcd SHA256 0b9d33dec2558afd861173aeac4e984f5deeb39948544ed3a3188901e845987f
+AUX 5.1-any/apache-2.0/70_mod_php5.conf 525 RMD160 f02f849abcc01c560d8e094815367235c671c62d SHA1 9217175eb59109030949d239cb90d0d28edfb69f SHA256 f711da9d5f726aa8ac174889c0af6367e37083f0c98e136997e9341f219c3092
+AUX 5.1-any/php5-fastbuild.patch 9580 RMD160 f2f36f980cccb0e9dcffaa69ba6f968e5b5aeed0 SHA1 89dc2f335286264a3661911abd053441f4388f4c SHA256 83ca44e0a3425c5a0452c6e5d8375571f98422643d95241ffab11f464ac0ba28
+AUX 5.1-any/php5-imap-symlink.diff 652 RMD160 b6f49f1cd6bb8538280fcd123dfefb99da024fe9 SHA1 0dd68c5a94c2fa07873b4318373f15f124395072 SHA256 431d07c3fab23f7f8b8a5b872635b9ab848497a3a48f9eed74bb28938d897fc8
+AUX 5.1-any/php5-iodbc-config.diff 519 RMD160 7fba404c6eab478ca4ca1e5c85af2e6cf2bc6a38 SHA1 de2e3ea85e6b22232d74f0f4499bfc3e415018b8 SHA256 daaa8de33ca93d3861cbaadc82294ceb9d3f885bab62822d038eef07882f4c0c
+AUX 5.1-any/php5-prefork.patch 850 RMD160 5855e08aeb2d8b9f9ee5b6499da404fc9ac73d40 SHA1 77f2055654556d260d0e5d9ea3f30af2adf96780 SHA256 c65dc75d914400479c5d38d732992c45322296cca77ecadd259bae7e57a8e718
+AUX 5.1-any/php5-soap_persistence_session.diff 1976 RMD160 ba0575f535773d3b0e7b164b684e5feaeeb1e19f SHA1 8ab7717d9d980081892274a624b1e008b88f5e97 SHA256 af72cb89ea33c236f32f7a8d029ac447bd324a6e054821ad9ea0b13d33654771
+AUX 5.1-any/php5-with-iodbc.diff 443 RMD160 a673b44e7bacb4411ca3ef227f736aceba01d0fc SHA1 ffc926c2224054596034244cfdcd6f9c3450ad6c SHA256 d07c4d169ac6aaed0be31e6023db6fb369c124af6707a39d43ae41ea13dd87d2
+AUX 5.1.0/apache-1.3/70_mod_php5.conf 524 RMD160 9e47ca575d90b5904064a7d16d371ab7c09bad81 SHA1 6e8ac31b72008b8dd75e11468620305be5126dcd SHA256 0b9d33dec2558afd861173aeac4e984f5deeb39948544ed3a3188901e845987f
+AUX 5.1.0/apache-2.0/70_mod_php5.conf 525 RMD160 f02f849abcc01c560d8e094815367235c671c62d SHA1 9217175eb59109030949d239cb90d0d28edfb69f SHA256 f711da9d5f726aa8ac174889c0af6367e37083f0c98e136997e9341f219c3092
+AUX 5.1.0/php5-imap-symlink.diff 652 RMD160 b6f49f1cd6bb8538280fcd123dfefb99da024fe9 SHA1 0dd68c5a94c2fa07873b4318373f15f124395072 SHA256 431d07c3fab23f7f8b8a5b872635b9ab848497a3a48f9eed74bb28938d897fc8
+AUX 5.1.0/php5-iodbc-config.diff 519 RMD160 7fba404c6eab478ca4ca1e5c85af2e6cf2bc6a38 SHA1 de2e3ea85e6b22232d74f0f4499bfc3e415018b8 SHA256 daaa8de33ca93d3861cbaadc82294ceb9d3f885bab62822d038eef07882f4c0c
+AUX 5.1.0/php5-prefork.patch 850 RMD160 5855e08aeb2d8b9f9ee5b6499da404fc9ac73d40 SHA1 77f2055654556d260d0e5d9ea3f30af2adf96780 SHA256 c65dc75d914400479c5d38d732992c45322296cca77ecadd259bae7e57a8e718
+AUX 5.1.0/php5-with-iodbc.diff 443 RMD160 a673b44e7bacb4411ca3ef227f736aceba01d0fc SHA1 ffc926c2224054596034244cfdcd6f9c3450ad6c SHA256 d07c4d169ac6aaed0be31e6023db6fb369c124af6707a39d43ae41ea13dd87d2
+AUX 5.1.0/php5_soap_persistence_session.diff 1976 RMD160 ba0575f535773d3b0e7b164b684e5feaeeb1e19f SHA1 8ab7717d9d980081892274a624b1e008b88f5e97 SHA256 af72cb89ea33c236f32f7a8d029ac447bd324a6e054821ad9ea0b13d33654771
+AUX 5.1.1/php5.1.1-curl-gcry_threads.patch 326 RMD160 5bcd74185e8c1ae9a93fc6c25fc38bc50e6ccfd9 SHA1 d7de689dd894636cc64493facd2b02697d6cf9bd SHA256 48a8b1865727499f5457b015eed9b50a06b9996f9278f24067af42f5ed09ce44
+AUX 5.1.1/php5.1.1-ming-config.patch 672 RMD160 018a056acecc578211671e7e202b9fd9a4fe0c56 SHA1 ee629f19853f089969131aca425ad9a97310f118 SHA256 854b82040627342a22a0f14c96eee02e8a0a968700c7fe640943d40a6b8c1496
+AUX 5.1.1/php5.1.1-multilib-search-path.patch 10285 RMD160 681164680aadc734367a5d12e77b72b0cf273578 SHA1 d3891b32a349c40ed4a166d519bd10c1708fbfe6 SHA256 9081bb6c28ec120377d96008e23bda4ae1bf97386d73edc4fa560603bb0bb01e
+AUX 70_mod_php.conf-apache1 457 RMD160 cba11929fc8fce91753b89fd468362fc24a4c42a SHA1 2d551505e8d87255afa7ff5863f6e2ee523fe952 SHA256 b8f860a576b78ab9636ff551c56509ca52a9204d127452625e23c88b32ef4806
+AUX 70_mod_php.conf-apache2 458 RMD160 d2de515f92639d817a67c3a44db3e3dff4864974 SHA1 5ed31bd0969e17a2b74b4c5dd7665b58911bf0ab SHA256 06e3046fa7352eb2349967382bff711c01f6600688b8f49569ceacf2a31b130a
+AUX 70_mod_php5.conf-apache1 497 RMD160 8906581f5f6698aed33b7710042936f7904df197 SHA1 c1c2f24d362a15277e6e5584069ec46238be81e1 SHA256 2ae3f97a49e86b079d7b6d48e5fde0d3d18841c78a9373fa24500f31f52110e6
+AUX 70_mod_php5.conf-apache2 498 RMD160 60b32c16c251db9685bba23d82bf8e749a1d0223 SHA1 5464a642e54f51faf1bf5f91f4b7891ee18d5b84 SHA256 08db825992b8f62e03a6e9f54db1b7947b615655cda915dc00b901a479585a02
+AUX 70_mod_php5.conf-apache2-r1 374 RMD160 ca06cdc9d1a3dc4129a60c938ee3a1b542497fbb SHA1 4733066b6324c5870e716485484c44c7c26a9ff1 SHA256 815c1ca23c9afe8479568ceaac4057eb91ea5444fbd863866b29adb4eea2c82b
+AUX 70_mod_php5_concurr.conf-apache2 418 RMD160 ac51fe704fa914f5cf393ec0c03983b17f1518c9 SHA1 3dfd5ff01a696514474c606ab497f5f889253160 SHA256 930ddc687ba2a6d6780c0b1bae0c6a1396a28ec24ad24325b008a25c40417f12
+AUX 70_mod_php5_concurr.conf-apache2-r1 376 RMD160 4f7de5c0784b6191450b5c1a7de7ad941620e199 SHA1 c42a23bd7a1d3e8c7e0ac906f50f180116349f76 SHA256 c05f499d9c8927391c586b94716a9f59d63767165552ea527ec7ff63c36eaa40
+AUX 70_mod_php_concurr.conf-apache2 333 RMD160 d424ee9529e4e34b841aad66138c2513592c8fe0 SHA1 1f7a50895a3d1c3c69012475a8cd261c40517b63 SHA256 a0af540e445efc72cf09d8937f17fbd84559dadf54f2bfc6ed1fd01e46d29269
+AUX eblits/common-v1.eblit 382 RMD160 f0cb6cbdd88f1bbb0d52cfaef7dedca0c2deee8d SHA1 45d55461d7a97da3b5a8b2742c12cef6dab38f6a SHA256 a79d230ac3352e3bf1aa05d083dc9bf5c4b88cbacba0a60666f7dd4a4db6a507
+AUX eblits/common-v2.eblit 377 RMD160 b19bbc6f9b4a483e61c3ffaeec64b084428afeda SHA1 9125ee3ec41d980c656e87466f5046802d0aab28 SHA256 046719f0ba027553bc5f364697ae8b8c15883a0e650fd4c10b26dbc68fa2c948
+AUX eblits/pkg_postinst-v1.eblit 2190 RMD160 90da4acc7e88cfc711642be2d2001f9776a4fb05 SHA1 839ed86f96bbab1db786b1d292a6d969b5eba7f3 SHA256 9eed7c2674b2ab577aee86300d26d07a81e33f38ae11347e56ef1fd593858c3e
+AUX eblits/pkg_postinst-v2.eblit 1112 RMD160 4187aba1143fed1c4fc1bd1d0106e49700211e32 SHA1 1e79fecd26ac8b98ffe436d83592b1da23305d47 SHA256 2ad8f1820bbb8210c0a026e4cc12d4725535587cf8c7051775e9d366a86d7751
+AUX eblits/pkg_setup-v1.eblit 649 RMD160 49cd45971dcb33d1450b723733b9971c35b6352f SHA1 a5390ffebd4d7a3276a13fc6104935d22f9af142 SHA256 520439f84cfea9e5a252be5fd78d2b70b150cef65151c0e222a501178220a33a
+AUX eblits/pkg_setup-v2.eblit 527 RMD160 c8700795e0c3a38538622a02d2dd7d5a34438783 SHA1 affda60b6e4501fb2bc0d50f6d63b6bc78cd6205 SHA256 f7dca5b41844d87cbbcf06d3f46952d892ff0edf58a8b0fc7ba79459180596b5
AUX eblits/pkg_setup-v3.eblit 283 RMD160 f1b8307ad0c1f05e6acdd38fb70cec2c65e47cf8 SHA1 97361e7542a3dc3bb6d803ddab2a150f40ba8531 SHA256 5905eb3e6d984a9f8fe49e088adad99db7249f62a957c19f0ae4bf3f56ecaecd
-AUX eblits/src_compile-v1.eblit 1283 RMD160 83fbb374e2dfaa9d164e6b32b57c268ed06bf519 SHA1 09124cbc9008bfb72eb24cd24b2319d22df52c2c SHA256 5ec76ae24304c5f803a615a98394c219018da1b1ce2018f92f6ac8c5becf6c99
-AUX eblits/src_compile-v2.eblit 515 RMD160 566e373f081d0310768753cde2320966ec5809a5 SHA1 af5d50abc74decb1c3f084d6d5b56dde1afe88d8 SHA256 60fe1529591f7531ad4af37fab1a52e2ffe197f27a19f269b3b62fdbc044261c
-AUX eblits/src_configure-v2.eblit 10855 RMD160 27c70744216912e79707c6861bc7d00a379d690a SHA1 7629d985421b756aa57bcce51d378ff14db675c8 SHA256 cd3002b6c9bd91dc9d7471e416cc631247fb2ad9d7b68981b26a3f83f84c916a
+AUX eblits/src_compile-v1.eblit 1590 RMD160 432774abcac37ebbe9f1ae6e37ca219e83a0205d SHA1 fef7bd6415b59fd0af7f3755efa600b53056ad80 SHA256 c432b5e41489db6bfe1df4f03d77294a0b15dd1a33ad8281ef21a5257ab7f32d
+AUX eblits/src_compile-v2.eblit 1863 RMD160 e33cd34f40e329c532856a6f2e985399f751c563 SHA1 211deba63d0c40af092683f6f38caac0d5b6290c SHA256 16024f409c8f0562e254a5584d49fb72714585d16fc173e5a4bd718d14c5f4ff
+AUX eblits/src_configure-snapshots.eblit 10645 RMD160 ee516961f0780fb1b1f00a25b9d25f1d85bb1e03 SHA1 6a32c5af9084a11826751d7c47118087a5200069 SHA256 aa5af31aa8ac0d14c61e0e950de0b191cca4c9047e17afabd24d1185e4ca0f42
+AUX eblits/src_configure-v1.eblit 9833 RMD160 c49d776f095f6d7f136828d6563255707219fb91 SHA1 a5ce4e6e4b1912a885554791b41e9722c7d23d0c SHA256 8f029f4e75f3121084bba60d3a5784aad3cc10b55507875def0b226c587866ea
+AUX eblits/src_configure-v2.eblit 10802 RMD160 c132856e8a9db17177445709c6e13f021b55ce4a SHA1 c74613cf98a5f60aa3917a02ef8cca69ff09b85d SHA256 5b5bc204e659a5c23a69a934a19e8fbe6f80c8c6c24d7a80af62fdf595b56dca
+AUX eblits/src_configure-v3.eblit 9602 RMD160 fa186b2d070b45dcb345ed483d62981a6c51444d SHA1 95918ffc5fd0e364a1e94a758a64988608c7c5ab SHA256 9234b0b88951c65cd9e416873ea814e342c239e300469ca3077647630c2176d8
+AUX eblits/src_configure-v52.eblit 9731 RMD160 9ca3a5ecc337e8a831372100d5376a8b6d6103bd SHA1 793a817bb570f1433a6bffcb5b0106c63c9a9592 SHA256 06c681947d81fc0fe710ab035dd6b63f42b8dc635046af53c0662ebd8b326a95
AUX eblits/src_configure-v521.eblit 10844 RMD160 90513f59b5f17d680004d3e74581d9eedc8af490 SHA1 a369e2cf7816799f7e2bead8b6eccc2115d0ecdc SHA256 ad875ca45e9ad975c0d7a3cbedc27c5035aa048d7aa935221a15e47cbca63c3d
-AUX eblits/src_configure-v53.eblit 6468 RMD160 b1cd05f6cc4ecbf90d9db075156aecc46cd87a93 SHA1 5e2a86355b5cab42e4d59a288223b165476281e2 SHA256 95f0a22481b07155f9615ee38919f0f0c814142e2cf3fcd632b4f0cf84a73232
-AUX eblits/src_configure-v54.eblit 6372 RMD160 545bedb9c68645f5743eab82bc7f5b77e6140c5f SHA1 b4ceb9a4c796913225e9845def7b7e79dd607fbc SHA256 67b3a69ea9845a2fddebcd5217cd8bee88093dd323cd1b88a958fdd910dfc29f
-AUX eblits/src_install-v2.eblit 5237 RMD160 d1368ba2f7dfe52e8440afea6c5056fd738f5c10 SHA1 b0df591e1b093bdf08414e21a47bfcf5f09b09ac SHA256 860bf8ada8a4900d6a4bdd29bab3e65aff29ba8ddbbba4bec50d9d29c6990ca4
-AUX eblits/src_install-v3.eblit 4744 RMD160 fee820358f16d51ee0a62d0a67b5a9afa4313878 SHA1 dbb9be3ce57123be1d23a4922c5964427e650207 SHA256 a1666bd7ce923ae8a4a4ae6812bb7ff8dab66ca0d00717fa45c17397cc03f25c
-AUX eblits/src_prepare-v2.eblit 2604 RMD160 379dbca3e2ae8c1f09f608220ec9c98d099cb792 SHA1 42afae4e07633535ecea49817f5badd559f10ff1 SHA256 fe7534260fb81a012b8021b5d555756ce8733ad192bf51cedd94f12963811790
+AUX eblits/src_configure-v53.eblit 6729 RMD160 15d8719025cad4422442c4e9ea02e7fc3acbafff SHA1 e05f0b47ae51b36152418b4c884b3ed201c31ae8 SHA256 893d7bc8157898ec2871657e1951601480ef2f83bc1158862e358a634719dc0b
+AUX eblits/src_configure-v54.eblit 6617 RMD160 04fafc3cac722990c66fa190fa38293d81c22ed7 SHA1 91362c1359c1311e4514a65d569180d3a35dfd26 SHA256 1ba1e6a51417e8ed967fd036be1919845b821b8fc0ba3b69b2895d7db013162a
+AUX eblits/src_install-v1.eblit 3652 RMD160 315bffa52a04f81c435f6be373271e91e78b9ffc SHA1 99033c1c0ba831923c39f04ea86936538d7b8db5 SHA256 11009cb401c6d3cbfd88c053983e55ab5f20ffae7d5cc8cfd5a38df6773277e2
+AUX eblits/src_install-v2.eblit 3584 RMD160 3296864c3393fcef3fd70c8f43d0a5a7c3c1760c SHA1 b7eb10bd944caceec0826b948b3e237bd67a7440 SHA256 093ef7303cf6415b7e141918e2382f5624450dc377c32dbbebcb1a926466051d
+AUX eblits/src_install-v3.eblit 4490 RMD160 fa8698c30b6b8b7e4a9ea0b988b00848ddb85aea SHA1 a32b7714fd53d2b139f8ef61b260ed093cffd1b0 SHA256 11eac8c12c4fcefb66538431458cbe396303573c52cc76567392331245a3057c
+AUX eblits/src_prepare-snapshots.eblit 2665 RMD160 dfd1002b024188cb45117e6642a83bdbb5ac2145 SHA1 15feefac55e90fe9adc121112129d630d3385d0f SHA256 9317c8fcd89fe5ddfd78187e2a8bcfa1d130d53d8698d788122459f47ecd61a1
+AUX eblits/src_prepare-v1.eblit 2729 RMD160 6a35296b132f4dae7e50c1dc90eab1936b03da8b SHA1 74536aa354c0ffb9bb43c0ae18821aeb9999e210 SHA256 ddd73b7af087c822ddded875b9adab1d5291a2ecf60aa6e173ec8e20a2233972
+AUX eblits/src_prepare-v2.eblit 2472 RMD160 6ab5ec0487d489b07540f3cedde5d6a00c0235b7 SHA1 e4200d9cd4810b36db468ace4add8a2d0a3501ec SHA256 2d914be15985b7a303069f2b0a5987a522428ffe8519a7c932f10f75b23cc5bf
AUX eblits/src_prepare-v3.eblit 2649 RMD160 5f01f42eef528535866c3b5ade0ded592d1ffd48 SHA1 1bdc640ab548f4e8b78acc305fdd6ceab225daf8 SHA256 7ea3a5351fabeb050161e64c09b98ff945bbdb8b4d1a7fb83d6b4645f277b486
AUX eblits/src_prepare-v4.eblit 2317 RMD160 22833c1caa6f7530230b0809e119eeb2dbba7b27 SHA1 2f7a5fdd113cdf026de5b565fb073e3968db946b SHA256 7c18252a49a6d8e071471d14624f284d7b3ad8b95cad4a001e10e6e521f4c9b1
-AUX eblits/src_test-v1.eblit 1557 RMD160 2afc2b505f2b4bd786635e5b7e997248e93009c3 SHA1 070c2b58b55fc2cec939d7a333057506413e8e99 SHA256 81e9ecf94793377e42508d9e57cd7ab3faff78bce722b84b63999a23bdb2098a
+AUX eblits/src_test-v1.eblit 1480 RMD160 68ef731042ef236efee923649b318239c0219d52 SHA1 81c047f180e43eb1e6b0309ee8d6751950ce1b97 SHA256 ddc836ca2e7b2abac20450fc6eb8c7d30277c567d23051016b903ece1d07a6b2
+AUX mod_php.conf 148 RMD160 3ad646a63e07307b887522f3a1cb3a459f87561d SHA1 61b15673f1435092e0d2a22f15c301bc75f02ab3 SHA256 5826aec6f5bc241bb2a45870d99e99e22185b206f604935b6fb80eb16f556027
+AUX php-5.2.10-pdo_dblib.patch 559 RMD160 062604e291113b2bb86044b5eeffb72fad210fbc SHA1 d59d26e6557dac86e582e1a6ed7bb4795cf150c6 SHA256 0548d63d7379cd19f7ade6ca1222b1b577f684b142ff6b0e8e23742b1f7f9794
+AUX php-5.2.12-libpng14.patch 222 RMD160 d63bd712d077d9606a02d6620c7084bca7197c01 SHA1 a25a47386d625a47698094fc4825208c6ec8f2a4 SHA256 af94a9c2a104dcb037aa059dd46b6f534adb939ea44ad4cb9e3a0a7c49b64fab
+AUX php-fpm-gentooified-5.3.4.patch 1374 RMD160 ca156267f45b4d554052671afaffefc5911003a6 SHA1 b5a2eda1df3b4501d24d2313cd165d4bdff91904 SHA256 6b2a69daa161a46e7f6ec7ca3e3bf1e5af2b682cdf3ef25e61aaf8560634a391
+AUX php-fpm-gentooified.patch 1846 RMD160 60b07cfcf41d41f453aba9a2747dc3d0a26fa016 SHA1 997e4e15057e497a8513a51225cdb9bd29fedd0a SHA256 262c02ad320408314e7635d403bd89b711374fcee09ecb37375e3406a0cc944a
+AUX php-fpm-r0.conf 12898 RMD160 392a60348e233e725232749091f8e93f91ee88e6 SHA1 dff03446838753fcff75f625ccdd9b4cffde8d93 SHA256 8ebd676e058e5b64fbb8b5ed0be693e4da8f6fcedd5e427757afccc13504c48d
+AUX php-fpm-r1.conf 12966 RMD160 2710840ccbd847f74af0486929b6b9af87bf2c51 SHA1 4f0cca8cf24936012c9ee5cb2eaa1a0b391e77b3 SHA256 c4308a92ade93812c6579b74a72cd1f3e1a35f7e63289722f461771d5702448c
+AUX php-fpm-r1.init 616 RMD160 dad98877df1674c3ae4951ae05768e985f443a99 SHA1 5d9ecb42e2fe9bc098beca68df24e7b182dda3b7 SHA256 aa506c4ccbfeefd7c17d1835e272b0f176d16485b6f5c2913ee507cc908b8171
+AUX php-fpm-r3.init 1072 RMD160 f2a22e96e27cf65c0f72ca5253d4f1641ad1e034 SHA1 c7b95fcb7f57f93aff8c5331440513a8d7053880 SHA256 ffc38399a6f877db201c4fbc79fc9bba31074e31680e2683906e6f6dc553c79a
+AUX php-fpm-r4.init 954 RMD160 19a097406bd82fec0a75175fa000c1f6c7757b0d SHA1 cfa42214e35e9abe8bfe099b5aec35ca2230b6ad SHA256 aba14f04126f474d5809b9a7976aca65c6ec895896de736b606c798c4aa04366
+AUX php-fpm.conf 12898 RMD160 392a60348e233e725232749091f8e93f91ee88e6 SHA1 dff03446838753fcff75f625ccdd9b4cffde8d93 SHA256 8ebd676e058e5b64fbb8b5ed0be693e4da8f6fcedd5e427757afccc13504c48d
+AUX php-fpm.init 385 RMD160 0e266738ceb3853ce335db6375b5438bdea597db SHA1 bce556ebbd17e5192250f70ead99e8c70d9529c1 SHA256 baba8dab2cadc8bdf107e6fe5cede2f5faaabff1281781a0a30b3be79964c94e
+AUX php4-ldvs 22 RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 SHA1 8c66355dfb80e2ecc6ee6faae30bf7dbb1727651 SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde
+AUX php5-ldvs 22 RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 SHA1 592398c92575adb14ec972847ce2aca28a7b9c2c SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79
DIST php-5.2.17.tar.bz2 9092312 RMD160 567fa8d718b93fb83a89494c83a8bec224ac99e9 SHA1 d68f3b09f766990d815a3c4c63c157db8dab8095 SHA256 e81beb13ec242ab700e56f366e9da52fd6cf18961d155b23304ca870e53f116c
DIST php-patchset-5.2.17-r0.tar.bz2 8369 RMD160 544af4eb2de8e4478e675810f18a5b494b59709b SHA1 7b3c56437b435f60f72f7af08112e77c01e2f827 SHA256 fb159a02faf5120dd9bc620bd3f3094735f181aa6893273bb7dd29771b8b23b2
DIST suhosin-patch-5.2.16-0.9.7.patch.gz 23069 RMD160 b28b70faf136b3e04c5b483da0f4c2279378f43a SHA1 fec10b2b81582d06bb0d0a96ea55c525afc8ab29 SHA256 aae115a318d80b3f32cedf876e7a8e4b932febb1b0c743c0b398003ebe122f91
-EBUILD php-5.2.17.ebuild 11400 RMD160 442ce96fc819167fe093b1ff754da17b98812805 SHA1 e808e9b24dcfee8f75e8ea465b964a965151f513 SHA256 1e82c08f4348f02817a0932030ecfaa741de1933edda9e884042b9a83aa6b267
+EBUILD php-5.2.17.ebuild 9762 RMD160 3f4ab03709ffbec14366a3715fd3c4d7043b70f6 SHA1 d5c1beb1b70fd9802023c0b21e0fe9815c48787a SHA256 37bb1972d15483d17aae45dae8670a0fda82e8941032fdd1f2a5cc5d2d36241c
+MISC ChangeLog 654 RMD160 8d887e05a028270043bb4d4ac6c50284716de7b1 SHA1 66da52e4ceea844fde5cbf43aa2508bee51dfe12 SHA256 6701656a1136e5a23b64a33d21c0b7069e2157dbdf5a92e98a7577e8d9a6b139
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
diff --git a/dev-lang/php/files/.frozen b/dev-lang/php/files/.frozen
new file mode 100644
index 0000000..3c5228e
--- /dev/null
+++ b/dev-lang/php/files/.frozen
@@ -0,0 +1 @@
+robbat2
diff --git a/dev-lang/php/files/20php4-envd b/dev-lang/php/files/20php4-envd
new file mode 100644
index 0000000..b4eabf7
--- /dev/null
+++ b/dev-lang/php/files/20php4-envd
@@ -0,0 +1,2 @@
+MANPATH="/usr/lib/php4/man/"
+CONFIG_PROTECT_MASK="/etc/php/cli-php4/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/apache1-php4/ext-active/ /etc/php/apache2-php4/ext-active/"
diff --git a/dev-lang/php/files/20php5-envd b/dev-lang/php/files/20php5-envd
new file mode 100644
index 0000000..c69dfb2
--- /dev/null
+++ b/dev-lang/php/files/20php5-envd
@@ -0,0 +1,2 @@
+MANPATH="/usr/lib/php5/man/"
+CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/"
diff --git a/dev-lang/php/files/4-any/CVS/Entries b/dev-lang/php/files/4-any/CVS/Entries
new file mode 100644
index 0000000..77835d6
--- /dev/null
+++ b/dev-lang/php/files/4-any/CVS/Entries
@@ -0,0 +1,8 @@
+D/apache-1.3////
+D/apache-2.0////
+/php4-fastbuild.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4-imap-symlink.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4-iodbc-config.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4-libtool-1.5.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4-uClibc-have_dn_skipname.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4-with-iodbc.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
diff --git a/dev-lang/php/files/4-any/CVS/Repository b/dev-lang/php/files/4-any/CVS/Repository
new file mode 100644
index 0000000..1bc8a44
--- /dev/null
+++ b/dev-lang/php/files/4-any/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4-any
diff --git a/dev-lang/php/files/4-any/CVS/Root b/dev-lang/php/files/4-any/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4-any/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4-any/CVS/Tag b/dev-lang/php/files/4-any/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4-any/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf b/dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf
new file mode 100644
index 0000000..34a41d8
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf
@@ -0,0 +1,19 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/4-any/apache-1.3/CVS/Entries b/dev-lang/php/files/4-any/apache-1.3/CVS/Entries
new file mode 100644
index 0000000..0a4f813
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-1.3/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php.conf/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/4-any/apache-1.3/CVS/Repository b/dev-lang/php/files/4-any/apache-1.3/CVS/Repository
new file mode 100644
index 0000000..073ee00
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-1.3/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4-any/apache-1.3
diff --git a/dev-lang/php/files/4-any/apache-1.3/CVS/Root b/dev-lang/php/files/4-any/apache-1.3/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-1.3/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4-any/apache-1.3/CVS/Tag b/dev-lang/php/files/4-any/apache-1.3/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-1.3/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf b/dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf
new file mode 100644
index 0000000..ce68032
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf
@@ -0,0 +1,19 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/4-any/apache-2.0/CVS/Entries b/dev-lang/php/files/4-any/apache-2.0/CVS/Entries
new file mode 100644
index 0000000..0a4f813
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-2.0/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php.conf/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/4-any/apache-2.0/CVS/Repository b/dev-lang/php/files/4-any/apache-2.0/CVS/Repository
new file mode 100644
index 0000000..de0b025
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-2.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4-any/apache-2.0
diff --git a/dev-lang/php/files/4-any/apache-2.0/CVS/Root b/dev-lang/php/files/4-any/apache-2.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-2.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4-any/apache-2.0/CVS/Tag b/dev-lang/php/files/4-any/apache-2.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4-any/apache-2.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4-any/php4-fastbuild.patch b/dev-lang/php/files/4-any/php4-fastbuild.patch
new file mode 100644
index 0000000..47f0dc7
--- /dev/null
+++ b/dev-lang/php/files/4-any/php4-fastbuild.patch
@@ -0,0 +1,250 @@
+diff -u --recursive php-4.4.0/acinclude.m4 php-4.4.0-cgi/acinclude.m4
+--- php-4.4.0/acinclude.m4 2005-09-14 22:39:22.000000000 +0200
++++ php-4.4.0-cgi/acinclude.m4 2005-09-14 22:39:54.000000000 +0200
+@@ -84,7 +84,7 @@
+ dnl
+ dnl which array to append to?
+ AC_DEFUN([PHP_ADD_SOURCES],[
+- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS))))
+ ])
+ dnl
+ dnl _PHP_ASSIGN_BUILD_VARS(type)
+diff -u --recursive php-4.4.0/configure.in php-4.4.0-cgi/configure.in
+--- php-4.4.0/configure.in 2005-07-11 08:45:09.000000000 +0100
++++ php-4.4.0-cgi/configure.in 2005-09-01 08:00:54.000000000 +0100
+@@ -1216,20 +1216,20 @@
+ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
+
+-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
++all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)'
+ install_targets="$install_modules $install_pear install-build install-headers install-programs"
+
+-case $PHP_SAPI in
+- cgi)
+- install_targets="install-sapi $install_targets"
+- ;;
+- cli)
+- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+- *)
+- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+-esac
++if test "$PHP_SAPI_CGI" != "no" ; then
++ install_targets="install-sapi $install_targets"
++fi
++
++if test "$PHP_SAPI_CLI" != "no" ; then
++ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
++fi
++
++if test "$PHP_SAPI" != "default" ; then
++ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
++fi
+
+ PHP_SUBST(all_targets)
+ PHP_SUBST(install_targets)
+diff -u --recursive php-4.4.0/sapi/cgi/Makefile.frag php-4.4.0-cgi/sapi/cgi/Makefile.frag
+--- php-4.4.0/sapi/cgi/Makefile.frag 2003-07-02 02:06:29.000000000 +0100
++++ php-4.4.0-cgi/sapi/cgi/Makefile.frag 2005-09-01 08:03:20.000000000 +0100
+@@ -1,2 +1,6 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS)
+ $(BUILD_CGI)
++
++install-cgi: $(SAPI_CGI_PATH)
++ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
++ @$(INSTALL_CGI)
+diff -u --recursive php-4.4.0/sapi/cgi/config9.m4 php-4.4.0-cgi/sapi/cgi/config9.m4
+--- php-4.4.0/sapi/cgi/config9.m4 2004-12-30 07:02:18.000000000 +0000
++++ php-4.4.0-cgi/sapi/cgi/config9.m4 2005-09-01 08:05:08.000000000 +0100
+@@ -81,93 +81,107 @@
+ ])
+
+
+-if test "$PHP_SAPI" = "default"; then
+- AC_MSG_CHECKING(for CGI build)
+- if test "$PHP_SAPI_CGI" != "no"; then
+- AC_MSG_RESULT(yes)
+-
+- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
+- case $host_alias in
+- *cygwin* )
+- SAPI_CGI_PATH=sapi/cgi/php.exe
+- ;;
+- * )
+- SAPI_CGI_PATH=sapi/cgi/php
+- ;;
+- esac
+- PHP_SUBST(SAPI_CGI_PATH)
+-
+- PHP_TEST_WRITE_STDOUT
+-
+- AC_MSG_CHECKING(whether to force Apache CGI redirect)
+- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
+- REDIRECT=1
+- else
+- REDIRECT=0
+- fi
+- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
+- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
++AC_MSG_CHECKING(for CGI build)
++if test "$PHP_SAPI_CGI" != "no"; then
++ AC_MSG_RESULT(yes)
++
++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
++ case $host_alias in
++ *cygwin* )
++ SAPI_CGI_PATH=sapi/cgi/php.exe
++ ;;
++ * )
++ SAPI_CGI_PATH=sapi/cgi/php
++ ;;
++ esac
++ PHP_SUBST(SAPI_CGI_PATH)
+
++ PHP_TEST_WRITE_STDOUT
+
+- AC_MSG_CHECKING(whether to discard path_info + path_translated)
+- if test "$PHP_DISCARD_PATH" = "yes"; then
+- DISCARD_PATH=1
+- else
+- DISCARD_PATH=0
+- fi
+- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
+- AC_MSG_RESULT($PHP_DISCARD_PATH)
++ AC_MSG_CHECKING(whether to force Apache CGI redirect)
++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
++ REDIRECT=1
++ else
++ REDIRECT=0
++ fi
++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
+
+- AC_MSG_CHECKING(whether to enable path info checking)
+- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
+- ENABLE_PATHINFO_CHECK=1
+- else
+- ENABLE_PATHINFO_CHECK=0
+- fi
+- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
+
+- AC_MSG_CHECKING(whether to enable fastcgi support)
+- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
+- if test -z $PHP_LIBFCGI_DIR; then
+- echo "$PHP_LIBFCGI_DIR does not exist"
+- exit 1
+- fi
+- if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
+- PHP_FASTCGI=1
+- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
+- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
+- PHP_FCGI_STATIC=1
+- else
+- PHP_FASTCGI=0
+- PHP_FCGI_FILES=""
+- PHP_FCGI_INCLUDE=""
+- PHP_FCGI_STATIC=0
+- fi
+- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
+- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+-
+- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)')
+-
+- case $host_alias in
+- *darwin*)
+- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ AC_MSG_CHECKING(whether to discard path_info + path_translated)
++ if test "$PHP_DISCARD_PATH" = "yes"; then
++ DISCARD_PATH=1
++ else
++ DISCARD_PATH=0
++ fi
++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
++ AC_MSG_RESULT($PHP_DISCARD_PATH)
++
++ AC_MSG_CHECKING(whether to enable path info checking)
++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
++ ENABLE_PATHINFO_CHECK=1
++ else
++ ENABLE_PATHINFO_CHECK=0
++ fi
++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
++
++ AC_MSG_CHECKING(whether to enable fastcgi support)
++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
++ if test -z $PHP_LIBFCGI_DIR; then
++ echo "$PHP_LIBFCGI_DIR does not exist"
++ exit 1
++ fi
++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then
++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
++ PHP_FASTCGI=1
++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
++ PHP_FCGI_STATIC=1
++ else
++ PHP_FASTCGI=0
++ PHP_FCGI_FILES=""
++ PHP_FCGI_INCLUDE=""
++ PHP_FCGI_STATIC=0
++ fi
++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
++
++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi)
++ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi)
++
++ case $host_alias in
++ *darwin*)
++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- *)
+- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ *)
++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- esac
++ esac
+
+- PHP_SUBST(BUILD_CGI)
++ PHP_CGI_TARGET="$SAPI_CGI_PATH"
++ PHP_INSTALL_CGI_TARGET="install-cgi"
+
+- elif test "$PHP_SAPI_CLI" != "no"; then
+- AC_MSG_RESULT(no)
+- OVERALL_TARGET=
+- PHP_SAPI=cli
+- else
+- AC_MSG_ERROR([No SAPIs selected.])
++ PHP_SUBST(BUILD_CGI)
++ PHP_SUBST(INSTALL_CGI)
++ PHP_SUBST(PHP_CGI_OBJS)
++ PHP_SUBST(PHP_CGI_TARGET)
++ PHP_SUBST(PHP_INSTALL_CGI_TARGET)
++
++ if test "$PHP_SAPI" = "default" ; then
++ PHP_BUILD_PROGRAM($SAPI_CGI_PATH)
++ fi
++
++else
++ AC_MSG_RESULT(no)
++ if test "$PHP_SAPI" = "default" ; then
++ if test "$PHP_SAPI_CLI" != "no"; then
++ OVERALL_TARGET=
++ PHP_SAPI=cli
++ else
++ AC_MSG_ERROR([No SAPIs selected.])
++ fi
+ fi
+ fi
diff --git a/dev-lang/php/files/4-any/php4-imap-symlink.diff b/dev-lang/php/files/4-any/php4-imap-symlink.diff
new file mode 100644
index 0000000..cf74905
--- /dev/null
+++ b/dev-lang/php/files/4-any/php4-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 02:48:47.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 02:49:05.000000000 +0200
+@@ -158,12 +158,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/lib/c-client.a"; then
+- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
diff --git a/dev-lang/php/files/4-any/php4-iodbc-config.diff b/dev-lang/php/files/4-any/php4-iodbc-config.diff
new file mode 100644
index 0000000..a706916
--- /dev/null
+++ b/dev-lang/php/files/4-any/php4-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-10 02:05:26.000000000 +0200
++++ ext/odbc/config.m4 2005-08-10 02:06:10.000000000 +0200
+@@ -401,9 +401,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/lib
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/4-any/php4-libtool-1.5.patch b/dev-lang/php/files/4-any/php4-libtool-1.5.patch
new file mode 100644
index 0000000..0761203
--- /dev/null
+++ b/dev-lang/php/files/4-any/php4-libtool-1.5.patch
@@ -0,0 +1,19 @@
+--- acinclude.m4 2005-09-08 13:16:38.000000000 +0200
++++ acinclude.m4 2005-09-08 13:21:09.000000000 +0200
+@@ -783,12 +783,12 @@
+ dnl
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+- php_c_pre='$(CC)'
++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=' && echo > $[@]'
+- php_cxx_pre='$(CXX)'
++ php_c_post=
++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=' && echo > $[@]'
++ php_cxx_post=
+ php_lo=o
+
+ case $with_pic in
diff --git a/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch b/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch
new file mode 100644
index 0000000..3a86dfb
--- /dev/null
+++ b/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch
@@ -0,0 +1,30 @@
+--- ext/standard/dns.c
++++ ext/standard/dns.c
+@@ -275,6 +275,7 @@ PHP_FUNCTION(checkdnsrr)
+ #define MAXHOSTNAMELEN 256
+ #endif /* MAXHOSTNAMELEN */
+
++#if HAVE_DN_SKIPNAME
+ /* {{{ proto int getmxrr(string hostname, array mxhosts [, array weight])
+ Get MX records corresponding to a given Internet host name */
+ PHP_FUNCTION(getmxrr)
+@@ -355,6 +356,7 @@ PHP_FUNCTION(getmxrr)
+ RETURN_TRUE;
+ }
+ /* }}} */
++#endif /* HAVE_DN_SKIPNAME */
+
+ #endif
+ /*
+--- ext/standard/basic_functions.c
++++ ext/standard/basic_functions.c
+@@ -449,7 +449,9 @@ function_entry basic_functions[] = {
+
+ #if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE))
+ PHP_FE(checkdnsrr, NULL)
++# if HAVE_DN_SKIPNAME
+ PHP_FE(getmxrr,second_and_third_args_force_ref)
++# endif
+ #endif
+
+ PHP_FE(getmyuid, NULL)
diff --git a/dev-lang/php/files/4-any/php4-with-iodbc.diff b/dev-lang/php/files/4-any/php4-with-iodbc.diff
new file mode 100644
index 0000000..81afcc0
--- /dev/null
+++ b/dev-lang/php/files/4-any/php4-with-iodbc.diff
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
+ #define SQL_CURSOR_DYNAMIC 2UL
diff --git a/dev-lang/php/files/4.3.11/CVS/Entries b/dev-lang/php/files/4.3.11/CVS/Entries
new file mode 100644
index 0000000..58a7e39
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/CVS/Entries
@@ -0,0 +1,15 @@
+/php4.3.11-apache2sapi.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.3.11-apachesapi.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.3.11-curl-open_basedir.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.3.11-curl_safemode.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php4.3.11-fopen_wrappers.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.3.11-gd-safe_mode.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.3.11-gd_safe_mode.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.3.11-globals_overwrite.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php4.3.11-mbstring-header_inj.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.3.11-multilib-search-path.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.3.11-pcre-security.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.3.11-phpinfo_xss.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php4.3.11-pspell-ext-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.3.11-session_save_path-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/4.3.11/CVS/Repository b/dev-lang/php/files/4.3.11/CVS/Repository
new file mode 100644
index 0000000..19a4434
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4.3.11
diff --git a/dev-lang/php/files/4.3.11/CVS/Root b/dev-lang/php/files/4.3.11/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4.3.11/CVS/Tag b/dev-lang/php/files/4.3.11/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch b/dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch
new file mode 100644
index 0000000..e6b4337
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-apache2sapi.patch
@@ -0,0 +1,170 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100
++++ sapi/apache2handler/sapi_apache2.c 2005-12-03 02:34:22.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.8 2005/11/18 19:03:13 iliaa Exp $ */
+
+ #include <fcntl.h>
+
+@@ -268,23 +268,18 @@
+ TSRMLS_FETCH();
+
+ ctx = SG(server_context);
+-
+- /* We use APLOG_STARTUP because it keeps us from printing the
+- * data and time information at the beginning of the error log
+- * line. Not sure if this is correct, but it mirrors what happens
+- * with Apache 1.3 -- rbb
+- */
++
+ if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
+ ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
+ } else {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg);
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg);
+ }
+ }
+
+ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
+ {
+ if (r) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename);
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
+ } else {
+ php_apache_sapi_log_message(msg);
+ }
+@@ -448,6 +443,18 @@
+ php_request_shutdown(NULL);
+ }
+
++static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
++{
++ if (strcmp(r->protocol, "INCLUDED")) {
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
++ }
++ if (p) {
++ ((php_struct *)SG(server_context))->r = p;
++ } else {
++ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup);
++ }
++}
++
+ static int php_handler(request_rec *r)
+ {
+ php_struct *ctx;
+@@ -458,15 +465,31 @@
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
++
+ conf = ap_get_module_config(r->per_dir_config, &php4_module);
++
++ /* apply_config() needs r in some cases, so allocate server_context early */
++ ctx = SG(server_context);
++ if (ctx == NULL) {
++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++ /* register a cleanup so we clear out the SG(server_context)
++ * after each request. Note: We pass in the pointer to the
++ * server_context in case this is handled by a different thread.
++ */
++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++ ctx->r = r;
++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++ } else {
++ parent_req = ctx->r;
++ ctx->r = r;
++ }
+ apply_config(conf);
+
+ if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+ /* Check for xbithack in this case. */
+ if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+ }
+@@ -475,32 +498,24 @@
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+
+ /* handle situations where user turns the engine off */
+ if (!AP2(engine)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_FORBIDDEN;
+ }
+
+@@ -516,24 +531,30 @@
+
+ zend_first_try {
+
+- ctx = SG(server_context);
+ if (ctx == NULL) {
+- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+- /* register a cleanup so we clear out the SG(server_context)
+- * after each request. Note: We pass in the pointer to the
+- * server_context in case this is handled by a different thread.
+- */
+- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+- ctx->r = r;
++normal:
+ brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++ ctx = SG(server_context);
+ ctx->brigade = brigade;
+
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
+ } else {
+- parent_req = ctx->r;
++ if (!parent_req) {
++ parent_req = ctx->r;
++ }
++ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++ zend_bailout();
++ }
++ }
++
++ /* check if comming due to ErrorDocument */
++ if (parent_req && parent_req->status != HTTP_OK) {
++ parent_req = NULL;
++ goto normal;
++ }
+ ctx->r = r;
+ brigade = ctx->brigade;
+ }
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch b/dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch
new file mode 100644
index 0000000..82480c7
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-apachesapi.patch
@@ -0,0 +1,33 @@
+--- sapi/apache/mod_php4.c 2004-07-21 18:25:28.000000000 +0200
++++ sapi/apache/mod_php4.c 2005-05-19 18:14:46.000000000 +0200
+@@ -17,7 +17,7 @@
+ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+ +----------------------------------------------------------------------+
+ */
+-/* $Id: mod_php4.c,v 1.146.2.14 2004/07/21 16:25:28 sesser Exp $ */
++/* $Id: mod_php4.c,v 1.146.2.15 2005/05/19 16:14:46 rasmus Exp $ */
+
+ #include "php_apache_http.h"
+ #include "http_conf_globals.h"
+@@ -209,12 +209,18 @@
+ */
+ static int sapi_apache_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
+ {
+- if(SG(server_context) == NULL) { /* server_context is not here anymore */
++ request_rec *r = SG(server_context);
++
++ if(r == NULL) { /* server_context is not here anymore */
+ return SAPI_HEADER_SEND_FAILED;
+ }
+
+- ((request_rec *) SG(server_context))->status = SG(sapi_headers).http_response_code;
+- send_http_header((request_rec *) SG(server_context));
++ r->status = SG(sapi_headers).http_response_code;
++ if(r->status==304) {
++ send_error_response(r,0);
++ } else {
++ send_http_header(r);
++ }
+ return SAPI_HEADER_SENT_SUCCESSFULLY;
+ }
+ /* }}} */
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch b/dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch
new file mode 100644
index 0000000..8817cab
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-curl-open_basedir.patch
@@ -0,0 +1,143 @@
+--- ext/curl/curl.c 2005-03-14 10:03:09.000000000 +0100
++++ ext/curl/curl.c 2005-12-03 02:34:31.000000000 +0100
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: curl.c,v 1.124.2.29 2005/03/14 09:03:09 sniper Exp $ */
++/* $Id: curl.c,v 1.124.2.30.2.3 2005/10/17 02:42:51 iliaa Exp $ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+@@ -66,8 +66,8 @@
+ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+- if (PG(open_basedir) && *PG(open_basedir) && \
+- strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
++ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
++ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+ \
+@@ -76,7 +76,7 @@
+ RETURN_FALSE; \
+ } \
+ \
+- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
+@@ -436,10 +436,12 @@
+ zend_list_addref(ch->id);
+ ZVAL_STRINGL(argv[1], data, length, 1);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ t->func,
+ retval, 2, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION",
+ get_active_function_name(TSRMLS_C));
+@@ -495,10 +497,12 @@
+ zend_list_addref(t->fd);
+ ZVAL_LONG(argv[2], (int) size * nmemb);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ t->func,
+ retval, 3, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
+ get_active_function_name(TSRMLS_C));
+@@ -553,10 +557,12 @@
+ zend_list_addref(ch->id);
+ ZVAL_STRINGL(argv[1], data, length, 1);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ t->func,
+ retval, 2, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION",
+ get_active_function_name(TSRMLS_C));
+@@ -606,10 +612,12 @@
+ ZVAL_STRING(argv[1], prompt, 1);
+ ZVAL_LONG(argv[2], buflen);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ func,
+ retval, 2, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
+ } else if (Z_TYPE_P(retval) == IS_STRING) {
+@@ -680,7 +688,9 @@
+ (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
+ (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
+ memset(&(*ch)->err, 0, sizeof((*ch)->err));
+-
++
++ (*ch)->in_callback = 0;
++
+ zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
+ (void(*)(void *)) curl_free_string, 0);
+ zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist),
+@@ -982,10 +992,15 @@
+
+ postval = Z_STRVAL_PP(current);
+ if (*postval == '@') {
++ ++postval;
++ /* safe_mode / open_basedir check */
++ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
++ RETURN_FALSE;
++ }
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,
+- CURLFORM_FILE, ++postval,
++ CURLFORM_FILE, postval,
+ CURLFORM_END);
+ }
+ else {
+@@ -1337,7 +1352,11 @@
+ WRONG_PARAM_COUNT;
+ }
+ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
+-
++
++ if (ch->in_callback) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close CURL handle from a callback");
++ return;
++ }
+ zend_list_delete(Z_LVAL_PP(zid));
+ }
+ /* }}} */
+--- ext/curl/php_curl.h 2002-12-31 17:34:15.000000000 +0100
++++ ext/curl/php_curl.h 2005-06-02 23:05:06.000000000 +0200
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_curl.h,v 1.29.2.1 2002/12/31 16:34:15 sebastian Exp $ */
++/* $Id: php_curl.h,v 1.29.2.2 2005/06/02 21:05:06 tony2001 Exp $ */
+
+ #ifndef _PHP_CURL_H
+ #define _PHP_CURL_H
+@@ -93,6 +93,7 @@
+ struct _php_curl_free to_free;
+ long id;
+ unsigned int uses;
++ zend_bool in_callback;
+ } php_curl;
+
+ /* streams support */
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-curl_safemode.patch b/dev-lang/php/files/4.3.11/php4.3.11-curl_safemode.patch
new file mode 100644
index 0000000..f308dea
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-curl_safemode.patch
@@ -0,0 +1,141 @@
+--- ext/curl/curl.c 2005-03-14 10:03:09.000000000 +0100
++++ ext/curl/curl.c 2005-10-17 04:42:51.000000000 +0200
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: curl.c,v 1.124.2.29 2005/03/14 09:03:09 sniper Exp $ */
++/* $Id: curl.c,v 1.124.2.30.2.3 2005/10/17 02:42:51 iliaa Exp $ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+@@ -66,7 +66,7 @@
+ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+- if (PG(open_basedir) && *PG(open_basedir) && \
++ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
+ strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+@@ -76,7 +76,7 @@
+ RETURN_FALSE; \
+ } \
+ \
+- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
+@@ -436,10 +436,12 @@
+ zend_list_addref(ch->id);
+ ZVAL_STRINGL(argv[1], data, length, 1);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ t->func,
+ retval, 2, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION",
+ get_active_function_name(TSRMLS_C));
+@@ -495,10 +497,12 @@
+ zend_list_addref(t->fd);
+ ZVAL_LONG(argv[2], (int) size * nmemb);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ t->func,
+ retval, 3, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
+ get_active_function_name(TSRMLS_C));
+@@ -553,10 +557,12 @@
+ zend_list_addref(ch->id);
+ ZVAL_STRINGL(argv[1], data, length, 1);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ t->func,
+ retval, 2, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION",
+ get_active_function_name(TSRMLS_C));
+@@ -606,10 +612,12 @@
+ ZVAL_STRING(argv[1], prompt, 1);
+ ZVAL_LONG(argv[2], buflen);
+
++ ch->in_callback = 1;
+ error = call_user_function(EG(function_table),
+ NULL,
+ func,
+ retval, 2, argv TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
+ } else if (Z_TYPE_P(retval) == IS_STRING) {
+@@ -680,7 +688,9 @@
+ (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
+ (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
+ memset(&(*ch)->err, 0, sizeof((*ch)->err));
+-
++
++ (*ch)->in_callback = 0;
++
+ zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
+ (void(*)(void *)) curl_free_string, 0);
+ zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist),
+@@ -982,10 +992,15 @@
+
+ postval = Z_STRVAL_PP(current);
+ if (*postval == '@') {
++ ++postval;
++ /* safe_mode / open_basedir check */
++ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
++ RETURN_FALSE;
++ }
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,
+- CURLFORM_FILE, ++postval,
++ CURLFORM_FILE, postval,
+ CURLFORM_END);
+ }
+ else {
+@@ -1337,7 +1352,11 @@
+ WRONG_PARAM_COUNT;
+ }
+ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
+-
++
++ if (ch->in_callback) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close CURL handle from a callback");
++ return;
++ }
+ zend_list_delete(Z_LVAL_PP(zid));
+ }
+ /* }}} */
+--- ext/curl/php_curl.h 2002-12-31 17:34:15.000000000 +0100
++++ ext/curl/php_curl.h 2005-06-02 23:05:06.000000000 +0200
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_curl.h,v 1.29.2.1 2002/12/31 16:34:15 sebastian Exp $ */
++/* $Id: php_curl.h,v 1.29.2.2 2005/06/02 21:05:06 tony2001 Exp $ */
+
+ #ifndef _PHP_CURL_H
+ #define _PHP_CURL_H
+@@ -93,6 +93,7 @@
+ struct _php_curl_free to_free;
+ long id;
+ unsigned int uses;
++ zend_bool in_callback;
+ } php_curl;
+
+ /* streams support */
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch b/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch
new file mode 100644
index 0000000..672da5e
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10
++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2
+@@ -16,7 +16,7 @@
+ | Jim Winstead <jimw@php.net> |
+ +----------------------------------------------------------------------+
+ */
+-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */
++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */
+
+ /* {{{ includes
+ */
+@@ -36,14 +36,6 @@
+ #include <winsock.h>
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -57,8 +49,6 @@
+ #if HAVE_PWD_H
+ #ifdef PHP_WIN32
+ #include "win32/pwd.h"
+-#elif defined(NETWARE)
+-#include "netware/pwd.h"
+ #else
+ #include <pwd.h>
+ #endif
+@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based
+ /* Handler for basedirs that end with a / */
+ resolved_basedir_len = strlen(resolved_basedir);
+ if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+- if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+ resolved_basedir[++resolved_basedir_len] = '\0';
+ }
+ }
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch b/dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch
new file mode 100644
index 0000000..15f2f95
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-gd-safe_mode.patch
@@ -0,0 +1,131 @@
+--- ext/gd/gd.c 2005-01-17 18:07:57.000000000 +0100
++++ ext/gd/gd.c 2005-12-03 02:34:41.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */
++/* $Id: gd.c,v 1.221.2.56.2.3 2005/11/03 20:20:04 sniper Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+ Cold Spring Harbor Labs. */
+@@ -623,7 +623,7 @@
+
+ convert_to_string_ex(file);
+
+- stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
++ stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
+@@ -807,6 +807,10 @@
+ convert_to_boolean_ex(dither);
+ convert_to_long_ex(ncolors);
+
++ if (Z_LVAL_PP(ncolors) <= 0) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero");
++ RETURN_FALSE;
++ }
+ gdImageTrueColorToPalette(im, Z_LVAL_PP(dither), Z_LVAL_PP(ncolors));
+
+ RETURN_TRUE;
+@@ -1436,7 +1440,7 @@
+
+ fn = Z_STRVAL_PP(file);
+
+- stream = php_stream_open_wrapper(fn, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
++ stream = php_stream_open_wrapper(fn, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
+@@ -1644,10 +1648,7 @@
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
+
+ fp = VCWD_FOPEN(fn, "wb");
+ if (!fp) {
+@@ -1699,7 +1700,7 @@
+ char buf[4096];
+ char *path;
+
+- tmp = php_open_temporary_file("", "", &path TSRMLS_CC);
++ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC);
+ if (tmp == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
+ RETURN_FALSE;
+@@ -3017,7 +3018,8 @@
+ {
+ zval *IM, *EXT = NULL;
+ gdImagePtr im=NULL;
+- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8];
++ long col = -1, x = -1, y = -1;
++ int str_len, fontname_len, i, brect[8];
+ double ptsize, angle;
+ unsigned char *str = NULL, *fontname = NULL;
+ char *error = NULL;
+@@ -3741,16 +3743,10 @@
+ }
+
+ /* Check origin file */
+- if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn_org, "Invalid origin filename");
+
+ /* Check destination file */
+- if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn_dest, "Invalid destination filename");
+
+ /* Open origin file */
+ org = VCWD_FOPEN(fn_org, "rb");
+--- ext/gd/gd_ctx.c 2004-01-28 17:27:42.000000000 +0100
++++ ext/gd/gd_ctx.c 2005-12-03 02:34:41.000000000 +0100
+@@ -73,10 +73,7 @@
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
+
+ fp = VCWD_FOPEN(fn, "wb");
+ if (!fp) {
+--- ext/gd/php_gd.h 2003-03-31 10:49:30.000000000 +0200
++++ ext/gd/php_gd.h 2005-12-03 02:34:41.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_gd.h,v 1.44.2.5 2003/03/31 08:49:30 sniper Exp $ */
++/* $Id: php_gd.h,v 1.44.2.5.8.2 2005/11/15 08:15:36 sniper Exp $ */
+
+ #ifndef PHP_GD_H
+ #define PHP_GD_H
+@@ -30,6 +30,15 @@
+
+ #if HAVE_LIBGD
+
++/* open_basedir and safe_mode checks */
++#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
++ if (!filename || filename == empty_string || php_check_open_basedir(filename TSRMLS_CC) || \
++ (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \
++ ) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
++ RETURN_FALSE; \
++ }
++
+ #define PHP_GDIMG_TYPE_GIF 1
+ #define PHP_GDIMG_TYPE_PNG 2
+ #define PHP_GDIMG_TYPE_JPG 3
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch b/dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch
new file mode 100644
index 0000000..1901112
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch
@@ -0,0 +1,39 @@
+--- ext/gd/gd.c 2005/01/17 17:07:57 1.221.2.54
++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */
++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+ Cold Spring Harbor Labs. */
+@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+ RETURN_FALSE;
+ }
+@@ -1699,7 +1699,7 @@ static void _php_image_output(INTERNAL_F
+ char buf[4096];
+ char *path;
+
+- tmp = php_open_temporary_file("", "", &path TSRMLS_CC);
++ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC);
+ if (tmp == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
+ RETURN_FALSE;
+@@ -3017,7 +3017,8 @@ static void php_imagettftext_common(INTE
+ {
+ zval *IM, *EXT = NULL;
+ gdImagePtr im=NULL;
+- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8];
++ long col = -1, x = -1, y = -1;
++ int str_len, fontname_len, i, brect[8];
+ double ptsize, angle;
+ unsigned char *str = NULL, *fontname = NULL;
+ char *error = NULL;
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch b/dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch
new file mode 100644
index 0000000..d3eb55c
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-globals_overwrite.patch
@@ -0,0 +1,559 @@
+--- ext/standard/array.c 2004-12-23 17:40:03.000000000 +0100
++++ ext/standard/array.c 2005-10-31 23:26:23.000000000 +0100
+@@ -22,7 +22,7 @@
+ */
+
+
+-/* $Id: array.c,v 1.199.2.42 2004/12/23 16:40:03 tony2001 Exp $ */
++/* $Id: array.c,v 1.199.2.44.2.9 2005/10/03 14:05:07 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -631,7 +640,7 @@
+ s = *((Bucket **) b);
+
+ if (f->nKeyLength) {
+- Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength);
++ Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength-1);
+ Z_STRLEN(key1) = f->nKeyLength-1;
+ Z_TYPE(key1) = IS_STRING;
+ } else {
+@@ -639,7 +648,7 @@
+ Z_TYPE(key1) = IS_LONG;
+ }
+ if (s->nKeyLength) {
+- Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength);
++ Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength-1);
+ Z_STRLEN(key2) = s->nKeyLength-1;
+ Z_TYPE(key2) = IS_STRING;
+ } else {
+@@ -1243,6 +1252,10 @@
+ /* break omitted intentionally */
+
+ case EXTR_OVERWRITE:
++ /* GLOBALS protection */
++ if (var_exists && !strcmp(var_name, "GLOBALS")) {
++ break;
++ }
+ smart_str_appendl(&final_name, var_name, var_name_len);
+ break;
+
+@@ -1291,14 +1304,18 @@
+ zval **orig_var;
+
+ if (zend_hash_find(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) &orig_var) == SUCCESS) {
+- zval_ptr_dtor(orig_var);
+-
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
+ zval_add_ref(entry);
+
++ zval_ptr_dtor(orig_var);
++
+ *orig_var = *entry;
+ } else {
+- (*entry)->is_ref = 1;
++ if ((*var_array)->refcount > 1) {
++ SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
++ } else {
++ (*entry)->is_ref = 1;
++ }
+ zval_add_ref(entry);
+ zend_hash_update(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) entry, sizeof(zval *), NULL);
+ }
+@@ -1818,8 +1835,8 @@
+ hashtable and replace it with new one */
+ new_hash = php_splice(Z_ARRVAL_P(stack), 0, 0, &args[1], argc-1, NULL);
+ zend_hash_destroy(Z_ARRVAL_P(stack));
+- efree(Z_ARRVAL_P(stack));
+- Z_ARRVAL_P(stack) = new_hash;
++ *Z_ARRVAL_P(stack) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up and return the number of elements in the stack */
+ efree(args);
+@@ -1896,8 +1913,8 @@
+
+ /* Replace input array's hashtable with the new one */
+ zend_hash_destroy(Z_ARRVAL_P(array));
+- efree(Z_ARRVAL_P(array));
+- Z_ARRVAL_P(array) = new_hash;
++ *Z_ARRVAL_P(array) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up */
+ if (argc == 4)
+@@ -2384,8 +2401,8 @@
+
+ /* Copy the result hash into return value */
+ zend_hash_destroy(Z_ARRVAL_P(return_value));
+- efree(Z_ARRVAL_P(return_value));
+- Z_ARRVAL_P(return_value) = new_hash;
++ *Z_ARRVAL_P(return_value) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up */
+ efree(pads);
+@@ -2483,7 +2500,7 @@
+ zend_hash_index_update(Z_ARRVAL_P(return_value), num_key, entry, sizeof(entry), NULL);
+ break;
+ case HASH_KEY_IS_STRING:
+- new_key=estrndup(string_key,str_key_len);
++ new_key=estrndup(string_key,str_key_len - 1);
+ if (change_to_upper)
+ php_strtoupper(new_key, str_key_len - 1);
+ else
+@@ -2609,6 +2626,15 @@
+ /* copy the argument array */
+ *return_value = **args[0];
+ zval_copy_ctor(return_value);
++ if (return_value->value.ht == &EG(symbol_table)) {
++ HashTable *ht;
++ zval *tmp;
++
++ ALLOC_HASHTABLE(ht);
++ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
++ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++ return_value->value.ht = ht;
++ }
+
+ /* go through the lists and look for common values */
+ while (*ptrs[0]) {
+@@ -2759,6 +2785,15 @@
+ /* copy the argument array */
+ *return_value = **args[0];
+ zval_copy_ctor(return_value);
++ if (return_value->value.ht == &EG(symbol_table)) {
++ HashTable *ht;
++ zval *tmp;
++
++ ALLOC_HASHTABLE(ht);
++ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
++ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++ return_value->value.ht = ht;
++ }
+
+ /* go through the lists and look for values of ptr[0]
+ that are not in the others */
+@@ -3229,8 +3264,11 @@
+ efree(callback_name);
+
+ if (ZEND_NUM_ARGS() > 2) {
+- convert_to_long_ex(initial);
+- result = *initial;
++ ALLOC_ZVAL(result);
++ *result = **initial;
++ zval_copy_ctor(result);
++ convert_to_long(result);
++ INIT_PZVAL(result);
+ } else {
+ MAKE_STD_ZVAL(result);
+ ZVAL_NULL(result);
+@@ -3246,6 +3284,7 @@
+ if (result) {
+ *return_value = *result;
+ zval_copy_ctor(return_value);
++ zval_ptr_dtor(&result);
+ }
+ return;
+ }
+@@ -3282,6 +3321,7 @@
+ PHP_FUNCTION(array_filter)
+ {
+ zval **input, **callback = NULL;
++ zval *array, *func = NULL;
+ zval **operand;
+ zval **args[1];
+ zval *retval = NULL;
+@@ -3300,9 +3340,13 @@
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array");
+ return;
+ }
++ if (callback) {
++ func = *callback;
++ }
++ array = *input;
+
+ if (ZEND_NUM_ARGS() > 1) {
+- if (!zend_is_callable(*callback, 0, &callback_name)) {
++ if (!zend_is_callable(func, 0, &callback_name)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument, '%s', should be a valid callback", callback_name);
+ efree(callback_name);
+ return;
+@@ -3311,16 +3355,16 @@
+ }
+
+ array_init(return_value);
+- if (zend_hash_num_elements(Z_ARRVAL_PP(input)) == 0)
++ if (zend_hash_num_elements(Z_ARRVAL_P(array)) == 0)
+ return;
+
+- for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos);
+- zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&operand, &pos) == SUCCESS;
+- zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &pos)) {
++ for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), &pos);
++ zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **)&operand, &pos) == SUCCESS;
++ zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) {
+
+- if (callback) {
++ if (func) {
+ args[0] = operand;
+- if (call_user_function_ex(EG(function_table), NULL, *callback, &retval, 1, args, 0, NULL TSRMLS_CC) == SUCCESS && retval) {
++ if (call_user_function_ex(EG(function_table), NULL, func, &retval, 1, args, 0, NULL TSRMLS_CC) == SUCCESS && retval) {
+ if (!zend_is_true(retval)) {
+ zval_ptr_dtor(&retval);
+ continue;
+@@ -3334,7 +3378,7 @@
+ continue;
+
+ zval_add_ref(operand);
+- switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &pos)) {
++ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(array), &string_key, &string_key_len, &num_key, 0, &pos)) {
+ case HASH_KEY_IS_STRING:
+ zend_hash_update(Z_ARRVAL_P(return_value), string_key,
+ string_key_len, operand, sizeof(zval *), NULL);
+@@ -3401,6 +3445,7 @@
+ efree(array_pos);
+ return;
+ }
++ SEPARATE_ZVAL_IF_NOT_REF(pargs[i]);
+ args[i] = *pargs[i];
+ array_len[i] = zend_hash_num_elements(Z_ARRVAL_PP(pargs[i]));
+ if (array_len[i] > maxlen) {
+--- ext/standard/basic_functions.c 2005-01-18 12:01:20.000000000 +0100
++++ ext/standard/basic_functions.c 2005-10-31 23:29:26.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: basic_functions.c,v 1.543.2.47 2005/01/18 11:01:20 sniper Exp $ */
++/* $Id: basic_functions.c,v 1.543.2.51.2.3 2005/09/29 16:31:48 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_streams.h"
+@@ -42,18 +42,7 @@
+ #include <time.h>
+ #include <stdio.h>
+
+-#ifndef NETWARE
+ #include <netdb.h>
+-#else
+-/*#include "netware/env.h"*/ /* Temporary */
+-#ifdef NEW_LIBC /* Same headers hold good for Winsock and Berkeley sockets */
+-#include <netinet/in.h>
+-/*#include <arpa/inet.h>*/
+-#include <netdb.h>
+-#else
+-#include <sys/socket.h>
+-#endif
+-#endif
+
+ #if HAVE_ARPA_INET_H
+ # include <arpa/inet.h>
+@@ -813,8 +802,8 @@
+ PHP_FE(prev, first_arg_force_ref)
+ PHP_FE(next, first_arg_force_ref)
+ PHP_FE(reset, first_arg_force_ref)
+- PHP_FE(current, first_arg_force_ref)
+- PHP_FE(key, first_arg_force_ref)
++ PHP_FE(current, NULL)
++ PHP_FE(key, NULL)
+ PHP_FE(min, NULL)
+ PHP_FE(max, NULL)
+ PHP_FE(in_array, NULL)
+@@ -944,6 +933,13 @@
+ static void php_putenv_destructor(putenv_entry *pe)
+ {
+ if (pe->previous_value) {
++#if _MSC_VER
++ /* VS.Net has a bug in putenv() when setting a variable that
++ * is already set; if the SetEnvironmentVariable() API call
++ * fails, the Crt will double free() a string.
++ * We try to avoid this by setting our own value first */
++ SetEnvironmentVariable(pe->key, "bugbug");
++#endif
+ putenv(pe->previous_value);
+ } else {
+ # if HAVE_UNSETENV
+@@ -1232,11 +1228,10 @@
+ }
+ STR_FREE(BG(locale_string));
+
+- if (FG(stream_wrappers)) {
+- zend_hash_destroy(FG(stream_wrappers));
+- efree(FG(stream_wrappers));
+- FG(stream_wrappers) = NULL;
+- }
++ /*
++ FG(stream_wrappers) are destroyed
++ during php_request_shutdown()
++ */
+
+ PHP_RSHUTDOWN(fsock) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ PHP_RSHUTDOWN(filestat) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
+@@ -1430,6 +1425,14 @@
+ }
+ }
+
++#if _MSC_VER
++ /* VS.Net has a bug in putenv() when setting a variable that
++ * is already set; if the SetEnvironmentVariable() API call
++ * fails, the Crt will double free() a string.
++ * We try to avoid this by setting our own value first */
++ SetEnvironmentVariable(pe.key, "bugbug");
++#endif
++
+ if (putenv(pe.putenv_string) == 0) { /* success */
+ zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len+1, (void **) &pe, sizeof(putenv_entry), NULL);
+ #ifdef HAVE_TZSET
+@@ -2089,17 +2092,21 @@
+ static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC)
+ {
+ zval retval;
++ char *function_name = NULL;
+
+- if (call_user_function( EG(function_table), NULL,
+- shutdown_function_entry->arguments[0],
+- &retval,
+- shutdown_function_entry->arg_count - 1,
+- shutdown_function_entry->arguments + 1
+- TSRMLS_CC ) == SUCCESS ) {
++ if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name)) {
++ php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name);
++ } else if (call_user_function(EG(function_table), NULL,
++ shutdown_function_entry->arguments[0],
++ &retval,
++ shutdown_function_entry->arg_count - 1,
++ shutdown_function_entry->arguments + 1
++ TSRMLS_CC ) == SUCCESS)
++ {
+ zval_dtor(&retval);
+-
+- } else {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(shutdown_function_entry->arguments[0]));
++ }
++ if (function_name) {
++ efree(function_name);
+ }
+ return 0;
+ }
+@@ -2192,6 +2199,7 @@
+ PHP_FUNCTION(register_shutdown_function)
+ {
+ php_shutdown_function_entry shutdown_function_entry;
++ char *function_name = NULL;
+ int i;
+
+ shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
+@@ -2200,26 +2208,31 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- shutdown_function_entry.arguments = (pval **) safe_emalloc(sizeof(pval *), shutdown_function_entry.arg_count, 0);
++ shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
+
+ if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
+ RETURN_FALSE;
+ }
+
+- /* Prevent entering of anything but arrays/strings */
+- if (Z_TYPE_P(shutdown_function_entry.arguments[0]) != IS_ARRAY) {
+- convert_to_string(shutdown_function_entry.arguments[0]);
+- }
+-
+- if (!BG(user_shutdown_function_names)) {
+- ALLOC_HASHTABLE(BG(user_shutdown_function_names));
+- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
+- }
++ /* Prevent entering of anything but valid callback (syntax check only!) */
++ if (!zend_is_callable(shutdown_function_entry.arguments[0], 1, &function_name)) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name);
++ efree(shutdown_function_entry.arguments);
++ RETVAL_FALSE;
++ } else {
++ if (!BG(user_shutdown_function_names)) {
++ ALLOC_HASHTABLE(BG(user_shutdown_function_names));
++ zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
++ }
+
+- for (i = 0; i < shutdown_function_entry.arg_count; i++) {
+- shutdown_function_entry.arguments[i]->refcount++;
++ for (i = 0; i < shutdown_function_entry.arg_count; i++) {
++ shutdown_function_entry.arguments[i]->refcount++;
++ }
++ zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
++ }
++ if (function_name) {
++ efree(function_name);
+ }
+- zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
+ }
+ /* }}} */
+
+@@ -3014,11 +3027,25 @@
+ prefix = va_arg(args, char *);
+ prefix_len = va_arg(args, uint);
+
+- new_key_len = prefix_len + hash_key->nKeyLength;
+- new_key = (char *) emalloc(new_key_len);
++ if (!prefix_len) {
++ if (!hash_key->nKeyLength) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard.");
++ return 0;
++ } else if (!strcmp(hash_key->arKey, "GLOBALS")) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite.");
++ return 0;
++ }
++ }
++
++ if (hash_key->nKeyLength) {
++ new_key_len = prefix_len + hash_key->nKeyLength;
++ new_key = (char *) emalloc(new_key_len);
+
+- memcpy(new_key, prefix, prefix_len);
+- memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ memcpy(new_key, prefix, prefix_len);
++ memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ } else {
++ new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h);
++ }
+
+ zend_hash_del(&EG(symbol_table), new_key, new_key_len);
+ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0);
+--- ext/standard/string.c 2005-01-20 18:57:41.000000000 +0100
++++ ext/standard/string.c 2005-10-31 23:34:37.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: string.c,v 1.333.2.48 2005/01/20 17:57:41 iliaa Exp $ */
++/* $Id: string.c,v 1.333.2.52.2.1 2005/09/28 22:34:04 iliaa Exp $ */
+
+ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
+
+@@ -1317,8 +1317,6 @@
+ if (!Z_STRLEN_PP(needle)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter.");
+ efree(haystack_orig);
+- zval_ptr_dtor(haystack);
+- zval_ptr_dtor(needle);
+ RETURN_FALSE;
+ }
+
+@@ -1339,8 +1337,6 @@
+ RETVAL_FALSE;
+ }
+
+- zval_ptr_dtor(haystack);
+- zval_ptr_dtor(needle);
+ efree(haystack_orig);
+ }
+ /* }}} */
+@@ -1576,7 +1572,13 @@
+ }
+
+ if (chunklen > Z_STRLEN_PP(p_str)) {
+- RETURN_STRINGL(Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str), 1);
++ /* to maintain BC, we must return original string + ending */
++ result_len = endlen + Z_STRLEN_PP(p_str);
++ result = emalloc(result_len + 1);
++ memcpy(result, Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str));
++ memcpy(result + Z_STRLEN_PP(p_str), end, endlen);
++ result[result_len] = '\0';
++ RETURN_STRINGL(result, result_len, 0);
+ }
+
+ if (!Z_STRLEN_PP(p_str)) {
+@@ -3169,7 +3179,6 @@
+ zval *sarg;
+ char *res = NULL;
+ int argCount;
+- int old_rg;
+
+ argCount = ARG_COUNT(ht);
+ if (argCount < 1 || argCount > 2 || zend_get_parameters_ex(argCount, &arg, &arrayArg) == FAILURE) {
+@@ -3182,19 +3191,18 @@
+ res = estrndup(Z_STRVAL_P(sarg), Z_STRLEN_P(sarg));
+ }
+
+- old_rg = PG(register_globals);
+ if (argCount == 1) {
+- PG(register_globals) = 1;
+- sapi_module.treat_data(PARSE_STRING, res, NULL TSRMLS_CC);
++ zval tmp;
++ Z_ARRVAL(tmp) = EG(active_symbol_table);
++
++ sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC);
+ } else {
+- PG(register_globals) = 0;
+ /* Clear out the array that was passed in. */
+ zval_dtor(*arrayArg);
+ array_init(*arrayArg);
+
+ sapi_module.treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC);
+ }
+- PG(register_globals) = old_rg;
+ }
+ /* }}} */
+
+--- main/php_variables.c 2004-10-18 17:08:46.000000000 +0200
++++ main/php_variables.c 2005-10-31 23:39:38.000000000 +0100
+@@ -16,7 +16,7 @@
+ | Zeev Suraski <zeev@zend.com> |
+ +----------------------------------------------------------------------+
+ */
+-/* $Id: php_variables.c,v 1.45.2.8 2004/10/18 15:08:46 tony2001 Exp $ */
++/* $Id: php_variables.c,v 1.45.2.13.2.4 2005/10/02 11:33:27 rrichards Exp $ */
+
+ #include <stdio.h>
+ #include "php.h"
+@@ -73,6 +73,10 @@
+ symtable1 = Z_ARRVAL_P(track_vars_array);
+ } else if (PG(register_globals)) {
+ symtable1 = EG(active_symbol_table);
++ /* GLOBALS hijack attempt, reject parameter */
++ if (!strncmp("GLOBALS", var, sizeof("GLOBALS")) || !strncmp("GLOBALS", var, sizeof("GLOBALS[")-1)) {
++ return;
++ }
+ }
+ if (!symtable1) {
+ /* Nothing to do */
+@@ -99,6 +103,13 @@
+ zval_dtor(val);
+ return;
+ }
++
++ /* GLOBALS hijack attempt, reject parameter */
++ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) {
++ zval_dtor(val);
++ return;
++ }
++
+ /* ensure that we don't have spaces or dots in the variable name (not binary safe) */
+ for (p=var; *p; p++) {
+ switch(*p) {
+@@ -182,11 +193,25 @@
+ if (!index) {
+ zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ } else {
++ zval **tmp;
++
+ if (PG(magic_quotes_gpc) && (index!=var)) {
+ char *escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC);
++
++ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) &&
++ zend_hash_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) {
++ efree(escaped_index);
++ break;
++ }
++
+ zend_hash_update(symtable1, escaped_index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ efree(escaped_index);
+ } else {
++ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) &&
++ zend_hash_find(symtable1, index, index_len+1, (void **) &tmp) != FAILURE) {
++ break;
++ }
++
+ zend_hash_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ }
+ }
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch b/dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch
new file mode 100644
index 0000000..1eb4c98
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-mbstring-header_inj.patch
@@ -0,0 +1,151 @@
+--- ext/mbstring/mbstring.c 2005-02-21 09:03:47.000000000 +0100
++++ ext/mbstring/mbstring.c 2005-12-03 02:34:47.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: mbstring.c,v 1.142.2.47 2005/02/21 08:03:47 moriyoshi Exp $ */
++/* $Id: mbstring.c,v 1.142.2.47.2.5 2005/11/21 23:21:19 hirokawa Exp $ */
+
+ /*
+ * PHP4 Multibyte String module "mbstring"
+@@ -55,6 +55,7 @@
+ #include "mbstring.h"
+ #include "ext/standard/php_string.h"
+ #include "ext/standard/php_mail.h"
++#include "ext/standard/exec.h"
+ #include "ext/standard/url.h"
+ #include "main/php_output.h"
+ #include "ext/standard/info.h"
+@@ -2923,16 +2924,17 @@
+ }
+ /* }}} */
+
+-/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]])
++/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])
+ Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */
+ PHP_FUNCTION(mb_encode_mimeheader)
+ {
+- pval **argv[4];
++ pval **argv[5];
+ enum mbfl_no_encoding charset, transenc;
+ mbfl_string string, result, *ret;
+ char *p, *linefeed;
++ int indent;
+
+- if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 4 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) {
++ if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 5 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+@@ -2969,6 +2971,12 @@
+ linefeed = Z_STRVAL_PP(argv[3]);
+ }
+
++ indent = 0;
++ if (ZEND_NUM_ARGS() >= 5) {
++ convert_to_long_ex(argv[4]);
++ indent = Z_LVAL_PP(argv[4]);
++ }
++
+ convert_to_string_ex(argv[0]);
+ mbfl_string_init(&string);
+ mbfl_string_init(&result);
+@@ -2976,7 +2984,7 @@
+ string.no_encoding = MBSTRG(current_internal_encoding);
+ string.val = Z_STRVAL_PP(argv[0]);
+ string.len = Z_STRLEN_PP(argv[0]);
+- ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, 0);
++ ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent);
+ if (ret != NULL) {
+ RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */
+ } else {
+@@ -3459,6 +3467,22 @@
+ * Sends an email message with MIME scheme
+ */
+ #if HAVE_SENDMAIL
++#define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \
++ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \
++ pos += 3; \
++ while (str[pos] == ' ' || str[pos] == '\t') { \
++ pos++; \
++ } \
++ continue; \
++ } \
++ else if (str[pos] == '\n' && (str[pos + 1] == ' ' || str[pos + 1] == '\t')) { \
++ pos += 2; \
++ while (str[pos] == ' ' || str[pos] == '\t') { \
++ pos++; \
++ } \
++ continue; \
++ } \
++
+ PHP_FUNCTION(mb_send_mail)
+ {
+ int argc, n;
+@@ -3474,6 +3498,8 @@
+ mbfl_memory_device device; /* automatic allocateable buffer for additional header */
+ const mbfl_language *lang;
+ int err = 0;
++ char *to_r;
++ int to_len, i;
+
+ /* initialize */
+ mbfl_memory_device_init(&device, 0, 0);
+@@ -3500,6 +3526,32 @@
+ convert_to_string_ex(argv[0]);
+ if (Z_STRVAL_PP(argv[0])) {
+ to = Z_STRVAL_PP(argv[0]);
++ to_len = Z_STRLEN_PP(argv[0]);
++ if (to_len > 0) {
++ to_r = estrndup(to, to_len);
++ for (; to_len; to_len--) {
++ if (!isspace((unsigned char) to_r[to_len - 1])) {
++ break;
++ }
++ to_r[to_len - 1] = '\0';
++ }
++ for (i = 0; to_r[i]; i++) {
++ if (iscntrl((unsigned char) to_r[i])) {
++ /* According to RFC 822, section 3.1.1 long headers may be
++separated into
++ * parts using CRLF followed at least one linear-white-space
++character ('\t' or ' ').
++ * To prevent these separators from being replaced with a space,
++we use the
++ * SKIP_LONG_HEADER_SEP_MBSTRING to skip over them.
++ */
++ SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i);
++ to_r[i] = ' ';
++ }
++ }
++ } else {
++ to_r = to;
++ }
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field");
+ err = 1;
+@@ -3594,12 +3646,22 @@
+ extra_cmd = Z_STRVAL_PP(argv[4]);
+ }
+
+- if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) {
++ if (extra_cmd) {
++ extra_cmd = php_escape_shell_cmd(extra_cmd);
++ }
++
++ if (!err && php_mail(to_r, subject, message, headers, extra_cmd TSRMLS_CC)) {
+ RETVAL_TRUE;
+ } else {
+ RETVAL_FALSE;
+ }
+
++ if (to_r != to) {
++ efree(to_r);
++ }
++ if (extra_cmd) {
++ efree(extra_cmd);
++ }
+ if (subject_buf) {
+ efree((void *)subject_buf);
+ }
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch b/dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch
new file mode 100644
index 0000000..6d994cf
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-multilib-search-path.patch
@@ -0,0 +1,1488 @@
+diff -Nru php-4.3.11.orig/acinclude.m4 php-4.3.11/acinclude.m4
+--- php-4.3.11.orig/acinclude.m4 2005-01-25 14:03:06.000000000 +0100
++++ php-4.3.11/acinclude.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -194,7 +194,7 @@
+ unset ac_new_flags
+ for i in [$]$1; do
+ case [$]i in
+- -L/usr/lib|-L/usr/lib/[)] ;;
++ -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/[)] ;;
+ *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
+ esac
+ done
+@@ -645,7 +645,7 @@
+ ])
+
+ AC_DEFUN([PHP_PROG_SENDMAIL],[
+-PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
++PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64
+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
+ if test -n "$PROG_SENDMAIL"; then
+ AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
+@@ -856,7 +856,9 @@
+ dnl add a library to linkpath/runpath
+ dnl
+ AC_DEFUN([PHP_ADD_LIBPATH],[
+- if test "$1" != "/usr/lib"; then
++ case x$1 in
++ x/usr/lib|x/usr/lib64) ;;
++ *)
+ PHP_EXPAND_PATH($1, ai_p)
+ ifelse([$2],,[
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+@@ -866,8 +868,8 @@
+ else
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+ fi
+- ])
+- fi
++ ]) ;;
++ esac
+ ])
+
+ dnl
+@@ -1651,15 +1653,20 @@
+ fi
+
+ for i in $PHP_KERBEROS; do
+- if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
++ if test -f $i/lib/libkrb5.a -o -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
+ PHP_KERBEROS_DIR=$i
++ PHP_KERBEROS_LIBDIR=$i/lib
++ break
++ elif test -f $i/lib64/libkrb5.a -o -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then
++ PHP_KERBEROS_DIR=$i
++ PHP_KERBEROS_LIBDIR=$i/lib64
+ break
+ fi
+ done
+
+ if test "$PHP_KERBEROS_DIR"; then
+ found_kerberos=yes
+- PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1)
++ PHP_ADD_LIBPATH($PHP_KERBEROS_LIBDIR, $1)
+ PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
+ PHP_ADD_LIBRARY(krb5, 1, $1)
+ PHP_ADD_LIBRARY(k5crypto, 1, $1)
+@@ -1727,6 +1734,9 @@
+ if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
+ OPENSSL_LIBDIR=$i/lib
+ fi
++ if test -r $i/lib64/libssl.a -o -r $i/lib64/libssl.$SHLIB_SUFFIX_NAME; then
++ OPENSSL_LIBDIR=$i/lib64
++ fi
+ test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
+ done
+
+@@ -1847,7 +1857,9 @@
+ fi
+
+ if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a ||
+- test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
++ test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME ||
++ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.a ||
++ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
+ then
+ PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
+ found_iconv=yes
+diff -Nru php-4.3.11.orig/ext/bz2/config.m4 php-4.3.11/ext/bz2/config.m4
+--- php-4.3.11.orig/ext/bz2/config.m4 2004-01-21 06:04:50.000000000 +0100
++++ php-4.3.11/ext/bz2/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -19,6 +19,12 @@
+ done
+ fi
+
++ for j in lib64 lib; do
++ if test -d $BZIP_DIR/$j; then
++ BZIP_LIBDIR=$BZIP_DIR/$j
++ fi
++ done
++
+ if test -z "$BZIP_DIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the BZip2 distribution)
+@@ -27,12 +33,12 @@
+ PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
+ [
+ PHP_ADD_INCLUDE($BZIP_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_LIBDIR, BZ2_SHARED_LIBADD)
+ AC_DEFINE(HAVE_BZ2,1,[ ])
+ ], [
+ AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)
+ ], [
+- -L$BZIP_DIR/lib
++ -L$BZIP_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared)
+diff -Nru php-4.3.11.orig/ext/curl/config.m4 php-4.3.11/ext/curl/config.m4
+--- php-4.3.11.orig/ext/curl/config.m4 2005-02-09 17:23:49.000000000 +0100
++++ php-4.3.11/ext/curl/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -23,6 +23,12 @@
+ done
+ fi
+
++ for j in lib64 lib; do
++ if test -d $CURL_DIR/$j; then
++ CURL_LIBDIR=$CURL_DIR/$j
++ fi
++ done
++
+ if test -z "$CURL_DIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the libcurl distribution -
+@@ -51,7 +57,7 @@
+
+ PHP_ADD_INCLUDE($CURL_DIR/include)
+ PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_LIBDIR, CURL_SHARED_LIBADD)
+
+ PHP_CHECK_LIBRARY(curl,curl_easy_perform,
+ [
+@@ -59,14 +65,14 @@
+ ],[
+ AC_MSG_ERROR(There is something wrong. Please check config.log for more information.)
+ ],[
+- $CURL_LIBS -L$CURL_DIR/lib
++ $CURL_LIBS -L$CURL_LIBDIR
+ ])
+
+ PHP_CHECK_LIBRARY(curl,curl_version_info,
+ [
+ AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ])
+ ],[],[
+- $CURL_LIBS -L$CURL_DIR/lib
++ $CURL_LIBS -L$CURL_LIBDIR
+ ])
+
+ dnl if test "$PHP_CURLWRAPPERS" != "no" ; then
+diff -Nru php-4.3.11.orig/ext/dba/config.m4 php-4.3.11/ext/dba/config.m4
+--- php-4.3.11.orig/ext/dba/config.m4 2005-01-22 02:37:12.000000000 +0100
++++ php-4.3.11/ext/dba/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -80,12 +80,18 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
+ AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_GDBM, 1, [ ])
+ THIS_LIBS=gdbm
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ fi
+
+ PHP_DBA_STD_ASSIGN
+@@ -110,14 +116,20 @@
+ break
+ fi
+ done
+-
++
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in ndbm db1 c; do
+ PHP_CHECK_LIBRARY($LIB, dbm_open, [
+ AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_NDBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -135,25 +147,28 @@
+ dnl parameters(version, library list, function)
+ AC_DEFUN([PHP_DBA_DB_CHECK],[
+ for LIB in $2; do
+- if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
+- PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[
+- AC_TRY_LINK([
++ for LIBDIR in lib64 lib; do
++ if test -f $THIS_PREFIX/$LIBDIR/lib$LIB.a -o -f $THIS_PREFIX/$LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
++ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$LIBDIR, -l$LIB,[
++ AC_TRY_LINK([
+ #include "$THIS_INCLUDE"
+- ],[
+- $3;
+- ],[
+- AC_EGREP_CPP(yes,[
++ ],[
++ $3;
++ ],[
++ AC_EGREP_CPP(yes,[
+ #include "$THIS_INCLUDE"
+ #if DB_VERSION_MAJOR == $1
+- yes
++ yes
+ #endif
+- ],[
+- THIS_LIBS=$LIB
+- break
++ ],[
++ THIS_LIBS=$LIB
++ break
++ ])
+ ])
+ ])
+- ])
+- fi
++ fi
++ done
++ test -n "$THIS_LIBS" && break
+ done
+ if test -z "$THIS_LIBS"; then
+ AC_MSG_CHECKING(for db$1 major version)
+@@ -314,6 +329,12 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in dbm c gdbm; do
+ PHP_CHECK_LIBRARY($LIB, dbminit, [
+@@ -328,7 +349,7 @@
+ fi
+ AC_DEFINE(DBA_DBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -364,13 +385,19 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in cdb c; do
+ PHP_CHECK_LIBRARY($LIB, cdb_read, [
+ AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_CDB, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+diff -Nru php-4.3.11.orig/ext/domxml/config.m4 php-4.3.11/ext/domxml/config.m4
+--- php-4.3.11.orig/ext/domxml/config.m4 2004-12-30 08:02:17.000000000 +0100
++++ php-4.3.11/ext/domxml/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -48,13 +48,15 @@
+ AC_MSG_ERROR(Please reinstall the libxml >= 2.4.14 distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $DOMXML_DIR/$j; then
++ DOMXML_LIBDIR=$DOMXML_DIR/$j
++ fi
++ done
++
+ PHP_DOM_CHECK_VERSION
+
+- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then
+- DOM_LIBNAME=xml2
+- else
+- DOM_LIBNAME=xml
+- fi
++ DOM_LIBNAME=xml2
+
+ XML2_CONFIG=$DOMXML_DIR/bin/xml2-config
+
+@@ -62,7 +64,7 @@
+ DOM_LIBS=`$XML2_CONFIG --libs`
+ PHP_EVAL_LIBLINE($DOM_LIBS, DOMXML_SHARED_LIBADD)
+ else
+- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD)
+ fi
+
+ PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
+@@ -70,7 +72,13 @@
+ if test "$PHP_ZLIB_DIR" = "no"; then
+ AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>)
+ else
+- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, DOMXML_SHARED_LIBADD)
++ for j in lib64 lib; do
++ if test -d $PHP_ZLIB_DIR/$j; then
++ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j
++ fi
++ done
++
++ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIBDIR, DOMXML_SHARED_LIBADD)
+ fi
+
+ AC_DEFINE(HAVE_DOMXML,1,[ ])
+@@ -135,27 +143,35 @@
+ AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $DOMXSLT_DIR/$j; then
++ DOMXSLT_LIBDIR=$DOMXSLT_DIR/$j
++ fi
++ done
++
+ PHP_DOM_XSLT_CHECK_VERSION
+
+- PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_DIR/lib, DOMXML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_LIBDIR, DOMXML_SHARED_LIBADD)
+
+ PHP_ADD_INCLUDE($DOMXSLT_DIR/include)
+
+ if test "$PHP_DOM" = "no"; then
+ AC_MSG_ERROR(DOMXSLT requires DOMXML. Use --with-dom=<DIR>)
+ fi
+-
+- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then
+- DOM_LIBNAME=xml2
+- else
+- DOM_LIBNAME=xml
+- fi
+
+- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
++ for j in lib64 lib; do
++ if test -d $DOMXML_DIR/$j; then
++ DOMXML_LIBDIR=$DOMXML_DIR/$j
++ fi
++ done
++
++ DOM_LIBNAME=xml2
++
++ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
+
+- if test -f $DOMXML_DIR/lib/libxsltbreakpoint.a -o -f $DOMXML_DIR/lib/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then
+- PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
++ if test -f $DOMXML_LIBDIR/libxsltbreakpoint.a -o -f $DOMXML_LIBDIR/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then
++ PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD)
+ fi
+
+ AC_DEFINE(HAVE_DOMXSLT,1,[ ])
+@@ -185,9 +201,15 @@
+ AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $DOMEXSLT_DIR/$j; then
++ DOMEXSLT_LIBDIR=$DOMEXSLT_DIR/$j
++ fi
++ done
++
+ PHP_DOM_EXSLT_CHECK_VERSION
+
+- PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_DIR/lib, DOMXML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_LIBDIR, DOMXML_SHARED_LIBADD)
+
+ PHP_ADD_INCLUDE($DOMEXSLT_DIR/include)
+
+diff -Nru php-4.3.11.orig/ext/gd/config.m4 php-4.3.11/ext/gd/config.m4
+--- php-4.3.11.orig/ext/gd/config.m4 2005-01-04 07:52:18.000000000 +0100
++++ php-4.3.11/ext/gd/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -50,8 +50,15 @@
+ AC_DEFUN([PHP_GD_JPEG],[
+ if test "$PHP_JPEG_DIR" != "no"; then
+
+- for i in $PHP_JPEG_DIR /usr/local /usr; do
+- test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_JPEG_DIR /usr/local /usr; do
++ if test -f "$i/$j/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libjpeg.a"; then
++ GD_JPEG_DIR=$i
++ GD_JPEG_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_JPEG_DIR" && break
+ done
+
+ if test -z "$GD_JPEG_DIR"; then
+@@ -61,11 +68,11 @@
+ PHP_CHECK_LIBRARY(jpeg,jpeg_read_header,
+ [
+ PHP_ADD_INCLUDE($GD_JPEG_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libjpeg.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_JPEG_DIR/lib
++ -L$GD_JPEG_LIB_DIR
+ ])
+ else
+ AC_MSG_RESULT([If configure fails try --with-jpeg-dir=<DIR>])
+@@ -75,8 +82,15 @@
+ AC_DEFUN([PHP_GD_PNG],[
+ if test "$PHP_PNG_DIR" != "no"; then
+
+- for i in $PHP_PNG_DIR /usr/local /usr; do
+- test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_PNG_DIR /usr/local /usr; do
++ if test -f "$i/$j/libpng.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libpng.a"; then
++ GD_PNG_DIR=$i
++ GD_PNG_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_PNG_DIR" && break
+ done
+
+ if test -z "$GD_PNG_DIR"; then
+@@ -94,12 +108,12 @@
+ PHP_CHECK_LIBRARY(png,png_write_image,
+ [
+ PHP_ADD_INCLUDE($GD_PNG_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, GD_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIB_DIR, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.])
+ ],[
+- -L$PHP_ZLIB_DIR/lib -lz -L$GD_PNG_DIR/lib
++ -L$PHP_ZLIB_LIB_DIR -lz -L$GD_PNG_LIB_DIR
+ ])
+
+ else
+@@ -110,8 +124,15 @@
+ AC_DEFUN([PHP_GD_XPM],[
+ if test "$PHP_XPM_DIR" != "no"; then
+
+- for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
+- test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
++ if test -f "$i/$j/libXpm.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libXpm.a"; then
++ GD_XPM_DIR=$i
++ GD_XPM_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_XPM_DIR" && break
+ done
+
+ if test -z "$GD_XPM_DIR"; then
+@@ -129,12 +150,12 @@
+ PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage,
+ [
+ PHP_ADD_INCLUDE($GD_XPM_INC)
+- PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_XPM_DIR/lib -lX11
++ -L$GD_XPM_LIB_DIR -lX11
+ ])
+ else
+ AC_MSG_RESULT(If configure fails try --with-xpm-dir=<DIR>)
+@@ -145,25 +166,29 @@
+ if test "$PHP_TTF" != "no"; then
+ if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
+ if test -n "$PHP_TTF"; then
+- for i in $PHP_TTF /usr/local /usr; do
+- if test -f "$i/include/freetype.h"; then
+- TTF_DIR=$i
+- unset TTF_INC_DIR
+- fi
+- if test -f "$i/include/freetype/freetype.h"; then
+- TTF_DIR=$i
+- TTF_INC_DIR=$i/include/freetype
+- fi
+- if test -f "$i/include/freetype1/freetype/freetype.h"; then
+- TTF_DIR=$i
+- TTF_INC_DIR=$i/include/freetype1/freetype
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_TTF /usr/local /usr; do
++ if test -f "$i/$j/libttf.a" -o -f "$i/$j/libttf.$SHLIB_SUFFIX_NAME"; then
++ TTF_DIR=$i
++ TTF_LIB_DIR=$i/$j
++ if test -f "$i/include/freetype.h"; then
++ unset TTF_INC_DIR
++ elif test -f "$i/include/freetype/freetype.h"; then
++ TTF_INC_DIR=$i/include/freetype
++ elif test -f "$i/include/freetype1/freetype/freetype.h"; then
++ TTF_INC_DIR=$i/include/freetype1/freetype
++ else
++ unset TTF_DIR
++ fi
++ fi
++ test -n "$TTF_DIR" && break
++ done
+ test -n "$TTF_DIR" && break
+ done
+ fi
+ if test -n "$TTF_DIR" ; then
+ AC_DEFINE(HAVE_LIBTTF,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_LIB_DIR, GD_SHARED_LIBADD)
+ fi
+ if test -z "$TTF_INC_DIR"; then
+ TTF_INC_DIR=$TTF_DIR/include
+@@ -178,16 +203,21 @@
+ AC_DEFUN([PHP_GD_FREETYPE2],[
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/include/freetype2/freetype/freetype.h"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_INC_DIR=$i/include/freetype2
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/include/freetype2/freetype/freetype.h" && \
++ test -f "$i/$j/libfreetype.a" -o -f "$i/$j/libfreetype.$SHLIB_SUFFIX_NAME"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_LIB_DIR=$i/$j
++ FREETYPE2_INC_DIR=$i/include/freetype2
++ break
++ fi
++ done
++ test -n "$FREETYPE2_DIR" && break
+ done
+
+ if test -n "$FREETYPE2_DIR" ; then
+- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_LIB_DIR, GD_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($FREETYPE2_DIR/include)
+ PHP_ADD_INCLUDE($FREETYPE2_INC_DIR)
+ AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
+@@ -203,8 +233,16 @@
+ AC_DEFUN([PHP_GD_T1LIB],[
+ if test "$PHP_T1LIB" != "no"; then
+
+- for i in $PHP_T1LIB /usr/local /usr; do
+- test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_T1LIB /usr/local /usr; do
++ if test -f "$i/include/t1lib.h" && \
++ test -f "$i/$j/libt1.a" -o -f "$i/$j/libt1.$SHLIB_SUFFIX_NAME"; then
++ GD_T1_DIR=$i
++ GD_T1_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_T1_DIR" && break
+ done
+
+ if test -z "$GD_T1_DIR"; then
+@@ -215,11 +253,11 @@
+ [
+ AC_DEFINE(HAVE_LIBT1,1,[ ])
+ PHP_ADD_INCLUDE($GD_T1_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_T1_DIR/lib
++ -L$GD_T1_LIB_DIR
+ ])
+ fi
+ ])
+@@ -364,7 +402,7 @@
+ done
+
+ dnl Library path
+- for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do
++ for i in lib/gd1.3 lib64/gd1.3 lib/gd lib64/gd lib lib64 gd1.3 gd ""; do
+ test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i"
+ done
+
+diff -Nru php-4.3.11.orig/ext/gettext/config.m4 php-4.3.11/ext/gettext/config.m4
+--- php-4.3.11.orig/ext/gettext/config.m4 2003-10-01 04:53:58.000000000 +0200
++++ php-4.3.11/ext/gettext/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -14,11 +14,15 @@
+ AC_MSG_ERROR(Cannot locate header file libintl.h)
+ fi
+
+- GETTEXT_LIBDIR=$GETTEXT_DIR/lib
++ for j in lib64 lib; do
++ if test -d $GETTEXT_DIR/$j; then
++ GETTEXT_LIBDIR=$GETTEXT_DIR/$j
++ fi
++ done
++
+ GETTEXT_INCDIR=$GETTEXT_DIR/include
+
+ O_LDFLAGS=$LDFLAGS
+- LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
+ AC_CHECK_LIB(intl, bindtextdomain, [
+ GETTEXT_LIBS=intl
+ GETTEXT_CHECK_IN_LIB=intl
+diff -Nru php-4.3.11.orig/ext/gmp/config.m4 php-4.3.11/ext/gmp/config.m4
+--- php-4.3.11.orig/ext/gmp/config.m4 2003-11-19 05:44:24.000000000 +0100
++++ php-4.3.11/ext/gmp/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -14,20 +14,26 @@
+ if test -z "$GMP_DIR"; then
+ AC_MSG_ERROR(Unable to locate gmp.h)
+ fi
+-
++
++ for j in lib64 lib; do
++ if test -d $GMP_DIR/$j; then
++ GMP_LIBDIR=$GMP_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size,
+ [],[
+ PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size,
+ [],[
+ AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.])
+ ],[
+- -L$GMP_DIR/lib
++ -L$GMP_LIBDIR
+ ])
+ ],[
+- -L$GMP_DIR/lib
++ -L$GMP_LIBDIR
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_LIBDIR, GMP_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($GMP_DIR/include)
+
+ PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared)
+diff -Nru php-4.3.11.orig/ext/iconv/config.m4 php-4.3.11/ext/iconv/config.m4
+--- php-4.3.11.orig/ext/iconv/config.m4 2005-01-10 22:38:56.000000000 +0100
++++ php-4.3.11/ext/iconv/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -23,8 +23,14 @@
+ PHP_ICONV_PREFIX="$ICONV_DIR"
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_ICONV_PREFIX/$j; then
++ PHP_ICONV_PREFIX_LIBDIR=$PHP_ICONV_PREFIX/$j
++ fi
++ done
++
+ CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
+- LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS"
++ LDFLAGS="-L$PHP_ICONV_PREFIX_LIBDIR $LDFLAGS"
+
+ if test -r $PHP_ICONV_PREFIX/include/giconv.h; then
+ PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
+diff -Nru php-4.3.11.orig/ext/imap/config.m4 php-4.3.11/ext/imap/config.m4
+--- php-4.3.11.orig/ext/imap/config.m4 2005-01-11 05:56:57.000000000 +0100
++++ php-4.3.11/ext/imap/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -167,6 +167,7 @@
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
++ IMAP_LIB_CHK(lib64)
+ IMAP_LIB_CHK(c-client)
+ done
+
+diff -Nru php-4.3.11.orig/ext/interbase/config.m4 php-4.3.11/ext/interbase/config.m4
+--- php-4.3.11.orig/ext/interbase/config.m4 2003-04-25 10:59:00.000000000 +0200
++++ php-4.3.11/ext/interbase/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -9,10 +9,18 @@
+ if test "$PHP_INTERBASE" != "no"; then
+ if test "$PHP_INTERBASE" = "yes"; then
+ IBASE_INCDIR=/usr/interbase/include
+- IBASE_LIBDIR=/usr/interbase/lib
++ for j in lib64 lib; do
++ if test -d /usr/interbase/$j; then
++ IBASE_LIBDIR=/usr/interbase/$j
++ fi
++ done
+ else
+ IBASE_INCDIR=$PHP_INTERBASE/include
+- IBASE_LIBDIR=$PHP_INTERBASE/lib
++ for j in lib64 lib; do
++ if test -d $PHP_INTERBASE/$j; then
++ IBASE_LIBDIR=$PHP_INTERBASE/$j
++ fi
++ done
+ fi
+
+ PHP_CHECK_LIBRARY(gds, isc_detach_database,
+diff -Nru php-4.3.11.orig/ext/ldap/config.m4 php-4.3.11/ext/ldap/config.m4
+--- php-4.3.11.orig/ext/ldap/config.m4 2004-12-30 08:02:17.000000000 +0100
++++ php-4.3.11/ext/ldap/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -6,7 +6,8 @@
+ if test -f $1/include/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/include
+- LDAP_LIBDIR=$1/lib
++ test -f $1/lib/libldap.so && LDAP_LIBDIR=$1/lib
++ test -f $1/lib64/libldap.so && LDAP_LIBDIR=$1/lib64
+ elif test -f $1/include/umich-ldap/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/include/umich-ldap
+diff -Nru php-4.3.11.orig/ext/mbstring/config.m4 php-4.3.11/ext/mbstring/config.m4
+--- php-4.3.11.orig/ext/mbstring/config.m4 2005-02-21 08:10:13.000000000 +0100
++++ php-4.3.11/ext/mbstring/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -167,12 +167,18 @@
+ PHP_ADD_INCLUDE([$PHP_LIBMBFL_INCLUDE])
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_LIBMBFL/$j; then
++ PHP_LIBMBFL_LIBDIR=$PHP_LIBMBFL/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mbfl, mbfl_buffer_converter_new, [
+- PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL/lib, MBSTRING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL_LIBDIR, MBSTRING_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.])
+ ], [
+- -LPHP_LIBMBFL/lib
++ -L$PHP_LIBMBFL_LIBDIR
+ ])
+ fi
+ ])
+diff -Nru php-4.3.11.orig/ext/mcal/config.m4 php-4.3.11/ext/mcal/config.m4
+--- php-4.3.11.orig/ext/mcal/config.m4 2002-03-27 11:26:16.000000000 +0100
++++ php-4.3.11/ext/mcal/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -19,7 +19,7 @@
+ fi
+ done
+
+- for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib; do
++ for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib64/mcal $MCAL_DIR/lib $MCAL_DIR/lib64; do
+ if test -r "$i/libmcal.a"; then
+ MCAL_LIBRARY=$i
+ fi
+diff -Nru php-4.3.11.orig/ext/mcrypt/config.m4 php-4.3.11/ext/mcrypt/config.m4
+--- php-4.3.11.orig/ext/mcrypt/config.m4 2005-01-22 02:37:12.000000000 +0100
++++ php-4.3.11/ext/mcrypt/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -14,6 +14,12 @@
+ AC_MSG_ERROR(mcrypt.h not found. Please reinstall libmcrypt.)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MCRYPT_DIR/$j; then
++ MCRYPT_LIBDIR=$MCRYPT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
+ [
+ PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
+@@ -23,7 +29,7 @@
+ [
+ AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ])
+ ],[],[
+- -L$MCRYPT_DIR/lib -lltdl
++ -L$MCRYPT_LIBDIR -lltdl
+ ])
+
+ ],[
+@@ -35,7 +41,7 @@
+ [
+ AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ])
+ ],[],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+ PHP_CHECK_LIBRARY(mcrypt, init_mcrypt,
+@@ -44,16 +50,16 @@
+ ],[
+ AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
+ ],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+- -L$MCRYPT_DIR/lib -lltdl
++ -L$MCRYPT_LIBDIR -lltdl
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MCRYPT_DIR/include)
+
+ PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared)
+diff -Nru php-4.3.11.orig/ext/mcve/config.m4 php-4.3.11/ext/mcve/config.m4
+--- php-4.3.11.orig/ext/mcve/config.m4 2004-12-08 07:48:11.000000000 +0100
++++ php-4.3.11/ext/mcve/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -67,8 +67,14 @@
+
+ CPPFLAGS=$saved_CPPFLAGS
+
++ for j in lib64 lib; do
++ if test -d $MCVE_DIR/$j; then
++ MCVE_LIBDIR=$MCVE_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MCVE_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_LIBDIR, MCVE_SHARED_LIBADD)
+
+ dnl Build test. Check for libmcve or libmonetra
+ dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion
+diff -Nru php-4.3.11.orig/ext/mhash/config.m4 php-4.3.11/ext/mhash/config.m4
+--- php-4.3.11.orig/ext/mhash/config.m4 2003-10-01 04:54:01.000000000 +0200
++++ php-4.3.11/ext/mhash/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -14,8 +14,14 @@
+ AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MHASH_DIR/$j; then
++ MHASH_LIBDIR=$MHASH_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MHASH_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared)
+ PHP_SUBST(MHASH_SHARED_LIBADD)
+diff -Nru php-4.3.11.orig/ext/ming/config.m4 php-4.3.11/ext/ming/config.m4
+--- php-4.3.11.orig/ext/ming/config.m4 2003-07-11 09:48:33.000000000 +0200
++++ php-4.3.11/ext/ming/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -8,10 +8,12 @@
+ if test "$PHP_MING" != "no"; then
+ AC_CHECK_LIB(m, sin)
+
+- for i in $PHP_MING /usr/local /usr; do
+- if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then
++ for j in lib64 lib; do
++ for i in $PHP_MING /usr/local /usr; do
++ if test -f $i/$j/libming.$SHLIB_SUFFIX_NAME -o -f $i/$j/libming.a; then
+ MING_DIR=$i
+- fi
++ fi
++ done
+ done
+
+ if test -z "$MING_DIR"; then
+@@ -28,16 +30,22 @@
+ AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MING_DIR/$j; then
++ MING_LIBDIR=$MING_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
+ AC_DEFINE(HAVE_MING,1,[ ])
+ ],[
+ AC_MSG_ERROR([Ming library 0.2a or greater required.])
+ ],[
+- -L$MING_DIR/lib
++ -L$MING_LIBDIR
+ ])
+
+ PHP_ADD_INCLUDE($MING_INC_DIR)
+- PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_LIBDIR, MING_SHARED_LIBADD)
+
+ AC_MSG_CHECKING([for destroySWFBlock])
+ AC_TRY_RUN([
+diff -Nru php-4.3.11.orig/ext/msession/config.m4 php-4.3.11/ext/msession/config.m4
+--- php-4.3.11.orig/ext/msession/config.m4 2002-03-12 17:25:11.000000000 +0100
++++ php-4.3.11/ext/msession/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -8,13 +8,17 @@
+ if test "$PHP_MSESSION" != "no"; then
+ if test -r $PHP_MSESSION/lib/libphoenix.a; then
+ PHOENIX_DIR=$PHP_MSESSION
++ PHOENIX_LIBDIR=$PHP_MSESSION/lib
+ else
+ AC_MSG_CHECKING(for msession in default path)
+- for i in /usr/local/phoenix /usr/local /usr; do
+- if test -r $i/lib/libphoenix.a; then
+- PHOENIX_DIR=$i
+- AC_MSG_RESULT(found in $i)
+- fi
++ for j in lib64 lib; do
++ for i in /usr/local/phoenix /usr/local /usr; do
++ if test -r $i/$j/libphoenix.a; then
++ PHOENIX_DIR=$i
++ PHOENIX_LIBDIR=$i/$j
++ AC_MSG_RESULT(found in $i)
++ fi
++ done
+ done
+ fi
+
+@@ -25,7 +29,7 @@
+
+
+ AC_DEFINE(HAVE_MSESSION, 1, [ ])
+- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB)
++ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB)
+ PHOENIX_INCLUDE="-I$PHOENIX_DIR"
+ PHP_SUBST(PHOENIX_LIB)
+
+diff -Nru php-4.3.11.orig/ext/mssql/config.m4 php-4.3.11/ext/mssql/config.m4
+--- php-4.3.11.orig/ext/mssql/config.m4 2004-12-08 19:59:11.000000000 +0100
++++ php-4.3.11/ext/mssql/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -19,6 +19,12 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $FREETDS_INSTALLATION_DIR/$j; then
++ FREETDS_INSTALLATION_DIR_LIBDIR=$FREETDS_INSTALLATION_DIR/$j
++ fi
++ done
++
+ if test -z "$FREETDS_INSTALLATION_DIR"; then
+ AC_MSG_ERROR(Cannot find FreeTDS in known installation directories)
+ fi
+@@ -32,12 +38,12 @@
+ fi
+ fi
+
+- if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then
+- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so])
++ if test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.so"; then
++ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR_LIBDIR/libtds.[a|so])
+ fi
+
+ MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include
+- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib
++ MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR_LIBDIR
+
+ PHP_ADD_INCLUDE($MSSQL_INCDIR)
+ PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD)
+diff -Nru php-4.3.11.orig/ext/mysql/config.m4 php-4.3.11/ext/mysql/config.m4
+--- php-4.3.11.orig/ext/mysql/config.m4 2004-12-30 08:02:17.000000000 +0100
++++ php-4.3.11/ext/mysql/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -114,7 +114,7 @@
+
+ MYSQL_MODULE_TYPE=external
+
+- for i in lib lib/mysql; do
++ for i in lib64 lib64/mysql lib lib/mysql; do
+ MYSQL_LIB_CHK($i)
+ done
+
+@@ -125,13 +125,18 @@
+ PHP_CHECK_LIBRARY(mysqlclient, mysql_close, [ ],
+ [
+ if test "$PHP_ZLIB_DIR" != "no"; then
++ for j in lib64 lib; do
++ if test -d $PHP_ZLIB_DIR/$j; then
++ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j
++ fi
++ done
+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, MYSQL_SHARED_LIBADD)
+ PHP_CHECK_LIBRARY(mysqlclient, mysql_error, [], [
+ AC_MSG_ERROR([mysql configure failed. Please check config.log for more information.])
+ ], [
+- -L$PHP_ZLIB_DIR/lib -L$MYSQL_LIB_DIR
++ -L$PHP_ZLIB_LIBDIR -L$MYSQL_LIB_DIR
+ ])
+- MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -lz"
++ MYSQL_LIBS="-L$PHP_ZLIB_LIBDIR -lz"
+ else
+ PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD)
+ PHP_CHECK_LIBRARY(mysqlclient, mysql_errno, [], [
+diff -Nru php-4.3.11.orig/ext/ncurses/config.m4 php-4.3.11/ext/ncurses/config.m4
+--- php-4.3.11.orig/ext/ncurses/config.m4 2003-12-09 21:33:22.000000000 +0100
++++ php-4.3.11/ext/ncurses/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -38,20 +38,26 @@
+ LIBNAME=ncurses
+ LIBSYMBOL=initscr
+
++ for j in lib64 lib; do
++ if test -d $NCURSES_DIR/$j; then
++ NCURSES_LIBDIR=$NCURSES_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [
+ AC_DEFINE(HAVE_NCURSESLIB,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD)
+
+ PHP_CHECK_LIBRARY(panel, new_panel, [
+ AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD)
+ ], [], [
+- -L$NCURSES_DIR/lib -l$LIBNAME -lm
++ -L$NCURSES_LIBDIR -l$LIBNAME -lm
+ ])
+ ], [
+ AC_MSG_ERROR(Wrong ncurses lib version or lib not found)
+ ], [
+- -L$NCURSES_DIR/lib -lm
++ -L$NCURSES_LIBDIR -lm
+ ])
+
+ AC_CHECK_LIB($LIBNAME, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])])
+diff -Nru php-4.3.11.orig/ext/odbc/config.m4 php-4.3.11/ext/odbc/config.m4
+--- php-4.3.11.orig/ext/odbc/config.m4 2005-01-18 22:21:16.000000000 +0100
++++ php-4.3.11/ext/odbc/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -47,19 +47,8 @@
+ #
+ # Check for the library files, and setup the ODBC_LIBS path...
+ #
+-if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
+- ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+- #
+- # we have an error and should bail out, as we can't find the libs!
+- #
+- echo ""
+- echo "*********************************************************************"
+- echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+- echo "* Please correct this by creating the following links and reconfiguring:"
+- echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+- echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
+- echo "*********************************************************************"
+-else
++if test -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
++ -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+ ODBC_LFLAGS=-L$1
+ ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
+ fi
+@@ -100,8 +89,12 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ADABAS_LIBDIR=$withval/$i
++ test -f "$ADABAS_LIBDIR/odbclib.a" && break
++ done
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($ADABAS_LIBDIR)
+ ODBC_OBJS="$withval/lib/odbclib.a"
+ ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a"
+ $srcdir/build/shtool mkdir -f -p ext/odbc
+@@ -132,8 +125,12 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ SAPDB_LIBDIR=$withval/$i
++ test -f "$SAPDB_LIBDIR/libsqlod.a" -o -f "$SAPDB_LIBDIR/libsqlod.$SHLIB_SUFFIX_NAME" && break
++ done
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($SAPDB_LIBDIR)
+ PHP_ADD_LIBRARY(sqlod)
+ ODBC_TYPE=sapdb
+ AC_DEFINE(HAVE_SAPDB,1,[ ])
+@@ -158,19 +155,36 @@
+ withval=/usr/local/solid
+ fi
+ if test "$withval" != "no"; then
+- ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+- ODBC_INCLUDE=-I$ODBC_INCDIR
+- ODBC_TYPE=solid
+- if test -f $ODBC_LIBDIR/soc*35.a; then
+- AC_DEFINE(HAVE_SOLID_35,1,[ ])
+- elif test -f $ODBC_LIBDIR/scl*30.a; then
+- AC_DEFINE(HAVE_SOLID_30,1,[ ])
+- elif test -f $ODBC_LIBDIR/scl*23.a; then
+- AC_DEFINE(HAVE_SOLID,1,[ ])
++ for i in lib64 lib; do
++ SOLID_LIBDIR=$withval/$i
++ ODBC_INCDIR=$withval/include
++ ODBC_LIBDIR=$withval/$j
++ ODBC_INCLUDE=-I$ODBC_INCDIR
++ ODBC_TYPE=solid
++ if test -f $ODBC_LIBDIR/soc*35.a; then
++ AC_DEFINE(HAVE_SOLID_35,1,[ ])
++ elif test -f $ODBC_LIBDIR/scl*30.a; then
++ AC_DEFINE(HAVE_SOLID_30,1,[ ])
++ elif test -f $ODBC_LIBDIR/scl*23.a; then
++ AC_DEFINE(HAVE_SOLID,1,[ ])
++ fi
++ AC_MSG_RESULT(yes)
++ ODBC_LIBS=
++ AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
++ test -n "$ODBC_LIBS" && break
++ done
++ if test -z "$ODBC_LIBS"; then
++ #
++ # we have an error and should bail out, as we can't find the libs!
++ #
++ echo ""
++ echo "*********************************************************************"
++ echo "* Unable to locate ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
++ echo "* Please correct this by creating the following links and reconfiguring:"
++ echo "* ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
++ echo "* ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
++ echo "*********************************************************************"
+ fi
+- AC_MSG_RESULT(yes)
+- AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -375,11 +389,15 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
++ for i in lib64 lib; do
++ IODBC_LIBDIR=$withval/$i
++ test -f "$IODBC_LIBDIR/libiodbc.a" -o -f "$IODBC_LIBDIR/libiodbc.$SHLIB_SUFFIX_NAME" && break
++ done
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $IODBC_LIBDIR)
+ PHP_ADD_INCLUDE($withval/include, 1)
+ ODBC_TYPE=iodbc
+ ODBC_INCLUDE=-I$withval/include
+- ODBC_LFLAGS=-L$withval/lib
++ ODBC_LFLAGS=-L$IODBC_LIBDIR
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
+ AC_DEFINE(HAVE_ODBC2,1,[ ])
+@@ -404,8 +422,11 @@
+ withval=/usr/local/easysoft/oob/client
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ODBC_LIBDIR=$withval/$i
++ test -f "$ODBC_LIBDIR/libesoobclient.a" -o -f "$ODBC_LIBDIR/libesoobclient.$SHLIB_SUFFIX_NAME" && break
++ done
+ ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lesoobclient
+@@ -431,8 +452,11 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ODBC_LIBDIR=$withval/$i
++ test -f "$ODBC_LIBDIR/libodbc.a" -o -f "$ODBC_LIBDIR/libodbc.$SHLIB_SUFFIX_NAME" && break
++ done
+ ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lodbc
+diff -Nru php-4.3.11.orig/ext/pcre/config.m4 php-4.3.11/ext/pcre/config.m4
+--- php-4.3.11.orig/ext/pcre/config.m4 2003-12-16 23:14:55.000000000 +0100
++++ php-4.3.11/ext/pcre/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -25,7 +25,7 @@
+ AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX])
+ fi
+
+- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do
++ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib64 $PHP_PCRE_REGEX/lib; do
+ test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
+ done
+
+diff -Nru php-4.3.11.orig/ext/pgsql/config.m4 php-4.3.11/ext/pgsql/config.m4
+--- php-4.3.11.orig/ext/pgsql/config.m4 2004-12-30 08:02:18.000000000 +0100
++++ php-4.3.11/ext/pgsql/config.m4 2005-12-01 09:14:33.000000000 +0100
+@@ -26,7 +26,7 @@
+ fi
+ done
+
+- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do
++ for j in lib64 lib lib64/pgsql lib/pgsql lib64/postgres lib/postgres lib64/postgresql lib/postgresql ""; do
+ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
+ PGSQL_LIBDIR=$i/$j
+ fi
+diff -Nru php-4.3.11.orig/ext/pspell/config.m4 php-4.3.11/ext/pspell/config.m4
+--- php-4.3.11.orig/ext/pspell/config.m4 2005-02-17 04:51:50.000000000 +0100
++++ php-4.3.11/ext/pspell/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -27,7 +27,11 @@
+ AC_MSG_ERROR(Cannot find pspell)
+ fi
+
+- PSPELL_LIBDIR=$PSPELL_DIR/lib
++ for j in lib64 lib; do
++ if test -d $PSPELL_DIR/$j; then
++ PSPELL_LIBDIR=$PSPELL_DIR/$j
++ fi
++ done
+
+ PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
+
+diff -Nru php-4.3.11.orig/ext/readline/config.m4 php-4.3.11/ext/readline/config.m4
+--- php-4.3.11.orig/ext/readline/config.m4 2003-10-01 04:54:04.000000000 +0200
++++ php-4.3.11/ext/readline/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -29,22 +29,28 @@
+ ])
+ ])
+
++ for j in lib64 lib; do
++ if test -d $READLINE_DIR/$j; then
++ READLINE_LIBDIR=$READLINE_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(readline, readline,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(readline library not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_CHECK_LIBRARY(history, add_history,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(history library required by readline not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
+@@ -73,13 +79,19 @@
+ ])
+ ])
+
++ for j in lib64 lib; do
++ if test -d $LIBEDIT_DIR/$j; then
++ LIBEDIT_LIBDIR=$LIBEDIT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(edit, readline,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(edit library required by readline not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
+diff -Nru php-4.3.11.orig/ext/session/config.m4 php-4.3.11/ext/session/config.m4
+--- php-4.3.11.orig/ext/session/config.m4 2003-10-01 04:54:06.000000000 +0200
++++ php-4.3.11/ext/session/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -24,8 +24,14 @@
+ if test -z "$MM_DIR" ; then
+ AC_MSG_ERROR(cannot find mm library)
+ fi
+-
+- PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib, SESSION_SHARED_LIBADD)
++
++ for j in lib64 lib; do
++ if test -d $MM_DIR/$j; then
++ MM_LIBDIR=$MM_DIR/$j
++ fi
++ done
++
++ PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_LIBDIR, SESSION_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MM_DIR/include)
+ AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm])
+ fi
+diff -Nru php-4.3.11.orig/ext/snmp/config.m4 php-4.3.11/ext/snmp/config.m4
+--- php-4.3.11.orig/ext/snmp/config.m4 2003-09-23 10:16:47.000000000 +0200
++++ php-4.3.11/ext/snmp/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -45,8 +45,8 @@
+ test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp
+ test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp
+ done
+- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do
+- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib
++ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do
++ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i
+ done
+ else
+ SNMP_INCDIR=$PHP_SNMP/include
+diff -Nru php-4.3.11.orig/ext/xml/config.m4 php-4.3.11/ext/xml/config.m4
+--- php-4.3.11.orig/ext/xml/config.m4 2004-12-20 21:38:18.000000000 +0100
++++ php-4.3.11/ext/xml/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -33,6 +33,10 @@
+ for i in $PHP_XML $PHP_EXPAT_DIR; do
+ if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then
+ EXPAT_DIR=$i
++ EXPAT_LIBDIR=$i/lib
++ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME ; then
++ EXPAT_DIR=$i
++ EXPAT_LIBDIR=$i/lib64
+ fi
+ done
+
+@@ -41,7 +45,7 @@
+ fi
+
+ PHP_ADD_INCLUDE($EXPAT_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_LIBDIR, XML_SHARED_LIBADD)
+ PHP_SUBST(XML_SHARED_LIBADD)
+ fi
+ fi
+diff -Nru php-4.3.11.orig/ext/xmlrpc/config.m4 php-4.3.11/ext/xmlrpc/config.m4
+--- php-4.3.11.orig/ext/xmlrpc/config.m4 2003-10-03 07:25:43.000000000 +0200
++++ php-4.3.11/ext/xmlrpc/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -29,6 +29,12 @@
+ PHP_ADD_INCLUDE($i/include)
+ testval=yes
+ break
++ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then
++ AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XMLRPC_SHARED_LIBADD)
++ PHP_ADD_INCLUDE($i/include)
++ testval=yes
++ break
+ fi
+ done
+
+@@ -87,6 +93,12 @@
+ AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $XMLRPC_DIR/$j; then
++ XMLRPC_LIBDIR=$XMLRPC_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($XMLRPC_DIR)
+- PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_LIBDIR, XMLRPC_SHARED_LIBADD)
+ fi
+diff -Nru php-4.3.11.orig/ext/xslt/config.m4 php-4.3.11/ext/xslt/config.m4
+--- php-4.3.11.orig/ext/xslt/config.m4 2004-08-18 07:14:16.000000000 +0200
++++ php-4.3.11/ext/xslt/config.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -104,6 +104,12 @@
+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XSLT_SHARED_LIBADD)
+ found_expat=yes
+ break
++ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then
++ AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ])
++ PHP_ADD_INCLUDE($i/include)
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XSLT_SHARED_LIBADD)
++ found_expat=yes
++ break
+ fi
+ done
+
+@@ -124,29 +130,38 @@
+ ])
+
+ if test "$PHP_SABLOT_JS" != "no"; then
+- for i in $PHP_SABLOT_JS /usr/local /usr; do
+- if test -f $i/lib/libjs.a -o -f $i/lib/libjs.$SHLIB_SUFFIX_NAME; then
+- PHP_SABLOT_JS_DIR=$i
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_SABLOT_JS /usr/local /usr; do
++ if test -f $i/$j/libjs.a -o -f $i/$j/libjs.$SHLIB_SUFFIX_NAME; then
++ PHP_SABLOT_JS_DIR=$i
++ PHP_SABLOT_JS_LIBDIR=$i/$j
++ break
++ fi
++ done
+ done
+
+ PHP_CHECK_LIBRARY(js, JS_GetRuntime,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_DIR/lib, XSLT_SHARED_LIBADD)
+- PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_DIR/lib -ljs"
++ PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_LIBDIR, XSLT_SHARED_LIBADD)
++ PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_LIBDIR -ljs"
+ ], [
+ AC_MSG_ERROR([libjs not found. Please check config.log for more information.])
+ ], [
+- -L$PHP_SABLOT_JS_DIR/lib
++ -L$PHP_SABLOT_JS_LIBDIR
+ ])
+ fi
+
++ for j in lib64 lib; do
++ if test -d $XSLT_DIR/$j; then
++ XSLT_LIBDIR=$XSLT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(sablot, SablotSetEncoding,
+ [
+ AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ])
+ ], [], [
+- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS
++ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS
+ ])
+
+ dnl SablotSetOptions implemented in Sablotron CVS > 2002/10/31
+@@ -154,14 +169,14 @@
+ [
+ AC_DEFINE(HAVE_SABLOT_GET_OPTIONS, 1, [Whether Sablotron supports SablotGetOptions])
+ ], [], [
+- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS
++ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS
+ ])
+
+ AC_DEFINE(HAVE_SABLOT_BACKEND, 1, [ ])
+ fi
+
+ PHP_ADD_INCLUDE($XSLT_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_DIR/lib, XSLT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_LIBDIR, XSLT_SHARED_LIBADD)
+
+ AC_DEFINE(HAVE_XSLT, 1, [ ])
+ fi
+diff -Nru php-4.3.11.orig/ext/zlib/config0.m4 php-4.3.11/ext/zlib/config0.m4
+--- php-4.3.11.orig/ext/zlib/config0.m4 2003-07-02 01:54:44.000000000 +0200
++++ php-4.3.11/ext/zlib/config0.m4 2005-12-01 08:54:41.000000000 +0100
+@@ -36,15 +36,21 @@
+ AC_MSG_ERROR(Cannot find libz)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $ZLIB_DIR/$j; then
++ ZLIB_LIBDIR=$ZLIB_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(z, gzgets, [
+ AC_DEFINE(HAVE_ZLIB,1,[ ])
+ ],[
+ AC_MSG_ERROR(ZLIB extension requires zlib >= 1.0.9)
+ ],[
+- -L$ZLIB_DIR/lib
++ -L$ZLIB_LIBDIR
+ ])
+
+- PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD)
++ PHP_ADD_LIBPATH($ZLIB_LIBDIR, ZLIB_SHARED_LIBADD)
+
+ PHP_ZLIB_DIR=$ZLIB_DIR
+ PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD)
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch b/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch
new file mode 100644
index 0000000..3e44142
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch
@@ -0,0 +1,20 @@
+--- ext/pcre/config.m4 2003/12/16 22:14:55 1.29.2.5
++++ ext/pcre/config.m4 2005/08/09 17:41:56 1.29.2.7.2.1
+@@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
+
+ if test "$PHP_PCRE_REGEX" != "no"; then
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+- PHP_NEW_EXTENSION(pcre, pcrelib/maketables.c pcrelib/get.c pcrelib/study.c pcrelib/pcre.c php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I@ext_srcdir@/pcrelib)
++ PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_dfa_exec.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_printint.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_ucp_findchar.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib)
+ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ else
+@@ -50,7 +50,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then
+
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ PHP_ADD_INCLUDE($PCRE_INCDIR)
+- PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10)
++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000)
+ fi
+ PHP_SUBST(PCRE_SHARED_LIBADD)
+ fi
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch b/dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch
new file mode 100644
index 0000000..2c7d999
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-phpinfo_xss.patch
@@ -0,0 +1,75 @@
+--- ext/standard/info.c 2004-06-09 17:10:19.000000000 +0200
++++ ext/standard/info.c 2005-11-01 01:22:42.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: info.c,v 1.218.2.16 2004/06/09 15:10:19 iliaa Exp $ */
++/* $Id: info.c,v 1.218.2.18.2.4 2005/08/16 00:26:02 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -133,10 +133,21 @@
+ PUTS(" => ");
+ }
+ if (Z_TYPE_PP(tmp) == IS_ARRAY) {
++ zval *tmp3;
++ MAKE_STD_ZVAL(tmp3);
+ if (!sapi_module.phpinfo_as_text) {
+ PUTS("<pre>");
+ }
++ php_start_ob_buffer(NULL, 4096, 1 TSRMLS_CC);
+ zend_print_zval_r(*tmp, 0);
++ php_ob_get_buffer(tmp3 TSRMLS_CC);
++ php_end_ob_buffer(0, 0 TSRMLS_CC);
++
++ elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
++ zval_ptr_dtor(&tmp3);
++
+ if (!sapi_module.phpinfo_as_text) {
+ PUTS("</pre>");
+ }
+@@ -196,7 +207,7 @@
+ PHPAPI char *php_info_html_esc(char *string TSRMLS_DC)
+ {
+ int new_len;
+- return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_NOQUOTES, NULL TSRMLS_CC);
++ return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
+ }
+ /* }}} */
+
+@@ -408,7 +419,9 @@
+ if (expose_php && !sapi_module.phpinfo_as_text) {
+ PUTS("<a href=\"http://www.php.net/\"><img border=\"0\" src=\"");
+ if (SG(request_info).request_uri) {
+- PUTS(SG(request_info).request_uri);
++ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
+ }
+ if ((ta->tm_mon==3) && (ta->tm_mday==1)) {
+ PUTS("?="PHP_EGG_LOGO_GUID"\" alt=\"Nadia!\" /></a>");
+@@ -510,7 +529,9 @@
+ if (expose_php && !sapi_module.phpinfo_as_text) {
+ PUTS("<a href=\"http://www.zend.com/\"><img border=\"0\" src=\"");
+ if (SG(request_info).request_uri) {
+- PUTS(SG(request_info).request_uri);
++ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
+ }
+ PUTS("?="ZEND_LOGO_GUID"\" alt=\"Zend logo\" /></a>\n");
+ }
+@@ -525,7 +546,9 @@
+ php_info_print_hr();
+ PUTS("<h1><a href=\"");
+ if (SG(request_info).request_uri) {
+- PUTS(SG(request_info).request_uri);
++ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
+ }
+ PUTS("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">");
+ PUTS("PHP Credits");
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch
new file mode 100644
index 0000000..a62c42f
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch
@@ -0,0 +1,317 @@
+--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200
++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */
++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */
+
+ #define IS_EXT_MODULE
+
+@@ -99,6 +99,22 @@
+ delete_pspell_config(config);
+ }
+
++#define PSPELL_FETCH_CONFIG \
++ convert_to_long_ex(conf); \
++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \
++ if (config == NULL || type != le_pspell_config) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \
++ RETURN_FALSE; \
++ } \
++
++#define PSPELL_FETCH_MANAGER \
++ convert_to_long_ex(scin); \
++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \
++ if (!manager || type != le_pspell) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \
++ RETURN_FALSE; \
++ } \
++
+ /* {{{ PHP_MINIT_FUNCTION
+ */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -350,14 +366,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(conf);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
++ PSPELL_FETCH_CONFIG;
+
+- if (config == NULL || type != le_pspell_config) {
+- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+- RETURN_FALSE;
+- }
+-
+ ret = new_pspell_manager(config);
+
+ if(pspell_error_number(ret) != 0){
+@@ -385,13 +395,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+ RETURN_TRUE;
+@@ -417,13 +423,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ array_init(return_value);
+
+@@ -455,14 +457,10 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(miss);
+ convert_to_string_ex(corr);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+ if(pspell_manager_error_number(manager) == 0){
+@@ -488,13 +486,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -525,13 +519,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -562,12 +552,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_clear_session(manager);
+ if(pspell_manager_error_number(manager) == 0){
+@@ -593,12 +578,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_save_all_word_lists(manager);
+
+@@ -666,22 +646,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+ int type;
+- zval **sccin, **runtogether;
++ zval **conf, **runtogether;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(runtogether);
+ pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -695,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+ int type;
+- zval **sccin, **mode;
++ zval **conf, **mode;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(mode);
+
+@@ -732,7 +702,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+ int type;
+- zval **sccin, **pignore;
++ zval **conf, **pignore;
+ int argc;
+
+ int loc = PSPELL_LARGEST_WORD;
+@@ -742,16 +712,11 @@
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(pignore);
+ ignore = Z_LVAL_PP(pignore);
+@@ -782,22 +747,17 @@
+ PHP_FUNCTION(pspell_config_personal)
+ {
+ int type;
+- zval **sccin, **personal;
++ zval **conf, **personal;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_string_ex(personal);
+
+@@ -820,22 +780,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+ int type;
+- zval **sccin, **repl;
++ zval **conf, **repl;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ pspell_config_replace(config, "save-repl", "true");
+
+@@ -860,22 +815,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+ int type;
+- zval **sccin, **save;
++ zval **conf, **save;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(save);
+ pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch
new file mode 100644
index 0000000..3836776
--- /dev/null
+++ b/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch
@@ -0,0 +1,154 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100
++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:02:03.000000000 +0200
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */
+
+ #include <fcntl.h>
+
+@@ -268,23 +268,18 @@
+ TSRMLS_FETCH();
+
+ ctx = SG(server_context);
+-
+- /* We use APLOG_STARTUP because it keeps us from printing the
+- * data and time information at the beginning of the error log
+- * line. Not sure if this is correct, but it mirrors what happens
+- * with Apache 1.3 -- rbb
+- */
++
+ if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
+ ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
+ } else {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg);
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg);
+ }
+ }
+
+ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
+ {
+ if (r) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename);
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
+ } else {
+ php_apache_sapi_log_message(msg);
+ }
+@@ -458,15 +453,34 @@
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF \
++ if (strcmp(r->protocol, "INCLUDED")) { \
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++ } \
++
+ conf = ap_get_module_config(r->per_dir_config, &php4_module);
++
++ /* apply_config() needs r in some cases, so allocate server_context early */
++ ctx = SG(server_context);
++ if (ctx == NULL) {
++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++ /* register a cleanup so we clear out the SG(server_context)
++ * after each request. Note: We pass in the pointer to the
++ * server_context in case this is handled by a different thread.
++ */
++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++ ctx->r = r;
++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++ } else {
++ parent_req = ctx->r;
++ ctx->r = r;
++ }
+ apply_config(conf);
+
+ if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+ /* Check for xbithack in this case. */
+ if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+ }
+@@ -475,32 +489,24 @@
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+
+ /* handle situations where user turns the engine off */
+ if (!AP2(engine)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_FORBIDDEN;
+ }
+
+@@ -516,24 +522,30 @@
+
+ zend_first_try {
+
+- ctx = SG(server_context);
+ if (ctx == NULL) {
+- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+- /* register a cleanup so we clear out the SG(server_context)
+- * after each request. Note: We pass in the pointer to the
+- * server_context in case this is handled by a different thread.
+- */
+- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+- ctx->r = r;
++normal:
+ brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++ ctx = SG(server_context);
+ ctx->brigade = brigade;
+
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
+ } else {
+- parent_req = ctx->r;
++ if (!parent_req) {
++ parent_req = ctx->r;
++ }
++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++ zend_bailout();
++ }
++ }
++
++ /* check if comming due to ErrorDocument */
++ if (parent_req && parent_req->status != HTTP_OK) {
++ parent_req = NULL;
++ goto normal;
++ }
+ ctx->r = r;
+ brigade = ctx->brigade;
+ }
diff --git a/dev-lang/php/files/4.4.0/CVS/Entries b/dev-lang/php/files/4.4.0/CVS/Entries
new file mode 100644
index 0000000..701caa9
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/CVS/Entries
@@ -0,0 +1,17 @@
+D/apache-1.3////
+D/apache-2.0////
+/fastbuild.patch/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php4-hphp-acinclude.patch/1.1/Thu Sep 8 20:47:34 2005/-ko/T1.1
+/php4-imap-symlink.diff/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php4-iodbc-config.diff/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php4-libtool-1.5.patch/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php4-with-iodbc.diff/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php4.3.11-pcre-security.patch/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php4.4.0-curl_safemode.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php4.4.0-fopen_wrappers.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.4.0-gd_safe_mode.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.4.0-globals_overwrite.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php4.4.0-pcre-security.patch/1.1/Sun Sep 18 13:21:54 2005/-ko/T1.1
+/php4.4.0-phpinfo_xss.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php4.4.0-pspell-ext-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php4.4.0-session_save_path-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
diff --git a/dev-lang/php/files/4.4.0/CVS/Repository b/dev-lang/php/files/4.4.0/CVS/Repository
new file mode 100644
index 0000000..0be8d4c
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4.4.0
diff --git a/dev-lang/php/files/4.4.0/CVS/Root b/dev-lang/php/files/4.4.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4.4.0/CVS/Tag b/dev-lang/php/files/4.4.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf b/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf
new file mode 100644
index 0000000..34a41d8
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf
@@ -0,0 +1,19 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/4.4.0/apache-1.3/CVS/Entries b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Entries
new file mode 100644
index 0000000..3bf85e4
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php.conf/1.1/Sun Sep 4 16:58:08 2005//T1.1
+D
diff --git a/dev-lang/php/files/4.4.0/apache-1.3/CVS/Repository b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Repository
new file mode 100644
index 0000000..969ffa4
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4.4.0/apache-1.3
diff --git a/dev-lang/php/files/4.4.0/apache-1.3/CVS/Root b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4.4.0/apache-1.3/CVS/Tag b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-1.3/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf b/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf
new file mode 100644
index 0000000..ce68032
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf
@@ -0,0 +1,19 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/4.4.0/apache-2.0/CVS/Entries b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Entries
new file mode 100644
index 0000000..3bf85e4
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php.conf/1.1/Sun Sep 4 16:58:08 2005//T1.1
+D
diff --git a/dev-lang/php/files/4.4.0/apache-2.0/CVS/Repository b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Repository
new file mode 100644
index 0000000..bc4ce28
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4.4.0/apache-2.0
diff --git a/dev-lang/php/files/4.4.0/apache-2.0/CVS/Root b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4.4.0/apache-2.0/CVS/Tag b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-2.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4.4.0/fastbuild.patch b/dev-lang/php/files/4.4.0/fastbuild.patch
new file mode 100644
index 0000000..0af555e
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/fastbuild.patch
@@ -0,0 +1,250 @@
+diff -u --recursive php-4.4.0/aclocal.m4 php-4.4.0-cgi/aclocal.m4
+--- php-4.4.0/aclocal.m4 2005-07-11 11:07:27.000000000 +0100
++++ php-4.4.0-cgi/aclocal.m4 2005-09-01 08:03:20.000000000 +0100
+@@ -84,7 +84,7 @@
+ dnl
+ dnl which array to append to?
+ AC_DEFUN([PHP_ADD_SOURCES],[
+- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS))))
+ ])
+ dnl
+ dnl _PHP_ASSIGN_BUILD_VARS(type)
+diff -u --recursive php-4.4.0/configure.in php-4.4.0-cgi/configure.in
+--- php-4.4.0/configure.in 2005-07-11 08:45:09.000000000 +0100
++++ php-4.4.0-cgi/configure.in 2005-09-01 08:00:54.000000000 +0100
+@@ -1216,20 +1216,20 @@
+ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
+
+-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
++all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)'
+ install_targets="$install_modules $install_pear install-build install-headers install-programs"
+
+-case $PHP_SAPI in
+- cgi)
+- install_targets="install-sapi $install_targets"
+- ;;
+- cli)
+- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+- *)
+- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+-esac
++if test "$PHP_SAPI_CGI" != "no" ; then
++ install_targets="install-sapi $install_targets"
++fi
++
++if test "$PHP_SAPI_CLI" != "no" ; then
++ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
++fi
++
++if test "$PHP_SAPI" != "default" ; then
++ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
++fi
+
+ PHP_SUBST(all_targets)
+ PHP_SUBST(install_targets)
+diff -u --recursive php-4.4.0/sapi/cgi/Makefile.frag php-4.4.0-cgi/sapi/cgi/Makefile.frag
+--- php-4.4.0/sapi/cgi/Makefile.frag 2003-07-02 02:06:29.000000000 +0100
++++ php-4.4.0-cgi/sapi/cgi/Makefile.frag 2005-09-01 08:03:20.000000000 +0100
+@@ -1,2 +1,6 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS)
+ $(BUILD_CGI)
++
++install-cgi: $(SAPI_CGI_PATH)
++ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
++ @$(INSTALL_CGI)
+diff -u --recursive php-4.4.0/sapi/cgi/config9.m4 php-4.4.0-cgi/sapi/cgi/config9.m4
+--- php-4.4.0/sapi/cgi/config9.m4 2004-12-30 07:02:18.000000000 +0000
++++ php-4.4.0-cgi/sapi/cgi/config9.m4 2005-09-01 08:05:08.000000000 +0100
+@@ -81,93 +81,107 @@
+ ])
+
+
+-if test "$PHP_SAPI" = "default"; then
+- AC_MSG_CHECKING(for CGI build)
+- if test "$PHP_SAPI_CGI" != "no"; then
+- AC_MSG_RESULT(yes)
+-
+- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
+- case $host_alias in
+- *cygwin* )
+- SAPI_CGI_PATH=sapi/cgi/php.exe
+- ;;
+- * )
+- SAPI_CGI_PATH=sapi/cgi/php
+- ;;
+- esac
+- PHP_SUBST(SAPI_CGI_PATH)
+-
+- PHP_TEST_WRITE_STDOUT
+-
+- AC_MSG_CHECKING(whether to force Apache CGI redirect)
+- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
+- REDIRECT=1
+- else
+- REDIRECT=0
+- fi
+- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
+- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
++AC_MSG_CHECKING(for CGI build)
++if test "$PHP_SAPI_CGI" != "no"; then
++ AC_MSG_RESULT(yes)
++
++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
++ case $host_alias in
++ *cygwin* )
++ SAPI_CGI_PATH=sapi/cgi/php.exe
++ ;;
++ * )
++ SAPI_CGI_PATH=sapi/cgi/php
++ ;;
++ esac
++ PHP_SUBST(SAPI_CGI_PATH)
+
++ PHP_TEST_WRITE_STDOUT
+
+- AC_MSG_CHECKING(whether to discard path_info + path_translated)
+- if test "$PHP_DISCARD_PATH" = "yes"; then
+- DISCARD_PATH=1
+- else
+- DISCARD_PATH=0
+- fi
+- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
+- AC_MSG_RESULT($PHP_DISCARD_PATH)
++ AC_MSG_CHECKING(whether to force Apache CGI redirect)
++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
++ REDIRECT=1
++ else
++ REDIRECT=0
++ fi
++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
+
+- AC_MSG_CHECKING(whether to enable path info checking)
+- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
+- ENABLE_PATHINFO_CHECK=1
+- else
+- ENABLE_PATHINFO_CHECK=0
+- fi
+- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
+
+- AC_MSG_CHECKING(whether to enable fastcgi support)
+- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
+- if test -z $PHP_LIBFCGI_DIR; then
+- echo "$PHP_LIBFCGI_DIR does not exist"
+- exit 1
+- fi
+- if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
+- PHP_FASTCGI=1
+- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
+- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
+- PHP_FCGI_STATIC=1
+- else
+- PHP_FASTCGI=0
+- PHP_FCGI_FILES=""
+- PHP_FCGI_INCLUDE=""
+- PHP_FCGI_STATIC=0
+- fi
+- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
+- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+-
+- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)')
+-
+- case $host_alias in
+- *darwin*)
+- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ AC_MSG_CHECKING(whether to discard path_info + path_translated)
++ if test "$PHP_DISCARD_PATH" = "yes"; then
++ DISCARD_PATH=1
++ else
++ DISCARD_PATH=0
++ fi
++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
++ AC_MSG_RESULT($PHP_DISCARD_PATH)
++
++ AC_MSG_CHECKING(whether to enable path info checking)
++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
++ ENABLE_PATHINFO_CHECK=1
++ else
++ ENABLE_PATHINFO_CHECK=0
++ fi
++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
++
++ AC_MSG_CHECKING(whether to enable fastcgi support)
++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
++ if test -z $PHP_LIBFCGI_DIR; then
++ echo "$PHP_LIBFCGI_DIR does not exist"
++ exit 1
++ fi
++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then
++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
++ PHP_FASTCGI=1
++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
++ PHP_FCGI_STATIC=1
++ else
++ PHP_FASTCGI=0
++ PHP_FCGI_FILES=""
++ PHP_FCGI_INCLUDE=""
++ PHP_FCGI_STATIC=0
++ fi
++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
++
++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi)
++ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi)
++
++ case $host_alias in
++ *darwin*)
++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- *)
+- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ *)
++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- esac
++ esac
+
+- PHP_SUBST(BUILD_CGI)
++ PHP_CGI_TARGET="$SAPI_CGI_PATH"
++ PHP_INSTALL_CGI_TARGET="install-cgi"
+
+- elif test "$PHP_SAPI_CLI" != "no"; then
+- AC_MSG_RESULT(no)
+- OVERALL_TARGET=
+- PHP_SAPI=cli
+- else
+- AC_MSG_ERROR([No SAPIs selected.])
++ PHP_SUBST(BUILD_CGI)
++ PHP_SUBST(INSTALL_CGI)
++ PHP_SUBST(PHP_CGI_OBJS)
++ PHP_SUBST(PHP_CGI_TARGET)
++ PHP_SUBST(PHP_INSTALL_CGI_TARGET)
++
++ if test "$PHP_SAPI" = "default" ; then
++ PHP_BUILD_PROGRAM($SAPI_CGI_PATH)
++ fi
++
++else
++ AC_MSG_RESULT(no)
++ if test "$PHP_SAPI" = "default" ; then
++ if test "$PHP_SAPI_CLI" != "no"; then
++ OVERALL_TARGET=
++ PHP_SAPI=cli
++ else
++ AC_MSG_ERROR([No SAPIs selected.])
++ fi
+ fi
+ fi
diff --git a/dev-lang/php/files/4.4.0/php4-hphp-acinclude.patch b/dev-lang/php/files/4.4.0/php4-hphp-acinclude.patch
new file mode 100644
index 0000000..68a6bfe
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-hphp-acinclude.patch
@@ -0,0 +1,19 @@
+--- acinclude.m4.orig 2005-09-08 13:16:38.000000000 +0200
++++ acinclude.m4 2005-09-08 13:21:09.000000000 +0200
+@@ -783,12 +783,12 @@
+ dnl
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+- php_c_pre='$(CC)'
++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=' && echo > $[@]'
+- php_cxx_pre='$(CXX)'
++ php_c_post=
++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=' && echo > $[@]'
++ php_cxx_post=
+ php_lo=o
+
+ case $with_pic in
diff --git a/dev-lang/php/files/4.4.0/php4-imap-symlink.diff b/dev-lang/php/files/4.4.0/php4-imap-symlink.diff
new file mode 100644
index 0000000..cf74905
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 02:48:47.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 02:49:05.000000000 +0200
+@@ -158,12 +158,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/lib/c-client.a"; then
+- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
diff --git a/dev-lang/php/files/4.4.0/php4-iodbc-config.diff b/dev-lang/php/files/4.4.0/php4-iodbc-config.diff
new file mode 100644
index 0000000..a706916
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-10 02:05:26.000000000 +0200
++++ ext/odbc/config.m4 2005-08-10 02:06:10.000000000 +0200
+@@ -401,9 +401,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/lib
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/4.4.0/php4-libtool-1.5.patch b/dev-lang/php/files/4.4.0/php4-libtool-1.5.patch
new file mode 100644
index 0000000..0761203
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-libtool-1.5.patch
@@ -0,0 +1,19 @@
+--- acinclude.m4 2005-09-08 13:16:38.000000000 +0200
++++ acinclude.m4 2005-09-08 13:21:09.000000000 +0200
+@@ -783,12 +783,12 @@
+ dnl
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+- php_c_pre='$(CC)'
++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=' && echo > $[@]'
+- php_cxx_pre='$(CXX)'
++ php_c_post=
++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=' && echo > $[@]'
++ php_cxx_post=
+ php_lo=o
+
+ case $with_pic in
diff --git a/dev-lang/php/files/4.4.0/php4-with-iodbc.diff b/dev-lang/php/files/4.4.0/php4-with-iodbc.diff
new file mode 100644
index 0000000..81afcc0
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-with-iodbc.diff
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
+ #define SQL_CURSOR_DYNAMIC 2UL
diff --git a/dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch b/dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch
new file mode 100644
index 0000000..284825b
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch
@@ -0,0 +1,38 @@
+--- configure.in 2005-09-17 21:00:43.000000000 +0200
++++ configure.in 2005-09-17 21:00:18.000000000 +0200
+@@ -41,7 +41,7 @@
+ MAJOR_VERSION=4
+ MINOR_VERSION=3
+ RELEASE_VERSION=11
+-EXTRA_VERSION=""
++EXTRA_VERSION="-gentoo-r1"
+ VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
+
+ dnl Define where extension directories are located in the configure context
+--- ext/pcre/config.m4 2003/12/16 22:14:55 1.29.2.5
++++ ext/pcre/config.m4 2005/08/09 17:41:56 1.29.2.7.2.1
+@@ -1,5 +1,5 @@
+ dnl
+-dnl $Id: php4.3.11-pcre-security.patch,v 1.1 2005/09/18 13:21:54 hollow Exp $
++dnl $Id: php4.3.11-pcre-security.patch,v 1.1 2005/09/18 13:21:54 hollow Exp $
+ dnl
+
+ dnl By default we'll compile and link against the bundled PCRE library
+@@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
+
+ if test "$PHP_PCRE_REGEX" != "no"; then
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+- PHP_NEW_EXTENSION(pcre, pcrelib/maketables.c pcrelib/get.c pcrelib/study.c pcrelib/pcre.c php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I@ext_srcdir@/pcrelib)
++ PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_dfa_exec.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_printint.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_ucp_findchar.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib)
+ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ else
+@@ -50,7 +50,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then
+
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ PHP_ADD_INCLUDE($PCRE_INCDIR)
+- PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10)
++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000)
+ fi
+ PHP_SUBST(PCRE_SHARED_LIBADD)
+ fi
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-curl_safemode.patch b/dev-lang/php/files/4.4.0/php4.4.0-curl_safemode.patch
new file mode 100644
index 0000000..32a82e0
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-curl_safemode.patch
@@ -0,0 +1,46 @@
+--- ext/curl/curl.c 2005-06-02 23:05:06.000000000 +0200
++++ ext/curl/curl.c 2005-10-17 04:42:51.000000000 +0200
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: curl.c,v 1.124.2.30 2005/06/02 21:05:06 tony2001 Exp $ */
++/* $Id: curl.c,v 1.124.2.30.2.3 2005/10/17 02:42:51 iliaa Exp $ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+@@ -66,7 +66,7 @@
+ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+- if (PG(open_basedir) && *PG(open_basedir) && \
++ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
+ strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+@@ -76,7 +76,7 @@
+ RETURN_FALSE; \
+ } \
+ \
+- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
+@@ -992,10 +992,15 @@
+
+ postval = Z_STRVAL_PP(current);
+ if (*postval == '@') {
++ ++postval;
++ /* safe_mode / open_basedir check */
++ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
++ RETURN_FALSE;
++ }
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,
+- CURLFORM_FILE, ++postval,
++ CURLFORM_FILE, postval,
+ CURLFORM_END);
+ }
+ else {
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch b/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch
new file mode 100644
index 0000000..672da5e
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10
++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2
+@@ -16,7 +16,7 @@
+ | Jim Winstead <jimw@php.net> |
+ +----------------------------------------------------------------------+
+ */
+-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */
++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */
+
+ /* {{{ includes
+ */
+@@ -36,14 +36,6 @@
+ #include <winsock.h>
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -57,8 +49,6 @@
+ #if HAVE_PWD_H
+ #ifdef PHP_WIN32
+ #include "win32/pwd.h"
+-#elif defined(NETWARE)
+-#include "netware/pwd.h"
+ #else
+ #include <pwd.h>
+ #endif
+@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based
+ /* Handler for basedirs that end with a / */
+ resolved_basedir_len = strlen(resolved_basedir);
+ if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+- if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+ resolved_basedir[++resolved_basedir_len] = '\0';
+ }
+ }
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch b/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch
new file mode 100644
index 0000000..1e0d49d
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch
@@ -0,0 +1,20 @@
+--- ext/gd/gd.c 2005/05/06 16:51:54 1.221.2.56
++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */
++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+ Cold Spring Harbor Labs. */
+@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+ RETURN_FALSE;
+ }
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-globals_overwrite.patch b/dev-lang/php/files/4.4.0/php4.4.0-globals_overwrite.patch
new file mode 100644
index 0000000..3aefaee
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-globals_overwrite.patch
@@ -0,0 +1,314 @@
+--- ext/standard/array.c 2005-06-21 14:11:19.000000000 +0200
++++ ext/standard/array.c 2005-11-01 00:40:11.000000000 +0100
+@@ -22,7 +22,7 @@
+ */
+
+
+-/* $Id: array.c,v 1.199.2.44.2.2 2005/06/21 12:11:19 dmitry Exp $ */
++/* $Id: array.c,v 1.199.2.44.2.9 2005/10/03 14:05:07 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -1252,6 +1252,10 @@
+ /* break omitted intentionally */
+
+ case EXTR_OVERWRITE:
++ /* GLOBALS protection */
++ if (var_exists && !strcmp(var_name, "GLOBALS")) {
++ break;
++ }
+ smart_str_appendl(&final_name, var_name, var_name_len);
+ break;
+
+@@ -1300,11 +1304,11 @@
+ zval **orig_var;
+
+ if (zend_hash_find(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) &orig_var) == SUCCESS) {
+- zval_ptr_dtor(orig_var);
+-
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
+ zval_add_ref(entry);
+
++ zval_ptr_dtor(orig_var);
++
+ *orig_var = *entry;
+ } else {
+ if ((*var_array)->refcount > 1) {
+@@ -1831,8 +1835,8 @@
+ hashtable and replace it with new one */
+ new_hash = php_splice(Z_ARRVAL_P(stack), 0, 0, &args[1], argc-1, NULL);
+ zend_hash_destroy(Z_ARRVAL_P(stack));
+- efree(Z_ARRVAL_P(stack));
+- Z_ARRVAL_P(stack) = new_hash;
++ *Z_ARRVAL_P(stack) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up and return the number of elements in the stack */
+ efree(args);
+@@ -1909,8 +1913,8 @@
+
+ /* Replace input array's hashtable with the new one */
+ zend_hash_destroy(Z_ARRVAL_P(array));
+- efree(Z_ARRVAL_P(array));
+- Z_ARRVAL_P(array) = new_hash;
++ *Z_ARRVAL_P(array) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up */
+ if (argc == 4)
+@@ -2397,8 +2401,8 @@
+
+ /* Copy the result hash into return value */
+ zend_hash_destroy(Z_ARRVAL_P(return_value));
+- efree(Z_ARRVAL_P(return_value));
+- Z_ARRVAL_P(return_value) = new_hash;
++ *Z_ARRVAL_P(return_value) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up */
+ efree(pads);
+@@ -2622,6 +2626,15 @@
+ /* copy the argument array */
+ *return_value = **args[0];
+ zval_copy_ctor(return_value);
++ if (return_value->value.ht == &EG(symbol_table)) {
++ HashTable *ht;
++ zval *tmp;
++
++ ALLOC_HASHTABLE(ht);
++ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
++ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++ return_value->value.ht = ht;
++ }
+
+ /* go through the lists and look for common values */
+ while (*ptrs[0]) {
+@@ -2772,6 +2785,15 @@
+ /* copy the argument array */
+ *return_value = **args[0];
+ zval_copy_ctor(return_value);
++ if (return_value->value.ht == &EG(symbol_table)) {
++ HashTable *ht;
++ zval *tmp;
++
++ ALLOC_HASHTABLE(ht);
++ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
++ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++ return_value->value.ht = ht;
++ }
+
+ /* go through the lists and look for values of ptr[0]
+ that are not in the others */
+@@ -3299,6 +3321,7 @@
+ PHP_FUNCTION(array_filter)
+ {
+ zval **input, **callback = NULL;
++ zval *array, *func = NULL;
+ zval **operand;
+ zval **args[1];
+ zval *retval = NULL;
+@@ -3317,9 +3340,13 @@
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array");
+ return;
+ }
++ if (callback) {
++ func = *callback;
++ }
++ array = *input;
+
+ if (ZEND_NUM_ARGS() > 1) {
+- if (!zend_is_callable(*callback, 0, &callback_name)) {
++ if (!zend_is_callable(func, 0, &callback_name)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument, '%s', should be a valid callback", callback_name);
+ efree(callback_name);
+ return;
+@@ -3328,16 +3355,16 @@
+ }
+
+ array_init(return_value);
+- if (zend_hash_num_elements(Z_ARRVAL_PP(input)) == 0)
++ if (zend_hash_num_elements(Z_ARRVAL_P(array)) == 0)
+ return;
+
+- for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos);
+- zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&operand, &pos) == SUCCESS;
+- zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &pos)) {
++ for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), &pos);
++ zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **)&operand, &pos) == SUCCESS;
++ zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) {
+
+- if (callback) {
++ if (func) {
+ args[0] = operand;
+- if (call_user_function_ex(EG(function_table), NULL, *callback, &retval, 1, args, 0, NULL TSRMLS_CC) == SUCCESS && retval) {
++ if (call_user_function_ex(EG(function_table), NULL, func, &retval, 1, args, 0, NULL TSRMLS_CC) == SUCCESS && retval) {
+ if (!zend_is_true(retval)) {
+ zval_ptr_dtor(&retval);
+ continue;
+@@ -3351,7 +3378,7 @@
+ continue;
+
+ zval_add_ref(operand);
+- switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &pos)) {
++ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(array), &string_key, &string_key_len, &num_key, 0, &pos)) {
+ case HASH_KEY_IS_STRING:
+ zend_hash_update(Z_ARRVAL_P(return_value), string_key,
+ string_key_len, operand, sizeof(zval *), NULL);
+@@ -3418,6 +3445,7 @@
+ efree(array_pos);
+ return;
+ }
++ SEPARATE_ZVAL_IF_NOT_REF(pargs[i]);
+ args[i] = *pargs[i];
+ array_len[i] = zend_hash_num_elements(Z_ARRVAL_PP(pargs[i]));
+ if (array_len[i] > maxlen) {
+--- ext/standard/basic_functions.c 2005-05-16 10:55:31.000000000 +0200
++++ ext/standard/basic_functions.c 2005-11-01 00:40:30.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: basic_functions.c,v 1.543.2.51 2005/05/16 08:55:31 tony2001 Exp $ */
++/* $Id: basic_functions.c,v 1.543.2.51.2.3 2005/09/29 16:31:48 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_streams.h"
+@@ -42,18 +42,7 @@
+ #include <time.h>
+ #include <stdio.h>
+
+-#ifndef NETWARE
+ #include <netdb.h>
+-#else
+-/*#include "netware/env.h"*/ /* Temporary */
+-#ifdef NEW_LIBC /* Same headers hold good for Winsock and Berkeley sockets */
+-#include <netinet/in.h>
+-/*#include <arpa/inet.h>*/
+-#include <netdb.h>
+-#else
+-#include <sys/socket.h>
+-#endif
+-#endif
+
+ #if HAVE_ARPA_INET_H
+ # include <arpa/inet.h>
+@@ -813,8 +802,8 @@
+ PHP_FE(prev, first_arg_force_ref)
+ PHP_FE(next, first_arg_force_ref)
+ PHP_FE(reset, first_arg_force_ref)
+- PHP_FE(current, first_arg_force_ref)
+- PHP_FE(key, first_arg_force_ref)
++ PHP_FE(current, NULL)
++ PHP_FE(key, NULL)
+ PHP_FE(min, NULL)
+ PHP_FE(max, NULL)
+ PHP_FE(in_array, NULL)
+@@ -3038,11 +3027,25 @@
+ prefix = va_arg(args, char *);
+ prefix_len = va_arg(args, uint);
+
+- new_key_len = prefix_len + hash_key->nKeyLength;
+- new_key = (char *) emalloc(new_key_len);
++ if (!prefix_len) {
++ if (!hash_key->nKeyLength) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard.");
++ return 0;
++ } else if (!strcmp(hash_key->arKey, "GLOBALS")) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite.");
++ return 0;
++ }
++ }
++
++ if (hash_key->nKeyLength) {
++ new_key_len = prefix_len + hash_key->nKeyLength;
++ new_key = (char *) emalloc(new_key_len);
+
+- memcpy(new_key, prefix, prefix_len);
+- memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ memcpy(new_key, prefix, prefix_len);
++ memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ } else {
++ new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h);
++ }
+
+ zend_hash_del(&EG(symbol_table), new_key, new_key_len);
+ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0);
+--- ext/standard/string.c 2005-06-02 10:50:52.000000000 +0200
++++ ext/standard/string.c 2005-11-01 00:40:20.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: string.c,v 1.333.2.52 2005/06/02 08:50:52 derick Exp $ */
++/* $Id: string.c,v 1.333.2.52.2.1 2005/09/28 22:34:04 iliaa Exp $ */
+
+ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
+
+@@ -3179,7 +3179,6 @@
+ zval *sarg;
+ char *res = NULL;
+ int argCount;
+- int old_rg;
+
+ argCount = ARG_COUNT(ht);
+ if (argCount < 1 || argCount > 2 || zend_get_parameters_ex(argCount, &arg, &arrayArg) == FAILURE) {
+@@ -3192,19 +3191,18 @@
+ res = estrndup(Z_STRVAL_P(sarg), Z_STRLEN_P(sarg));
+ }
+
+- old_rg = PG(register_globals);
+ if (argCount == 1) {
+- PG(register_globals) = 1;
+- sapi_module.treat_data(PARSE_STRING, res, NULL TSRMLS_CC);
++ zval tmp;
++ Z_ARRVAL(tmp) = EG(active_symbol_table);
++
++ sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC);
+ } else {
+- PG(register_globals) = 0;
+ /* Clear out the array that was passed in. */
+ zval_dtor(*arrayArg);
+ array_init(*arrayArg);
+
+ sapi_module.treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC);
+ }
+- PG(register_globals) = old_rg;
+ }
+ /* }}} */
+
+--- main/php_variables.c 2005-05-17 20:42:35.000000000 +0200
++++ main/php_variables.c 2005-11-01 00:42:56.000000000 +0100
+@@ -16,7 +16,7 @@
+ | Zeev Suraski <zeev@zend.com> |
+ +----------------------------------------------------------------------+
+ */
+-/* $Id: php_variables.c,v 1.45.2.13 2005/05/17 18:42:35 iliaa Exp $ */
++/* $Id: php_variables.c,v 1.45.2.13.2.4 2005/10/02 11:33:27 rrichards Exp $ */
+
+ #include <stdio.h>
+ #include "php.h"
+@@ -73,6 +73,10 @@
+ symtable1 = Z_ARRVAL_P(track_vars_array);
+ } else if (PG(register_globals)) {
+ symtable1 = EG(active_symbol_table);
++ /* GLOBALS hijack attempt, reject parameter */
++ if (!strncmp("GLOBALS", var, sizeof("GLOBALS")) || !strncmp("GLOBALS", var, sizeof("GLOBALS[")-1)) {
++ return;
++ }
+ }
+ if (!symtable1) {
+ /* Nothing to do */
+@@ -99,6 +103,13 @@
+ zval_dtor(val);
+ return;
+ }
++
++ /* GLOBALS hijack attempt, reject parameter */
++ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) {
++ zval_dtor(val);
++ return;
++ }
++
+ /* ensure that we don't have spaces or dots in the variable name (not binary safe) */
+ for (p=var; *p; p++) {
+ switch(*p) {
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch b/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch
new file mode 100644
index 0000000..cf257de
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch
@@ -0,0 +1,38 @@
+--- configure.in 2005-09-17 17:44:30.000000000 +0200
++++ configure.in 2005-09-17 17:45:01.000000000 +0200
+@@ -41,7 +41,7 @@
+ MAJOR_VERSION=4
+ MINOR_VERSION=4
+ RELEASE_VERSION=0
+-EXTRA_VERSION=""
++EXTRA_VERSION="-gentoo-r1"
+ VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
+
+ dnl Define where extension directories are located in the configure context
+--- ext/pcre/config.m4 2005/05/31 12:22:27 1.29.2.7
++++ ext/pcre/config.m4 2005/08/09 17:41:56 1.29.2.7.2.1
+@@ -1,5 +1,5 @@
+ dnl
+-dnl $Id: config.m4,v 1.29.2.7 2005/05/31 12:22:27 sniper Exp $
++dnl $Id: config.m4,v 1.29.2.7.2.1 2005/08/09 17:41:56 andrei Exp $
+ dnl
+
+ dnl By default we'll compile and link against the bundled PCRE library
+@@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
+
+ if test "$PHP_PCRE_REGEX" != "no"; then
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+- PHP_NEW_EXTENSION(pcre, pcrelib/maketables.c pcrelib/get.c pcrelib/study.c pcrelib/pcre.c php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib)
++ PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_dfa_exec.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_printint.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_ucp_findchar.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib)
+ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ else
+@@ -50,7 +50,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then
+
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ PHP_ADD_INCLUDE($PCRE_INCDIR)
+- PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000)
++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000)
+ fi
+ PHP_SUBST(PCRE_SHARED_LIBADD)
+ fi
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-phpinfo_xss.patch b/dev-lang/php/files/4.4.0/php4.4.0-phpinfo_xss.patch
new file mode 100644
index 0000000..2f03ce4
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-phpinfo_xss.patch
@@ -0,0 +1,42 @@
+--- ext/standard/info.c 2005-06-07 15:37:33.000000000 +0200
++++ ext/standard/info.c 2005-11-01 01:26:54.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: info.c,v 1.218.2.18.2.1 2005/06/07 13:37:33 derick Exp $ */
++/* $Id: info.c,v 1.218.2.18.2.4 2005/08/16 00:26:02 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -133,10 +133,21 @@
+ PUTS(" => ");
+ }
+ if (Z_TYPE_PP(tmp) == IS_ARRAY) {
++ zval *tmp3;
++ MAKE_STD_ZVAL(tmp3);
+ if (!sapi_module.phpinfo_as_text) {
+ PUTS("<pre>");
+ }
++ php_start_ob_buffer(NULL, 4096, 1 TSRMLS_CC);
+ zend_print_zval_r(*tmp, 0);
++ php_ob_get_buffer(tmp3 TSRMLS_CC);
++ php_end_ob_buffer(0, 0 TSRMLS_CC);
++
++ elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
++ zval_ptr_dtor(&tmp3);
++
+ if (!sapi_module.phpinfo_as_text) {
+ PUTS("</pre>");
+ }
+@@ -196,7 +207,7 @@
+ PHPAPI char *php_info_html_esc(char *string TSRMLS_DC)
+ {
+ int new_len;
+- return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_NOQUOTES, NULL TSRMLS_CC);
++ return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
+ }
+ /* }}} */
+
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch b/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch
new file mode 100644
index 0000000..a62c42f
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch
@@ -0,0 +1,317 @@
+--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200
++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */
++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */
+
+ #define IS_EXT_MODULE
+
+@@ -99,6 +99,22 @@
+ delete_pspell_config(config);
+ }
+
++#define PSPELL_FETCH_CONFIG \
++ convert_to_long_ex(conf); \
++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \
++ if (config == NULL || type != le_pspell_config) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \
++ RETURN_FALSE; \
++ } \
++
++#define PSPELL_FETCH_MANAGER \
++ convert_to_long_ex(scin); \
++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \
++ if (!manager || type != le_pspell) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \
++ RETURN_FALSE; \
++ } \
++
+ /* {{{ PHP_MINIT_FUNCTION
+ */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -350,14 +366,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(conf);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
++ PSPELL_FETCH_CONFIG;
+
+- if (config == NULL || type != le_pspell_config) {
+- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+- RETURN_FALSE;
+- }
+-
+ ret = new_pspell_manager(config);
+
+ if(pspell_error_number(ret) != 0){
+@@ -385,13 +395,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+ RETURN_TRUE;
+@@ -417,13 +423,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ array_init(return_value);
+
+@@ -455,14 +457,10 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(miss);
+ convert_to_string_ex(corr);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+ if(pspell_manager_error_number(manager) == 0){
+@@ -488,13 +486,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -525,13 +519,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -562,12 +552,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_clear_session(manager);
+ if(pspell_manager_error_number(manager) == 0){
+@@ -593,12 +578,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_save_all_word_lists(manager);
+
+@@ -666,22 +646,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+ int type;
+- zval **sccin, **runtogether;
++ zval **conf, **runtogether;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(runtogether);
+ pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -695,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+ int type;
+- zval **sccin, **mode;
++ zval **conf, **mode;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(mode);
+
+@@ -732,7 +702,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+ int type;
+- zval **sccin, **pignore;
++ zval **conf, **pignore;
+ int argc;
+
+ int loc = PSPELL_LARGEST_WORD;
+@@ -742,16 +712,11 @@
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(pignore);
+ ignore = Z_LVAL_PP(pignore);
+@@ -782,22 +747,17 @@
+ PHP_FUNCTION(pspell_config_personal)
+ {
+ int type;
+- zval **sccin, **personal;
++ zval **conf, **personal;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_string_ex(personal);
+
+@@ -820,22 +780,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+ int type;
+- zval **sccin, **repl;
++ zval **conf, **repl;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ pspell_config_replace(config, "save-repl", "true");
+
+@@ -860,22 +815,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+ int type;
+- zval **sccin, **save;
++ zval **conf, **save;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(save);
+ pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch b/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch
new file mode 100644
index 0000000..8f936ae
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch
@@ -0,0 +1,127 @@
+--- sapi/apache2handler/sapi_apache2.c 2005/04/08 20:35:02 1.1.2.40
++++ sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36 1.1.2.40.2.5
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.1.2.40 2005/04/08 20:35:02 sniper Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */
+
+ #include <fcntl.h>
+
+@@ -453,15 +453,34 @@ static int php_handler(request_rec *r)
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF \
++ if (strcmp(r->protocol, "INCLUDED")) { \
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++ } \
++
+ conf = ap_get_module_config(r->per_dir_config, &php4_module);
++
++ /* apply_config() needs r in some cases, so allocate server_context early */
++ ctx = SG(server_context);
++ if (ctx == NULL) {
++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++ /* register a cleanup so we clear out the SG(server_context)
++ * after each request. Note: We pass in the pointer to the
++ * server_context in case this is handled by a different thread.
++ */
++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++ ctx->r = r;
++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++ } else {
++ parent_req = ctx->r;
++ ctx->r = r;
++ }
+ apply_config(conf);
+
+ if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+ /* Check for xbithack in this case. */
+ if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+ }
+@@ -470,32 +489,24 @@ static int php_handler(request_rec *r)
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+
+ /* handle situations where user turns the engine off */
+ if (!AP2(engine)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_FORBIDDEN;
+ }
+
+@@ -511,24 +522,30 @@ static int php_handler(request_rec *r)
+
+ zend_first_try {
+
+- ctx = SG(server_context);
+ if (ctx == NULL) {
+- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+- /* register a cleanup so we clear out the SG(server_context)
+- * after each request. Note: We pass in the pointer to the
+- * server_context in case this is handled by a different thread.
+- */
+- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+- ctx->r = r;
++normal:
+ brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++ ctx = SG(server_context);
+ ctx->brigade = brigade;
+
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
+ } else {
+- parent_req = ctx->r;
++ if (!parent_req) {
++ parent_req = ctx->r;
++ }
++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++ zend_bailout();
++ }
++ }
++
++ /* check if comming due to ErrorDocument */
++ if (parent_req && parent_req->status != HTTP_OK) {
++ parent_req = NULL;
++ goto normal;
++ }
+ ctx->r = r;
+ brigade = ctx->brigade;
+ }
diff --git a/dev-lang/php/files/4.4.1/CVS/Entries b/dev-lang/php/files/4.4.1/CVS/Entries
new file mode 100644
index 0000000..397aaa4
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/CVS/Entries
@@ -0,0 +1,8 @@
+/php4.4.1-apache2sapi.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.4.1-curl-open_basedir.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.4.1-current_key_by_reference.patch/1.1/Fri Nov 4 11:19:08 2005/-ko/T1.1
+/php4.4.1-gd-safe_mode.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.4.1-mbstring-header_inj.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+/php4.4.1-mod_rewrite-crash.patch/1.1/Thu Nov 3 23:54:59 2005/-ko/T1.1
+/php4.4.1-multilib-search-path.patch/1.1/Wed Jan 4 09:24:47 2006/-ko/T1.1
+D
diff --git a/dev-lang/php/files/4.4.1/CVS/Repository b/dev-lang/php/files/4.4.1/CVS/Repository
new file mode 100644
index 0000000..074c579
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/4.4.1
diff --git a/dev-lang/php/files/4.4.1/CVS/Root b/dev-lang/php/files/4.4.1/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/4.4.1/CVS/Tag b/dev-lang/php/files/4.4.1/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch b/dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch
new file mode 100644
index 0000000..49f5c95
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-apache2sapi.patch
@@ -0,0 +1,51 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-10-12 23:41:36.000000000 +0200
++++ sapi/apache2handler/sapi_apache2.c 2005-11-18 21:19:33.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.8 2005/11/18 19:03:13 iliaa Exp $ */
+
+ #include <fcntl.h>
+
+@@ -443,6 +443,18 @@
+ php_request_shutdown(NULL);
+ }
+
++static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
++{
++ if (strcmp(r->protocol, "INCLUDED")) {
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
++ }
++ if (p) {
++ ((php_struct *)SG(server_context))->r = p;
++ } else {
++ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup);
++ }
++}
++
+ static int php_handler(request_rec *r)
+ {
+ php_struct *ctx;
+@@ -453,10 +465,7 @@
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
+-#define PHPAP_INI_OFF \
+- if (strcmp(r->protocol, "INCLUDED")) { \
+- zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
+- } \
++#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
+
+ conf = ap_get_module_config(r->per_dir_config, &php4_module);
+
+@@ -535,7 +544,7 @@
+ if (!parent_req) {
+ parent_req = ctx->r;
+ }
+- if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch b/dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch
new file mode 100644
index 0000000..60094c0
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-curl-open_basedir.patch
@@ -0,0 +1,20 @@
+--- ext/curl/curl.c 2005-12-02 23:34:12.000000000 +0100
++++ ext/curl/curl.c 2005-12-03 01:13:51.000000000 +0100
+@@ -67,7 +67,7 @@
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
+- strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
++ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+ \
+@@ -76,7 +76,7 @@
+ RETURN_FALSE; \
+ } \
+ \
+- if (tmp_url->query || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch b/dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch
new file mode 100644
index 0000000..cf3754d
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-current_key_by_reference.patch
@@ -0,0 +1,22 @@
+--- ext/standard/basic_functions.c 2005/09/29 16:31:48 1.543.2.51.2.3
++++ ext/standard/basic_functions.c 2005/11/02 17:58:00 1.543.2.51.2.4
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: basic_functions.c,v 1.543.2.51.2.3 2005/09/29 16:31:48 iliaa Exp $ */
++/* $Id: basic_functions.c,v 1.543.2.51.2.4 2005/11/02 17:58:00 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_streams.h"
+@@ -802,8 +802,8 @@ function_entry basic_functions[] = {
+ PHP_FE(prev, first_arg_force_ref)
+ PHP_FE(next, first_arg_force_ref)
+ PHP_FE(reset, first_arg_force_ref)
+- PHP_FE(current, NULL)
+- PHP_FE(key, NULL)
++ PHP_FE(current, first_arg_force_ref)
++ PHP_FE(key, first_arg_force_ref)
+ PHP_FE(min, NULL)
+ PHP_FE(max, NULL)
+ PHP_FE(in_array, NULL)
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch b/dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch
new file mode 100644
index 0000000..a35c28a
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-gd-safe_mode.patch
@@ -0,0 +1,112 @@
+--- ext/gd/gd.c 2005-10-06 22:44:52.000000000 +0200
++++ ext/gd/gd.c 2005-11-03 21:42:59.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */
++/* $Id: gd.c,v 1.221.2.56.2.3 2005/11/03 20:20:04 sniper Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+ Cold Spring Harbor Labs. */
+@@ -623,7 +623,7 @@
+
+ convert_to_string_ex(file);
+
+- stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
++ stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
+@@ -807,6 +807,10 @@
+ convert_to_boolean_ex(dither);
+ convert_to_long_ex(ncolors);
+
++ if (Z_LVAL_PP(ncolors) <= 0) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero");
++ RETURN_FALSE;
++ }
+ gdImageTrueColorToPalette(im, Z_LVAL_PP(dither), Z_LVAL_PP(ncolors));
+
+ RETURN_TRUE;
+@@ -1436,7 +1440,7 @@
+
+ fn = Z_STRVAL_PP(file);
+
+- stream = php_stream_open_wrapper(fn, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
++ stream = php_stream_open_wrapper(fn, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
+@@ -1644,10 +1648,7 @@
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
+
+ fp = VCWD_FOPEN(fn, "wb");
+ if (!fp) {
+@@ -3742,16 +3743,10 @@
+ }
+
+ /* Check origin file */
+- if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn_org, "Invalid origin filename");
+
+ /* Check destination file */
+- if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn_dest, "Invalid destination filename");
+
+ /* Open origin file */
+ org = VCWD_FOPEN(fn_org, "rb");
+--- ext/gd/gd_ctx.c 2005-10-06 22:44:52.000000000 +0200
++++ ext/gd/gd_ctx.c 2005-11-03 21:42:59.000000000 +0100
+@@ -73,10 +73,7 @@
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
+
+ fp = VCWD_FOPEN(fn, "wb");
+ if (!fp) {
+--- ext/gd/php_gd.h 2003-03-31 10:49:30.000000000 +0200
++++ ext/gd/php_gd.h 2005-11-15 11:15:27.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_gd.h,v 1.44.2.5 2003/03/31 08:49:30 sniper Exp $ */
++/* $Id: php_gd.h,v 1.44.2.5.8.2 2005/11/15 08:15:36 sniper Exp $ */
+
+ #ifndef PHP_GD_H
+ #define PHP_GD_H
+@@ -30,6 +30,15 @@
+
+ #if HAVE_LIBGD
+
++/* open_basedir and safe_mode checks */
++#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
++ if (!filename || filename == empty_string || php_check_open_basedir(filename TSRMLS_CC) || \
++ (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \
++ ) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
++ RETURN_FALSE; \
++ }
++
+ #define PHP_GDIMG_TYPE_GIF 1
+ #define PHP_GDIMG_TYPE_PNG 2
+ #define PHP_GDIMG_TYPE_JPG 3
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch b/dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch
new file mode 100644
index 0000000..adbf35a
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-mbstring-header_inj.patch
@@ -0,0 +1,145 @@
+--- ext/mbstring/mbstring.c 2005-09-21 15:19:19.000000000 +0200
++++ ext/mbstring/mbstring.c 2005-11-22 01:00:03.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: mbstring.c,v 1.142.2.47.2.1 2005/09/21 13:19:19 iliaa Exp $ */
++/* $Id: mbstring.c,v 1.142.2.47.2.5 2005/11/21 23:21:19 hirokawa Exp $ */
+
+ /*
+ * PHP4 Multibyte String module "mbstring"
+@@ -2924,16 +2924,17 @@
+ }
+ /* }}} */
+
+-/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]])
++/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])
+ Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */
+ PHP_FUNCTION(mb_encode_mimeheader)
+ {
+- pval **argv[4];
++ pval **argv[5];
+ enum mbfl_no_encoding charset, transenc;
+ mbfl_string string, result, *ret;
+ char *p, *linefeed;
++ int indent;
+
+- if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 4 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) {
++ if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 5 || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), argv) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+@@ -2970,6 +2971,12 @@
+ linefeed = Z_STRVAL_PP(argv[3]);
+ }
+
++ indent = 0;
++ if (ZEND_NUM_ARGS() >= 5) {
++ convert_to_long_ex(argv[4]);
++ indent = Z_LVAL_PP(argv[4]);
++ }
++
+ convert_to_string_ex(argv[0]);
+ mbfl_string_init(&string);
+ mbfl_string_init(&result);
+@@ -2977,7 +2984,7 @@
+ string.no_encoding = MBSTRG(current_internal_encoding);
+ string.val = Z_STRVAL_PP(argv[0]);
+ string.len = Z_STRLEN_PP(argv[0]);
+- ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, 0);
++ ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent);
+ if (ret != NULL) {
+ RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */
+ } else {
+@@ -3460,6 +3467,22 @@
+ * Sends an email message with MIME scheme
+ */
+ #if HAVE_SENDMAIL
++#define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \
++ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \
++ pos += 3; \
++ while (str[pos] == ' ' || str[pos] == '\t') { \
++ pos++; \
++ } \
++ continue; \
++ } \
++ else if (str[pos] == '\n' && (str[pos + 1] == ' ' || str[pos + 1] == '\t')) { \
++ pos += 2; \
++ while (str[pos] == ' ' || str[pos] == '\t') { \
++ pos++; \
++ } \
++ continue; \
++ } \
++
+ PHP_FUNCTION(mb_send_mail)
+ {
+ int argc, n;
+@@ -3474,8 +3497,9 @@
+ body_enc; /* body transfar encoding */
+ mbfl_memory_device device; /* automatic allocateable buffer for additional header */
+ const mbfl_language *lang;
+- char *force_extra_parameters = INI_STR("mail.force_extra_parameters");
+ int err = 0;
++ char *to_r;
++ int to_len, i;
+
+ /* initialize */
+ mbfl_memory_device_init(&device, 0, 0);
+@@ -3502,6 +3526,32 @@
+ convert_to_string_ex(argv[0]);
+ if (Z_STRVAL_PP(argv[0])) {
+ to = Z_STRVAL_PP(argv[0]);
++ to_len = Z_STRLEN_PP(argv[0]);
++ if (to_len > 0) {
++ to_r = estrndup(to, to_len);
++ for (; to_len; to_len--) {
++ if (!isspace((unsigned char) to_r[to_len - 1])) {
++ break;
++ }
++ to_r[to_len - 1] = '\0';
++ }
++ for (i = 0; to_r[i]; i++) {
++ if (iscntrl((unsigned char) to_r[i])) {
++ /* According to RFC 822, section 3.1.1 long headers may be
++separated into
++ * parts using CRLF followed at least one linear-white-space
++character ('\t' or ' ').
++ * To prevent these separators from being replaced with a space,
++we use the
++ * SKIP_LONG_HEADER_SEP_MBSTRING to skip over them.
++ */
++ SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i);
++ to_r[i] = ' ';
++ }
++ }
++ } else {
++ to_r = to;
++ }
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field");
+ err = 1;
+@@ -3596,18 +3646,19 @@
+ extra_cmd = Z_STRVAL_PP(argv[4]);
+ }
+
+- if (force_extra_parameters) {
+- extra_cmd = estrdup(force_extra_parameters);
+- } else if (extra_cmd) {
++ if (extra_cmd) {
+ extra_cmd = php_escape_shell_cmd(extra_cmd);
+ }
+
+- if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) {
++ if (!err && php_mail(to_r, subject, message, headers, extra_cmd TSRMLS_CC)) {
+ RETVAL_TRUE;
+ } else {
+ RETVAL_FALSE;
+ }
+
++ if (to_r != to) {
++ efree(to_r);
++ }
+ if (extra_cmd) {
+ efree(extra_cmd);
+ }
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-mod_rewrite-crash.patch b/dev-lang/php/files/4.4.1/php4.4.1-mod_rewrite-crash.patch
new file mode 100644
index 0000000..a08a19e
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-mod_rewrite-crash.patch
@@ -0,0 +1,20 @@
+--- sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36 1.1.2.40.2.5
++++ sapi/apache2handler/sapi_apache2.c 2005/11/02 17:55:17 1.1.2.40.2.6
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.6 2005/11/02 17:55:17 iliaa Exp $ */
+
+ #include <fcntl.h>
+
+@@ -535,7 +535,7 @@ normal:
+ if (!parent_req) {
+ parent_req = ctx->r;
+ }
+- if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
diff --git a/dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch b/dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch
new file mode 100644
index 0000000..26df783
--- /dev/null
+++ b/dev-lang/php/files/4.4.1/php4.4.1-multilib-search-path.patch
@@ -0,0 +1,1488 @@
+diff -Nru php-4.4.1.orig/acinclude.m4 php-4.4.1/acinclude.m4
+--- php-4.4.1.orig/acinclude.m4 2005-09-23 11:20:22.000000000 +0200
++++ php-4.4.1/acinclude.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -194,7 +194,7 @@
+ unset ac_new_flags
+ for i in [$]$1; do
+ case [$]i in
+- -L/usr/lib|-L/usr/lib/[)] ;;
++ -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/[)] ;;
+ *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
+ esac
+ done
+@@ -645,7 +645,7 @@
+ ])
+
+ AC_DEFUN([PHP_PROG_SENDMAIL],[
+-PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
++PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64
+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
+ if test -n "$PROG_SENDMAIL"; then
+ AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
+@@ -856,7 +856,9 @@
+ dnl add a library to linkpath/runpath
+ dnl
+ AC_DEFUN([PHP_ADD_LIBPATH],[
+- if test "$1" != "/usr/lib"; then
++ case x$1 in
++ x/usr/lib|x/usr/lib64) ;;
++ *)
+ PHP_EXPAND_PATH($1, ai_p)
+ ifelse([$2],,[
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+@@ -866,8 +868,8 @@
+ else
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+ fi
+- ])
+- fi
++ ]) ;;
++ esac
+ ])
+
+ dnl
+@@ -1671,15 +1673,20 @@
+ fi
+
+ for i in $PHP_KERBEROS; do
+- if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
++ if test -f $i/lib/libkrb5.a -o -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
+ PHP_KERBEROS_DIR=$i
++ PHP_KERBEROS_LIBDIR=$i/lib
++ break
++ elif test -f $i/lib64/libkrb5.a -o -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then
++ PHP_KERBEROS_DIR=$i
++ PHP_KERBEROS_LIBDIR=$i/lib64
+ break
+ fi
+ done
+
+ if test "$PHP_KERBEROS_DIR"; then
+ found_kerberos=yes
+- PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1)
++ PHP_ADD_LIBPATH($PHP_KERBEROS_LIBDIR, $1)
+ PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
+ PHP_ADD_LIBRARY(krb5, 1, $1)
+ PHP_ADD_LIBRARY(k5crypto, 1, $1)
+@@ -1751,6 +1758,9 @@
+ if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
+ OPENSSL_LIBDIR=$i/lib
+ fi
++ if test -r $i/lib64/libssl.a -o -r $i/lib64/libssl.$SHLIB_SUFFIX_NAME; then
++ OPENSSL_LIBDIR=$i/lib64
++ fi
+ test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
+ done
+
+@@ -1871,7 +1881,9 @@
+ fi
+
+ if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a ||
+- test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
++ test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME ||
++ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.a ||
++ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
+ then
+ PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
+ found_iconv=yes
+diff -Nru php-4.4.1.orig/ext/bz2/config.m4 php-4.4.1/ext/bz2/config.m4
+--- php-4.4.1.orig/ext/bz2/config.m4 2004-01-21 06:04:50.000000000 +0100
++++ php-4.4.1/ext/bz2/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -19,6 +19,12 @@
+ done
+ fi
+
++ for j in lib64 lib; do
++ if test -d $BZIP_DIR/$j; then
++ BZIP_LIBDIR=$BZIP_DIR/$j
++ fi
++ done
++
+ if test -z "$BZIP_DIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the BZip2 distribution)
+@@ -27,12 +33,12 @@
+ PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
+ [
+ PHP_ADD_INCLUDE($BZIP_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_LIBDIR, BZ2_SHARED_LIBADD)
+ AC_DEFINE(HAVE_BZ2,1,[ ])
+ ], [
+ AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)
+ ], [
+- -L$BZIP_DIR/lib
++ -L$BZIP_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared)
+diff -Nru php-4.4.1.orig/ext/curl/config.m4 php-4.4.1/ext/curl/config.m4
+--- php-4.4.1.orig/ext/curl/config.m4 2005-02-09 17:23:49.000000000 +0100
++++ php-4.4.1/ext/curl/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -23,6 +23,12 @@
+ done
+ fi
+
++ for j in lib64 lib; do
++ if test -d $CURL_DIR/$j; then
++ CURL_LIBDIR=$CURL_DIR/$j
++ fi
++ done
++
+ if test -z "$CURL_DIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the libcurl distribution -
+@@ -51,7 +57,7 @@
+
+ PHP_ADD_INCLUDE($CURL_DIR/include)
+ PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_LIBDIR, CURL_SHARED_LIBADD)
+
+ PHP_CHECK_LIBRARY(curl,curl_easy_perform,
+ [
+@@ -59,14 +65,14 @@
+ ],[
+ AC_MSG_ERROR(There is something wrong. Please check config.log for more information.)
+ ],[
+- $CURL_LIBS -L$CURL_DIR/lib
++ $CURL_LIBS -L$CURL_LIBDIR
+ ])
+
+ PHP_CHECK_LIBRARY(curl,curl_version_info,
+ [
+ AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ])
+ ],[],[
+- $CURL_LIBS -L$CURL_DIR/lib
++ $CURL_LIBS -L$CURL_LIBDIR
+ ])
+
+ dnl if test "$PHP_CURLWRAPPERS" != "no" ; then
+diff -Nru php-4.4.1.orig/ext/dba/config.m4 php-4.4.1/ext/dba/config.m4
+--- php-4.4.1.orig/ext/dba/config.m4 2005-08-22 21:59:42.000000000 +0200
++++ php-4.4.1/ext/dba/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -80,12 +80,18 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
+ AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_GDBM, 1, [ ])
+ THIS_LIBS=gdbm
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ fi
+
+ PHP_DBA_STD_ASSIGN
+@@ -110,14 +116,20 @@
+ break
+ fi
+ done
+-
++
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in ndbm db1 c; do
+ PHP_CHECK_LIBRARY($LIB, dbm_open, [
+ AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_NDBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -135,25 +147,28 @@
+ dnl parameters(version, library list, function)
+ AC_DEFUN([PHP_DBA_DB_CHECK],[
+ for LIB in $2; do
+- if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
+- PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[
+- AC_TRY_LINK([
++ for LIBDIR in lib64 lib; do
++ if test -f $THIS_PREFIX/$LIBDIR/lib$LIB.a -o -f $THIS_PREFIX/$LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
++ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$LIBDIR, -l$LIB,[
++ AC_TRY_LINK([
+ #include "$THIS_INCLUDE"
+- ],[
+- $3;
+- ],[
+- AC_EGREP_CPP(yes,[
++ ],[
++ $3;
++ ],[
++ AC_EGREP_CPP(yes,[
+ #include "$THIS_INCLUDE"
+ #if DB_VERSION_MAJOR == $1
+- yes
++ yes
+ #endif
+- ],[
+- THIS_LIBS=$LIB
+- break
++ ],[
++ THIS_LIBS=$LIB
++ break
++ ])
+ ])
+ ])
+- ])
+- fi
++ fi
++ done
++ test -n "$THIS_LIBS" && break
+ done
+ if test -z "$THIS_LIBS"; then
+ AC_MSG_CHECKING(for db$1 major version)
+@@ -314,6 +329,12 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in dbm c gdbm; do
+ PHP_CHECK_LIBRARY($LIB, dbminit, [
+@@ -328,7 +349,7 @@
+ fi
+ AC_DEFINE(DBA_DBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -364,13 +385,19 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in cdb c; do
+ PHP_CHECK_LIBRARY($LIB, cdb_read, [
+ AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_CDB, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+diff -Nru php-4.4.1.orig/ext/domxml/config.m4 php-4.4.1/ext/domxml/config.m4
+--- php-4.4.1.orig/ext/domxml/config.m4 2004-12-30 08:02:17.000000000 +0100
++++ php-4.4.1/ext/domxml/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -48,13 +48,15 @@
+ AC_MSG_ERROR(Please reinstall the libxml >= 2.4.14 distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $DOMXML_DIR/$j; then
++ DOMXML_LIBDIR=$DOMXML_DIR/$j
++ fi
++ done
++
+ PHP_DOM_CHECK_VERSION
+
+- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then
+- DOM_LIBNAME=xml2
+- else
+- DOM_LIBNAME=xml
+- fi
++ DOM_LIBNAME=xml2
+
+ XML2_CONFIG=$DOMXML_DIR/bin/xml2-config
+
+@@ -62,7 +64,7 @@
+ DOM_LIBS=`$XML2_CONFIG --libs`
+ PHP_EVAL_LIBLINE($DOM_LIBS, DOMXML_SHARED_LIBADD)
+ else
+- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD)
+ fi
+
+ PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
+@@ -70,7 +72,13 @@
+ if test "$PHP_ZLIB_DIR" = "no"; then
+ AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>)
+ else
+- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, DOMXML_SHARED_LIBADD)
++ for j in lib64 lib; do
++ if test -d $PHP_ZLIB_DIR/$j; then
++ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j
++ fi
++ done
++
++ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIBDIR, DOMXML_SHARED_LIBADD)
+ fi
+
+ AC_DEFINE(HAVE_DOMXML,1,[ ])
+@@ -135,27 +143,35 @@
+ AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $DOMXSLT_DIR/$j; then
++ DOMXSLT_LIBDIR=$DOMXSLT_DIR/$j
++ fi
++ done
++
+ PHP_DOM_XSLT_CHECK_VERSION
+
+- PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_DIR/lib, DOMXML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(xslt, $DOMXSLT_LIBDIR, DOMXML_SHARED_LIBADD)
+
+ PHP_ADD_INCLUDE($DOMXSLT_DIR/include)
+
+ if test "$PHP_DOM" = "no"; then
+ AC_MSG_ERROR(DOMXSLT requires DOMXML. Use --with-dom=<DIR>)
+ fi
+-
+- if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then
+- DOM_LIBNAME=xml2
+- else
+- DOM_LIBNAME=xml
+- fi
+
+- PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
++ for j in lib64 lib; do
++ if test -d $DOMXML_DIR/$j; then
++ DOMXML_LIBDIR=$DOMXML_DIR/$j
++ fi
++ done
++
++ DOM_LIBNAME=xml2
++
++ PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
+
+- if test -f $DOMXML_DIR/lib/libxsltbreakpoint.a -o -f $DOMXML_DIR/lib/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then
+- PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
++ if test -f $DOMXML_LIBDIR/libxsltbreakpoint.a -o -f $DOMXML_LIBDIR/libxsltbreakpoint.$SHLIB_SUFFIX_NAME ; then
++ PHP_ADD_LIBRARY_WITH_PATH(xsltbreakpoint, $DOMXML_LIBDIR, DOMXML_SHARED_LIBADD)
+ fi
+
+ AC_DEFINE(HAVE_DOMXSLT,1,[ ])
+@@ -185,9 +201,15 @@
+ AC_MSG_ERROR(Please reinstall the libxslt >= 1.0.3 distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $DOMEXSLT_DIR/$j; then
++ DOMEXSLT_LIBDIR=$DOMEXSLT_DIR/$j
++ fi
++ done
++
+ PHP_DOM_EXSLT_CHECK_VERSION
+
+- PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_DIR/lib, DOMXML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(exslt, $DOMEXSLT_LIBDIR, DOMXML_SHARED_LIBADD)
+
+ PHP_ADD_INCLUDE($DOMEXSLT_DIR/include)
+
+diff -Nru php-4.4.1.orig/ext/gd/config.m4 php-4.4.1/ext/gd/config.m4
+--- php-4.4.1.orig/ext/gd/config.m4 2005-05-17 14:23:09.000000000 +0200
++++ php-4.4.1/ext/gd/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -50,8 +50,15 @@
+ AC_DEFUN([PHP_GD_JPEG],[
+ if test "$PHP_JPEG_DIR" != "no"; then
+
+- for i in $PHP_JPEG_DIR /usr/local /usr; do
+- test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_JPEG_DIR /usr/local /usr; do
++ if test -f "$i/$j/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libjpeg.a"; then
++ GD_JPEG_DIR=$i
++ GD_JPEG_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_JPEG_DIR" && break
+ done
+
+ if test -z "$GD_JPEG_DIR"; then
+@@ -61,11 +68,11 @@
+ PHP_CHECK_LIBRARY(jpeg,jpeg_read_header,
+ [
+ PHP_ADD_INCLUDE($GD_JPEG_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libjpeg.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_JPEG_DIR/lib
++ -L$GD_JPEG_LIB_DIR
+ ])
+ else
+ AC_MSG_RESULT([If configure fails try --with-jpeg-dir=<DIR>])
+@@ -75,8 +82,15 @@
+ AC_DEFUN([PHP_GD_PNG],[
+ if test "$PHP_PNG_DIR" != "no"; then
+
+- for i in $PHP_PNG_DIR /usr/local /usr; do
+- test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_PNG_DIR /usr/local /usr; do
++ if test -f "$i/$j/libpng.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libpng.a"; then
++ GD_PNG_DIR=$i
++ GD_PNG_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_PNG_DIR" && break
+ done
+
+ if test -z "$GD_PNG_DIR"; then
+@@ -94,12 +108,12 @@
+ PHP_CHECK_LIBRARY(png,png_write_image,
+ [
+ PHP_ADD_INCLUDE($GD_PNG_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, GD_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIB_DIR, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.])
+ ],[
+- -L$PHP_ZLIB_DIR/lib -lz -L$GD_PNG_DIR/lib
++ -L$PHP_ZLIB_LIB_DIR -lz -L$GD_PNG_LIB_DIR
+ ])
+
+ else
+@@ -110,8 +124,15 @@
+ AC_DEFUN([PHP_GD_XPM],[
+ if test "$PHP_XPM_DIR" != "no"; then
+
+- for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
+- test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
++ if test -f "$i/$j/libXpm.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libXpm.a"; then
++ GD_XPM_DIR=$i
++ GD_XPM_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_XPM_DIR" && break
+ done
+
+ if test -z "$GD_XPM_DIR"; then
+@@ -129,12 +150,12 @@
+ PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage,
+ [
+ PHP_ADD_INCLUDE($GD_XPM_INC)
+- PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_XPM_DIR/lib -lX11
++ -L$GD_XPM_LIB_DIR -lX11
+ ])
+ else
+ AC_MSG_RESULT(If configure fails try --with-xpm-dir=<DIR>)
+@@ -145,25 +166,29 @@
+ if test "$PHP_TTF" != "no"; then
+ if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
+ if test -n "$PHP_TTF"; then
+- for i in $PHP_TTF /usr/local /usr; do
+- if test -f "$i/include/freetype.h"; then
+- TTF_DIR=$i
+- unset TTF_INC_DIR
+- fi
+- if test -f "$i/include/freetype/freetype.h"; then
+- TTF_DIR=$i
+- TTF_INC_DIR=$i/include/freetype
+- fi
+- if test -f "$i/include/freetype1/freetype/freetype.h"; then
+- TTF_DIR=$i
+- TTF_INC_DIR=$i/include/freetype1/freetype
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_TTF /usr/local /usr; do
++ if test -f "$i/$j/libttf.a" -o -f "$i/$j/libttf.$SHLIB_SUFFIX_NAME"; then
++ TTF_DIR=$i
++ TTF_LIB_DIR=$i/$j
++ if test -f "$i/include/freetype.h"; then
++ unset TTF_INC_DIR
++ elif test -f "$i/include/freetype/freetype.h"; then
++ TTF_INC_DIR=$i/include/freetype
++ elif test -f "$i/include/freetype1/freetype/freetype.h"; then
++ TTF_INC_DIR=$i/include/freetype1/freetype
++ else
++ unset TTF_DIR
++ fi
++ fi
++ test -n "$TTF_DIR" && break
++ done
+ test -n "$TTF_DIR" && break
+ done
+ fi
+ if test -n "$TTF_DIR" ; then
+ AC_DEFINE(HAVE_LIBTTF,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_LIB_DIR, GD_SHARED_LIBADD)
+ fi
+ if test -z "$TTF_INC_DIR"; then
+ TTF_INC_DIR=$TTF_DIR/include
+@@ -178,16 +203,21 @@
+ AC_DEFUN([PHP_GD_FREETYPE2],[
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/include/freetype2/freetype/freetype.h"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_INC_DIR=$i/include/freetype2
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/include/freetype2/freetype/freetype.h" && \
++ test -f "$i/$j/libfreetype.a" -o -f "$i/$j/libfreetype.$SHLIB_SUFFIX_NAME"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_LIB_DIR=$i/$j
++ FREETYPE2_INC_DIR=$i/include/freetype2
++ break
++ fi
++ done
++ test -n "$FREETYPE2_DIR" && break
+ done
+
+ if test -n "$FREETYPE2_DIR" ; then
+- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_LIB_DIR, GD_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($FREETYPE2_DIR/include)
+ PHP_ADD_INCLUDE($FREETYPE2_INC_DIR)
+ AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
+@@ -203,8 +233,16 @@
+ AC_DEFUN([PHP_GD_T1LIB],[
+ if test "$PHP_T1LIB" != "no"; then
+
+- for i in $PHP_T1LIB /usr/local /usr; do
+- test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_T1LIB /usr/local /usr; do
++ if test -f "$i/include/t1lib.h" && \
++ test -f "$i/$j/libt1.a" -o -f "$i/$j/libt1.$SHLIB_SUFFIX_NAME"; then
++ GD_T1_DIR=$i
++ GD_T1_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_T1_DIR" && break
+ done
+
+ if test -z "$GD_T1_DIR"; then
+@@ -215,11 +253,11 @@
+ [
+ AC_DEFINE(HAVE_LIBT1,1,[ ])
+ PHP_ADD_INCLUDE($GD_T1_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_T1_DIR/lib
++ -L$GD_T1_LIB_DIR
+ ])
+ fi
+ ])
+@@ -365,7 +403,7 @@
+ done
+
+ dnl Library path
+- for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do
++ for i in lib/gd1.3 lib64/gd1.3 lib/gd lib64/gd lib lib64 gd1.3 gd ""; do
+ test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i"
+ done
+
+diff -Nru php-4.4.1.orig/ext/gettext/config.m4 php-4.4.1/ext/gettext/config.m4
+--- php-4.4.1.orig/ext/gettext/config.m4 2003-10-01 04:53:58.000000000 +0200
++++ php-4.4.1/ext/gettext/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -14,11 +14,15 @@
+ AC_MSG_ERROR(Cannot locate header file libintl.h)
+ fi
+
+- GETTEXT_LIBDIR=$GETTEXT_DIR/lib
++ for j in lib64 lib; do
++ if test -d $GETTEXT_DIR/$j; then
++ GETTEXT_LIBDIR=$GETTEXT_DIR/$j
++ fi
++ done
++
+ GETTEXT_INCDIR=$GETTEXT_DIR/include
+
+ O_LDFLAGS=$LDFLAGS
+- LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
+ AC_CHECK_LIB(intl, bindtextdomain, [
+ GETTEXT_LIBS=intl
+ GETTEXT_CHECK_IN_LIB=intl
+diff -Nru php-4.4.1.orig/ext/gmp/config.m4 php-4.4.1/ext/gmp/config.m4
+--- php-4.4.1.orig/ext/gmp/config.m4 2003-11-19 05:44:24.000000000 +0100
++++ php-4.4.1/ext/gmp/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -14,20 +14,26 @@
+ if test -z "$GMP_DIR"; then
+ AC_MSG_ERROR(Unable to locate gmp.h)
+ fi
+-
++
++ for j in lib64 lib; do
++ if test -d $GMP_DIR/$j; then
++ GMP_LIBDIR=$GMP_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size,
+ [],[
+ PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size,
+ [],[
+ AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.])
+ ],[
+- -L$GMP_DIR/lib
++ -L$GMP_LIBDIR
+ ])
+ ],[
+- -L$GMP_DIR/lib
++ -L$GMP_LIBDIR
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_LIBDIR, GMP_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($GMP_DIR/include)
+
+ PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared)
+diff -Nru php-4.4.1.orig/ext/iconv/config.m4 php-4.4.1/ext/iconv/config.m4
+--- php-4.4.1.orig/ext/iconv/config.m4 2005-01-10 22:38:56.000000000 +0100
++++ php-4.4.1/ext/iconv/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -23,8 +23,14 @@
+ PHP_ICONV_PREFIX="$ICONV_DIR"
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_ICONV_PREFIX/$j; then
++ PHP_ICONV_PREFIX_LIBDIR=$PHP_ICONV_PREFIX/$j
++ fi
++ done
++
+ CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
+- LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS"
++ LDFLAGS="-L$PHP_ICONV_PREFIX_LIBDIR $LDFLAGS"
+
+ if test -r $PHP_ICONV_PREFIX/include/giconv.h; then
+ PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
+diff -Nru php-4.4.1.orig/ext/imap/config.m4 php-4.4.1/ext/imap/config.m4
+--- php-4.4.1.orig/ext/imap/config.m4 2005-01-11 05:56:57.000000000 +0100
++++ php-4.4.1/ext/imap/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -167,6 +167,7 @@
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
++ IMAP_LIB_CHK(lib64)
+ IMAP_LIB_CHK(c-client)
+ done
+
+diff -Nru php-4.4.1.orig/ext/interbase/config.m4 php-4.4.1/ext/interbase/config.m4
+--- php-4.4.1.orig/ext/interbase/config.m4 2003-04-25 10:59:00.000000000 +0200
++++ php-4.4.1/ext/interbase/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -9,10 +9,18 @@
+ if test "$PHP_INTERBASE" != "no"; then
+ if test "$PHP_INTERBASE" = "yes"; then
+ IBASE_INCDIR=/usr/interbase/include
+- IBASE_LIBDIR=/usr/interbase/lib
++ for j in lib64 lib; do
++ if test -d /usr/interbase/$j; then
++ IBASE_LIBDIR=/usr/interbase/$j
++ fi
++ done
+ else
+ IBASE_INCDIR=$PHP_INTERBASE/include
+- IBASE_LIBDIR=$PHP_INTERBASE/lib
++ for j in lib64 lib; do
++ if test -d $PHP_INTERBASE/$j; then
++ IBASE_LIBDIR=$PHP_INTERBASE/$j
++ fi
++ done
+ fi
+
+ PHP_CHECK_LIBRARY(gds, isc_detach_database,
+diff -Nru php-4.4.1.orig/ext/ldap/config.m4 php-4.4.1/ext/ldap/config.m4
+--- php-4.4.1.orig/ext/ldap/config.m4 2005-05-08 18:06:24.000000000 +0200
++++ php-4.4.1/ext/ldap/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -6,7 +6,8 @@
+ if test -f $1/include/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/include
+- LDAP_LIBDIR=$1/lib
++ test -f $1/lib/libldap.so && LDAP_LIBDIR=$1/lib
++ test -f $1/lib64/libldap.so && LDAP_LIBDIR=$1/lib64
+ elif test -f $1/include/umich-ldap/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/include/umich-ldap
+diff -Nru php-4.4.1.orig/ext/mbstring/config.m4 php-4.4.1/ext/mbstring/config.m4
+--- php-4.4.1.orig/ext/mbstring/config.m4 2005-02-21 08:10:13.000000000 +0100
++++ php-4.4.1/ext/mbstring/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -167,12 +167,18 @@
+ PHP_ADD_INCLUDE([$PHP_LIBMBFL_INCLUDE])
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_LIBMBFL/$j; then
++ PHP_LIBMBFL_LIBDIR=$PHP_LIBMBFL/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mbfl, mbfl_buffer_converter_new, [
+- PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL/lib, MBSTRING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL_LIBDIR, MBSTRING_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.])
+ ], [
+- -LPHP_LIBMBFL/lib
++ -L$PHP_LIBMBFL_LIBDIR
+ ])
+ fi
+ ])
+diff -Nru php-4.4.1.orig/ext/mcal/config.m4 php-4.4.1/ext/mcal/config.m4
+--- php-4.4.1.orig/ext/mcal/config.m4 2002-03-27 11:26:16.000000000 +0100
++++ php-4.4.1/ext/mcal/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -19,7 +19,7 @@
+ fi
+ done
+
+- for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib; do
++ for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib64/mcal $MCAL_DIR/lib $MCAL_DIR/lib64; do
+ if test -r "$i/libmcal.a"; then
+ MCAL_LIBRARY=$i
+ fi
+diff -Nru php-4.4.1.orig/ext/mcrypt/config.m4 php-4.4.1/ext/mcrypt/config.m4
+--- php-4.4.1.orig/ext/mcrypt/config.m4 2005-01-22 02:37:12.000000000 +0100
++++ php-4.4.1/ext/mcrypt/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -14,6 +14,12 @@
+ AC_MSG_ERROR(mcrypt.h not found. Please reinstall libmcrypt.)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MCRYPT_DIR/$j; then
++ MCRYPT_LIBDIR=$MCRYPT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
+ [
+ PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
+@@ -23,7 +29,7 @@
+ [
+ AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ])
+ ],[],[
+- -L$MCRYPT_DIR/lib -lltdl
++ -L$MCRYPT_LIBDIR -lltdl
+ ])
+
+ ],[
+@@ -35,7 +41,7 @@
+ [
+ AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ])
+ ],[],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+ PHP_CHECK_LIBRARY(mcrypt, init_mcrypt,
+@@ -44,16 +50,16 @@
+ ],[
+ AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
+ ],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+- -L$MCRYPT_DIR/lib -lltdl
++ -L$MCRYPT_LIBDIR -lltdl
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MCRYPT_DIR/include)
+
+ PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared)
+diff -Nru php-4.4.1.orig/ext/mcve/config.m4 php-4.4.1/ext/mcve/config.m4
+--- php-4.4.1.orig/ext/mcve/config.m4 2004-12-08 07:48:11.000000000 +0100
++++ php-4.4.1/ext/mcve/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -67,8 +67,14 @@
+
+ CPPFLAGS=$saved_CPPFLAGS
+
++ for j in lib64 lib; do
++ if test -d $MCVE_DIR/$j; then
++ MCVE_LIBDIR=$MCVE_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MCVE_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_LIBDIR, MCVE_SHARED_LIBADD)
+
+ dnl Build test. Check for libmcve or libmonetra
+ dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion
+diff -Nru php-4.4.1.orig/ext/mhash/config.m4 php-4.4.1/ext/mhash/config.m4
+--- php-4.4.1.orig/ext/mhash/config.m4 2003-10-01 04:54:01.000000000 +0200
++++ php-4.4.1/ext/mhash/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -14,8 +14,14 @@
+ AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MHASH_DIR/$j; then
++ MHASH_LIBDIR=$MHASH_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MHASH_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared)
+ PHP_SUBST(MHASH_SHARED_LIBADD)
+diff -Nru php-4.4.1.orig/ext/ming/config.m4 php-4.4.1/ext/ming/config.m4
+--- php-4.4.1.orig/ext/ming/config.m4 2003-07-11 09:48:33.000000000 +0200
++++ php-4.4.1/ext/ming/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -8,10 +8,12 @@
+ if test "$PHP_MING" != "no"; then
+ AC_CHECK_LIB(m, sin)
+
+- for i in $PHP_MING /usr/local /usr; do
+- if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then
++ for j in lib64 lib; do
++ for i in $PHP_MING /usr/local /usr; do
++ if test -f $i/$j/libming.$SHLIB_SUFFIX_NAME -o -f $i/$j/libming.a; then
+ MING_DIR=$i
+- fi
++ fi
++ done
+ done
+
+ if test -z "$MING_DIR"; then
+@@ -28,16 +30,22 @@
+ AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MING_DIR/$j; then
++ MING_LIBDIR=$MING_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
+ AC_DEFINE(HAVE_MING,1,[ ])
+ ],[
+ AC_MSG_ERROR([Ming library 0.2a or greater required.])
+ ],[
+- -L$MING_DIR/lib
++ -L$MING_LIBDIR
+ ])
+
+ PHP_ADD_INCLUDE($MING_INC_DIR)
+- PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_LIBDIR, MING_SHARED_LIBADD)
+
+ AC_MSG_CHECKING([for destroySWFBlock])
+ AC_TRY_RUN([
+diff -Nru php-4.4.1.orig/ext/msession/config.m4 php-4.4.1/ext/msession/config.m4
+--- php-4.4.1.orig/ext/msession/config.m4 2002-03-12 17:25:11.000000000 +0100
++++ php-4.4.1/ext/msession/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -8,13 +8,17 @@
+ if test "$PHP_MSESSION" != "no"; then
+ if test -r $PHP_MSESSION/lib/libphoenix.a; then
+ PHOENIX_DIR=$PHP_MSESSION
++ PHOENIX_LIBDIR=$PHP_MSESSION/lib
+ else
+ AC_MSG_CHECKING(for msession in default path)
+- for i in /usr/local/phoenix /usr/local /usr; do
+- if test -r $i/lib/libphoenix.a; then
+- PHOENIX_DIR=$i
+- AC_MSG_RESULT(found in $i)
+- fi
++ for j in lib64 lib; do
++ for i in /usr/local/phoenix /usr/local /usr; do
++ if test -r $i/$j/libphoenix.a; then
++ PHOENIX_DIR=$i
++ PHOENIX_LIBDIR=$i/$j
++ AC_MSG_RESULT(found in $i)
++ fi
++ done
+ done
+ fi
+
+@@ -25,7 +29,7 @@
+
+
+ AC_DEFINE(HAVE_MSESSION, 1, [ ])
+- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB)
++ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB)
+ PHOENIX_INCLUDE="-I$PHOENIX_DIR"
+ PHP_SUBST(PHOENIX_LIB)
+
+diff -Nru php-4.4.1.orig/ext/mssql/config.m4 php-4.4.1/ext/mssql/config.m4
+--- php-4.4.1.orig/ext/mssql/config.m4 2004-12-08 19:59:11.000000000 +0100
++++ php-4.4.1/ext/mssql/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -19,6 +19,12 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $FREETDS_INSTALLATION_DIR/$j; then
++ FREETDS_INSTALLATION_DIR_LIBDIR=$FREETDS_INSTALLATION_DIR/$j
++ fi
++ done
++
+ if test -z "$FREETDS_INSTALLATION_DIR"; then
+ AC_MSG_ERROR(Cannot find FreeTDS in known installation directories)
+ fi
+@@ -32,12 +38,12 @@
+ fi
+ fi
+
+- if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then
+- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so])
++ if test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.so"; then
++ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR_LIBDIR/libtds.[a|so])
+ fi
+
+ MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include
+- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib
++ MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR_LIBDIR
+
+ PHP_ADD_INCLUDE($MSSQL_INCDIR)
+ PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD)
+diff -Nru php-4.4.1.orig/ext/mysql/config.m4 php-4.4.1/ext/mysql/config.m4
+--- php-4.4.1.orig/ext/mysql/config.m4 2005-07-26 16:02:00.000000000 +0200
++++ php-4.4.1/ext/mysql/config.m4 2005-12-01 09:12:18.000000000 +0100
+@@ -121,7 +121,7 @@
+ ;;
+ esac
+
+- for i in lib lib/mysql; do
++ for i in lib64 lib64/mysql lib lib/mysql; do
+ MYSQL_LIB_CHK($i)
+ done
+
+@@ -132,13 +132,18 @@
+ PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_close, [ ],
+ [
+ if test "$PHP_ZLIB_DIR" != "no"; then
++ for j in lib64 lib; do
++ if test -d $PHP_ZLIB_DIR/$j; then
++ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j
++ fi
++ done
+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, MYSQL_SHARED_LIBADD)
+ PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_error, [], [
+ AC_MSG_ERROR([mysql configure failed. Please check config.log for more information.])
+ ], [
+- -L$PHP_ZLIB_DIR/lib -L$MYSQL_LIB_DIR
++ -L$PHP_ZLIB_LIBDIR -L$MYSQL_LIB_DIR
+ ])
+- MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -lz"
++ MYSQL_LIBS="-L$PHP_ZLIB_LIBDIR -lz"
+ else
+ PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD)
+ PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_errno, [], [
+diff -Nru php-4.4.1.orig/ext/ncurses/config.m4 php-4.4.1/ext/ncurses/config.m4
+--- php-4.4.1.orig/ext/ncurses/config.m4 2003-12-09 21:33:22.000000000 +0100
++++ php-4.4.1/ext/ncurses/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -38,20 +38,26 @@
+ LIBNAME=ncurses
+ LIBSYMBOL=initscr
+
++ for j in lib64 lib; do
++ if test -d $NCURSES_DIR/$j; then
++ NCURSES_LIBDIR=$NCURSES_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [
+ AC_DEFINE(HAVE_NCURSESLIB,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD)
+
+ PHP_CHECK_LIBRARY(panel, new_panel, [
+ AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD)
+ ], [], [
+- -L$NCURSES_DIR/lib -l$LIBNAME -lm
++ -L$NCURSES_LIBDIR -l$LIBNAME -lm
+ ])
+ ], [
+ AC_MSG_ERROR(Wrong ncurses lib version or lib not found)
+ ], [
+- -L$NCURSES_DIR/lib -lm
++ -L$NCURSES_LIBDIR -lm
+ ])
+
+ AC_CHECK_LIB($LIBNAME, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])])
+diff -Nru php-4.4.1.orig/ext/odbc/config.m4 php-4.4.1/ext/odbc/config.m4
+--- php-4.4.1.orig/ext/odbc/config.m4 2005-04-22 01:02:23.000000000 +0200
++++ php-4.4.1/ext/odbc/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -47,19 +47,8 @@
+ #
+ # Check for the library files, and setup the ODBC_LIBS path...
+ #
+-if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
+- ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+- #
+- # we have an error and should bail out, as we can't find the libs!
+- #
+- echo ""
+- echo "*********************************************************************"
+- echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+- echo "* Please correct this by creating the following links and reconfiguring:"
+- echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+- echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
+- echo "*********************************************************************"
+-else
++if test -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
++ -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+ ODBC_LFLAGS=-L$1
+ ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
+ fi
+@@ -100,8 +89,12 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ADABAS_LIBDIR=$withval/$i
++ test -f "$ADABAS_LIBDIR/odbclib.a" && break
++ done
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($ADABAS_LIBDIR)
+ ODBC_OBJS="$withval/lib/odbclib.a"
+ ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a"
+ $srcdir/build/shtool mkdir -f -p ext/odbc
+@@ -132,8 +125,12 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ SAPDB_LIBDIR=$withval/$i
++ test -f "$SAPDB_LIBDIR/libsqlod.a" -o -f "$SAPDB_LIBDIR/libsqlod.$SHLIB_SUFFIX_NAME" && break
++ done
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($SAPDB_LIBDIR)
+ PHP_ADD_LIBRARY(sqlod)
+ ODBC_TYPE=sapdb
+ AC_DEFINE(HAVE_SAPDB,1,[ ])
+@@ -158,19 +155,36 @@
+ withval=/usr/local/solid
+ fi
+ if test "$withval" != "no"; then
+- ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+- ODBC_INCLUDE=-I$ODBC_INCDIR
+- ODBC_TYPE=solid
+- if test -f $ODBC_LIBDIR/soc*35.a; then
+- AC_DEFINE(HAVE_SOLID_35,1,[ ])
+- elif test -f $ODBC_LIBDIR/scl*30.a; then
+- AC_DEFINE(HAVE_SOLID_30,1,[ ])
+- elif test -f $ODBC_LIBDIR/scl*23.a; then
+- AC_DEFINE(HAVE_SOLID,1,[ ])
++ for i in lib64 lib; do
++ SOLID_LIBDIR=$withval/$i
++ ODBC_INCDIR=$withval/include
++ ODBC_LIBDIR=$withval/$j
++ ODBC_INCLUDE=-I$ODBC_INCDIR
++ ODBC_TYPE=solid
++ if test -f $ODBC_LIBDIR/soc*35.a; then
++ AC_DEFINE(HAVE_SOLID_35,1,[ ])
++ elif test -f $ODBC_LIBDIR/scl*30.a; then
++ AC_DEFINE(HAVE_SOLID_30,1,[ ])
++ elif test -f $ODBC_LIBDIR/scl*23.a; then
++ AC_DEFINE(HAVE_SOLID,1,[ ])
++ fi
++ AC_MSG_RESULT(yes)
++ ODBC_LIBS=
++ AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
++ test -n "$ODBC_LIBS" && break
++ done
++ if test -z "$ODBC_LIBS"; then
++ #
++ # we have an error and should bail out, as we can't find the libs!
++ #
++ echo ""
++ echo "*********************************************************************"
++ echo "* Unable to locate ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
++ echo "* Please correct this by creating the following links and reconfiguring:"
++ echo "* ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
++ echo "* ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
++ echo "*********************************************************************"
+ fi
+- AC_MSG_RESULT(yes)
+- AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -400,11 +414,15 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
++ for i in lib64 lib; do
++ IODBC_LIBDIR=$withval/$i
++ test -f "$IODBC_LIBDIR/libiodbc.a" -o -f "$IODBC_LIBDIR/libiodbc.$SHLIB_SUFFIX_NAME" && break
++ done
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $IODBC_LIBDIR)
+ PHP_ADD_INCLUDE($withval/include, 1)
+ ODBC_TYPE=iodbc
+ ODBC_INCLUDE=-I$withval/include
+- ODBC_LFLAGS=-L$withval/lib
++ ODBC_LFLAGS=-L$IODBC_LIBDIR
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
+ AC_DEFINE(HAVE_ODBC2,1,[ ])
+@@ -429,8 +447,11 @@
+ withval=/usr/local/easysoft/oob/client
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ODBC_LIBDIR=$withval/$i
++ test -f "$ODBC_LIBDIR/libesoobclient.a" -o -f "$ODBC_LIBDIR/libesoobclient.$SHLIB_SUFFIX_NAME" && break
++ done
+ ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lesoobclient
+@@ -456,8 +477,11 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ODBC_LIBDIR=$withval/$i
++ test -f "$ODBC_LIBDIR/libodbc.a" -o -f "$ODBC_LIBDIR/libodbc.$SHLIB_SUFFIX_NAME" && break
++ done
+ ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lodbc
+diff -Nru php-4.4.1.orig/ext/pcre/config.m4 php-4.4.1/ext/pcre/config.m4
+--- php-4.4.1.orig/ext/pcre/config.m4 2005-08-09 19:41:56.000000000 +0200
++++ php-4.4.1/ext/pcre/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -25,7 +25,7 @@
+ AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX])
+ fi
+
+- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do
++ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib64 $PHP_PCRE_REGEX/lib; do
+ test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
+ done
+
+diff -Nru php-4.4.1.orig/ext/pgsql/config.m4 php-4.4.1/ext/pgsql/config.m4
+--- php-4.4.1.orig/ext/pgsql/config.m4 2005-07-25 01:11:45.000000000 +0200
++++ php-4.4.1/ext/pgsql/config.m4 2005-12-01 09:13:30.000000000 +0100
+@@ -44,7 +44,7 @@
+ fi
+ done
+
+- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do
++ for j in lib64 lib lib64/pgsql lib/pgsql lib64/postgres lib/postgres lib64/postgresql lib/postgresql ""; do
+ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
+ PGSQL_LIBDIR=$i/$j
+ fi
+diff -Nru php-4.4.1.orig/ext/pspell/config.m4 php-4.4.1/ext/pspell/config.m4
+--- php-4.4.1.orig/ext/pspell/config.m4 2005-02-17 04:51:50.000000000 +0100
++++ php-4.4.1/ext/pspell/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -27,7 +27,11 @@
+ AC_MSG_ERROR(Cannot find pspell)
+ fi
+
+- PSPELL_LIBDIR=$PSPELL_DIR/lib
++ for j in lib64 lib; do
++ if test -d $PSPELL_DIR/$j; then
++ PSPELL_LIBDIR=$PSPELL_DIR/$j
++ fi
++ done
+
+ PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
+
+diff -Nru php-4.4.1.orig/ext/readline/config.m4 php-4.4.1/ext/readline/config.m4
+--- php-4.4.1.orig/ext/readline/config.m4 2003-10-01 04:54:04.000000000 +0200
++++ php-4.4.1/ext/readline/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -29,22 +29,28 @@
+ ])
+ ])
+
++ for j in lib64 lib; do
++ if test -d $READLINE_DIR/$j; then
++ READLINE_LIBDIR=$READLINE_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(readline, readline,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(readline library not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_CHECK_LIBRARY(history, add_history,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(history library required by readline not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
+@@ -73,13 +79,19 @@
+ ])
+ ])
+
++ for j in lib64 lib; do
++ if test -d $LIBEDIT_DIR/$j; then
++ LIBEDIT_LIBDIR=$LIBEDIT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(edit, readline,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(edit library required by readline not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
+diff -Nru php-4.4.1.orig/ext/session/config.m4 php-4.4.1/ext/session/config.m4
+--- php-4.4.1.orig/ext/session/config.m4 2003-10-01 04:54:06.000000000 +0200
++++ php-4.4.1/ext/session/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -24,8 +24,14 @@
+ if test -z "$MM_DIR" ; then
+ AC_MSG_ERROR(cannot find mm library)
+ fi
+-
+- PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib, SESSION_SHARED_LIBADD)
++
++ for j in lib64 lib; do
++ if test -d $MM_DIR/$j; then
++ MM_LIBDIR=$MM_DIR/$j
++ fi
++ done
++
++ PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_LIBDIR, SESSION_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MM_DIR/include)
+ AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm])
+ fi
+diff -Nru php-4.4.1.orig/ext/snmp/config.m4 php-4.4.1/ext/snmp/config.m4
+--- php-4.4.1.orig/ext/snmp/config.m4 2003-09-23 10:16:47.000000000 +0200
++++ php-4.4.1/ext/snmp/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -45,8 +45,8 @@
+ test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp
+ test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp
+ done
+- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do
+- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib
++ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do
++ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i
+ done
+ else
+ SNMP_INCDIR=$PHP_SNMP/include
+diff -Nru php-4.4.1.orig/ext/xml/config.m4 php-4.4.1/ext/xml/config.m4
+--- php-4.4.1.orig/ext/xml/config.m4 2004-12-20 21:38:18.000000000 +0100
++++ php-4.4.1/ext/xml/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -33,6 +33,10 @@
+ for i in $PHP_XML $PHP_EXPAT_DIR; do
+ if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then
+ EXPAT_DIR=$i
++ EXPAT_LIBDIR=$i/lib
++ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME ; then
++ EXPAT_DIR=$i
++ EXPAT_LIBDIR=$i/lib64
+ fi
+ done
+
+@@ -41,7 +45,7 @@
+ fi
+
+ PHP_ADD_INCLUDE($EXPAT_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_LIBDIR, XML_SHARED_LIBADD)
+ PHP_SUBST(XML_SHARED_LIBADD)
+ fi
+ fi
+diff -Nru php-4.4.1.orig/ext/xmlrpc/config.m4 php-4.4.1/ext/xmlrpc/config.m4
+--- php-4.4.1.orig/ext/xmlrpc/config.m4 2003-10-03 07:25:43.000000000 +0200
++++ php-4.4.1/ext/xmlrpc/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -29,6 +29,12 @@
+ PHP_ADD_INCLUDE($i/include)
+ testval=yes
+ break
++ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then
++ AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XMLRPC_SHARED_LIBADD)
++ PHP_ADD_INCLUDE($i/include)
++ testval=yes
++ break
+ fi
+ done
+
+@@ -87,6 +93,12 @@
+ AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $XMLRPC_DIR/$j; then
++ XMLRPC_LIBDIR=$XMLRPC_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($XMLRPC_DIR)
+- PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_LIBDIR, XMLRPC_SHARED_LIBADD)
+ fi
+diff -Nru php-4.4.1.orig/ext/xslt/config.m4 php-4.4.1/ext/xslt/config.m4
+--- php-4.4.1.orig/ext/xslt/config.m4 2004-08-18 07:14:16.000000000 +0200
++++ php-4.4.1/ext/xslt/config.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -104,6 +104,12 @@
+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XSLT_SHARED_LIBADD)
+ found_expat=yes
+ break
++ elif test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then
++ AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ])
++ PHP_ADD_INCLUDE($i/include)
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XSLT_SHARED_LIBADD)
++ found_expat=yes
++ break
+ fi
+ done
+
+@@ -124,29 +130,38 @@
+ ])
+
+ if test "$PHP_SABLOT_JS" != "no"; then
+- for i in $PHP_SABLOT_JS /usr/local /usr; do
+- if test -f $i/lib/libjs.a -o -f $i/lib/libjs.$SHLIB_SUFFIX_NAME; then
+- PHP_SABLOT_JS_DIR=$i
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_SABLOT_JS /usr/local /usr; do
++ if test -f $i/$j/libjs.a -o -f $i/$j/libjs.$SHLIB_SUFFIX_NAME; then
++ PHP_SABLOT_JS_DIR=$i
++ PHP_SABLOT_JS_LIBDIR=$i/$j
++ break
++ fi
++ done
+ done
+
+ PHP_CHECK_LIBRARY(js, JS_GetRuntime,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_DIR/lib, XSLT_SHARED_LIBADD)
+- PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_DIR/lib -ljs"
++ PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_LIBDIR, XSLT_SHARED_LIBADD)
++ PHP_SABLOT_JS_LIBS="-L$PHP_SABLOT_JS_LIBDIR -ljs"
+ ], [
+ AC_MSG_ERROR([libjs not found. Please check config.log for more information.])
+ ], [
+- -L$PHP_SABLOT_JS_DIR/lib
++ -L$PHP_SABLOT_JS_LIBDIR
+ ])
+ fi
+
++ for j in lib64 lib; do
++ if test -d $XSLT_DIR/$j; then
++ XSLT_LIBDIR=$XSLT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(sablot, SablotSetEncoding,
+ [
+ AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ])
+ ], [], [
+- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS
++ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS
+ ])
+
+ dnl SablotSetOptions implemented in Sablotron CVS > 2002/10/31
+@@ -154,14 +169,14 @@
+ [
+ AC_DEFINE(HAVE_SABLOT_GET_OPTIONS, 1, [Whether Sablotron supports SablotGetOptions])
+ ], [], [
+- -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS
++ -L$XSLT_LIBDIR $PHP_SABLOT_JS_LIBS
+ ])
+
+ AC_DEFINE(HAVE_SABLOT_BACKEND, 1, [ ])
+ fi
+
+ PHP_ADD_INCLUDE($XSLT_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_DIR/lib, XSLT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_LIBDIR, XSLT_SHARED_LIBADD)
+
+ AC_DEFINE(HAVE_XSLT, 1, [ ])
+ fi
+diff -Nru php-4.4.1.orig/ext/zlib/config0.m4 php-4.4.1/ext/zlib/config0.m4
+--- php-4.4.1.orig/ext/zlib/config0.m4 2003-07-02 01:54:44.000000000 +0200
++++ php-4.4.1/ext/zlib/config0.m4 2005-12-01 08:55:02.000000000 +0100
+@@ -36,15 +36,21 @@
+ AC_MSG_ERROR(Cannot find libz)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $ZLIB_DIR/$j; then
++ ZLIB_LIBDIR=$ZLIB_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(z, gzgets, [
+ AC_DEFINE(HAVE_ZLIB,1,[ ])
+ ],[
+ AC_MSG_ERROR(ZLIB extension requires zlib >= 1.0.9)
+ ],[
+- -L$ZLIB_DIR/lib
++ -L$ZLIB_LIBDIR
+ ])
+
+- PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD)
++ PHP_ADD_LIBPATH($ZLIB_LIBDIR, ZLIB_SHARED_LIBADD)
+
+ PHP_ZLIB_DIR=$ZLIB_DIR
+ PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD)
diff --git a/dev-lang/php/files/5.0-any/CVS/Entries b/dev-lang/php/files/5.0-any/CVS/Entries
new file mode 100644
index 0000000..98f878b
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/CVS/Entries
@@ -0,0 +1,8 @@
+D/apache-1.3////
+D/apache-2.0////
+/php5-imap-symlink.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-iodbc-config.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-libtool-1.5.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-prefork.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-soap_persistence_session.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-with-iodbc.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
diff --git a/dev-lang/php/files/5.0-any/CVS/Repository b/dev-lang/php/files/5.0-any/CVS/Repository
new file mode 100644
index 0000000..48de559
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.0-any
diff --git a/dev-lang/php/files/5.0-any/CVS/Root b/dev-lang/php/files/5.0-any/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.0-any/CVS/Tag b/dev-lang/php/files/5.0-any/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf
new file mode 100644
index 0000000..c6f1426
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.0-any/apache-1.3/CVS/Entries b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Entries
new file mode 100644
index 0000000..7d7ba85
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php5.conf/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.0-any/apache-1.3/CVS/Repository b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Repository
new file mode 100644
index 0000000..13831e4
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.0-any/apache-1.3
diff --git a/dev-lang/php/files/5.0-any/apache-1.3/CVS/Root b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.0-any/apache-1.3/CVS/Tag b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-1.3/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf
new file mode 100644
index 0000000..40dfa86
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.0-any/apache-2.0/CVS/Entries b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Entries
new file mode 100644
index 0000000..7d7ba85
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php5.conf/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.0-any/apache-2.0/CVS/Repository b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Repository
new file mode 100644
index 0000000..c090d2c
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.0-any/apache-2.0
diff --git a/dev-lang/php/files/5.0-any/apache-2.0/CVS/Root b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.0-any/apache-2.0/CVS/Tag b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/apache-2.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.0-any/php5-imap-symlink.diff b/dev-lang/php/files/5.0-any/php5-imap-symlink.diff
new file mode 100644
index 0000000..99cfc9b
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/php5-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 02:49:45.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 02:50:00.000000000 +0200
+@@ -146,12 +146,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/lib/c-client.a"; then
+- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
diff --git a/dev-lang/php/files/5.0-any/php5-iodbc-config.diff b/dev-lang/php/files/5.0-any/php5-iodbc-config.diff
new file mode 100644
index 0000000..1e7a7c5
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/php5-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-31 01:16:38.000000000 +0200
++++ ext/odbc/config.m4 2005-08-31 01:17:24.000000000 +0200
+@@ -408,9 +408,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/lib
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/5.0-any/php5-libtool-1.5.patch b/dev-lang/php/files/5.0-any/php5-libtool-1.5.patch
new file mode 100644
index 0000000..7404992
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/php5-libtool-1.5.patch
@@ -0,0 +1,19 @@
+--- acinclude.m4 2005-09-08 13:27:42.000000000 +0200
++++ acinclude.m4 2005-09-08 13:28:28.000000000 +0200
+@@ -779,12 +779,12 @@
+ dnl
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+- php_c_pre='$(CC)'
++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=' && echo > $[@]'
+- php_cxx_pre='$(CXX)'
++ php_c_post=
++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=' && echo > $[@]'
++ php_cxx_post=
+ php_lo=o
+
+ case $with_pic in
diff --git a/dev-lang/php/files/5.0-any/php5-prefork.patch b/dev-lang/php/files/5.0-any/php5-prefork.patch
new file mode 100644
index 0000000..135579c
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/php5-prefork.patch
@@ -0,0 +1,26 @@
+diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4
+--- php-5.0.4-orig/sapi/apache2filter/config.m4 2005-03-13 20:30:44.767051120 +0000
++++ php-5.0.4/sapi/apache2filter/config.m4 2005-03-13 20:32:01.999310032 +0000
+@@ -115,9 +115,6 @@
+ ;;
+ esac
+
+- if test "$APXS_MPM" != "prefork"; then
+- PHP_BUILD_THREAD_SAFE
+- fi
+ AC_MSG_RESULT(yes)
+
+ PHP_SUBST(APXS)
+diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4
+--- php-5.0.4-orig/sapi/apache2handler/config.m4 2005-03-13 20:30:44.771050512 +0000
++++ php-5.0.4/sapi/apache2handler/config.m4 2005-03-13 20:31:50.106118072 +0000
+@@ -114,9 +114,6 @@
+ ;;
+ esac
+
+- if test "$APXS_MPM" != "prefork"; then
+- PHP_BUILD_THREAD_SAFE
+- fi
+ AC_MSG_RESULT(yes)
+
+ PHP_SUBST(APXS)
diff --git a/dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff b/dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff
new file mode 100644
index 0000000..626ac67
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff
@@ -0,0 +1,35 @@
+diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c
+--- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300
++++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300
+@@ -1341,16 +1341,21 @@
+ soap_obj = NULL;
+ #if HAVE_PHP_SESSION
+ /* If persistent then set soap_obj from from the previous created session (if available) */
++ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!!
+ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ zval **tmp_soap;
+
++ bzero(soapname,32+sizeof("_bogus_session_name"));
++ strncpy(soapname,service->soap_class.ce->name,32);
++ strcat(soapname,"_bogus_session_name");
++
+ if (PS(session_status) != php_session_active &&
+ PS(session_status) != php_session_disabled) {
+ php_session_start(TSRMLS_C);
+ }
+
+ /* Find the soap object and assign */
+- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS &&
++ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS &&
+ Z_TYPE_PP(tmp_soap) == IS_OBJECT &&
+ Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) {
+ soap_obj = *tmp_soap;
+@@ -1432,7 +1437,7 @@
+ /* If session then update session hash with new object */
+ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ zval **tmp_soap_pp;
+- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
++ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
+ soap_obj = *tmp_soap_pp;
+ }
+ } else {
diff --git a/dev-lang/php/files/5.0-any/php5-with-iodbc.diff b/dev-lang/php/files/5.0-any/php5-with-iodbc.diff
new file mode 100644
index 0000000..81afcc0
--- /dev/null
+++ b/dev-lang/php/files/5.0-any/php5-with-iodbc.diff
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
+ #define SQL_CURSOR_DYNAMIC 2UL
diff --git a/dev-lang/php/files/5.0.0/CVS/Entries b/dev-lang/php/files/5.0.0/CVS/Entries
new file mode 100644
index 0000000..6061dcf
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/CVS/Entries
@@ -0,0 +1,8 @@
+/php5-hphp-acinclude.patch/1.1/Thu Sep 8 20:47:34 2005/-ko/T1.1
+/php5-imap-symlink.diff/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php5-iodbc-config.diff/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/php5-libtool-1.5.patch/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php5.0.4-pcre-security.patch/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php5.0.4-xmlrcp-ccode.diff/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/php5.0.5-obj-serialize.patch/1.1/Sun Sep 18 13:21:54 2005//T1.1
+D
diff --git a/dev-lang/php/files/5.0.0/CVS/Repository b/dev-lang/php/files/5.0.0/CVS/Repository
new file mode 100644
index 0000000..ce0f757
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.0.0
diff --git a/dev-lang/php/files/5.0.0/CVS/Root b/dev-lang/php/files/5.0.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.0.0/CVS/Tag b/dev-lang/php/files/5.0.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.0.0/php5-hphp-acinclude.patch b/dev-lang/php/files/5.0.0/php5-hphp-acinclude.patch
new file mode 100644
index 0000000..c5f1e71
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5-hphp-acinclude.patch
@@ -0,0 +1,19 @@
+--- acinclude.m4.orig 2005-09-08 13:27:42.000000000 +0200
++++ acinclude.m4 2005-09-08 13:28:28.000000000 +0200
+@@ -779,12 +779,12 @@
+ dnl
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+- php_c_pre='$(CC)'
++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=' && echo > $[@]'
+- php_cxx_pre='$(CXX)'
++ php_c_post=
++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=' && echo > $[@]'
++ php_cxx_post=
+ php_lo=o
+
+ case $with_pic in
diff --git a/dev-lang/php/files/5.0.0/php5-imap-symlink.diff b/dev-lang/php/files/5.0.0/php5-imap-symlink.diff
new file mode 100644
index 0000000..99cfc9b
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 02:49:45.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 02:50:00.000000000 +0200
+@@ -146,12 +146,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/lib/c-client.a"; then
+- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
diff --git a/dev-lang/php/files/5.0.0/php5-iodbc-config.diff b/dev-lang/php/files/5.0.0/php5-iodbc-config.diff
new file mode 100644
index 0000000..1e7a7c5
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-31 01:16:38.000000000 +0200
++++ ext/odbc/config.m4 2005-08-31 01:17:24.000000000 +0200
+@@ -408,9 +408,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/lib
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/5.0.0/php5-libtool-1.5.patch b/dev-lang/php/files/5.0.0/php5-libtool-1.5.patch
new file mode 100644
index 0000000..7404992
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5-libtool-1.5.patch
@@ -0,0 +1,19 @@
+--- acinclude.m4 2005-09-08 13:27:42.000000000 +0200
++++ acinclude.m4 2005-09-08 13:28:28.000000000 +0200
+@@ -779,12 +779,12 @@
+ dnl
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
+- php_c_pre='$(CC)'
++ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
+- php_c_post=' && echo > $[@]'
+- php_cxx_pre='$(CXX)'
++ php_c_post=
++ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
+- php_cxx_post=' && echo > $[@]'
++ php_cxx_post=
+ php_lo=o
+
+ case $with_pic in
diff --git a/dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch b/dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch
new file mode 100644
index 0000000..548732d
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch
@@ -0,0 +1,38 @@
+--- configure.in 2005-09-17 21:42:36.000000000 +0200
++++ configure.in 2005-09-17 21:42:51.000000000 +0200
+@@ -41,7 +41,7 @@
+ MAJOR_VERSION=5
+ MINOR_VERSION=0
+ RELEASE_VERSION=4
+-EXTRA_VERSION=""
++EXTRA_VERSION="-gentoo-r1"
+ VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
+
+ dnl Define where extension directories are located in the configure context
+--- ext/pcre/config.m4 2003/06/28 04:30:51 1.32
++++ ext/pcre/config.m4 2005/08/22 16:55:56 1.32.2.2
+@@ -1,5 +1,5 @@
+ dnl
+-dnl $Id: php5.0.4-pcre-security.patch,v 1.1 2005/09/18 13:21:54 hollow Exp $
++dnl $Id: php5.0.4-pcre-security.patch,v 1.1 2005/09/18 13:21:54 hollow Exp $
+ dnl
+
+ dnl By default we'll compile and link against the bundled PCRE library
+@@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
+
+ if test "$PHP_PCRE_REGEX" != "no"; then
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+- PHP_NEW_EXTENSION(pcre, pcrelib/maketables.c pcrelib/get.c pcrelib/study.c pcrelib/pcre.c php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I@ext_srcdir@/pcrelib)
++ PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_dfa_exec.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_printint.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_ucp_findchar.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib)
+ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ else
+@@ -50,7 +50,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then
+
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ PHP_ADD_INCLUDE($PCRE_INCDIR)
+- PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10)
++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000)
+ fi
+ PHP_SUBST(PCRE_SHARED_LIBADD)
+ fi
diff --git a/dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff b/dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff
new file mode 100644
index 0000000..15e5950
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff
@@ -0,0 +1,23 @@
+--- ext/xmlrpc/libxmlrpc/xml_element.c 2004-06-01 22:16:06.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/xml_element.c 2005-04-22 13:54:17.000000000 +0200
+@@ -113,7 +116,7 @@
+ #include "expat.h"
+ #include "encodings.h"
+
+-#define my_free(thing) if(thing) {free(thing); thing = 0;}
++#define my_free(thing) if(thing) {free(thing); thing = NULL;}
+
+ #define XML_DECL_START "<?xml"
+ #define XML_DECL_START_LEN sizeof(XML_DECL_START) - 1
+@@ -189,7 +192,10 @@
+
+ Q_Destroy(&root->children);
+ Q_Destroy(&root->attrs);
+- my_free((char*)root->name);
++ if(root->name) {
++ free((char *)root->name);
++ root->name = NULL;
++ }
+ simplestring_free(&root->text);
+ my_free(root);
+ }
diff --git a/dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch b/dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch
new file mode 100644
index 0000000..ed1ad2a
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch
@@ -0,0 +1,42 @@
+--- ext/standard/incomplete_class.c 2004-11-25 20:28:37.000000000 +0000
++++ ext/standard/incomplete_class.c 2005-09-09 13:00:39.000000000 +0100
+@@ -122,7 +122,7 @@
+
+ /* {{{ php_lookup_class_name
+ */
+-char *php_lookup_class_name(zval *object, size_t *nlen)
++char *php_lookup_class_name(zval *object, zend_uint *nlen)
+ {
+ zval **val;
+ char *retval = NULL;
+@@ -144,7 +144,7 @@
+
+ /* {{{ php_store_class_name
+ */
+-void php_store_class_name(zval *object, const char *name, size_t len)
++void php_store_class_name(zval *object, const char *name, zend_uint len)
+ {
+ zval *val;
+ TSRMLS_FETCH();
+--- ./ext/standard/php_incomplete_class.h.bug34435 2005-06-29 10:29:08.000000000 +0100
++++ ./ext/standard/php_incomplete_class.h 2005-09-09 13:00:31.000000000 +0100
+@@ -42,7 +42,7 @@
+
+ #define PHP_CLASS_ATTRIBUTES \
+ char *class_name; \
+- size_t name_len; \
++ zend_uint name_len; \
+ zend_bool free_class_name = 0; \
+ zend_bool incomplete_class = 0
+
+@@ -55,8 +55,8 @@
+
+ zend_class_entry *php_create_incomplete_class(TSRMLS_D);
+
+-char *php_lookup_class_name(zval *object, size_t *nlen);
+-void php_store_class_name(zval *object, const char *name, size_t len);
++char *php_lookup_class_name(zval *object, zend_uint *nlen);
++void php_store_class_name(zval *object, const char *name, zend_uint len);
+
+ #ifdef __cplusplus
+ };
diff --git a/dev-lang/php/files/5.0.4/CVS/Entries b/dev-lang/php/files/5.0.4/CVS/Entries
new file mode 100644
index 0000000..15cdc17
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/CVS/Entries
@@ -0,0 +1,10 @@
+/php5.0.4-curl_safemode.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php5.0.4-fopen_wrappers.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.4-gd_safe_mode.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.4-globals_overwrite.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php5.0.4-pcre-security.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.4-phpinfo_xss.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php5.0.4-pspell-ext-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.4-session_save_path-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.4-xmlrcp-ccode.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.0.4/CVS/Repository b/dev-lang/php/files/5.0.4/CVS/Repository
new file mode 100644
index 0000000..ee20113
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.0.4
diff --git a/dev-lang/php/files/5.0.4/CVS/Root b/dev-lang/php/files/5.0.4/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.0.4/CVS/Tag b/dev-lang/php/files/5.0.4/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-curl_safemode.patch b/dev-lang/php/files/5.0.4/php5.0.4-curl_safemode.patch
new file mode 100644
index 0000000..6c498a7
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-curl_safemode.patch
@@ -0,0 +1,161 @@
+--- ext/curl/interface.c 2005-03-14 10:02:42.000000000 +0100
++++ ext/curl/interface.c 2005-10-31 23:09:15.000000000 +0100
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: interface.c,v 1.46.2.7 2005/03/14 09:02:42 sniper Exp $ */
++/* $Id: interface.c,v 1.46.2.11 2005/10/17 02:42:32 iliaa Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -62,7 +62,7 @@
+ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+- if (PG(open_basedir) && *PG(open_basedir) && \
++ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
+ strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+@@ -72,7 +72,7 @@
+ RETURN_FALSE; \
+ } \
+ \
+- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
+@@ -484,20 +484,22 @@
+ fci.no_separation = 0;
+ fci.symbol_table = NULL;
+
++ ch->in_callback = 1;
+ error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_WRITEFUNCTION");
+ length = -1;
+- } else {
++ } else if (retval_ptr) {
+ if (Z_TYPE_P(retval_ptr) != IS_LONG) {
+ convert_to_long_ex(&retval_ptr);
+ }
+ length = Z_LVAL_P(retval_ptr);
++ zval_ptr_dtor(&retval_ptr);
+ }
+
+ zval_ptr_dtor(argv[0]);
+ zval_ptr_dtor(argv[1]);
+- zval_ptr_dtor(&retval_ptr);
+ break;
+ }
+ }
+@@ -554,20 +556,22 @@
+ fci.no_separation = 0;
+ fci.symbol_table = NULL;
+
++ ch->in_callback = 1;
+ error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
+- } else {
++ } else if (retval_ptr) {
+ if (Z_TYPE_P(retval_ptr) == IS_STRING) {
+ length = MIN(size * nmemb, Z_STRLEN_P(retval_ptr));
+ memcpy(data, Z_STRVAL_P(retval_ptr), length);
+ }
++ zval_ptr_dtor(&retval_ptr);
+ }
+
+ zval_ptr_dtor(argv[0]);
+ zval_ptr_dtor(argv[1]);
+ zval_ptr_dtor(argv[2]);
+- zval_ptr_dtor(&retval_ptr);
+ break;
+ }
+ }
+@@ -625,19 +629,21 @@
+ fci.params = argv;
+ fci.no_separation = 0;
+
++ ch->in_callback = 1;
+ error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
++ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_HEADERFUNCTION");
+ length = -1;
+- } else {
++ } else if (retval_ptr) {
+ if (Z_TYPE_P(retval_ptr) != IS_LONG) {
+ convert_to_long_ex(&retval_ptr);
+ }
+ length = Z_LVAL_P(retval_ptr);
++ zval_ptr_dtor(&retval_ptr);
+ }
+ zval_ptr_dtor(argv[0]);
+ zval_ptr_dtor(argv[1]);
+- zval_ptr_dtor(&retval_ptr);
+ break;
+ }
+
+@@ -773,6 +779,8 @@
+ (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
+ (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
+
++ (*ch)->in_callback = 0;
++
+ memset(&(*ch)->err, 0, sizeof((*ch)->err));
+
+ zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (void(*)(void *)) curl_free_string, 0);
+@@ -1120,10 +1128,15 @@
+ * must be explicitly cast to long in curl_formadd
+ * use since curl needs a long not an int. */
+ if (*postval == '@') {
++ ++postval;
++ /* safe_mode / open_basedir check */
++ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
++ RETURN_FALSE;
++ }
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,
+- CURLFORM_FILE, ++postval,
++ CURLFORM_FILE, postval,
+ CURLFORM_END);
+ } else {
+ error = curl_formadd(&first, &last,
+@@ -1468,6 +1481,12 @@
+ }
+
+ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
++
++ if (ch->in_callback) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close CURL handle from a callback");
++ return;
++ }
++
+ if (ch->uses) {
+ ch->uses--;
+ } else {
+--- ext/curl/php_curl.h 2004/03/12 18:37:55 1.41
++++ ext/curl/php_curl.h 2005/06/02 21:04:43 1.41.2.1
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_curl.h,v 1.41 2004/03/12 18:37:55 sterling Exp $ */
++/* $Id: php_curl.h,v 1.41.2.1 2005/06/02 21:04:43 tony2001 Exp $ */
+
+ #ifndef _PHP_CURL_H
+ #define _PHP_CURL_H
+@@ -121,6 +121,7 @@ typedef struct {
+ php_curl_handlers *handlers;
+ long id;
+ unsigned int uses;
++ zend_bool in_callback;
+ } php_curl;
+
+ typedef struct {
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch
new file mode 100644
index 0000000..f645199
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c 2005/03/11 06:55:22 1.170.2.2
++++ main/fopen_wrappers.c 2005/09/27 15:08:11 1.170.2.5
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: fopen_wrappers.c,v 1.170.2.2 2005/03/11 06:55:22 hyanantha Exp $ */
++/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */
+
+ /* {{{ includes
+ */
+@@ -35,14 +35,6 @@
+ #ifdef PHP_WIN32
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -117,8 +109,8 @@ PHPAPI int php_check_specific_open_based
+ /* Handler for basedirs that end with a / */
+ resolved_basedir_len = strlen(resolved_basedir);
+ if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+- if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+ resolved_basedir[++resolved_basedir_len] = '\0';
+ }
+ }
+@@ -132,7 +124,7 @@ PHPAPI int php_check_specific_open_based
+ }
+
+ /* Check the path */
+-#ifdef PHP_WIN32
++#if defined(PHP_WIN32) || defined(NETWARE)
+ if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
+ #else
+ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch b/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch
new file mode 100644
index 0000000..91b0aae
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch
@@ -0,0 +1,29 @@
+--- ext/gd/gd.c 2005/01/17 17:07:47 1.294.2.11
++++ ext/gd/gd.c 2005/10/06 20:42:56 1.294.2.13
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: gd.c,v 1.294.2.11 2005/01/17 17:07:47 sniper Exp $ */
++/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+ Cold Spring Harbor Labs. */
+@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+ RETURN_FALSE;
+ }
+@@ -1781,7 +1781,7 @@ static void _php_image_output(INTERNAL_F
+ char buf[4096];
+ char *path;
+
+- tmp = php_open_temporary_file("", "", &path TSRMLS_CC);
++ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC);
+ if (tmp == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
+ RETURN_FALSE;
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-globals_overwrite.patch b/dev-lang/php/files/5.0.4/php5.0.4-globals_overwrite.patch
new file mode 100644
index 0000000..02a9a83
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-globals_overwrite.patch
@@ -0,0 +1,1013 @@
+--- ext/standard/array.c 2005-03-12 11:12:49.000000000 +0100
++++ ext/standard/array.c 2005-11-01 01:03:21.000000000 +0100
+@@ -21,7 +21,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: array.c,v 1.266.2.15 2005/03/12 10:12:49 andrey Exp $ */
++/* $Id: array.c,v 1.266.2.29 2005/10/28 09:57:15 dmitry Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -578,43 +578,66 @@
+ }
+ }
+
+-/* check is comparison function is valid */
++/* check if comparison function is valid */
+ #define PHP_ARRAY_CMP_FUNC_CHECK(func_name) \
+ if (!zend_is_callable(*func_name, 0, NULL)) { \
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid comparison function."); \
++ BG(user_compare_fci_cache) = old_user_compare_fci_cache; \
+ BG(user_compare_func_name) = old_compare_func; \
+ RETURN_FALSE; \
+ } \
+
++ /* clear FCI cache otherwise : for example the same or other array with
++ (partly) the same key values has been sorted with uasort() or
++ other sorting function the comparison is cached, however the the name
++ of the function for comparison is not respected. see bug #28739 AND #33295
++
++ following defines will assist in backup / restore values.
++ */
++
++#define PHP_ARRAY_CMP_FUNC_VARS \
++ zval **old_compare_func; \
++ zend_fcall_info_cache old_user_compare_fci_cache
++
++#define PHP_ARRAY_CMP_FUNC_BACKUP() \
++ old_compare_func = BG(user_compare_func_name); \
++ old_user_compare_fci_cache = BG(user_compare_fci_cache); \
++ BG(user_compare_fci_cache) = empty_fcall_info_cache
++
++#define PHP_ARRAY_CMP_FUNC_RESTORE() \
++ BG(user_compare_fci_cache) = old_user_compare_fci_cache; \
++ BG(user_compare_func_name) = old_compare_func
++
++
+ /* {{{ proto bool usort(array array_arg, string cmp_function)
+ Sort an array by values using a user-defined comparison function */
+ PHP_FUNCTION(usort)
+ {
+ zval **array;
+- zval **old_compare_func;
+ HashTable *target_hash;
++ PHP_ARRAY_CMP_FUNC_VARS;
++
++ PHP_ARRAY_CMP_FUNC_BACKUP();
+
+- old_compare_func = BG(user_compare_func_name);
+- BG(user_compare_fci_cache) = empty_fcall_info_cache;
+
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ WRONG_PARAM_COUNT;
+ }
+ target_hash = HASH_OF(*array);
+ if (!target_hash) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The argument should be an array");
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_FALSE;
+ }
+
+ PHP_ARRAY_CMP_FUNC_CHECK(BG(user_compare_func_name))
+
+ if (zend_hash_sort(target_hash, zend_qsort, array_user_compare, 1 TSRMLS_CC) == FAILURE) {
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_FALSE;
+ }
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_TRUE;
+ }
+ /* }}} */
+@@ -624,29 +647,30 @@
+ PHP_FUNCTION(uasort)
+ {
+ zval **array;
+- zval **old_compare_func;
+ HashTable *target_hash;
++ PHP_ARRAY_CMP_FUNC_VARS;
++
++ PHP_ARRAY_CMP_FUNC_BACKUP();
+
+- old_compare_func = BG(user_compare_func_name);
+- BG(user_compare_fci_cache) = empty_fcall_info_cache;
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ WRONG_PARAM_COUNT;
+ }
+ target_hash = HASH_OF(*array);
+ if (!target_hash) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The argument should be an array");
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_FALSE;
+ }
+
+ PHP_ARRAY_CMP_FUNC_CHECK(BG(user_compare_func_name))
+
+ if (zend_hash_sort(target_hash, zend_qsort, array_user_compare, 0 TSRMLS_CC) == FAILURE) {
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_FALSE;
+ }
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
++
+ RETURN_TRUE;
+ }
+ /* }}} */
+@@ -669,7 +693,7 @@
+ s = *((Bucket **) b);
+
+ if (f->nKeyLength) {
+- Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength);
++ Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength-1);
+ Z_STRLEN(key1) = f->nKeyLength-1;
+ Z_TYPE(key1) = IS_STRING;
+ } else {
+@@ -677,7 +701,7 @@
+ Z_TYPE(key1) = IS_LONG;
+ }
+ if (s->nKeyLength) {
+- Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength);
++ Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength-1);
+ Z_STRLEN(key2) = s->nKeyLength-1;
+ Z_TYPE(key2) = IS_STRING;
+ } else {
+@@ -703,28 +727,33 @@
+ PHP_FUNCTION(uksort)
+ {
+ zval **array;
+- zval **old_compare_func;
+ HashTable *target_hash;
++ PHP_ARRAY_CMP_FUNC_VARS;
++
++
++ PHP_ARRAY_CMP_FUNC_BACKUP();
+
+- old_compare_func = BG(user_compare_func_name);
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ WRONG_PARAM_COUNT;
+ }
+ target_hash = HASH_OF(*array);
+ if (!target_hash) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The argument should be an array");
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
++
+ RETURN_FALSE;
+ }
+
+ PHP_ARRAY_CMP_FUNC_CHECK(BG(user_compare_func_name))
+
+ if (zend_hash_sort(target_hash, zend_qsort, array_user_key_compare, 0 TSRMLS_CC) == FAILURE) {
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
++
+ RETURN_FALSE;
+ }
+- BG(user_compare_func_name) = old_compare_func;
++
++ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_TRUE;
+ }
+ /* }}} */
+@@ -1008,6 +1037,7 @@
+ uint string_key_len;
+ ulong num_key;
+ HashPosition pos;
++ zend_fcall_info_cache array_walk_fci_cache = empty_fcall_info_cache;
+
+ /* Set up known arguments */
+ args[1] = &key;
+@@ -1020,6 +1050,7 @@
+ if (recursive && Z_TYPE_PP(args[0]) == IS_ARRAY) {
+ HashTable *thash;
+
++ SEPARATE_ZVAL_TO_MAKE_IS_REF(args[0]);
+ thash = HASH_OF(*(args[0]));
+ if (thash == target_hash) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
+@@ -1051,7 +1082,7 @@
+ fci.no_separation = 0;
+
+ /* Call the userland function */
+- if (zend_call_function(&fci, &BG(array_walk_fci_cache) TSRMLS_CC) == SUCCESS) {
++ if (zend_call_function(&fci, &array_walk_fci_cache TSRMLS_CC) == SUCCESS) {
+ if (retval_ptr) {
+ zval_ptr_dtor(&retval_ptr);
+ }
+@@ -1094,7 +1125,6 @@
+ HashTable *target_hash;
+
+ argc = ZEND_NUM_ARGS();
+- BG(array_walk_fci_cache) = empty_fcall_info_cache;
+ old_walk_func_name = BG(array_walk_func_name);
+ if (argc < 2 || argc > 3 ||
+ zend_get_parameters_ex(argc, &array, &BG(array_walk_func_name), &userdata) == FAILURE) {
+@@ -1131,7 +1161,6 @@
+
+ argc = ZEND_NUM_ARGS();
+ old_walk_func_name = BG(array_walk_func_name);
+- BG(array_walk_fci_cache) = empty_fcall_info_cache;
+
+ if (argc < 2 || argc > 3 ||
+ zend_get_parameters_ex(argc, &array, &BG(array_walk_func_name), &userdata) == FAILURE) {
+@@ -1345,6 +1374,10 @@
+ /* break omitted intentionally */
+
+ case EXTR_OVERWRITE:
++ /* GLOBALS protection */
++ if (var_exists && !strcmp(var_name, "GLOBALS")) {
++ break;
++ }
+ smart_str_appendl(&final_name, var_name, var_name_len);
+ break;
+
+@@ -1393,14 +1426,18 @@
+ zval **orig_var;
+
+ if (zend_hash_find(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) &orig_var) == SUCCESS) {
+- zval_ptr_dtor(orig_var);
+-
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
+ zval_add_ref(entry);
+
++ zval_ptr_dtor(orig_var);
++
+ *orig_var = *entry;
+ } else {
+- (*entry)->is_ref = 1;
++ if ((*var_array)->refcount > 1) {
++ SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
++ } else {
++ (*entry)->is_ref = 1;
++ }
+ zval_add_ref(entry);
+ zend_hash_update(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) entry, sizeof(zval *), NULL);
+ }
+@@ -2005,8 +2042,8 @@
+ hashtable and replace it with new one */
+ new_hash = php_splice(Z_ARRVAL_P(stack), 0, 0, &args[1], argc-1, NULL);
+ zend_hash_destroy(Z_ARRVAL_P(stack));
+- efree(Z_ARRVAL_P(stack));
+- Z_ARRVAL_P(stack) = new_hash;
++ *Z_ARRVAL_P(stack) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up and return the number of elements in the stack */
+ efree(args);
+@@ -2082,8 +2119,8 @@
+
+ /* Replace input array's hashtable with the new one */
+ zend_hash_destroy(Z_ARRVAL_P(array));
+- efree(Z_ARRVAL_P(array));
+- Z_ARRVAL_P(array) = new_hash;
++ *Z_ARRVAL_P(array) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up */
+ if (argc == 4)
+@@ -2443,7 +2480,6 @@
+ zend_hash_internal_pointer_reset_ex(myht, &pos);
+ while (zend_hash_get_current_data_ex(myht, (void **)&entry, &pos) == SUCCESS) {
+ if (Z_TYPE_PP(entry) == IS_LONG) {
+-int_key:
+ if (zend_hash_index_find(Z_ARRVAL_P(return_value),
+ Z_LVAL_PP(entry),
+ (void**)&tmp) == FAILURE) {
+@@ -2456,11 +2492,31 @@
+ Z_LVAL_PP(tmp)++;
+ }
+ } else if (Z_TYPE_PP(entry) == IS_STRING) {
+- /* make sure our array does not end up with numeric string keys */
+- if (is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) {
+- SEPARATE_ZVAL(entry);
+- convert_to_long_ex(entry);
+- goto int_key;
++ /* make sure our array does not end up with numeric string keys
++ * but don't touch those strings that start with 0 */
++ if (!(Z_STRLEN_PP(entry) > 1 && Z_STRVAL_PP(entry)[0] == '0') && is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) {
++ zval tmp_entry;
++
++ tmp_entry = **entry;
++ zval_copy_ctor(&tmp_entry);
++
++ convert_to_long(&tmp_entry);
++
++ if (zend_hash_index_find(Z_ARRVAL_P(return_value),
++ Z_LVAL(tmp_entry),
++ (void**)&tmp) == FAILURE) {
++ zval *data;
++ MAKE_STD_ZVAL(data);
++ Z_TYPE_P(data) = IS_LONG;
++ Z_LVAL_P(data) = 1;
++ zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL(tmp_entry), &data, sizeof(data), NULL);
++ } else {
++ Z_LVAL_PP(tmp)++;
++ }
++
++ zval_dtor(&tmp_entry);
++ zend_hash_move_forward_ex(myht, &pos);
++ continue;
+ }
+
+ if (zend_hash_find(Z_ARRVAL_P(return_value), Z_STRVAL_PP(entry), Z_STRLEN_PP(entry)+1, (void**)&tmp) == FAILURE) {
+@@ -2598,8 +2654,8 @@
+
+ /* Copy the result hash into return value */
+ zend_hash_destroy(Z_ARRVAL_P(return_value));
+- efree(Z_ARRVAL_P(return_value));
+- Z_ARRVAL_P(return_value) = new_hash;
++ *Z_ARRVAL_P(return_value) = *new_hash;
++ FREE_HASHTABLE(new_hash);
+
+ /* Clean up */
+ efree(pads);
+@@ -2697,7 +2753,7 @@
+ zend_hash_index_update(Z_ARRVAL_P(return_value), num_key, entry, sizeof(entry), NULL);
+ break;
+ case HASH_KEY_IS_STRING:
+- new_key=estrndup(string_key,str_key_len);
++ new_key=estrndup(string_key,str_key_len - 1);
+ if (change_to_upper)
+ php_strtoupper(new_key, str_key_len - 1);
+ else
+@@ -2787,7 +2843,8 @@
+ Bucket ***lists, **list, ***ptrs, *p;
+
+ char *callback_name;
+- zval **old_compare_func;
++ PHP_ARRAY_CMP_FUNC_VARS;
++
+
+ int (*intersect_key_compare_func)(const void *, const void * TSRMLS_DC);
+ int (*intersect_data_compare_func)(const void *, const void * TSRMLS_DC);
+@@ -2801,13 +2858,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- old_compare_func = BG(user_compare_func_name);
+- /* clear FCI cache otherwise : for example the same or other array with
+- (partly) the same key values has been sorted with uasort() or
+- other sorting function the comparison is cached, however the the name
+- of the function for comparison is not respected. see bug #28739
+- */
+- BG(user_compare_fci_cache) = empty_fcall_info_cache;
++ PHP_ARRAY_CMP_FUNC_BACKUP();
+
+ if (behavior == INTERSECT_NORMAL) {
+ intersect_key_compare_func = array_key_compare;
+@@ -2962,6 +3013,15 @@
+ /* copy the argument array */
+ *return_value = **args[0];
+ zval_copy_ctor(return_value);
++ if (return_value->value.ht == &EG(symbol_table)) {
++ HashTable *ht;
++ zval *tmp;
++
++ ALLOC_HASHTABLE(ht);
++ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
++ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++ return_value->value.ht = ht;
++ }
+
+ if (behavior == INTERSECT_NORMAL && data_compare_type == INTERSECT_COMP_DATA_USER) {
+ /* array_uintersect() */
+@@ -3069,7 +3129,8 @@
+ pefree(lists[i], hash->persistent);
+ }
+
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
++
+
+ efree(ptrs);
+ efree(lists);
+@@ -3141,7 +3202,8 @@
+ Bucket ***lists, **list, ***ptrs, *p;
+ char *callback_name;
+
+- zval **old_compare_func;
++ PHP_ARRAY_CMP_FUNC_VARS;
++
+ int (*diff_key_compare_func)(const void *, const void * TSRMLS_DC);
+ int (*diff_data_compare_func)(const void *, const void * TSRMLS_DC);
+
+@@ -3155,13 +3217,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- old_compare_func = BG(user_compare_func_name);
+- /* clear FCI cache otherwise : for example the same or other array with
+- (partly) the same key values has been sorted with uasort() or
+- other sorting function the comparison is cached, however the the name
+- of the function for comparison is not respected. see bug #28739
+- */
+- BG(user_compare_fci_cache) = empty_fcall_info_cache;
++ PHP_ARRAY_CMP_FUNC_BACKUP();
+
+ if (behavior == DIFF_NORMAL) {
+ diff_key_compare_func = array_key_compare;
+@@ -3316,6 +3372,15 @@
+ /* copy the argument array */
+ *return_value = **args[0];
+ zval_copy_ctor(return_value);
++ if (return_value->value.ht == &EG(symbol_table)) {
++ HashTable *ht;
++ zval *tmp;
++
++ ALLOC_HASHTABLE(ht);
++ zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
++ zend_hash_copy(ht, return_value->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++ return_value->value.ht = ht;
++ }
+
+ if (behavior == DIFF_NORMAL && data_compare_type == DIFF_COMP_DATA_USER) {
+ /* array_udiff() */
+@@ -3410,7 +3475,8 @@
+ pefree(lists[i], hash->persistent);
+ }
+
+- BG(user_compare_func_name) = old_compare_func;
++ PHP_ARRAY_CMP_FUNC_RESTORE();
++
+
+ efree(ptrs);
+ efree(lists);
+@@ -3845,8 +3911,11 @@
+ efree(callback_name);
+
+ if (ZEND_NUM_ARGS() > 2) {
+- convert_to_long_ex(initial);
+- result = *initial;
++ ALLOC_ZVAL(result);
++ *result = **initial;
++ zval_copy_ctor(result);
++ convert_to_long(result);
++ INIT_PZVAL(result);
+ } else {
+ MAKE_STD_ZVAL(result);
+ ZVAL_NULL(result);
+@@ -3862,6 +3931,7 @@
+ if (result) {
+ *return_value = *result;
+ zval_copy_ctor(return_value);
++ zval_ptr_dtor(&result);
+ }
+ return;
+ }
+@@ -3911,6 +3981,7 @@
+ PHP_FUNCTION(array_filter)
+ {
+ zval **input, **callback = NULL;
++ zval *array, *func = NULL;
+ zval **operand;
+ zval **args[1];
+ zval *retval = NULL;
+@@ -3930,9 +4001,13 @@
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array");
+ return;
+ }
++ if (callback) {
++ func = *callback;
++ }
++ array = *input;
+
+ if (ZEND_NUM_ARGS() > 1) {
+- if (!zend_is_callable(*callback, 0, &callback_name)) {
++ if (!zend_is_callable(func, 0, &callback_name)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument, '%s', should be a valid callback", callback_name);
+ efree(callback_name);
+ return;
+@@ -3941,22 +4016,22 @@
+ }
+
+ array_init(return_value);
+- if (zend_hash_num_elements(Z_ARRVAL_PP(input)) == 0) {
++ if (zend_hash_num_elements(Z_ARRVAL_P(array)) == 0) {
+ return;
+ }
+
+- for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos);
+- zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&operand, &pos) == SUCCESS;
+- zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &pos)) {
++ for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), &pos);
++ zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **)&operand, &pos) == SUCCESS;
++ zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) {
+
+- if (callback) {
++ if (func) {
+ zend_fcall_info fci;
+
+ args[0] = operand;
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+- fci.function_name = *callback;
++ fci.function_name = func;
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval;
+@@ -3980,7 +4055,7 @@
+ }
+
+ zval_add_ref(operand);
+- switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &pos)) {
++ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(array), &string_key, &string_key_len, &num_key, 0, &pos)) {
+ case HASH_KEY_IS_STRING:
+ zend_hash_update(Z_ARRVAL_P(return_value), string_key, string_key_len, operand, sizeof(zval *), NULL);
+ break;
+@@ -4046,6 +4121,7 @@
+ efree(array_pos);
+ return;
+ }
++ SEPARATE_ZVAL_IF_NOT_REF(pargs[i]);
+ args[i] = *pargs[i];
+ array_len[i] = zend_hash_num_elements(Z_ARRVAL_PP(pargs[i]));
+ if (array_len[i] > maxlen) {
+--- ext/standard/basic_functions.c 2005-03-10 13:10:57.000000000 +0100
++++ ext/standard/basic_functions.c 2005-11-01 01:03:31.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: basic_functions.c,v 1.673.2.13 2005/03/10 12:10:57 hyanantha Exp $ */
++/* $Id: basic_functions.c,v 1.673.2.21 2005/09/29 16:31:20 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_streams.h"
+@@ -469,7 +469,6 @@
+ PHP_FALIAS(show_source, highlight_file, NULL)
+ PHP_FE(highlight_string, NULL)
+ PHP_FE(php_strip_whitespace, NULL)
+- PHP_FE(php_check_syntax, second_arg_force_ref)
+
+ PHP_FE(ini_get, NULL)
+ PHP_FE(ini_get_all, NULL)
+@@ -743,8 +743,8 @@
+ PHP_FE(prev, first_arg_force_ref)
+ PHP_FE(next, first_arg_force_ref)
+ PHP_FE(reset, first_arg_force_ref)
+- PHP_FE(current, first_arg_force_ref)
+- PHP_FE(key, first_arg_force_ref)
++ PHP_FE(current, NULL)
++ PHP_FE(key, NULL)
+ PHP_FE(min, NULL)
+ PHP_FE(max, NULL)
+ PHP_FE(in_array, NULL)
+@@ -930,7 +930,6 @@
+ BG(user_tick_functions) = NULL;
+ BG(user_filter_map) = NULL;
+ BG(user_compare_fci_cache) = empty_fcall_info_cache;
+- /*BG(array_walk_fci_cache) = empty_fcall_info_cache;*/
+ zend_hash_init(&BG(sm_protected_env_vars), 5, NULL, NULL, 1);
+ BG(sm_allowed_env_vars) = NULL;
+
+@@ -1192,17 +1191,10 @@
+ }
+ STR_FREE(BG(locale_string));
+
+- if (FG(stream_wrappers)) {
+- zend_hash_destroy(FG(stream_wrappers));
+- efree(FG(stream_wrappers));
+- FG(stream_wrappers) = NULL;
+- }
+-
+- if (FG(stream_filters)) {
+- zend_hash_destroy(FG(stream_filters));
+- efree(FG(stream_filters));
+- FG(stream_filters) = NULL;
+- }
++ /*
++ FG(stream_wrappers) and FG(stream_filters) are destroyed
++ during php_request_shutdown()
++ */
+
+ PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ #ifdef HAVE_SYSLOG_H
+@@ -2103,17 +2095,21 @@
+ static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC)
+ {
+ zval retval;
++ char *function_name = NULL;
+
+- if (call_user_function( EG(function_table), NULL,
+- shutdown_function_entry->arguments[0],
+- &retval,
+- shutdown_function_entry->arg_count - 1,
+- shutdown_function_entry->arguments + 1
+- TSRMLS_CC ) == SUCCESS ) {
++ if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name)) {
++ php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name);
++ } else if (call_user_function(EG(function_table), NULL,
++ shutdown_function_entry->arguments[0],
++ &retval,
++ shutdown_function_entry->arg_count - 1,
++ shutdown_function_entry->arguments + 1
++ TSRMLS_CC ) == SUCCESS)
++ {
+ zval_dtor(&retval);
+-
+- } else {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(shutdown_function_entry->arguments[0]));
++ }
++ if (function_name) {
++ efree(function_name);
+ }
+ return 0;
+ }
+@@ -2206,6 +2202,7 @@
+ PHP_FUNCTION(register_shutdown_function)
+ {
+ php_shutdown_function_entry shutdown_function_entry;
++ char *function_name = NULL;
+ int i;
+
+ shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
+@@ -2214,26 +2211,31 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- shutdown_function_entry.arguments = (pval **) safe_emalloc(sizeof(pval *), shutdown_function_entry.arg_count, 0);
++ shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
+
+ if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
+ RETURN_FALSE;
+ }
+
+- /* Prevent entering of anything but arrays/strings */
+- if (Z_TYPE_P(shutdown_function_entry.arguments[0]) != IS_ARRAY) {
+- convert_to_string(shutdown_function_entry.arguments[0]);
+- }
+-
+- if (!BG(user_shutdown_function_names)) {
+- ALLOC_HASHTABLE(BG(user_shutdown_function_names));
+- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
+- }
++ /* Prevent entering of anything but valid callback (syntax check only!) */
++ if (!zend_is_callable(shutdown_function_entry.arguments[0], 1, &function_name)) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name);
++ efree(shutdown_function_entry.arguments);
++ RETVAL_FALSE;
++ } else {
++ if (!BG(user_shutdown_function_names)) {
++ ALLOC_HASHTABLE(BG(user_shutdown_function_names));
++ zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
++ }
+
+- for (i = 0; i < shutdown_function_entry.arg_count; i++) {
+- shutdown_function_entry.arguments[i]->refcount++;
++ for (i = 0; i < shutdown_function_entry.arg_count; i++) {
++ shutdown_function_entry.arguments[i]->refcount++;
++ }
++ zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
++ }
++ if (function_name) {
++ efree(function_name);
+ }
+- zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
+ }
+ /* }}} */
+
+@@ -2323,49 +2325,6 @@
+ }
+ /* }}} */
+
+-/* {{{ proto bool php_check_syntax(string file_name [, &$error_message])
+- Check the syntax of the specified file. */
+-PHP_FUNCTION(php_check_syntax)
+-{
+- char *filename;
+- int filename_len;
+- zval *errm=NULL;
+- zend_file_handle file_handle = {0};
+-
+- int old_errors = PG(display_errors);
+- int log_errors = PG(log_errors);
+-
+- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &filename, &filename_len, &errm) == FAILURE) {
+- RETURN_FALSE;
+- }
+-
+- file_handle.type = ZEND_HANDLE_FILENAME;
+- file_handle.filename = filename;
+- file_handle.free_filename = 0;
+- file_handle.opened_path = NULL;
+-
+- PG(log_errors) = PG(display_errors) = 0;
+-
+- if (php_lint_script(&file_handle TSRMLS_CC) != SUCCESS) {
+- if (errm) {
+- char *error_str;
+-
+- zval_dtor(errm);
+- spprintf(&error_str, 0, "%s in %s on line %d", PG(last_error_message), PG(last_error_file), PG(last_error_lineno));
+- ZVAL_STRING(errm, error_str, 0);
+- }
+- RETVAL_FALSE;
+- } else {
+- RETVAL_TRUE;
+- }
+-
+- PG(display_errors) = old_errors;
+- PG(log_errors) = log_errors;
+-
+- return;
+-}
+-/* }}} */
+-
+ /* {{{ proto bool highlight_string(string string [, bool return] )
+ Syntax highlight a string or optionally return it */
+ PHP_FUNCTION(highlight_string)
+@@ -3118,11 +3077,25 @@
+ prefix = va_arg(args, char *);
+ prefix_len = va_arg(args, uint);
+
+- new_key_len = prefix_len + hash_key->nKeyLength;
+- new_key = (char *) emalloc(new_key_len);
++ if (!prefix_len) {
++ if (!hash_key->nKeyLength) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard.");
++ return 0;
++ } else if (!strcmp(hash_key->arKey, "GLOBALS")) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite.");
++ return 0;
++ }
++ }
++
++ if (hash_key->nKeyLength) {
++ new_key_len = prefix_len + hash_key->nKeyLength;
++ new_key = (char *) emalloc(new_key_len);
+
+- memcpy(new_key, prefix, prefix_len);
+- memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ memcpy(new_key, prefix, prefix_len);
++ memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ } else {
++ new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h);
++ }
+
+ zend_hash_del(&EG(symbol_table), new_key, new_key_len);
+ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0);
+--- ext/standard/string.c 2005-03-01 16:01:08.000000000 +0100
++++ ext/standard/string.c 2005-11-01 01:03:40.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: string.c,v 1.420.2.6 2005/03/01 15:01:08 hyanantha Exp $ */
++/* $Id: string.c,v 1.420.2.13 2005/09/28 22:35:43 iliaa Exp $ */
+
+ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
+
+@@ -1175,6 +1175,22 @@
+ return len;
+ }
+ }
++#elif defined(NETWARE)
++ /*
++ * Find the first occurence of : from the left
++ * move the path pointer to the position just after :
++ * increment the len_adjust to the length of path till colon character(inclusive)
++ * If there is no character beyond : simple return len
++ */
++ char *colonpos = NULL;
++ colonpos = strchr(path, ':');
++ if(colonpos != NULL) {
++ len_adjust = ((colonpos - path) + 1);
++ path += len_adjust;
++ if(len_adjust == len) {
++ return len;
++ }
++ }
+ #endif
+
+ if (len == 0) {
+@@ -1199,9 +1215,21 @@
+ }
+ if (end < path) {
+ /* No slash found, therefore return '.' */
++#ifdef NETWARE
++ if(len_adjust == 0) {
++ path[0] = '.';
++ path[1] = '\0';
++ return 1; //only one character
++ }
++ else {
++ path[0] = '\0';
++ return len_adjust;
++ }
++#else
+ path[0] = '.';
+ path[1] = '\0';
+ return 1 + len_adjust;
++#endif
+ }
+
+ /* Strip slashes which came before the file name */
+@@ -1382,8 +1410,6 @@
+ if (!Z_STRLEN_PP(needle)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter.");
+ efree(haystack_orig);
+- zval_ptr_dtor(haystack);
+- zval_ptr_dtor(needle);
+ RETURN_FALSE;
+ }
+
+@@ -1409,8 +1435,6 @@
+ RETVAL_FALSE;
+ }
+
+- zval_ptr_dtor(haystack);
+- zval_ptr_dtor(needle);
+ efree(haystack_orig);
+ }
+ /* }}} */
+@@ -1839,7 +1863,13 @@
+ }
+
+ if (chunklen > Z_STRLEN_PP(p_str)) {
+- RETURN_STRINGL(Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str), 1);
++ /* to maintain BC, we must return original string + ending */
++ result_len = endlen + Z_STRLEN_PP(p_str);
++ result = emalloc(result_len + 1);
++ memcpy(result, Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str));
++ memcpy(result + Z_STRLEN_PP(p_str), end, endlen);
++ result[result_len] = '\0';
++ RETURN_STRINGL(result, result_len, 0);
+ }
+
+ if (!Z_STRLEN_PP(p_str)) {
+@@ -2937,7 +2975,7 @@
+ char *source, *target, *tmp, *source_end=str+len, *tmp_end = NULL;
+
+ for (source = str; source < source_end; source++) {
+- if (*source == from) {
++ if ((case_sensitivity && *source == from) || (!case_sensitivity && tolower(*source) == tolower(from))) {
+ char_count++;
+ }
+ }
+@@ -3771,7 +3809,6 @@
+ zval *sarg;
+ char *res = NULL;
+ int argCount;
+- int old_rg;
+
+ argCount = ZEND_NUM_ARGS();
+ if (argCount < 1 || argCount > 2 || zend_get_parameters_ex(argCount, &arg, &arrayArg) == FAILURE) {
+@@ -3784,19 +3821,18 @@
+ res = estrndup(Z_STRVAL_P(sarg), Z_STRLEN_P(sarg));
+ }
+
+- old_rg = PG(register_globals);
+ if (argCount == 1) {
+- PG(register_globals) = 1;
+- sapi_module.treat_data(PARSE_STRING, res, NULL TSRMLS_CC);
++ zval tmp;
++ Z_ARRVAL(tmp) = EG(active_symbol_table);
++
++ sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC);
+ } else {
+- PG(register_globals) = 0;
+ /* Clear out the array that was passed in. */
+ zval_dtor(*arrayArg);
+ array_init(*arrayArg);
+
+ sapi_module.treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC);
+ }
+- PG(register_globals) = old_rg;
+ }
+ /* }}} */
+
+--- main/php_variables.c 2005-02-17 05:46:10.000000000 +0100
++++ main/php_variables.c 2005-11-01 01:07:38.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_variables.c,v 1.81.2.3 2005/02/17 04:46:10 iliaa Exp $ */
++/* $Id: php_variables.c,v 1.81.2.13 2005/09/28 22:35:42 iliaa Exp $ */
+
+ #include <stdio.h>
+ #include "php.h"
+@@ -103,6 +103,13 @@
+ zval_dtor(val);
+ return;
+ }
++
++ /* GLOBALS hijack attempt, reject parameter */
++ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) {
++ zval_dtor(val);
++ return;
++ }
++
+ /* ensure that we don't have spaces or dots in the variable name (not binary safe) */
+ for (p=var; *p; p++) {
+ switch(*p) {
+@@ -186,7 +193,19 @@
+ if (!index) {
+ zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ } else {
++ zval **tmp;
+ char *escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC);
++ /*
++ * According to rfc2965, more specific paths are listed above the less specific ones.
++ * If we encounter a duplicate cookie name, we should skip it, since it is not possible
++ * to have the same (plain text) cookie name for the same path and we should not overwrite
++ * more specific cookies with the less specific ones.
++ */
++ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) &&
++ zend_symtable_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) {
++ efree(escaped_index);
++ break;
++ }
+ zend_symtable_update(symtable1, escaped_index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ efree(escaped_index);
+ }
+@@ -250,12 +269,21 @@
+ INIT_PZVAL(array_ptr);
+ switch (arg) {
+ case PARSE_POST:
++ if (PG(http_globals)[TRACK_VARS_POST]) {
++ zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_POST]);
++ }
+ PG(http_globals)[TRACK_VARS_POST] = array_ptr;
+ break;
+ case PARSE_GET:
++ if (PG(http_globals)[TRACK_VARS_GET]) {
++ zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_GET]);
++ }
+ PG(http_globals)[TRACK_VARS_GET] = array_ptr;
+ break;
+ case PARSE_COOKIE:
++ if (PG(http_globals)[TRACK_VARS_COOKIE]) {
++ zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_COOKIE]);
++ }
+ PG(http_globals)[TRACK_VARS_COOKIE] = array_ptr;
+ break;
+ }
+@@ -500,6 +528,9 @@
+ ALLOC_ZVAL(array_ptr);
+ array_init(array_ptr);
+ INIT_PZVAL(array_ptr);
++ if (PG(http_globals)[TRACK_VARS_SERVER]) {
++ zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_SERVER]);
++ }
+ PG(http_globals)[TRACK_VARS_SERVER] = array_ptr;
+ PG(magic_quotes_gpc) = 0;
+
+@@ -675,8 +706,8 @@
+ PG(http_globals)[i] = dummy_track_vars_array;
+ }
+
+- zend_hash_update(&EG(symbol_table), auto_global_records[i].name, auto_global_records[i].name_len, &PG(http_globals)[i], sizeof(zval *), NULL);
+ PG(http_globals)[i]->refcount++;
++ zend_hash_update(&EG(symbol_table), auto_global_records[i].name, auto_global_records[i].name_len, &PG(http_globals)[i], sizeof(zval *), NULL);
+ if (PG(register_long_arrays)) {
+ zend_hash_update(&EG(symbol_table), auto_global_records[i].long_name, auto_global_records[i].long_name_len, &PG(http_globals)[i], sizeof(zval *), NULL);
+ PG(http_globals)[i]->refcount++;
+@@ -696,7 +727,18 @@
+
+ static zend_bool php_auto_globals_create_server(char *name, uint name_len TSRMLS_DC)
+ {
+- php_register_server_variables(TSRMLS_C);
++ if (PG(variables_order) && (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s'))) {
++ php_register_server_variables(TSRMLS_C);
++ } else {
++ zval *server_vars=NULL;
++ ALLOC_ZVAL(server_vars);
++ array_init(server_vars);
++ INIT_PZVAL(server_vars);
++ if (PG(http_globals)[TRACK_VARS_SERVER]) {
++ zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_SERVER]);
++ }
++ PG(http_globals)[TRACK_VARS_SERVER] = server_vars;
++ }
+
+ zend_hash_update(&EG(symbol_table), name, name_len+1, &PG(http_globals)[TRACK_VARS_SERVER], sizeof(zval *), NULL);
+ PG(http_globals)[TRACK_VARS_SERVER]->refcount++;
+@@ -716,9 +758,14 @@
+ ALLOC_ZVAL(env_vars);
+ array_init(env_vars);
+ INIT_PZVAL(env_vars);
++ if (PG(http_globals)[TRACK_VARS_ENV]) {
++ zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_ENV]);
++ }
+ PG(http_globals)[TRACK_VARS_ENV] = env_vars;
+
+- php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
++ if (PG(variables_order) && (strchr(PG(variables_order),'E') || strchr(PG(variables_order),'e'))) {
++ php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
++ }
+
+ zend_hash_update(&EG(symbol_table), name, name_len+1, &PG(http_globals)[TRACK_VARS_ENV], sizeof(zval *), NULL);
+ PG(http_globals)[TRACK_VARS_ENV]->refcount++;
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch b/dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch
new file mode 100644
index 0000000..41bfd23
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch
@@ -0,0 +1,20 @@
+--- ext/pcre/config.m4 2003/06/28 04:30:51 1.32
++++ ext/pcre/config.m4 2005/08/22 16:55:56 1.32.2.2
+@@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
+
+ if test "$PHP_PCRE_REGEX" != "no"; then
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+- PHP_NEW_EXTENSION(pcre, pcrelib/maketables.c pcrelib/get.c pcrelib/study.c pcrelib/pcre.c php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I@ext_srcdir@/pcrelib)
++ PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_dfa_exec.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_printint.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_ucp_findchar.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -I@ext_srcdir@/pcrelib)
+ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ else
+@@ -50,7 +50,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then
+
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ PHP_ADD_INCLUDE($PCRE_INCDIR)
+- PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10)
++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000)
+ fi
+ PHP_SUBST(PCRE_SHARED_LIBADD)
+ fi
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-phpinfo_xss.patch b/dev-lang/php/files/5.0.4/php5.0.4-phpinfo_xss.patch
new file mode 100644
index 0000000..e19c9fe
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-phpinfo_xss.patch
@@ -0,0 +1,79 @@
+--- ext/standard/info.c 2004-05-02 15:23:30.000000000 +0200
++++ ext/standard/info.c 2005-11-01 01:30:58.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: info.c,v 1.245 2004/05/02 13:23:30 helly Exp $ */
++/* $Id: info.c,v 1.245.2.5 2005/08/16 00:25:46 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -135,10 +135,25 @@
+ PUTS(" => ");
+ }
+ if (Z_TYPE_PP(tmp) == IS_ARRAY) {
++ zval *tmp3;
++
++ MAKE_STD_ZVAL(tmp3);
++
+ if (!sapi_module.phpinfo_as_text) {
+ PUTS("<pre>");
+ }
++ php_start_ob_buffer(NULL, 4096, 1 TSRMLS_CC);
++
+ zend_print_zval_r(*tmp, 0 TSRMLS_CC);
++
++ php_ob_get_buffer(tmp3 TSRMLS_CC);
++ php_end_ob_buffer(0, 0 TSRMLS_CC);
++
++ elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
++ zval_ptr_dtor(&tmp3);
++
+ if (!sapi_module.phpinfo_as_text) {
+ PUTS("</pre>");
+ }
+@@ -198,7 +213,7 @@
+ PHPAPI char *php_info_html_esc(char *string TSRMLS_DC)
+ {
+ int new_len;
+- return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_NOQUOTES, NULL TSRMLS_CC);
++ return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
+ }
+ /* }}} */
+
+@@ -406,7 +421,9 @@
+ if (expose_php && !sapi_module.phpinfo_as_text) {
+ PUTS("<a href=\"http://www.php.net/\"><img border=\"0\" src=\"");
+ if (SG(request_info).request_uri) {
+- PUTS(SG(request_info).request_uri);
++ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
+ }
+ PUTS("?=");
+ logo_guid = php_logo_guid();
+@@ -551,7 +574,9 @@
+ if (expose_php && !sapi_module.phpinfo_as_text) {
+ PUTS("<a href=\"http://www.zend.com/\"><img border=\"0\" src=\"");
+ if (SG(request_info).request_uri) {
+- PUTS(SG(request_info).request_uri);
++ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
+ }
+ PUTS("?="ZEND_LOGO_GUID"\" alt=\"Zend logo\" /></a>\n");
+ }
+@@ -570,7 +595,9 @@
+ php_info_print_hr();
+ PUTS("<h1><a href=\"");
+ if (SG(request_info).request_uri) {
+- PUTS(SG(request_info).request_uri);
++ char *elem_esc = php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
++ PUTS(elem_esc);
++ efree(elem_esc);
+ }
+ PUTS("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">");
+ PUTS("PHP Credits");
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch b/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch
new file mode 100644
index 0000000..5c32b14
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch
@@ -0,0 +1,320 @@
+--- ext/pspell/pspell.c 2004-05-18 14:32:05.000000000 +0200
++++ ext/pspell/pspell.c 2005-10-26 23:30:48.000000000 +0200
+@@ -2,7 +2,7 @@
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+- | Copyright (c) 1997-2004 The PHP Group |
++ | Copyright (c) 1997-2005 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: pspell.c,v 1.44 2004/05/18 12:32:05 edink Exp $ */
++/* $Id: pspell.c,v 1.47 2005/10/17 15:29:55 iliaa Exp $ */
+
+ #define IS_EXT_MODULE
+
+@@ -101,6 +101,22 @@
+ delete_pspell_config(config);
+ }
+
++#define PSPELL_FETCH_CONFIG \
++ convert_to_long_ex(conf); \
++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \
++ if (config == NULL || type != le_pspell_config) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \
++ RETURN_FALSE; \
++ } \
++
++#define PSPELL_FETCH_MANAGER \
++ convert_to_long_ex(scin); \
++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \
++ if (!manager || type != le_pspell) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \
++ RETURN_FALSE; \
++ } \
++
+ /* {{{ PHP_MINIT_FUNCTION
+ */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -352,13 +368,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(conf);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
+-
+- if (config == NULL || type != le_pspell_config) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ ret = new_pspell_manager(config);
+
+@@ -387,13 +397,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+ RETURN_TRUE;
+@@ -419,13 +425,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ array_init(return_value);
+
+@@ -457,14 +458,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(miss);
+ convert_to_string_ex(corr);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+ if(pspell_manager_error_number(manager) == 0){
+@@ -490,13 +486,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -527,13 +518,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -564,12 +550,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_clear_session(manager);
+ if(pspell_manager_error_number(manager) == 0){
+@@ -595,12 +576,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_save_all_word_lists(manager);
+
+@@ -694,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+ int type;
+- zval **sccin, **runtogether;
++ zval **conf, **runtogether;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(runtogether);
+ pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -723,22 +694,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+ int type;
+- zval **sccin, **mode;
++ zval **conf, **mode;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(mode);
+
+@@ -760,7 +726,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+ int type;
+- zval **sccin, **pignore;
++ zval **conf, **pignore;
+ int argc;
+
+ int loc = PSPELL_LARGEST_WORD;
+@@ -770,16 +736,11 @@
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(pignore);
+ ignore = Z_LVAL_PP(pignore);
+@@ -808,21 +769,16 @@
+ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
+ {
+ int type;
+- zval **sccin, **value;
++ zval **conf, **value;
+ int argc;
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc, &sccin, &value) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc, &conf, &value) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if (!config) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_string_ex(value);
+
+@@ -868,22 +824,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+ int type;
+- zval **sccin, **repl;
++ zval **conf, **repl;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ pspell_config_replace(config, "save-repl", "true");
+
+@@ -908,22 +859,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+ int type;
+- zval **sccin, **save;
++ zval **conf, **save;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(save);
+ pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch b/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch
new file mode 100644
index 0000000..f984d73
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch
@@ -0,0 +1,164 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:23:57.000000000 +0100
++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:09:39.000000000 +0200
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.40.2.7 2005/03/10 11:23:57 jorton Exp $ */
++/* $Id: sapi_apache2.c,v 1.40.2.13 2005/10/17 19:35:39 rasmus Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -111,10 +111,8 @@
+ } else {
+ apr_table_add(ctx->r->headers_out, sapi_header->header, val);
+ }
+-
+- sapi_free_header(sapi_header);
+
+- return 0;
++ return SAPI_HEADER_ADD;
+ }
+
+ static int
+@@ -264,22 +262,17 @@
+
+ ctx = SG(server_context);
+
+- /* We use APLOG_STARTUP because it keeps us from printing the
+- * data and time information at the beginning of the error log
+- * line. Not sure if this is correct, but it mirrors what happens
+- * with Apache 1.3 -- rbb
+- */
+ if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
+ ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
+ } else {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg);
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg);
+ }
+ }
+
+ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
+ {
+ if (r) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename);
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
+ } else {
+ php_apache_sapi_log_message(msg);
+ }
+@@ -453,15 +446,35 @@
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF \
++ if (strcmp(r->protocol, "INCLUDED")) { \
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++ } \
++
+ conf = ap_get_module_config(r->per_dir_config, &php5_module);
++
++ /* apply_config() needs r in some cases, so allocate server_context early */
++ ctx = SG(server_context);
++ if (ctx == NULL) {
++normal:
++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++ /* register a cleanup so we clear out the SG(server_context)
++ * after each request. Note: We pass in the pointer to the
++ * server_context in case this is handled by a different thread.
++ */
++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++ ctx->r = r;
++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++ } else {
++ parent_req = ctx->r;
++ ctx->r = r;
++ }
+ apply_config(conf);
+
+ if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+ /* Check for xbithack in this case. */
+ if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+ }
+@@ -470,32 +483,24 @@
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+
+ /* handle situations where user turns the engine off */
+ if (!AP2(engine)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_FORBIDDEN;
+ }
+
+@@ -511,24 +516,29 @@
+
+ zend_first_try {
+
+- ctx = SG(server_context);
+ if (ctx == NULL) {
+- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+- /* register a cleanup so we clear out the SG(server_context)
+- * after each request. Note: We pass in the pointer to the
+- * server_context in case this is handled by a different thread.
+- */
+- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+- ctx->r = r;
+ brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++ ctx = SG(server_context);
+ ctx->brigade = brigade;
+
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
+ } else {
+- parent_req = ctx->r;
++ if (!parent_req) {
++ parent_req = ctx->r;
++ }
++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++ zend_bailout();
++ }
++ }
++
++ /* check if comming due to ErrorDocument */
++ if (parent_req && parent_req->status != HTTP_OK) {
++ parent_req = NULL;
++ goto normal;
++ }
+ ctx->r = r;
+ brigade = ctx->brigade;
+ }
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff b/dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff
new file mode 100644
index 0000000..15e5950
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff
@@ -0,0 +1,23 @@
+--- ext/xmlrpc/libxmlrpc/xml_element.c 2004-06-01 22:16:06.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/xml_element.c 2005-04-22 13:54:17.000000000 +0200
+@@ -113,7 +116,7 @@
+ #include "expat.h"
+ #include "encodings.h"
+
+-#define my_free(thing) if(thing) {free(thing); thing = 0;}
++#define my_free(thing) if(thing) {free(thing); thing = NULL;}
+
+ #define XML_DECL_START "<?xml"
+ #define XML_DECL_START_LEN sizeof(XML_DECL_START) - 1
+@@ -189,7 +192,10 @@
+
+ Q_Destroy(&root->children);
+ Q_Destroy(&root->attrs);
+- my_free((char*)root->name);
++ if(root->name) {
++ free((char *)root->name);
++ root->name = NULL;
++ }
+ simplestring_free(&root->text);
+ my_free(root);
+ }
diff --git a/dev-lang/php/files/5.0.5/CVS/Entries b/dev-lang/php/files/5.0.5/CVS/Entries
new file mode 100644
index 0000000..fcb858a
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/CVS/Entries
@@ -0,0 +1,14 @@
+/php5.0.5-apache2sapi.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+/php5.0.5-curl-open_basedir.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+/php5.0.5-curl_safemode.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php5.0.5-fopen_wrappers.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.5-gd-safe_mode.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+/php5.0.5-gd_safe_mode.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.5-globals_overwrite.patch/1.1/Thu Nov 3 14:09:24 2005/-ko/T1.1
+/php5.0.5-mbstring-header_inj.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+/php5.0.5-multilib-search-path.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+/php5.0.5-obj-serialize.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.5-pspell-ext-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.5-session_save_path-segf.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5.0.5-tsrm-gcc4.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.0.5/CVS/Repository b/dev-lang/php/files/5.0.5/CVS/Repository
new file mode 100644
index 0000000..5ae0be2
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.0.5
diff --git a/dev-lang/php/files/5.0.5/CVS/Root b/dev-lang/php/files/5.0.5/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.0.5/CVS/Tag b/dev-lang/php/files/5.0.5/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch b/dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch
new file mode 100644
index 0000000..2fa5fb3
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-apache2sapi.patch
@@ -0,0 +1,139 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-09-02 15:51:26.000000000 +0200
++++ sapi/apache2handler/sapi_apache2.c 2005-12-08 18:43:54.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.40.2.11 2005/09/02 13:51:26 sniper Exp $ */
++/* $Id: sapi_apache2.c,v 1.40.2.15 2005/11/29 13:30:11 dmitry Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -436,6 +436,18 @@
+ php_request_shutdown(NULL);
+ }
+
++static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
++{
++ if (strcmp(r->protocol, "INCLUDED")) {
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
++ }
++ if (p) {
++ ((php_struct *)SG(server_context))->r = p;
++ } else {
++ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup);
++ }
++}
++
+ static int php_handler(request_rec *r)
+ {
+ php_struct *ctx;
+@@ -446,15 +458,32 @@
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
++
+ conf = ap_get_module_config(r->per_dir_config, &php5_module);
++
++ /* apply_config() needs r in some cases, so allocate server_context early */
++ ctx = SG(server_context);
++ if (ctx == NULL) {
++normal:
++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++ /* register a cleanup so we clear out the SG(server_context)
++ * after each request. Note: We pass in the pointer to the
++ * server_context in case this is handled by a different thread.
++ */
++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++ ctx->r = r;
++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++ } else {
++ parent_req = ctx->r;
++ ctx->r = r;
++ }
+ apply_config(conf);
+
+ if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+ /* Check for xbithack in this case. */
+ if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+ }
+@@ -463,32 +492,24 @@
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+
+ /* handle situations where user turns the engine off */
+ if (!AP2(engine)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_FORBIDDEN;
+ }
+
+@@ -504,25 +525,24 @@
+
+ zend_first_try {
+
+- ctx = SG(server_context);
+ if (ctx == NULL) {
+-normal:
+- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+- /* register a cleanup so we clear out the SG(server_context)
+- * after each request. Note: We pass in the pointer to the
+- * server_context in case this is handled by a different thread.
+- */
+- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+- ctx->r = r;
+ brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++ ctx = SG(server_context);
+ ctx->brigade = brigade;
+
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
+ } else {
+- parent_req = ctx->r;
++ if (!parent_req) {
++ parent_req = ctx->r;
++ }
++ if (parent_req && parent_req->handler && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++ zend_bailout();
++ }
++ }
++
+ /* check if comming due to ErrorDocument */
+ if (parent_req && parent_req->status != HTTP_OK) {
+ parent_req = NULL;
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch b/dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch
new file mode 100644
index 0000000..4f16430
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-curl-open_basedir.patch
@@ -0,0 +1,48 @@
+--- ext/curl/interface.c 2005/06/02 21:04:43 1.46.2.8
++++ ext/curl/interface.c 2005/11/29 11:03:29 1.46.2.13
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: interface.c,v 1.46.2.8 2005/06/02 21:04:43 tony2001 Exp $ */
++/* $Id: interface.c,v 1.46.2.13 2005/11/29 11:03:29 dmitry Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -62,8 +62,8 @@ static void _php_curl_close(zend_rsrc_li
+ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+- if (PG(open_basedir) && *PG(open_basedir) && \
+- strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
++ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
++ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+ \
+@@ -72,7 +72,7 @@ static void _php_curl_close(zend_rsrc_li
+ RETURN_FALSE; \
+ } \
+ \
+- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
+@@ -1128,10 +1128,15 @@ PHP_FUNCTION(curl_setopt)
+ * must be explicitly cast to long in curl_formadd
+ * use since curl needs a long not an int. */
+ if (*postval == '@') {
++ ++postval;
++ /* safe_mode / open_basedir check */
++ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
++ RETURN_FALSE;
++ }
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,
+- CURLFORM_FILE, ++postval,
++ CURLFORM_FILE, postval,
+ CURLFORM_END);
+ } else {
+ error = curl_formadd(&first, &last,
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-curl_safemode.patch b/dev-lang/php/files/5.0.5/php5.0.5-curl_safemode.patch
new file mode 100644
index 0000000..91424e4
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-curl_safemode.patch
@@ -0,0 +1,46 @@
+--- ext/curl/interface.c 2005-06-02 23:04:43.000000000 +0200
++++ ext/curl/interface.c.new 2005-10-31 23:18:13.000000000 +0100
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: interface.c,v 1.46.2.8 2005/06/02 21:04:43 tony2001 Exp $ */
++/* $Id: interface.c,v 1.46.2.11 2005/10/17 02:42:32 iliaa Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -62,7 +62,7 @@
+ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+
+ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
+- if (PG(open_basedir) && *PG(open_basedir) && \
++ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
+ strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
+ { \
+ php_url *tmp_url; \
+@@ -72,7 +72,7 @@
+ RETURN_FALSE; \
+ } \
+ \
+- if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
++ if (tmp_url->query || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
+ ) { \
+ php_url_free(tmp_url); \
+@@ -1128,10 +1128,15 @@
+ * must be explicitly cast to long in curl_formadd
+ * use since curl needs a long not an int. */
+ if (*postval == '@') {
++ ++postval;
++ /* safe_mode / open_basedir check */
++ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
++ RETURN_FALSE;
++ }
+ error = curl_formadd(&first, &last,
+ CURLFORM_COPYNAME, string_key,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,
+- CURLFORM_FILE, ++postval,
++ CURLFORM_FILE, postval,
+ CURLFORM_END);
+ } else {
+ error = curl_formadd(&first, &last,
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch b/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch
new file mode 100644
index 0000000..b945c11
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch
@@ -0,0 +1,22 @@
+--- main/fopen_wrappers.c 2005/07/16 12:14:44 1.170.2.4
++++ main/fopen_wrappers.c 2005/09/27 15:08:11 1.170.2.5
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: fopen_wrappers.c,v 1.170.2.4 2005/07/16 12:14:44 hyanantha Exp $ */
++/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */
+
+ /* {{{ includes
+ */
+@@ -109,8 +109,8 @@ PHPAPI int php_check_specific_open_based
+ /* Handler for basedirs that end with a / */
+ resolved_basedir_len = strlen(resolved_basedir);
+ if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+- if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+ resolved_basedir[++resolved_basedir_len] = '\0';
+ }
+ }
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch b/dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch
new file mode 100644
index 0000000..8b09432
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-gd-safe_mode.patch
@@ -0,0 +1,95 @@
+--- ext/gd/gd.c 2005-12-08 15:44:36.000000000 +0100
++++ ext/gd/gd.c 2005-12-08 17:21:55.000000000 +0100
+@@ -705,7 +705,7 @@
+
+ convert_to_string_ex(file);
+
+- stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
++ stream = php_stream_open_wrapper(Z_STRVAL_PP(file), "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
+@@ -889,6 +889,10 @@
+ convert_to_boolean_ex(dither);
+ convert_to_long_ex(ncolors);
+
++ if (Z_LVAL_PP(ncolors) <= 0) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero");
++ RETURN_FALSE;
++ }
+ gdImageTrueColorToPalette(im, Z_LVAL_PP(dither), Z_LVAL_PP(ncolors));
+
+ RETURN_TRUE;
+@@ -1518,7 +1522,7 @@
+
+ fn = Z_STRVAL_PP(file);
+
+- stream = php_stream_open_wrapper(fn, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
++ stream = php_stream_open_wrapper(fn, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
+@@ -1726,10 +1730,7 @@
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
+
+ fp = VCWD_FOPEN(fn, "wb");
+ if (!fp) {
+@@ -3824,16 +3825,10 @@
+ }
+
+ /* Check origin file */
+- if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn_org, "Invalid origin filename");
+
+ /* Check destination file */
+- if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest);
+- RETURN_FALSE;
+- }
++ PHP_GD_CHECK_OPEN_BASEDIR(fn_dest, "Invalid destination filename");
+
+ /* Open origin file */
+ org = VCWD_FOPEN(fn_org, "rb");
+--- ext/gd/gd_ctx.c 2005-12-08 15:44:42.000000000 +0100
++++ ext/gd/gd_ctx.c 2005-12-08 17:25:24.000000000 +0100
+@@ -82,10 +82,8 @@
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+- RETURN_FALSE;
+- }
++
++ PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
+
+ fp = VCWD_FOPEN(fn, "wb");
+ if (!fp) {
+--- ext/gd/php_gd.h 2005-12-08 15:44:49.000000000 +0100
++++ ext/gd/php_gd.h 2005-12-08 17:29:53.000000000 +0100
+@@ -30,6 +30,15 @@
+
+ #if HAVE_LIBGD
+
++/* open_basedir and safe_mode checks */
++#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
++ if (!filename || php_check_open_basedir(filename TSRMLS_CC) || \
++ (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \
++ ) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
++ RETURN_FALSE; \
++ }
++
+ #define PHP_GDIMG_TYPE_GIF 1
+ #define PHP_GDIMG_TYPE_PNG 2
+ #define PHP_GDIMG_TYPE_JPG 3
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch b/dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch
new file mode 100644
index 0000000..05bb354
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch
@@ -0,0 +1,20 @@
+--- ext/gd/gd.c 2005/05/06 16:49:04 1.294.2.12
++++ ext/gd/gd.c 2005/10/06 20:42:56 1.294.2.13
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: gd.c,v 1.294.2.12 2005/05/06 16:49:04 tony2001 Exp $ */
++/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+ Cold Spring Harbor Labs. */
+@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+ RETURN_FALSE;
+ }
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch b/dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch
new file mode 100644
index 0000000..cdae541
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-globals_overwrite.patch
@@ -0,0 +1,203 @@
+--- ext/standard/array.c 2005-09-01 14:01:01.000000000 +0200
++++ ext/standard/array.c 2005-11-01 01:15:13.000000000 +0100
+@@ -21,7 +21,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: array.c,v 1.266.2.25 2005/09/01 12:01:01 dmitry Exp $ */
++/* $Id: array.c,v 1.266.2.29 2005/10/28 09:57:15 dmitry Exp $ */
+
+ #include "php.h"
+ #include "php_ini.h"
+@@ -1050,6 +1050,7 @@
+ if (recursive && Z_TYPE_PP(args[0]) == IS_ARRAY) {
+ HashTable *thash;
+
++ SEPARATE_ZVAL_TO_MAKE_IS_REF(args[0]);
+ thash = HASH_OF(*(args[0]));
+ if (thash == target_hash) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
+@@ -1373,6 +1374,10 @@
+ /* break omitted intentionally */
+
+ case EXTR_OVERWRITE:
++ /* GLOBALS protection */
++ if (var_exists && !strcmp(var_name, "GLOBALS")) {
++ break;
++ }
+ smart_str_appendl(&final_name, var_name, var_name_len);
+ break;
+
+@@ -2487,8 +2492,9 @@
+ Z_LVAL_PP(tmp)++;
+ }
+ } else if (Z_TYPE_PP(entry) == IS_STRING) {
+- /* make sure our array does not end up with numeric string keys */
+- if (is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) {
++ /* make sure our array does not end up with numeric string keys
++ * but don't touch those strings that start with 0 */
++ if (!(Z_STRLEN_PP(entry) > 1 && Z_STRVAL_PP(entry)[0] == '0') && is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) {
+ zval tmp_entry;
+
+ tmp_entry = **entry;
+@@ -3975,7 +3981,7 @@
+ PHP_FUNCTION(array_filter)
+ {
+ zval **input, **callback = NULL;
+- zval *array;
++ zval *array, *func = NULL;
+ zval **operand;
+ zval **args[1];
+ zval *retval = NULL;
+@@ -3995,10 +4001,13 @@
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array");
+ return;
+ }
++ if (callback) {
++ func = *callback;
++ }
+ array = *input;
+
+ if (ZEND_NUM_ARGS() > 1) {
+- if (!zend_is_callable(*callback, 0, &callback_name)) {
++ if (!zend_is_callable(func, 0, &callback_name)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument, '%s', should be a valid callback", callback_name);
+ efree(callback_name);
+ return;
+@@ -4015,14 +4024,14 @@
+ zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **)&operand, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) {
+
+- if (callback) {
++ if (func) {
+ zend_fcall_info fci;
+
+ args[0] = operand;
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+- fci.function_name = *callback;
++ fci.function_name = func;
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval;
+--- ext/standard/basic_functions.c 2005-08-21 20:36:33.000000000 +0200
++++ ext/standard/basic_functions.c 2005-11-01 01:15:20.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: basic_functions.c,v 1.673.2.18 2005/08/21 18:36:33 zeev Exp $ */
++/* $Id: basic_functions.c,v 1.673.2.21 2005/09/29 16:31:20 iliaa Exp $ */
+
+ #include "php.h"
+ #include "php_streams.h"
+@@ -742,8 +743,8 @@
+ PHP_FE(prev, first_arg_force_ref)
+ PHP_FE(next, first_arg_force_ref)
+ PHP_FE(reset, first_arg_force_ref)
+- PHP_FE(current, first_arg_force_ref)
+- PHP_FE(key, first_arg_force_ref)
++ PHP_FE(current, NULL)
++ PHP_FE(key, NULL)
+ PHP_FE(min, NULL)
+ PHP_FE(max, NULL)
+ PHP_FE(in_array, NULL)
+@@ -3076,11 +3077,25 @@
+ prefix = va_arg(args, char *);
+ prefix_len = va_arg(args, uint);
+
+- new_key_len = prefix_len + hash_key->nKeyLength;
+- new_key = (char *) emalloc(new_key_len);
++ if (!prefix_len) {
++ if (!hash_key->nKeyLength) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard.");
++ return 0;
++ } else if (!strcmp(hash_key->arKey, "GLOBALS")) {
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite.");
++ return 0;
++ }
++ }
++
++ if (hash_key->nKeyLength) {
++ new_key_len = prefix_len + hash_key->nKeyLength;
++ new_key = (char *) emalloc(new_key_len);
+
+- memcpy(new_key, prefix, prefix_len);
+- memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ memcpy(new_key, prefix, prefix_len);
++ memcpy(new_key+prefix_len, hash_key->arKey, hash_key->nKeyLength);
++ } else {
++ new_key_len = spprintf(&new_key, 0, "%s%ld", prefix, hash_key->h);
++ }
+
+ zend_hash_del(&EG(symbol_table), new_key, new_key_len);
+ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), new_key, new_key_len, *var, (*var)->refcount+1, 0);
+--- ext/standard/string.c 2005-07-16 13:18:35.000000000 +0200
++++ ext/standard/string.c 2005-11-01 01:15:27.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: string.c,v 1.420.2.12 2005/07/16 11:18:35 hyanantha Exp $ */
++/* $Id: string.c,v 1.420.2.13 2005/09/28 22:35:43 iliaa Exp $ */
+
+ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
+
+@@ -3809,7 +3809,6 @@
+ zval *sarg;
+ char *res = NULL;
+ int argCount;
+- int old_rg;
+
+ argCount = ZEND_NUM_ARGS();
+ if (argCount < 1 || argCount > 2 || zend_get_parameters_ex(argCount, &arg, &arrayArg) == FAILURE) {
+@@ -3822,19 +3821,18 @@
+ res = estrndup(Z_STRVAL_P(sarg), Z_STRLEN_P(sarg));
+ }
+
+- old_rg = PG(register_globals);
+ if (argCount == 1) {
+- PG(register_globals) = 1;
+- sapi_module.treat_data(PARSE_STRING, res, NULL TSRMLS_CC);
++ zval tmp;
++ Z_ARRVAL(tmp) = EG(active_symbol_table);
++
++ sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC);
+ } else {
+- PG(register_globals) = 0;
+ /* Clear out the array that was passed in. */
+ zval_dtor(*arrayArg);
+ array_init(*arrayArg);
+
+ sapi_module.treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC);
+ }
+- PG(register_globals) = old_rg;
+ }
+ /* }}} */
+
+--- main/php_variables.c 2005-09-01 21:15:51.000000000 +0200
++++ main/php_variables.c 2005-11-01 01:16:22.000000000 +0100
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: php_variables.c,v 1.81.2.12 2005/09/01 19:15:51 iliaa Exp $ */
++/* $Id: php_variables.c,v 1.81.2.13 2005/09/28 22:35:42 iliaa Exp $ */
+
+ #include <stdio.h>
+ #include "php.h"
+@@ -103,6 +103,13 @@
+ zval_dtor(val);
+ return;
+ }
++
++ /* GLOBALS hijack attempt, reject parameter */
++ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) {
++ zval_dtor(val);
++ return;
++ }
++
+ /* ensure that we don't have spaces or dots in the variable name (not binary safe) */
+ for (p=var; *p; p++) {
+ switch(*p) {
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch b/dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch
new file mode 100644
index 0000000..93701e9
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-mbstring-header_inj.patch
@@ -0,0 +1,133 @@
+--- ext/mbstring/mbstring.c 2005/02/21 15:15:08 1.214.2.4
++++ ext/mbstring/mbstring.c 2005/11/25 22:18:45 1.214.2.7
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: mbstring.c,v 1.214.2.4 2005/02/21 15:15:08 moriyoshi Exp $ */
++/* $Id: mbstring.c,v 1.214.2.7 2005/11/25 22:18:45 hirokawa Exp $ */
+
+ /*
+ * PHP 4 Multibyte String module "mbstring"
+@@ -2267,7 +2267,7 @@ PHP_FUNCTION(mb_list_encodings)
+ }
+ /* }}} */
+
+-/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]])
++/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])
+ Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */
+ PHP_FUNCTION(mb_encode_mimeheader)
+ {
+@@ -2279,12 +2279,13 @@ PHP_FUNCTION(mb_encode_mimeheader)
+ int trans_enc_name_len;
+ char *linefeed = "\r\n";
+ int linefeed_len;
++ int indent = 0;
+
+ mbfl_string_init(&string);
+ string.no_language = MBSTRG(current_language);
+ string.no_encoding = MBSTRG(current_internal_encoding);
+
+- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sss", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len) == FAILURE) {
++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) {
+ return;
+ }
+
+@@ -2314,7 +2315,7 @@ PHP_FUNCTION(mb_encode_mimeheader)
+ }
+
+ mbfl_string_init(&result);
+- ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, 0);
++ ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent);
+ if (ret != NULL) {
+ RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */
+ } else {
+@@ -2770,6 +2771,15 @@ PHP_FUNCTION(mb_decode_numericentity)
+ */
+ #if HAVE_SENDMAIL
+
++#define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \
++ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \
++ pos += 3; \
++ while (str[pos] == ' ' || str[pos] == '\t') { \
++ pos++; \
++ } \
++ continue; \
++ }
++
+ #define APPEND_ONE_CHAR(ch) do { \
+ if (token.a > 0) { \
+ smart_str_appendc(&token, ch); \
+@@ -2981,6 +2991,9 @@ PHP_FUNCTION(mb_send_mail)
+ int subject_len;
+ char *extra_cmd=NULL;
+ int extra_cmd_len;
++ int i;
++ char *to_r;
++ char *force_extra_parameters = INI_STR("mail.force_extra_parameters");
+ struct {
+ int cnt_type:1;
+ int cnt_trans_enc:1;
+@@ -3086,7 +3099,30 @@ PHP_FUNCTION(mb_send_mail)
+ }
+
+ /* To: */
+- if (to == NULL || to_len <= 0) {
++ if (to != NULL) {
++ if (to_len > 0) {
++ to_r = estrndup(to, to_len);
++ for (; to_len; to_len--) {
++ if (!isspace((unsigned char) to_r[to_len - 1])) {
++ break;
++ }
++ to_r[to_len - 1] = '\0';
++ }
++ for (i = 0; to_r[i]; i++) {
++ if (iscntrl((unsigned char) to_r[i])) {
++ /* According to RFC 822, section 3.1.1 long headers may be separated into
++ * parts using CRLF followed at least one linear-white-space character ('\t' or ' ').
++ * To prevent these separators from being replaced with a space, we use the
++ * SKIP_LONG_HEADER_SEP_MBSTRING to skip over them.
++ */
++ SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i);
++ to_r[i] = ' ';
++ }
++ }
++ } else {
++ to_r = to;
++ }
++ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field");
+ err = 1;
+ }
+@@ -3182,12 +3218,20 @@ PHP_FUNCTION(mb_send_mail)
+ mbfl_memory_device_output('\0', &device);
+ headers = (char *)device.buffer;
+
+- if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) {
++ if (force_extra_parameters) {
++ extra_cmd = estrdup(force_extra_parameters);
++ } else if (extra_cmd) {
++ extra_cmd = php_escape_shell_cmd(extra_cmd);
++ }
++
++ if (!err && php_mail(to_r, subject, message, headers, extra_cmd TSRMLS_CC)) {
+ RETVAL_TRUE;
+ } else {
+ RETVAL_FALSE;
+ }
+-
++ if (to_r != to) {
++ efree(to_r);
++ }
+ if (subject_buf) {
+ efree((void *)subject_buf);
+ }
+@@ -3198,6 +3242,7 @@ PHP_FUNCTION(mb_send_mail)
+ zend_hash_destroy(&ht_headers);
+ }
+
++#undef SKIP_LONG_HEADER_SEP_MBSTRING
+ #undef APPEND_ONE_CHAR
+ #undef SEPARATE_SMART_STR
+ #undef PHP_MBSTR_MAIL_MIME_HEADER1
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch b/dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch
new file mode 100644
index 0000000..6580e1b
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-multilib-search-path.patch
@@ -0,0 +1,1372 @@
+diff -Nru php-5.0.5.orig/acinclude.m4 php-5.0.5/acinclude.m4
+--- php-5.0.5.orig/acinclude.m4 2005-07-26 00:31:07.000000000 +0200
++++ php-5.0.5/acinclude.m4 2005-12-04 16:12:45.000000000 +0100
+@@ -190,7 +190,7 @@
+ unset ac_new_flags
+ for i in [$]$1; do
+ case [$]i in
+- -L/usr/lib|-L/usr/lib/[)] ;;
++ -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/[)] ;;
+ *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
+ esac
+ done
+@@ -641,7 +641,7 @@
+ ])
+
+ AC_DEFUN([PHP_PROG_SENDMAIL],[
+-PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
++PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64
+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
+ if test -n "$PROG_SENDMAIL"; then
+ AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
+@@ -852,7 +852,9 @@
+ dnl add a library to linkpath/runpath
+ dnl
+ AC_DEFUN([PHP_ADD_LIBPATH],[
+- if test "$1" != "/usr/lib"; then
++ case x$1 in
++ x/usr/lib|x/usr/lib64) ;;
++ *)
+ PHP_EXPAND_PATH($1, ai_p)
+ ifelse([$2],,[
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+@@ -862,8 +864,8 @@
+ else
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+ fi
+- ])
+- fi
++ ]) ;;
++ esac
+ ])
+
+ dnl
+@@ -1669,15 +1671,20 @@
+ fi
+
+ for i in $PHP_KERBEROS; do
+- if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
++ if test -f $i/lib/libkrb5.a -o -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
+ PHP_KERBEROS_DIR=$i
++ PHP_KERBEROS_LIBDIR=$i/lib
++ break
++ elif test -f $i/lib64/libkrb5.a -o -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then
++ PHP_KERBEROS_DIR=$i
++ PHP_KERBEROS_LIBDIR=$i/lib64
+ break
+ fi
+ done
+
+ if test "$PHP_KERBEROS_DIR"; then
+ found_kerberos=yes
+- PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1)
++ PHP_ADD_LIBPATH($PHP_KERBEROS_LIBDIR, $1)
+ PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
+ PHP_ADD_LIBRARY(krb5, 1, $1)
+ PHP_ADD_LIBRARY(k5crypto, 1, $1)
+@@ -1749,6 +1756,9 @@
+ if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
+ OPENSSL_LIBDIR=$i/lib
+ fi
++ if test -r $i/lib64/libssl.a -o -r $i/lib64/libssl.$SHLIB_SUFFIX_NAME; then
++ OPENSSL_LIBDIR=$i/lib64
++ fi
+ test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
+ done
+
+@@ -1869,7 +1879,9 @@
+ fi
+
+ if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a ||
+- test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
++ test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME ||
++ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.a ||
++ test -f $ICONV_DIR/lib64/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
+ then
+ PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
+ found_iconv=yes
+diff -Nru php-5.0.5.orig/ext/bz2/config.m4 php-5.0.5/ext/bz2/config.m4
+--- php-5.0.5.orig/ext/bz2/config.m4 2004-01-21 06:04:30.000000000 +0100
++++ php-5.0.5/ext/bz2/config.m4 2005-12-04 16:41:58.000000000 +0100
+@@ -19,6 +19,12 @@
+ done
+ fi
+
++ for j in lib64 lib; do
++ if test -d $BZIP_DIR/$j; then
++ BZIP_LIBDIR=$BZIP_DIR/$j
++ fi
++ done
++
+ if test -z "$BZIP_DIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the BZip2 distribution)
+@@ -27,12 +33,12 @@
+ PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
+ [
+ PHP_ADD_INCLUDE($BZIP_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_LIBDIR, BZ2_SHARED_LIBADD)
+ AC_DEFINE(HAVE_BZ2,1,[ ])
+ ], [
+ AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)
+ ], [
+- -L$BZIP_DIR/lib
++ -L$BZIP_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared)
+diff -Nru php-5.0.5.orig/ext/curl/config.m4 php-5.0.5/ext/curl/config.m4
+--- php-5.0.5.orig/ext/curl/config.m4 2005-02-09 17:23:31.000000000 +0100
++++ php-5.0.5/ext/curl/config.m4 2005-12-04 16:43:25.000000000 +0100
+@@ -49,9 +49,15 @@
+ AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $CURL_DIR/$j; then
++ CURL_LIBDIR=$CURL_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($CURL_DIR/include)
+ PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_LIBDIR, CURL_SHARED_LIBADD)
+
+ PHP_CHECK_LIBRARY(curl,curl_easy_perform,
+ [
+@@ -59,14 +65,14 @@
+ ],[
+ AC_MSG_ERROR(There is something wrong. Please check config.log for more information.)
+ ],[
+- $CURL_LIBS -L$CURL_DIR/lib
++ $CURL_LIBS -L$CURL_LIBDIR
+ ])
+
+ PHP_CHECK_LIBRARY(curl,curl_version_info,
+ [
+ AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ])
+ ],[],[
+- $CURL_LIBS -L$CURL_DIR/lib
++ $CURL_LIBS -L$CURL_LIBDIR
+ ])
+
+ if test "$PHP_CURLWRAPPERS" != "no" ; then
+diff -Nru php-5.0.5.orig/ext/dba/config.m4 php-5.0.5/ext/dba/config.m4
+--- php-5.0.5.orig/ext/dba/config.m4 2005-08-22 21:59:36.000000000 +0200
++++ php-5.0.5/ext/dba/config.m4 2005-12-04 16:58:22.000000000 +0100
+@@ -80,13 +80,19 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in qdbm; do
+ PHP_CHECK_LIBRARY($LIB, dpopen, [
+ AC_DEFINE_UNQUOTED(QDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_QDBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -115,12 +121,18 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
+ AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_GDBM, 1, [ ])
+ THIS_LIBS=gdbm
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ fi
+
+ PHP_DBA_STD_ASSIGN
+@@ -145,14 +157,20 @@
+ break
+ fi
+ done
+-
++
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in ndbm db1 c; do
+ PHP_CHECK_LIBRARY($LIB, dbm_open, [
+ AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_NDBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -170,25 +188,28 @@
+ dnl parameters(version, library list, function)
+ AC_DEFUN([PHP_DBA_DB_CHECK],[
+ for LIB in $2; do
+- if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
+- PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[
+- AC_TRY_LINK([
++ for LIBDIR in lib64 lib; do
++ if test -f $THIS_PREFIX/$LIBDIR/lib$LIB.a -o -f $THIS_PREFIX/$LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
++ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$LIBDIR, -l$LIB,[
++ AC_TRY_LINK([
+ #include "$THIS_INCLUDE"
+- ],[
+- $3;
+- ],[
+- AC_EGREP_CPP(yes,[
++ ],[
++ $3;
++ ],[
++ AC_EGREP_CPP(yes,[
+ #include "$THIS_INCLUDE"
+ #if DB_VERSION_MAJOR == $1
+- yes
++ yes
+ #endif
+- ],[
+- THIS_LIBS=$LIB
+- break
++ ],[
++ THIS_LIBS=$LIB
++ break
++ ])
+ ])
+ ])
+- ])
+- fi
++ fi
++ done
++ test -n "$THIS_LIBS" && break
+ done
+ if test -z "$THIS_LIBS"; then
+ AC_MSG_CHECKING(for db$1 major version)
+@@ -352,6 +373,12 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in dbm c gdbm; do
+ PHP_CHECK_LIBRARY($LIB, dbminit, [
+@@ -366,7 +393,7 @@
+ fi
+ AC_DEFINE(DBA_DBM, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+@@ -402,13 +429,19 @@
+ fi
+ done
+
++ for j in lib64 lib; do
++ if test -d $THIS_PREFIX/$j; then
++ THIS_PREFIX_LIBDIR=$THIS_PREFIX/$j
++ fi
++ done
++
+ if test -n "$THIS_INCLUDE"; then
+ for LIB in cdb c; do
+ PHP_CHECK_LIBRARY($LIB, cdb_read, [
+ AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
+ AC_DEFINE(DBA_CDB, 1, [ ])
+ THIS_LIBS=$LIB
+- ], [], [-L$THIS_PREFIX/lib])
++ ], [], [-L$THIS_PREFIX_LIBDIR])
+ if test -n "$THIS_LIBS"; then
+ break
+ fi
+diff -Nru php-5.0.5.orig/ext/gd/config.m4 php-5.0.5/ext/gd/config.m4
+--- php-5.0.5.orig/ext/gd/config.m4 2005-05-17 14:23:02.000000000 +0200
++++ php-5.0.5/ext/gd/config.m4 2005-12-04 17:20:08.000000000 +0100
+@@ -50,8 +50,15 @@
+ AC_DEFUN([PHP_GD_JPEG],[
+ if test "$PHP_JPEG_DIR" != "no"; then
+
+- for i in $PHP_JPEG_DIR /usr/local /usr; do
+- test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_JPEG_DIR /usr/local /usr; do
++ if test -f "$i/$j/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libjpeg.a"; then
++ GD_JPEG_DIR=$i
++ GD_JPEG_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_JPEG_DIR" && break
+ done
+
+ if test -z "$GD_JPEG_DIR"; then
+@@ -61,11 +68,11 @@
+ PHP_CHECK_LIBRARY(jpeg,jpeg_read_header,
+ [
+ PHP_ADD_INCLUDE($GD_JPEG_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libjpeg.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_JPEG_DIR/lib
++ -L$GD_JPEG_LIB_DIR
+ ])
+ else
+ AC_MSG_RESULT([If configure fails try --with-jpeg-dir=<DIR>])
+@@ -75,8 +82,15 @@
+ AC_DEFUN([PHP_GD_PNG],[
+ if test "$PHP_PNG_DIR" != "no"; then
+
+- for i in $PHP_PNG_DIR /usr/local /usr; do
+- test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_PNG_DIR /usr/local /usr; do
++ if test -f "$i/$j/libpng.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libpng.a"; then
++ GD_PNG_DIR=$i
++ GD_PNG_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_PNG_DIR" && break
+ done
+
+ if test -z "$GD_PNG_DIR"; then
+@@ -91,15 +105,21 @@
+ AC_MSG_ERROR([png.h not found.])
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_ZLIB_DIR/$j; then
++ PHP_ZLIB_LIB_DIR=$PHP_ZLIB_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(png,png_write_image,
+ [
+ PHP_ADD_INCLUDE($GD_PNG_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, GD_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_LIB_DIR, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.])
+ ],[
+- -L$PHP_ZLIB_DIR/lib -lz -L$GD_PNG_DIR/lib
++ -L$PHP_ZLIB_LIB_DIR -lz -L$GD_PNG_LIB_DIR
+ ])
+
+ else
+@@ -110,8 +130,15 @@
+ AC_DEFUN([PHP_GD_XPM],[
+ if test "$PHP_XPM_DIR" != "no"; then
+
+- for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
+- test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
++ if test -f "$i/$j/libXpm.$SHLIB_SUFFIX_NAME" -o -f "$i/$j/libXpm.a"; then
++ GD_XPM_DIR=$i
++ GD_XPM_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_XPM_DIR" && break
+ done
+
+ if test -z "$GD_XPM_DIR"; then
+@@ -129,12 +156,12 @@
+ PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage,
+ [
+ PHP_ADD_INCLUDE($GD_XPM_INC)
+- PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(X11, $GD_XPM_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_XPM_DIR/lib -lX11
++ -L$GD_XPM_LIB_DIR -lX11
+ ])
+ else
+ AC_MSG_RESULT(If configure fails try --with-xpm-dir=<DIR>)
+@@ -145,25 +172,29 @@
+ if test "$PHP_TTF" != "no"; then
+ if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
+ if test -n "$PHP_TTF"; then
+- for i in $PHP_TTF /usr/local /usr; do
+- if test -f "$i/include/freetype.h"; then
+- TTF_DIR=$i
+- unset TTF_INC_DIR
+- fi
+- if test -f "$i/include/freetype/freetype.h"; then
+- TTF_DIR=$i
+- TTF_INC_DIR=$i/include/freetype
+- fi
+- if test -f "$i/include/freetype1/freetype/freetype.h"; then
+- TTF_DIR=$i
+- TTF_INC_DIR=$i/include/freetype1/freetype
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_TTF /usr/local /usr; do
++ if test -f "$i/$j/libttf.a" -o -f "$i/$j/libttf.$SHLIB_SUFFIX_NAME"; then
++ TTF_DIR=$i
++ TTF_LIB_DIR=$i/$j
++ if test -f "$i/include/freetype.h"; then
++ unset TTF_INC_DIR
++ elif test -f "$i/include/freetype/freetype.h"; then
++ TTF_INC_DIR=$i/include/freetype
++ elif test -f "$i/include/freetype1/freetype/freetype.h"; then
++ TTF_INC_DIR=$i/include/freetype1/freetype
++ else
++ unset TTF_DIR
++ fi
++ fi
++ test -n "$TTF_DIR" && break
++ done
+ test -n "$TTF_DIR" && break
+ done
+ fi
+ if test -n "$TTF_DIR" ; then
+ AC_DEFINE(HAVE_LIBTTF,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_LIB_DIR, GD_SHARED_LIBADD)
+ fi
+ if test -z "$TTF_INC_DIR"; then
+ TTF_INC_DIR=$TTF_DIR/include
+@@ -179,16 +210,21 @@
+ AC_DEFUN([PHP_GD_FREETYPE2],[
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/include/freetype2/freetype/freetype.h"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_INC_DIR=$i/include/freetype2
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/include/freetype2/freetype/freetype.h" && \
++ test -f "$i/$j/libfreetype.a" -o -f "$i/$j/libfreetype.$SHLIB_SUFFIX_NAME"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_LIB_DIR=$i/$j
++ FREETYPE2_INC_DIR=$i/include/freetype2
++ break
++ fi
++ done
++ test -n "$FREETYPE2_DIR" && break
+ done
+
+ if test -n "$FREETYPE2_DIR" ; then
+- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_LIB_DIR, GD_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($FREETYPE2_DIR/include)
+ PHP_ADD_INCLUDE($FREETYPE2_INC_DIR)
+ AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
+@@ -204,8 +240,16 @@
+ AC_DEFUN([PHP_GD_T1LIB],[
+ if test "$PHP_T1LIB" != "no"; then
+
+- for i in $PHP_T1LIB /usr/local /usr; do
+- test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break
++ for j in lib64 lib; do
++ for i in $PHP_T1LIB /usr/local /usr; do
++ if test -f "$i/include/t1lib.h" && \
++ test -f "$i/$j/libt1.a" -o -f "$i/$j/libt1.$SHLIB_SUFFIX_NAME"; then
++ GD_T1_DIR=$i
++ GD_T1_LIB_DIR=$i/$j
++ break
++ fi
++ done
++ test -n "$GD_T1_DIR" && break
+ done
+
+ if test -z "$GD_T1_DIR"; then
+@@ -216,11 +260,11 @@
+ [
+ AC_DEFINE(HAVE_LIBT1,1,[ ])
+ PHP_ADD_INCLUDE($GD_T1_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_DIR/lib, GD_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(t1, $GD_T1_LIB_DIR, GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.])
+ ],[
+- -L$GD_T1_DIR/lib
++ -L$GD_T1_LIB_DIR
+ ])
+ fi
+ ])
+@@ -366,7 +410,7 @@
+ done
+
+ dnl Library path
+- for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do
++ for i in lib/gd1.3 lib64/gd1.3 lib/gd lib64/gd lib lib64 gd1.3 gd ""; do
+ test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i"
+ done
+
+diff -Nru php-5.0.5.orig/ext/gettext/config.m4 php-5.0.5/ext/gettext/config.m4
+--- php-5.0.5.orig/ext/gettext/config.m4 2003-10-01 04:53:07.000000000 +0200
++++ php-5.0.5/ext/gettext/config.m4 2005-12-04 17:04:33.000000000 +0100
+@@ -14,11 +14,15 @@
+ AC_MSG_ERROR(Cannot locate header file libintl.h)
+ fi
+
+- GETTEXT_LIBDIR=$GETTEXT_DIR/lib
++ for j in lib64 lib; do
++ if test -d $GETTEXT_DIR/$j; then
++ GETTEXT_LIBDIR=$GETTEXT_DIR/$j
++ fi
++ done
++
+ GETTEXT_INCDIR=$GETTEXT_DIR/include
+
+ O_LDFLAGS=$LDFLAGS
+- LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
+ AC_CHECK_LIB(intl, bindtextdomain, [
+ GETTEXT_LIBS=intl
+ GETTEXT_CHECK_IN_LIB=intl
+diff -Nru php-5.0.5.orig/ext/gmp/config.m4 php-5.0.5/ext/gmp/config.m4
+--- php-5.0.5.orig/ext/gmp/config.m4 2003-11-19 05:44:06.000000000 +0100
++++ php-5.0.5/ext/gmp/config.m4 2005-12-04 17:05:51.000000000 +0100
+@@ -14,20 +14,26 @@
+ if test -z "$GMP_DIR"; then
+ AC_MSG_ERROR(Unable to locate gmp.h)
+ fi
+-
++
++ for j in lib64 lib; do
++ if test -d $GMP_DIR/$j; then
++ GMP_LIBDIR=$GMP_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size,
+ [],[
+ PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size,
+ [],[
+ AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.])
+ ],[
+- -L$GMP_DIR/lib
++ -L$GMP_LIBDIR
+ ])
+ ],[
+- -L$GMP_DIR/lib
++ -L$GMP_LIBDIR
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_LIBDIR, GMP_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($GMP_DIR/include)
+
+ PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared)
+diff -Nru php-5.0.5.orig/ext/iconv/config.m4 php-5.0.5/ext/iconv/config.m4
+--- php-5.0.5.orig/ext/iconv/config.m4 2005-01-10 22:37:59.000000000 +0100
++++ php-5.0.5/ext/iconv/config.m4 2005-12-04 17:13:26.000000000 +0100
+@@ -23,8 +23,14 @@
+ PHP_ICONV_PREFIX="$ICONV_DIR"
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_ICONV_PREFIX/$j; then
++ PHP_ICONV_PREFIX_LIBDIR=$PHP_ICONV_PREFIX/$j
++ fi
++ done
++
+ CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
+- LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS"
++ LDFLAGS="-L$PHP_ICONV_PREFIX_LIBDIR $LDFLAGS"
+
+ if test -r $PHP_ICONV_PREFIX/include/giconv.h; then
+ PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
+diff -Nru php-5.0.5.orig/ext/imap/config.m4 php-5.0.5/ext/imap/config.m4
+--- php-5.0.5.orig/ext/imap/config.m4 2005-01-11 05:56:44.000000000 +0100
++++ php-5.0.5/ext/imap/config.m4 2005-12-04 16:10:26.000000000 +0100
+@@ -155,6 +155,7 @@
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
++ IMAP_LIB_CHK(lib64)
+ IMAP_LIB_CHK(c-client)
+ done
+
+diff -Nru php-5.0.5.orig/ext/interbase/config.m4 php-5.0.5/ext/interbase/config.m4
+--- php-5.0.5.orig/ext/interbase/config.m4 2004-05-12 16:29:42.000000000 +0200
++++ php-5.0.5/ext/interbase/config.m4 2005-12-04 19:10:10.000000000 +0100
+@@ -9,10 +9,18 @@
+ if test "$PHP_INTERBASE" != "no"; then
+ if test "$PHP_INTERBASE" = "yes"; then
+ IBASE_INCDIR=/usr/interbase/include
+- IBASE_LIBDIR=/usr/interbase/lib
++ for j in lib64 lib; do
++ if test -d /usr/interbase/$j; then
++ IBASE_LIBDIR=/usr/interbase/$j
++ fi
++ done
+ else
+ IBASE_INCDIR=$PHP_INTERBASE/include
+- IBASE_LIBDIR=$PHP_INTERBASE/lib
++ for j in lib64 lib; do
++ if test -d $PHP_INTERBASE/$j; then
++ IBASE_LIBDIR=$PHP_INTERBASE/$j
++ fi
++ done
+ fi
+
+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
+diff -Nru php-5.0.5.orig/ext/ldap/config.m4 php-5.0.5/ext/ldap/config.m4
+--- php-5.0.5.orig/ext/ldap/config.m4 2005-05-08 17:59:18.000000000 +0200
++++ php-5.0.5/ext/ldap/config.m4 2005-12-04 19:15:50.000000000 +0100
+@@ -6,7 +6,8 @@
+ if test -f $1/include/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/include
+- LDAP_LIBDIR=$1/lib
++ test -f $1/lib/libldap.so && LDAP_LIBDIR=$1/lib
++ test -f $1/lib64/libldap.so && LDAP_LIBDIR=$1/lib64
+ elif test -f $1/include/umich-ldap/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/include/umich-ldap
+@@ -39,7 +40,11 @@
+
+ if test "$LDAP_SASL_DIR"; then
+ LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include
+- LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/lib
++ for j in lib64 lib; do
++ if test -d $LDAP_SASL_DIR/$j; then
++ LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$j
++ fi
++ done
+ else
+ AC_MSG_ERROR([sasl.h not found!])
+ fi
+diff -Nru php-5.0.5.orig/ext/mbstring/config.m4 php-5.0.5/ext/mbstring/config.m4
+--- php-5.0.5.orig/ext/mbstring/config.m4 2005-02-21 00:02:48.000000000 +0100
++++ php-5.0.5/ext/mbstring/config.m4 2005-12-04 19:18:03.000000000 +0100
+@@ -235,12 +235,18 @@
+ PHP_ADD_INCLUDE([$PHP_LIBMBFL_INCLUDE])
+ fi
+
++ for j in lib64 lib; do
++ if test -d $PHP_LIBMBFL/$j; then
++ PHP_LIBMBFL_LIBDIR=$PHP_LIBMBFL/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mbfl, mbfl_buffer_converter_new, [
+- PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL/lib, MBSTRING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mbfl, $PHP_LIBMBFL_LIBDIR, MBSTRING_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.])
+ ], [
+- -LPHP_LIBMBFL/lib
++ -L$PHP_LIBMBFL_LIBDIR
+ ])
+ fi
+ ])
+diff -Nru php-5.0.5.orig/ext/mcrypt/config.m4 php-5.0.5/ext/mcrypt/config.m4
+--- php-5.0.5.orig/ext/mcrypt/config.m4 2005-01-22 02:36:56.000000000 +0100
++++ php-5.0.5/ext/mcrypt/config.m4 2005-12-04 19:33:28.000000000 +0100
+@@ -34,6 +34,12 @@
+
+ PHP_MCRYPT_CHECK_VERSION
+
++ for j in lib64 lib; do
++ if test -d $MCRYPT_DIR/$j; then
++ MCRYPT_LIBDIR=MCRYPT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
+ [
+ PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
+@@ -45,13 +51,13 @@
+ ],[
+ AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
+ ],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+- -L$MCRYPT_DIR/lib -lltdl
++ -L$MCRYPT_LIBDIR -lltdl
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MCRYPT_DIR/include)
+
+ PHP_SUBST(MCRYPT_SHARED_LIBADD)
+diff -Nru php-5.0.5.orig/ext/mcve/config.m4 php-5.0.5/ext/mcve/config.m4
+--- php-5.0.5.orig/ext/mcve/config.m4 2004-12-08 07:47:07.000000000 +0100
++++ php-5.0.5/ext/mcve/config.m4 2005-12-04 19:35:35.000000000 +0100
+@@ -67,8 +67,14 @@
+
+ CPPFLAGS=$saved_CPPFLAGS
+
++ for j in lib64 lib; do
++ if test -d $MCVE_DIR/$j; then
++ MCVE_LIBDIR=MCVE_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MCVE_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_LIBDIR, MCVE_SHARED_LIBADD)
+
+ dnl Build test. Check for libmcve or libmonetra
+ dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion
+diff -Nru php-5.0.5.orig/ext/mhash/config.m4 php-5.0.5/ext/mhash/config.m4
+--- php-5.0.5.orig/ext/mhash/config.m4 2003-10-01 04:53:11.000000000 +0200
++++ php-5.0.5/ext/mhash/config.m4 2005-12-04 20:18:36.000000000 +0100
+@@ -14,8 +14,14 @@
+ AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MHASH_DIR/$j; then
++ MHASH_LIBDIR=$MHASH_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MHASH_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared)
+ PHP_SUBST(MHASH_SHARED_LIBADD)
+diff -Nru php-5.0.5.orig/ext/ming/config.m4 php-5.0.5/ext/ming/config.m4
+--- php-5.0.5.orig/ext/ming/config.m4 2005-07-25 23:03:27.000000000 +0200
++++ php-5.0.5/ext/ming/config.m4 2005-12-04 20:22:21.000000000 +0100
+@@ -8,11 +8,13 @@
+ if test "$PHP_MING" != "no"; then
+ AC_CHECK_LIB(m, sin)
+
+- for i in $PHP_MING /usr/local /usr; do
+- if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then
+- MING_DIR=$i
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_MING /usr/local /usr; do
++ if test -f $i/$j/libming.$SHLIB_SUFFIX_NAME -o -f $i/$j/libming.a; then
++ MING_DIR=$i
++ break
++ fi
++ done
+ done
+
+ if test -z "$MING_DIR"; then
+@@ -29,16 +31,22 @@
+ AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MING_DIR/$j; then
++ MING_LIBDIR=$MING_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
+ AC_DEFINE(HAVE_MING,1,[ ])
+ ],[
+ AC_MSG_ERROR([Ming library 0.2a or greater required.])
+ ],[
+- -L$MING_DIR/lib
++ -L$MING_LIBDIR
+ ])
+
+ PHP_ADD_INCLUDE($MING_INC_DIR)
+- PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_LIBDIR, MING_SHARED_LIBADD)
+
+ AC_MSG_CHECKING([for destroySWFBlock])
+ AC_TRY_RUN([
+diff -Nru php-5.0.5.orig/ext/msession/config.m4 php-5.0.5/ext/msession/config.m4
+--- php-5.0.5.orig/ext/msession/config.m4 2003-02-12 19:34:20.000000000 +0100
++++ php-5.0.5/ext/msession/config.m4 2005-12-04 20:26:49.000000000 +0100
+@@ -8,13 +8,17 @@
+ if test "$PHP_MSESSION" != "no"; then
+ if test -r $PHP_MSESSION/lib/libphoenix.a; then
+ PHOENIX_DIR=$PHP_MSESSION
++ PHOENIX_LIBDIR=$PHP_MSESSION/lib
+ else
+ AC_MSG_CHECKING(for msession in default path)
+- for i in /usr/local/phoenix /usr/local /usr; do
+- if test -r $i/lib/libphoenix.a; then
+- PHOENIX_DIR=$i
+- AC_MSG_RESULT(found in $i)
+- fi
++ for j in lib64 lib; do
++ for i in /usr/local/phoenix /usr/local /usr; do
++ if test -r $i/$j/libphoenix.a; then
++ PHOENIX_DIR=$i
++ PHOENIX_LIBDIR=$i/$j
++ AC_MSG_RESULT(found in $i)
++ fi
++ done
+ done
+ fi
+
+@@ -25,7 +29,7 @@
+
+
+ AC_DEFINE(HAVE_MSESSION, 1, [ ])
+- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB)
++ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB)
+ PHOENIX_INCLUDE="-I$PHOENIX_DIR"
+ PHP_SUBST(PHOENIX_LIB)
+
+diff -Nru php-5.0.5.orig/ext/mssql/config.m4 php-5.0.5/ext/mssql/config.m4
+--- php-5.0.5.orig/ext/mssql/config.m4 2004-12-08 19:58:25.000000000 +0100
++++ php-5.0.5/ext/mssql/config.m4 2005-12-04 22:12:15.000000000 +0100
+@@ -30,14 +30,20 @@
+ else
+ AC_MSG_ERROR(Directory $PHP_MSSQL is not a FreeTDS installation directory)
+ fi
+- fi
++ fi
++
++ for j in lib64 lib; do
++ if test -d $FREETDS_INSTALLATION_DIR/$j; then
++ FREETDS_INSTALLATION_DIR_LIBDIR=$FREETDS_INSTALLATION_DIR/$j
++ fi
++ done
+
+- if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then
+- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so])
++ if test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR_LIBDIR/libtds.so"; then
++ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR_LIBDIR/libtds.[a|so])
+ fi
+
+ MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include
+- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib
++ MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR_LIBDIR
+
+ PHP_ADD_INCLUDE($MSSQL_INCDIR)
+ PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD)
+diff -Nru php-5.0.5.orig/ext/mysql/config.m4 php-5.0.5/ext/mysql/config.m4
+--- php-5.0.5.orig/ext/mysql/config.m4 2005-06-20 15:46:02.000000000 +0200
++++ php-5.0.5/ext/mysql/config.m4 2005-12-04 22:43:27.000000000 +0100
+@@ -90,7 +90,7 @@
+ ;;
+ esac
+
+- for i in lib lib/mysql lib64 lib64/mysql; do
++ for i in lib64 lib64/mysql lib lib/mysql; do
+ MYSQL_LIB_CHK($i)
+ done
+
+@@ -102,13 +102,18 @@
+ PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_close, [ ],
+ [
+ if test "$PHP_ZLIB_DIR" != "no"; then
++ for j in lib64 lib; do
++ if test -d $PHP_ZLIB_DIR/$j; then
++ PHP_ZLIB_LIBDIR=$PHP_ZLIB_DIR/$j
++ fi
++ done
+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, MYSQL_SHARED_LIBADD)
+ PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_error, [], [
+ AC_MSG_ERROR([mysql configure failed. Please check config.log for more information.])
+ ], [
+- -L$PHP_ZLIB_DIR/lib -L$MYSQL_LIB_DIR
++ -L$PHP_ZLIB_LIBDIR -L$MYSQL_LIB_DIR
+ ])
+- MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -lz"
++ MYSQL_LIBS="-L$PHP_ZLIB_LIBDIR -lz"
+ else
+ PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD)
+ PHP_CHECK_LIBRARY($MY_LIBNAME, mysql_errno, [], [
+diff -Nru php-5.0.5.orig/ext/ncurses/config.m4 php-5.0.5/ext/ncurses/config.m4
+--- php-5.0.5.orig/ext/ncurses/config.m4 2003-12-09 21:33:08.000000000 +0100
++++ php-5.0.5/ext/ncurses/config.m4 2005-12-04 22:47:05.000000000 +0100
+@@ -38,20 +38,26 @@
+ LIBNAME=ncurses
+ LIBSYMBOL=initscr
+
++ for j in lib64 lib; do
++ if test -d $NCURSES_DIR/$j; then
++ NCURSES_LIBDIR=$NCURSES_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [
+ AC_DEFINE(HAVE_NCURSESLIB,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD)
+
+ PHP_CHECK_LIBRARY(panel, new_panel, [
+ AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ])
+- PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_LIBDIR, NCURSES_SHARED_LIBADD)
+ ], [], [
+- -L$NCURSES_DIR/lib -l$LIBNAME -lm
++ -L$NCURSES_LIBDIR -l$LIBNAME -lm
+ ])
+ ], [
+ AC_MSG_ERROR(Wrong ncurses lib version or lib not found)
+ ], [
+- -L$NCURSES_DIR/lib -lm
++ -L$NCURSES_LIBDIR -lm
+ ])
+
+ AC_CHECK_LIB($LIBNAME, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])])
+diff -Nru php-5.0.5.orig/ext/odbc/config.m4 php-5.0.5/ext/odbc/config.m4
+--- php-5.0.5.orig/ext/odbc/config.m4 2005-04-22 01:02:15.000000000 +0200
++++ php-5.0.5/ext/odbc/config.m4 2005-12-05 18:19:09.000000000 +0100
+@@ -47,19 +47,8 @@
+ #
+ # Check for the library files, and setup the ODBC_LIBS path...
+ #
+-if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
+- ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+- #
+- # we have an error and should bail out, as we can't find the libs!
+- #
+- echo ""
+- echo "*********************************************************************"
+- echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+- echo "* Please correct this by creating the following links and reconfiguring:"
+- echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+- echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
+- echo "*********************************************************************"
+-else
++if test -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
++ -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+ ODBC_LFLAGS=-L$1
+ ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
+ fi
+@@ -100,8 +89,12 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ADABAS_LIBDIR=$withval/$i
++ test -f "$ADABAS_LIBDIR/odbclib.a" && break
++ done
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($ADABAS_LIBDIR)
+ ODBC_OBJS="$withval/lib/odbclib.a"
+ ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a"
+ $srcdir/build/shtool mkdir -f -p ext/odbc
+@@ -132,8 +125,12 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ SAPDB_LIBDIR=$withval/$i
++ test -f "$SAPDB_LIBDIR/libsqlod.a" -o -f "$SAPDB_LIBDIR/libsqlod.$SHLIB_SUFFIX_NAME" && break
++ done
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($SAPDB_LIBDIR)
+ PHP_ADD_LIBRARY(sqlod)
+ ODBC_TYPE=sapdb
+ AC_DEFINE(HAVE_SAPDB,1,[ ])
+@@ -158,19 +155,36 @@
+ withval=/usr/local/solid
+ fi
+ if test "$withval" != "no"; then
+- ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+- ODBC_INCLUDE=-I$ODBC_INCDIR
+- ODBC_TYPE=solid
+- if test -f $ODBC_LIBDIR/soc*35.a; then
+- AC_DEFINE(HAVE_SOLID_35,1,[ ])
+- elif test -f $ODBC_LIBDIR/scl*30.a; then
+- AC_DEFINE(HAVE_SOLID_30,1,[ ])
+- elif test -f $ODBC_LIBDIR/scl*23.a; then
+- AC_DEFINE(HAVE_SOLID,1,[ ])
++ for i in lib64 lib; do
++ SOLID_LIBDIR=$withval/$i
++ ODBC_INCDIR=$withval/include
++ ODBC_LIBDIR=$withval/$j
++ ODBC_INCLUDE=-I$ODBC_INCDIR
++ ODBC_TYPE=solid
++ if test -f $ODBC_LIBDIR/soc*35.a; then
++ AC_DEFINE(HAVE_SOLID_35,1,[ ])
++ elif test -f $ODBC_LIBDIR/scl*30.a; then
++ AC_DEFINE(HAVE_SOLID_30,1,[ ])
++ elif test -f $ODBC_LIBDIR/scl*23.a; then
++ AC_DEFINE(HAVE_SOLID,1,[ ])
++ fi
++ AC_MSG_RESULT(yes)
++ ODBC_LIBS=
++ AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
++ test -n "$ODBC_LIBS" && break
++ done
++ if test -z "$ODBC_LIBS"; then
++ #
++ # we have an error and should bail out, as we can't find the libs!
++ #
++ echo ""
++ echo "*********************************************************************"
++ echo "* Unable to locate ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
++ echo "* Please correct this by creating the following links and reconfiguring:"
++ echo "* ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
++ echo "* ODBC_LIBDIR/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
++ echo "*********************************************************************"
+ fi
+- AC_MSG_RESULT(yes)
+- AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -407,11 +421,15 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
++ for i in lib64 lib; do
++ IODBC_LIBDIR=$withval/$i
++ test -f "$IODBC_LIBDIR/libiodbc.a" -o -f "$IODBC_LIBDIR/libiodbc.$SHLIB_SUFFIX_NAME" && break
++ done
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $IODBC_LIBDIR)
+ PHP_ADD_INCLUDE($withval/include, 1)
+ ODBC_TYPE=iodbc
+ ODBC_INCLUDE=-I$withval/include
+- ODBC_LFLAGS=-L$withval/lib
++ ODBC_LFLAGS=-L$IODBC_LIBDIR
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
+ AC_DEFINE(HAVE_ODBC2,1,[ ])
+@@ -436,8 +454,11 @@
+ withval=/usr/local/easysoft/oob/client
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ODBC_LIBDIR=$withval/$i
++ test -f "$ODBC_LIBDIR/libesoobclient.a" -o -f "$ODBC_LIBDIR/libesoobclient.$SHLIB_SUFFIX_NAME" && break
++ done
+ ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lesoobclient
+@@ -463,8 +484,11 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
++ for i in lib64 lib; do
++ ODBC_LIBDIR=$withval/$i
++ test -f "$ODBC_LIBDIR/libodbc.a" -o -f "$ODBC_LIBDIR/libodbc.$SHLIB_SUFFIX_NAME" && break
++ done
+ ODBC_INCDIR=$withval/include
+- ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lodbc
+diff -Nru php-5.0.5.orig/ext/pcre/config.m4 php-5.0.5/ext/pcre/config.m4
+--- php-5.0.5.orig/ext/pcre/config.m4 2005-08-22 18:55:56.000000000 +0200
++++ php-5.0.5/ext/pcre/config.m4 2005-12-04 16:10:26.000000000 +0100
+@@ -25,7 +25,7 @@
+ AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX])
+ fi
+
+- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do
++ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib64 $PHP_PCRE_REGEX/lib; do
+ test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
+ done
+
+diff -Nru php-5.0.5.orig/ext/pgsql/config.m4 php-5.0.5/ext/pgsql/config.m4
+--- php-5.0.5.orig/ext/pgsql/config.m4 2005-04-03 15:06:33.000000000 +0200
++++ php-5.0.5/ext/pgsql/config.m4 2005-12-05 18:22:38.000000000 +0100
+@@ -44,7 +44,7 @@
+ fi
+ done
+
+- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do
++ for j in lib64 lib lib64/pgsql lib/pgsql lib64/postgres lib/postgres lib64/postgresql lib/postgresql ""; do
+ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
+ PGSQL_LIBDIR=$i/$j
+ fi
+diff -Nru php-5.0.5.orig/ext/pspell/config.m4 php-5.0.5/ext/pspell/config.m4
+--- php-5.0.5.orig/ext/pspell/config.m4 2005-02-17 04:51:35.000000000 +0100
++++ php-5.0.5/ext/pspell/config.m4 2005-12-05 18:23:49.000000000 +0100
+@@ -27,7 +27,11 @@
+ AC_MSG_ERROR(Cannot find pspell)
+ fi
+
+- PSPELL_LIBDIR=$PSPELL_DIR/lib
++ for j in lib64 lib; do
++ if test -d $PSPELL_DIR/$j; then
++ PSPELL_LIBDIR=$PSPELL_DIR/$j
++ fi
++ done
+
+ PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
+
+diff -Nru php-5.0.5.orig/ext/readline/config.m4 php-5.0.5/ext/readline/config.m4
+--- php-5.0.5.orig/ext/readline/config.m4 2003-10-01 04:53:13.000000000 +0200
++++ php-5.0.5/ext/readline/config.m4 2005-12-05 18:27:29.000000000 +0100
+@@ -29,22 +29,28 @@
+ ])
+ ])
+
++ for j in lib64 lib; do
++ if test -d $READLINE_DIR/$j; then
++ READLINE_LIBDIR=$READLINE_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(readline, readline,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(readline library not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_CHECK_LIBRARY(history, add_history,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(history library required by readline not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
+@@ -73,13 +79,19 @@
+ ])
+ ])
+
++ for j in lib64 lib; do
++ if test -d $LIBEDIT_DIR/$j; then
++ LIBEDIT_LIBDIR=$LIBEDIT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(edit, readline,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/lib, READLINE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_LIBDIR, READLINE_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR(edit library required by readline not found)
+ ], [
+- -L$READLINE_DIR/lib
++ -L$READLINE_LIBDIR
+ ])
+
+ PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
+diff -Nru php-5.0.5.orig/ext/session/config.m4 php-5.0.5/ext/session/config.m4
+--- php-5.0.5.orig/ext/session/config.m4 2003-10-01 04:53:15.000000000 +0200
++++ php-5.0.5/ext/session/config.m4 2005-12-05 18:28:36.000000000 +0100
+@@ -24,8 +24,14 @@
+ if test -z "$MM_DIR" ; then
+ AC_MSG_ERROR(cannot find mm library)
+ fi
+-
+- PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib, SESSION_SHARED_LIBADD)
++
++ for j in lib64 lib; do
++ if test -d $MM_DIR/$j; then
++ MM_LIBDIR=$MM_DIR/$j
++ fi
++ done
++
++ PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_LIBDIR, SESSION_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MM_DIR/include)
+ AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm])
+ fi
+diff -Nru php-5.0.5.orig/ext/snmp/config.m4 php-5.0.5/ext/snmp/config.m4
+--- php-5.0.5.orig/ext/snmp/config.m4 2003-09-23 10:15:49.000000000 +0200
++++ php-5.0.5/ext/snmp/config.m4 2005-12-04 16:10:26.000000000 +0100
+@@ -45,8 +45,8 @@
+ test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp
+ test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp
+ done
+- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do
+- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib
++ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do
++ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i
+ done
+ else
+ SNMP_INCDIR=$PHP_SNMP/include
+diff -Nru php-5.0.5.orig/ext/sqlite/config.m4 php-5.0.5/ext/sqlite/config.m4
+--- php-5.0.5.orig/ext/sqlite/config.m4 2005-08-29 01:20:20.000000000 +0200
++++ php-5.0.5/ext/sqlite/config.m4 2005-12-05 18:31:39.000000000 +0100
+@@ -38,14 +38,20 @@
+ LIBNAME=sqlite
+ LIBSYMBOL=sqlite_open
+
++ for j in lib64 lib; do
++ if test -d $SQLITE_DIR/$j; then
++ SQLITE_LIBDIR=$SQLITE_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SQLITE_DIR/lib, SQLITE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SQLITE_LIBDIR, SQLITE_SHARED_LIBADD)
+ AC_DEFINE(HAVE_SQLITELIB,1,[ ])
+ ],[
+ AC_MSG_ERROR([wrong sqlite lib version or lib not found])
+ ],[
+- -L$SQLITE_DIR/lib -lm
++ -L$SQLITE_LIBDIR -lm
+ ])
+
+ PHP_SUBST(SQLITE_SHARED_LIBADD)
+diff -Nru php-5.0.5.orig/ext/tidy/config.m4 php-5.0.5/ext/tidy/config.m4
+--- php-5.0.5.orig/ext/tidy/config.m4 2003-12-18 20:59:58.000000000 +0100
++++ php-5.0.5/ext/tidy/config.m4 2005-12-05 18:32:54.000000000 +0100
+@@ -27,7 +27,11 @@
+ AC_MSG_ERROR(Cannot find libtidy)
+ fi
+
+- TIDY_LIBDIR=$TIDY_DIR/lib
++ for j in lib64 lib; do
++ if test -d $TIDY_DIR/$j; then
++ TIDY_LIBDIR=$TIDY_DIR/$j
++ fi
++ done
+
+ PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($TIDY_INCDIR)
+diff -Nru php-5.0.5.orig/ext/xml/config.m4 php-5.0.5/ext/xml/config.m4
+--- php-5.0.5.orig/ext/xml/config.m4 2005-04-27 15:13:38.000000000 +0200
++++ php-5.0.5/ext/xml/config.m4 2005-12-04 16:10:26.000000000 +0100
+@@ -35,11 +35,15 @@
+ dnl Check for expat only if --with-libexpat-dir is used.
+ dnl
+ if test "$PHP_LIBEXPAT_DIR" != "no"; then
+- for i in $PHP_XML $PHP_LIBEXPAT_DIR; do
+- if test -f "$i/lib/libexpat.a" || test -f "$i/lib/libexpat.$SHLIB_SUFFIX_NAME"; then
+- EXPAT_DIR=$i
+- break
+- fi
++ for j in lib64 lib; do
++ for i in $PHP_XML $PHP_LIBEXPAT_DIR; do
++ if test -f "$i/$j/libexpat.a" || test -f "$i/$j/libexpat.$SHLIB_SUFFIX_NAME"; then
++ EXPAT_DIR=$i
++ EXPAT_LIBDIR=$i/$j
++ break
++ fi
++ done
++ test -n "$EXPAT_DIR" && break
+ done
+
+ if test -z "$EXPAT_DIR"; then
+@@ -47,7 +51,7 @@
+ fi
+
+ PHP_ADD_INCLUDE($EXPAT_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_LIBDIR, XML_SHARED_LIBADD)
+ AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
+ fi
+
+diff -Nru php-5.0.5.orig/ext/xmlrpc/config.m4 php-5.0.5/ext/xmlrpc/config.m4
+--- php-5.0.5.orig/ext/xmlrpc/config.m4 2003-10-01 04:53:15.000000000 +0200
++++ php-5.0.5/ext/xmlrpc/config.m4 2005-12-05 18:40:33.000000000 +0100
+@@ -30,6 +30,13 @@
+ testval=yes
+ break
+ fi
++ if test -f $i/lib64/libexpat.a -o -f $i/lib64/libexpat.$SHLIB_SUFFIX_NAME; then
++ AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
++ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib64, XMLRPC_SHARED_LIBADD)
++ PHP_ADD_INCLUDE($i/include)
++ testval=yes
++ break
++ fi
+ done
+
+ if test "$testval" = "no"; then
+@@ -87,7 +94,13 @@
+ AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $XMLRPC_DIR/$j; then
++ XMLRPC_LIBDIR=$XMLRCP_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($XMLRPC_DIR)
+- PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_LIBDIR, XMLRPC_SHARED_LIBADD)
+ fi
+
+diff -Nru php-5.0.5.orig/ext/xsl/config.m4 php-5.0.5/ext/xsl/config.m4
+--- php-5.0.5.orig/ext/xsl/config.m4 2005-04-27 15:13:38.000000000 +0200
++++ php-5.0.5/ext/xsl/config.m4 2005-12-05 18:42:56.000000000 +0100
+@@ -48,8 +48,13 @@
+ if test -z "$PHP_XSL_EXSL_DIR"; then
+ AC_MSG_RESULT(not found)
+ else
++ for j in lib64 lib; do
++ if test -d $PHP_XSL_EXSL_DIR/$j; then
++ PHP_XSL_EXSL_LIBDIR=$PHP_XSL_EXSL_DIR/$j
++ fi
++ done
+ AC_MSG_RESULT(found)
+- PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/lib, XSL_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_LIBDIR, XSL_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include)
+ AC_DEFINE(HAVE_XSL_EXSLT,1,[ ])
+ fi
+diff -Nru php-5.0.5.orig/ext/zlib/config0.m4 php-5.0.5/ext/zlib/config0.m4
+--- php-5.0.5.orig/ext/zlib/config0.m4 2003-06-27 02:37:21.000000000 +0200
++++ php-5.0.5/ext/zlib/config0.m4 2005-12-05 18:35:49.000000000 +0100
+@@ -36,10 +36,11 @@
+ AC_MSG_ERROR(Cannot find libz)
+ fi
+
+- case $ZLIB_DIR in
+- /usr) ac_extra= ;;
+- *) ac_extra=-L$ZLIB_DIR/lib ;;
+- esac
++ for j in lib64 lib; do
++ if test -d $ZLIB_DIR/$j; then
++ ZLIB_LIBDIR=$ZLIB_DIR/$j
++ fi
++ done
+
+ PHP_CHECK_LIBRARY(z, gzgets, [
+ AC_DEFINE(HAVE_ZLIB,1,[ ])
+@@ -49,7 +50,7 @@
+ $ac_extra
+ ])
+
+- PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD)
++ PHP_ADD_LIBPATH($ZLIB_LIBDIR, ZLIB_SHARED_LIBADD)
+
+ PHP_ZLIB_DIR=$ZLIB_DIR
+ PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD)
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch b/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch
new file mode 100644
index 0000000..8dbae7b
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch
@@ -0,0 +1,42 @@
+--- ext/standard/incomplete_class.c 2004-11-25 20:28:37.000000000 +0000
++++ ext/standard/incomplete_class.c 2005-09-09 13:00:39.000000000 +0100
+@@ -122,7 +122,7 @@
+
+ /* {{{ php_lookup_class_name
+ */
+-char *php_lookup_class_name(zval *object, size_t *nlen)
++char *php_lookup_class_name(zval *object, zend_uint *nlen)
+ {
+ zval **val;
+ char *retval = NULL;
+@@ -144,7 +144,7 @@
+
+ /* {{{ php_store_class_name
+ */
+-void php_store_class_name(zval *object, const char *name, size_t len)
++void php_store_class_name(zval *object, const char *name, zend_uint len)
+ {
+ zval *val;
+ TSRMLS_FETCH();
+--- ext/standard/php_incomplete_class.h 2005-06-29 10:29:08.000000000 +0100
++++ ext/standard/php_incomplete_class.h 2005-09-09 13:00:31.000000000 +0100
+@@ -42,7 +42,7 @@
+
+ #define PHP_CLASS_ATTRIBUTES \
+ char *class_name; \
+- size_t name_len; \
++ zend_uint name_len; \
+ zend_bool free_class_name = 0; \
+ zend_bool incomplete_class = 0
+
+@@ -55,8 +55,8 @@
+
+ zend_class_entry *php_create_incomplete_class(TSRMLS_D);
+
+-char *php_lookup_class_name(zval *object, size_t *nlen);
+-void php_store_class_name(zval *object, const char *name, size_t len);
++char *php_lookup_class_name(zval *object, zend_uint *nlen);
++void php_store_class_name(zval *object, const char *name, zend_uint len);
+
+ #ifdef __cplusplus
+ };
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch b/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch
new file mode 100644
index 0000000..5c32b14
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch
@@ -0,0 +1,320 @@
+--- ext/pspell/pspell.c 2004-05-18 14:32:05.000000000 +0200
++++ ext/pspell/pspell.c 2005-10-26 23:30:48.000000000 +0200
+@@ -2,7 +2,7 @@
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+- | Copyright (c) 1997-2004 The PHP Group |
++ | Copyright (c) 1997-2005 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+@@ -16,7 +16,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: pspell.c,v 1.44 2004/05/18 12:32:05 edink Exp $ */
++/* $Id: pspell.c,v 1.47 2005/10/17 15:29:55 iliaa Exp $ */
+
+ #define IS_EXT_MODULE
+
+@@ -101,6 +101,22 @@
+ delete_pspell_config(config);
+ }
+
++#define PSPELL_FETCH_CONFIG \
++ convert_to_long_ex(conf); \
++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \
++ if (config == NULL || type != le_pspell_config) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \
++ RETURN_FALSE; \
++ } \
++
++#define PSPELL_FETCH_MANAGER \
++ convert_to_long_ex(scin); \
++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \
++ if (!manager || type != le_pspell) { \
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \
++ RETURN_FALSE; \
++ } \
++
+ /* {{{ PHP_MINIT_FUNCTION
+ */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -352,13 +368,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(conf);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
+-
+- if (config == NULL || type != le_pspell_config) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ ret = new_pspell_manager(config);
+
+@@ -387,13 +397,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++
++ PSPELL_FETCH_MANAGER;
+
+ if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+ RETURN_TRUE;
+@@ -419,13 +425,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ array_init(return_value);
+
+@@ -457,14 +458,9 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(miss);
+ convert_to_string_ex(corr);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+ if(pspell_manager_error_number(manager) == 0){
+@@ -490,13 +486,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -527,13 +518,8 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+ convert_to_string_ex(word);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+ if(Z_STRLEN_PP(word) == 0){
+@@ -564,12 +550,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_clear_session(manager);
+ if(pspell_manager_error_number(manager) == 0){
+@@ -595,12 +576,7 @@
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(scin);
+- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+- if(!manager){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_MANAGER;
+
+ pspell_manager_save_all_word_lists(manager);
+
+@@ -694,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+ int type;
+- zval **sccin, **runtogether;
++ zval **conf, **runtogether;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(runtogether);
+ pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -723,22 +694,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+ int type;
+- zval **sccin, **mode;
++ zval **conf, **mode;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(mode);
+
+@@ -760,7 +726,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+ int type;
+- zval **sccin, **pignore;
++ zval **conf, **pignore;
+ int argc;
+
+ int loc = PSPELL_LARGEST_WORD;
+@@ -770,16 +736,11 @@
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_long_ex(pignore);
+ ignore = Z_LVAL_PP(pignore);
+@@ -808,21 +769,16 @@
+ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
+ {
+ int type;
+- zval **sccin, **value;
++ zval **conf, **value;
+ int argc;
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc, &sccin, &value) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc, &conf, &value) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if (!config) {
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_string_ex(value);
+
+@@ -868,22 +824,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+ int type;
+- zval **sccin, **repl;
++ zval **conf, **repl;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ pspell_config_replace(config, "save-repl", "true");
+
+@@ -908,22 +859,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+ int type;
+- zval **sccin, **save;
++ zval **conf, **save;
+ int argc;
+
+ PspellConfig *config;
+
+ argc = ZEND_NUM_ARGS();
+- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+- convert_to_long_ex(sccin);
+- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+- if(!config){
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+- RETURN_FALSE;
+- }
++ PSPELL_FETCH_CONFIG;
+
+ convert_to_boolean_ex(save);
+ pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch b/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch
new file mode 100644
index 0000000..aee032f
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch
@@ -0,0 +1,123 @@
+--- sapi/apache2handler/sapi_apache2.c 2005/09/02 13:51:26 1.40.2.11
++++ sapi/apache2handler/sapi_apache2.c 2005/10/17 19:35:39 1.40.2.13
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: sapi_apache2.c,v 1.40.2.11 2005/09/02 13:51:26 sniper Exp $ */
++/* $Id: sapi_apache2.c,v 1.40.2.13 2005/10/17 19:35:39 rasmus Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -446,15 +446,35 @@ static int php_handler(request_rec *r)
+ request_rec *parent_req = NULL;
+ TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF \
++ if (strcmp(r->protocol, "INCLUDED")) { \
++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++ } \
++
+ conf = ap_get_module_config(r->per_dir_config, &php5_module);
++
++ /* apply_config() needs r in some cases, so allocate server_context early */
++ ctx = SG(server_context);
++ if (ctx == NULL) {
++normal:
++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++ /* register a cleanup so we clear out the SG(server_context)
++ * after each request. Note: We pass in the pointer to the
++ * server_context in case this is handled by a different thread.
++ */
++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++ ctx->r = r;
++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++ } else {
++ parent_req = ctx->r;
++ ctx->r = r;
++ }
+ apply_config(conf);
+
+ if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+ /* Check for xbithack in this case. */
+ if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+ }
+@@ -463,32 +483,24 @@ static int php_handler(request_rec *r)
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+
+ /* handle situations where user turns the engine off */
+ if (!AP2(engine)) {
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return DECLINED;
+ }
+
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+- zend_try {
+- zend_ini_deactivate(TSRMLS_C);
+- } zend_end_try();
++ PHPAP_INI_OFF;
+ return HTTP_FORBIDDEN;
+ }
+
+@@ -504,25 +516,24 @@ static int php_handler(request_rec *r)
+
+ zend_first_try {
+
+- ctx = SG(server_context);
+ if (ctx == NULL) {
+-normal:
+- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+- /* register a cleanup so we clear out the SG(server_context)
+- * after each request. Note: We pass in the pointer to the
+- * server_context in case this is handled by a different thread.
+- */
+- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+- ctx->r = r;
+ brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++ ctx = SG(server_context);
+ ctx->brigade = brigade;
+
+ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+ zend_bailout();
+ }
+ } else {
+- parent_req = ctx->r;
++ if (!parent_req) {
++ parent_req = ctx->r;
++ }
++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++ zend_bailout();
++ }
++ }
++
+ /* check if comming due to ErrorDocument */
+ if (parent_req && parent_req->status != HTTP_OK) {
+ parent_req = NULL;
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch b/dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch
new file mode 100644
index 0000000..ee4fee5
--- /dev/null
+++ b/dev-lang/php/files/5.0.5/php5.0.5-tsrm-gcc4.patch
@@ -0,0 +1,11 @@
+--- TSRM/TSRM.h 2005-12-02 19:04:27.000000000 +0100
++++ TSRM/TSRM.h 2005-12-02 19:05:01.000000000 +0100
+@@ -137,7 +137,7 @@
+
+ #define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
+ #define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
+-#define TSRMLS_SET_CTX(ctx) (void ***) ctx = tsrm_ls
++#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls
+ #define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
+ #define TSRMLS_D void ***tsrm_ls
+ #define TSRMLS_DC , TSRMLS_D
diff --git a/dev-lang/php/files/5.1-any/CVS/Entries b/dev-lang/php/files/5.1-any/CVS/Entries
new file mode 100644
index 0000000..cdcc20a
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/CVS/Entries
@@ -0,0 +1,8 @@
+D/apache-1.3////
+D/apache-2.0////
+/php5-fastbuild.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-imap-symlink.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-iodbc-config.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-prefork.patch/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-soap_persistence_session.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+/php5-with-iodbc.diff/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
diff --git a/dev-lang/php/files/5.1-any/CVS/Repository b/dev-lang/php/files/5.1-any/CVS/Repository
new file mode 100644
index 0000000..b0b7dcc
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1-any
diff --git a/dev-lang/php/files/5.1-any/CVS/Root b/dev-lang/php/files/5.1-any/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1-any/CVS/Tag b/dev-lang/php/files/5.1-any/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf
new file mode 100644
index 0000000..c6f1426
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1-any/apache-1.3/CVS/Entries b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Entries
new file mode 100644
index 0000000..7d7ba85
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php5.conf/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.1-any/apache-1.3/CVS/Repository b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Repository
new file mode 100644
index 0000000..3f46865
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1-any/apache-1.3
diff --git a/dev-lang/php/files/5.1-any/apache-1.3/CVS/Root b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1-any/apache-1.3/CVS/Tag b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-1.3/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf
new file mode 100644
index 0000000..40dfa86
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1-any/apache-2.0/CVS/Entries b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Entries
new file mode 100644
index 0000000..7d7ba85
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php5.conf/1.1/Mon Oct 31 14:10:39 2005/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.1-any/apache-2.0/CVS/Repository b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Repository
new file mode 100644
index 0000000..677ae3e
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1-any/apache-2.0
diff --git a/dev-lang/php/files/5.1-any/apache-2.0/CVS/Root b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1-any/apache-2.0/CVS/Tag b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/apache-2.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1-any/php5-fastbuild.patch b/dev-lang/php/files/5.1-any/php5-fastbuild.patch
new file mode 100644
index 0000000..5c3ea85
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/php5-fastbuild.patch
@@ -0,0 +1,234 @@
+diff -u --recursive php-5.1.0RC1/acinclude.m4 php-5.1.0RC1-cgi/acinclude.m4
+--- php-5.1.0RC1/acinclude.m4 2005-09-14 22:40:54.000000000 +0200
++++ php-5.1.0RC1/acinclude.m4 2005-09-14 22:41:14.000000000 +0200
+@@ -194,7 +194,7 @@
+ dnl
+ dnl which array to append to?
+ AC_DEFUN([PHP_ADD_SOURCES],[
+- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS))))
+ ])
+
+ dnl
+@@ -962,12 +962,8 @@
+
+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
+ dnl ---------------------------------------------- CLI static module
+- if test "$PHP_SAPI" = "cgi"; then
+- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
+- EXT_STATIC="$EXT_STATIC $1"
+- else
+- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
+- fi
++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi)
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
+ fi
+ PHP_ADD_BUILD_DIR($ext_builddir)
+diff -u --recursive php-5.1.0RC1/sapi/cgi/Makefile.frag php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag
+--- php-5.1.0RC1/sapi/cgi/Makefile.frag 2003-07-02 02:08:26.000000000 +0100
++++ php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag 2005-08-31 08:38:32.000000000 +0100
+@@ -1,2 +1,6 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS)
+ $(BUILD_CGI)
++
++install-cgi: $(SAPI_CGI_PATH)
++ @echo "Installing CGI binary $(INSTALL_ROOT)$(bindir)/"
++ @$(INSTALL_CGI)
+diff -u --recursive php-5.1.0RC1/sapi/cgi/config9.m4 php-5.1.0RC1-cgi/sapi/cgi/config9.m4
+--- php-5.1.0RC1/sapi/cgi/config9.m4 2005-07-07 06:54:43.000000000 +0100
++++ php-5.1.0RC1-cgi/sapi/cgi/config9.m4 2005-08-31 08:54:01.000000000 +0100
+@@ -80,96 +80,109 @@
+ ])
+
+
+-if test "$PHP_SAPI" = "default"; then
+- AC_MSG_CHECKING(for CGI build)
+- if test "$PHP_SAPI_CGI" != "no"; then
+- AC_MSG_RESULT(yes)
+-
+- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
+- case $host_alias in
+- *cygwin* )
+- SAPI_CGI_PATH=sapi/cgi/php.exe
+- ;;
+- * )
+- SAPI_CGI_PATH=sapi/cgi/php
+- ;;
+- esac
+- PHP_SUBST(SAPI_CGI_PATH)
+-
+- PHP_TEST_WRITE_STDOUT
+-
+- AC_MSG_CHECKING(whether to force Apache CGI redirect)
+- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
+- REDIRECT=1
+- else
+- REDIRECT=0
+- fi
+- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
+- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
++AC_MSG_CHECKING(for CGI build)
++if test "$PHP_SAPI_CGI" != "no"; then
++ AC_MSG_RESULT(yes)
++
++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
++ case $host_alias in
++ *cygwin* )
++ SAPI_CGI_PATH=sapi/cgi/php.exe
++ ;;
++ * )
++ SAPI_CGI_PATH=sapi/cgi/php
++ ;;
++ esac
++ PHP_SUBST(SAPI_CGI_PATH)
+
++ PHP_TEST_WRITE_STDOUT
+
+- AC_MSG_CHECKING(whether to discard path_info + path_translated)
+- if test "$PHP_DISCARD_PATH" = "yes"; then
+- DISCARD_PATH=1
+- else
+- DISCARD_PATH=0
+- fi
+- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
+- AC_MSG_RESULT($PHP_DISCARD_PATH)
++ AC_MSG_CHECKING(whether to force Apache CGI redirect)
++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
++ REDIRECT=1
++ else
++ REDIRECT=0
++ fi
++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
+
+- AC_MSG_CHECKING(whether to enable path info checking)
+- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
+- ENABLE_PATHINFO_CHECK=1
+- else
+- ENABLE_PATHINFO_CHECK=0
+- fi
+- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
+
+- AC_MSG_CHECKING(whether to enable fastcgi support)
+- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
+- if test -z $PHP_LIBFCGI_DIR; then
+- echo "$PHP_LIBFCGI_DIR does not exist"
+- exit 1
+- fi
+- if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
+- PHP_FASTCGI=1
+- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
+- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
+- PHP_FCGI_STATIC=1
+- else
+- PHP_FASTCGI=0
+- PHP_FCGI_FILES=""
+- PHP_FCGI_INCLUDE=""
+- PHP_FCGI_STATIC=0
+- fi
+- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
+- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+-
+- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)')
+-
+- case $host_alias in
+- *aix*)
+- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+- ;;
+- *darwin*)
+- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ AC_MSG_CHECKING(whether to discard path_info + path_translated)
++ if test "$PHP_DISCARD_PATH" = "yes"; then
++ DISCARD_PATH=1
++ else
++ DISCARD_PATH=0
++ fi
++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
++ AC_MSG_RESULT($PHP_DISCARD_PATH)
++
++ AC_MSG_CHECKING(whether to enable path info checking)
++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
++ ENABLE_PATHINFO_CHECK=1
++ else
++ ENABLE_PATHINFO_CHECK=0
++ fi
++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
++
++ AC_MSG_CHECKING(whether to enable fastcgi support)
++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
++ if test -z $PHP_LIBFCGI_DIR; then
++ echo "$PHP_LIBFCGI_DIR does not exist"
++ exit 1
++ fi
++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then
++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
++ PHP_FASTCGI=1
++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
++ PHP_FCGI_STATIC=1
++ else
++ PHP_FASTCGI=0
++ PHP_FCGI_FILES=""
++ PHP_FCGI_INCLUDE=""
++ PHP_FCGI_STATIC=0
++ fi
++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
++
++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi)
++ PHP_ADD_SOURCES(/main, internal_functions_cli.c,,cgi)
++
++ case $host_alias in
++ *aix*)
++ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ ;;
++ *darwin*)
++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- *)
+- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ *)
++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- esac
++ esac
+
+- PHP_SUBST(BUILD_CGI)
++ PHP_CGI_TARGET="\$(SAPI_CGI_PATH)"
++ PHP_INSTALL_CGI_TARGET="install-cgi"
+
+- elif test "$PHP_SAPI_CLI" != "no"; then
+- AC_MSG_RESULT(no)
+- OVERALL_TARGET=
+- PHP_SAPI=cli
+- else
+- AC_MSG_ERROR([No SAPIs selected.])
++ PHP_SUBST(BUILD_CGI)
++ PHP_SUBST(INSTALL_CGI)
++ PHP_SUBST(PHP_CGI_OBJS)
++ PHP_SUBST(PHP_CGI_TARGET)
++ PHP_SUBST(PHP_INSTALL_CGI_TARGET)
++
++ if test "$PHP_SAPI" = "default" ; then
++ PHP_BUILD_PROGRAM($SAP_CGI_PATH)
++ fi
++else
++ AC_MSG_RESULT(no)
++ if test "$PHP_SAPI" = "default" ; then
++ if test "$PHP_SAPI_CLI" != "no" ; then
++ OVERALL_TARGET=
++ PHP_SAPI=cli
++ else
++ AC_MSG_ERROR([No SAPIs selected.])
++ fi
+ fi
+ fi
diff --git a/dev-lang/php/files/5.1-any/php5-imap-symlink.diff b/dev-lang/php/files/5.1-any/php5-imap-symlink.diff
new file mode 100644
index 0000000..13c2bdd
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/php5-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 00:56:31.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 00:57:03.000000000 +0200
+@@ -146,12 +146,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
+- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK($PHP_LIBDIR)
diff --git a/dev-lang/php/files/5.1-any/php5-iodbc-config.diff b/dev-lang/php/files/5.1-any/php5-iodbc-config.diff
new file mode 100644
index 0000000..b6d1b68
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/php5-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-10 02:08:48.000000000 +0200
++++ ext/odbc/config.m4 2005-08-10 02:09:14.000000000 +0200
+@@ -440,9 +440,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/$PHP_LIBDIR
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/5.1-any/php5-prefork.patch b/dev-lang/php/files/5.1-any/php5-prefork.patch
new file mode 100644
index 0000000..135579c
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/php5-prefork.patch
@@ -0,0 +1,26 @@
+diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4
+--- php-5.0.4-orig/sapi/apache2filter/config.m4 2005-03-13 20:30:44.767051120 +0000
++++ php-5.0.4/sapi/apache2filter/config.m4 2005-03-13 20:32:01.999310032 +0000
+@@ -115,9 +115,6 @@
+ ;;
+ esac
+
+- if test "$APXS_MPM" != "prefork"; then
+- PHP_BUILD_THREAD_SAFE
+- fi
+ AC_MSG_RESULT(yes)
+
+ PHP_SUBST(APXS)
+diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4
+--- php-5.0.4-orig/sapi/apache2handler/config.m4 2005-03-13 20:30:44.771050512 +0000
++++ php-5.0.4/sapi/apache2handler/config.m4 2005-03-13 20:31:50.106118072 +0000
+@@ -114,9 +114,6 @@
+ ;;
+ esac
+
+- if test "$APXS_MPM" != "prefork"; then
+- PHP_BUILD_THREAD_SAFE
+- fi
+ AC_MSG_RESULT(yes)
+
+ PHP_SUBST(APXS)
diff --git a/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff b/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff
new file mode 100644
index 0000000..626ac67
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff
@@ -0,0 +1,35 @@
+diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c
+--- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300
++++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300
+@@ -1341,16 +1341,21 @@
+ soap_obj = NULL;
+ #if HAVE_PHP_SESSION
+ /* If persistent then set soap_obj from from the previous created session (if available) */
++ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!!
+ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ zval **tmp_soap;
+
++ bzero(soapname,32+sizeof("_bogus_session_name"));
++ strncpy(soapname,service->soap_class.ce->name,32);
++ strcat(soapname,"_bogus_session_name");
++
+ if (PS(session_status) != php_session_active &&
+ PS(session_status) != php_session_disabled) {
+ php_session_start(TSRMLS_C);
+ }
+
+ /* Find the soap object and assign */
+- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS &&
++ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS &&
+ Z_TYPE_PP(tmp_soap) == IS_OBJECT &&
+ Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) {
+ soap_obj = *tmp_soap;
+@@ -1432,7 +1437,7 @@
+ /* If session then update session hash with new object */
+ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ zval **tmp_soap_pp;
+- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
++ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
+ soap_obj = *tmp_soap_pp;
+ }
+ } else {
diff --git a/dev-lang/php/files/5.1-any/php5-with-iodbc.diff b/dev-lang/php/files/5.1-any/php5-with-iodbc.diff
new file mode 100644
index 0000000..81afcc0
--- /dev/null
+++ b/dev-lang/php/files/5.1-any/php5-with-iodbc.diff
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
+ #define SQL_CURSOR_DYNAMIC 2UL
diff --git a/dev-lang/php/files/5.1.0/CVS/Entries b/dev-lang/php/files/5.1.0/CVS/Entries
new file mode 100644
index 0000000..ed09a85
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/CVS/Entries
@@ -0,0 +1,7 @@
+D/apache-1.3////
+D/apache-2.0////
+/php5-imap-symlink.diff/1.1/Sun Sep 4 22:21:18 2005//T1.1
+/php5-iodbc-config.diff/1.1/Sun Sep 4 22:21:18 2005//T1.1
+/php5-prefork.patch/1.1/Sun Sep 4 22:21:18 2005//T1.1
+/php5-with-iodbc.diff/1.1/Sun Sep 4 22:21:18 2005//T1.1
+/php5_soap_persistence_session.diff/1.1/Sun Sep 4 22:21:18 2005//T1.1
diff --git a/dev-lang/php/files/5.1.0/CVS/Repository b/dev-lang/php/files/5.1.0/CVS/Repository
new file mode 100644
index 0000000..530f59a
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1.0
diff --git a/dev-lang/php/files/5.1.0/CVS/Root b/dev-lang/php/files/5.1.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1.0/CVS/Tag b/dev-lang/php/files/5.1.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf
new file mode 100644
index 0000000..c6f1426
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1.0/apache-1.3/CVS/Entries b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Entries
new file mode 100644
index 0000000..3351de7
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php5.conf/1.1/Sun Sep 4 16:58:08 2005//T1.1
+D
diff --git a/dev-lang/php/files/5.1.0/apache-1.3/CVS/Repository b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Repository
new file mode 100644
index 0000000..d340800
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1.0/apache-1.3
diff --git a/dev-lang/php/files/5.1.0/apache-1.3/CVS/Root b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1.0/apache-1.3/CVS/Tag b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-1.3/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf
new file mode 100644
index 0000000..40dfa86
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1.0/apache-2.0/CVS/Entries b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Entries
new file mode 100644
index 0000000..3351de7
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Entries
@@ -0,0 +1,2 @@
+/70_mod_php5.conf/1.1/Sun Sep 4 16:58:08 2005//T1.1
+D
diff --git a/dev-lang/php/files/5.1.0/apache-2.0/CVS/Repository b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Repository
new file mode 100644
index 0000000..1039330
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1.0/apache-2.0
diff --git a/dev-lang/php/files/5.1.0/apache-2.0/CVS/Root b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1.0/apache-2.0/CVS/Tag b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-2.0/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1.0/php5-imap-symlink.diff b/dev-lang/php/files/5.1.0/php5-imap-symlink.diff
new file mode 100644
index 0000000..13c2bdd
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/php5-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 00:56:31.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 00:57:03.000000000 +0200
+@@ -146,12 +146,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
+- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK($PHP_LIBDIR)
diff --git a/dev-lang/php/files/5.1.0/php5-iodbc-config.diff b/dev-lang/php/files/5.1.0/php5-iodbc-config.diff
new file mode 100644
index 0000000..b6d1b68
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/php5-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-10 02:08:48.000000000 +0200
++++ ext/odbc/config.m4 2005-08-10 02:09:14.000000000 +0200
+@@ -440,9 +440,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/$PHP_LIBDIR
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/5.1.0/php5-prefork.patch b/dev-lang/php/files/5.1.0/php5-prefork.patch
new file mode 100644
index 0000000..135579c
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/php5-prefork.patch
@@ -0,0 +1,26 @@
+diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4
+--- php-5.0.4-orig/sapi/apache2filter/config.m4 2005-03-13 20:30:44.767051120 +0000
++++ php-5.0.4/sapi/apache2filter/config.m4 2005-03-13 20:32:01.999310032 +0000
+@@ -115,9 +115,6 @@
+ ;;
+ esac
+
+- if test "$APXS_MPM" != "prefork"; then
+- PHP_BUILD_THREAD_SAFE
+- fi
+ AC_MSG_RESULT(yes)
+
+ PHP_SUBST(APXS)
+diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4
+--- php-5.0.4-orig/sapi/apache2handler/config.m4 2005-03-13 20:30:44.771050512 +0000
++++ php-5.0.4/sapi/apache2handler/config.m4 2005-03-13 20:31:50.106118072 +0000
+@@ -114,9 +114,6 @@
+ ;;
+ esac
+
+- if test "$APXS_MPM" != "prefork"; then
+- PHP_BUILD_THREAD_SAFE
+- fi
+ AC_MSG_RESULT(yes)
+
+ PHP_SUBST(APXS)
diff --git a/dev-lang/php/files/5.1.0/php5-with-iodbc.diff b/dev-lang/php/files/5.1.0/php5-with-iodbc.diff
new file mode 100644
index 0000000..81afcc0
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/php5-with-iodbc.diff
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
+ #define SQL_CURSOR_DYNAMIC 2UL
diff --git a/dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff b/dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff
new file mode 100644
index 0000000..626ac67
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff
@@ -0,0 +1,35 @@
+diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c
+--- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300
++++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300
+@@ -1341,16 +1341,21 @@
+ soap_obj = NULL;
+ #if HAVE_PHP_SESSION
+ /* If persistent then set soap_obj from from the previous created session (if available) */
++ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!!
+ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ zval **tmp_soap;
+
++ bzero(soapname,32+sizeof("_bogus_session_name"));
++ strncpy(soapname,service->soap_class.ce->name,32);
++ strcat(soapname,"_bogus_session_name");
++
+ if (PS(session_status) != php_session_active &&
+ PS(session_status) != php_session_disabled) {
+ php_session_start(TSRMLS_C);
+ }
+
+ /* Find the soap object and assign */
+- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS &&
++ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS &&
+ Z_TYPE_PP(tmp_soap) == IS_OBJECT &&
+ Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) {
+ soap_obj = *tmp_soap;
+@@ -1432,7 +1437,7 @@
+ /* If session then update session hash with new object */
+ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ zval **tmp_soap_pp;
+- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
++ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
+ soap_obj = *tmp_soap_pp;
+ }
+ } else {
diff --git a/dev-lang/php/files/5.1.1/CVS/Entries b/dev-lang/php/files/5.1.1/CVS/Entries
new file mode 100644
index 0000000..6ac9f90
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/CVS/Entries
@@ -0,0 +1,4 @@
+/php5.1.1-curl-gcry_threads.patch/1.1/Thu Jan 5 17:23:22 2006/-ko/T1.1
+/php5.1.1-ming-config.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+/php5.1.1-multilib-search-path.patch/1.1/Wed Jan 4 09:24:48 2006/-ko/T1.1
+D
diff --git a/dev-lang/php/files/5.1.1/CVS/Repository b/dev-lang/php/files/5.1.1/CVS/Repository
new file mode 100644
index 0000000..f3e8b27
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/5.1.1
diff --git a/dev-lang/php/files/5.1.1/CVS/Root b/dev-lang/php/files/5.1.1/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/5.1.1/CVS/Tag b/dev-lang/php/files/5.1.1/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch b/dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch
new file mode 100644
index 0000000..486006a
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/php5.1.1-curl-gcry_threads.patch
@@ -0,0 +1,11 @@
+--- ext/curl/interface.c 2006-01-05 13:50:45.000000000 +0100
++++ ext/curl/interface.c 2006-01-05 13:51:03.000000000 +0100
+@@ -1673,7 +1673,7 @@
+ }
+
+ static struct gcry_thread_cbs php_curl_gnutls_tsl = {
+- GCRY_THREAD_OPTIONS_USER,
++ GCRY_THREAD_OPTION_USER,
+ NULL,
+ php_curl_ssl_mutex_create,
+ php_curl_ssl_mutex_destroy,
diff --git a/dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch b/dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch
new file mode 100644
index 0000000..735e146
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/php5.1.1-ming-config.patch
@@ -0,0 +1,23 @@
+--- ext/ming/config.m4 2005/11/24 00:51:42 1.22.2.3
++++ ext/ming/config.m4 2005/11/27 23:22:42 1.22.2.4
+@@ -72,13 +72,13 @@ yes
+ AC_DEFINE(HAVE_NEW_MING, 1, [ ])
+ dnl FIXME: This is now unconditional..better check coming later.
+ AC_DEFINE(HAVE_MING_ZLIB, 1, [ ])
+- AC_TRY_COMPILE([
+-#include <ming.h>
+-int main(int,void) {
+- SWFMovie_output(NULL, NULL, NULL, 0));
+- return 0;
+-}
+- ], [ AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, []) ])
++
++ AC_TRY_COMPILE([#include <ming.h>],
++ [
++int main(int,void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; }
++ ], [
++ AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, [ ])
++ ], [])
+ ])
+ CPPFLAGS=$old_CPPFLAGS
+
diff --git a/dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch b/dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch
new file mode 100644
index 0000000..0e21e06
--- /dev/null
+++ b/dev-lang/php/files/5.1.1/php5.1.1-multilib-search-path.patch
@@ -0,0 +1,265 @@
+diff -Nru php-5.1.1.orig/acinclude.m4 php-5.1.1/acinclude.m4
+--- php-5.1.1.orig/acinclude.m4 2005-11-22 00:08:01.000000000 +0100
++++ php-5.1.1/acinclude.m4 2005-12-07 19:20:13.000000000 +0100
+@@ -441,7 +441,7 @@
+ dnl Adds a path to linkpath/runpath (LDFLAGS)
+ dnl
+ AC_DEFUN([PHP_ADD_LIBPATH],[
+- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
++ if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib" && test "$1" != "/usr/lib64"; then
+ PHP_EXPAND_PATH($1, ai_p)
+ ifelse([$2],,[
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
+@@ -1932,7 +1932,7 @@
+ dnl Search for the sendmail binary
+ dnl
+ AC_DEFUN([PHP_PROG_SENDMAIL], [
+- PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
++ PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64
+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
+ if test -n "$PROG_SENDMAIL"; then
+ AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
+diff -Nru php-5.1.1.orig/ext/interbase/config.m4 php-5.1.1/ext/interbase/config.m4
+--- php-5.1.1.orig/ext/interbase/config.m4 2004-05-12 16:29:42.000000000 +0200
++++ php-5.1.1/ext/interbase/config.m4 2005-12-07 19:29:06.000000000 +0100
+@@ -9,10 +9,18 @@
+ if test "$PHP_INTERBASE" != "no"; then
+ if test "$PHP_INTERBASE" = "yes"; then
+ IBASE_INCDIR=/usr/interbase/include
+- IBASE_LIBDIR=/usr/interbase/lib
++ for j in lib64 lib; do
++ if test -d /usr/interbase/$j; then
++ IBASE_LIBDIR=/usr/interbase/$j
++ fi
++ done
+ else
+ IBASE_INCDIR=$PHP_INTERBASE/include
+- IBASE_LIBDIR=$PHP_INTERBASE/lib
++ for j in lib64 lib; do
++ if test -d $PHP_INTERBASE/$j; then
++ IBASE_LIBDIR=$PHP_INTERBASE/$j
++ fi
++ done
+ fi
+
+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
+diff -Nru php-5.1.1.orig/ext/mbstring/config.m4 php-5.1.1/ext/mbstring/config.m4
+--- php-5.1.1.orig/ext/mbstring/config.m4 2005-10-28 09:52:58.000000000 +0200
++++ php-5.1.1/ext/mbstring/config.m4 2005-12-07 21:08:10.000000000 +0100
+@@ -261,7 +261,7 @@
+ ],[
+ AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.])
+ ], [
+- -LPHP_LIBMBFL/$PHP_LIBDIR
++ -L$PHP_LIBMBFL/$PHP_LIBDIR
+ ])
+ fi
+ ])
+diff -Nru php-5.1.1.orig/ext/mcrypt/config.m4 php-5.1.1/ext/mcrypt/config.m4
+--- php-5.1.1.orig/ext/mcrypt/config.m4 2005-05-30 01:16:41.000000000 +0200
++++ php-5.1.1/ext/mcrypt/config.m4 2005-12-07 20:36:01.000000000 +0100
+@@ -34,6 +34,12 @@
+
+ PHP_MCRYPT_CHECK_VERSION
+
++ for j in lib64 lib; do
++ if test -d $MCRYPT_DIR/$j; then
++ MCRYPT_LIBDIR=MCRYPT_DIR/$j
++ fi
++ done
++
+ PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
+ [
+ PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
+@@ -45,13 +51,13 @@
+ ],[
+ AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
+ ],[
+- -L$MCRYPT_DIR/lib
++ -L$MCRYPT_LIBDIR
+ ])
+ ],[
+- -L$MCRYPT_DIR/lib -lltdl
++ -L$MCRYPT_LIBDIR -lltdl
+ ])
+
+- PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_LIBDIR, MCRYPT_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($MCRYPT_DIR/include)
+
+ PHP_SUBST(MCRYPT_SHARED_LIBADD)
+diff -Nru php-5.1.1.orig/ext/mhash/config.m4 php-5.1.1/ext/mhash/config.m4
+--- php-5.1.1.orig/ext/mhash/config.m4 2005-05-30 01:16:41.000000000 +0200
++++ php-5.1.1/ext/mhash/config.m4 2005-12-07 20:39:31.000000000 +0100
+@@ -14,8 +14,14 @@
+ AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h)
+ fi
+
++ for j in lib64 lib; do
++ if test -d $MHASH_DIR/$j; then
++ MHASH_LIBDIR=$MHASH_DIR/$j
++ fi
++ done
++
+ PHP_ADD_INCLUDE($MHASH_DIR/include)
+- PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_LIBDIR, MHASH_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared)
+ PHP_SUBST(MHASH_SHARED_LIBADD)
+diff -Nru php-5.1.1.orig/ext/msession/config.m4 php-5.1.1/ext/msession/config.m4
+--- php-5.1.1.orig/ext/msession/config.m4 2003-02-12 19:34:20.000000000 +0100
++++ php-5.1.1/ext/msession/config.m4 2005-12-07 20:44:41.000000000 +0100
+@@ -8,13 +8,17 @@
+ if test "$PHP_MSESSION" != "no"; then
+ if test -r $PHP_MSESSION/lib/libphoenix.a; then
+ PHOENIX_DIR=$PHP_MSESSION
++ PHOENIX_LIBDIR=$PHP_MSESSION/lib
+ else
+ AC_MSG_CHECKING(for msession in default path)
+- for i in /usr/local/phoenix /usr/local /usr; do
+- if test -r $i/lib/libphoenix.a; then
+- PHOENIX_DIR=$i
+- AC_MSG_RESULT(found in $i)
+- fi
++ for j in lib64 lib; do
++ for i in /usr/local/phoenix /usr/local /usr; do
++ if test -r $i/$j/libphoenix.a; then
++ PHOENIX_DIR=$i
++ PHOENIX_LIBDIR=$i/$j
++ AC_MSG_RESULT(found in $i)
++ fi
++ done
+ done
+ fi
+
+@@ -25,7 +29,7 @@
+
+
+ AC_DEFINE(HAVE_MSESSION, 1, [ ])
+- PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB)
++ PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_LIBDIR", PHOENIX_LIB)
+ PHOENIX_INCLUDE="-I$PHOENIX_DIR"
+ PHP_SUBST(PHOENIX_LIB)
+
+diff -Nru php-5.1.1.orig/ext/odbc/config.m4 php-5.1.1/ext/odbc/config.m4
+--- php-5.1.1.orig/ext/odbc/config.m4 2005-11-21 20:06:02.000000000 +0100
++++ php-5.1.1/ext/odbc/config.m4 2005-12-07 21:03:38.000000000 +0100
+@@ -141,7 +141,7 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_INCLUDE($withval/incl)
+- PHP_ADD_LIBPATH($withval/lib)
++ PHP_ADD_LIBPATH($withval/$PHP_LIBDIR)
+ PHP_ADD_LIBRARY(sqlod)
+ ODBC_TYPE=sapdb
+ AC_DEFINE(HAVE_SAPDB,1,[ ])
+@@ -439,7 +439,7 @@
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/$PHP_LIBDIR)
+ PHP_ADD_INCLUDE($withval/include, 1)
+ ODBC_TYPE=iodbc
+ ODBC_INCLUDE=-I$withval/include
+diff -Nru php-5.1.1.orig/ext/pdo_firebird/config.m4 php-5.1.1/ext/pdo_firebird/config.m4
+--- php-5.1.1.orig/ext/pdo_firebird/config.m4 2005-06-14 02:00:52.000000000 +0200
++++ php-5.1.1/ext/pdo_firebird/config.m4 2005-12-07 21:15:34.000000000 +0100
+@@ -14,7 +14,11 @@
+ FIREBIRD_LIBDIR=/opt/firebird/lib
+ else
+ FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
+- FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/lib
++ for j in lib64 lib; do
++ if test -d $PHP_PDO_FIREBIRD/$j; then
++ FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$j
++ fi
++ done
+ fi
+
+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
+diff -Nru php-5.1.1.orig/ext/pdo_mysql/config.m4 php-5.1.1/ext/pdo_mysql/config.m4
+--- php-5.1.1.orig/ext/pdo_mysql/config.m4 2005-11-25 18:07:49.000000000 +0100
++++ php-5.1.1/ext/pdo_mysql/config.m4 2005-12-07 21:21:27.000000000 +0100
+@@ -65,7 +65,11 @@
+ else
+ PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include
+ fi
+- if test -r $PDO_MYSQL_DIR/lib/mysql; then
++ if test -r $PDO_MYSQL_DIR/lib64/mysql; then
++ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib64/mysql
++ elif test -r $PDO_MYSQL_DIR/lib64; then
++ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib64
++ elif test -r $PDO_MYSQL_DIR/lib/mysql; then
+ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib/mysql
+ else
+ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib
+diff -Nru php-5.1.1.orig/ext/pdo_odbc/config.m4 php-5.1.1/ext/pdo_odbc/config.m4
+--- php-5.1.1.orig/ext/pdo_odbc/config.m4 2005-07-27 05:22:02.000000000 +0200
++++ php-5.1.1/ext/pdo_odbc/config.m4 2005-12-07 21:40:11.000000000 +0100
+@@ -99,7 +99,7 @@
+
+ if test -n "$pdo_odbc_dir"; then
+ PDO_ODBC_INCDIR="$pdo_odbc_dir/include"
+- PDO_ODBC_LIBDIR="$pdo_odbc_dir/lib"
++ PDO_ODBC_LIBDIR="$pdo_odbc_dir/$PHP_LIBDIR"
+ else
+ PDO_ODBC_INCDIR="$pdo_odbc_def_incdir"
+ PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir"
+diff -Nru php-5.1.1.orig/ext/pdo_pgsql/config.m4 php-5.1.1/ext/pdo_pgsql/config.m4
+--- php-5.1.1.orig/ext/pdo_pgsql/config.m4 2005-07-27 04:51:01.000000000 +0200
++++ php-5.1.1/ext/pdo_pgsql/config.m4 2005-12-07 21:52:03.000000000 +0100
+@@ -46,7 +46,7 @@
+ fi
+ done
+
+- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do
++ for j in lib64 lib $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do
+ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
+ PGSQL_LIBDIR=$i/$j
+ fi
+diff -Nru php-5.1.1.orig/ext/pdo_sqlite/config.m4 php-5.1.1/ext/pdo_sqlite/config.m4
+--- php-5.1.1.orig/ext/pdo_sqlite/config.m4 2005-11-01 04:13:32.000000000 +0100
++++ php-5.1.1/ext/pdo_sqlite/config.m4 2005-12-07 21:49:57.000000000 +0100
+@@ -54,12 +54,12 @@
+
+ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
+ [
+- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_SQLITE_DIR/lib, PDO_SQLITE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_SQLITE_DIR/$PHP_LIBDIR, PDO_SQLITE_SHARED_LIBADD)
+ AC_DEFINE(HAVE_PDO_SQLITELIB,1,[ ])
+ ],[
+ AC_MSG_ERROR([wrong sqlite lib version or lib not found])
+ ],[
+- -L$PDO_SQLITE_DIR/lib -lm
++ -L$PDO_SQLITE_DIR/$PHP_LIBDIR -lm
+ ])
+ PHP_CHECK_LIBRARY(sqlite3,sqlite3_key,[
+ AC_DEFINE(HAVE_SQLITE3_KEY,1, [have commercial sqlite3 with crypto support])
+diff -Nru php-5.1.1.orig/ext/snmp/config.m4 php-5.1.1/ext/snmp/config.m4
+--- php-5.1.1.orig/ext/snmp/config.m4 2005-05-30 01:16:44.000000000 +0200
++++ php-5.1.1/ext/snmp/config.m4 2005-12-07 21:53:42.000000000 +0100
+@@ -45,8 +45,8 @@
+ test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp
+ test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp
+ done
+- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do
+- test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib
++ for i in /usr/lib /usr/lib64 /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do
++ test -f $i/libsnmp.a -o -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i
+ done
+ else
+ SNMP_INCDIR=$PHP_SNMP/include
+diff -Nru php-5.1.1.orig/ext/tidy/config.m4 php-5.1.1/ext/tidy/config.m4
+--- php-5.1.1.orig/ext/tidy/config.m4 2005-05-30 01:16:45.000000000 +0200
++++ php-5.1.1/ext/tidy/config.m4 2005-12-07 21:54:51.000000000 +0100
+@@ -27,7 +27,7 @@
+ AC_MSG_ERROR(Cannot find libtidy)
+ fi
+
+- TIDY_LIBDIR=$TIDY_DIR/lib
++ TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
+
+ PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($TIDY_INCDIR)
diff --git a/dev-lang/php/files/70_mod_php.conf-apache1 b/dev-lang/php/files/70_mod_php.conf-apache1
new file mode 100644
index 0000000..60a1fe6
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php.conf-apache1
@@ -0,0 +1,18 @@
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php.conf-apache2 b/dev-lang/php/files/70_mod_php.conf-apache2
new file mode 100644
index 0000000..d3ca2ea
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php.conf-apache2
@@ -0,0 +1,18 @@
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5.conf-apache1 b/dev-lang/php/files/70_mod_php5.conf-apache1
new file mode 100644
index 0000000..1aee813
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5.conf-apache1
@@ -0,0 +1,19 @@
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5.conf-apache2 b/dev-lang/php/files/70_mod_php5.conf-apache2
new file mode 100644
index 0000000..ecf1152
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5.conf-apache2
@@ -0,0 +1,19 @@
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5.conf-apache2-r1 b/dev-lang/php/files/70_mod_php5.conf-apache2-r1
new file mode 100644
index 0000000..50911ad
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5.conf-apache2-r1
@@ -0,0 +1,17 @@
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <FilesMatch "\.ph(p5?|tml)$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+
+ DirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5_concurr.conf-apache2 b/dev-lang/php/files/70_mod_php5_concurr.conf-apache2
new file mode 100644
index 0000000..f95db6f
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5_concurr.conf-apache2
@@ -0,0 +1,17 @@
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php5 .php
+ AddType application/x-httpd-php5 .phtml
+ AddType application/x-httpd-php5 .php5
+ AddType application/x-httpd-php5-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5_concurr.conf-apache2-r1 b/dev-lang/php/files/70_mod_php5_concurr.conf-apache2-r1
new file mode 100644
index 0000000..cd1c380
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5_concurr.conf-apache2-r1
@@ -0,0 +1,17 @@
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <FilesMatch "\.ph(p5?|tml)$">
+ SetHandler application/x-httpd-php5
+ </FilesMatch>
+
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php5-source
+ </FilesMatch>
+
+ DirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php_concurr.conf-apache2 b/dev-lang/php/files/70_mod_php_concurr.conf-apache2
new file mode 100644
index 0000000..64f5b91
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php_concurr.conf-apache2
@@ -0,0 +1,15 @@
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php4 .php3
+ AddType application/x-httpd-php4 .php4
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/CVS/Entries b/dev-lang/php/files/CVS/Entries
new file mode 100644
index 0000000..63c509d
--- /dev/null
+++ b/dev-lang/php/files/CVS/Entries
@@ -0,0 +1,134 @@
+D/4-any////
+D/4.3.11////
+D/4.4.0////
+D/4.4.1////
+D/5.0-any////
+D/5.0.0////
+D/5.0.4////
+D/5.0.5////
+D/5.1-any////
+D/5.1.0////
+D/5.1.1////
+D/eblits////
+/.frozen/1.1/Thu Jul 3 02:11:34 2003//T1.1
+/20php4-envd/1.1/Mon Mar 5 02:14:44 2007//T1.1
+/20php5-envd/1.1/Mon Mar 5 02:14:44 2007//T1.1
+/70_mod_php.conf-apache1/1.1/Sun Mar 12 13:25:34 2006/-ko/T1.1
+/70_mod_php.conf-apache2/1.1/Sun Mar 12 13:25:34 2006/-ko/T1.1
+/70_mod_php5.conf-apache1/1.1/Sun Mar 12 13:25:34 2006/-ko/T1.1
+/70_mod_php5.conf-apache2/1.1/Sun Mar 12 13:25:34 2006/-ko/T1.1
+/70_mod_php5.conf-apache2-r1/1.1/Sun Jan 11 21:16:32 2009//T1.1
+/70_mod_php5_concurr.conf-apache2/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/70_mod_php5_concurr.conf-apache2-r1/1.1/Sun Jan 11 21:16:32 2009//T1.1
+/70_mod_php_concurr.conf-apache2/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/digest-php-4.0.4_p1/1.1/Sun Apr 29 18:56:12 2001//T1.1
+/digest-php-4.0.5/1.1/Sun May 6 18:06:22 2001//T1.1
+/digest-php-4.0.6/1.1/Sun Jul 1 21:03:17 2001//T1.1
+/digest-php-4.0.6-r1/1.1/Thu Jul 5 00:32:00 2001//T1.1
+/digest-php-4.0.6-r2/1.1/Sat Oct 6 14:36:55 2001//T1.1
+/digest-php-4.0.6-r3/1.1/Sun Nov 11 13:12:00 2001//T1.1
+/digest-php-4.0.6-r4/1.1/Tue Feb 12 17:44:44 2002//T1.1
+/digest-php-4.0.6-r5/1.1/Mon Feb 18 21:01:05 2002//T1.1
+/digest-php-4.0.6-r700/1.1/Fri Dec 7 19:18:16 2001//T1.1
+/digest-php-4.1.1/1.1/Thu Jan 3 15:50:25 2002//T1.1
+/digest-php-4.1.1-r1/1.1/Wed Feb 6 17:00:46 2002//T1.1
+/digest-php-4.1.1-r2/1.1/Tue Feb 12 17:44:44 2002//T1.1
+/digest-php-4.1.1-r3/1.1/Mon Feb 18 21:01:05 2002//T1.1
+/digest-php-4.1.1-r4/1.1/Sat Feb 23 20:35:19 2002//T1.1
+/digest-php-4.1.1-r5/1.1/Mon Feb 25 19:50:23 2002//T1.1
+/digest-php-4.1.2/1.1/Thu Feb 28 05:29:22 2002//T1.1
+/digest-php-4.1.2-r1/1.1/Thu Feb 28 07:07:57 2002//T1.1
+/digest-php-4.1.2-r2/1.1/Thu Mar 7 08:25:46 2002//T1.1
+/digest-php-4.1.2-r3/1.1/Wed Mar 13 20:49:20 2002//T1.1
+/digest-php-4.1.2-r4/1.1/Tue Apr 9 23:59:01 2002//T1.1
+/digest-php-4.1.2-r5/1.1/Thu Apr 11 04:34:21 2002//T1.1
+/digest-php-4.1.2-r6/1.1/Fri Apr 12 21:20:16 2002//T1.1
+/digest-php-4.1.2-r7/1.1/Mon Apr 15 20:12:42 2002//T1.1
+/digest-php-4.1.2-r8/1.1/Sat Apr 27 09:26:07 2002//T1.1
+/digest-php-4.1.2-r9/1.1/Sun May 5 23:45:44 2002//T1.1
+/digest-php-4.2.0/1.1/Wed May 8 07:01:25 2002//T1.1
+/digest-php-4.2.1/1.1/Sun May 19 23:04:16 2002//T1.1
+/digest-php-4.2.1-r1/1.1/Tue May 21 15:45:15 2002//T1.1
+/digest-php-4.2.1-r2/1.1/Mon Jul 8 15:24:41 2002//T1.1
+/digest-php-4.2.1-r3/1.1/Tue Jul 9 19:10:58 2002//T1.1
+/digest-php-4.3.11/1.1/Sun Sep 11 18:57:09 2005//T1.1
+/digest-php-4.3.11-r1/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/digest-php-4.3.11-r2/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/digest-php-4.3.11-r3/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/digest-php-4.3.11-r4/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/digest-php-4.3.11-r5/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/digest-php-4.4.0/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/digest-php-4.4.0-r1/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/digest-php-4.4.0-r2/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/digest-php-4.4.0-r3/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/digest-php-4.4.0-r4/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/digest-php-4.4.1/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/digest-php-4.4.1-r1/1.1/Thu Nov 3 23:54:59 2005//T1.1
+/digest-php-4.4.1-r2/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/digest-php-4.4.1-r3/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/digest-php-4.4.2/1.1/Sun Mar 12 13:25:34 2006//T1.1
+/digest-php-4.4.2-r1/1.1/Thu Apr 13 20:28:58 2006//T1.1
+/digest-php-4.4.2-r2/1.1/Fri May 5 10:28:58 2006//T1.1
+/digest-php-4.4.2-r3/1.1/Mon May 29 22:07:20 2006//T1.1
+/digest-php-4.4.2-r5/1.1/Tue Jun 20 20:38:58 2006//T1.1
+/digest-php-4.4.2-r6/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/digest-php-4.4.3-r1/1.1/Thu Aug 10 16:31:49 2006//T1.1
+/digest-php-4.4.4/1.1/Tue Aug 29 19:55:32 2006//T1.1
+/digest-php-4.4.4-r1/1.1/Tue Aug 29 23:05:20 2006//T1.1
+/digest-php-4.4.4-r2/1.1/Wed Aug 30 11:17:26 2006//T1.1
+/digest-php-4.4.4-r4/1.1/Sun Sep 10 12:48:50 2006//T1.1
+/digest-php-4.4.4-r6/1.1/Sat Oct 7 20:22:39 2006//T1.1
+/digest-php-4.4.4-r8/1.1/Fri Oct 27 12:17:35 2006//T1.1
+/digest-php-4.4.6/1.1/Mon Mar 5 02:14:44 2007//T1.1
+/digest-php-4.4.7/1.1/Mon May 7 21:56:24 2007//T1.1
+/digest-php-4.4.8/1.1/Tue Jan 8 17:28:27 2008//T1.1
+/digest-php-4.4.8_pre20070816/1.1/Sat Aug 18 13:11:23 2007//T1.1
+/digest-php-5.0.4/1.1/Sun Sep 4 16:58:08 2005//T1.1
+/digest-php-5.0.4-r1/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/digest-php-5.0.4-r2/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/digest-php-5.0.4-r3/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/digest-php-5.0.4-r4/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/digest-php-5.0.5/1.1/Tue Sep 6 14:54:15 2005//T1.1
+/digest-php-5.0.5-r1/1.1/Sun Sep 18 13:21:54 2005//T1.1
+/digest-php-5.0.5-r2/1.1/Mon Oct 31 14:10:39 2005//T1.1
+/digest-php-5.0.5-r3/1.1/Thu Nov 3 14:09:24 2005//T1.1
+/digest-php-5.0.5-r4/1.1/Fri Nov 4 12:45:21 2005//T1.1
+/digest-php-5.0.5-r5/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/digest-php-5.1.1/1.1/Wed Jan 4 09:24:47 2006//T1.1
+/digest-php-5.1.2/1.1/Sun Mar 12 13:25:34 2006//T1.1
+/digest-php-5.1.2-r1/1.1/Thu Apr 13 20:28:58 2006//T1.1
+/digest-php-5.1.4/1.1/Fri May 5 10:28:58 2006//T1.1
+/digest-php-5.1.4-r1/1.1/Mon May 29 22:07:20 2006//T1.1
+/digest-php-5.1.4-r3/1.1/Tue Jun 20 20:38:58 2006//T1.1
+/digest-php-5.1.4-r4/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/digest-php-5.1.4-r6/1.1/Thu Aug 10 16:31:49 2006//T1.1
+/digest-php-5.1.6/1.1/Tue Aug 29 19:55:32 2006//T1.1
+/digest-php-5.1.6-r1/1.1/Tue Aug 29 23:05:20 2006//T1.1
+/digest-php-5.1.6-r11/1.1/Mon Mar 5 02:14:44 2007//T1.1
+/digest-php-5.1.6-r2/1.1/Wed Aug 30 11:17:26 2006//T1.1
+/digest-php-5.1.6-r4/1.1/Sun Sep 10 12:48:50 2006//T1.1
+/digest-php-5.1.6-r6/1.1/Sat Oct 7 20:22:39 2006//T1.1
+/digest-php-5.1.6-r8/1.1/Fri Oct 27 12:17:35 2006//T1.1
+/digest-php-5.2.1-r3/1.1/Mon Mar 5 02:14:44 2007//T1.1
+/digest-php-5.2.2-r1/1.1/Mon May 7 21:56:24 2007//T1.1
+/digest-php-5.2.3-r3/1.1/Sun Jul 22 21:16:52 2007//T1.1
+/digest-php-5.2.4/1.1/Sat Sep 8 18:26:37 2007//T1.1
+/digest-php-5.2.4_p20070914/1.1/Fri Sep 14 15:33:29 2007//T1.1
+/digest-php-5.2.4_p20070914-r2/1.1/Wed Sep 19 20:06:05 2007//T1.1
+/digest-php-5.2.4_pre200708051230-r2/1.1/Thu Aug 9 20:01:48 2007//T1.1
+/digest-php-5.2.5/1.1/Fri Nov 9 22:44:31 2007//T1.1
+/digest-php-5.2.5-r1/1.1/Sat Dec 8 23:23:39 2007//T1.1
+/mod_php.conf/1.1/Thu Apr 11 04:34:21 2002//T1.1
+/php-5.2.10-pdo_dblib.patch/1.1/Thu Sep 24 23:36:55 2009//T1.1
+/php-5.2.12-libpng14.patch/1.1/Sat Mar 13 18:23:22 2010//T1.1
+/php-fpm-gentooified-5.3.4.patch/1.1/Sun Dec 19 22:45:22 2010//T1.1
+/php-fpm-gentooified.patch/1.1/Mon Jul 26 13:42:12 2010//T1.1
+/php-fpm-r0.conf/1.1/Sat Jul 23 10:14:46 2011//T1.1
+/php-fpm-r1.conf/1.1/Sat Jul 23 10:14:46 2011//T1.1
+/php-fpm-r1.init/1.1/Tue Oct 19 20:07:25 2010//T1.1
+/php-fpm-r3.init/1.1/Sun Dec 19 22:45:22 2010//T1.1
+/php-fpm-r4.init/1.1/Sat Jul 23 10:14:46 2011//T1.1
+/php-fpm.conf/1.1/Tue Dec 21 09:09:17 2010//T1.1
+/php-fpm.init/1.1/Mon Jul 26 13:42:12 2010//T1.1
+/php4-ldvs/1.1/Fri Jul 14 16:04:37 2006//T1.1
+/php5-ldvs/1.1/Fri Jul 14 16:04:37 2006//T1.1
diff --git a/dev-lang/php/files/CVS/Repository b/dev-lang/php/files/CVS/Repository
new file mode 100644
index 0000000..71153e2
--- /dev/null
+++ b/dev-lang/php/files/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files
diff --git a/dev-lang/php/files/CVS/Root b/dev-lang/php/files/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/CVS/Tag b/dev-lang/php/files/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/digest-php-4.0.4_p1 b/dev-lang/php/files/digest-php-4.0.4_p1
new file mode 100644
index 0000000..a4a8e85
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.4_p1
@@ -0,0 +1,2 @@
+MD5 ae3ab0105154dddea1fa2ca18a902f85 php-4.0.4pl1.tar.gz
+MD5 20c64ba8d79665e9bfab052fa5a85eab number4.tar.gz
diff --git a/dev-lang/php/files/digest-php-4.0.5 b/dev-lang/php/files/digest-php-4.0.5
new file mode 100644
index 0000000..84b7f97
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.5
@@ -0,0 +1 @@
+MD5 763739f64eeac7099035fd86c1d39ad2 php-4.0.5.tar.gz
diff --git a/dev-lang/php/files/digest-php-4.0.6 b/dev-lang/php/files/digest-php-4.0.6
new file mode 100644
index 0000000..b0cf774
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz
diff --git a/dev-lang/php/files/digest-php-4.0.6-r1 b/dev-lang/php/files/digest-php-4.0.6-r1
new file mode 100644
index 0000000..b0cf774
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6-r1
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz
diff --git a/dev-lang/php/files/digest-php-4.0.6-r2 b/dev-lang/php/files/digest-php-4.0.6-r2
new file mode 100644
index 0000000..b0cf774
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6-r2
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz
diff --git a/dev-lang/php/files/digest-php-4.0.6-r3 b/dev-lang/php/files/digest-php-4.0.6-r3
new file mode 100644
index 0000000..ba2eb04
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6-r3
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz 3158016
diff --git a/dev-lang/php/files/digest-php-4.0.6-r4 b/dev-lang/php/files/digest-php-4.0.6-r4
new file mode 100644
index 0000000..ba2eb04
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6-r4
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz 3158016
diff --git a/dev-lang/php/files/digest-php-4.0.6-r5 b/dev-lang/php/files/digest-php-4.0.6-r5
new file mode 100644
index 0000000..82f9b23
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6-r5
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz 3157346
diff --git a/dev-lang/php/files/digest-php-4.0.6-r700 b/dev-lang/php/files/digest-php-4.0.6-r700
new file mode 100644
index 0000000..ba2eb04
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.0.6-r700
@@ -0,0 +1 @@
+MD5 5f698521cf2b392cf9bfa87fc1a0fe90 php-4.0.6.tar.gz 3158016
diff --git a/dev-lang/php/files/digest-php-4.1.1 b/dev-lang/php/files/digest-php-4.1.1
new file mode 100644
index 0000000..9673f2e
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.1
@@ -0,0 +1 @@
+MD5 776362ff53bf6ea77b60496f6632b6b6 php-4.1.1.tar.gz 3362816
diff --git a/dev-lang/php/files/digest-php-4.1.1-r1 b/dev-lang/php/files/digest-php-4.1.1-r1
new file mode 100644
index 0000000..d7e8f2b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.1-r1
@@ -0,0 +1 @@
+MD5 776362ff53bf6ea77b60496f6632b6b6 php-4.1.1.tar.gz 3356062
diff --git a/dev-lang/php/files/digest-php-4.1.1-r2 b/dev-lang/php/files/digest-php-4.1.1-r2
new file mode 100644
index 0000000..beeab6e
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.1-r2
@@ -0,0 +1 @@
+MD5 776362ff53bf6ea77b60496f6632b6b6 php-4.1.1.tar.gz 3358720
diff --git a/dev-lang/php/files/digest-php-4.1.1-r3 b/dev-lang/php/files/digest-php-4.1.1-r3
new file mode 100644
index 0000000..d7e8f2b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.1-r3
@@ -0,0 +1 @@
+MD5 776362ff53bf6ea77b60496f6632b6b6 php-4.1.1.tar.gz 3356062
diff --git a/dev-lang/php/files/digest-php-4.1.1-r4 b/dev-lang/php/files/digest-php-4.1.1-r4
new file mode 100644
index 0000000..d7e8f2b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.1-r4
@@ -0,0 +1 @@
+MD5 776362ff53bf6ea77b60496f6632b6b6 php-4.1.1.tar.gz 3356062
diff --git a/dev-lang/php/files/digest-php-4.1.1-r5 b/dev-lang/php/files/digest-php-4.1.1-r5
new file mode 100644
index 0000000..d7e8f2b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.1-r5
@@ -0,0 +1 @@
+MD5 776362ff53bf6ea77b60496f6632b6b6 php-4.1.1.tar.gz 3356062
diff --git a/dev-lang/php/files/digest-php-4.1.2 b/dev-lang/php/files/digest-php-4.1.2
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r1 b/dev-lang/php/files/digest-php-4.1.2-r1
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r1
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r2 b/dev-lang/php/files/digest-php-4.1.2-r2
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r2
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r3 b/dev-lang/php/files/digest-php-4.1.2-r3
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r3
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r4 b/dev-lang/php/files/digest-php-4.1.2-r4
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r4
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r5 b/dev-lang/php/files/digest-php-4.1.2-r5
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r5
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r6 b/dev-lang/php/files/digest-php-4.1.2-r6
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r6
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r7 b/dev-lang/php/files/digest-php-4.1.2-r7
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r7
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r8 b/dev-lang/php/files/digest-php-4.1.2-r8
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r8
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.1.2-r9 b/dev-lang/php/files/digest-php-4.1.2-r9
new file mode 100644
index 0000000..b7e2c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.1.2-r9
@@ -0,0 +1 @@
+MD5 75a62553076c20e91d3be575ce158be2 php-4.1.2.tar.gz 3359964
diff --git a/dev-lang/php/files/digest-php-4.2.0 b/dev-lang/php/files/digest-php-4.2.0
new file mode 100644
index 0000000..592a4bd
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.2.0
@@ -0,0 +1 @@
+MD5 88d55481de32ab0168aa580f7b611022 php-4.2.0.tar.gz 3442616
diff --git a/dev-lang/php/files/digest-php-4.2.1 b/dev-lang/php/files/digest-php-4.2.1
new file mode 100644
index 0000000..ceaa1d2
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.2.1
@@ -0,0 +1 @@
+MD5 654983196a94ca91c272a00e877b2b40 php-4.2.1.tar.gz 3376494
diff --git a/dev-lang/php/files/digest-php-4.2.1-r1 b/dev-lang/php/files/digest-php-4.2.1-r1
new file mode 100644
index 0000000..ceaa1d2
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.2.1-r1
@@ -0,0 +1 @@
+MD5 654983196a94ca91c272a00e877b2b40 php-4.2.1.tar.gz 3376494
diff --git a/dev-lang/php/files/digest-php-4.2.1-r2 b/dev-lang/php/files/digest-php-4.2.1-r2
new file mode 100644
index 0000000..ceaa1d2
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.2.1-r2
@@ -0,0 +1 @@
+MD5 654983196a94ca91c272a00e877b2b40 php-4.2.1.tar.gz 3376494
diff --git a/dev-lang/php/files/digest-php-4.2.1-r3 b/dev-lang/php/files/digest-php-4.2.1-r3
new file mode 100644
index 0000000..ceaa1d2
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.2.1-r3
@@ -0,0 +1 @@
+MD5 654983196a94ca91c272a00e877b2b40 php-4.2.1.tar.gz 3376494
diff --git a/dev-lang/php/files/digest-php-4.3.11 b/dev-lang/php/files/digest-php-4.3.11
new file mode 100644
index 0000000..137f89a
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.3.11
@@ -0,0 +1,2 @@
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 bff79f1e088f09337e1a7df03a62ac2f hardening-patch-4.3.11-0.4.2.patch.gz 101840
diff --git a/dev-lang/php/files/digest-php-4.3.11-r1 b/dev-lang/php/files/digest-php-4.3.11-r1
new file mode 100644
index 0000000..8eda7cd
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.3.11-r1
@@ -0,0 +1,3 @@
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.3.11-r2 b/dev-lang/php/files/digest-php-4.3.11-r2
new file mode 100644
index 0000000..6553106
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.3.11-r2
@@ -0,0 +1,3 @@
+MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.3.11-r3 b/dev-lang/php/files/digest-php-4.3.11-r3
new file mode 100644
index 0000000..6553106
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.3.11-r3
@@ -0,0 +1,3 @@
+MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.3.11-r4 b/dev-lang/php/files/digest-php-4.3.11-r4
new file mode 100644
index 0000000..6553106
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.3.11-r4
@@ -0,0 +1,3 @@
+MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.3.11-r5 b/dev-lang/php/files/digest-php-4.3.11-r5
new file mode 100644
index 0000000..c19dd7e
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.3.11-r5
@@ -0,0 +1,3 @@
+MD5 9b0c4b722e6102aa95b475074caac5f7 hardening-patch-4.3.11-0.4.3-gentoo.patch.gz 85180
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.4.0 b/dev-lang/php/files/digest-php-4.4.0
new file mode 100644
index 0000000..f073a5d
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.0
@@ -0,0 +1,2 @@
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 4d489ca6274366c1c1b1407d2ca8f440 hardening-patch-4.4.0-0.4.1.patch.gz 37189
diff --git a/dev-lang/php/files/digest-php-4.4.0-r1 b/dev-lang/php/files/digest-php-4.4.0-r1
new file mode 100644
index 0000000..dd3eed8
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.0-r1
@@ -0,0 +1,3 @@
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.4.0-r2 b/dev-lang/php/files/digest-php-4.4.0-r2
new file mode 100644
index 0000000..5cf0a8b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.0-r2
@@ -0,0 +1,3 @@
+MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.4.0-r3 b/dev-lang/php/files/digest-php-4.4.0-r3
new file mode 100644
index 0000000..5cf0a8b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.0-r3
@@ -0,0 +1,3 @@
+MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.4.0-r4 b/dev-lang/php/files/digest-php-4.4.0-r4
new file mode 100644
index 0000000..5cf0a8b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.0-r4
@@ -0,0 +1,3 @@
+MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-4.4.1 b/dev-lang/php/files/digest-php-4.4.1
new file mode 100644
index 0000000..f88fc54
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.1
@@ -0,0 +1 @@
+MD5 6b5726471189f8a1f26dd7cc5e19b442 php-4.4.1.tar.bz2 4157749
diff --git a/dev-lang/php/files/digest-php-4.4.1-r1 b/dev-lang/php/files/digest-php-4.4.1-r1
new file mode 100644
index 0000000..859996a
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.1-r1
@@ -0,0 +1,2 @@
+MD5 3eef4e232d78ace49f348794072aaa71 hardening-patch-4.4.1-0.4.5.patch.gz 55044
+MD5 6b5726471189f8a1f26dd7cc5e19b442 php-4.4.1.tar.bz2 4157749
diff --git a/dev-lang/php/files/digest-php-4.4.1-r2 b/dev-lang/php/files/digest-php-4.4.1-r2
new file mode 100644
index 0000000..859996a
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.1-r2
@@ -0,0 +1,2 @@
+MD5 3eef4e232d78ace49f348794072aaa71 hardening-patch-4.4.1-0.4.5.patch.gz 55044
+MD5 6b5726471189f8a1f26dd7cc5e19b442 php-4.4.1.tar.bz2 4157749
diff --git a/dev-lang/php/files/digest-php-4.4.1-r3 b/dev-lang/php/files/digest-php-4.4.1-r3
new file mode 100644
index 0000000..3f1e132
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.1-r3
@@ -0,0 +1,2 @@
+MD5 615d27d7c39017e1e45f15bc8eed3c94 hardening-patch-4.4.1-0.4.8-gentoo.patch.gz 59878
+MD5 6b5726471189f8a1f26dd7cc5e19b442 php-4.4.1.tar.bz2 4157749
diff --git a/dev-lang/php/files/digest-php-4.4.2 b/dev-lang/php/files/digest-php-4.4.2
new file mode 100644
index 0000000..1fcfa10
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.2
@@ -0,0 +1,9 @@
+MD5 fa67e075f724b5cb4701ffdd0a05e03d hardening-patch-4.4.2-0.4.8-gentoo.patch.gz 59792
+RMD160 87c5234a6e70b3f24b20227e891e4f878b9e55a8 hardening-patch-4.4.2-0.4.8-gentoo.patch.gz 59792
+SHA256 31a8aec0f46cd34079179a32e1b8033891d9cb0e5cbd53ef9d56848b48c1f1f9 hardening-patch-4.4.2-0.4.8-gentoo.patch.gz 59792
+MD5 28051cd9ef43490dd9727a4d442011b5 php-4.4.2.tar.bz2 4371185
+RMD160 cbef0fa4e233529422bc0944dcfb79d866013f5e php-4.4.2.tar.bz2 4371185
+SHA256 a2024d665125a41611eb64451648d37a81e3579594c8810bb41ac8b2b63f81eb php-4.4.2.tar.bz2 4371185
+MD5 048bcc2e39d96cb5f8194c75291f3cf2 php-patchset-4.4.2-r1.tar.bz2 13774
+RMD160 95db8755a8d5d8972bc8bf5ecaf8740663f910d5 php-patchset-4.4.2-r1.tar.bz2 13774
+SHA256 8106995c3243c604434cb4b4fdafc04db0e3604eccb7ba487724f44b892252e4 php-patchset-4.4.2-r1.tar.bz2 13774
diff --git a/dev-lang/php/files/digest-php-4.4.2-r1 b/dev-lang/php/files/digest-php-4.4.2-r1
new file mode 100644
index 0000000..5a2b723
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.2-r1
@@ -0,0 +1,9 @@
+MD5 fa67e075f724b5cb4701ffdd0a05e03d hardening-patch-4.4.2-0.4.8-gentoo.patch.gz 59792
+RMD160 87c5234a6e70b3f24b20227e891e4f878b9e55a8 hardening-patch-4.4.2-0.4.8-gentoo.patch.gz 59792
+SHA256 31a8aec0f46cd34079179a32e1b8033891d9cb0e5cbd53ef9d56848b48c1f1f9 hardening-patch-4.4.2-0.4.8-gentoo.patch.gz 59792
+MD5 28051cd9ef43490dd9727a4d442011b5 php-4.4.2.tar.bz2 4371185
+RMD160 cbef0fa4e233529422bc0944dcfb79d866013f5e php-4.4.2.tar.bz2 4371185
+SHA256 a2024d665125a41611eb64451648d37a81e3579594c8810bb41ac8b2b63f81eb php-4.4.2.tar.bz2 4371185
+MD5 4aebd7939e86bc60e447b2f9bb2d4bc2 php-patchset-4.4.2-r2.tar.bz2 14555
+RMD160 491fcc0c993530f9ac4429d44a37415c2a9a0b37 php-patchset-4.4.2-r2.tar.bz2 14555
+SHA256 9c7e9ed0044d0222745b5e30584e489e9574330aeb7964a40d1d1de757fb4bf3 php-patchset-4.4.2-r2.tar.bz2 14555
diff --git a/dev-lang/php/files/digest-php-4.4.2-r2 b/dev-lang/php/files/digest-php-4.4.2-r2
new file mode 100644
index 0000000..97bbe13
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.2-r2
@@ -0,0 +1,9 @@
+MD5 3a841a96d8d57d9bfa39344750f54f0a hardening-patch-4.4.2-0.4.9-gentoo.patch.gz 59219
+RMD160 6802aa02189489cf1e713dfde02039f888992507 hardening-patch-4.4.2-0.4.9-gentoo.patch.gz 59219
+SHA256 1a1affd04f234567cf049265fe62e9a2c3bde99193e6e17d5f8c010b04075760 hardening-patch-4.4.2-0.4.9-gentoo.patch.gz 59219
+MD5 28051cd9ef43490dd9727a4d442011b5 php-4.4.2.tar.bz2 4371185
+RMD160 cbef0fa4e233529422bc0944dcfb79d866013f5e php-4.4.2.tar.bz2 4371185
+SHA256 a2024d665125a41611eb64451648d37a81e3579594c8810bb41ac8b2b63f81eb php-4.4.2.tar.bz2 4371185
+MD5 52331faef17753dae2932966c6abcae1 php-patchset-4.4.2-r3.tar.bz2 18050
+RMD160 8c4309da5bd260536bce7523c30bbca7d9283ee6 php-patchset-4.4.2-r3.tar.bz2 18050
+SHA256 c755311adff209e488b4ebce14ed900c9c9f0d518ada7280953df4ddbb301e0e php-patchset-4.4.2-r3.tar.bz2 18050
diff --git a/dev-lang/php/files/digest-php-4.4.2-r3 b/dev-lang/php/files/digest-php-4.4.2-r3
new file mode 100644
index 0000000..a274420
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.2-r3
@@ -0,0 +1,9 @@
+MD5 e9c07b67ddd1f068aa1bbe8021f2a83d hardening-patch-4.4.2-0.4.11-gentoo.patch.gz 59715
+RMD160 bc1131fbb8d9e53fe8ced94ff32aa3f7399bcfd0 hardening-patch-4.4.2-0.4.11-gentoo.patch.gz 59715
+SHA256 c3b440478724e2798e18c4082d95c0b2b48203c7ebe2fd483cf2f24f9317d1b7 hardening-patch-4.4.2-0.4.11-gentoo.patch.gz 59715
+MD5 28051cd9ef43490dd9727a4d442011b5 php-4.4.2.tar.bz2 4371185
+RMD160 cbef0fa4e233529422bc0944dcfb79d866013f5e php-4.4.2.tar.bz2 4371185
+SHA256 a2024d665125a41611eb64451648d37a81e3579594c8810bb41ac8b2b63f81eb php-4.4.2.tar.bz2 4371185
+MD5 3af9e7b9411db3e18bc295265f565ef8 php-patchset-4.4.2-r4.tar.bz2 19584
+RMD160 0c79c747acd8c7318158aba6ef7c6c9438ac1005 php-patchset-4.4.2-r4.tar.bz2 19584
+SHA256 159801594f98960942d2aec2a5a38aaa1566bca4590e16f52f51f147fa391ae0 php-patchset-4.4.2-r4.tar.bz2 19584
diff --git a/dev-lang/php/files/digest-php-4.4.2-r5 b/dev-lang/php/files/digest-php-4.4.2-r5
new file mode 100644
index 0000000..6911486
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.2-r5
@@ -0,0 +1,9 @@
+MD5 e9c07b67ddd1f068aa1bbe8021f2a83d hardening-patch-4.4.2-0.4.11-gentoo.patch.gz 59715
+RMD160 bc1131fbb8d9e53fe8ced94ff32aa3f7399bcfd0 hardening-patch-4.4.2-0.4.11-gentoo.patch.gz 59715
+SHA256 c3b440478724e2798e18c4082d95c0b2b48203c7ebe2fd483cf2f24f9317d1b7 hardening-patch-4.4.2-0.4.11-gentoo.patch.gz 59715
+MD5 28051cd9ef43490dd9727a4d442011b5 php-4.4.2.tar.bz2 4371185
+RMD160 cbef0fa4e233529422bc0944dcfb79d866013f5e php-4.4.2.tar.bz2 4371185
+SHA256 a2024d665125a41611eb64451648d37a81e3579594c8810bb41ac8b2b63f81eb php-4.4.2.tar.bz2 4371185
+MD5 a0919ddd76f6d7e7b05639755125af82 php-patchset-4.4.2-r6.tar.bz2 20884
+RMD160 c8376d9736edb3a59a525022eee9c0a7a5f2a359 php-patchset-4.4.2-r6.tar.bz2 20884
+SHA256 4a422da2b609819a8d95b11e2245e9bfa1440d25e481d4808bfc7d270382480e php-patchset-4.4.2-r6.tar.bz2 20884
diff --git a/dev-lang/php/files/digest-php-4.4.2-r6 b/dev-lang/php/files/digest-php-4.4.2-r6
new file mode 100644
index 0000000..8b915b8
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.2-r6
@@ -0,0 +1,9 @@
+MD5 d53ac42b51ed80f8f23751a1d7113cfa hardening-patch-4.4.2-0.4.11-gentoo-r1.patch.gz 59709
+RMD160 6bd005bda596ff2690f5ee2563b2708671948c7c hardening-patch-4.4.2-0.4.11-gentoo-r1.patch.gz 59709
+SHA256 3e938f8f62322b061acbcc6f900c249b0dee0a8672557c7cbce3513c44f4dc04 hardening-patch-4.4.2-0.4.11-gentoo-r1.patch.gz 59709
+MD5 28051cd9ef43490dd9727a4d442011b5 php-4.4.2.tar.bz2 4371185
+RMD160 cbef0fa4e233529422bc0944dcfb79d866013f5e php-4.4.2.tar.bz2 4371185
+SHA256 a2024d665125a41611eb64451648d37a81e3579594c8810bb41ac8b2b63f81eb php-4.4.2.tar.bz2 4371185
+MD5 fad43ccccab8d21d962efcb03b03b236 php-patchset-4.4.2-r7.tar.bz2 24079
+RMD160 9bd72618cb3ac7584bcbf5f41c7c7926590bc85b php-patchset-4.4.2-r7.tar.bz2 24079
+SHA256 44c976ee3df7b99ed014a1579264cdd069e9bd57efa2757ee4e06112d073fc5b php-patchset-4.4.2-r7.tar.bz2 24079
diff --git a/dev-lang/php/files/digest-php-4.4.3-r1 b/dev-lang/php/files/digest-php-4.4.3-r1
new file mode 100644
index 0000000..f08155e
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.3-r1
@@ -0,0 +1,9 @@
+MD5 c79138eeed379765dabb269397ac3e09 hardening-patch-4.4.3-0.4.13-gentoo.patch.gz 60572
+RMD160 bef0106227dd0e23a67e59d9d0a5735478c2dec2 hardening-patch-4.4.3-0.4.13-gentoo.patch.gz 60572
+SHA256 4e09cd6cbd00e3a2199e6a68ab58875b133fea685500f2a35a2f7d348eaab44b hardening-patch-4.4.3-0.4.13-gentoo.patch.gz 60572
+MD5 9542117551c0e79f5bf21f46493094e7 php-4.4.3.tar.bz2 4461353
+RMD160 36c91930af44e8a1ed59eb159e6131ae8f0c77f0 php-4.4.3.tar.bz2 4461353
+SHA256 0f57da4b9d94f7febd37c0bc8e608e5aafafe744d094466723e04afb283407f7 php-4.4.3.tar.bz2 4461353
+MD5 f53d57eca61739837334f56df400f199 php-patchset-4.4.3-r1.tar.bz2 22814
+RMD160 389617d7e3ed41f67ea284a907cf9a347c5bf471 php-patchset-4.4.3-r1.tar.bz2 22814
+SHA256 16a7748f98cf8dbfeacebecdf57faed28e1176371ad89c62ce88c260811a0c41 php-patchset-4.4.3-r1.tar.bz2 22814
diff --git a/dev-lang/php/files/digest-php-4.4.4 b/dev-lang/php/files/digest-php-4.4.4
new file mode 100644
index 0000000..6ab9203
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.4
@@ -0,0 +1,9 @@
+MD5 603410dabb06b7252c2bcc1143dad813 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+RMD160 9f55babe9a2847f68574f94d9d49bb6eef1960b0 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+SHA256 454b23922ce1cdcb7ac61d02b198a21db08f2069cd9f7b2fb5f46291f0e24989 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+MD5 bc6fa8908e2ac36e93bab9f7d42cda3a php-4.4.4.tar.bz2 4478698
+RMD160 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3 php-4.4.4.tar.bz2 4478698
+SHA256 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b php-4.4.4.tar.bz2 4478698
+MD5 677975c1e10ebd9ee17112b4ca0f21af php-patchset-4.4.4-r1.tar.bz2 19969
+RMD160 e420d6b849c115ea987791875e019420292be9fd php-patchset-4.4.4-r1.tar.bz2 19969
+SHA256 5d739336ef5dfabe5dd884f06e2261e1014ae7e0126369aef547b61fc6d8ee92 php-patchset-4.4.4-r1.tar.bz2 19969
diff --git a/dev-lang/php/files/digest-php-4.4.4-r1 b/dev-lang/php/files/digest-php-4.4.4-r1
new file mode 100644
index 0000000..6ab9203
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.4-r1
@@ -0,0 +1,9 @@
+MD5 603410dabb06b7252c2bcc1143dad813 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+RMD160 9f55babe9a2847f68574f94d9d49bb6eef1960b0 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+SHA256 454b23922ce1cdcb7ac61d02b198a21db08f2069cd9f7b2fb5f46291f0e24989 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+MD5 bc6fa8908e2ac36e93bab9f7d42cda3a php-4.4.4.tar.bz2 4478698
+RMD160 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3 php-4.4.4.tar.bz2 4478698
+SHA256 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b php-4.4.4.tar.bz2 4478698
+MD5 677975c1e10ebd9ee17112b4ca0f21af php-patchset-4.4.4-r1.tar.bz2 19969
+RMD160 e420d6b849c115ea987791875e019420292be9fd php-patchset-4.4.4-r1.tar.bz2 19969
+SHA256 5d739336ef5dfabe5dd884f06e2261e1014ae7e0126369aef547b61fc6d8ee92 php-patchset-4.4.4-r1.tar.bz2 19969
diff --git a/dev-lang/php/files/digest-php-4.4.4-r2 b/dev-lang/php/files/digest-php-4.4.4-r2
new file mode 100644
index 0000000..6ab9203
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.4-r2
@@ -0,0 +1,9 @@
+MD5 603410dabb06b7252c2bcc1143dad813 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+RMD160 9f55babe9a2847f68574f94d9d49bb6eef1960b0 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+SHA256 454b23922ce1cdcb7ac61d02b198a21db08f2069cd9f7b2fb5f46291f0e24989 hardening-patch-4.4.4-0.4.14-gentoo.patch.gz 60772
+MD5 bc6fa8908e2ac36e93bab9f7d42cda3a php-4.4.4.tar.bz2 4478698
+RMD160 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3 php-4.4.4.tar.bz2 4478698
+SHA256 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b php-4.4.4.tar.bz2 4478698
+MD5 677975c1e10ebd9ee17112b4ca0f21af php-patchset-4.4.4-r1.tar.bz2 19969
+RMD160 e420d6b849c115ea987791875e019420292be9fd php-patchset-4.4.4-r1.tar.bz2 19969
+SHA256 5d739336ef5dfabe5dd884f06e2261e1014ae7e0126369aef547b61fc6d8ee92 php-patchset-4.4.4-r1.tar.bz2 19969
diff --git a/dev-lang/php/files/digest-php-4.4.4-r4 b/dev-lang/php/files/digest-php-4.4.4-r4
new file mode 100644
index 0000000..39d0cab
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.4-r4
@@ -0,0 +1,9 @@
+MD5 55220bd02880e8981455fe83bafa0c8d hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+RMD160 4c7b02b6a86005136ed6eb751ba549fe1ea275b0 hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+SHA256 3885d9dba28e8a689d26d1d1889ecd1b8c8289bb25c337d472084c809daba291 hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+MD5 bc6fa8908e2ac36e93bab9f7d42cda3a php-4.4.4.tar.bz2 4478698
+RMD160 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3 php-4.4.4.tar.bz2 4478698
+SHA256 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b php-4.4.4.tar.bz2 4478698
+MD5 7ee22d363546ed55b111f41e5becfdbf php-patchset-4.4.4-r2.tar.bz2 20349
+RMD160 3449835b81db81a99d2046d6933ae6ac51c3eb47 php-patchset-4.4.4-r2.tar.bz2 20349
+SHA256 360fd167822644e9a84baeea04b34f92ea5a96f678c5616d4889541503eecc5d php-patchset-4.4.4-r2.tar.bz2 20349
diff --git a/dev-lang/php/files/digest-php-4.4.4-r6 b/dev-lang/php/files/digest-php-4.4.4-r6
new file mode 100644
index 0000000..c2bc37f
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.4-r6
@@ -0,0 +1,9 @@
+MD5 55220bd02880e8981455fe83bafa0c8d hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+RMD160 4c7b02b6a86005136ed6eb751ba549fe1ea275b0 hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+SHA256 3885d9dba28e8a689d26d1d1889ecd1b8c8289bb25c337d472084c809daba291 hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+MD5 bc6fa8908e2ac36e93bab9f7d42cda3a php-4.4.4.tar.bz2 4478698
+RMD160 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3 php-4.4.4.tar.bz2 4478698
+SHA256 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b php-4.4.4.tar.bz2 4478698
+MD5 f0410bd550fc273b56c5af2c2518a93d php-patchset-4.4.4-r3.tar.bz2 21530
+RMD160 79afbba7947b9e6e94f8dcbcda19997b3ff7d462 php-patchset-4.4.4-r3.tar.bz2 21530
+SHA256 c49244a01e67c60f8c984efc9fdcca0154c9a80124788a16ef63e645dca97cb2 php-patchset-4.4.4-r3.tar.bz2 21530
diff --git a/dev-lang/php/files/digest-php-4.4.4-r8 b/dev-lang/php/files/digest-php-4.4.4-r8
new file mode 100644
index 0000000..68f8fb3
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.4-r8
@@ -0,0 +1,9 @@
+MD5 55220bd02880e8981455fe83bafa0c8d hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+RMD160 4c7b02b6a86005136ed6eb751ba549fe1ea275b0 hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+SHA256 3885d9dba28e8a689d26d1d1889ecd1b8c8289bb25c337d472084c809daba291 hardening-patch-4.4.4-0.4.15-gentoo.patch.gz 61351
+MD5 bc6fa8908e2ac36e93bab9f7d42cda3a php-4.4.4.tar.bz2 4478698
+RMD160 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3 php-4.4.4.tar.bz2 4478698
+SHA256 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b php-4.4.4.tar.bz2 4478698
+MD5 81ed636101b3b3dabd513633db8654f5 php-patchset-4.4.4-r4.tar.bz2 21579
+RMD160 6a46f412185b9775dc2b1a1bb0801248b3702ea1 php-patchset-4.4.4-r4.tar.bz2 21579
+SHA256 62c63d3d04d5cfd856ee8c74e6617089235b1abe4df4baf450c5888945acfa20 php-patchset-4.4.4-r4.tar.bz2 21579
diff --git a/dev-lang/php/files/digest-php-4.4.6 b/dev-lang/php/files/digest-php-4.4.6
new file mode 100644
index 0000000..492d2c4
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.6
@@ -0,0 +1,9 @@
+MD5 5db283824310c87efb18c76b4735c4bd php-4.4.6.tar.bz2 4559282
+RMD160 16a81ee94d1f8f56adf3e76dde32c62597130674 php-4.4.6.tar.bz2 4559282
+SHA256 c468c70e9536b5cbaf8a2615ab9e13c065da19944314633eef675be4d4e40065 php-4.4.6.tar.bz2 4559282
+MD5 7ba532e3132773050c3be7d71e8c9379 php-patchset-4.4.6-r1.tar.bz2 19282
+RMD160 e2576d82f1ca6e1336834ed87767fac9471623c0 php-patchset-4.4.6-r1.tar.bz2 19282
+SHA256 2fb21dfe058fabc57e63e01cc9990c6d8d5d9d74ebd9cc42c13d58cc64f71016 php-patchset-4.4.6-r1.tar.bz2 19282
+MD5 4b3800d1c182f5cf48d60ccb2f7c8acd suhosin-patch-4.4.6-0.9.6-gentoo.patch.gz 21530
+RMD160 cdf02a0ed5d66203c0082063c87b66a6e4109088 suhosin-patch-4.4.6-0.9.6-gentoo.patch.gz 21530
+SHA256 8a52e6c9b1f1c980734daf2fa0d5e68364cd64b20a7c82d68c7fdd135cb788f8 suhosin-patch-4.4.6-0.9.6-gentoo.patch.gz 21530
diff --git a/dev-lang/php/files/digest-php-4.4.7 b/dev-lang/php/files/digest-php-4.4.7
new file mode 100644
index 0000000..6948850
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.7
@@ -0,0 +1,9 @@
+MD5 3f21b44d37a57ca3876d3aea713c700d php-4.4.7.tar.bz2 4543531
+RMD160 5eb44c4b7711111dcbc9117e21ad644e9e6562f3 php-4.4.7.tar.bz2 4543531
+SHA256 d9044635eccd17aeb4ff4ce8580439f4b0c83e6ae3d1e2544fd07a992ab5448e php-4.4.7.tar.bz2 4543531
+MD5 53f0f90547d95d19d8b5349837f5e16c php-patchset-4.4.7-r1.tar.bz2 19025
+RMD160 d55f8590d6187e4b65f3bfa6af921e4ef8c15304 php-patchset-4.4.7-r1.tar.bz2 19025
+SHA256 81b3d3ef6934634e9892e74ea81e48f73156dedd71d53dc5bc07b6ef99b226c5 php-patchset-4.4.7-r1.tar.bz2 19025
+MD5 51ca84cf433c7df444e05c79a03019cc suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz 21555
+RMD160 a4184998c0cbbc4b493c0c6874fca6ee923c7a83 suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz 21555
+SHA256 93d4b422d6e3e4f8fff6cdeb6de619f70d527db44784d5bdcc6d83c0337ec784 suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz 21555
diff --git a/dev-lang/php/files/digest-php-4.4.8 b/dev-lang/php/files/digest-php-4.4.8
new file mode 100644
index 0000000..ca5c4ca
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.8
@@ -0,0 +1,9 @@
+MD5 ed31e77414e0331e787487b53732dbca php-4.4.8.tar.bz2 4546525
+RMD160 dedf4a1a853b19bd3fb91a6028a256facb2d3224 php-4.4.8.tar.bz2 4546525
+SHA256 30d8e281cf1b785301f0ce2ba6a803bda72fb229942d415ae601ef176b46d5c1 php-4.4.8.tar.bz2 4546525
+MD5 c0d4bdacde26844cddd22d82658d2d4f php-patchset-4.4.8-r0.tar.bz2 18948
+RMD160 c2f3cd05b161e144a65e9bde12f66eb44869b0f2 php-patchset-4.4.8-r0.tar.bz2 18948
+SHA256 7fafaefd29b73f76ff8a2a90b827d213043be30b4e3ca4afd18b843cdcf16ab3 php-patchset-4.4.8-r0.tar.bz2 18948
+MD5 094162a3cc48bec95b29e02df4930a43 suhosin-patch-4.4.8-0.9.6.patch.gz 22246
+RMD160 01b59d520b987de1995bce7ab74f5d92ece2a89f suhosin-patch-4.4.8-0.9.6.patch.gz 22246
+SHA256 eff5b6ed79dd76c59bd63ac591f778266c2d518cfab2cede716637cf8fc99630 suhosin-patch-4.4.8-0.9.6.patch.gz 22246
diff --git a/dev-lang/php/files/digest-php-4.4.8_pre20070816 b/dev-lang/php/files/digest-php-4.4.8_pre20070816
new file mode 100644
index 0000000..c83f292
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.8_pre20070816
@@ -0,0 +1,9 @@
+MD5 3755d38722835aba5910fcf4d6fc08f5 php-4.4.8_pre20070816.tar.bz2 4597067
+RMD160 f9ea4d071212c28be7e87a5f37b66c75b37c28ee php-4.4.8_pre20070816.tar.bz2 4597067
+SHA256 e9437ee6ad2b014143977cfb7ec70ad21ceef3e9c9d64a946abdad5a124e16fa php-4.4.8_pre20070816.tar.bz2 4597067
+MD5 f43f49033f73a7fee661e9f124835373 php-patchset-4.4.8_pre20070816-r0.tar.bz2 18987
+RMD160 d6239c033400d3267e149f87eb73897637c178e1 php-patchset-4.4.8_pre20070816-r0.tar.bz2 18987
+SHA256 7ec05e1648de766e297a6675a41d405adcbcfba71714e8b0962298085754b28b php-patchset-4.4.8_pre20070816-r0.tar.bz2 18987
+MD5 51ca84cf433c7df444e05c79a03019cc suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz 21555
+RMD160 a4184998c0cbbc4b493c0c6874fca6ee923c7a83 suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz 21555
+SHA256 93d4b422d6e3e4f8fff6cdeb6de619f70d527db44784d5bdcc6d83c0337ec784 suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz 21555
diff --git a/dev-lang/php/files/digest-php-5.0.4 b/dev-lang/php/files/digest-php-5.0.4
new file mode 100644
index 0000000..7f7e849
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.4
@@ -0,0 +1,2 @@
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
+MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
diff --git a/dev-lang/php/files/digest-php-5.0.4-r1 b/dev-lang/php/files/digest-php-5.0.4-r1
new file mode 100644
index 0000000..a2bcd3e
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.4-r1
@@ -0,0 +1,3 @@
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
+MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-5.0.4-r2 b/dev-lang/php/files/digest-php-5.0.4-r2
new file mode 100644
index 0000000..6b6d1ce
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.4-r2
@@ -0,0 +1,3 @@
+MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-5.0.4-r3 b/dev-lang/php/files/digest-php-5.0.4-r3
new file mode 100644
index 0000000..6b6d1ce
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.4-r3
@@ -0,0 +1,3 @@
+MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-5.0.4-r4 b/dev-lang/php/files/digest-php-5.0.4-r4
new file mode 100644
index 0000000..6b6d1ce
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.4-r4
@@ -0,0 +1,3 @@
+MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-lang/php/files/digest-php-5.0.5 b/dev-lang/php/files/digest-php-5.0.5
new file mode 100644
index 0000000..efd648b
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.5
@@ -0,0 +1 @@
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
diff --git a/dev-lang/php/files/digest-php-5.0.5-r1 b/dev-lang/php/files/digest-php-5.0.5-r1
new file mode 100644
index 0000000..c7aa92f
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.5-r1
@@ -0,0 +1,2 @@
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
+MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173
diff --git a/dev-lang/php/files/digest-php-5.0.5-r2 b/dev-lang/php/files/digest-php-5.0.5-r2
new file mode 100644
index 0000000..9a62d89
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.5-r2
@@ -0,0 +1,2 @@
+MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
diff --git a/dev-lang/php/files/digest-php-5.0.5-r3 b/dev-lang/php/files/digest-php-5.0.5-r3
new file mode 100644
index 0000000..9a62d89
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.5-r3
@@ -0,0 +1,2 @@
+MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
diff --git a/dev-lang/php/files/digest-php-5.0.5-r4 b/dev-lang/php/files/digest-php-5.0.5-r4
new file mode 100644
index 0000000..9a62d89
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.5-r4
@@ -0,0 +1,2 @@
+MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
diff --git a/dev-lang/php/files/digest-php-5.0.5-r5 b/dev-lang/php/files/digest-php-5.0.5-r5
new file mode 100644
index 0000000..1ebee2f
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.5-r5
@@ -0,0 +1,2 @@
+MD5 dd3aaa1c68bfd1626901721686474700 hardening-patch-5.0.5-0.4.8-gentoo.patch.gz 57864
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
diff --git a/dev-lang/php/files/digest-php-5.1.1 b/dev-lang/php/files/digest-php-5.1.1
new file mode 100644
index 0000000..ca64fef
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.1
@@ -0,0 +1,2 @@
+MD5 79725da7da569045a6ad2e790b08fbb8 hardening-patch-5.1.1-0.4.8-gentoo.patch.gz 57546
+MD5 70a7c90de182d1a1901c390b844153c7 php-5.1.1.tar.bz2 6149470
diff --git a/dev-lang/php/files/digest-php-5.1.2 b/dev-lang/php/files/digest-php-5.1.2
new file mode 100644
index 0000000..5925d4a
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.2
@@ -0,0 +1,9 @@
+MD5 61d534c04399b5fa1f167ec2d86351a3 hardening-patch-5.1.2-0.4.8-gentoo.patch.gz 57663
+RMD160 2b79a7a367b834fefd1c82268424bee35dd27474 hardening-patch-5.1.2-0.4.8-gentoo.patch.gz 57663
+SHA256 7e6453a9b45daf9af9d861b3907349d1d385eed7341f1c5427ab7b2a5f4794f7 hardening-patch-5.1.2-0.4.8-gentoo.patch.gz 57663
+MD5 79cee17e9db85be878000a2a4198378e php-5.1.2.tar.bz2 6319905
+RMD160 1e21b5ba280b7efc8197802c673bb5d4e9dc9f8e php-5.1.2.tar.bz2 6319905
+SHA256 a18399360e1c5dcbdfed4f7215ae8fd2a5e057c24b86392392e832216aa63202 php-5.1.2.tar.bz2 6319905
+MD5 2a99a8cd646da25e92d10b3ce91cceb4 php-patchset-5.1.2-r1.tar.bz2 6782
+RMD160 a0dcf11a29b8a0654ca158532f6865819cb2ef6f php-patchset-5.1.2-r1.tar.bz2 6782
+SHA256 e171ed1b1dac3571b1c72c3fb48e7d79029a99562c83e1e1242c2589aeff685e php-patchset-5.1.2-r1.tar.bz2 6782
diff --git a/dev-lang/php/files/digest-php-5.1.2-r1 b/dev-lang/php/files/digest-php-5.1.2-r1
new file mode 100644
index 0000000..c798681
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.2-r1
@@ -0,0 +1,9 @@
+MD5 61d534c04399b5fa1f167ec2d86351a3 hardening-patch-5.1.2-0.4.8-gentoo.patch.gz 57663
+RMD160 2b79a7a367b834fefd1c82268424bee35dd27474 hardening-patch-5.1.2-0.4.8-gentoo.patch.gz 57663
+SHA256 7e6453a9b45daf9af9d861b3907349d1d385eed7341f1c5427ab7b2a5f4794f7 hardening-patch-5.1.2-0.4.8-gentoo.patch.gz 57663
+MD5 79cee17e9db85be878000a2a4198378e php-5.1.2.tar.bz2 6319905
+RMD160 1e21b5ba280b7efc8197802c673bb5d4e9dc9f8e php-5.1.2.tar.bz2 6319905
+SHA256 a18399360e1c5dcbdfed4f7215ae8fd2a5e057c24b86392392e832216aa63202 php-5.1.2.tar.bz2 6319905
+MD5 2ba96733f6786016f367d152922d5dfb php-patchset-5.1.2-r2.tar.bz2 8278
+RMD160 320dbe43eea1025c0ec007f5eb4f1de2422cff98 php-patchset-5.1.2-r2.tar.bz2 8278
+SHA256 059b45665051b6b5434f061ec8e04ba0cc4dc15892b8572218c0cbd8c15397ab php-patchset-5.1.2-r2.tar.bz2 8278
diff --git a/dev-lang/php/files/digest-php-5.1.4 b/dev-lang/php/files/digest-php-5.1.4
new file mode 100644
index 0000000..92be8cd
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.4
@@ -0,0 +1,9 @@
+MD5 6d0b7d563e5c18bc9cdd612737fc6982 hardening-patch-5.1.4-0.4.9-gentoo.patch.gz 57671
+RMD160 c9e16019388d55a17d1c198f24492d7d07d68847 hardening-patch-5.1.4-0.4.9-gentoo.patch.gz 57671
+SHA256 f877989c03d13bb3b51e9af4e9a67d535da35784ceabd19dcd85be64ff6b9efa hardening-patch-5.1.4-0.4.9-gentoo.patch.gz 57671
+MD5 b55e633bdc80ab30da7c92f760fc4b58 php-5.1.4.tar.bz2 5992825
+RMD160 5468a7d544285438c78a8f68f1169dc22e4e8a2b php-5.1.4.tar.bz2 5992825
+SHA256 43d323b1730e2bc77ec16ee374effb38ec5be0f22e906c55c2e30dfaf22bb865 php-5.1.4.tar.bz2 5992825
+MD5 5e1e40f3f7fecf45d30f599cd3c17529 php-patchset-5.1.4-r1.tar.bz2 7330
+RMD160 ed33ee236286539a0614709d944ac636b84bca45 php-patchset-5.1.4-r1.tar.bz2 7330
+SHA256 5a780b331343fa1fb6c3c4a76bf87e24e586ca2f41c5cd3824291f1b0037e961 php-patchset-5.1.4-r1.tar.bz2 7330
diff --git a/dev-lang/php/files/digest-php-5.1.4-r1 b/dev-lang/php/files/digest-php-5.1.4-r1
new file mode 100644
index 0000000..54d9928
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.4-r1
@@ -0,0 +1,9 @@
+MD5 aad3814b698d1e2ade853fe5c68db7e5 hardening-patch-5.1.4-0.4.11-gentoo.patch.gz 58174
+RMD160 afabbf21c5d82a9ead56b1718b4e7e6eda5eb6b6 hardening-patch-5.1.4-0.4.11-gentoo.patch.gz 58174
+SHA256 4f0bdc6de6b00333c7678b4bebeb1a9de7f6987413707956b6a7e099ebe1089e hardening-patch-5.1.4-0.4.11-gentoo.patch.gz 58174
+MD5 66a806161d4a2d3b5153ebe4cd0f2e1c php-5.1.4.tar.bz2 6356171
+RMD160 d4ab11884a3a899f21eef777767a553cf81584ce php-5.1.4.tar.bz2 6356171
+SHA256 b55253e9557eceb901d83217ec192da22c28c7b2fdf714d3f151f1db663b5a32 php-5.1.4.tar.bz2 6356171
+MD5 03737a21e078200f4657303bd42c0244 php-patchset-5.1.4-r2.tar.bz2 12109
+RMD160 9ff211b307f9b790d2e5e2d8ef2795b3869fdfde php-patchset-5.1.4-r2.tar.bz2 12109
+SHA256 346615ebd20a07ac1f60275a54eeb7b34f26557960802c5319e19640632b3ae1 php-patchset-5.1.4-r2.tar.bz2 12109
diff --git a/dev-lang/php/files/digest-php-5.1.4-r3 b/dev-lang/php/files/digest-php-5.1.4-r3
new file mode 100644
index 0000000..ed82c02
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.4-r3
@@ -0,0 +1,9 @@
+MD5 aad3814b698d1e2ade853fe5c68db7e5 hardening-patch-5.1.4-0.4.11-gentoo.patch.gz 58174
+RMD160 afabbf21c5d82a9ead56b1718b4e7e6eda5eb6b6 hardening-patch-5.1.4-0.4.11-gentoo.patch.gz 58174
+SHA256 4f0bdc6de6b00333c7678b4bebeb1a9de7f6987413707956b6a7e099ebe1089e hardening-patch-5.1.4-0.4.11-gentoo.patch.gz 58174
+MD5 66a806161d4a2d3b5153ebe4cd0f2e1c php-5.1.4.tar.bz2 6356171
+RMD160 d4ab11884a3a899f21eef777767a553cf81584ce php-5.1.4.tar.bz2 6356171
+SHA256 b55253e9557eceb901d83217ec192da22c28c7b2fdf714d3f151f1db663b5a32 php-5.1.4.tar.bz2 6356171
+MD5 2c4239724b3875f7629d54650e775aac php-patchset-5.1.4-r4.tar.bz2 13600
+RMD160 2e47fb1a0d587c3b70f30d44f00ca122a58e1bb9 php-patchset-5.1.4-r4.tar.bz2 13600
+SHA256 4aa7df8cec6067a42a595600f3cef5b82e2bc1c7ab5999f9bca65d37ea1934a9 php-patchset-5.1.4-r4.tar.bz2 13600
diff --git a/dev-lang/php/files/digest-php-5.1.4-r4 b/dev-lang/php/files/digest-php-5.1.4-r4
new file mode 100644
index 0000000..0ec44b2
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.4-r4
@@ -0,0 +1,9 @@
+MD5 5c05d2abcc496454c17deb1889c6131c hardening-patch-5.1.4-0.4.11-gentoo-r1.patch.gz 58168
+RMD160 8fe4085261c939944567a796e4be8d0af9fc4a66 hardening-patch-5.1.4-0.4.11-gentoo-r1.patch.gz 58168
+SHA256 fd07ac145966e931f961c392ca087a2a7e93ba9c6bcc0ff382ca80d5019480d6 hardening-patch-5.1.4-0.4.11-gentoo-r1.patch.gz 58168
+MD5 66a806161d4a2d3b5153ebe4cd0f2e1c php-5.1.4.tar.bz2 6356171
+RMD160 d4ab11884a3a899f21eef777767a553cf81584ce php-5.1.4.tar.bz2 6356171
+SHA256 b55253e9557eceb901d83217ec192da22c28c7b2fdf714d3f151f1db663b5a32 php-5.1.4.tar.bz2 6356171
+MD5 1563ba29dae55380ef1b88be07fe39c6 php-patchset-5.1.4-r5.tar.bz2 21025
+RMD160 ebe867eff66440c1714ac2cb87c11ee17f15d8ea php-patchset-5.1.4-r5.tar.bz2 21025
+SHA256 8d682d0b26dcbd5ee420bc2c2e1483a68a34ede6eecf7ae83f1ea9ca36a6c57f php-patchset-5.1.4-r5.tar.bz2 21025
diff --git a/dev-lang/php/files/digest-php-5.1.4-r6 b/dev-lang/php/files/digest-php-5.1.4-r6
new file mode 100644
index 0000000..48b8be4
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.4-r6
@@ -0,0 +1,9 @@
+MD5 845cb6dc64a97c324a07b9004320508e hardening-patch-5.1.4-0.4.13-gentoo.patch.gz 59457
+RMD160 301592ee7fd7290e1c61d5e90f9a88a683ab8b3b hardening-patch-5.1.4-0.4.13-gentoo.patch.gz 59457
+SHA256 ab3da7f799eaecda3fecf5971ed821ba60a3a8e0f4a931114122791542d95ddc hardening-patch-5.1.4-0.4.13-gentoo.patch.gz 59457
+MD5 66a806161d4a2d3b5153ebe4cd0f2e1c php-5.1.4.tar.bz2 6356171
+RMD160 d4ab11884a3a899f21eef777767a553cf81584ce php-5.1.4.tar.bz2 6356171
+SHA256 b55253e9557eceb901d83217ec192da22c28c7b2fdf714d3f151f1db663b5a32 php-5.1.4.tar.bz2 6356171
+MD5 66d47faba2b9e98566101ce5f87421a9 php-patchset-5.1.4-r6.tar.bz2 29925
+RMD160 06e4cc0d2937786ac64446db9954897af2bd15c6 php-patchset-5.1.4-r6.tar.bz2 29925
+SHA256 9a29de8dba649f91057d7c2f1b853dc81228936c78d0fb787287531eaf316b39 php-patchset-5.1.4-r6.tar.bz2 29925
diff --git a/dev-lang/php/files/digest-php-5.1.6 b/dev-lang/php/files/digest-php-5.1.6
new file mode 100644
index 0000000..acd7883
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6
@@ -0,0 +1,9 @@
+MD5 48c310f69eff54f6f851a7bf1d1b2359 hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+RMD160 4636e215cf13d50bcbdd75da45ef624d1c19ed5d hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+SHA256 515687900f7976872cb14f5b052890b22c4b1cbea1dcfbab852b79dab13831bf hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 290a83a8f87414830d705ac720b84336 php-patchset-5.1.6-r1.tar.bz2 22390
+RMD160 9bb28e7b2c247e890e386e89a820dc89a5ae3f05 php-patchset-5.1.6-r1.tar.bz2 22390
+SHA256 a3d1fb8926c8fd4a545559c859a2787ba08d94f60fd352512d8c5b2a3d98c14c php-patchset-5.1.6-r1.tar.bz2 22390
diff --git a/dev-lang/php/files/digest-php-5.1.6-r1 b/dev-lang/php/files/digest-php-5.1.6-r1
new file mode 100644
index 0000000..acd7883
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6-r1
@@ -0,0 +1,9 @@
+MD5 48c310f69eff54f6f851a7bf1d1b2359 hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+RMD160 4636e215cf13d50bcbdd75da45ef624d1c19ed5d hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+SHA256 515687900f7976872cb14f5b052890b22c4b1cbea1dcfbab852b79dab13831bf hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 290a83a8f87414830d705ac720b84336 php-patchset-5.1.6-r1.tar.bz2 22390
+RMD160 9bb28e7b2c247e890e386e89a820dc89a5ae3f05 php-patchset-5.1.6-r1.tar.bz2 22390
+SHA256 a3d1fb8926c8fd4a545559c859a2787ba08d94f60fd352512d8c5b2a3d98c14c php-patchset-5.1.6-r1.tar.bz2 22390
diff --git a/dev-lang/php/files/digest-php-5.1.6-r11 b/dev-lang/php/files/digest-php-5.1.6-r11
new file mode 100644
index 0000000..54c00c6
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6-r11
@@ -0,0 +1,9 @@
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 e2f377cf0e043348f655fd35a170138a php-patchset-5.1.6-r8.tar.bz2 30004
+RMD160 5f93cda0783ba541cdc392d8f82344d340a6cc47 php-patchset-5.1.6-r8.tar.bz2 30004
+SHA256 f9e5f9b9ccf0fd4be00822a4d75832eb09f989db7229e275b666f00e6dad93d7 php-patchset-5.1.6-r8.tar.bz2 30004
+MD5 2e36ccba7e34191685308fb78def2c60 suhosin-patch-5.1.6-0.9.6-gentoo.patch.gz 23153
+RMD160 8ae3b22638f927041f769e8052fba3841f891bbf suhosin-patch-5.1.6-0.9.6-gentoo.patch.gz 23153
+SHA256 07c89856820e2dbbefdb5141412fa1a52dd6f9f38fa987573fdccf5fa6a68361 suhosin-patch-5.1.6-0.9.6-gentoo.patch.gz 23153
diff --git a/dev-lang/php/files/digest-php-5.1.6-r2 b/dev-lang/php/files/digest-php-5.1.6-r2
new file mode 100644
index 0000000..acd7883
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6-r2
@@ -0,0 +1,9 @@
+MD5 48c310f69eff54f6f851a7bf1d1b2359 hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+RMD160 4636e215cf13d50bcbdd75da45ef624d1c19ed5d hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+SHA256 515687900f7976872cb14f5b052890b22c4b1cbea1dcfbab852b79dab13831bf hardening-patch-5.1.6-0.4.14-gentoo.patch.gz 60949
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 290a83a8f87414830d705ac720b84336 php-patchset-5.1.6-r1.tar.bz2 22390
+RMD160 9bb28e7b2c247e890e386e89a820dc89a5ae3f05 php-patchset-5.1.6-r1.tar.bz2 22390
+SHA256 a3d1fb8926c8fd4a545559c859a2787ba08d94f60fd352512d8c5b2a3d98c14c php-patchset-5.1.6-r1.tar.bz2 22390
diff --git a/dev-lang/php/files/digest-php-5.1.6-r4 b/dev-lang/php/files/digest-php-5.1.6-r4
new file mode 100644
index 0000000..6ad1ff5
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6-r4
@@ -0,0 +1,9 @@
+MD5 ca028a70eec1af684a31b01d982679fd hardening-patch-5.1.6-0.4.15-gentoo.patch.gz 61484
+RMD160 e4a49784b075ffaee56798b9ef086df06e3ea320 hardening-patch-5.1.6-0.4.15-gentoo.patch.gz 61484
+SHA256 f4fb1944828193e723932ffbebb44ba3ae013171df6d3eb44644c9a4a8610db0 hardening-patch-5.1.6-0.4.15-gentoo.patch.gz 61484
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 450381b70ea199d78a39564ca5b6813d php-patchset-5.1.6-r2.tar.bz2 22693
+RMD160 aebcfb0cd1685512dd86e1a92d77ff91ca5b83f7 php-patchset-5.1.6-r2.tar.bz2 22693
+SHA256 06e6526388464c1f2e1b953e49b0463c6dfdda461fed889cb632aef855cd49cb php-patchset-5.1.6-r2.tar.bz2 22693
diff --git a/dev-lang/php/files/digest-php-5.1.6-r6 b/dev-lang/php/files/digest-php-5.1.6-r6
new file mode 100644
index 0000000..9cf6dd4
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6-r6
@@ -0,0 +1,9 @@
+MD5 ba5d540574209a683dd8cf8d564e3b61 hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz 61476
+RMD160 5185bf7b2282b3bed2f6a06a8314cfab7b5b8cbc hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz 61476
+SHA256 836416114d4408377d04ee5b704dde0bd74511c0f114fe02602dab12e9e4902c hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz 61476
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 ac23e1e0fc0b76a9533a5ba2730f4383 php-patchset-5.1.6-r3.tar.bz2 25666
+RMD160 77bcca9e95e828bc73320c978d323eeda87a54f0 php-patchset-5.1.6-r3.tar.bz2 25666
+SHA256 afacb3ba0cac6b796c828106082da105cb7c34ef7c5f094cd139a1b3c31f1989 php-patchset-5.1.6-r3.tar.bz2 25666
diff --git a/dev-lang/php/files/digest-php-5.1.6-r8 b/dev-lang/php/files/digest-php-5.1.6-r8
new file mode 100644
index 0000000..675b8ce
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.1.6-r8
@@ -0,0 +1,9 @@
+MD5 ba5d540574209a683dd8cf8d564e3b61 hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz 61476
+RMD160 5185bf7b2282b3bed2f6a06a8314cfab7b5b8cbc hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz 61476
+SHA256 836416114d4408377d04ee5b704dde0bd74511c0f114fe02602dab12e9e4902c hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz 61476
+MD5 08e423aa314369d4392a36b3f7246afc php-5.1.6.tar.bz2 6454408
+RMD160 7ac52f4674532397c982f6ced594b70dd17522af php-5.1.6.tar.bz2 6454408
+SHA256 3e9510ce715f28b7e6b803fcdadb73b37c83792c0b5e1e9bcb066ab972649996 php-5.1.6.tar.bz2 6454408
+MD5 af5dc2be4f0d265a73e4fdc1be1b5b0f php-patchset-5.1.6-r4.tar.bz2 26474
+RMD160 fa1ac197d9f9a97e053f20b64babdfeec371dbb3 php-patchset-5.1.6-r4.tar.bz2 26474
+SHA256 c90c724072b3f826e474c646eb907202c0166df472b64538863263b7bf9c028d php-patchset-5.1.6-r4.tar.bz2 26474
diff --git a/dev-lang/php/files/digest-php-5.2.1-r3 b/dev-lang/php/files/digest-php-5.2.1-r3
new file mode 100644
index 0000000..54bf655
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.1-r3
@@ -0,0 +1,9 @@
+MD5 261218e3569a777dbd87c16a15f05c8d php-5.2.1.tar.bz2 7163383
+RMD160 f75078e0e43cb9c64e6d0a8d51a2ebd23cc9131d php-5.2.1.tar.bz2 7163383
+SHA256 4b60fa70969644d193d58dd7cb9f2765e304c6368e98b1551e92e8d4e14d35ed php-5.2.1.tar.bz2 7163383
+MD5 7ea0587e479d92196831b95e260d2039 php-patchset-5.2.1-r4.tar.bz2 23599
+RMD160 271aee07634277b37c450824d2f188203beef154 php-patchset-5.2.1-r4.tar.bz2 23599
+SHA256 fc4627d63cd387981b3c3f04e2d5c83a227e446929aefbbc44316981c3565138 php-patchset-5.2.1-r4.tar.bz2 23599
+MD5 93c12d351c3ddb811b12f2d897c4f1d5 suhosin-patch-5.2.1-0.9.6.2-gentoo.patch.gz 22686
+RMD160 93d0ba56d9caa5264e60e812e18d100180d610bc suhosin-patch-5.2.1-0.9.6.2-gentoo.patch.gz 22686
+SHA256 f6072cfd46f9d308b43653844c3f5062e6ce0bfe91c02da0a10c96905f0d0829 suhosin-patch-5.2.1-0.9.6.2-gentoo.patch.gz 22686
diff --git a/dev-lang/php/files/digest-php-5.2.2-r1 b/dev-lang/php/files/digest-php-5.2.2-r1
new file mode 100644
index 0000000..dffdc71
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.2-r1
@@ -0,0 +1,9 @@
+MD5 d084337867d70b50a10322577be0e44e php-5.2.2.tar.bz2 7310926
+RMD160 15e844530bced2960e35fd291fb71a416562aec0 php-5.2.2.tar.bz2 7310926
+SHA256 cd69e73c46e1d171ac0cf27b7ee492c3bf8f6b45a763a77fd0cb79d5afa9f407 php-5.2.2.tar.bz2 7310926
+MD5 8561b1341061d54c5d5a0c6cb1c2c948 php-patchset-5.2.2-r2.tar.bz2 11486
+RMD160 46ed4fc1e30f35dbd8e8d0db4ed47109a19de6c7 php-patchset-5.2.2-r2.tar.bz2 11486
+SHA256 553c654ef7df90dc5cf64eb339884ed1730c4270bb2005fccb7da23da2c3aa74 php-patchset-5.2.2-r2.tar.bz2 11486
+MD5 2af1381b994851b0d361f26ef8373f19 suhosin-patch-5.2.2-0.9.6.2-gentoo.patch.gz 22854
+RMD160 808c187e650861fecb647474bd328d4940f0f1a6 suhosin-patch-5.2.2-0.9.6.2-gentoo.patch.gz 22854
+SHA256 867b6e45541e060d97d0567d81688a044734f0af6789ec2a1c70d2dea2f9fabb suhosin-patch-5.2.2-0.9.6.2-gentoo.patch.gz 22854
diff --git a/dev-lang/php/files/digest-php-5.2.3-r3 b/dev-lang/php/files/digest-php-5.2.3-r3
new file mode 100644
index 0000000..b2fd03d
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.3-r3
@@ -0,0 +1,9 @@
+MD5 eb50b751c8e1ced05bd012d5a0e4dec3 php-5.2.3.tar.bz2 7417635
+RMD160 3c895cf7e513e5a3d7d9f742a9d56102cbb3a79b php-5.2.3.tar.bz2 7417635
+SHA256 eedffda5069caa801a7fec217c77619657416a5fcaefb79ba4620432f0befe29 php-5.2.3.tar.bz2 7417635
+MD5 45fe9a704e4efadcfe51a226ecc9ba03 php-patchset-5.2.3-r4.tar.bz2 17870
+RMD160 26334a7bcdc0ee40a730544fc9068be0f5ee47c5 php-patchset-5.2.3-r4.tar.bz2 17870
+SHA256 37d76fa3b3f72956daba943e67b12717b3b6298bfe2d7cc752040dd775b7877a php-patchset-5.2.3-r4.tar.bz2 17870
+MD5 f217d04f9513222e48cea6588ac65b89 suhosin-patch-5.2.3-0.9.6.2-gentoo.patch.gz 22789
+RMD160 3adfe1038b8436dac56cb05c63a2b1305a6a0266 suhosin-patch-5.2.3-0.9.6.2-gentoo.patch.gz 22789
+SHA256 214c43e4808483f0700f36ffa57aba909a669cb335c179d46c1e8f765d70bd1f suhosin-patch-5.2.3-0.9.6.2-gentoo.patch.gz 22789
diff --git a/dev-lang/php/files/digest-php-5.2.4 b/dev-lang/php/files/digest-php-5.2.4
new file mode 100644
index 0000000..7e15568
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.4
@@ -0,0 +1,9 @@
+MD5 55c97a671fdabf462cc7a82971a656d2 php-5.2.4.tar.bz2 7608429
+RMD160 22728d27ec3ba3287943ea878fefbba0b4ffdc00 php-5.2.4.tar.bz2 7608429
+SHA256 502f5259e4619ba3549cd9f9bdeb4152c7effa66672348f3b108fccc8e1ca1c0 php-5.2.4.tar.bz2 7608429
+MD5 d909a241292a8fc5f58f84aa18e82e7e php-patchset-5.2.4-r0.tar.bz2 10305
+RMD160 84ff2dffe6e6099d9dc8ad98fc5b99e10ac3218c php-patchset-5.2.4-r0.tar.bz2 10305
+SHA256 4ee25d74e81e44ad2fc6a0c4cf41942ef92073d61efb4b640aa63a58edb6c5fa php-patchset-5.2.4-r0.tar.bz2 10305
+MD5 becfae15ba8ec7cdbc1f084b7938063e suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292
+RMD160 185bdd92dee54d83674b3de7262d57a6ac3ef14b suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292
+SHA256 3a0cecf36a74d6cb8e0042363fcbadc4afd0046eb3baff6d4dec415f6464a96a suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292
diff --git a/dev-lang/php/files/digest-php-5.2.4_p20070914 b/dev-lang/php/files/digest-php-5.2.4_p20070914
new file mode 100644
index 0000000..8d4224c
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.4_p20070914
@@ -0,0 +1,9 @@
+MD5 ec68c579100b88d4b8bf0976fb271025 php-5.2.4_p20070914.tar.bz2 7275434
+RMD160 87c012d03cd89951260b1f97cd3c16c935615867 php-5.2.4_p20070914.tar.bz2 7275434
+SHA256 00b561f85e31db500a959b028572031ae61d6971b4487be2fd301bae2f936009 php-5.2.4_p20070914.tar.bz2 7275434
+MD5 fd5048a6eaca5781d92426b1233217d1 php-patchset-5.2.4_p20070914-r0.tar.bz2 8480
+RMD160 7681bbca3420d02baf5297f5fd08712b3f3adb5d php-patchset-5.2.4_p20070914-r0.tar.bz2 8480
+SHA256 110751227f00302d72e5923750b45991c51c16331e5cb161f49359ab496f4b86 php-patchset-5.2.4_p20070914-r0.tar.bz2 8480
+MD5 883387a5a32f66bf37d1671ade836aff suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo.patch.gz 22381
+RMD160 e2594b48a9fd407b4418e09c61fed09232ab53d5 suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo.patch.gz 22381
+SHA256 cc022a3d2e37f7e1211d90bb320922bd4d3a8c65c5888a5bea0040723e78259b suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo.patch.gz 22381
diff --git a/dev-lang/php/files/digest-php-5.2.4_p20070914-r2 b/dev-lang/php/files/digest-php-5.2.4_p20070914-r2
new file mode 100644
index 0000000..389ed50
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.4_p20070914-r2
@@ -0,0 +1,9 @@
+MD5 ec68c579100b88d4b8bf0976fb271025 php-5.2.4_p20070914.tar.bz2 7275434
+RMD160 87c012d03cd89951260b1f97cd3c16c935615867 php-5.2.4_p20070914.tar.bz2 7275434
+SHA256 00b561f85e31db500a959b028572031ae61d6971b4487be2fd301bae2f936009 php-5.2.4_p20070914.tar.bz2 7275434
+MD5 cbd683a18a4d97acdbc022d8deab72b1 php-patchset-5.2.4_p20070914-r2.tar.bz2 12457
+RMD160 2fa6b3c480bede06287418af3f0cb4c69cb9d628 php-patchset-5.2.4_p20070914-r2.tar.bz2 12457
+SHA256 68974c9beda11ccf4e10c63609003e7664c29b45801cbf7e55e410c1dd453403 php-patchset-5.2.4_p20070914-r2.tar.bz2 12457
+MD5 16e1730b91944579764e5dc02736f903 suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz 22407
+RMD160 0cd0d6e9f14acb968cced10164f27389d0fa8bf9 suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz 22407
+SHA256 96ac1facb558b4dd4afe098cc776efc93602adc2683ba3157db39b7772183d1f suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz 22407
diff --git a/dev-lang/php/files/digest-php-5.2.4_pre200708051230-r2 b/dev-lang/php/files/digest-php-5.2.4_pre200708051230-r2
new file mode 100644
index 0000000..28916c7
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.4_pre200708051230-r2
@@ -0,0 +1,9 @@
+MD5 db34d89917692d44808a9c5f52d0be94 php-5.2.4_pre200708051230.tar.bz2 7115061
+RMD160 ec286dc0102989c108c5382330fc36108512c7f5 php-5.2.4_pre200708051230.tar.bz2 7115061
+SHA256 c40197d6efd514d6a1402ce769382ecc0e047db59c2501dd4f9b761c7e50b8b6 php-5.2.4_pre200708051230.tar.bz2 7115061
+MD5 a59d5c52b9372ee7cf3e29821b656416 php-patchset-5.2.4_pre200708051230-r2.tar.bz2 10339
+RMD160 2e0837b813ff16d83a8bb88cc3e8ff7789abd8f8 php-patchset-5.2.4_pre200708051230-r2.tar.bz2 10339
+SHA256 036cfa2a4dba009d2317c36527b9cd4763c2b3a7dffb7b6b3dcbb09fec0b5dde php-patchset-5.2.4_pre200708051230-r2.tar.bz2 10339
+MD5 97bc107b57f89f6abce22358598bf4aa suhosin-patch-5.2.4_pre200708051230-0.9.6.2-gentoo.patch.gz 22349
+RMD160 d9121893407346fb0ba64fdc4ba5585ed4a118ea suhosin-patch-5.2.4_pre200708051230-0.9.6.2-gentoo.patch.gz 22349
+SHA256 0074b4fa4869f1ba7b8e85cfd69076cd674a9599c6e04c9a92f7fe07b9a6a292 suhosin-patch-5.2.4_pre200708051230-0.9.6.2-gentoo.patch.gz 22349
diff --git a/dev-lang/php/files/digest-php-5.2.5 b/dev-lang/php/files/digest-php-5.2.5
new file mode 100644
index 0000000..52d06ea
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.5
@@ -0,0 +1,9 @@
+MD5 1fe14ca892460b09f06729941a1bb605 php-5.2.5.tar.bz2 7773024
+RMD160 2d5755f2ae8884e80f0a5c70e8fdfdb6deed46bc php-5.2.5.tar.bz2 7773024
+SHA256 5cac1e70df5019ebdfdab2e0b8b216f7fdf56b9895c9f68c993313918249bba3 php-5.2.5.tar.bz2 7773024
+MD5 c0158ee0ccf195a200935f2b0004a042 php-patchset-5.2.5-r0.tar.bz2 8743
+RMD160 e6b22a83a10abadd05660c682fd015f65d440245 php-patchset-5.2.5-r0.tar.bz2 8743
+SHA256 1c69588d71027376a8476117952db40a2da821fc98bbe3ba69bf9ce1632feec3 php-patchset-5.2.5-r0.tar.bz2 8743
+MD5 16e1730b91944579764e5dc02736f903 suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz 22407
+RMD160 0cd0d6e9f14acb968cced10164f27389d0fa8bf9 suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz 22407
+SHA256 96ac1facb558b4dd4afe098cc776efc93602adc2683ba3157db39b7772183d1f suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz 22407
diff --git a/dev-lang/php/files/digest-php-5.2.5-r1 b/dev-lang/php/files/digest-php-5.2.5-r1
new file mode 100644
index 0000000..408a191
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.5-r1
@@ -0,0 +1,9 @@
+MD5 1fe14ca892460b09f06729941a1bb605 php-5.2.5.tar.bz2 7773024
+RMD160 2d5755f2ae8884e80f0a5c70e8fdfdb6deed46bc php-5.2.5.tar.bz2 7773024
+SHA256 5cac1e70df5019ebdfdab2e0b8b216f7fdf56b9895c9f68c993313918249bba3 php-5.2.5.tar.bz2 7773024
+MD5 6247e2dbd9c1a3495e3815c2e0a7691f php-patchset-5.2.5-r1.tar.bz2 15350
+RMD160 777f77e351ed024952f2adf323261db28f98c428 php-patchset-5.2.5-r1.tar.bz2 15350
+SHA256 50860764cf068465af09acc5ed32ad89f2e8ee0e03b02b2dd70fa19bd1176f10 php-patchset-5.2.5-r1.tar.bz2 15350
+MD5 a43f1a0ee9e7c41c4cb6890174f1f9d8 suhosin-patch-5.2.5-0.9.6.2.patch.gz 23157
+RMD160 25863ad76bea4a8e5bf50bd916835b5d9324452c suhosin-patch-5.2.5-0.9.6.2.patch.gz 23157
+SHA256 fd77ccdeb90c83af7492876dda17518de95dd74a5b6feecc5a1bd2c8e322ab53 suhosin-patch-5.2.5-0.9.6.2.patch.gz 23157
diff --git a/dev-lang/php/files/eblits/CVS/Entries b/dev-lang/php/files/eblits/CVS/Entries
new file mode 100644
index 0000000..6c60506
--- /dev/null
+++ b/dev-lang/php/files/eblits/CVS/Entries
@@ -0,0 +1,27 @@
+/common-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/common-v2.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/pkg_postinst-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/pkg_postinst-v2.eblit/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/pkg_setup-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/pkg_setup-v2.eblit/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/pkg_setup-v3.eblit/1.1/Sat Jul 2 15:14:41 2011//T1.1
+/src_compile-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/src_compile-v2.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/src_configure-snapshots.eblit/1.1/Sun May 15 19:17:23 2011//T1.1
+/src_configure-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/src_configure-v2.eblit/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/src_configure-v3.eblit/1.1/Wed Jun 29 06:38:38 2011//T1.1
+/src_configure-v52.eblit/1.1/Mon Aug 2 16:56:42 2010//T1.1
+/src_configure-v521.eblit/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/src_configure-v53.eblit/1.1/Fri Dec 16 09:02:43 2011//T1.1
+/src_configure-v54.eblit/1.1/Sun Dec 18 09:00:26 2011//T1.1
+/src_install-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/src_install-v2.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/src_install-v3.eblit/1.1/Thu Jun 30 07:30:11 2011//T1.1
+/src_prepare-snapshots.eblit/1.1/Sun May 1 20:15:52 2011//T1.1
+/src_prepare-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+/src_prepare-v2.eblit/1.1/Fri Oct 8 18:25:10 2010//T1.1
+/src_prepare-v3.eblit/1.1/Sun Mar 13 09:48:06 2011//T1.1
+/src_prepare-v4.eblit/1.1/Wed Jun 29 06:38:38 2011//T1.1
+/src_test-v1.eblit/1.1/Thu May 27 23:05:04 2010//T1.1
+D
diff --git a/dev-lang/php/files/eblits/CVS/Repository b/dev-lang/php/files/eblits/CVS/Repository
new file mode 100644
index 0000000..e9faaee
--- /dev/null
+++ b/dev-lang/php/files/eblits/CVS/Repository
@@ -0,0 +1 @@
+gentoo-x86/dev-lang/php/files/eblits
diff --git a/dev-lang/php/files/eblits/CVS/Root b/dev-lang/php/files/eblits/CVS/Root
new file mode 100644
index 0000000..854a2c8
--- /dev/null
+++ b/dev-lang/php/files/eblits/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
diff --git a/dev-lang/php/files/eblits/CVS/Tag b/dev-lang/php/files/eblits/CVS/Tag
new file mode 100644
index 0000000..5062263
--- /dev/null
+++ b/dev-lang/php/files/eblits/CVS/Tag
@@ -0,0 +1 @@
+N1.1
diff --git a/dev-lang/php/files/eblits/common-v1.eblit b/dev-lang/php/files/eblits/common-v1.eblit
new file mode 100644
index 0000000..9c07f9d
--- /dev/null
+++ b/dev-lang/php/files/eblits/common-v1.eblit
@@ -0,0 +1,9 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/common-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+php_set_ini_dir() {
+ PHP_INI_DIR="/etc/php/${1}-php${PHP_MV}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
diff --git a/dev-lang/php/files/eblits/common-v2.eblit b/dev-lang/php/files/eblits/common-v2.eblit
index 394dacb..519a7c9 100644
--- a/dev-lang/php/files/eblits/common-v2.eblit
+++ b/dev-lang/php/files/eblits/common-v2.eblit
@@ -1,9 +1,10 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit,v 1.3 2010/10/08 18:25:10 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
php_set_ini_dir() {
- PHP_INI_DIR="/etc/php/${1}-php${SLOT}"
+ PHP_INI_DIR="/etc/php/${1}-php${PHP_MV}"
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
}
+
diff --git a/dev-lang/php/files/eblits/pkg_postinst-v1.eblit b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
new file mode 100644
index 0000000..438083b
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
@@ -0,0 +1,72 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/pkg_postinst-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP${PHP_MV}"
+ if use concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php${PHP_MV}_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php${PHP_MV}"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache2 to use mod_php
+ if use apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make Apache2 use php-${PHP_MV}, use"
+ ewarn " php-select apache2 php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if use cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make usr/bin/php point to php-${PHP_MV}, use"
+ ewarn " php-select php php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if use cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make usr/bin/php-cgi point to php-${PHP_MV}, use"
+ ewarn " php-select php-cgi php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php${PHP_MV}
+ elif [[ $exitStatus == 4 ]] ; then
+ ewarn "To make usr/bin/php-config and usr/bin/phpize point to php-${PHP_MV}, use"
+ ewarn " php-select php-devel php${PHP_MV}"
+ ewarn
+ fi
+
+ ewarn "You may have to recompile third-party extensions now"
+ ewarn "(includes every dev-php5/pecl-* package and probably others in that category)"
+ ewarn
+}
+
+
diff --git a/dev-lang/php/files/eblits/pkg_postinst-v2.eblit b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
new file mode 100644
index 0000000..fb629c7
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
@@ -0,0 +1,37 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/pkg_postinst-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
+
+eblit-php-pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+
+ # Create the symlinks for php
+ local m modules="cli apache2"
+ for m in modules; do
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ elif [[ $ci != "php{$SLOT}" ]] ; then
+ ewarn "To switch $m to use php-${SLOT}, run"
+ ewarn " eselect php set $m php${SLOT}"
+ ewarn
+ fi
+ fi
+ done
+
+ ewarn "You may have to recompile third-party extensions now"
+ ewarn "(includes every dev-php5/pecl-* package and probably others in that category)"
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ ewarn
+}
+
diff --git a/dev-lang/php/files/eblits/pkg_setup-v1.eblit b/dev-lang/php/files/eblits/pkg_setup-v1.eblit
new file mode 100644
index 0000000..577f420
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_setup-v1.eblit
@@ -0,0 +1,23 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/pkg_setup-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-pkg_setup() {
+ if use concurrentmodphp || use kolab ; then
+ ewarn "concurrentmodphp and kolab are Gentoo-specific experimental"
+ ewarn "patches. Before reporting any bugs to bugs.php.net, make sure to"
+ ewarn "rebuild PHP with those USE flags disabled"
+ ewarn
+ fi
+
+ # Mail support
+ php_check_mta
+
+ # Oracle support
+ php_check_oracle_8
+
+ phpconfutils_warn_about_external_deps
+ depend.apache_pkg_setup
+}
+
+
diff --git a/dev-lang/php/files/eblits/pkg_setup-v2.eblit b/dev-lang/php/files/eblits/pkg_setup-v2.eblit
index a5218b3..4c12887 100644
--- a/dev-lang/php/files/eblits/pkg_setup-v2.eblit
+++ b/dev-lang/php/files/eblits/pkg_setup-v2.eblit
@@ -1,11 +1,16 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit,v 1.2 2011/03/17 16:34:47 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
eblit-php-pkg_setup() {
# Mail support
php_check_mta
+ # imap support
+ # if virtuals/imap-c-client goes to new style virtual, we can exchange this
+ # for proper use-deps
+ php_check_imap
+
# Oracle support
php_check_oracle_8
diff --git a/dev-lang/php/files/eblits/src_compile-v1.eblit b/dev-lang/php/files/eblits/src_compile-v1.eblit
index cb0d56c..dbbba43 100644
--- a/dev-lang/php/files/eblits/src_compile-v1.eblit
+++ b/dev-lang/php/files/eblits/src_compile-v1.eblit
@@ -1,60 +1,64 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v1.eblit,v 1.6 2010/08/14 19:37:31 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
eblit-php-src_compile() {
- # snmp seems to run during src_compile, too (bug #324739)
- addpredict /usr/share/snmp/mibs/.index
+ SAPIS="${WORKDIR}/sapis"
- SAPI_DIR="${WORKDIR}/sapis"
+ if use cli ; then
+ php_sapi_build cli
+ cp sapi/cli/php "${SAPIS}/cli/" \
+ || die "Unable to copy cli SAPI"
+ fi
- for sapi in ${SAPIS} ; do
- use "${sapi}" || continue
+ if use cgi ; then
+ php_sapi_build cgi
+ cp sapi/cgi/php-cgi "${SAPIS}/cgi/" \
+ || die "Unable to copy cgi SAPI"
+ fi
- php_sapi_build "${sapi}"
- php_sapi_copy "${sapi}"
- done
+ if use embed ; then
+ php_sapi_build embed
+ cp libs/libphp${PHP_MV}.so "${SAPIS}"/embed \
+ || die "Unable to copy embed SAPI"
+ fi
+
+ if use apache2 ; then
+ php_sapi_build apache2
+ # apache2 is a special case; the necessary files (yes, multiple)
+ # are copied by make install, not by the ebuild; that's the reason,
+ # why apache2 has to be the last sapi
+ fi
}
php_sapi_build() {
- mkdir -p "${SAPI_DIR}/$1"
+ local sapi="$1"
+ php_set_ini_dir ${sapi}
- cd "${WORKDIR}/sapis-build/$1"
- emake || die "emake failed"
-}
+ mkdir -p "${SAPIS}/${sapi}"
-php_sapi_copy() {
- local sapi="$1"
- local source=""
-
- case "$sapi" in
- cli)
- source="sapi/cli/php"
- ;;
- cgi)
- source="sapi/cgi/php-cgi"
- ;;
- fpm)
- source="sapi/fpm/php-fpm"
- ;;
- embed)
- source="libs/libphp${PHP_MV}.so"
- ;;
-
- apache2)
- # apache2 is a special case; the necessary files
- # (yes, multiple) are copied by make install, not
- # by the ebuild; that's the reason, why apache2 has
- # to be the last sapi
- emake INSTALL_ROOT="${SAPI_DIR}/${sapi}/" install-sapi
- ;;
-
- *)
- die "unhandled sapi in php_sapi_copy"
- ;;
- esac
-
- if [[ "${source}" ]] ; then
- cp "$source" "${SAPI_DIR}/$sapi" || die "Unable to copy ${sapi} SAPI"
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for available_sapi in cli cgi embed ; do
+ if [[ $sapi == $available_sapi ]] ; then
+ sapi_conf="${sapi_conf} --enable-${available_sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${available_sapi}"
+ fi
+ done
+
+ if [[ $sapi == "apache2" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
fi
+
+ econf ${sapi_conf}
+ emake || die "emake failed"
+
+ rm -f main/main.o main/main.lo main/php_ini.o \
+ main/php_ini.lo 2>/dev/null
}
+
+
diff --git a/dev-lang/php/files/eblits/src_compile-v2.eblit b/dev-lang/php/files/eblits/src_compile-v2.eblit
index 6e3d277..40423e1 100644
--- a/dev-lang/php/files/eblits/src_compile-v2.eblit
+++ b/dev-lang/php/files/eblits/src_compile-v2.eblit
@@ -1,17 +1,87 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v2.eblit,v 1.3 2011/10/31 16:18:04 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v2.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
eblit-php-src_compile() {
- # snmp seems to run during src_compile, too (bug #324739)
- addpredict /usr/share/snmp/mibs/.index
+ SAPI_DIR="${WORKDIR}/sapis"
+ local is_first_sapi=1
for sapi in ${SAPIS} ; do
- use "${sapi}" && php_sapi_build "${sapi}"
+ use "${sapi}" || continue
+ if [[ ${is_first_sapi} == 1 ]]; then
+ is_first_sapi=0
+ else
+ emake clean
+ fi
+
+ php_sapi_build "${sapi}"
+ php_sapi_copy "${sapi}"
done
}
php_sapi_build() {
- cd "${WORKDIR}/sapis-build/$1"
+ local sapi="$1"
+ php_set_ini_dir "${sapi}"
+
+ mkdir -p "${SAPI_DIR}/${sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for one_sapi in $SAPIS ; do
+ case "$one_sapi" in
+ cli|cgi|embed)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${available_sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${available_sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+
+ esac
+ done
+
+ econf ${sapi_conf}
emake || die "emake failed"
}
+
+php_sapi_copy() {
+ local sapi="$1"
+ local source=""
+
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}.so"
+ ;;
+
+ apache2)
+ # apache2 is a special case; the necessary files
+ # (yes, multiple) are copied by make install, not
+ # by the ebuild; that's the reason, why apache2 has
+ # to be the last sapi
+ emake INSTALL_ROOT="${SAPI_DIR}/${sapi}/" install-sapi
+ ;;
+
+ *)
+ die "unhandled sapi in php_sapi_copy"
+ ;;
+ esac
+
+ if [[ "${source}" ]] ; then
+ cp "$source" "${SAPI_DIR}/$sapi" || die "Unable to copy ${sapi} SAPI"
+ fi
+}
diff --git a/dev-lang/php/files/eblits/src_configure-snapshots.eblit b/dev-lang/php/files/eblits/src_configure-snapshots.eblit
new file mode 100644
index 0000000..d8dfeba
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-snapshots.eblit
@@ -0,0 +1,268 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_configure-snapshots.eblit,v 1.1 2011/05/15 19:17:23 olemarkus Exp $
+
+eblit-php-src_configure() {
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 1
+ phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
+ phpconfutils_extension_disable "dom" "xml" 0
+ phpconfutils_extension_with "enchant" "enchant" 1 "/usr"
+ phpconfutils_extension_enable "exif" "exif" 1
+ phpconfutils_extension_disable "fileinfo" "fileinfo" 1
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_with "mhash" "mhash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_enable "intl" "intl" 1
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "onig" "unicode" 0 "/usr"
+ phpconfutils_extension_with "openssl" "ssl" 0
+ phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
+ phpconfutils_extension_enable "pcntl" "pcntl" 1
+ phpconfutils_extension_disable "phar" "phar" 1
+ phpconfutils_extension_disable "pdo" "pdo" 0
+ phpconfutils_extension_with "pgsql" "postgres" 1
+ phpconfutils_extension_disable "posix" "posix" 0
+ phpconfutils_extension_with "pspell" "spell" 1
+ phpconfutils_extension_with "recode" "recode" 1
+ phpconfutils_extension_disable "simplexml" "simplexml" 0
+ phpconfutils_extension_enable "shmop" "sharedmem" 0
+ phpconfutils_extension_with "snmp" "snmp" 1
+ phpconfutils_extension_enable "soap" "soap" 1
+ phpconfutils_extension_enable "sockets" "sockets" 1
+ phpconfutils_extension_without "sqlite3" "sqlite" 1 "/usr"
+ phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 "/usr"
+ phpconfutils_extension_enable "sysvmsg" "sysvipc" 1
+ phpconfutils_extension_enable "sysvsem" "sysvipc" 1
+ phpconfutils_extension_enable "sysvshm" "sysvipc" 1
+ phpconfutils_extension_with "tidy" "tidy" 1
+ phpconfutils_extension_disable "tokenizer" "tokenizer" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ phpconfutils_extension_disable "xmlreader" "xmlreader" 0
+ phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0
+ phpconfutils_extension_with "xmlrpc" "xmlrpc" 1
+ phpconfutils_extension_with "xsl" "xsl" 1
+ phpconfutils_extension_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ # Interbase/firebird support
+ if use interbase ; then
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ fi
+
+ if use firebird ; then
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ # Needed to run conftest for IBM DB2
+ [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`"
+ phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}"
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ if use mysqlnd ; then
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v1.eblit b/dev-lang/php/files/eblits/src_configure-v1.eblit
new file mode 100644
index 0000000..0df1433
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v1.eblit
@@ -0,0 +1,236 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_configure-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-src_configure() {
+ PHP_DESTDIR="/usr/$(get_libdir)/php${PHP_MV}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 1
+ phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
+ phpconfutils_extension_disable "dom" "xml" 0
+ phpconfutils_extension_with "enchant" "enchant" 1 "/usr"
+ phpconfutils_extension_enable "exif" "exif" 1
+ phpconfutils_extension_disable "fileinfo" "fileinfo" 1
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_enable "intl" "intl" 1
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "onig" "unicode" 0 "/usr"
+ phpconfutils_extension_with "openssl" "ssl" 0
+ phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
+ phpconfutils_extension_enable "pcntl" "pcntl" 1
+ phpconfutils_extension_disable "phar" "phar" 1
+ phpconfutils_extension_disable "pdo" "pdo" 0
+ phpconfutils_extension_with "pgsql" "postgres" 1
+ phpconfutils_extension_disable "posix" "posix" 0
+ phpconfutils_extension_with "pspell" "spell" 1
+ phpconfutils_extension_with "recode" "recode" 1
+ phpconfutils_extension_disable "simplexml" "simplexml" 0
+ phpconfutils_extension_enable "shmop" "sharedmem" 0
+ phpconfutils_extension_with "snmp" "snmp" 1
+ phpconfutils_extension_enable "soap" "soap" 1
+ phpconfutils_extension_enable "sockets" "sockets" 1
+ phpconfutils_extension_without "sqlite3" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "sybase-ct" "sybase-ct" 1
+ phpconfutils_extension_enable "sysvmsg" "sysvipc" 1
+ phpconfutils_extension_enable "sysvsem" "sysvipc" 1
+ phpconfutils_extension_enable "sysvshm" "sysvipc" 1
+ phpconfutils_extension_with "tidy" "tidy" 1
+ phpconfutils_extension_disable "tokenizer" "tokenizer" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ phpconfutils_extension_disable "xmlreader" "xmlreader" 0
+ phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0
+ phpconfutils_extension_with "xmlrpc" "xmlrpc" 1
+ phpconfutils_extension_with "xsl" "xsl" 1
+ phpconfutils_extension_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ phpconfutils_extension_with "ibm-db2" "db2" 1
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ if use mysqlnd ; then
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # 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}/php${PHP_MV}-ldvs"
+ fi
+ fi
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_configure-v2.eblit b/dev-lang/php/files/eblits/src_configure-v2.eblit
index ab09832..085715f 100644
--- a/dev-lang/php/files/eblits/src_configure-v2.eblit
+++ b/dev-lang/php/files/eblits/src_configure-v2.eblit
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.5 2011/01/05 11:23:16 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
eblit-php-src_configure() {
PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
@@ -35,7 +35,6 @@ eblit-php-src_configure() {
phpconfutils_extension_with "gettext" "nls" 1
phpconfutils_extension_with "gmp" "gmp" 1
phpconfutils_extension_disable "hash" "hash" 0
- phpconfutils_extension_with "mhash" "mhash" 0
phpconfutils_extension_without "iconv" "iconv" 0
phpconfutils_extension_enable "intl" "intl" 1
phpconfutils_extension_disable "ipv6" "ipv6" 0
@@ -61,7 +60,7 @@ eblit-php-src_configure() {
phpconfutils_extension_enable "soap" "soap" 1
phpconfutils_extension_enable "sockets" "sockets" 1
phpconfutils_extension_without "sqlite3" "sqlite3" 1 "/usr"
- phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 "/usr"
+ phpconfutils_extension_with "sybase-ct" "sybase-ct" 1
phpconfutils_extension_enable "sysvmsg" "sysvipc" 1
phpconfutils_extension_enable "sysvsem" "sysvipc" 1
phpconfutils_extension_enable "sysvshm" "sysvipc" 1
@@ -114,14 +113,8 @@ eblit-php-src_configure() {
phpconfutils_extension_with "imap-ssl" "ssl" 0
fi
- # Interbase/firebird support
- if use interbase ; then
- phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
- fi
-
- if use firebird ; then
- phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
- fi
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
# LDAP support
if use ldap ; then
@@ -192,7 +185,7 @@ eblit-php-src_configure() {
phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
fi
phpconfutils_extension_with "pdo-pgsql" "postgres" 1
- phpconfutils_extension_with "pdo-sqlite" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr"
phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
if use oci8 ; then
phpconfutils_extension_with "pdo-oci" "oci8" 1
@@ -226,6 +219,11 @@ eblit-php-src_configure() {
my_conf="${my_conf} --with-pic"
fi
+ if has fpm ${IUSE//+} && use fpm ; then
+ my_conf="${my_conf} --with-libevent-dir=/usr/`get_libdir`"
+ fi
+
+
# we use the system copy of pcre
# --with-pcre-regex affects ext/pcre
# --with-pcre-dir affects ext/filter and ext/zip
diff --git a/dev-lang/php/files/eblits/src_configure-v3.eblit b/dev-lang/php/files/eblits/src_configure-v3.eblit
new file mode 100644
index 0000000..b2b9f35
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v3.eblit
@@ -0,0 +1,245 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_configure-v3.eblit,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
+
+eblit-php-src_configure() {
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 1
+ phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
+ phpconfutils_extension_disable "dom" "xml" 0
+ phpconfutils_extension_with "enchant" "enchant" 1 "/usr"
+ phpconfutils_extension_enable "exif" "exif" 1
+ phpconfutils_extension_disable "fileinfo" "fileinfo" 1
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_with "mhash" "mhash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_enable "intl" "intl" 1
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "onig" "unicode" 0 "/usr"
+ phpconfutils_extension_with "openssl" "ssl" 0
+ phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
+ phpconfutils_extension_enable "pcntl" "pcntl" 1
+ phpconfutils_extension_disable "phar" "phar" 1
+ phpconfutils_extension_disable "pdo" "pdo" 0
+ phpconfutils_extension_with "pgsql" "postgres" 1
+ phpconfutils_extension_disable "posix" "posix" 0
+ phpconfutils_extension_with "pspell" "spell" 1
+ phpconfutils_extension_with "recode" "recode" 1
+ phpconfutils_extension_disable "simplexml" "simplexml" 0
+ phpconfutils_extension_enable "shmop" "sharedmem" 0
+ phpconfutils_extension_with "snmp" "snmp" 1
+ phpconfutils_extension_enable "soap" "soap" 1
+ phpconfutils_extension_enable "sockets" "sockets" 1
+ phpconfutils_extension_without "sqlite3" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 "/usr"
+ phpconfutils_extension_enable "sysvmsg" "sysvipc" 1
+ phpconfutils_extension_enable "sysvsem" "sysvipc" 1
+ phpconfutils_extension_enable "sysvshm" "sysvipc" 1
+ phpconfutils_extension_with "tidy" "tidy" 1
+ phpconfutils_extension_disable "tokenizer" "tokenizer" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ phpconfutils_extension_disable "xmlreader" "xmlreader" 0
+ phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0
+ phpconfutils_extension_with "xmlrpc" "xmlrpc" 1
+ phpconfutils_extension_with "xsl" "xsl" 1
+ phpconfutils_extension_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ if use mysqlnd ; then
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd"
+ else
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ fi
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite3" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
+ --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
diff --git a/dev-lang/php/files/eblits/src_configure-v52.eblit b/dev-lang/php/files/eblits/src_configure-v52.eblit
new file mode 100644
index 0000000..679e5a3
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_configure-v52.eblit
@@ -0,0 +1,233 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_configure-v52.eblit,v 1.1 2010/08/02 16:56:42 mabi Exp $
+
+eblit-php-src_configure() {
+ PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ phpconfutils_init
+
+ # extension USE flag shared
+ phpconfutils_extension_enable "bcmath" "bcmath" 1
+ phpconfutils_extension_with "bz2" "bzip2" 1
+ phpconfutils_extension_enable "calendar" "calendar" 1
+ phpconfutils_extension_disable "ctype" "ctype" 0
+ phpconfutils_extension_with "curl" "curl" 1
+ phpconfutils_extension_with "curlwrappers" "curlwrappers" 0
+ phpconfutils_extension_enable "dbase" "dbase" 1
+ phpconfutils_extension_disable "dom" "xml" 0
+ phpconfutils_extension_enable "exif" "exif" 1
+ phpconfutils_extension_with "fbsql" "frontbase" 1
+ phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0"
+ phpconfutils_extension_disable "filter" "filter" 0
+ phpconfutils_extension_enable "ftp" "ftp" 1
+ phpconfutils_extension_with "gettext" "nls" 1
+ phpconfutils_extension_with "gmp" "gmp" 1
+ phpconfutils_extension_disable "hash" "hash" 0
+ phpconfutils_extension_without "iconv" "iconv" 0
+ phpconfutils_extension_disable "ipv6" "ipv6" 0
+ phpconfutils_extension_disable "json" "json" 0
+ phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr"
+ phpconfutils_extension_disable "libxml" "xml" 0
+ phpconfutils_extension_enable "mbstring" "unicode" 1
+ phpconfutils_extension_with "mcrypt" "crypt" 1
+ phpconfutils_extension_with "mhash" "mhash" 1
+ phpconfutils_extension_with "msql" "msql" 1
+ phpconfutils_extension_with "mssql" "mssql" 1
+ phpconfutils_extension_with "ncurses" "ncurses" 1
+ phpconfutils_extension_with "openssl" "ssl" 0
+ phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr"
+ phpconfutils_extension_enable "pcntl" "pcntl" 1
+ phpconfutils_extension_without "pcre-regex" "pcre" 0
+ phpconfutils_extension_disable "pdo" "pdo" 0
+ phpconfutils_extension_with "pgsql" "postgres" 1
+ phpconfutils_extension_disable "posix" "posix" 0
+ phpconfutils_extension_with "pspell" "spell" 1
+ phpconfutils_extension_with "recode" "recode" 1
+ phpconfutils_extension_disable "reflection" "reflection" 0
+ phpconfutils_extension_disable "simplexml" "simplexml" 0
+ phpconfutils_extension_enable "shmop" "sharedmem" 0
+ phpconfutils_extension_with "snmp" "snmp" 1
+ phpconfutils_extension_enable "soap" "soap" 1
+ phpconfutils_extension_enable "sockets" "sockets" 1
+ phpconfutils_extension_disable "spl" "spl" 0
+ phpconfutils_extension_with "sybase-ct" "sybase-ct" 1
+ phpconfutils_extension_enable "sysvmsg" "sysvipc" 1
+ phpconfutils_extension_enable "sysvsem" "sysvipc" 1
+ phpconfutils_extension_enable "sysvshm" "sysvipc" 1
+ phpconfutils_extension_with "tidy" "tidy" 1
+ phpconfutils_extension_disable "tokenizer" "tokenizer" 0
+ phpconfutils_extension_enable "wddx" "wddx" 1
+ phpconfutils_extension_disable "xml" "xml" 0
+ phpconfutils_extension_disable "xmlreader" "xmlreader" 0
+ phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0
+ phpconfutils_extension_with "xmlrpc" "xmlrpc" 1
+ phpconfutils_extension_with "xsl" "xsl" 1
+ phpconfutils_extension_enable "zip" "zip" 1
+ phpconfutils_extension_with "zlib" "zlib" 1
+ phpconfutils_extension_enable "debug" "debug" 0
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ phpconfutils_extension_with "cdb" "cdb" 0
+ phpconfutils_extension_with "db4" "berkdb" 0
+ phpconfutils_extension_enable "flatfile" "flatfile" 0
+ phpconfutils_extension_with "gdbm" "gdbm" 0
+ phpconfutils_extension_enable "inifile" "inifile" 0
+ phpconfutils_extension_with "qdbm" "qdbm" 0
+
+ # Support for the GD graphics library
+ if use gd-external ; then
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "gd" "gd-external" 1 "/usr"
+ else
+ phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr"
+ phpconfutils_extension_with "t1lib" "truetype" 0 "/usr"
+ phpconfutils_extension_enable "gd-jis-conv" "cjk" 0
+ phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "png-dir" "gd" 0 "/usr"
+ phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr"
+ # enable gd last, so configure can pick up the previous settings
+ phpconfutils_extension_with "gd" "gd" 0
+ fi
+
+ # IMAP support
+ if use imap ; then
+ phpconfutils_extension_with "imap" "imap" 1
+ phpconfutils_extension_with "imap-ssl" "ssl" 0
+ fi
+
+ phpconfutils_extension_with "interbase" "interbase" 0 "/opt"
+ phpconfutils_extension_with "interbase" "firebird" 0 "/usr"
+
+ # LDAP support
+ if use ldap ; then
+ if use oci8 ; then
+ phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}"
+ else
+ phpconfutils_extension_with "ldap" "ldap" 1
+ phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0
+ fi
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ phpconfutils_extension_with "mysql" "mysql" 1 "/usr"
+ phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
+ fi
+
+ # MySQLi support
+ phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
+
+ # ODBC support
+ if use odbc ; then
+ phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr"
+ phpconfutils_extension_with "adabas" "adabas" 1
+ phpconfutils_extension_with "birdstep" "birdstep" 1
+ phpconfutils_extension_with "dbmaker" "dbmaker" 1
+ phpconfutils_extension_with "empress" "empress" 1
+ if use empress ; then
+ phpconfutils_extension_with "empress-bcs" "empress-bcs" 0
+ fi
+ phpconfutils_extension_with "esoob" "esoob" 1
+ phpconfutils_extension_with "ibm-db2" "db2" 1
+ phpconfutils_extension_with "sapdb" "sapdb" 1
+ phpconfutils_extension_with "solid" "solid" 1
+ fi
+
+ if use iodbc ; then
+ phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr"
+ fi
+
+ # Oracle support
+ phpconfutils_extension_with "oci8" "oci8" 1
+ if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
+ phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \
+ "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ phpconfutils_extension_with "pdo-dblib" "mssql" 1
+ phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr"
+ phpconfutils_extension_with "pdo-pgsql" "postgres" 1
+ phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr"
+ phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr"
+ if use oci8 ; then
+ phpconfutils_extension_with "pdo-oci" "oci8" 1
+ fi
+ if use oci8-instant-client ; then
+ phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \
+ "instantclient,/usr,${OCI8IC_PKG}"
+ fi
+ fi
+
+ # readline/libedit support
+ phpconfutils_extension_with "readline" "readline" 0
+ phpconfutils_extension_with "libedit" "libedit" 0
+
+ # Session support
+ if use session ; then
+ phpconfutils_extension_with "mm" "sharedmem" 0
+ else
+ phpconfutils_extension_disable "session" "session" 0
+ fi
+
+ # SQLite support
+ if use sqlite ; then
+ phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
+ phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
+ else
+ phpconfutils_extension_without "sqlite" "sqlite" 0
+ fi
+
+ if use pic ; then
+ my_conf="${my_conf} --with-pic"
+ fi
+
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ if use pcre ; then
+ my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr"
+ fi
+
+ # Catch CFLAGS problems
+ php_check_cflags
+
+ # Support user-passed configuration parameters
+ my_conf="${my_conf} ${EXTRA_ECONF:-}"
+
+ # 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}/php${PHP_MV}-ldvs"
+ fi
+ fi
+}
+
diff --git a/dev-lang/php/files/eblits/src_configure-v53.eblit b/dev-lang/php/files/eblits/src_configure-v53.eblit
index 04bc455..537b3dd 100644
--- a/dev-lang/php/files/eblits/src_configure-v53.eblit
+++ b/dev-lang/php/files/eblits/src_configure-v53.eblit
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v53.eblit,v 1.4 2012/02/28 10:59:13 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v53.eblit,v 1.1 2011/12/16 09:02:43 olemarkus Exp $
eblit-php-src_configure() {
addpredict /usr/share/snmp/mibs/.index
@@ -10,10 +10,11 @@ eblit-php-src_configure() {
# This is a global variable and should be in caps. It isn't because the
# phpconfutils eclass relies on exactly this name...
# for --with-libdir see bug #327025
- my_conf="--prefix=${PHP_DESTDIR}
- --mandir=${PHP_DESTDIR}/man
- --infodir=${PHP_DESTDIR}/info
- --libdir=${PHP_DESTDIR}/lib
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
--with-libdir=$(get_libdir)
--without-pear
$(use_enable threads maintainer-zts)"
@@ -62,7 +63,7 @@ eblit-php-src_configure() {
$(use_enable sockets sockets )
$(use_with sqlite sqlite /usr)"
use sqlite && my_conf+=" $(use_enable unicode sqlite-utf8)"
- my_conf+="
+ $my_conf="
$(use_with sqlite3 sqlite3 /usr)
$(use_with sybase-ct sybase-ct /usr)
$(use_enable sysvipc sysvmsg )
@@ -163,8 +164,12 @@ eblit-php-src_configure() {
# Oracle support
if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
my_conf+="
- $(use_with oci8-instant-client oci8)"
+ $(use_with oci8-instant-client oci8 "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib")"
fi
# PDO support
@@ -184,7 +189,7 @@ eblit-php-src_configure() {
$(use_with odbc pdo-odbc unixODBC,/usr)"
if use oci8-instant-client ; then
my_conf+="
- $(use_with oci8-instant-client pdo-oci)"
+ $(use_with oci8-instant-client pdo-oci "instantclient,/usr,${OCI8IC_PKG}" )"
fi
fi
diff --git a/dev-lang/php/files/eblits/src_configure-v54.eblit b/dev-lang/php/files/eblits/src_configure-v54.eblit
index bc17877..9e6b295 100644
--- a/dev-lang/php/files/eblits/src_configure-v54.eblit
+++ b/dev-lang/php/files/eblits/src_configure-v54.eblit
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v54.eblit,v 1.3 2012/02/28 11:02:54 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v54.eblit,v 1.1 2011/12/18 09:00:26 olemarkus Exp $
eblit-php-src_configure() {
addpredict /usr/share/snmp/mibs/.index
@@ -161,8 +161,12 @@ eblit-php-src_configure() {
# Oracle support
if use oci8-instant-client ; then
+ OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \
+ sed -e 's|dev-db/oracle-instantclient-basic-||g' | \
+ sed -e 's|-r.*||g')"
+
my_conf+="
- $(use_with oci8-instant-client oci8)"
+ $(use_with oci8-instant-client oci8 "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib")"
fi
# PDO support
@@ -182,7 +186,7 @@ eblit-php-src_configure() {
$(use_with odbc pdo-odbc unixODBC,/usr)"
if use oci8-instant-client ; then
my_conf+="
- $(use_with oci8-instant-client pdo-oci)"
+ $(use_with oci8-instant-client pdo-oci "instantclient,/usr,${OCI8IC_PKG}" )"
fi
fi
diff --git a/dev-lang/php/files/eblits/src_install-v1.eblit b/dev-lang/php/files/eblits/src_install-v1.eblit
new file mode 100644
index 0000000..9cef456
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_install-v1.eblit
@@ -0,0 +1,121 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_install-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-src_install() {
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR}/bin"
+
+ # Install php environment (without any sapis)
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
+
+ # And install the modules to it
+ if use sharedext ; then
+ insinto "${extension_dir}"
+ doins "${S}/modules/"*.so
+ fi
+
+ # Generate the USE file for PHP
+ phpconfutils_generate_usefile
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir /usr/share/php${PHP_MV}
+
+ if use cli ; then
+ einfo "Installing SAPI: cli"
+ into "${PHP_DESTDIR}"
+ dobin "${SAPIS}"/cli/php \
+ || die "Unable to install cli sapi"
+ php_install_ini cli
+ fi
+
+ if use cgi ; then
+ einfo "Installing SAPI: cgi"
+ into "${PHP_DESTDIR}" # needed each time, php_install_ini would reset it
+ dobin "${SAPIS}"/cgi/php-cgi \
+ || die "Unable to install cgi sapi"
+ php_install_ini cgi
+ fi
+
+ if use embed ; then
+ einfo "Installing SAPI: embed"
+ into "${PHP_DESTDIR}"
+ dolib.so "${SAPIS}"/embed/libphp5.so \
+ || die "Unable to install embed sapi"
+ php_install_ini embed
+ fi
+
+ if use apache2 ; then
+ einfo "Installing SAPI: apache2"
+ emake INSTALL_ROOT="${D}" install-sapi || \
+ die "Unable to install apache2 SAPI"
+
+ if use concurrentmodphp ; then
+ einfo "Installing Apache2 config file 70_mod_php${PHP_MV}_concurr.conf"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}_concurr.conf-apache2" \
+ "70_mod_php${PHP_MV}_concurr.conf"
+
+ # Put the ld version script in the right place so it's alwayas
+ # accessible
+ insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
+ doins "${FILESDIR}/php${PHP_MV}-ldvs"
+ else
+ einfo "Installing Apache2 config 70_mod_php${PHP_MV}.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
+ "70_mod_php${PHP_MV}.conf"
+ fi
+ php_install_ini apache2
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php${PHP_MV}-envd" \
+ "20php${PHP_MV}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${D}/etc/env.d/20php${PHP_MV}"
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to expose_php=Off, bug 300695
+ sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}"
+
+ dodir ${PHP_INI_DIR}
+ insinto ${PHP_INI_DIR}
+ newins "${phpinisrc}" ${PHP_INI_FILE}
+
+ dodir ${PHP_EXT_INI_DIR}
+ dodir ${PHP_EXT_INI_DIR_ACTIVE}
+
+ # Install any extensions built as shared objects
+ if use sharedext ; then
+ insinto "${PHP_EXT_INI_DIR}"
+ for extension in "${D}/${extension_dir}/"*.so ; do
+ extension="${extension##*/}"
+ inifilename="${extension/.so/.ini}"
+ echo "extension=${extension}" > "${S}/modules/$inifilename"
+ doins "${S}/modules/$inifilename"
+ dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
+ done
+ fi
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_install-v2.eblit b/dev-lang/php/files/eblits/src_install-v2.eblit
index b0dd1ae..e592109 100644
--- a/dev-lang/php/files/eblits/src_install-v2.eblit
+++ b/dev-lang/php/files/eblits/src_install-v2.eblit
@@ -1,25 +1,12 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit,v 1.14 2011/12/16 09:02:43 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
eblit-php-src_install() {
- # see bug #324739 for what happens when we don't have that
- addpredict /usr/share/snmp/mibs/.index
-
- # grab the first SAPI that got built and install common files from there
- local first_sapi=""
- for sapi in $SAPIS ; do
- if use $sapi ; then
- first_sapi=$sapi
- break
- fi
- done
-
# Makefile forgets to create this before trying to write to it...
dodir "${PHP_DESTDIR}/bin"
# Install php environment (without any sapis)
- cd "${WORKDIR}/sapis-build/$first_sapi"
emake INSTALL_ROOT="${D}" \
install-build install-headers install-programs \
|| die "emake install failed"
@@ -29,28 +16,28 @@ eblit-php-src_install() {
# And install the modules to it
if use sharedext ; then
insinto "${extension_dir}"
- doins "${WORKDIR}/sapis-build/${first_sapi}/modules/"*.so
+ doins "${S}/modules/"*.so
fi
+ # Generate the USE file for PHP
+ phpconfutils_generate_usefile
+
# Create the directory where we'll put version-specific php scripts
keepdir /usr/share/php${PHP_MV}
local sapi="", file=""
- local sapi_list=""
for sapi in ${SAPIS}; do
if use "${sapi}" ; then
einfo "Installing SAPI: ${sapi}"
- cd "${WORKDIR}/sapis-build/${sapi}"
# needed each time, php_install_ini would reset it
into "${PHP_DESTDIR}"
file=$(find "${SAPI_DIR}/${sapi}/" -type f | head -n 1)
if [[ "${file: -3}" == ".so" ]]; then
if [[ "${sapi}" == "apache2" ]]; then
- insinto "${PHP_DESTDIR}/apache2/"
+ insinto "${PHP_DESTDIR}/../apache2/modules/"
newins "${file}" "${file/*\/}"
- keepdir "/usr/$(get_libdir)/apache2/modules"
else
dolib.so "${file}" || die "Unable to install ${sapi} sapi"
fi
@@ -59,28 +46,14 @@ eblit-php-src_install() {
fi
php_install_ini "${sapi}"
-
- # construct correct SAPI string for php-config
- # thanks to ferringb for the bash voodoo
- if [[ "${sapi}" == "apache2" ]]; then
- sapi_list="${sapi_list:+${sapi_list} }apache2handler"
- else
- sapi_list="${sapi_list:+${sapi_list} }${sapi}"
- fi
fi
done
# Install env.d files
- newenvd "${FILESDIR}/20php5-envd" \
- "20php${SLOT}"
+ newenvd "${FILESDIR}/20php${PHP_MV}-envd" \
+ "20php${PHP_MV}"
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
- "${D}/etc/env.d/20php${SLOT}"
- sed -e "s|php5|php${SLOT}|g" -i \
- "${D}/etc/env.d/20php${SLOT}"
-
- # set php-config variable correctly (bug #278439)
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
- "${D}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+ "${D}/etc/env.d/20php${PHP_MV}"
}
php_install_ini() {
@@ -92,15 +65,9 @@ php_install_ini() {
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
- # default to allow_url_open=Off, bug 332763
- sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i "${phpinisrc}"
-
# default to expose_php=Off, bug 300695
sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}"
- # default to /tmp for save_path, bug #282768
- sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
-
# Set the extension dir
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
@@ -111,9 +78,6 @@ php_install_ini() {
insinto "${PHP_INI_DIR}"
newins "${phpinisrc}" "${PHP_INI_FILE}"
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR}"
- elog
-
dodir "${PHP_EXT_INI_DIR}"
dodir "${PHP_EXT_INI_DIR_ACTIVE}"
@@ -123,43 +87,29 @@ php_install_ini() {
for extension in "${D}/${extension_dir}/"*.so ; do
extension="${extension##*/}"
inifilename="${extension/.so/.ini}"
- echo "extension=${extension}" > "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename"
- doins "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename"
+ echo "extension=${extension}" > "${S}/modules/$inifilename"
+ doins "${S}/modules/$inifilename"
dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
done
fi
# SAPI-specific handling
if [[ "${sapi}" == "apache2" ]] ; then
+ if use concurrentmodphp ; then
+ einfo "Installing Apache2 config file 70_mod_php${PHP_MV}_concurr.conf"
insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}_concurr.conf-apache2" \
+ "70_mod_php${PHP_MV}_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}/php${PHP_MV}-ldvs"
+ else
+ einfo "Installing Apache2 config 70_mod_php${PHP_MV}.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
"70_mod_php${PHP_MV}.conf"
+ fi
fi
-
- if [[ "${sapi}" == "fpm" ]] ; then
- [[ -z ${PHP_FPM_INIT_VER} ]] && PHP_FPM_INIT_VER=3
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
- einfo "Installing FPM CGI config file php-fpm.conf"
- insinto ${PHP_INI_DIR}
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
- dodir "/etc/init.d"
- insinto "/etc/init.d"
- newinitd "${FILESDIR}/php-fpm-r${PHP_FPM_INIT_VER}.init" "php-fpm"
- #dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
-
- # Remove bogus /etc/php-fpm.conf.default (bug 359906)
- [[ -f "${D}/etc/php-fpm.conf.default" ]] && rm "${D}/etc/php-fpm.conf.default"
- fi
-
- # Install PHP ini files into /usr/share/php
- if [[ ${SLOT} == '5.2' ]]; then
- newdoc php.ini-dist php.ini-development
- newdoc php.ini-recommended php.ini-production
- fi
-
- if [[ ${SLOT} == '5.3' ]]; then
- dodoc php.ini-development
- dodoc php.ini-production
- fi
-
}
diff --git a/dev-lang/php/files/eblits/src_install-v3.eblit b/dev-lang/php/files/eblits/src_install-v3.eblit
index 4c3ba24..6ac274f 100644
--- a/dev-lang/php/files/eblits/src_install-v3.eblit
+++ b/dev-lang/php/files/eblits/src_install-v3.eblit
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v3.eblit,v 1.5 2011/11/08 18:14:08 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v3.eblit,v 1.1 2011/06/30 07:30:11 olemarkus Exp $
eblit-php-src_install() {
# see bug #324739 for what happens when we don't have that
@@ -26,6 +26,9 @@ eblit-php-src_install() {
local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
+ # Generate the USE file for PHP
+ phpconfutils_generate_usefile
+
# Create the directory where we'll put version-specific php scripts
keepdir /usr/share/php${PHP_MV}
@@ -36,39 +39,20 @@ eblit-php-src_install() {
if use "${sapi}" ; then
einfo "Installing SAPI: ${sapi}"
cd "${WORKDIR}/sapis-build/${sapi}"
-
- if [[ "${sapi}" == "apache2" ]] ; then
- # We're specifically not using emake install-sapi as libtool
- # may cause unnecessary relink failures (see bug #351266)
- insinto "${PHP_DESTDIR}/apache2/"
- newins ".libs/libphp5.so" "libphp${PHP_MV}.so"
- keepdir "/usr/$(get_libdir)/apache2/modules"
- else
- # needed each time, php_install_ini would reset it
- into "${PHP_DESTDIR}"
- case "$sapi" in
- cli)
- source="sapi/cli/php"
- ;;
- cgi)
- source="sapi/cgi/php-cgi"
- ;;
- fpm)
- source="sapi/fpm/php-fpm"
- ;;
- embed)
- source="libs/libphp${PHP_MV}.so"
- ;;
- *)
- die "unhandled sapi in src_install"
- ;;
- esac
-
- if [[ "${source: -3}" == ".so" ]]; then
- dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR}"
+ file=$(find "${SAPI_DIR}/${sapi}/" -type f | head -n 1)
+
+ if [[ "${file: -3}" == ".so" ]]; then
+ if [[ "${sapi}" == "apache2" ]]; then
+ insinto "${PHP_DESTDIR}/apache2/"
+ newins "${file}" "${file/*\/}"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
else
- dobin "${source}" || die "Unable to install ${sapi} sapi"
+ dolib.so "${file}" || die "Unable to install ${sapi} sapi"
fi
+ else
+ dobin "${file}" || die "Unable to install ${sapi} sapi"
fi
php_install_ini "${sapi}"
@@ -76,7 +60,7 @@ eblit-php-src_install() {
# construct correct SAPI string for php-config
# thanks to ferringb for the bash voodoo
if [[ "${sapi}" == "apache2" ]]; then
- sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
else
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
fi
@@ -105,6 +89,12 @@ php_install_ini() {
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+ # default to allow_url_open=Off, bug 332763
+ sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i "${phpinisrc}"
+
+ # default to expose_php=Off, bug 300695
+ sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}"
+
# default to /tmp for save_path, bug #282768
sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
@@ -132,14 +122,12 @@ php_install_ini() {
fi
if [[ "${sapi}" == "fpm" ]] ; then
- [[ -z ${PHP_FPM_INIT_VER} ]] && PHP_FPM_INIT_VER=3
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
einfo "Installing FPM CGI config file php-fpm.conf"
insinto ${PHP_INI_DIR}
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+ doins "${FILESDIR}/php-fpm.conf"
dodir "/etc/init.d"
insinto "/etc/init.d"
- newinitd "${FILESDIR}/php-fpm-r${PHP_FPM_INIT_VER}.init" "php-fpm"
+ newinitd "${FILESDIR}/php-fpm-r3.init" "php-fpm"
#dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
diff --git a/dev-lang/php/files/eblits/src_prepare-snapshots.eblit b/dev-lang/php/files/eblits/src_prepare-snapshots.eblit
new file mode 100644
index 0000000..5d274da
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_prepare-snapshots.eblit
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_prepare-snapshots.eblit,v 1.1 2011/05/01 20:15:52 olemarkus Exp $
+
+eblit-php-src_prepare() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # kolab support (support for imap annotations)
+ use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Apply generic PHP patches
+ EPATCH_SOURCE="${WORKDIR}/patches/generic" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
+
+ # Patch PHP to show Gentoo as the server platform
+ sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
+ -i configure.in || die "Failed to fix server platform name"
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
+
+ # Patch PHP to support heimdal instead of mit-krb5
+ if has_version "app-crypt/heimdal" ; then
+ sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
+ || die "Failed to fix heimdal libname"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ # Suhosin support
+ if [[ -n $SUHOSIN_VERSION ]] ; then
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
+ fi
+ else
+ ewarn "Please note that this version of PHP does not yet come with a suhosin patch"
+ fi
+
+ #Add user patches #357637
+ epatch_user
+
+ # rebuild the whole autotools stuff as we are heavily patching it
+ # (suhosin, fastbuild, ...)
+
+ # eaclocal doesn't accept --force, so we try to force re-generation
+ # this way
+ rm aclocal.m4
+
+ # work around divert() issues with newer autoconf, bug #281697
+ if has_version '>=sys-devel/autoconf-2.64' ; then
+ sed -i -r \
+ -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
+ $(grep -l divert $(find . -name '*.m4') configure.in) || die
+ fi
+ eautoreconf --force -W no-cross
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_prepare-v1.eblit b/dev-lang/php/files/eblits/src_prepare-v1.eblit
new file mode 100644
index 0000000..0b89dab
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_prepare-v1.eblit
@@ -0,0 +1,73 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/Attic/src_prepare-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-src_prepare() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # Concurrent PHP Apache2 modules support
+ use apache2 && use concurrentmodphp && \
+ epatch "${WORKDIR}/${PV}/opt/concurrent_apache_modules.patch"
+
+ # kolab support (support for imap annotations)
+ use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Apply generic PHP patches
+ EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch
+
+ # Patch PHP to show Gentoo as the server platform
+ sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
+ -i configure.in || die "Failed to fix server platform name"
+
+ # Disable interactive make test
+ sed -e 's/'`echo "\!getenv('NO_INTERACTION')"`'/false/g' -i run-tests.php
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
+
+ # Patch PHP to support heimdal instead of mit-krb5
+ if has_version "app-crypt/heimdal" ; then
+ sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
+ || die "Failed to fix heimdal libname"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ # Suhosin support
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
+ fi
+
+ # rebuild the whole autotools stuff as we are heavily patching it
+ # (suhosin, fastbuild, ...)
+
+ # eaclocal doesn't accept --force, so we try to force re-generation
+ # this way
+ rm aclocal.m4
+
+ # work around divert() issues with newer autoconf, bug #281697
+ if has_version '>=sys-devel/autoconf-2.64' ; then
+ sed -i -r \
+ -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
+ $(grep -l divert $(find -name '*.m4') configure.in) || die
+ fi
+ eautoreconf --force -W no-cross
+}
+
+
diff --git a/dev-lang/php/files/eblits/src_prepare-v2.eblit b/dev-lang/php/files/eblits/src_prepare-v2.eblit
index b6bd72e..78b4769 100644
--- a/dev-lang/php/files/eblits/src_prepare-v2.eblit
+++ b/dev-lang/php/files/eblits/src_prepare-v2.eblit
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit,v 1.3 2011/01/05 11:23:16 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
eblit-php-src_prepare() {
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
@@ -43,15 +43,10 @@ eblit-php-src_prepare() {
fi
# Suhosin support
- if [[ -n $SUHOSIN_VERSION ]] ; then
- if use suhosin ; then
- epatch "${WORKDIR}/${SUHOSIN_PATCH}"
- fi
- else
- ewarn "Please note that this version of PHP does not yet come with a suhosin patch"
+ if use suhosin ; then
+ epatch "${WORKDIR}/${SUHOSIN_PATCH}"
fi
-
# rebuild the whole autotools stuff as we are heavily patching it
# (suhosin, fastbuild, ...)
diff --git a/dev-lang/php/files/eblits/src_test-v1.eblit b/dev-lang/php/files/eblits/src_test-v1.eblit
index 07f8d6f..5196c87 100644
--- a/dev-lang/php/files/eblits/src_test-v1.eblit
+++ b/dev-lang/php/files/eblits/src_test-v1.eblit
@@ -1,24 +1,24 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_test-v1.eblit,v 1.3 2012/02/06 13:53:17 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_test-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $
eblit-php-src_test() {
vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
- if [[ ! -x "${PHP_BIN}" ]] ; then
+
+ if [[ ! -x "${S}/sapi/cli/php" ]] ; then
ewarn "Test phase requires USE=cli, skipping"
return
else
- export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ export TEST_PHP_EXECUTABLE="${S}/sapi/cli/php"
fi
- if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
+ if [[ -x "${S}/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${S}/sapi/cgi/php-cgi"
fi
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
+ "${S}/run-tests.php" -n -q -d "session.save_path=${T}"
for name in ${EXPECTED_TEST_FAILURES}; do
mv "${name}.out" "${name}.out.orig" 2>/dev/null
diff --git a/dev-lang/php/files/mod_php.conf b/dev-lang/php/files/mod_php.conf
new file mode 100644
index 0000000..6f1f474
--- /dev/null
+++ b/dev-lang/php/files/mod_php.conf
@@ -0,0 +1,6 @@
+<IfModule mod_php4.c>
+
+AddType application/x-httpd-php .php .php4 .php3 .phtml
+AddType application/x-httpd-php-source .phps
+
+</IfModule>
diff --git a/dev-lang/php/files/php-5.2.10-pdo_dblib.patch b/dev-lang/php/files/php-5.2.10-pdo_dblib.patch
new file mode 100644
index 0000000..e161a82
--- /dev/null
+++ b/dev-lang/php/files/php-5.2.10-pdo_dblib.patch
@@ -0,0 +1,16 @@
+diff -Naur php-5.2.10.old/ext/pdo_dblib/dblib_driver.c php-5.2.10/ext/pdo_dblib/dblib_driver.c
+--- php-5.2.10.old/ext/pdo_dblib/dblib_driver.c 2009-03-20 23:14:17.000000000 +0100
++++ php-5.2.10/ext/pdo_dblib/dblib_driver.c 2009-09-25 00:19:31.000000000 +0200
+@@ -230,9 +230,9 @@
+ goto cleanup;
+ }
+
+- if (DBSETOPT(H->link, DBTEXTLIMIT, "2147483647") == FAIL) {
+- goto cleanup;
+- }
++// if (DBSETOPT(H->link, DBTEXTLIMIT, "2147483647") == FAIL) {
++// goto cleanup;
++// }
+
+ if (vars[3].optval && FAIL == dbuse(H->link, vars[3].optval)) {
+ goto cleanup;
diff --git a/dev-lang/php/files/php-5.2.12-libpng14.patch b/dev-lang/php/files/php-5.2.12-libpng14.patch
new file mode 100644
index 0000000..90f015f
--- /dev/null
+++ b/dev-lang/php/files/php-5.2.12-libpng14.patch
@@ -0,0 +1,11 @@
+--- ext/gd/libgd/gd_png.c
++++ ext/gd/libgd/gd_png.c
+@@ -139,7 +139,7 @@
+ return NULL;
+ }
+
+- if (!png_check_sig (sig, 8)) { /* bad signature */
++ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+ return NULL;
+ }
+
diff --git a/dev-lang/php/files/php-fpm-gentooified-5.3.4.patch b/dev-lang/php/files/php-fpm-gentooified-5.3.4.patch
new file mode 100644
index 0000000..1f401b3
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-gentooified-5.3.4.patch
@@ -0,0 +1,41 @@
+--- sapi/fpm/php-fpm.conf 2010-12-13 21:48:51.000000000 +0100
++++ sapi/fpm/php-fpm.conf.new 2010-12-13 22:36:39.000000000 +0100
+@@ -12,7 +12,7 @@
+ ; Relative path can also be used. They will be prefixed by:
+ ; - the global prefix if it's been set (-p arguement)
+ ; - /usr/lib64/php5.3 otherwise
+-;include=etc/fpm.d/*.conf
++;include=/etc/fpm-php5.3/fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -22,12 +22,12 @@
+ ; Pid file
+ ; Note: the default prefix is /var/lib
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = /var/run/php-fpm.pid
+
+ ; Error log file
+ ; Note: the default prefix is /var/lib
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++error_log = /var/log/php-fpm.log
+
+ ; Log level
+ ; Possible Values: alert, error, warning, notice, debug
+@@ -159,12 +159,12 @@
+ ; The desired minimum number of idle server processes.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Note: Mandatory when pm is set to 'dynamic'
+-;pm.min_spare_servers = 5
++pm.min_spare_servers = 5
+
+ ; The desired maximum number of idle server processes.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Note: Mandatory when pm is set to 'dynamic'
+-;pm.max_spare_servers = 35
++pm.max_spare_servers = 35
+
+ ; The number of requests each child process should execute before respawning.
+ ; This can be useful to work around memory leaks in 3rd party libraries. For
diff --git a/dev-lang/php/files/php-fpm-gentooified.patch b/dev-lang/php/files/php-fpm-gentooified.patch
new file mode 100644
index 0000000..3d7b9fe
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-gentooified.patch
@@ -0,0 +1,55 @@
+--- sapi/fpm/php-fpm.conf.orig 2010-06-03 21:04:30.000000000 +0200
++++ sapi/fpm/php-fpm.conf 2010-06-03 22:40:41.000000000 +0200
+@@ -8,7 +8,7 @@
+ ; Include one or more files. If glob(3) exists, it is used to include a bunch of
+ ; files from a glob(3) pattern. This directive can be used everywhere in the
+ ; file.
+-;include=/etc/fpm.d/*.conf
++;include=/etc/php/fpm-php5/fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -17,11 +17,11 @@
+ [global]
+ ; Pid file
+ ; Default Value: none
+-;pid = /var/lib/run/php-fpm.pid
++;pid = /var/run/php-fpm.pid
+
+ ; Error log file
+ ; Default Value: /var/lib/log/php-fpm.log
+-;error_log = /var/lib/log/php-fpm.log
++error_log = /var/log/php-fpm.log
+
+ ; Log level
+ ; Possible Values: alert, error, warning, notice, debug
+@@ -133,17 +133,17 @@
+ ; The number of child processes created on startup.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+-;pm.start_servers = 20
++pm.start_servers = 20
+
+ ; The desired minimum number of idle server processes.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Note: Mandatory when pm is set to 'dynamic'
+-;pm.min_spare_servers = 5
++pm.min_spare_servers = 5
+
+ ; The desired maximum number of idle server processes.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Note: Mandatory when pm is set to 'dynamic'
+-;pm.max_spare_servers = 35
++pm.max_spare_servers = 35
+
+ ; The number of requests each child process should execute before respawning.
+ ; This can be useful to work around memory leaks in 3rd party libraries. For
+@@ -213,7 +213,7 @@
+
+ ; The log file for slow requests
+ ; Default Value: /var/lib/log/php-fpm.log.slow
+-;slowlog = /var/lib/log/php-fpm.log.slow
++;slowlog = /var/log/php-fpm.log.slow
+
+ ; Set open file descriptor rlimit.
+ ; Default Value: system defined value
diff --git a/dev-lang/php/files/php-fpm-r0.conf b/dev-lang/php/files/php-fpm-r0.conf
new file mode 100644
index 0000000..ddef717
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r0.conf
@@ -0,0 +1,310 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr/lib/php5.3). This prefix can be dynamicaly changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+; - the global prefix if it's been set (-p arguement)
+; - /usr/lib/php5.3 otherwise
+;include=/etc/php/fpm-php5.3/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var/lib
+; Default Value: none
+; Note: The Gentoo init script expects the pid path
+; to be set to /var/run/php-fpm.pid
+pid = /var/run/php-fpm.pid
+
+; Error log file
+; Note: the default prefix is /var/lib
+; Default Value: log/php-fpm.log
+error_log = /var/log/php-fpm.log
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated. This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options. The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr/lib/php5.3) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses on a
+; specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 127.0.0.1:9000
+
+; Set listen(2) backlog. A value of '-1' means unlimited.
+; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = -1
+
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions.
+; Default Values: user and group are set as the running user
+; mode is set to 0666
+;listen.owner = nobody
+;listen.group = nobody
+;listen.mode = 0666
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = nobody
+group = nobody
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives:
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes to be created when pm is set to 'dynamic'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI.
+; Note: Used when pm is set to either 'static' or 'dynamic'
+; Note: This value is mandatory.
+pm.max_children = 50
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+;pm.start_servers = 20
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 5
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 35
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. By default, the status page shows the following
+; information:
+; accepted conn - the number of request accepted by the pool;
+; pool - the name of the pool;
+; process manager - static or dynamic;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes.
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic')
+; The values of 'idle processes', 'active processes' and 'total processes' are
+; updated each second. The value of 'accepted conn' is updated in real time.
+; Example output:
+; accepted conn: 12073
+; pool: www
+; process manager: static
+; idle processes: 35
+; active processes: 65
+; total processes: 100
+; max children reached: 1
+; By default the status page output is formatted as text/plain. Passing either
+; 'html' or 'json' as a query string will return the corresponding output
+; syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = /var/log/php-fpm-$pool.log.slow
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr/lib/php5.3)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/dev-lang/php/files/php-fpm-r1.conf b/dev-lang/php/files/php-fpm-r1.conf
new file mode 100644
index 0000000..0b0a7f8
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r1.conf
@@ -0,0 +1,311 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr/lib/php5.3). This prefix can be dynamicaly changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+; - the global prefix if it's been set (-p arguement)
+; - /usr/lib/php5.3 otherwise
+;include=/etc/php/fpm-php5.3/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var/lib
+; Default Value: none
+; Warning: pid file is overriden by the Gentoo init script.
+; FPM will refuse to start if you uncomment this settingi and make use of the
+; init script.
+; pid = /var/run/php-fpm.pid
+
+; Error log file
+; Note: the default prefix is /var/lib
+; Default Value: log/php-fpm.log
+error_log = /var/log/php-fpm.log
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated. This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options. The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr/lib/php5.3) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses on a
+; specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 127.0.0.1:9000
+
+; Set listen(2) backlog. A value of '-1' means unlimited.
+; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = -1
+
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions.
+; Default Values: user and group are set as the running user
+; mode is set to 0666
+;listen.owner = nobody
+;listen.group = nobody
+;listen.mode = 0666
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = nobody
+group = nobody
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives:
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes to be created when pm is set to 'dynamic'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI.
+; Note: Used when pm is set to either 'static' or 'dynamic'
+; Note: This value is mandatory.
+pm.max_children = 50
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+;pm.start_servers = 20
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 5
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 35
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. By default, the status page shows the following
+; information:
+; accepted conn - the number of request accepted by the pool;
+; pool - the name of the pool;
+; process manager - static or dynamic;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes.
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic')
+; The values of 'idle processes', 'active processes' and 'total processes' are
+; updated each second. The value of 'accepted conn' is updated in real time.
+; Example output:
+; accepted conn: 12073
+; pool: www
+; process manager: static
+; idle processes: 35
+; active processes: 65
+; total processes: 100
+; max children reached: 1
+; By default the status page output is formatted as text/plain. Passing either
+; 'html' or 'json' as a query string will return the corresponding output
+; syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = /var/log/php-fpm-$pool.log.slow
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr/lib/php5.3)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/dev-lang/php/files/php-fpm-r1.init b/dev-lang/php/files/php-fpm-r1.init
new file mode 100755
index 0000000..508fbe0
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r1.init
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+
+PHPSLOT=${SVCNAME#php-fpm-}
+
+if [[ $PHPSLOT == "php-fpm" ]]; then
+ PHPSLOT=$(eselect php show fpm)
+else
+ PHPSLOT=php${PHPSLOT}
+fi
+
+
+PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+
+
+opts="depend start stop reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI server"
+ start-stop-daemon --start --exec /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI server"
+ start-stop-daemon --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm
+ eend $?
+}
+
diff --git a/dev-lang/php/files/php-fpm-r3.init b/dev-lang/php/files/php-fpm-r3.init
new file mode 100755
index 0000000..a417d50
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r3.init
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+
+PHPSLOT=${SVCNAME#php-fpm-}
+
+if [[ $PHPSLOT == "php-fpm" ]]; then
+ PHPSLOT=$(eselect php show fpm)
+else
+ PHPSLOT=php${PHPSLOT}
+fi
+
+
+PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+
+PHP_FPM_PID="/var/run/php-fpm.pid"
+
+opts="depend start stop reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI Process Manager"
+ start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}"
+ local i=0
+ local timeout=5
+ while [[ ! -f ${PHP_FPM_PID} ]] && [[ $i -le $timeout ]]; do
+ sleep 1
+ i=$(($i + 1))
+ done
+
+ [[ $timeout -gt $i ]]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI Process Manager"
+ start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PHP FastCGI Process Manager"
+ [[ -f ${PHP_FPM_PID} ]] && kill -USR2 $(cat ${PHP_FPM_PID})
+ eend $?
+}
diff --git a/dev-lang/php/files/php-fpm-r4.init b/dev-lang/php/files/php-fpm-r4.init
new file mode 100755
index 0000000..249df0f
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r4.init
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+
+PHPSLOT="php5.3"
+
+PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+
+PHP_FPM_PID="/var/run/php-fpm.pid"
+
+opts="depend start stop reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI Process Manager"
+ start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \
+ /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}"
+ local i=0
+ local timeout=5
+ while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do
+ sleep 1
+ i=$(($i + 1))
+ done
+
+ [ $timeout -gt $i ]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI Process Manager"
+ start-stop-daemon --signal QUIT --stop --exec /usr/bin/php-fpm --pidfile ${PHP_FPM_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PHP FastCGI Process Manager"
+ [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID})
+ eend $?
+}
diff --git a/dev-lang/php/files/php-fpm.conf b/dev-lang/php/files/php-fpm.conf
new file mode 100644
index 0000000..ddef717
--- /dev/null
+++ b/dev-lang/php/files/php-fpm.conf
@@ -0,0 +1,310 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr/lib/php5.3). This prefix can be dynamicaly changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+; - the global prefix if it's been set (-p arguement)
+; - /usr/lib/php5.3 otherwise
+;include=/etc/php/fpm-php5.3/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var/lib
+; Default Value: none
+; Note: The Gentoo init script expects the pid path
+; to be set to /var/run/php-fpm.pid
+pid = /var/run/php-fpm.pid
+
+; Error log file
+; Note: the default prefix is /var/lib
+; Default Value: log/php-fpm.log
+error_log = /var/log/php-fpm.log
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated. This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options. The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr/lib/php5.3) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses on a
+; specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 127.0.0.1:9000
+
+; Set listen(2) backlog. A value of '-1' means unlimited.
+; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = -1
+
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions.
+; Default Values: user and group are set as the running user
+; mode is set to 0666
+;listen.owner = nobody
+;listen.group = nobody
+;listen.mode = 0666
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = nobody
+group = nobody
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives:
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes to be created when pm is set to 'dynamic'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI.
+; Note: Used when pm is set to either 'static' or 'dynamic'
+; Note: This value is mandatory.
+pm.max_children = 50
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+;pm.start_servers = 20
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 5
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 35
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. By default, the status page shows the following
+; information:
+; accepted conn - the number of request accepted by the pool;
+; pool - the name of the pool;
+; process manager - static or dynamic;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes.
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic')
+; The values of 'idle processes', 'active processes' and 'total processes' are
+; updated each second. The value of 'accepted conn' is updated in real time.
+; Example output:
+; accepted conn: 12073
+; pool: www
+; process manager: static
+; idle processes: 35
+; active processes: 65
+; total processes: 100
+; max children reached: 1
+; By default the status page output is formatted as text/plain. Passing either
+; 'html' or 'json' as a query string will return the corresponding output
+; syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = /var/log/php-fpm-$pool.log.slow
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr/lib/php5.3)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/dev-lang/php/files/php-fpm.init b/dev-lang/php/files/php-fpm.init
new file mode 100755
index 0000000..adcfd32
--- /dev/null
+++ b/dev-lang/php/files/php-fpm.init
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+PHP_FPM_CONF="/etc/php/fpm-php5/php-fpm.conf"
+
+opts="depend start stop reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI server"
+ start-stop-daemon --start --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI server"
+ start-stop-daemon --stop --name php-fpm
+ eend $?
+}
diff --git a/dev-lang/php/files/php4-ldvs b/dev-lang/php/files/php4-ldvs
new file mode 100644
index 0000000..01b4eeb
--- /dev/null
+++ b/dev-lang/php/files/php4-ldvs
@@ -0,0 +1 @@
+PHP_4 { global: *; };
diff --git a/dev-lang/php/files/php5-ldvs b/dev-lang/php/files/php5-ldvs
new file mode 100644
index 0000000..783b0f6
--- /dev/null
+++ b/dev-lang/php/files/php5-ldvs
@@ -0,0 +1 @@
+PHP_5 { global: *; };
diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/dev-lang/php/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/dev-lang/php/php-4.0.4_p1.ebuild b/dev-lang/php/php-4.0.4_p1.ebuild
new file mode 100644
index 0000000..0aea760
--- /dev/null
+++ b/dev-lang/php/php-4.0.4_p1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.4_p1.ebuild,v 1.1 2001/04/28 18:54:42 achim Exp $
+
+A=${PN}-4.0.4pl1.tar.gz
+S=${WORKDIR}/${PN}-4.0.4pl1
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/pam-0.75
+ >=sys-libs/zlib-1.1.3
+ >=dev-libs/gmp-3.1.1
+ >=media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-ssl-1.3
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_compile() {
+
+ local myconf
+ if [ "`use readline`" ] ; then
+ myconf="--with-readline"
+ fi
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf
+ try make
+}
+
+
+src_install() {
+ cd ${S}
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ into /usr
+ dodoc CODING_STANDARDS FUNCTION_LIST.txt LICENSE
+ dodoc README.* TODO NEWS
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.5.ebuild b/dev-lang/php/php-4.0.5.ebuild
new file mode 100644
index 0000000..4644ac9
--- /dev/null
+++ b/dev-lang/php/php-4.0.5.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.5.ebuild,v 1.1 2001/05/06 18:06:22 achim Exp $
+
+A=${PN}-4.0.5.tar.gz
+S=${WORKDIR}/${PN}-4.0.5
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/pam-0.75
+ >=sys-libs/zlib-1.1.3
+ >=dev-libs/gmp-3.1.1
+ >=media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-ssl-1.3
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_compile() {
+
+ local myconf
+ if [ "`use readline`" ] ; then
+ myconf="--with-readline"
+ fi
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf
+ try make
+}
+
+
+src_install() {
+ cd ${S}
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ into /usr
+ dodoc CODING_STANDARDS FUNCTION_LIST.txt LICENSE
+ dodoc README.* TODO NEWS
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.6-r1.ebuild b/dev-lang/php/php-4.0.6-r1.ebuild
new file mode 100644
index 0000000..e7381cb
--- /dev/null
+++ b/dev-lang/php/php-4.0.6-r1.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.6-r1.ebuild,v 1.1 2001/07/03 16:50:57 achim Exp $
+
+A=${PN}-4.0.6.tar.gz
+S=${WORKDIR}/${PN}-4.0.6
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+
+ >=dev-libs/gmp-3.1.1
+ =media-libs/freetype-1.3.1-r2
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-ssl-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ =media-libs/freetype-1.3.1-r2
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-ssl-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )"
+
+src_compile() {
+
+ local myconf
+ if [ "`use readline`" ] ; then
+ myconf="--with-readline"
+ fi
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql=/usr"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use imap`" ] ; then
+ myconf="$myconf --with-imap"
+ fi
+ if [ "`use libwww`" ] ; then
+ myconf="$myconf --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+ if [ "`use flash`" ] ; then
+ myconf="$myconf --with-swf=/usr"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf
+ try make
+}
+
+
+src_install() {
+ cd ${S}
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ into /usr
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.6-r2.ebuild b/dev-lang/php/php-4.0.6-r2.ebuild
new file mode 100644
index 0000000..0bd3356
--- /dev/null
+++ b/dev-lang/php/php-4.0.6-r2.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.6-r2.ebuild,v 1.1 2001/10/06 14:36:55 azarah Exp $
+
+A=${PN}-4.0.6.tar.gz
+S=${WORKDIR}/${PN}-4.0.6
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( gnome-libs/libxml2 )
+ imap? ( virtual/imap )"
+
+src_compile() {
+
+ local myconf
+ if [ "`use readline`" ] ; then
+ myconf="--with-readline"
+ fi
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql=/usr"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use imap`" ] ; then
+ myconf="$myconf --with-imap"
+ fi
+ if [ "`use libwww`" ] ; then
+ myconf="$myconf --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+ if [ "`use flash`" ] ; then
+ myconf="$myconf --with-swf=/usr --with-ming=/usr"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+ if [ "`use xml2`" ] ; then
+ myconf="$myconf --with-dom"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf
+ try make
+}
+
+
+src_install() {
+ cd ${S}
+ try make INSTALL_ROOT=${D} install-pear
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.6-r3.ebuild b/dev-lang/php/php-4.0.6-r3.ebuild
new file mode 100644
index 0000000..7a3e1e5
--- /dev/null
+++ b/dev-lang/php/php-4.0.6-r3.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.6-r3.ebuild,v 1.1 2001/11/11 13:12:00 achim Exp $
+
+A=${PN}-4.0.6.tar.gz
+S=${WORKDIR}/${PN}-4.0.6
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( dev-lang/jdk )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ java? ( dev-lang/jdk )"
+
+src_compile() {
+
+ local myconf
+ if [ "`use readline`" ] ; then
+ myconf="--with-readline"
+ fi
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql=/usr"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use imap`" ] ; then
+ myconf="$myconf --with-imap"
+ fi
+ if [ "`use libwww`" ] ; then
+ myconf="$myconf --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+ if [ "`use flash`" ] ; then
+ myconf="$myconf --with-swf=/usr --with-ming=/usr"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+ if [ "`use xml2`" ] ; then
+ myconf="$myconf --with-dom"
+ fi
+ if [ "`use java`" ] ; then
+ myconf="$myconf --with-java=/opt/java"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.6-r4.ebuild b/dev-lang/php/php-4.0.6-r4.ebuild
new file mode 100644
index 0000000..5fe16ca
--- /dev/null
+++ b/dev-lang/php/php-4.0.6-r4.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.6-r4.ebuild,v 1.1 2002/02/12 17:44:44 karltk Exp $
+
+A=${PN}-4.0.6.tar.gz
+S=${WORKDIR}/${PN}-4.0.6
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ java? ( virtual/jdk )
+ "
+
+src_compile() {
+
+ local myconf
+
+ use readline && myconf="${myconf} --with-readline"
+ use pam && myconf="${myconf} --with-pam"
+ use gettext && myconf="${myconf} --with-gettext"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use imap && myconf="${myconf} --with-imap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.6-r5.ebuild b/dev-lang/php/php-4.0.6-r5.ebuild
new file mode 100644
index 0000000..e6805b5
--- /dev/null
+++ b/dev-lang/php/php-4.0.6-r5.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.6-r5.ebuild,v 1.1 2002/02/18 21:01:05 karltk Exp $
+
+A=${PN}-4.0.6.tar.gz
+S=${WORKDIR}/${PN}-4.0.6
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ "
+src_compile() {
+
+ local myconf
+
+ use readline && myconf="${myconf} --with-readline"
+ use pam && myconf="${myconf} --with-pam"
+ use gettext && myconf="${myconf} --with-gettext"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use imap && myconf="${myconf} --with-imap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode \
+ --enable-ftp \
+ --enable-track-vars \
+ --with-gmp \
+ --enable-dbase \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-calendar \
+ --enable-versioning \
+ --enable-inline-optimization \
+ --enable-trans-sid \
+ --with-gd \
+ --with-ttf \
+ --with-t1lib \
+ --with-jpeg-dir=/usr/lib \
+ --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ $myconf || die "./configure failed"
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.0.6.ebuild b/dev-lang/php/php-4.0.6.ebuild
new file mode 100644
index 0000000..db184b8
--- /dev/null
+++ b/dev-lang/php/php-4.0.6.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.0.6.ebuild,v 1.1 2001/07/01 21:03:17 achim Exp $
+
+A=${PN}-4.0.6.tar.gz
+S=${WORKDIR}/${PN}-4.0.6
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${A}"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+
+ >=dev-libs/gmp-3.1.1
+ =media-libs/freetype-1.3.1-r2
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-ssl-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ =media-libs/freetype-1.3.1-r2
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-ssl-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-x11-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )"
+
+src_compile() {
+
+ local myconf
+ if [ "`use readline`" ] ; then
+ myconf="--with-readline"
+ fi
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql=/usr"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use imap`" ] ; then
+ myconf="$myconf --with-imap"
+ fi
+ if [ "`use libwww`" ] ; then
+ myconf="$myconf --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf
+ try make
+}
+
+
+src_install() {
+ cd ${S}
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ into /usr
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.1-r1.ebuild b/dev-lang/php/php-4.1.1-r1.ebuild
new file mode 100644
index 0000000..cfad76c
--- /dev/null
+++ b/dev-lang/php/php-4.1.1-r1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.1-r1.ebuild,v 1.1 2002/02/06 17:00:46 g2boojum Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ "
+# java? ( virtual/jdk )
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ "
+# java? ( virtual/jdk )
+
+src_compile() {
+
+ local myconf
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+ myconf="--without-readline --without-t1lib"
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql=/usr"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use imap`" ] ; then
+ myconf="$myconf --with-imap"
+ fi
+ if [ "`use libwww`" ] ; then
+ myconf="$myconf --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+ if [ "`use flash`" ] ; then
+ myconf="$myconf --with-swf=/usr --with-ming=/usr"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+ if [ "`use xml2`" ] ; then
+ myconf="$myconf --with-dom"
+ fi
+ if [ "`use mhash`" ] ; then
+ myconf="$myconf --with-mhash"
+ fi
+ if [ "`use mcrypt`" ] ; then
+ myconf="$myconf --with-mcrypt"
+ fi
+# The PHP build system does not support Blackdown
+# if [ "`use java`" ] ; then
+# myconf="$myconf --with-java=${JAVA_HOME}"
+# fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.1-r2.ebuild b/dev-lang/php/php-4.1.1-r2.ebuild
new file mode 100644
index 0000000..a77b4c7
--- /dev/null
+++ b/dev-lang/php/php-4.1.1-r2.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.1-r2.ebuild,v 1.1 2002/02/12 17:44:44 karltk Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ java? ( virtual/jdk )
+ "
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ use imap && myconf="$myconf --with-imap"
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.1-r3.ebuild b/dev-lang/php/php-4.1.1-r3.ebuild
new file mode 100644
index 0000000..0b18c92
--- /dev/null
+++ b/dev-lang/php/php-4.1.1-r3.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.1-r3.ebuild,v 1.1 2002/02/18 21:01:05 karltk Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ java? ( virtual/jdk )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ use imap && myconf="$myconf --with-imap"
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.1-r4.ebuild b/dev-lang/php/php-4.1.1-r4.ebuild
new file mode 100644
index 0000000..d948ffb
--- /dev/null
+++ b/dev-lang/php/php-4.1.1-r4.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.1-r4.ebuild,v 1.1 2002/02/23 20:35:19 g2boojum Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.1-r5.ebuild b/dev-lang/php/php-4.1.1-r5.ebuild
new file mode 100644
index 0000000..78008fb
--- /dev/null
+++ b/dev-lang/php/php-4.1.1-r5.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.1-r5.ebuild,v 1.1 2002/02/25 19:50:23 karltk Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-png-lib=/usr/lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.1.ebuild b/dev-lang/php/php-4.1.1.ebuild
new file mode 100644
index 0000000..39c0651
--- /dev/null
+++ b/dev-lang/php/php-4.1.1.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.1.ebuild,v 1.1 2002/01/03 15:50:25 g2boojum Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+
+DEPEND="virtual/glibc
+
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imap )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ imap? ( virtual/imap )
+ java? ( virtual/jdk )"
+
+src_compile() {
+
+ local myconf
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+ myconf="--without-readline --without-t1lib"
+ if [ "`use pam`" ] ; then
+ myconf="$myconf --with-pam"
+ fi
+ if [ "`use gettext`" ] ; then
+ myconf="$myconf --with-gettext"
+ fi
+ if [ "`use gdbm`" ] ; then
+ myconf="$myconf --with-gdbm=/usr"
+ fi
+ if [ "`use berkdb`" ] ; then
+ myconf="$myconf --with-db3=/usr"
+ fi
+ if [ "`use mysql`" ] ; then
+ myconf="$myconf --with-mysql=/usr"
+ fi
+ if [ "`use postgres`" ] ; then
+ myconf="$myconf --with-pgsql=/usr"
+ fi
+ if [ "`use odbc`" ] ; then
+ myconf="$myconf --with-unixODBC=/usr"
+ fi
+ if [ "`use ldap`" ] ; then
+ myconf="$myconf --with-ldap"
+ fi
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+ if [ "`use imap`" ] ; then
+ myconf="$myconf --with-imap"
+ fi
+ if [ "`use libwww`" ] ; then
+ myconf="$myconf --with-xml"
+ else
+ myconf="$myconf --disable-xml"
+ fi
+ if [ "`use flash`" ] ; then
+ myconf="$myconf --with-swf=/usr --with-ming=/usr"
+ fi
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+ if [ "`use xml2`" ] ; then
+ myconf="$myconf --with-dom"
+ fi
+ if [ "`use java`" ] ; then
+ myconf="$myconf --with-java=/opt/java"
+ fi
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ]
+ then
+
+ # Activate PHP-Extension in httpd.conf
+ echo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.2-r1.ebuild b/dev-lang/php/php-4.1.2-r1.ebuild
new file mode 100644
index 0000000..05af5f0
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r1.ebuild,v 1.1 2002/02/28 07:07:57 blocke Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-png-lib=/usr/lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.2-r2.ebuild b/dev-lang/php/php-4.1.2-r2.ebuild
new file mode 100644
index 0000000..06fdc0b
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r2.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r2.ebuild,v 1.1 2002/03/07 08:25:46 blocke Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+ use pdflib && myconf="$myconf --with-pdflib"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-png-lib=/usr/lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_postinst() {
+ einfo "Run 'ebuild php-${PV}-${PR}.ebuild config' to update httpd.conf"
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" -a ! "`grep "IfDefine PHP" /etc/httpd/httpd.conf`" ] ; then
+
+ einfo Enabling PHP support in ${ROOT}/etc/httpd/httpd.conf
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ echo -e "\n<IfDefine PHP4>\nLoadModule php4_module /usr/lib/apache/libphp4.so\n</IfDefine>\n" >> ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.2-r3.ebuild b/dev-lang/php/php-4.1.2-r3.ebuild
new file mode 100644
index 0000000..f3493de
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r3.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r3.ebuild,v 1.1 2002/03/14 18:49:39 g2boojum Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+ use pdflib && myconf="$myconf --with-pdflib"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_postinst() {
+ einfo "Run 'ebuild php-${PV}-${PR}.ebuild config' to update httpd.conf"
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" -a ! "`grep "IfDefine PHP" /etc/httpd/httpd.conf`" ] ; then
+
+ einfo Enabling PHP support in ${ROOT}/etc/httpd/httpd.conf
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+
+ echo -e "\n<IfDefine PHP4>\nLoadModule php4_module /usr/lib/apache/libphp4.so\n</IfDefine>\n" >> ${ROOT}/etc/httpd/httpd.conf
+
+ fi
+
+}
+
+
+
diff --git a/dev-lang/php/php-4.1.2-r4.ebuild b/dev-lang/php/php-4.1.2-r4.ebuild
new file mode 100644
index 0000000..2e5ea85
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r4.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r4.ebuild,v 1.1 2002/04/09 23:59:01 woodchip Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+ use pdflib && myconf="$myconf --with-pdflib"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ newins php.ini-dist php.ini
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ define=PHP4
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Enabling PHP support in ${ROOT}/etc/apache/conf/apache.conf"
+ cp ${ROOT}/etc/apache/conf/apache.conf ${ROOT}/etc/apache/conf/apache.conf-before-php
+ sed -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/apache/conf/apache.conf-before-php > ${ROOT}/etc/apache/conf/apache.conf
+
+ :;
+}
diff --git a/dev-lang/php/php-4.1.2-r5.ebuild b/dev-lang/php/php-4.1.2-r5.ebuild
new file mode 100644
index 0000000..cf542d3
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r5.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r5.ebuild,v 1.1 2002/04/11 04:34:21 woodchip Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+ use pdflib && myconf="$myconf --with-pdflib"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ newins php.ini-dist php.ini
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
diff --git a/dev-lang/php/php-4.1.2-r6.ebuild b/dev-lang/php/php-4.1.2-r6.ebuild
new file mode 100644
index 0000000..1aa292e
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r6.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r6.ebuild,v 1.1 2002/04/12 21:20:16 spider Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ nls? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use nls && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+ use pdflib && myconf="$myconf --with-pdflib"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ newins php.ini-dist php.ini
+ dosym /etc/apache/conf/addon-modules/php.ini /etc/apache/conf/php.ini
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
diff --git a/dev-lang/php/php-4.1.2-r7.ebuild b/dev-lang/php/php-4.1.2-r7.ebuild
new file mode 100644
index 0000000..88a5409
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r7.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r7.ebuild,v 1.1 2002/04/15 20:12:42 jhhudso Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ nls? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )"
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ if [ "$JAVAC" ];
+ then
+ cp ext/java/Makefile.in ext/java/Makefile.in.orig
+ cat ext/java/Makefile.in.orig | \
+ sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+ > ext/java/Makefile.in
+ fi
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use nls && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+ use pdflib && myconf="$myconf --with-pdflib"
+
+ if [ "`use qt`" ] ; then
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="$myconf --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="$myconf --with-imap"
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ newins php.ini-dist php.ini
+ dosym /etc/apache/conf/addon-modules/php.ini /etc/apache/conf/php.ini
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
diff --git a/dev-lang/php/php-4.1.2-r8.ebuild b/dev-lang/php/php-4.1.2-r8.ebuild
new file mode 100644
index 0000000..6a71ed5
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r8.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r8.ebuild,v 1.1 2002/04/27 09:26:07 rphillips Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ xml? ( >=app-text/sablotron-0.44 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ java? ( virtual/jdk )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf media-libs/ming )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ readline? ( >=sys-libs/ncurses-5.1
+ >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ if [ "$JAVAC" ];
+ then
+ cp ext/java/Makefile.in ext/java/Makefile.in.orig
+ cat ext/java/Makefile.in.orig | \
+ sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+ > ext/java/Makefile.in
+ fi
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="${myconf} --with-pam"
+ use nls && myconf="${myconf} --with-gettext" || myconf="${myconf} --without-gettext"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib"
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+ use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ newins php.ini-dist php.ini
+ dosym /etc/apache/conf/addon-modules/php.ini /etc/apache/conf/php.ini
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
diff --git a/dev-lang/php/php-4.1.2-r9.ebuild b/dev-lang/php/php-4.1.2-r9.ebuild
new file mode 100644
index 0000000..030f620
--- /dev/null
+++ b/dev-lang/php/php-4.1.2-r9.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2-r9.ebuild,v 1.1 2002/05/05 23:45:44 rphillips Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3.24-r1
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ ssl? ( >=dev-libs/openssl-0.9.5 )
+ curl? ( >=net-ftp/curl-7.8.1 )
+ snmp? ( net-analyzer/ucd-snmp )
+ xml? ( >=app-text/sablotron-0.44 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ java? ( virtual/jdk )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf media-libs/ming )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ readline? ( >=sys-libs/ncurses-5.1
+ >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ if [ "$JAVAC" ];
+ then
+ cp ext/java/Makefile.in ext/java/Makefile.in.orig
+ cat ext/java/Makefile.in.orig | \
+ sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+ > ext/java/Makefile.in
+ fi
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="${myconf} --with-pam"
+ use nls || myconf="${myconf} --without-gettext"
+ use ssl && myconf="${myconf} --with-openssl"
+ use curl && myconf="${myconf} --with-curl"
+ use snmp && myconf="${myconf} --with-snmp --enable-ucd-snmp-hack"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib"
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+ use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-bz2 \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ newins php.ini-dist php.ini
+ dosym /etc/apache/conf/addon-modules/php.ini /etc/apache/conf/php.ini
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
diff --git a/dev-lang/php/php-4.1.2.ebuild b/dev-lang/php/php-4.1.2.ebuild
new file mode 100644
index 0000000..40b1682
--- /dev/null
+++ b/dev-lang/php/php-4.1.2.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.1.2.ebuild,v 1.1 2002/02/28 05:29:22 blocke Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.0.7
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ gettext? ( sys-devel/gettext )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ mhash? ( >=app-crypt/mhash-0.8 )
+ mcrypt? ( >=dev-libs/libmcrypt-2.4 )
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ imap? ( virtual/imapUW )
+ flash? ( media-libs/libswf media-libs/ming )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+RDEPEND="virtual/glibc
+ >=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.0.7
+ >=media-libs/t1lib-1.0.1
+ >=net-www/apache-1.3
+ pam? ( >=sys-libs/pam-0.75 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ berkdb? ( >=sys-libs/db-3 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.1 )
+ X? ( virtual/x11 )
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ xml2? ( dev-libs/libxml2 )
+ java? ( virtual/jdk )
+ "
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf -lhpi $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+ # also, t1lib support seems to be broken: gcc: /usr/lib/.libs/libt1.so: No such file or directory
+
+ myconf="--without-readline --without-t1lib"
+ use pam && myconf="$myconf --with-pam"
+ use gettext && myconf="$myconf --with-gettext"
+ use gdbm && myconf="$myconf --with-gdbm=/usr"
+ use berkdb && myconf="$myconf --with-db3=/usr"
+ use mysql && myconf="$myconf --with-mysql=/usr"
+ use postgres && myconf="$myconf --with-pgsql=/usr"
+ use odbc && myconf="$myconf --with-unixODBC=/usr"
+ use ldap && myconf="$myconf --with-ldap"
+
+ if [ "`use qt`" ] ; then
+ EXPORT QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="$myconf --with-qtdom"
+ fi
+
+ if [ "`use imap`" ] ; then
+ # need to see if imap was built w/ ssl support
+ local pkg=`tail -n 1 /var/db/pkg/virtual/imapUW/VIRTUAL`
+ if [ "`grep ssl /var/db/pkg/${pkg}/USE`" ] ; then
+ echo "imap compiled with SSL"
+ myconf="$myconf --with-imap-ssl"
+ else
+ echo "imap compiled w/o SSL"
+ myconf="$myconf --with-imap"
+ # php build will fail if imap doesn't have SSL support
+ echo "unfortunately, the php build will fail due to"
+ echo "strange header errors in /usr/include/imap4r1.h"
+ echo "Please rebuild uw-imap or pine w/ 'ssl' in USE"
+ die
+ fi
+ fi
+ use libwww && myconf="$myconf --with-xml" || myconf="$myconf --disable-xml"
+ use flash && myconf="$myconf --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="$myconf --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="$myconf --with-dom"
+ use mhash && myconf="$myconf --with-mhash"
+ use mcrypt && myconf="$myconf --with-mcrypt"
+ use java && myconf="$myconf --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="$myconf --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure --enable-safe-mode --enable-ftp --enable-track-vars --with-gmp \
+ --enable-dbase --enable-sysvsem --enable-sysvshm --with-zlib=yes --enable-bcmath \
+ --enable-calendar --enable-versioning --enable-inline-optimization --enable-trans-sid \
+ --with-gd --with-ttf --with-t1lib --with-png-lib=/usr/lib --with-jpeg-dir=/usr/lib --prefix=/usr \
+ --with-config-file-path=`/usr/sbin/apxs -q SYSCONFDIR` --host=${CHOST} \
+ --with-apxs="/usr/sbin/apxs -ltiff" --with-exec-dir="/usr/lib/apache/bin" $myconf || die
+
+ make || die
+}
+
+
+src_install() {
+
+ make INSTALL_ROOT=${D} install-pear || die
+ dodir /usr/lib/apache
+ cp .libs/libphp4.so ${D}/usr/lib/apache
+
+ dodir /etc/httpd
+ cp php.ini-dist ${D}/etc/httpd/php.ini
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+}
+
+pkg_config() {
+
+ if [ -f "${ROOT}/etc/httpd/httpd.conf" ] ; then
+
+ # Activate PHP-Extension in httpd.conf
+ einfo "Activate PHP in httpd.conf..."
+ cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
+ sed -e "s/^#LoadModule php4_module/LoadModule php4_module/" \
+ -e "s/^#AddModule mod_php4.c/AddModule mod_php4.c/" \
+ -e "s/#AddType application\/x-httpd-php /AddType application\/x-httpd-php /" \
+ -e "s/#AddType application\/x-httpd-php-/AddType application\/x-httpd-php-/" \
+ ${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf
+ fi
+}
+
+
+
diff --git a/dev-lang/php/php-4.2.0.ebuild b/dev-lang/php/php-4.2.0.ebuild
new file mode 100644
index 0000000..05b89ed
--- /dev/null
+++ b/dev-lang/php/php-4.2.0.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# Update: Roman Weber <gentoo@gonzo.ch>
+# /space/gentoo/cvsroot/gentoo-x86/dev-lang/php/php-4.1.2-r8.ebuild,v 1.2 2002/04/28 23:38:19 rphillips Exp
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.3.1
+ >=net-www/apache-1.3.24-r1
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ xml? ( >=app-text/sablotron-0.44 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ java? ( virtual/jdk )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf media-libs/ming )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )"
+# Only needed by CGI-Version
+# readline? ( >=sys-libs/ncurses-5.1
+# >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+
+ if [ "`use java`" ] ; then
+
+ cp configure configure.orig
+ cat configure.orig | \
+ sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf $LIBS"/' \
+ > configure
+
+ cp ext/gd/gd.c ext/gd/gd.c.orig
+ cat ext/gd/gd.c.orig | \
+ sed -e "s/typedef FILE gdIOCtx;//" \
+ > ext/gd/gd.c
+ if [ "$JAVAC" ];
+ then
+ cp ext/java/Makefile.in ext/java/Makefile.in.orig
+ cat ext/java/Makefile.in.orig | \
+ sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+ > ext/java/Makefile.in
+ fi
+ fi
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+
+ myconf="--without-readline "
+ use pam && myconf="${myconf} --with-pam"
+ use nls || myconf="${myconf} --without-gettext"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib"
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+ use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=/etc/php4 \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ insinto /etc/php4
+ newins php.ini-dist php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/php.ini
+ dosym /usr/lib/php/extensions/no-debug-non-zts-20010901 /etc/php4/lib
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+ einfo "Please remeber:"
+ einfo "This version of PHP has set register_globals = Off (Security)"
+ einfo "Please read http://www.php.net/release_4_1_0.php (SECURITY: NEW INPUT MECHANISM)"
+ einfo "for further informations."
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
diff --git a/dev-lang/php/php-4.2.1-r1.ebuild b/dev-lang/php/php-4.2.1-r1.ebuild
new file mode 100644
index 0000000..b2ca5ea
--- /dev/null
+++ b/dev-lang/php/php-4.2.1-r1.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# Update: Roman Weber <gentoo@gonzo.ch>
+# /space/gentoo/cvsroot/gentoo-x86/dev-lang/php/php-4.2.1.ebuild,v 1.2 2002/05/19 23:53:32 rphillips Exp
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.3.1
+ >=net-www/apache-1.3.24-r1
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ xml? ( >=app-text/sablotron-0.44 )
+ ssl? ( >=dev-libs/openssl-0.9.5 )
+ curl? ( >=net-ftp/curl-7.8.1 )
+ snmp? ( >=net-analyzer/ucd-snmp-4.2.3 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf >=media-libs/ming-0.2a )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )"
+# java? ( virtual/jdk )
+# Only needed by CGI-Version
+# readline? ( >=sys-libs/ncurses-5.1
+# >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+
+# if [ "`use java`" ] ; then
+#
+# cp configure configure.orig
+# cat configure.orig | \
+# sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf $LIBS"/' \
+# > configure
+#
+# cp ext/gd/gd.c ext/gd/gd.c.orig
+# cat ext/gd/gd.c.orig | \
+# sed -e "s/typedef FILE gdIOCtx;//" \
+# > ext/gd/gd.c
+# if [ "$JAVAC" ];
+# then
+# cp ext/java/Makefile.in ext/java/Makefile.in.orig
+# cat ext/java/Makefile.in.orig | \
+# sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+# > ext/java/Makefile.in
+# fi
+# fi
+
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+
+ myconf="--without-readline "
+ use pam && myconf="${myconf} --with-pam"
+ use nls || myconf="${myconf} --without-gettext"
+ use ssl && myconf="${myconf} --with-openssl"
+ use curl && myconf="${myconf} --with-curl"
+ use snmp && myconf="${myconf} --with-snmp --enable-ucd-snmp-hack"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr" || myconf="${myconf} --without-mysql"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib=/usr"
+
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ myconf="${myconf} --enable-xslt"
+ myconf="${myconf} --with-xslt-sablot"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+# use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-bz2 \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=/etc/php4 \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ insinto /etc/php4
+ cat php.ini-dist | sed "s/register_globals = Off/register_globals = On/g" > php.ini
+ doins php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/addon-modules/php.ini
+ dosym /usr/lib/php/extensions/no-debug-non-zts-20020429 /etc/php4/lib
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+ einfo "Please remeber:"
+ einfo "This install of PHP has set register_globals = On (lower security)"
+ einfo "Please read http://www.php.net/release_4_1_2.php (Section: External variables)"
+ einfo "for further informations."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
+
diff --git a/dev-lang/php/php-4.2.1-r2.ebuild b/dev-lang/php/php-4.2.1-r2.ebuild
new file mode 100644
index 0000000..77be251
--- /dev/null
+++ b/dev-lang/php/php-4.2.1-r2.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# Update: Roman Weber <gentoo@gonzo.ch>
+# /space/gentoo/cvsroot/gentoo-x86/dev-lang/php/php-4.2.1.ebuild,v 1.2 2002/05/19 23:53:32 rphillips Exp
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+LICENSE="PHP"
+SLOT="0"
+KEYWORDS="x86"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.3.1
+ >=net-www/apache-1.3.26-r2
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ xml? ( >=app-text/sablotron-0.44 )
+ ssl? ( >=dev-libs/openssl-0.9.5 )
+ curl? ( >=net-ftp/curl-7.8.1 )
+ snmp? ( >=net-analyzer/ucd-snmp-4.2.3 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf >=media-libs/ming-0.2a )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ firebird? ( >=dev-db/firebird-1.0 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )"
+# java? ( virtual/jdk )
+# Only needed by CGI-Version
+# readline? ( >=sys-libs/ncurses-5.1
+# >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+
+# if [ "`use java`" ] ; then
+#
+# cp configure configure.orig
+# cat configure.orig | \
+# sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf $LIBS"/' \
+# > configure
+#
+# cp ext/gd/gd.c ext/gd/gd.c.orig
+# cat ext/gd/gd.c.orig | \
+# sed -e "s/typedef FILE gdIOCtx;//" \
+# > ext/gd/gd.c
+# if [ "$JAVAC" ];
+# then
+# cp ext/java/Makefile.in ext/java/Makefile.in.orig
+# cat ext/java/Makefile.in.orig | \
+# sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+# > ext/java/Makefile.in
+# fi
+# fi
+
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+
+ myconf="--without-readline "
+ use pam && myconf="${myconf} --with-pam"
+ use nls || myconf="${myconf} --without-gettext"
+ use ssl && myconf="${myconf} --with-openssl"
+ use curl && myconf="${myconf} --with-curl"
+ use snmp && myconf="${myconf} --with-snmp --enable-ucd-snmp-hack"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr" || myconf="${myconf} --without-mysql"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib=/usr"
+ use firebird && myconf="${myconf} --with-interbase=/opt/interbase"
+
+ # optional support for oracle oci8
+ if [ "`use oci8`" ] ; then
+ if [ "$ORACLE_HOME" ] ; then
+ myconf="${myconf} --with-oci8=${ORACLE_HOME}"
+ fi
+ fi
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ myconf="${myconf} --enable-xslt"
+ myconf="${myconf} --with-xslt-sablot"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+# use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-bz2 \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=/etc/php4 \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ insinto /etc/php4
+ cat php.ini-dist | sed "s/register_globals = Off/register_globals = On/g" > php.ini
+ doins php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/addon-modules/php.ini
+ dosym /usr/lib/php/extensions/no-debug-non-zts-20020429 /etc/php4/lib
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+ einfo "Please remeber:"
+ einfo "This install of PHP has set register_globals = On (lower security)"
+ einfo "Please read http://www.php.net/release_4_1_2.php (Section: External variables)"
+ einfo "for further informations."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
+
diff --git a/dev-lang/php/php-4.2.1-r3.ebuild b/dev-lang/php/php-4.2.1-r3.ebuild
new file mode 100644
index 0000000..59ee8f0
--- /dev/null
+++ b/dev-lang/php/php-4.2.1-r3.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# Update: Roman Weber <gentoo@gonzo.ch>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.2.1-r3.ebuild,v 1.1 2002/07/09 19:10:58 rphillips Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+LICENSE="PHP"
+SLOT="0"
+KEYWORDS="x86"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ freetype? ( ~media-libs/freetype-1.3.1 >=media-libs/t1lib-1.3.1 )
+ jpeg? ( >=media-libs/jpeg-6b )
+ tiff? ( >=media-libs/tiff-3.5.5 )
+ png? ( >=media-libs/libpng-1.2.1 )
+ gd? ( >=media-libs/libgd-1.8.3 )
+ >=net-www/apache-1.3.26-r2
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ xml? ( >=app-text/sablotron-0.44 )
+ ssl? ( >=dev-libs/openssl-0.9.5 )
+ curl? ( >=net-ftp/curl-7.8.1 )
+ snmp? ( >=net-analyzer/ucd-snmp-4.2.3 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf >=media-libs/ming-0.2a )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ firebird? ( >=dev-db/firebird-1.0 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )"
+# java? ( virtual/jdk )
+# Only needed by CGI-Version
+# readline? ( >=sys-libs/ncurses-5.1
+# >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+
+# if [ "`use java`" ] ; then
+#
+# cp configure configure.orig
+# cat configure.orig | \
+# sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf $LIBS"/' \
+# > configure
+#
+# cp ext/gd/gd.c ext/gd/gd.c.orig
+# cat ext/gd/gd.c.orig | \
+# sed -e "s/typedef FILE gdIOCtx;//" \
+# > ext/gd/gd.c
+# if [ "$JAVAC" ];
+# then
+# cp ext/java/Makefile.in ext/java/Makefile.in.orig
+# cat ext/java/Makefile.in.orig | \
+# sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+# > ext/java/Makefile.in
+# fi
+# fi
+
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+
+ myconf="--without-readline "
+ use pam && myconf="${myconf} --with-pam"
+ use nls && myconf="${myconf} --with-gettext" || myconf="${myconf} --without-gettext"
+ use ssl && myconf="${myconf} --with-openssl"
+ use curl && myconf="${myconf} --with-curl"
+ use snmp && myconf="${myconf} --with-snmp --enable-ucd-snmp-hack"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr" || myconf="${myconf} --without-mysql"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib=/usr"
+ use gd && myconf="${myconf} --with-gd"
+ use freetype && myconf="${myconf} --with-ttf --with-t1lib"
+ use jpeg && myconf="${myconf} --with-jpeg-dir=/usr/lib"
+ use png && myconf="${myconf} --with-png-dir=/usr"
+ use tiff && myconf="${myconf} --with-tiff-dir=/usr"
+ use firebird && myconf="${myconf} --with-interbase=/opt/interbase"
+
+ # optional support for oracle oci8
+ if [ "`use oci8`" ] ; then
+ if [ "$ORACLE_HOME" ] ; then
+ myconf="${myconf} --with-oci8=${ORACLE_HOME}"
+ fi
+ fi
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ myconf="${myconf} --enable-xslt"
+ myconf="${myconf} --with-xslt-sablot"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+# use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gmp \
+ --with-bz2 \
+ --enable-ftp \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=/etc/php4 \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ insinto /etc/php4
+ cat php.ini-dist | sed "s/register_globals = Off/register_globals = On/g" > php.ini
+ doins php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/addon-modules/php.ini
+ dosym /usr/lib/php/extensions/no-debug-non-zts-20020429 /etc/php4/lib
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+ einfo "Please remeber:"
+ einfo "This install of PHP has set register_globals = On (lower security)"
+ einfo "Please read http://www.php.net/release_4_1_2.php (Section: External variables)"
+ einfo "for further informations."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
+
diff --git a/dev-lang/php/php-4.2.1.ebuild b/dev-lang/php/php-4.2.1.ebuild
new file mode 100644
index 0000000..13d1a23
--- /dev/null
+++ b/dev-lang/php/php-4.2.1.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Tools Team <tools@gentoo.org>
+# Author: Achim Gottinger <achim@gentoo.org>
+# Update: Roman Weber <gentoo@gonzo.ch>
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.2.1.ebuild,v 1.1 2002/05/19 23:04:16 rphillips Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="HTML embedded scripting language"
+SRC_URI="http://www.php.net/distributions/${P}.tar.gz"
+HOMEPAGE="http://www.php.net/"
+SLOT="0"
+
+DEPEND=">=dev-libs/gmp-3.1.1
+ ~media-libs/freetype-1.3.1
+ >=media-libs/jpeg-6b
+ >=media-libs/tiff-3.5.5
+ >=media-libs/libpng-1.2.1
+ >=media-libs/libgd-1.8.3
+ >=media-libs/t1lib-1.3.1
+ >=net-www/apache-1.3.24-r1
+ X? ( virtual/x11 )
+ qt? ( =x11-libs/qt-2.3* )
+ nls? ( sys-devel/gettext )
+ pam? ( >=sys-libs/pam-0.75 )
+ xml? ( >=app-text/sablotron-0.44 )
+ ssl? ( >=dev-libs/openssl-0.9.5 )
+ curl? ( >=net-ftp/curl-7.8.1 )
+ snmp? ( >=net-analyzer/ucd-snmp-4.2.3 )
+ imap? ( >=net-mail/uw-imap-2001a-r1 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ xml2? ( dev-libs/libxml2 )
+ crypt? ( >=dev-libs/libmcrypt-2.4
+ >=app-crypt/mhash-0.8 )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ flash? ( media-libs/libswf >=media-libs/ming-0.2a )
+ berkdb? ( >=sys-libs/db-3 )
+ libwww? ( >=net-libs/libwww-5.3.2 )
+ pdflib? ( >=media-libs/pdflib-4.0.1-r2 )
+ postgres? ( >=dev-db/postgresql-7.1 )"
+# java? ( virtual/jdk )
+# Only needed by CGI-Version
+# readline? ( >=sys-libs/ncurses-5.1
+# >=sys-libs/readline-4.1 )"
+
+RDEPEND="${DEPEND}
+ qt? ( >=x11-libs/qt-2.3.0 )
+ xml? ( >=app-text/sablotron-0.44 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+
+# if [ "`use java`" ] ; then
+#
+# cp configure configure.orig
+# cat configure.orig | \
+# sed -e 's/LIBS="-lttf $LIBS"/LIBS="-lttf $LIBS"/' \
+# > configure
+#
+# cp ext/gd/gd.c ext/gd/gd.c.orig
+# cat ext/gd/gd.c.orig | \
+# sed -e "s/typedef FILE gdIOCtx;//" \
+# > ext/gd/gd.c
+# if [ "$JAVAC" ];
+# then
+# cp ext/java/Makefile.in ext/java/Makefile.in.orig
+# cat ext/java/Makefile.in.orig | \
+# sed -e "s/^\tjavac/\t\$(JAVAC)/" \
+# > ext/java/Makefile.in
+# fi
+# fi
+
+}
+
+src_compile() {
+
+ local myconf
+
+ # readline can only be used w/ CGI build, so I'll turn it off
+ #if [ "`use readline`" ] ; then
+ # myconf="--with-readline"
+ #fi
+
+ myconf="--without-readline "
+ use pam && myconf="${myconf} --with-pam"
+ use nls || myconf="${myconf} --without-gettext"
+ use ssl && myconf="${myconf} --with-openssl"
+ use curl && myconf="${myconf} --with-curl"
+ use snmp && myconf="${myconf} --with-snmp --enable-ucd-snmp-hack"
+ use gdbm && myconf="${myconf} --with-gdbm=/usr"
+ use berkdb && myconf="${myconf} --with-db3=/usr"
+ use mysql && myconf="${myconf} --with-mysql=/usr" || myconf="${myconf} --without-mysql"
+ use postgres && myconf="${myconf} --with-pgsql=/usr"
+ use odbc && myconf="${myconf} --with-unixODBC=/usr"
+ use ldap && myconf="${myconf} --with-ldap"
+ use pdflib && myconf="${myconf} --with-pdflib=/usr"
+
+
+ use qt && ( \
+ export QTDIR=/usr/qt/2 #hope this helps - danarmak
+ myconf="${myconf} --with-qtdom"
+ )
+
+ if [ "`use imap`" ] ; then
+ if [ "`use ssl`" ] && [ "`strings ${ROOT}/usr/lib/c-client.a \
+ | grep ssl_onceonlyinit`" ] ; then
+ echo "Compiling imap with SSL support"
+ myconf="${myconf} --with-imap --with-imap-ssl"
+ else
+ echo "Compiling imap without SSL support"
+ myconf="${myconf} --with-imap"
+ fi
+ fi
+ use libwww && myconf="${myconf} --with-xml" || myconf="${myconf} --disable-xml"
+ use flash && myconf="${myconf} --with-swf=/usr --with-ming=/usr"
+
+ if [ "`use xml`" ] ; then
+ export LIBS="-lxmlparse -lxmltok"
+ myconf="${myconf} --with-sablot=/usr"
+ fi
+
+ use xml2 && myconf="${myconf} --with-dom"
+ use crypt && myconf="${myconf} --with-mcrypt --with-mhash"
+# use java && myconf="${myconf} --with-java=${JDK_HOME}"
+
+ LDFLAGS="$LDFLAGS -ltiff -ljpeg"
+
+ if [ "`use X`" ] ; then
+ myconf="${myconf} --with-xpm-dir=/usr/X11R6"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+ fi
+
+ ./configure \
+ --prefix=/usr \
+ --with-gd \
+ --with-gmp \
+ --with-bz2 \
+ --with-ttf \
+ --enable-ftp \
+ --with-t1lib \
+ --enable-dbase \
+ --with-zlib=yes \
+ --enable-bcmath \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-calendar \
+ --enable-trans-sid \
+ --enable-safe-mode \
+ --enable-versioning \
+ --enable-track-vars \
+ --with-png-dir=/usr/lib \
+ --with-jpeg-dir=/usr/lib \
+ --enable-inline-optimization \
+ --with-apxs="/usr/sbin/apxs -ltiff" \
+ --with-exec-dir="/usr/lib/apache/bin" \
+ --with-config-file-path=/etc/php4 \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ make || die "compile problem"
+}
+
+
+src_install() {
+ make INSTALL_ROOT=${D} install-pear || die
+
+ dodoc CODING_STANDARDS LICENSE EXTENSIONS
+ dodoc RELEASE_PROCESS README.* TODO NEWS
+ dodoc ChangeLog* *.txt
+
+ exeinto /usr/lib/apache-extramodules
+ doexe .libs/libphp4.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/mod_php.conf
+ insinto /etc/php4
+ cat php.ini-dist | sed "s/register_globals = Off/register_globals = On/g" > php.ini
+ doins php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/php.ini
+ dosym /etc/php4/php.ini /etc/apache/conf/addon-modules/php.ini
+ dosym /usr/lib/php/extensions/no-debug-non-zts-20010901 /etc/php4/lib
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+ einfo "Please remeber:"
+ einfo "This install of PHP has set register_globals = On (lower security)"
+ einfo "Please read http://www.php.net/release_4_1_2.php (Section: External variables)"
+ einfo "for further informations."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/libphp4.so mod_php4.c php4_module \
+ before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf
+ :;
+}
+
diff --git a/dev-lang/php/php-4.3.11-r1.ebuild b/dev-lang/php/php-4.3.11-r1.ebuild
new file mode 100644
index 0000000..1b9ad9f
--- /dev/null
+++ b/dev-lang/php/php-4.3.11-r1.ebuild
@@ -0,0 +1,303 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.3.11-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd ${S}
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch ${FILESDIR}/4.4.0/php4.3.11-pcre-security.patch
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php.conf"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php.conf"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.3.11-r2.ebuild b/dev-lang/php/php-4.3.11-r2.ebuild
new file mode 100644
index 0000000..34f9e96
--- /dev/null
+++ b/dev-lang/php/php-4.3.11-r2.ebuild
@@ -0,0 +1,321 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.3.11-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/4.3.11/php4.3.11-pspell-ext-segf.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/4.3.11/php4.3.11-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/4.3.11/php4.3.11-fopen_wrappers.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/4.3.11/php4.3.11-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/4.3.11/php4.3.11-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.3.11-r3.ebuild b/dev-lang/php/php-4.3.11-r3.ebuild
new file mode 100644
index 0000000..0e671a9
--- /dev/null
+++ b/dev-lang/php/php-4.3.11-r3.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.3.11-r3.ebuild,v 1.1 2005/11/03 14:09:24 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~arm ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/4.3.11/php4.3.11-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/4.3.11/php4.3.11-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/4.3.11/php4.3.11-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/4.3.11/php4.3.11-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/4.3.11/php4.3.11-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/4.3.11/php4.3.11-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/4.3.11/php4.3.11-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/4.3.11/php4.3.11-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.3.11-r4.ebuild b/dev-lang/php/php-4.3.11-r4.ebuild
new file mode 100644
index 0000000..740c32a
--- /dev/null
+++ b/dev-lang/php/php-4.3.11-r4.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.3.11-r4.ebuild,v 1.1 2005/11/04 12:45:21 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~arm ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/4.3.11/php4.3.11-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/4.3.11/php4.3.11-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/4.3.11/php4.3.11-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/4.3.11/php4.3.11-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/4.3.11/php4.3.11-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/4.3.11/php4.3.11-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/4.3.11/php4.3.11-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/4.3.11/php4.3.11-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.3.11-r5.ebuild b/dev-lang/php/php-4.3.11-r5.ebuild
new file mode 100644
index 0000000..68f2b48
--- /dev/null
+++ b/dev-lang/php/php-4.3.11-r5.ebuild
@@ -0,0 +1,340 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.3.11-r5.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~arm ~ia64 ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.3-gentoo.patch.gz"
+LIB64_PATCH="${PV}/php${PV}-multilib-search-path.patch"
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl5-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/${PV}/php${PV}-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/${PV}/php${PV}-curl-open_basedir.patch"
+
+ # fix header injection in mbstring extension
+ use nls && epatch "${FILESDIR}/${PV}/php${PV}-mbstring-header_inj.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/${PV}/php${PV}-gd-safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/${PV}/php${PV}-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/${PV}/php${PV}-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/${PV}/php${PV}-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/${PV}/php${PV}-apache2sapi.patch"
+
+ # patch to fix some issues in the apache SAPI
+ epatch "${FILESDIR}/${PV}/php${PV}-apachesapi.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/${PV}/php${PV}-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.3.11.ebuild b/dev-lang/php/php-4.3.11.ebuild
new file mode 100644
index 0000000..9f7321d
--- /dev/null
+++ b/dev-lang/php/php-4.3.11.ebuild
@@ -0,0 +1,279 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.3.11.ebuild,v 1.1 2005/09/11 18:57:09 hollow Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+SLOT="4"
+PHPSAPI_ALLOWED="cli cgi apache apache2"
+MY_PHP_P="php-${PV}"
+PHP_S="${WORKDIR}/${MY_PHP_P}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php.conf"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php.conf"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.0-r1.ebuild b/dev-lang/php/php-4.4.0-r1.ebuild
new file mode 100644
index 0000000..e4f58bb
--- /dev/null
+++ b/dev-lang/php/php-4.4.0-r1.ebuild
@@ -0,0 +1,303 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.0-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd ${S}
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch ${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php.conf"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php.conf"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.0-r2.ebuild b/dev-lang/php/php-4.4.0-r2.ebuild
new file mode 100644
index 0000000..4f82539
--- /dev/null
+++ b/dev-lang/php/php-4.4.0-r2.ebuild
@@ -0,0 +1,321 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.0-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/4.4.0/php4.4.0-pspell-ext-segf.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/4.4.0/php4.4.0-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/4.4.0/php4.4.0-fopen_wrappers.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/4.4.0/php4.4.0-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.0-r3.ebuild b/dev-lang/php/php-4.4.0-r3.ebuild
new file mode 100644
index 0000000..237ac51
--- /dev/null
+++ b/dev-lang/php/php-4.4.0-r3.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.0-r3.ebuild,v 1.1 2005/11/03 14:09:24 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/4.4.0/php4.4.0-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/4.4.0/php4.4.0-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/4.4.0/php4.4.0-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/4.4.0/php4.4.0-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/4.4.0/php4.4.0-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/4.4.0/php4.4.0-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/4.4.0/php4.4.0-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.0-r4.ebuild b/dev-lang/php/php-4.4.0-r4.ebuild
new file mode 100644
index 0000000..bb23aa9
--- /dev/null
+++ b/dev-lang/php/php-4.4.0-r4.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.0-r4.ebuild,v 1.1 2005/11/04 12:45:21 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/4.4.0/php4.4.0-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/4.4.0/php4.4.0-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/4.4.0/php4.4.0-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/4.4.0/php4.4.0-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/4.4.0/php4.4.0-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/4.4.0/php4.4.0-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/4.4.0/php4.4.0-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.0.ebuild b/dev-lang/php/php-4.4.0.ebuild
new file mode 100644
index 0000000..2426683
--- /dev/null
+++ b/dev-lang/php/php-4.4.0.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.0.ebuild,v 1.1 2005/09/04 16:58:08 stuart Exp $
+
+IUSE="${IUSE} cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~ppc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+SLOT="4"
+PHPSAPI_ALLOWED="cli cgi apache apache2"
+MY_PHP_P="php-${PV}"
+PHP_S="${WORKDIR}/${MY_PHP_P}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Create the symlinks with eselect
+ if useq cli ; then
+ eselect php set php4
+ eselect php-devel set php4
+ fi
+
+ if useq cgi ; then
+ eselect php-cgi set php4
+ eselect php-devel set php4
+ fi
+
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php.conf"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php.conf"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.1-r1.ebuild b/dev-lang/php/php-4.4.1-r1.ebuild
new file mode 100644
index 0000000..8ad92d5
--- /dev/null
+++ b/dev-lang/php/php-4.4.1-r1.ebuild
@@ -0,0 +1,299 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.1-r1.ebuild,v 1.1 2005/11/03 23:54:59 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl1-gentoo"|g' -i configure.in
+
+ # patch crash with mod_rewrite in Apache2 SAPI, mentioned in bug #111032
+ epatch "${FILESDIR}/4.4.1/php4.4.1-mod_rewrite-crash.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.1-r2.ebuild b/dev-lang/php/php-4.4.1-r2.ebuild
new file mode 100644
index 0000000..38e38b2
--- /dev/null
+++ b/dev-lang/php/php-4.4.1-r2.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.1-r2.ebuild,v 1.1 2005/11/04 12:45:21 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl1-gentoo"|g' -i configure.in
+
+ # patch crash with mod_rewrite in Apache2 SAPI, mentioned in bug #111032
+ epatch "${FILESDIR}/4.4.1/php4.4.1-mod_rewrite-crash.patch"
+
+ # fix for http://bugs.php.net/bug.php?id=35067
+ epatch "${FILESDIR}/4.4.1/php4.4.1-current_key_by_reference.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.1-r3.ebuild b/dev-lang/php/php-4.4.1-r3.ebuild
new file mode 100644
index 0000000..6db0be4
--- /dev/null
+++ b/dev-lang/php/php-4.4.1-r3.ebuild
@@ -0,0 +1,318 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.1-r3.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.8-gentoo.patch.gz"
+LIB64_PATCH="${PV}/php${PV}-multilib-search-path.patch"
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # fix open_basedir bypass in CURL extension
+ use curl && epatch "${FILESDIR}/${PV}/php${PV}-curl-open_basedir.patch"
+
+ # fix header injection in mbstring extension
+ use nls && epatch "${FILESDIR}/${PV}/php${PV}-mbstring-header_inj.patch"
+
+ # fix safe_mode bypass in GD extension
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/${PV}/php${PV}-gd-safe_mode.patch"
+ fi
+
+ # patch crash with mod_rewrite mentioned in bug #111032 and other Apache2
+ # SAPI bugs fixed by upstream
+ epatch "${FILESDIR}/${PV}/php${PV}-apache2sapi.patch"
+
+ # fix for http://bugs.php.net/bug.php?id=35067
+ epatch "${FILESDIR}/${PV}/php${PV}-current_key_by_reference.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php4_4-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.1.ebuild b/dev-lang/php/php-4.4.1.ebuild
new file mode 100644
index 0000000..5b9f38c
--- /dev/null
+++ b/dev-lang/php/php-4.4.1.ebuild
@@ -0,0 +1,278 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.1.ebuild,v 1.1 2005/11/03 14:09:24 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.2-r1.ebuild b/dev-lang/php/php-4.4.2-r1.ebuild
new file mode 100644
index 0000000..eba7b72
--- /dev/null
+++ b/dev-lang/php/php-4.4.2-r1.ebuild
@@ -0,0 +1,286 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.2-r1.ebuild,v 1.1 2006/04/13 20:28:58 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+PHP_PATCHSET_REV="2"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.8-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="--disable-cli --enable-cgi --enable-fastcgi"
+ phpconfutils_extension_enable "discard-path" "discard-path" 0
+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ else
+ einfo "Installing Apache config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.2-r2.ebuild b/dev-lang/php/php-4.4.2-r2.ebuild
new file mode 100644
index 0000000..52eba6a
--- /dev/null
+++ b/dev-lang/php/php-4.4.2-r2.ebuild
@@ -0,0 +1,288 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.2-r2.ebuild,v 1.1 2006/05/05 10:28:58 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+PHP_PATCHSET_REV="3"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.9-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="--disable-cli --enable-cgi --enable-fastcgi"
+ phpconfutils_extension_enable "discard-path" "discard-path" 0
+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ else
+ einfo "Installing Apache config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.2-r3.ebuild b/dev-lang/php/php-4.4.2-r3.ebuild
new file mode 100644
index 0000000..4dc776f
--- /dev/null
+++ b/dev-lang/php/php-4.4.2-r3.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.2-r3.ebuild,v 1.1 2006/05/29 22:07:20 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+PHP_PATCHSET_REV="4"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.11-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="--disable-cli --enable-cgi --enable-fastcgi"
+ phpconfutils_extension_enable "discard-path" "discard-path" 0
+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ else
+ einfo "Installing Apache config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.2-r5.ebuild b/dev-lang/php/php-4.4.2-r5.ebuild
new file mode 100644
index 0000000..2049d27
--- /dev/null
+++ b/dev-lang/php/php-4.4.2-r5.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.2-r5.ebuild,v 1.1 2006/06/20 20:38:58 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+PHP_PATCHSET_REV="6"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.11-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="--disable-cli --enable-cgi --enable-fastcgi"
+ phpconfutils_extension_enable "discard-path" "discard-path" 0
+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ else
+ einfo "Installing Apache config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.2-r6.ebuild b/dev-lang/php/php-4.4.2-r6.ebuild
new file mode 100644
index 0000000..553a9a6
--- /dev/null
+++ b/dev-lang/php/php-4.4.2-r6.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.2-r6.ebuild,v 1.1 2006/07/14 16:04:37 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="7"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.11-gentoo-r1.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache SAPIs."
+
+DEPEND="app-admin/php-toolkit"
+RDEPEND="${DEPEND}"
+
+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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.2.ebuild b/dev-lang/php/php-4.4.2.ebuild
new file mode 100644
index 0000000..0f24645
--- /dev/null
+++ b/dev-lang/php/php-4.4.2.ebuild
@@ -0,0 +1,286 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.2.ebuild,v 1.1 2006/03/12 13:25:34 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.8-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="--disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ else
+ einfo "Installing Apache config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-4.4.3-r1.ebuild b/dev-lang/php/php-4.4.3-r1.ebuild
new file mode 100644
index 0000000..d82a2ad
--- /dev/null
+++ b/dev-lang/php/php-4.4.3-r1.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.3-r1.ebuild,v 1.1 2006/08/10 16:31:49 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.13-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.4-r1.ebuild b/dev-lang/php/php-4.4.4-r1.ebuild
new file mode 100644
index 0000000..ae85911
--- /dev/null
+++ b/dev-lang/php/php-4.4.4-r1.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.4-r1.ebuild,v 1.1 2006/08/29 23:05:20 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.14-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.4-r2.ebuild b/dev-lang/php/php-4.4.4-r2.ebuild
new file mode 100644
index 0000000..b5ec30c
--- /dev/null
+++ b/dev-lang/php/php-4.4.4-r2.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.4-r2.ebuild,v 1.1 2006/08/30 11:17:26 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.14-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.4-r4.ebuild b/dev-lang/php/php-4.4.4-r4.ebuild
new file mode 100644
index 0000000..a6f9908
--- /dev/null
+++ b/dev-lang/php/php-4.4.4-r4.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.4-r4.ebuild,v 1.1 2006/09/10 12:48:50 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="2"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.15-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.4-r6.ebuild b/dev-lang/php/php-4.4.4-r6.ebuild
new file mode 100644
index 0000000..7f1c119
--- /dev/null
+++ b/dev-lang/php/php-4.4.4-r6.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.4-r6.ebuild,v 1.1 2006/10/07 20:22:39 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="3"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.15-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.4-r8.ebuild b/dev-lang/php/php-4.4.4-r8.ebuild
new file mode 100644
index 0000000..ce4c97c
--- /dev/null
+++ b/dev-lang/php/php-4.4.4-r8.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.4-r8.ebuild,v 1.1 2006/10/27 12:17:35 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="4"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.15-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.4.ebuild b/dev-lang/php/php-4.4.4.ebuild
new file mode 100644
index 0000000..cf99eac
--- /dev/null
+++ b/dev-lang/php/php-4.4.4.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.4.ebuild,v 1.1 2006/08/29 19:55:32 chtekk 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.14-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.6.ebuild b/dev-lang/php/php-4.4.6.ebuild
new file mode 100644
index 0000000..88a856b
--- /dev/null
+++ b/dev-lang/php/php-4.4.6.ebuild
@@ -0,0 +1,516 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.6.ebuild,v 1.1 2007/03/05 02:14:43 chtekk 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="4"
+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-${MY_PHP_PV}-0.9.6-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php4-envd" "20php4"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php4"
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.7.ebuild b/dev-lang/php/php-4.4.7.ebuild
new file mode 100644
index 0000000..e75a4ce
--- /dev/null
+++ b/dev-lang/php/php-4.4.7.ebuild
@@ -0,0 +1,516 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.7.ebuild,v 1.1 2007/05/07 21:56:24 chtekk 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="4"
+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-${MY_PHP_PV}-0.9.6-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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
+ php4_4-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php4_4-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache1" "70_mod_php.conf"
+ php4_4-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php4-envd" "20php4"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php4"
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php"
+ APACHE2_MOD_DEFINE="PHP4"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php4"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if useq cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if useq cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.8.ebuild b/dev-lang/php/php-4.4.8.ebuild
new file mode 100644
index 0000000..9085451
--- /dev/null
+++ b/dev-lang/php/php-4.4.8.ebuild
@@ -0,0 +1,477 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.8.ebuild,v 1.1 2008/01/08 17:28:26 hoffie 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="0"
+SUHOSIN_PATCH="suhosin-patch-4.4.8-0.9.6.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ php4_4-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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ php4_4-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
+}
+
+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-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ 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 PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php4-envd" "20php4"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php4"
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP4"
+ if use concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache2 to use mod_php
+ if use apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if use cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if use cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-4.4.8_pre20070816.ebuild b/dev-lang/php/php-4.4.8_pre20070816.ebuild
new file mode 100644
index 0000000..c75043a
--- /dev/null
+++ b/dev-lang/php/php-4.4.8_pre20070816.ebuild
@@ -0,0 +1,487 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-4.4.8_pre20070816.ebuild,v 1.1 2007/08/18 13:11:23 hoffie 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="4"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="0"
+SUHOSIN_PATCH="suhosin-patch-4.4.7-0.9.6-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php4_4-sapi apache-module
+
+SRC_URI="http://gentoo.longitekk.com/${P}.tar.bz2
+http://gentoo.longitekk.com/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+[[ -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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ php4_4-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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ # this fixes php -v output to include the snapshot date
+ PHP_EXTRA_BRANDING="_pre${PV#*_pre}"
+ PHP_EXTRA_BRANDING="${PHP_EXTRA_BRANDING#-r*}"
+
+ # Now let the eclass do the rest and regenerate the configure
+ php4_4-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
+}
+
+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-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_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}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php4-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-experimental-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php4_4-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
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # Let the eclass do the common work
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ 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 PHP4-concurrent (70_mod_php_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php_concurr.conf-apache2" "70_mod_php_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}/php4-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 PHP4 (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php.conf-apache2" "70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php4-envd" "20php4"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php4"
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP4"
+ if use concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache2 to use mod_php
+ if use apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php4
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v4, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if use cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if use cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php4
+ 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 v4, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php4"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php4 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php4
+ 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 v4, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php4"
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.0.4-r1.ebuild b/dev-lang/php/php-5.0.4-r1.ebuild
new file mode 100644
index 0000000..8a292fd
--- /dev/null
+++ b/dev-lang/php/php-5.0.4-r1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.4-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd ${S}
+
+ # fix a GCC4 compile bug in XMLRPC extension, bug #96813
+ epatch ${FILESDIR}/5.0.0/php5.0.4-xmlrcp-ccode.diff
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch ${FILESDIR}/5.0.0/php5.0.4-pcre-security.patch
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5.conf"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5.conf"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.4-r2.ebuild b/dev-lang/php/php-5.0.4-r2.ebuild
new file mode 100644
index 0000000..2d15d5d
--- /dev/null
+++ b/dev-lang/php/php-5.0.4-r2.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.4-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+ # fix a GCC4 compile bug in XMLRPC extension, bug #96813
+ use xmlrpc && epatch "${FILESDIR}/5.0.4/php5.0.4-xmlrcp-ccode.diff"
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/5.0.4/php5.0.4-pspell-ext-segf.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/5.0.4/php5.0.4-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/5.0.4/php5.0.4-fopen_wrappers.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/5.0.4/php5.0.4-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/5.0.4/php5.0.4-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.4-r3.ebuild b/dev-lang/php/php-5.0.4-r3.ebuild
new file mode 100644
index 0000000..6a174cb
--- /dev/null
+++ b/dev-lang/php/php-5.0.4-r3.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.4-r3.ebuild,v 1.1 2005/11/03 14:09:24 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # fix a GCC4 compile bug in XMLRPC extension, bug #96813
+ use xmlrpc && epatch "${FILESDIR}/5.0.4/php5.0.4-xmlrcp-ccode.diff"
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/5.0.4/php5.0.4-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/5.0.4/php5.0.4-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/5.0.4/php5.0.4-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/5.0.4/php5.0.4-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/5.0.4/php5.0.4-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/5.0.4/php5.0.4-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/5.0.4/php5.0.4-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/5.0.4/php5.0.4-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.4-r4.ebuild b/dev-lang/php/php-5.0.4-r4.ebuild
new file mode 100644
index 0000000..5d9d1c1
--- /dev/null
+++ b/dev-lang/php/php-5.0.4-r4.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.4-r4.ebuild,v 1.1 2005/11/04 12:45:21 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # fix a GCC4 compile bug in XMLRPC extension, bug #96813
+ use xmlrpc && epatch "${FILESDIR}/5.0.4/php5.0.4-xmlrcp-ccode.diff"
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/5.0.4/php5.0.4-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/5.0.4/php5.0.4-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/5.0.4/php5.0.4-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/5.0.4/php5.0.4-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/5.0.4/php5.0.4-globals_overwrite.patch"
+
+ # patch phpinfo() XSS vulnerability, bug #111015
+ epatch "${FILESDIR}/5.0.4/php5.0.4-phpinfo_xss.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/5.0.4/php5.0.4-session_save_path-segf.patch"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/5.0.4/php5.0.4-pcre-security.patch"
+
+ # sobstitute the bundled PCRE library with a fixed version for bug #102373
+ einfo "Updating bundled PCRE library"
+ rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.4.ebuild b/dev-lang/php/php-5.0.4.ebuild
new file mode 100644
index 0000000..f7e2aac
--- /dev/null
+++ b/dev-lang/php/php-5.0.4.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.4.ebuild,v 1.1 2005/09/04 16:58:08 stuart Exp $
+
+IUSE="${IUSE} cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~ppc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+SLOT="5"
+PHPSAPI_ALLOWED="cli cgi apache apache2"
+MY_PHP_P="php-${PV}"
+PHP_S="${WORKDIR}/${MY_PHP_P}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Create the symlinks with eselect
+ if useq cli ; then
+ eselect php set php5
+ eselect php-devel set php5
+ fi
+
+ if useq cgi ; then
+ eselect php-cgi set php5
+ eselect php-devel set php5
+ fi
+
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5.conf"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5.conf"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.5-r1.ebuild b/dev-lang/php/php-5.0.5-r1.ebuild
new file mode 100644
index 0000000..9a43bc7
--- /dev/null
+++ b/dev-lang/php/php-5.0.5-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.5-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd ${S}
+
+ # fix a object serialization bug, bug #105374
+ epatch ${FILESDIR}/5.0.0/php5.0.5-obj-serialize.patch
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5.conf"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5.conf"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.5-r2.ebuild b/dev-lang/php/php-5.0.5-r2.ebuild
new file mode 100644
index 0000000..469d213
--- /dev/null
+++ b/dev-lang/php/php-5.0.5-r2.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.5-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/5.0.5/php5.0.5-pspell-ext-segf.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/5.0.5/php5.0.5-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/5.0.5/php5.0.5-fopen_wrappers.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/5.0.5/php5.0.5-session_save_path-segf.patch"
+
+ # fix a object serialization bug, bug #105374
+ epatch "${FILESDIR}/5.0.5/php5.0.5-obj-serialize.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.5-r3.ebuild b/dev-lang/php/php-5.0.5-r3.ebuild
new file mode 100644
index 0000000..070e3af
--- /dev/null
+++ b/dev-lang/php/php-5.0.5-r3.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.5-r3.ebuild,v 1.1 2005/11/03 14:09:24 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/5.0.5/php5.0.5-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/5.0.5/php5.0.5-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/5.0.5/php5.0.5-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/5.0.5/php5.0.5-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/5.0.5/php5.0.5-globals_overwrite.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/5.0.5/php5.0.5-session_save_path-segf.patch"
+
+ # fix a object serialization bug, bug #105374
+ epatch "${FILESDIR}/5.0.5/php5.0.5-obj-serialize.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.5-r4.ebuild b/dev-lang/php/php-5.0.5-r4.ebuild
new file mode 100644
index 0000000..5b2143d
--- /dev/null
+++ b/dev-lang/php/php-5.0.5-r4.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.5-r4.ebuild,v 1.1 2005/11/04 12:45:21 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl3-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/5.0.5/php5.0.5-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/5.0.5/php5.0.5-curl_safemode.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/5.0.5/php5.0.5-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/5.0.5/php5.0.5-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/5.0.5/php5.0.5-globals_overwrite.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/5.0.5/php5.0.5-session_save_path-segf.patch"
+
+ # fix a object serialization bug, bug #105374
+ epatch "${FILESDIR}/5.0.5/php5.0.5-obj-serialize.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.5-r5.ebuild b/dev-lang/php/php-5.0.5-r5.ebuild
new file mode 100644
index 0000000..5dee098
--- /dev/null
+++ b/dev-lang/php/php-5.0.5-r5.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.5-r5.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.8-gentoo.patch.gz"
+LIB64_PATCH="${PV}/php${PV}-multilib-search-path.patch"
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl5-gentoo"|g' -i configure.in
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/${PV}/php${PV}-pspell-ext-segf.patch"
+
+ # patch fo fix safe_mode bypass in CURL extension, bug #111032
+ use curl && epatch "${FILESDIR}/${PV}/php${PV}-curl-open_basedir.patch"
+
+ # fix header injection in mbstring extension
+ use nls && epatch "${FILESDIR}/${PV}/php${PV}-mbstring-header_inj.patch"
+
+ # patch to fix safe_mode bypass in GD extension, bug #109669
+ if use gd || use gd-external ; then
+ epatch "${FILESDIR}/${PV}/php${PV}-gd-safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/${PV}/php${PV}-fopen_wrappers.patch"
+
+ # patch $GLOBALS overwrite vulnerability, bug #111011 and bug #111014
+ epatch "${FILESDIR}/${PV}/php${PV}-globals_overwrite.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/${PV}/php${PV}-apache2sapi.patch"
+
+ # patch to fix a GCC4 compile problem, bug #111261
+ epatch "${FILESDIR}/${PV}/php${PV}-tsrm-gcc4.patch"
+
+ # fix a object serialization bug, bug #105374
+ epatch "${FILESDIR}/${PV}/php${PV}-obj-serialize.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_0-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.5.ebuild b/dev-lang/php/php-5.0.5.ebuild
new file mode 100644
index 0000000..44c9c6b
--- /dev/null
+++ b/dev-lang/php/php-5.0.5.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.0.5.ebuild,v 1.1 2005/09/06 14:54:15 sebastian Exp $
+
+IUSE="${IUSE} cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+SLOT="5"
+PHPSAPI_ALLOWED="cli cgi apache apache2"
+MY_PHP_P="php-${PV}"
+PHP_S="${WORKDIR}/${MY_PHP_P}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Create the symlinks with eselect
+ if useq cli ; then
+ eselect php set php5
+ eselect php-devel set php5
+ fi
+
+ if useq cgi ; then
+ eselect php-cgi set php5
+ eselect php-devel set php5
+ fi
+
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5.conf"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5.conf"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.1.ebuild b/dev-lang/php/php-5.1.1.ebuild
new file mode 100644
index 0000000..bc20aef
--- /dev/null
+++ b/dev-lang/php/php-5.1.1.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.1.ebuild,v 1.1 2006/01/04 09:24:47 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_P="php-${PV}"
+PHP_PACKAGE=1
+
+# php patch settings
+HARDENEDPHP_PATCH="hardening-patch-${PV}-0.4.8-gentoo.patch.gz"
+LIB64_PATCH="${PV}/php${PV}-multilib-search-path.patch"
+
+inherit eutils php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php5_1-sapi_pkg_setup
+}
+
+src_unpack() {
+ # custom src_unpack, used only for PHP ebuilds that need additional patches
+ # normally the eclass src_unpack is used
+ if [ "${PHP_PACKAGE}" == 1 ] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # fix PHP branding
+ sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-gentoo"|g' -i configure.in
+
+ # fix ming error in configure
+ epatch "${FILESDIR}/${PV}/php${PV}-ming-config.patch"
+
+ # we call the eclass src_unpack, but don't want ${A} to be unpacked again
+ PHP_PACKAGE=0
+ php5_1-sapi_src_unpack
+ PHP_PACKAGE=1
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-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 build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_1-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_1-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1-any/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1-any/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.2-r1.ebuild b/dev-lang/php/php-5.1.2-r1.ebuild
new file mode 100644
index 0000000..958ec1e
--- /dev/null
+++ b/dev-lang/php/php-5.1.2-r1.ebuild
@@ -0,0 +1,286 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.2-r1.ebuild,v 1.1 2006/04/13 20:28:58 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+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
+PHP_PATCHSET_REV="2"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.8-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php5_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-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 build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_1-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ 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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_1-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
+ else
+ einfo "Installing Apache config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ fi
+ php5_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.2.ebuild b/dev-lang/php/php-5.1.2.ebuild
new file mode 100644
index 0000000..44f2bb2
--- /dev/null
+++ b/dev-lang/php/php-5.1.2.ebuild
@@ -0,0 +1,286 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.2.ebuild,v 1.1 2006/03/12 13:25:34 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+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
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.8-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php5_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-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 build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_1-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="--disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_1-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
+ else
+ einfo "Installing Apache config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ fi
+ php5_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.4-r1.ebuild b/dev-lang/php/php-5.1.4-r1.ebuild
new file mode 100644
index 0000000..9bb20e1
--- /dev/null
+++ b/dev-lang/php/php-5.1.4-r1.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.4-r1.ebuild,v 1.1 2006/05/29 22:07:20 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+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
+PHP_PATCHSET_REV="2"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.11-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-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 build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_1-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ 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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_1-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
+ else
+ einfo "Installing Apache config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ fi
+ php5_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.4-r3.ebuild b/dev-lang/php/php-5.1.4-r3.ebuild
new file mode 100644
index 0000000..69bcf38
--- /dev/null
+++ b/dev-lang/php/php-5.1.4-r3.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.4-r3.ebuild,v 1.1 2006/06/20 20:38:58 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+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
+PHP_PATCHSET_REV="4"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.11-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-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 build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_1-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ 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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_1-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
+ else
+ einfo "Installing Apache config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ fi
+ php5_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.4-r4.ebuild b/dev-lang/php/php-5.1.4-r4.ebuild
new file mode 100644
index 0000000..bbdb460
--- /dev/null
+++ b/dev-lang/php/php-5.1.4-r4.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.4-r4.ebuild,v 1.1 2006/07/14 16:04:37 chtekk 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="5"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.11-gentoo-r1.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache SAPIs."
+
+DEPEND="app-admin/php-toolkit"
+RDEPEND="${DEPEND}"
+
+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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.4-r6.ebuild b/dev-lang/php/php-5.1.4-r6.ebuild
new file mode 100644
index 0000000..b115536
--- /dev/null
+++ b/dev-lang/php/php-5.1.4-r6.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.4-r6.ebuild,v 1.1 2006/08/10 16:31:49 chtekk 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="6"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.13-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.4.ebuild b/dev-lang/php/php-5.1.4.ebuild
new file mode 100644
index 0000000..9280a61
--- /dev/null
+++ b/dev-lang/php/php-5.1.4.ebuild
@@ -0,0 +1,288 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.4.ebuild,v 1.1 2006/05/05 10:28:58 chtekk Exp $
+
+IUSE="cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+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
+PHP_PATCHSET_REV="1"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.9-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+
+inherit php5_1-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine."
+
+DEPEND="${DEPEND} app-admin/php-toolkit"
+RDEPEND="${RDEPEND} app-admin/php-toolkit"
+
+# PHP patchsets
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# Hardened-PHP patch
+[[ -n "${HARDENEDPHP_PATCH}" ]] && SRC_URI="${SRC_URI} hardenedphp? ( http://gentoo.longitekk.com/${HARDENEDPHP_PATCH} )"
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php5_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild && [[ -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_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ 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_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-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 build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_1-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ 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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="--disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_1-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if [[ -n "${USE_APACHE2}" ]] ; then
+ einfo "Installing Apache2 config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
+ else
+ einfo "Installing Apache config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ fi
+ php5_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+ php5_1-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.1.6-r1.ebuild b/dev-lang/php/php-5.1.6-r1.ebuild
new file mode 100644
index 0000000..045d8b9
--- /dev/null
+++ b/dev-lang/php/php-5.1.6-r1.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6-r1.ebuild,v 1.1 2006/08/29 23:05:20 chtekk 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"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.14-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.6-r11.ebuild b/dev-lang/php/php-5.1.6-r11.ebuild
new file mode 100644
index 0000000..afb1009
--- /dev/null
+++ b/dev-lang/php/php-5.1.6-r11.ebuild
@@ -0,0 +1,516 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6-r11.ebuild,v 1.1 2007/03/05 02:14:43 chtekk 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-${MY_PHP_PV}-0.9.6-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-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 useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.6-r2.ebuild b/dev-lang/php/php-5.1.6-r2.ebuild
new file mode 100644
index 0000000..06f7dd2
--- /dev/null
+++ b/dev-lang/php/php-5.1.6-r2.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6-r2.ebuild,v 1.1 2006/08/30 11:17:26 chtekk 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"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.14-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.6-r4.ebuild b/dev-lang/php/php-5.1.6-r4.ebuild
new file mode 100644
index 0000000..eb3184a
--- /dev/null
+++ b/dev-lang/php/php-5.1.6-r4.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6-r4.ebuild,v 1.1 2006/09/10 12:48:50 chtekk 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="2"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.15-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.6-r6.ebuild b/dev-lang/php/php-5.1.6-r6.ebuild
new file mode 100644
index 0000000..d5f6639
--- /dev/null
+++ b/dev-lang/php/php-5.1.6-r6.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6-r6.ebuild,v 1.1 2006/10/07 20:22:39 chtekk 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="3"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.15-gentoo-r1.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.6-r8.ebuild b/dev-lang/php/php-5.1.6-r8.ebuild
new file mode 100644
index 0000000..bc061bb
--- /dev/null
+++ b/dev-lang/php/php-5.1.6-r8.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6-r8.ebuild,v 1.1 2006/10/27 12:17:35 chtekk 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="4"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.15-gentoo-r1.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.1.6.ebuild b/dev-lang/php/php-5.1.6.ebuild
new file mode 100644
index 0000000..4964b62
--- /dev/null
+++ b/dev-lang/php/php-5.1.6.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.1.6.ebuild,v 1.1 2006/08/29 19:55:32 chtekk 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"
+HARDENEDPHP_PATCH="hardening-patch-${MY_PHP_PV}-0.4.14-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_1-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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_1-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_1-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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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_1-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_1-sapi_src_compile
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_1-sapi_src_compile
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_1-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_1-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_1-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_1-sapi_install_ini
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ php5_1-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if useq 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_1-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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_1-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.1-r3.ebuild b/dev-lang/php/php-5.2.1-r3.ebuild
new file mode 100644
index 0000000..38e2e75
--- /dev/null
+++ b/dev-lang/php/php-5.2.1-r3.ebuild
@@ -0,0 +1,516 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.1-r3.ebuild,v 1.1 2007/03/05 02:14:43 chtekk 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="4"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_2-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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 useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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 useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq 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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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 php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_2-sapi_src_compile
+ ;;
+ 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
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ 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 useq 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 useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.10-r1.ebuild b/dev-lang/php/php-5.2.10-r1.ebuild
new file mode 100644
index 0000000..7a04504
--- /dev/null
+++ b/dev-lang/php/php-5.2.10-r1.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.10-r1.ebuild,v 1.1 2009/07/05 23:26:08 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.10-r2.ebuild b/dev-lang/php/php-5.2.10-r2.ebuild
new file mode 100644
index 0000000..f9737e5
--- /dev/null
+++ b/dev-lang/php/php-5.2.10-r2.ebuild
@@ -0,0 +1,550 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.10-r2.ebuild,v 1.1 2009/09/24 23:36:54 cla 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="${PR/r/}"
+PHP_PATCHSET_REV="${PHP_PATCHSET_REV/2/1}"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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
+
+ # Quick fix for bug #279576
+ epatch "${FILESDIR}"/php-${PV}-pdo_dblib.patch
+
+ # 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.10.ebuild b/dev-lang/php/php-5.2.10.ebuild
new file mode 100644
index 0000000..9a544bb
--- /dev/null
+++ b/dev-lang/php/php-5.2.10.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.10.ebuild,v 1.1 2009/06/19 14:40:22 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-5.2.9-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.11-r1.ebuild b/dev-lang/php/php-5.2.11-r1.ebuild
new file mode 100644
index 0000000..50d6d78
--- /dev/null
+++ b/dev-lang/php/php-5.2.11-r1.ebuild
@@ -0,0 +1,551 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.11-r1.ebuild,v 1.1 2009/11/13 16:11:51 cla 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_URI="http://dev.gentoo.org/~cla/distfiles/php-patchset-${PVR}.tar.bz2"
+PHP_PATCHSET_REV="${PR/r/}"
+PHP_PATCHSET_REV="${PHP_PATCHSET_REV/2/1}"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )
+ suhosin? ( >=dev-php5/suhosin-0.9.29 )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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
+
+ # Security bug #292132
+ epatch "${WORKDIR}"/${MY_PHP_PV}/gd-maxcolors.patch
+
+ # 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.11.ebuild b/dev-lang/php/php-5.2.11.ebuild
new file mode 100644
index 0000000..e827ec4
--- /dev/null
+++ b/dev-lang/php/php-5.2.11.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.11.ebuild,v 1.1 2009/09/29 16:37:04 hoffie 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="${PR/r/}"
+PHP_PATCHSET_REV="${PHP_PATCHSET_REV/2/1}"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.12.ebuild b/dev-lang/php/php-5.2.12.ebuild
new file mode 100644
index 0000000..839b26a
--- /dev/null
+++ b/dev-lang/php/php-5.2.12.ebuild
@@ -0,0 +1,548 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.12.ebuild,v 1.1 2009/12/30 13:34:10 hoffie 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="${PR/r/}"
+PHP_PATCHSET_URI="http://dev.gentoo.org/~hoffie/distfiles/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+SUHOSIN_PATCH="suhosin-patch-5.2.11-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+RDEPEND="${DEPEND}"
+if [[ -n "${KOLAB_PATCH}" ]] ; then
+ IUSE="${IUSE} kolab"
+ DEPEND="${DEPEND}
+ kolab? ( >=net-libs/c-client-2004g-r1 )"
+fi
+
+PDEPEND="suhosin? ( >=dev-php5/suhosin-0.9.29 )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.13.ebuild b/dev-lang/php/php-5.2.13.ebuild
new file mode 100644
index 0000000..8a7d05c
--- /dev/null
+++ b/dev-lang/php/php-5.2.13.ebuild
@@ -0,0 +1,551 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.13.ebuild,v 1.1 2010/03/20 14:33:03 keytoaster 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="${PR/r/}"
+PHP_PATCHSET_URI="http://dev.gentoo.org/~keytoaster/distfiles/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+SUHOSIN_PATCH="suhosin-patch-5.2.13-0.9.7.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
+
+# Suhosin patch support
+[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? (
+http://download.suhosin.org/${SUHOSIN_PATCH} )"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs."
+
+DEPEND="app-admin/php-toolkit
+ imap? ( >=virtual/imap-c-client-2006k )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+RDEPEND="${DEPEND}"
+if [[ -n "${KOLAB_PATCH}" ]] ; then
+ IUSE="${IUSE} kolab"
+ DEPEND="${DEPEND}
+ kolab? ( >=net-libs/c-client-2004g-r1 )"
+fi
+
+PDEPEND="suhosin? ( >=dev-php5/suhosin-0.9.29 )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ fi
+
+ depend.apache_pkg_setup
+ 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}"
+
+ epatch "${FILESDIR}"/${PN}-5.2.12-libpng14.patch
+
+ # 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/iconv_stream_filter.phpt
+
+ # needs write access to /tmp and others
+ rm ext/session/tests/session_save_path_variation5.phpt
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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() {
+ echo ">>> 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
+}
diff --git a/dev-lang/php/php-5.2.14-r1.ebuild b/dev-lang/php/php-5.2.14-r1.ebuild
new file mode 100644
index 0000000..dab5333
--- /dev/null
+++ b/dev-lang/php/php-5.2.14-r1.ebuild
@@ -0,0 +1,313 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.14-r1.ebuild,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob
+interbase msql oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+PHP_PATCHSET=""
+SUHOSIN_VERSION="$PV-0.9.7"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}"
+PHP_PATCHSET_URI="
+ $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch"
+SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbase dbmaker debug doc empress
+ empress-bcs esoob exif fdftk frontbase +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mcve mhash msql mssql mysql mysqli ncurses nls oci8
+ oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm
+ readline recode reflection sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell spl sqlite ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
+
+DEPEND="app-admin/eselect-php
+ pcre? ( >=dev-libs/libpcre-7.9[unicode] )
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ fdftk? ( app-text/fdftk )
+ firebird? ( dev-db/firebird )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mhash? ( app-crypt/mhash )
+ mssql? ( dev-db/freetds[mssql] )
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ ncurses? ( sys-libs/ncurses )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )
+ mcve? ( dev-php${PHP_MV}/pecl-mcve )
+ yaz? ( dev-php${PHP_MV}/pecl-yaz )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+PHP_INI_FILE="php.ini"
+PHP_INI_UPSTREAM="php.ini-dist"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v521 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.2.14-r2.ebuild b/dev-lang/php/php-5.2.14-r2.ebuild
new file mode 100644
index 0000000..1ee1772
--- /dev/null
+++ b/dev-lang/php/php-5.2.14-r2.ebuild
@@ -0,0 +1,327 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.14-r2.ebuild,v 1.1 2010/10/31 19:01:55 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob
+interbase msql oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="$PV-0.9.7"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch"
+SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads force-cgi-redirect discard-path"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbase dbmaker debug doc empress
+ empress-bcs esoob exif fdftk frontbase +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mcve mhash msql mssql mysql mysqli ncurses nls oci8
+ oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm
+ readline recode reflection sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell spl sqlite ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
+
+DEPEND="app-admin/eselect-php
+ pcre? ( >=dev-libs/libpcre-7.9[unicode] )
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ fdftk? ( app-text/fdftk )
+ firebird? ( dev-db/firebird )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mhash? ( app-crypt/mhash )
+ mssql? ( dev-db/freetds[mssql] )
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ ncurses? ( sys-libs/ncurses )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )
+ mcve? ( dev-php${PHP_MV}/pecl-mcve )
+ yaz? ( dev-php${PHP_MV}/pecl-yaz )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# Allow users to install production version if they want to
+# PHP 5.2 has other filenames for prod and dev versions
+
+case "${PHP_INI_VERSION}" in
+ production)
+ PHP_INI_UPSTREAM="php.ini-recommended"
+ ;;
+ development)
+ PHP_INI_UPSTREAM="php.ini-dist"
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ PHP_INI_UPSTREAM="php.ini-dist"
+ ;;
+esac
+
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v521 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.2.14.ebuild b/dev-lang/php/php-5.2.14.ebuild
new file mode 100644
index 0000000..6f5fdad
--- /dev/null
+++ b/dev-lang/php/php-5.2.14.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.14.ebuild,v 1.1 2010/08/02 16:56:41 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob
+interbase msql oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+PHP_PATCHSET=""
+SUHOSIN_VERSION="$PV-0.9.7"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~alpha ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}"
+PHP_PATCHSET_URI="
+ $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch"
+SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ concurrentmodphp threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbase dbmaker debug doc empress
+ empress-bcs esoob exif fdftk frontbase +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mcve msql mssql mysql mysqli ncurses nls oci8
+ oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm
+ readline recode reflection sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell spl sqlite ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
+
+DEPEND="app-admin/php-toolkit
+ pcre? ( >=dev-libs/libpcre-7.9[unicode] )
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ fdftk? ( app-text/fdftk )
+ firebird? ( dev-db/firebird )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mhash? ( app-crypt/mhash )
+ mssql? ( dev-db/freetds[mssql] )
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ ncurses? ( sys-libs/ncurses )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )
+ mcve? ( dev-php${PHP_MV}/pecl-mcve )
+ yaz? ( dev-php${PHP_MV}/pecl-yaz )"
+
+# 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"
+
+SLOT="${PHP_MV}"
+S="${WORKDIR}/${PHP_P}"
+
+PHP_INI_FILE="php.ini"
+PHP_INI_UPSTREAM="php.ini-dist"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v1
+
+src_prepare() { eblit-run src_prepare v1 ; }
+src_configure() { eblit-run src_configure v52 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v1 ; }
+src_test() { eblit-run src_test v1 ; }
+
+eblit-pkg pkg_postinst v1
diff --git a/dev-lang/php/php-5.2.16-r1.ebuild b/dev-lang/php/php-5.2.16-r1.ebuild
new file mode 100644
index 0000000..bc55cf1
--- /dev/null
+++ b/dev-lang/php/php-5.2.16-r1.ebuild
@@ -0,0 +1,341 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.16-r1.ebuild,v 1.1 2011/01/05 11:23:16 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob
+interbase msql oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+#SUHOSIN_VERSION="$PV-0.9.7"
+SUHOSIN_VERSION=""
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch"
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads force-cgi-redirect discard-path"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbase dbmaker debug doc empress
+ empress-bcs esoob exif fdftk frontbase +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mcve mhash msql mssql mysql mysqli ncurses nls oci8
+ oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm
+ readline recode reflection sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell spl sqlite ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND=">=app-admin/eselect-php-0.6.2
+ pcre? ( >=dev-libs/libpcre-7.9[unicode] )
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ fdftk? ( app-text/fdftk )
+ firebird? ( dev-db/firebird )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mhash? ( app-crypt/mhash )
+ mssql? ( dev-db/freetds[mssql] )
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ ncurses? ( sys-libs/ncurses )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? ( $php[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )
+ mcve? ( dev-php${PHP_MV}/pecl-mcve )
+ yaz? ( dev-php${PHP_MV}/pecl-yaz )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# Allow users to install production version if they want to
+# PHP 5.2 has other filenames for prod and dev versions
+
+case "${PHP_INI_VERSION}" in
+ production)
+ PHP_INI_UPSTREAM="php.ini-recommended"
+ ;;
+ development)
+ PHP_INI_UPSTREAM="php.ini-dist"
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ PHP_INI_UPSTREAM="php.ini-dist"
+ ;;
+esac
+
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v521 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.2.16.ebuild b/dev-lang/php/php-5.2.16.ebuild
new file mode 100644
index 0000000..aa465f4
--- /dev/null
+++ b/dev-lang/php/php-5.2.16.ebuild
@@ -0,0 +1,341 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.16.ebuild,v 1.1 2010/12/19 14:24:49 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob
+interbase msql oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+#SUHOSIN_VERSION="$PV-0.9.7"
+SUHOSIN_VERSION=""
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch"
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads force-cgi-redirect discard-path"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbase dbmaker debug doc empress
+ empress-bcs esoob exif fdftk frontbase +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mcve mhash msql mssql mysql mysqli ncurses nls oci8
+ oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm
+ readline recode reflection sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell spl sqlite ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="app-admin/eselect-php
+ pcre? ( >=dev-libs/libpcre-7.9[unicode] )
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ fdftk? ( app-text/fdftk )
+ firebird? ( dev-db/firebird )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mhash? ( app-crypt/mhash )
+ mssql? ( dev-db/freetds[mssql] )
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ ncurses? ( sys-libs/ncurses )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? ( $php[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )
+ mcve? ( dev-php${PHP_MV}/pecl-mcve )
+ yaz? ( dev-php${PHP_MV}/pecl-yaz )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# Allow users to install production version if they want to
+# PHP 5.2 has other filenames for prod and dev versions
+
+case "${PHP_INI_VERSION}" in
+ production)
+ PHP_INI_UPSTREAM="php.ini-recommended"
+ ;;
+ development)
+ PHP_INI_UPSTREAM="php.ini-dist"
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ PHP_INI_UPSTREAM="php.ini-dist"
+ ;;
+esac
+
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v521 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.2.17.ebuild b/dev-lang/php/php-5.2.17.ebuild
index 81ac6bd..77d5796 100644
--- a/dev-lang/php/php-5.2.17.ebuild
+++ b/dev-lang/php/php-5.2.17.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.17.ebuild,v 1.18 2012/01/21 09:49:56 olemarkus dead $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.17.ebuild,v 1.1 2011/01/06 23:35:43 mabi Exp $
EAPI=2
@@ -13,7 +13,7 @@ inherit eutils autotools flag-o-matic versionator depend.apache apache-module db
SUHOSIN_VERSION="5.2.16-0.9.7"
EXPECTED_TEST_FAILURES=""
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc64 ~x86"
function php_get_uri ()
{
@@ -91,12 +91,12 @@ IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
empress-bcs esoob exif fdftk frontbase +filter firebird
flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit
- mhash msql mssql mysql mysqli ncurses nls oci8
+ mcve mhash msql mssql mysql mysqli ncurses nls oci8
oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm
readline recode reflection sapdb +session sharedext sharedmem
+simplexml snmp soap sockets solid spell spl sqlite ssl suhosin
sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
- xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+ xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib"
# Enable suhosin if available
[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
@@ -110,7 +110,7 @@ DEPEND=">=app-admin/eselect-php-0.6.2
bzip2? ( app-arch/bzip2 )
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
cjk? ( !gd? ( !gd-external? (
- virtual/jpeg
+ >=media-libs/jpeg-6b
media-libs/libpng
sys-libs/zlib
) ) )
@@ -122,18 +122,18 @@ DEPEND=">=app-admin/eselect-php-0.6.2
empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
esoob? ( >=dev-db/unixODBC-1.8.13 )
exif? ( !gd? ( !gd-external? (
- virtual/jpeg
+ >=media-libs/jpeg-6b
media-libs/libpng
sys-libs/zlib
) ) )
fdftk? ( app-text/fdftk )
firebird? ( dev-db/firebird )
- gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
gd-external? ( media-libs/gd )
gdbm? ( >=sys-libs/gdbm-1.8.0 )
gmp? ( >=dev-libs/gmp-4.1.2 )
iconv? ( virtual/libiconv )
- imap? ( virtual/imap-c-client[ssl=] )
+ imap? ( virtual/imap-c-client )
iodbc? ( dev-db/libiodbc )
kerberos? ( virtual/krb5 )
kolab? ( >=net-libs/c-client-2004g-r1 )
@@ -167,7 +167,7 @@ DEPEND=">=app-admin/eselect-php-0.6.2
=media-libs/freetype-2*
>=media-libs/t1lib-5.0.0
!gd? ( !gd-external? (
- virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
)
wddx? ( >=dev-libs/libxml2-2.6.8 )
xml? ( >=dev-libs/libxml2-2.6.8 )
@@ -176,7 +176,7 @@ DEPEND=">=app-admin/eselect-php-0.6.2
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
xpm? (
x11-libs/libXpm
- virtual/jpeg
+ >=media-libs/jpeg-6b
media-libs/libpng sys-libs/zlib
)
xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
@@ -228,7 +228,7 @@ RDEPEND="${DEPEND}
json? ( !dev-php${PHP_MV}/pecl-json )
zip? ( !dev-php${PHP_MV}/pecl-zip )"
-[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? ( $php[unicode] )"
+[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? ( $php[unicode] )"
DEPEND="${DEPEND}
sys-devel/flex
@@ -236,7 +236,17 @@ DEPEND="${DEPEND}
>=sys-devel/libtool-1.5.18"
# They are in PDEPEND because we need PHP installed first!
-PDEPEND="doc? ( app-doc/php-docs )"
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )
+ mcve? ( dev-php${PHP_MV}/pecl-mcve )
+ yaz? ( dev-php${PHP_MV}/pecl-yaz )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
SLOT="$(get_version_component_range 1-2)"
S="${WORKDIR}/${PHP_P}"
@@ -306,7 +316,7 @@ eblit-run-maybe() {
# Usage: <function> [version]
# Runs a function defined in an eblit
eblit-run() {
- eblit-include --skip common "v2"
+ eblit-include --skip common "${*:2}"
eblit-include "$@"
eblit-run-maybe eblit-$1-pre
eblit-${PN}-$1
@@ -328,62 +338,4 @@ src_configure() { eblit-run src_configure v521 ; }
src_compile() { eblit-run src_compile v1 ; }
src_install() { eblit-run src_install v2 ; }
src_test() { eblit-run src_test v1 ; }
-
-#Do not use eblit for this because it will not get sourced when installing from
-#binary package (bug #380845)
-pkg_postinst() {
- # Output some general info to the user
- if use apache2 ; then
- APACHE2_MOD_DEFINE="PHP5"
- APACHE2_MOD_CONF="70_mod_php5"
- apache-module_pkg_postinst
- fi
-
- # Create the symlinks for php
- for m in ${SAPIS}; do
- [[ ${m} == 'embed' ]] && continue;
- if use $m ; then
- local ci=$(eselect php show $m)
- if [[ -z $ci ]]; then
- eselect php set $m php${SLOT}
- einfo "Switched ${m} to use php:${SLOT}"
- einfo
- elif [[ $ci != "php${SLOT}" ]] ; then
- elog "To switch $m to use php:${SLOT}, run"
- elog " eselect php set $m php${SLOT}"
- elog
- fi
- fi
- done
-
- elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
- elog "to compile extensions for the ${SLOT} ABI"
- elog
- if ! use readline && use cli ; then
- ewarn "Note that in order to use php interactivly, you need to enable"
- ewarn "the readline USE flag or php -a will hang"
- fi
- elog
- elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
- elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
- elog "'production' or 'development' in /etc/make.conf"
- ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
-
- # check for not yet migrated old style config dirs
- ls "${ROOT}"/etc/php/*-php5 &>/dev/null
- if [[ $? -eq 0 ]]; then
- ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
- ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
- fi
- elog
- elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
- elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
- elog
-
- if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
- ewarn "The suhosin USE flag now only installs the suhosin patch!"
- ewarn "If you want the suhosin extension, make sure you install"
- ewarn " dev-php/suhosin"
- ewarn
- fi
-}
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.2.2-r1.ebuild b/dev-lang/php/php-5.2.2-r1.ebuild
new file mode 100644
index 0000000..d61bcd1
--- /dev/null
+++ b/dev-lang/php/php-5.2.2-r1.ebuild
@@ -0,0 +1,516 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.2-r1.ebuild,v 1.1 2007/05/07 21:56:24 chtekk 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="2"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_2-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache 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 apache apache2
+
+ # Threaded Apache2 support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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 useq cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if useq apache || useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if useq 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
+ fi
+
+ # fastbuild support
+ if useq 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 useq 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
+}
+
+src_compile() {
+ if useq 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_apache1=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache1)
+ build_apache1=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_apache1} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs=/usr/sbin/apxs"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if useq 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 || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache1} = 1 ]] || [[ ${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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if useq concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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 useq apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if useq threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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 php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache1)
+ my_conf="${my_conf} --disable-cli --with-apxs=/usr/sbin/apxs"
+ php5_2-sapi_src_compile
+ ;;
+ 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
+ ;;
+ apache1)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache1" "70_mod_php5.conf"
+ 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 useq 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 useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5"
+ APACHE2_MOD_DEFINE="PHP5"
+ if useq concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache1 to use mod_php
+ if useq apache ; then
+ "${ROOT}/usr/sbin/php-select" -t apache1 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache1 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache1 is configured to load a different version of PHP."
+ ewarn "To make Apache1 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache1 php5"
+ ewarn
+ fi
+ fi
+
+ # Update Apache2 to use mod_php
+ if useq 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 useq 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 useq 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() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.3-r3.ebuild b/dev-lang/php/php-5.2.3-r3.ebuild
new file mode 100644
index 0000000..f5dda2e
--- /dev/null
+++ b/dev-lang/php/php-5.2.3-r3.ebuild
@@ -0,0 +1,483 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.3-r3.ebuild,v 1.1 2007/07/22 21:16:52 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="4"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+}
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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
+
+ if use session; then
+ elog "When using open_basedir in conjunction with the session extension"
+ elog "make sure you add the value of session.save_path to open_basedir as"
+ elog "well, e.g.: with session.save_path=/tmp (default) you should have"
+ elog "open_basedir=/your/usual/webdir/:/tmp/"
+ fi
+ php5_2-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.4.ebuild b/dev-lang/php/php-5.2.4.ebuild
new file mode 100644
index 0000000..cb980a0
--- /dev/null
+++ b/dev-lang/php/php-5.2.4.ebuild
@@ -0,0 +1,477 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.4.ebuild,v 1.1 2007/09/08 18:26:36 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.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 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+}
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.4_p20070914-r2.ebuild b/dev-lang/php/php-5.2.4_p20070914-r2.ebuild
new file mode 100644
index 0000000..797a7a4
--- /dev/null
+++ b/dev-lang/php/php-5.2.4_p20070914-r2.ebuild
@@ -0,0 +1,494 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.4_p20070914-r2.ebuild,v 1.1 2007/09/19 20:06:05 hoffie 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="2"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo-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"
+
+inherit versionator php5_2-sapi apache-module
+
+# eclass doesn't know about our snapshot tarball so we have to set SRC_URI
+# ourselves
+SRC_URI="http://gentoo.longitekk.com/${P}.tar.bz2 http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+[[ -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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ local release_version="$(get_version_component_range 3)"
+ sed -re "s|^PHP_RELEASE_VERSION=.*|PHP_RELEASE_VERSION=${release_version}|g" -i "${S}/configure.in" \
+ || die "Unable to change PHP release version to ${release_version}"
+ PHP_EXTRA_BRANDING="_p${MY_PHP_PV#*_p}"
+
+ # 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
+ 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
+}
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.4_p20070914.ebuild b/dev-lang/php/php-5.2.4_p20070914.ebuild
new file mode 100644
index 0000000..88a30e7
--- /dev/null
+++ b/dev-lang/php/php-5.2.4_p20070914.ebuild
@@ -0,0 +1,494 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.4_p20070914.ebuild,v 1.1 2007/09/14 15:33:29 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.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
+
+# eclass doesn't know about our snapshot tarball so we have to set SRC_URI
+# ourselves
+SRC_URI="http://gentoo.longitekk.com/${P}.tar.bz2 http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+[[ -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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ local release_version="$(get_version_component_range 3)"
+ sed -re "s|^PHP_RELEASE_VERSION=.*|PHP_RELEASE_VERSION=${release_version}|g" -i "${S}/configure.in" \
+ || die "Unable to change PHP release version to ${release_version}"
+ PHP_EXTRA_BRANDING="_p${MY_PHP_PV#*_p}"
+
+ # 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
+ 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
+}
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.4_pre200708051230-r2.ebuild b/dev-lang/php/php-5.2.4_pre200708051230-r2.ebuild
new file mode 100644
index 0000000..44717a0
--- /dev/null
+++ b/dev-lang/php/php-5.2.4_pre200708051230-r2.ebuild
@@ -0,0 +1,493 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.4_pre200708051230-r2.ebuild,v 1.1 2007/08/09 20:01:48 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="2"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch"
+
+inherit php5_2-sapi apache-module
+
+MY_PHP_SNAP_P="${MY_PHP_P//php-/php}"
+MY_PHP_SNAP_P="${MY_PHP_SNAP_P//.?_pre/-}"
+MY_PHP_SNAP_VER="${MY_PHP_SNAP_P/php?.?-/}"
+
+SRC_URI="http://gentoo.longitekk.com/php-5.2.4_pre${MY_PHP_SNAP_VER}.tar.bz2
+http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# 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"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PHP_SNAP_P}"
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ # usually the eclass handles this, but it fails for snapshots
+ sed -e "s|^PHP_EXTRA_VERSION=\".*\"|PHP_EXTRA_VERSION=\"_pre${MY_PHP_SNAP_VER}-pl${PHP_PATCHSET_REV}-gentoo\"|g" -i configure.in || die "Unable to change PHP branding to -pl${PHP_PATCHSET_REV}-gentoo"
+
+ # 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
+}
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-lang/php/php-5.2.5-r1.ebuild b/dev-lang/php/php-5.2.5-r1.ebuild
new file mode 100644
index 0000000..55abcc6
--- /dev/null
+++ b/dev-lang/php/php-5.2.5-r1.ebuild
@@ -0,0 +1,495 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.5-r1.ebuild,v 1.1 2007/12/08 23:23:38 hoffie 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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
+}
diff --git a/dev-lang/php/php-5.2.5.ebuild b/dev-lang/php/php-5.2.5.ebuild
new file mode 100644
index 0000000..3866984
--- /dev/null
+++ b/dev-lang/php/php-5.2.5.ebuild
@@ -0,0 +1,496 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.5.ebuild,v 1.1 2007/11/09 22:44:30 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-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"
+
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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
+}
diff --git a/dev-lang/php/php-5.2.5_p20080206-r2.ebuild b/dev-lang/php/php-5.2.5_p20080206-r2.ebuild
new file mode 100644
index 0000000..3c31a37
--- /dev/null
+++ b/dev-lang/php/php-5.2.5_p20080206-r2.ebuild
@@ -0,0 +1,509 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.5_p20080206-r2.ebuild,v 1.1 2008/02/12 16:46:19 hoffie 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="2"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.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
+
+SRC_URI="http://gentoo.longitekk.com/${P}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# 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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ sed -re 's:^(PHP_RELEASE_VERSION=).*$:\15:g' -i configure.in
+ PHP_EXTRA_BRANDING="-p${PV/*_p/}"
+
+ # 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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}"/sapi/cli/php -n "${S}"/run-tests.php -n
+
+ if [[ $? != 0 ]] ; then
+ eerror "Not all tests were successful!"
+ fi
+}
diff --git a/dev-lang/php/php-5.2.5_p20080206-r3.ebuild b/dev-lang/php/php-5.2.5_p20080206-r3.ebuild
new file mode 100644
index 0000000..31dab0a
--- /dev/null
+++ b/dev-lang/php/php-5.2.5_p20080206-r3.ebuild
@@ -0,0 +1,509 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.5_p20080206-r3.ebuild,v 1.1 2008/02/12 21:58:56 hoffie 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="3"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.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
+
+SRC_URI="http://gentoo.longitekk.com/${P}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# 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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ sed -re 's:^(PHP_RELEASE_VERSION=).*$:\15:g' -i configure.in
+ PHP_EXTRA_BRANDING="-p${PV/*_p/}"
+
+ # 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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}"/sapi/cli/php -n "${S}"/run-tests.php -n
+
+ if [[ $? != 0 ]] ; then
+ eerror "Not all tests were successful!"
+ fi
+}
diff --git a/dev-lang/php/php-5.2.5_p20080206.ebuild b/dev-lang/php/php-5.2.5_p20080206.ebuild
new file mode 100644
index 0000000..65530f3
--- /dev/null
+++ b/dev-lang/php/php-5.2.5_p20080206.ebuild
@@ -0,0 +1,504 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.5_p20080206.ebuild,v 1.1 2008/02/06 15:15:54 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.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
+
+SRC_URI="http://gentoo.longitekk.com/${P}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+
+# 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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ sed -re 's:^(PHP_RELEASE_VERSION=).*$:\15:g' -i configure.in
+ PHP_EXTRA_BRANDING="-p${PV/*_p/}"
+
+ # 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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
+}
diff --git a/dev-lang/php/php-5.2.6-r1.ebuild b/dev-lang/php/php-5.2.6-r1.ebuild
new file mode 100644
index 0000000..9150864
--- /dev/null
+++ b/dev-lang/php/php-5.2.6-r1.ebuild
@@ -0,0 +1,504 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6-r1.ebuild,v 1.1 2008/05/05 21:01:17 hoffie 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-5.2.6-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"
+# 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
+
+# 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"
+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
+
+ # 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
+
+ # Workaround for autoconf-2.62 behaviour change, bug 217392
+ sed -re 's:(#ifdef HAVE_CONFIG_H.*):#define _GNU_SOURCE\n\1:' -i ext/posix/posix.c
+
+ # 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() {
+ 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
+}
diff --git a/dev-lang/php/php-5.2.6-r2.ebuild b/dev-lang/php/php-5.2.6-r2.ebuild
new file mode 100644
index 0000000..8a73ea6
--- /dev/null
+++ b/dev-lang/php/php-5.2.6-r2.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6-r2.ebuild,v 1.1 2008/07/03 09:52:58 hoffie 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="2"
+SUHOSIN_PATCH="suhosin-patch-5.2.6-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"
+# 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
+
+# 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"
+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
+
+ # Workaround for autoconf-2.62 behaviour change, bug 217392
+ sed -re 's:(#ifdef HAVE_CONFIG_H.*):#define _GNU_SOURCE\n\1:' -i ext/posix/posix.c
+
+ # 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() {
+ 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
+}
diff --git a/dev-lang/php/php-5.2.6-r5.ebuild b/dev-lang/php/php-5.2.6-r5.ebuild
new file mode 100644
index 0000000..5644a00
--- /dev/null
+++ b/dev-lang/php/php-5.2.6-r5.ebuild
@@ -0,0 +1,511 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6-r5.ebuild,v 1.1 2008/07/17 13:54:24 hoffie 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="4"
+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? ( >=net-libs/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
+
+ # Workaround for autoconf-2.62 behaviour change, bug 217392
+ sed -re 's:(#ifdef HAVE_CONFIG_H.*):#define _GNU_SOURCE\n\1:' -i ext/posix/posix.c
+
+ # 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() {
+ 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
+}
diff --git a/dev-lang/php/php-5.2.6-r6.ebuild b/dev-lang/php/php-5.2.6-r6.ebuild
new file mode 100644
index 0000000..23845dc
--- /dev/null
+++ b/dev-lang/php/php-5.2.6-r6.ebuild
@@ -0,0 +1,511 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6-r6.ebuild,v 1.1 2008/08/07 10:25:21 hoffie 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="6"
+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
+}
diff --git a/dev-lang/php/php-5.2.6-r7.ebuild b/dev-lang/php/php-5.2.6-r7.ebuild
new file mode 100644
index 0000000..456df43
--- /dev/null
+++ b/dev-lang/php/php-5.2.6-r7.ebuild
@@ -0,0 +1,511 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6-r7.ebuild,v 1.1 2008/09/06 20:48:36 hoffie 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
+}
diff --git a/dev-lang/php/php-5.2.6.ebuild b/dev-lang/php/php-5.2.6.ebuild
new file mode 100644
index 0000000..416341a
--- /dev/null
+++ b/dev-lang/php/php-5.2.6.ebuild
@@ -0,0 +1,505 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6.ebuild,v 1.1 2008/05/01 14:58:11 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-5.2.5_p20080206-0.9.6.2-gentoo.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
+
+# 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"
+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
+
+ # 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
+
+ # Workaround for autoconf-2.62 behaviour change, bug 217392
+ sed -re 's:(#ifdef HAVE_CONFIG_H.*):#define _GNU_SOURCE\n\1:' -i ext/posix/posix.c
+
+ # 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 only fail because of one "sub-test" which might be
+ # Gentoo-specific (sandbox? it's about path normalization, ../ -> ..)
+ sed -e 's:File(\.\./):File(..):g' -i \
+ ext/standard/tests/file/open_basedir*{.inc,.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 [[ ! -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
+}
diff --git a/dev-lang/php/php-5.2.6_rc1-r1.ebuild b/dev-lang/php/php-5.2.6_rc1-r1.ebuild
new file mode 100644
index 0000000..289ac2f
--- /dev/null
+++ b/dev-lang/php/php-5.2.6_rc1-r1.ebuild
@@ -0,0 +1,508 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6_rc1-r1.ebuild,v 1.1 2008/03/05 19:11:13 hoffie 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-5.2.5_p20080206-0.9.6.2-gentoo.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
+
+SRC_URI="http://downloads.php.net/ilia/${MY_PHP_P/_rc/RC}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+S="${WORKDIR}/${MY_PHP_P/_rc/RC}"
+
+# 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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ PHP_EXTRA_BRANDING="RC${PV#*_rc}"
+ # 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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
+}
diff --git a/dev-lang/php/php-5.2.6_rc1.ebuild b/dev-lang/php/php-5.2.6_rc1.ebuild
new file mode 100644
index 0000000..e33edc5
--- /dev/null
+++ b/dev-lang/php/php-5.2.6_rc1.ebuild
@@ -0,0 +1,508 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6_rc1.ebuild,v 1.1 2008/03/03 12:14:56 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-5.2.5_p20080206-0.9.6.2-gentoo.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
+
+SRC_URI="http://downloads.php.net/ilia/${MY_PHP_P/_rc/RC}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+S="${WORKDIR}/${MY_PHP_P/_rc/RC}"
+
+# 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"
+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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; 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
+ 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
+
+ PHP_EXTRA_BRANDING="RC${PV#*_rc}"
+ # 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ 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
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ 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
+}
diff --git a/dev-lang/php/php-5.2.6_rc3-r1.ebuild b/dev-lang/php/php-5.2.6_rc3-r1.ebuild
new file mode 100644
index 0000000..9f14b50
--- /dev/null
+++ b/dev-lang/php/php-5.2.6_rc3-r1.ebuild
@@ -0,0 +1,481 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6_rc3-r1.ebuild,v 1.1 2008/03/30 14:15:55 hoffie 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-5.2.5_p20080206-0.9.6.2-gentoo.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
+
+SRC_URI="http://downloads.php.net/ilia/${MY_PHP_P/_rc/RC}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+S="${WORKDIR}/${MY_PHP_P/_rc/RC}"
+
+# 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"
+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
+
+ PHP_EXTRA_BRANDING="RC${PV#*_rc}"
+ # 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 [[ ! -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
+}
diff --git a/dev-lang/php/php-5.2.6_rc3.ebuild b/dev-lang/php/php-5.2.6_rc3.ebuild
new file mode 100644
index 0000000..23bbeb1
--- /dev/null
+++ b/dev-lang/php/php-5.2.6_rc3.ebuild
@@ -0,0 +1,481 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6_rc3.ebuild,v 1.1 2008/03/28 23:09:10 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-5.2.5_p20080206-0.9.6.2-gentoo.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
+
+SRC_URI="http://downloads.php.net/ilia/${MY_PHP_P/_rc/RC}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+S="${WORKDIR}/${MY_PHP_P/_rc/RC}"
+
+# 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"
+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
+
+ PHP_EXTRA_BRANDING="RC${PV#*_rc}"
+ # 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 [[ ! -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
+}
diff --git a/dev-lang/php/php-5.2.6_rc4.ebuild b/dev-lang/php/php-5.2.6_rc4.ebuild
new file mode 100644
index 0000000..c5be5c3
--- /dev/null
+++ b/dev-lang/php/php-5.2.6_rc4.ebuild
@@ -0,0 +1,481 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.6_rc4.ebuild,v 1.1 2008/04/05 22:47:01 hoffie 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="0"
+SUHOSIN_PATCH="suhosin-patch-5.2.5_p20080206-0.9.6.2-gentoo.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
+
+SRC_URI="http://downloads.php.net/ilia/${MY_PHP_P/_rc/RC}.tar.bz2
+ http://gentoo.longitekk.com/php-patchset-${PV}-r${PHP_PATCHSET_REV}.tar.bz2"
+S="${WORKDIR}/${MY_PHP_P/_rc/RC}"
+
+# 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"
+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
+
+ PHP_EXTRA_BRANDING="RC${PV#*_rc}"
+ # 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 [[ ! -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
+}
diff --git a/dev-lang/php/php-5.2.8-r1.ebuild b/dev-lang/php/php-5.2.8-r1.ebuild
new file mode 100644
index 0000000..02b32eb
--- /dev/null
+++ b/dev-lang/php/php-5.2.8-r1.ebuild
@@ -0,0 +1,549 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.8-r1.ebuild,v 1.1 2008/12/18 23:23:32 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-5.2.7-0.9.6.3.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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )"
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/pcre with USE=unicode"
+ 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
+
+ # bug 217392 (autconf-2.62 behavior changes)
+ sed s:_GNU_SOURCE:__GLIBC__: -i ext/posix/posix.c
+
+ # 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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
+}
diff --git a/dev-lang/php/php-5.2.8-r2.ebuild b/dev-lang/php/php-5.2.8-r2.ebuild
new file mode 100644
index 0000000..ab19e42
--- /dev/null
+++ b/dev-lang/php/php-5.2.8-r2.ebuild
@@ -0,0 +1,546 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.8-r2.ebuild,v 1.1 2009/01/11 21:16:32 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-5.2.8-0.9.6.3.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.8.ebuild b/dev-lang/php/php-5.2.8.ebuild
new file mode 100644
index 0000000..b30f449
--- /dev/null
+++ b/dev-lang/php/php-5.2.8.ebuild
@@ -0,0 +1,544 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.8.ebuild,v 1.1 2008/12/08 23:30:02 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-5.2.7-0.9.6.3.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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )"
+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
+
+ # bug 217392 (autconf-2.62 behavior changes)
+ sed s:_GNU_SOURCE:__GLIBC__: -i ext/posix/posix.c
+
+ # 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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
+}
diff --git a/dev-lang/php/php-5.2.9-r1.ebuild b/dev-lang/php/php-5.2.9-r1.ebuild
new file mode 100644
index 0000000..02db67e
--- /dev/null
+++ b/dev-lang/php/php-5.2.9-r1.ebuild
@@ -0,0 +1,546 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.9-r1.ebuild,v 1.1 2009/04/10 10:25:55 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-${PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.9-r2.ebuild b/dev-lang/php/php-5.2.9-r2.ebuild
new file mode 100644
index 0000000..6c5eb87
--- /dev/null
+++ b/dev-lang/php/php-5.2.9-r2.ebuild
@@ -0,0 +1,546 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.9-r2.ebuild,v 1.1 2009/04/16 18:28:43 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-${PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.2.9.ebuild b/dev-lang/php/php-5.2.9.ebuild
new file mode 100644
index 0000000..294978a
--- /dev/null
+++ b/dev-lang/php/php-5.2.9.ebuild
@@ -0,0 +1,546 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.9.ebuild,v 1.1 2009/04/10 10:25:55 hoffie 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="${PR/r/}"
+SUHOSIN_PATCH="suhosin-patch-${PV}-0.9.7.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
+
+# 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 )
+ pcre? ( >=dev-libs/libpcre-7.8 )
+ xml? ( >=dev-libs/libxml2-2.7.2-r2 )
+ xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
+
+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
+
+ if use pcre ; then
+ built_with_use dev-libs/libpcre unicode || \
+ die "Please rebuild dev-libs/libpcre with USE=unicode"
+ 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
+
+ # new tests since 5.2.7 which have never been working for me
+ rm ext/spl/tests/arrayObject___construct_basic4.phpt \
+ ext/spl/tests/arrayObject___construct_basic5.phpt \
+ ext/spl/tests/arrayObject_exchangeArray_basic3.phpt \
+ ext/spl/tests/arrayObject_setFlags_basic1.phpt \
+ tests/lang/bug45392.phpt
+
+ # those might as well be related to suhosin
+ rm ext/session/tests/session_decode_variation3.phpt \
+ ext/session/tests/session_encode_variation8.phpt
+
+ # missing skipif
+ use reflection || \
+ rm ext/standard/tests/directory/DirectoryClass_basic_001.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
+ rm ext/standard/tests/file/rename_variation13.phpt
+
+ # test passes, but run-tests.php claims failure
+ rm ext/standard/tests/file/tempnam_variation4.phpt
+
+ # these tests behave differently with suhosin enabled, adapting them...
+ use suhosin && sed -e 's:File(\.\./):File(..):g' -i \
+ tests/security/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
+
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ 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
+ if use pcre || phpconfutils_usecheck pcre ; then
+ myconf="${my_conf} --with-pcre-dir=/usr"
+ phpconfutils_extension_with "pcre-regex" "pcre" 0 "/usr"
+ fi
+
+ # 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-r1" "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-r1" "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
+}
diff --git a/dev-lang/php/php-5.3.10-r1.ebuild b/dev-lang/php/php-5.3.10-r1.ebuild
new file mode 100644
index 0000000..27d1f94
--- /dev/null
+++ b/dev-lang/php/php-5.3.10-r1.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.10-r1.ebuild,v 1.1 2012/02/06 13:41:27 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="1"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.10-r2.ebuild b/dev-lang/php/php-5.3.10-r2.ebuild
new file mode 100644
index 0000000..595f362
--- /dev/null
+++ b/dev-lang/php/php-5.3.10-r2.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.10-r2.ebuild,v 1.1 2012/02/06 21:24:03 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.10.ebuild b/dev-lang/php/php-5.3.10.ebuild
new file mode 100644
index 0000000..80c8c36
--- /dev/null
+++ b/dev-lang/php/php-5.3.10.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.10.ebuild,v 1.1 2012/02/02 22:29:16 mabi Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10-gentoo"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.11.ebuild b/dev-lang/php/php-5.3.11.ebuild
new file mode 100644
index 0000000..d13b7e1
--- /dev/null
+++ b/dev-lang/php/php-5.3.11.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.11.ebuild,v 1.1 2012/04/26 10:22:22 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+RESTRICT="mirror"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10-gentoo"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.11_rc2.ebuild b/dev-lang/php/php-5.3.11_rc2.ebuild
new file mode 100644
index 0000000..835632a
--- /dev/null
+++ b/dev-lang/php/php-5.3.11_rc2.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.11_rc2.ebuild,v 1.1 2012/04/13 06:43:50 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+RESTRICT="mirror"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.12.ebuild b/dev-lang/php/php-5.3.12.ebuild
new file mode 100644
index 0000000..1dff1a9
--- /dev/null
+++ b/dev-lang/php/php-5.3.12.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.12.ebuild,v 1.1 2012/05/03 20:15:23 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+RESTRICT="mirror"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.13.ebuild b/dev-lang/php/php-5.3.13.ebuild
new file mode 100644
index 0000000..fc1618d
--- /dev/null
+++ b/dev-lang/php/php-5.3.13.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.3.13.ebuild,v 1.1 2012/05/08 17:22:11 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+RESTRICT="mirror"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.14.ebuild b/dev-lang/php/php-5.3.14.ebuild
new file mode 100644
index 0000000..37a8ba4
--- /dev/null
+++ b/dev-lang/php/php-5.3.14.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.3.14.ebuild,v 1.1 2012/06/14 22:10:11 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+RESTRICT="mirror"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.14_rc2.ebuild b/dev-lang/php/php-5.3.14_rc2.ebuild
new file mode 100644
index 0000000..73a1d8d
--- /dev/null
+++ b/dev-lang/php/php-5.3.14_rc2.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.3.14_rc2.ebuild,v 1.1 2012/06/05 12:34:35 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.9-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="olemarkus"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ <dev-libs/libpcre-8.30
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.2.ebuild b/dev-lang/php/php-5.3.2.ebuild
new file mode 100644
index 0000000..a6d1202
--- /dev/null
+++ b/dev-lang/php/php-5.3.2.ebuild
@@ -0,0 +1,338 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.2.ebuild,v 1.1 2010/05/27 23:05:04 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid sybase-ct"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+PHP_PATCHSET=""
+SUHOSIN_VERSION="$PV-0.9.9.1"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+};
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}";
+PHP_PATCHSET_URI="
+ $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi;
+
+SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags:
+IUSE="${IUSE}
+ ${SAPIS}
+ concurrentmodphp threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase fileinfo filter firebird
+ flatfile ftp gd gd-external gdbm gmp hash iconv imap inifile
+ interbase intl iodbc ipv6 json kerberos ldap ldap-sasl libedit
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo phar pic posix postgres qdbm
+ readline recode sapdb session sharedext sharedmem
+ simplexml snmp soap sockets solid spell sqlite sqlite3 ssl suhosin
+ sybase-ct sysvipc tidy tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+DEPEND="app-admin/php-toolkit
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( !threads? ( www-servers/apache[-threads] ) )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? (
+ virtual/imap-c-client[ssl=]
+ virtual/imap-c-client[kolab=]
+ )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mbstring? ( dev-libs/oniguruma )
+ mcve? ( >=dev-libs/openssl-0.9.7 )
+ mssql? ( dev-db/freetds )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? (
+ || (
+ >=dev-db/postgresql-base-7.1[threads=]
+ (
+ || (
+ <dev-db/libpq-8
+ >=dev-db/libpq-8[threads=]
+ )
+ )
+ )
+ )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+";
+
+php="=${CATEGORY}/${PF}";
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ mcve? ( $php[ssl] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ iodbc? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !dev-php${PHP_MV}/pecl-fileinfo )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="${PHP_MV}";
+S="${WORKDIR}/${PHP_P}"
+
+PHP_INI_FILE="php.ini"
+PHP_INI_UPSTREAM="php.ini-production"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v1
+
+src_prepare() { eblit-run src_prepare v1 ; }
+src_configure() { eblit-run src_configure v1 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+
+eblit-pkg pkg_postinst v1
diff --git a/dev-lang/php/php-5.3.3-r1.ebuild b/dev-lang/php/php-5.3.3-r1.ebuild
new file mode 100644
index 0000000..da91289
--- /dev/null
+++ b/dev-lang/php/php-5.3.3-r1.ebuild
@@ -0,0 +1,337 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.3-r1.ebuild,v 1.1 2010/08/08 20:32:23 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+PHP_PATCHSET="2"
+SUHOSIN_VERSION="${PV}-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~hppa ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "ntnu")
+ echo "http://folk.ntnu.no/olemarku/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ concurrentmodphp threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+DEPEND="app-admin/php-toolkit
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !dev-php${PHP_MV}/pecl-fileinfo )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="${PHP_MV}"
+S="${WORKDIR}/${PHP_P}"
+
+PHP_INI_FILE="php.ini"
+PHP_INI_UPSTREAM="php.ini-production"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v1
+
+src_prepare() { eblit-run src_prepare v1 ; }
+src_configure() { eblit-run src_configure v1 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v1 ; }
+src_test() { eblit-run src_test v1 ; }
+
+eblit-pkg pkg_postinst v1
diff --git a/dev-lang/php/php-5.3.3-r2.ebuild b/dev-lang/php/php-5.3.3-r2.ebuild
new file mode 100644
index 0000000..3604257
--- /dev/null
+++ b/dev-lang/php/php-5.3.3-r2.ebuild
@@ -0,0 +1,337 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.3-r2.ebuild,v 1.1 2010/10/08 18:25:10 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+PHP_PATCHSET="2"
+SUHOSIN_VERSION="${PV}-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "ntnu")
+ echo "http://folk.ntnu.no/olemarku/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+DEPEND="!dev-lang/php:5
+ app-admin/eselect-php
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !dev-php${PHP_MV}/pecl-fileinfo )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+PHP_INI_FILE="php.ini"
+PHP_INI_UPSTREAM="php.ini-production"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.3-r3.ebuild b/dev-lang/php/php-5.3.3-r3.ebuild
new file mode 100644
index 0000000..1d8d0a2
--- /dev/null
+++ b/dev-lang/php/php-5.3.3-r3.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.3-r3.ebuild,v 1.1 2010/10/31 19:01:55 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="${PV}-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "ntnu")
+ echo "http://folk.ntnu.no/olemarku/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="3"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !dev-php${PHP_MV}/pecl-fileinfo )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.3.ebuild b/dev-lang/php/php-5.3.3.ebuild
new file mode 100644
index 0000000..867e89d
--- /dev/null
+++ b/dev-lang/php/php-5.3.3.ebuild
@@ -0,0 +1,335 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.3.ebuild,v 1.1 2010/07/26 12:26:41 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+PHP_PATCHSET="1"
+SUHOSIN_VERSION="${PV}-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~hppa ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ concurrentmodphp threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl suhosin
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+DEPEND="app-admin/php-toolkit
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ >=media-libs/jpeg-6b
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ suhosin? ( $php[unicode] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !dev-php${PHP_MV}/pecl-fileinfo )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )
+ suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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
+# see bug #319623 and new style virtual/httpd-php
+PROVIDE="virtual/php"
+
+SLOT="${PHP_MV}"
+S="${WORKDIR}/${PHP_P}"
+
+PHP_INI_FILE="php.ini"
+PHP_INI_UPSTREAM="php.ini-production"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v1
+
+src_prepare() { eblit-run src_prepare v1 ; }
+src_configure() { eblit-run src_configure v1 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v1 ; }
+src_test() { eblit-run src_test v1 ; }
+
+eblit-pkg pkg_postinst v1
diff --git a/dev-lang/php/php-5.3.4-r1.ebuild b/dev-lang/php/php-5.3.4-r1.ebuild
new file mode 100644
index 0000000..58e2751
--- /dev/null
+++ b/dev-lang/php/php-5.3.4-r1.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.4-r1.ebuild,v 1.1 2011/01/05 11:23:16 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="${PV}-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.4.ebuild b/dev-lang/php/php-5.3.4.ebuild
new file mode 100644
index 0000000..689f99b
--- /dev/null
+++ b/dev-lang/php/php-5.3.4.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.4.ebuild,v 1.1 2010/12/19 14:24:49 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+#SUHOSIN_VERSION="${PV}-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+
+[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? ( $php[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.5-r1.ebuild b/dev-lang/php/php-5.3.5-r1.ebuild
new file mode 100644
index 0000000..a6acfc5
--- /dev/null
+++ b/dev-lang/php/php-5.3.5-r1.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.5-r1.ebuild,v 1.1 2011/01/29 22:05:22 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="5.3.4-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="1"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.5.ebuild b/dev-lang/php/php-5.3.5.ebuild
new file mode 100644
index 0000000..af83429
--- /dev/null
+++ b/dev-lang/php/php-5.3.5.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.5.ebuild,v 1.1 2011/01/06 23:35:43 mabi Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="5.3.4-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc64 ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="gentoo"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.6-r1.ebuild b/dev-lang/php/php-5.3.6-r1.ebuild
new file mode 100644
index 0000000..49beeaf
--- /dev/null
+++ b/dev-lang/php/php-5.3.6-r1.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.6-r1.ebuild,v 1.1 2011/04/19 16:44:56 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.4 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.6.ebuild b/dev-lang/php/php-5.3.6.ebuild
new file mode 100644
index 0000000..e250255
--- /dev/null
+++ b/dev-lang/php/php-5.3.6.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.6.ebuild,v 1.1 2011/03/17 16:36:51 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.4 ) )
+ sqlite3? ( =dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.6_rc1.ebuild b/dev-lang/php/php-5.3.6_rc1.ebuild
new file mode 100644
index 0000000..393f1a3
--- /dev/null
+++ b/dev-lang/php/php-5.3.6_rc1.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.6_rc1.ebuild,v 1.1 2011/02/18 09:18:38 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ fpm? ( >=dev-libs/libevent-1.4.12 )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.6_rc2.ebuild b/dev-lang/php/php-5.3.6_rc2.ebuild
new file mode 100644
index 0000000..f8b6cd4
--- /dev/null
+++ b/dev-lang/php/php-5.3.6_rc2.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.6_rc2.ebuild,v 1.1 2011/03/03 15:44:11 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-7.9[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) )
+ sqlite3? ( =dev-db/sqlite-3* )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.6_rc3.ebuild b/dev-lang/php/php-5.3.6_rc3.ebuild
new file mode 100644
index 0000000..2400a13
--- /dev/null
+++ b/dev-lang/php/php-5.3.6_rc3.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.6_rc3.ebuild,v 1.1 2011/03/10 18:58:47 olemarkus Exp $
+
+EAPI=2
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="cli cgi fpm embed apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.4 ) )
+ sqlite3? ( =dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+RDEPEND="${DEPEND}
+ truetype? ( || ( $php[gd] $php[gd-external] ) )
+ cjk? ( || ( $php[gd] $php[gd-external] ) )
+ exif? ( || ( $php[gd] $php[gd-external] ) )
+
+ xpm? ( $php[gd] )
+ gd? ( $php[zlib,-gd-external] )
+ gd-external? ( $php[-gd] )
+ simplexml? ( $php[xml] )
+ soap? ( $php[xml] )
+ wddx? ( $php[xml] )
+ xmlrpc? ( || ( $php[xml] $php[iconv] ) )
+ xmlreader? ( $php[xml] )
+ xsl? ( $php[xml] )
+ ldap-sasl? ( $php[ldap,-oci8] )
+ adabas? ( $php[odbc] )
+ birdstep? ( $php[odbc] )
+ dbmaker? ( $php[odbc] )
+ empress-bcs? ( $php[empress] )
+ empress? ( $php[odbc] )
+ esoob? ( $php[odbc] )
+ db2? ( $php[odbc] )
+ sapdb? ( $php[odbc] )
+ solid? ( $php[odbc] )
+ kolab? ( $php[imap] )
+ mhash? ( $php[hash] )
+ phar? ( $php[hash] )
+ mysqlnd? ( || (
+ $php[mysql]
+ $php[mysqli]
+ $php[pdo]
+ ) )
+
+ oci8? ( $php[-oci8-instant-client,-ldap-sasl] )
+ oci8-instant-client? ( $php[-oci8] )
+
+ qdbm? ( $php[-gdbm] )
+ readline? ( $php[-libedit] )
+ recode? ( $php[-imap,-mysql,-mysqli] )
+ firebird? ( $php[-interbase] )
+ sharedmem? ( $php[-threads] )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) )
+
+ enchant? ( !dev-php${PHP_MV}/pecl-enchant )
+ fileinfo? ( !<dev-php${PHP_MV}/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php${PHP_MV}/pecl-filter )
+ json? ( !dev-php${PHP_MV}/pecl-json )
+ phar? ( !dev-php${PHP_MV}/pecl-phar )
+ zip? ( !dev-php${PHP_MV}/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# 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"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v2 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.7.ebuild b/dev-lang/php/php-5.3.7.ebuild
new file mode 100644
index 0000000..19a2654
--- /dev/null
+++ b/dev-lang/php/php-5.3.7.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.7.ebuild,v 1.1 2011/08/21 13:58:36 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/ilia/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.7_rc1.ebuild b/dev-lang/php/php-5.3.7_rc1.ebuild
new file mode 100644
index 0000000..8fb0df7
--- /dev/null
+++ b/dev-lang/php/php-5.3.7_rc1.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.7_rc1.ebuild,v 1.1 2011/06/17 10:03:02 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.6.3 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.7_rc2.ebuild b/dev-lang/php/php-5.3.7_rc2.ebuild
new file mode 100644
index 0000000..3869fdb
--- /dev/null
+++ b/dev-lang/php/php-5.3.7_rc2.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.7_rc2.ebuild,v 1.1 2011/07/01 11:45:01 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/ilia/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.6.3 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.7_rc3.ebuild b/dev-lang/php/php-5.3.7_rc3.ebuild
new file mode 100644
index 0000000..78f1403
--- /dev/null
+++ b/dev-lang/php/php-5.3.7_rc3.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.7_rc3.ebuild,v 1.1 2011/07/23 10:14:46 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/ilia/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.6.3 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.7_rc5.ebuild b/dev-lang/php/php-5.3.7_rc5.ebuild
new file mode 100644
index 0000000..7f86776
--- /dev/null
+++ b/dev-lang/php/php-5.3.7_rc5.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.7_rc5.ebuild,v 1.1 2011/08/12 07:40:09 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/ilia/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.8.ebuild b/dev-lang/php/php-5.3.8.ebuild
new file mode 100644
index 0000000..6250631
--- /dev/null
+++ b/dev-lang/php/php-5.3.8.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.8.ebuild,v 1.1 2011/08/24 07:08:30 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="5.3.7-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/ilia/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.3.9.ebuild b/dev-lang/php/php-5.3.9.ebuild
new file mode 100644
index 0000000..a748deb
--- /dev/null
+++ b/dev-lang/php/php-5.3.9.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.9.ebuild,v 1.1 2012/01/11 06:35:28 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.7-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.9_rc1.ebuild b/dev-lang/php/php-5.3.9_rc1.ebuild
new file mode 100644
index 0000000..320b4dd
--- /dev/null
+++ b/dev-lang/php/php-5.3.9_rc1.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.9_rc1.ebuild,v 1.1 2011/11/04 10:21:20 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="5.3.7-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.9_rc2.ebuild b/dev-lang/php/php-5.3.9_rc2.ebuild
new file mode 100644
index 0000000..eea2012
--- /dev/null
+++ b/dev-lang/php/php-5.3.9_rc2.ebuild
@@ -0,0 +1,414 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.9_rc2.ebuild,v 1.1 2011/11/25 09:10:47 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION="5.3.7-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.9_rc3.ebuild b/dev-lang/php/php-5.3.9_rc3.ebuild
new file mode 100644
index 0000000..66a189e
--- /dev/null
+++ b/dev-lang/php/php-5.3.9_rc3.ebuild
@@ -0,0 +1,397 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.9_rc3.ebuild,v 1.1 2011/12/16 09:02:43 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.7-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ birdstep? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.3.9_rc4.ebuild b/dev-lang/php/php-5.3.9_rc4.ebuild
new file mode 100644
index 0000000..1f0b470
--- /dev/null
+++ b/dev-lang/php/php-5.3.9_rc4.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.3.9_rc4.ebuild,v 1.1 2011/12/24 08:54:00 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION="5.3.7-0.9.10"
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.7.1 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.7.1 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "v2"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v3 ; }
+src_configure() { eblit-run src_configure v53 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0.ebuild b/dev-lang/php/php-5.4.0.ebuild
new file mode 100644
index 0000000..4630bb7
--- /dev/null
+++ b/dev-lang/php/php-5.4.0.ebuild
@@ -0,0 +1,382 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0.ebuild,v 1.1 2012/03/01 21:51:51 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="1"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0_alpha1.ebuild b/dev-lang/php/php-5.4.0_alpha1.ebuild
new file mode 100644
index 0000000..805ef57
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_alpha1.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_alpha1.ebuild,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PV/_alpha/alpha}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedext sharedmem
+ +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.6.3 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_alpha3.ebuild b/dev-lang/php/php-5.4.0_alpha3.ebuild
new file mode 100644
index 0000000..840d933
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_alpha3.ebuild
@@ -0,0 +1,328 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_alpha3.ebuild,v 1.1 2011/08/08 16:15:47 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PV/_alpha/alpha}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_beta1.ebuild b/dev-lang/php/php-5.4.0_beta1.ebuild
new file mode 100644
index 0000000..6cf1a08
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_beta1.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_beta1.ebuild,v 1.1 2011/09/16 07:04:41 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PV/_alpha/alpha}"
+PHP_PV="${PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_beta2.ebuild b/dev-lang/php/php-5.4.0_beta2.ebuild
new file mode 100644
index 0000000..07c52c9
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_beta2.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_beta2.ebuild,v 1.1 2011/10/20 08:27:33 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PV/_alpha/alpha}"
+PHP_PV="${PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_pre201104301030.ebuild b/dev-lang/php/php-5.4.0_pre201104301030.ebuild
new file mode 100644
index 0000000..653ff7c
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_pre201104301030.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_pre201104301030.ebuild,v 1.1 2011/05/01 20:15:53 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="$(get_version_component_range 4 )"
+PHP_PV="${PHP_PV/pre/trunk-}"
+
+PHP_RELEASE="olemarkus"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ "
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="5.4"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.4 ) )
+ sqlite3? ( >=dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare snapshots ; }
+src_configure() { eblit-run src_configure v2 ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_pre201105151030.ebuild b/dev-lang/php/php-5.4.0_pre201105151030.ebuild
new file mode 100644
index 0000000..9de74a8
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_pre201105151030.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_pre201105151030.ebuild,v 1.1 2011/05/15 19:17:23 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="$(get_version_component_range 4 )"
+PHP_PV="${PHP_PV/pre/trunk-}"
+
+PHP_RELEASE="olemarkus"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ "
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="5.4"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare snapshots ; }
+src_configure() { eblit-run src_configure snapshots ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_pre201105211430.ebuild b/dev-lang/php/php-5.4.0_pre201105211430.ebuild
new file mode 100644
index 0000000..5e96f3c
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_pre201105211430.ebuild
@@ -0,0 +1,352 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_pre201105211430.ebuild,v 1.1 2011/05/22 07:17:51 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/.0_pre/-}"
+
+PHP_RELEASE="olemarkus"
+PHP_P="${PN}${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ "
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="5.4"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare snapshots ; }
+src_configure() { eblit-run src_configure snapshots ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_rc1.ebuild b/dev-lang/php/php-5.4.0_rc1.ebuild
new file mode 100644
index 0000000..1bedf7d
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc1.ebuild
@@ -0,0 +1,332 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc1.ebuild,v 1.1 2011/11/11 13:14:36 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_rc2.ebuild b/dev-lang/php/php-5.4.0_rc2.ebuild
new file mode 100644
index 0000000..29e27b2
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc2.ebuild
@@ -0,0 +1,332 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc2.ebuild,v 1.1 2011/11/25 09:10:47 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_rc3.ebuild b/dev-lang/php/php-5.4.0_rc3.ebuild
new file mode 100644
index 0000000..d8fc810
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc3.ebuild
@@ -0,0 +1,332 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc3.ebuild,v 1.1 2011/12/09 09:45:13 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v3 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }
diff --git a/dev-lang/php/php-5.4.0_rc4.ebuild b/dev-lang/php/php-5.4.0_rc4.ebuild
new file mode 100644
index 0000000..06faff6
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc4.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc4.ebuild,v 1.1 2011/12/24 08:54:00 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php/pecl-enchant )
+ fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php/pecl-filter )
+ json? ( !dev-php/pecl-json )
+ phar? ( !dev-php/pecl-phar )
+ zip? ( !dev-php/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0_rc5.ebuild b/dev-lang/php/php-5.4.0_rc5.ebuild
new file mode 100644
index 0000000..e55e75b
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc5.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc5.ebuild,v 1.1 2012/01/06 20:54:59 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php/pecl-enchant )
+ fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php/pecl-filter )
+ json? ( !dev-php/pecl-json )
+ phar? ( !dev-php/pecl-phar )
+ zip? ( !dev-php/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0_rc6.ebuild b/dev-lang/php/php-5.4.0_rc6.ebuild
new file mode 100644
index 0000000..143ebbb
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc6.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc6.ebuild,v 1.1 2012/01/20 14:40:05 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php/pecl-enchant )
+ fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php/pecl-filter )
+ json? ( !dev-php/pecl-json )
+ phar? ( !dev-php/pecl-phar )
+ zip? ( !dev-php/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0_rc7-r1.ebuild b/dev-lang/php/php-5.4.0_rc7-r1.ebuild
new file mode 100644
index 0000000..310eb47
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc7-r1.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc7-r1.ebuild,v 1.1 2012/02/09 16:59:39 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="1"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php/pecl-enchant )
+ fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php/pecl-filter )
+ json? ( !dev-php/pecl-json )
+ phar? ( !dev-php/pecl-phar )
+ zip? ( !dev-php/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0_rc7.ebuild b/dev-lang/php/php-5.4.0_rc7.ebuild
new file mode 100644
index 0000000..5967486
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc7.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc7.ebuild,v 1.1 2012/02/03 09:51:09 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="$(get_version_component_range 1-2)"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php/pecl-enchant )
+ fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php/pecl-filter )
+ json? ( !dev-php/pecl-json )
+ phar? ( !dev-php/pecl-phar )
+ zip? ( !dev-php/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.0_rc8.ebuild b/dev-lang/php/php-5.4.0_rc8.ebuild
new file mode 100644
index 0000000..48d9cd2
--- /dev/null
+++ b/dev-lang/php/php-5.4.0_rc8.ebuild
@@ -0,0 +1,391 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.0_rc8.ebuild,v 1.1 2012/02/16 19:22:11 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="1"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ <dev-libs/libpcre-8.30
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php/pecl-enchant )
+ fileinfo? ( !<dev-php/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php/pecl-filter )
+ json? ( !dev-php/pecl-json )
+ phar? ( !dev-php/pecl-phar )
+ zip? ( !dev-php/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.1.ebuild b/dev-lang/php/php-5.4.1.ebuild
new file mode 100644
index 0000000..8f51f92
--- /dev/null
+++ b/dev-lang/php/php-5.4.1.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.1.ebuild,v 1.1 2012/04/26 11:33:41 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.1_rc1.ebuild b/dev-lang/php/php-5.4.1_rc1.ebuild
new file mode 100644
index 0000000..6cad1d3
--- /dev/null
+++ b/dev-lang/php/php-5.4.1_rc1.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.1_rc1.ebuild,v 1.1 2012/03/30 11:23:07 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.1_rc2.ebuild b/dev-lang/php/php-5.4.1_rc2.ebuild
new file mode 100644
index 0000000..f69152c
--- /dev/null
+++ b/dev-lang/php/php-5.4.1_rc2.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.1_rc2.ebuild,v 1.1 2012/04/13 06:43:50 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.2.ebuild b/dev-lang/php/php-5.4.2.ebuild
new file mode 100644
index 0000000..8035b3f
--- /dev/null
+++ b/dev-lang/php/php-5.4.2.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.4.2.ebuild,v 1.1 2012/05/03 20:15:23 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.3.ebuild b/dev-lang/php/php-5.4.3.ebuild
new file mode 100644
index 0000000..6b29229
--- /dev/null
+++ b/dev-lang/php/php-5.4.3.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.3.ebuild,v 1.1 2012/05/08 17:22:11 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.4.ebuild b/dev-lang/php/php-5.4.4.ebuild
new file mode 100644
index 0000000..4325378
--- /dev/null
+++ b/dev-lang/php/php-5.4.4.ebuild
@@ -0,0 +1,385 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.4.ebuild,v 1.1 2012/06/14 22:10:11 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.4.4_rc2.ebuild b/dev-lang/php/php-5.4.4_rc2.ebuild
new file mode 100644
index 0000000..ca33afe
--- /dev/null
+++ b/dev-lang/php/php-5.4.4_rc2.ebuild
@@ -0,0 +1,385 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.4_rc2.ebuild,v 1.1 2012/06/05 17:34:32 olemarkus Exp $
+
+EAPI=4
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-stas")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-stas"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug doc
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.12[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common v2
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v3
+
+src_prepare() { eblit-run src_prepare v4 ; }
+src_configure() { eblit-run src_configure v54 ; }
+src_compile() { eblit-run src_compile v2 ; }
+src_install() { eblit-run src_install v3 ; }
+src_test() { eblit-run src_test v1 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}
diff --git a/dev-lang/php/php-5.5.0_pre201105211430.ebuild b/dev-lang/php/php-5.5.0_pre201105211430.ebuild
new file mode 100644
index 0000000..8b91565
--- /dev/null
+++ b/dev-lang/php/php-5.5.0_pre201105211430.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.5.0_pre201105211430.ebuild,v 1.1 2011/05/22 07:17:51 olemarkus Exp $
+
+EAPI=4
+
+PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid"
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool
+
+SUHOSIN_VERSION=""
+FPM_VERSION="builtin"
+EXPECTED_TEST_FAILURES=""
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/johannes/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "suhosin")
+ echo "http://download.suhosin.org/${2}"
+ ;;
+ "olemarkus")
+ echo "http://olemarkus.org/~olemarkus/gentoo/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="$(get_version_component_range 4 )"
+PHP_PV="${PHP_PV/pre/trunk-}"
+
+PHP_RELEASE="olemarkus"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="0"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")"
+
+if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then
+ # in some cases we use our own suhosin patch (very recent version,
+ # patch conflicts, etc.)
+ SUHOSIN_TYPE="gentoo"
+else
+ SUHOSIN_TYPE="suhosin"
+fi
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch";
+ SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )"
+fi
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}
+ "
+
+if [[ -n ${SUHOSIN_VERSION} ]]; then
+ SRC_URI="${SRC_URI}
+ suhosin? ( ${SUHOSIN_URI} )"
+fi
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+SLOT="5.5"
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# Gentoo-specific, common features
+IUSE="kolab"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers db2 dbmaker debug doc empress
+ empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile
+ interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls oci8
+ oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
+ readline recode sapdb +session sharedext sharedmem
+ +simplexml snmp soap sockets solid spell sqlite ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+# Enable suhosin if available
+[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
+
+DEPEND="!dev-lang/php:5
+ >=app-admin/eselect-php-0.6.2
+ >=dev-libs/libpcre-8.11[unicode]
+ adabas? ( >=dev-db/unixODBC-1.8.13 )
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ birdstep? ( >=dev-db/unixODBC-1.8.13 )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ db2? ( >=dev-db/unixODBC-1.8.13 )
+ dbmaker? ( >=dev-db/unixODBC-1.8.13 )
+ empress? ( >=dev-db/unixODBC-1.8.13 )
+ empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
+ enchant? ( app-text/enchant )
+ esoob? ( >=dev-db/unixODBC-1.8.13 )
+ exif? ( !gd? ( !gd-external? (
+ virtual/jpeg
+ media-libs/libpng
+ sys-libs/zlib
+ ) ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib )
+ gd-external? ( media-libs/gd )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ kolab? ( >=net-libs/c-client-2004g-r1 )
+ ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) )
+ ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql-base )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline )
+ recode? ( app-text/recode )
+ sapdb? ( >=dev-db/unixODBC-1.8.13 )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ solid? ( >=dev-db/unixODBC-1.8.13 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.4 )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? ( !gd-external? (
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng sys-libs/zlib
+ )
+ xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( || ( gd gd-external ) )
+ cjk? ( || ( gd gd-external ) )
+ exif? ( || ( gd gd-external ) )
+
+ xpm? ( gd )
+ gd? ( zlib !gd-external )
+ gd-external? ( !gd )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap !oci8 )
+ adabas? ( odbc )
+ birdstep? ( odbc )
+ dbmaker? ( odbc )
+ empress-bcs? ( empress )
+ empress? ( odbc )
+ esoob? ( odbc )
+ db2? ( odbc )
+ sapdb? ( odbc )
+ solid? ( odbc )
+ kolab? ( imap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ oci8? ( !oci8-instant-client !ldap-sasl )
+ oci8-instant-client? ( !oci8 )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ firebird? ( !interbase )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+DEPEND="${DEPEND}
+ enchant? ( !dev-php5/pecl-enchant )
+ fileinfo? ( !<dev-php5/pecl-fileinfo-1.0.4-r2 )
+ filter? ( !dev-php5/pecl-filter )
+ json? ( !dev-php5/pecl-json )
+ phar? ( !dev-php5/pecl-phar )
+ zip? ( !dev-php5/pecl-zip )"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? (
+=${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# They are in PDEPEND because we need PHP installed first!
+PDEPEND="doc? ( app-doc/php-docs )"
+
+# No longer depend on the extension. The suhosin USE flag only installs the
+# patch
+#[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} suhosin? ( dev-php${PHP_MV}/suhosin )"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+# eblit-core
+# Usage: <function> [version] [eval]
+# Main eblit engine
+eblit-core() {
+ [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files"
+ local e v func=$1 ver=$2 eval_=$3
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }"
+ return 0
+ fi
+ done
+ return 1
+}
+
+# eblit-include
+# Usage: [--skip] <function> [version]
+# Includes an "eblit" -- a chunk of common code among ebuilds in a given
+# package so that its functions can be sourced and utilized within the
+# ebuild.
+eblit-include() {
+ local skipable=false r=0
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ [[ -z $1 ]] && die "Usage: eblit-include <function> [version]"
+ eblit-core $1 $2
+ r="$?"
+ ${skipable} && return 0
+ [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe
+# Usage: <function>
+# Runs a function if it is defined in an eblit
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run
+# Usage: <function> [version]
+# Runs a function defined in an eblit
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+# eblit-pkg
+# Usage: <phase> [version]
+# Includes the given functions AND evals them so they're included in the binpkgs
+eblit-pkg() {
+ [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]"
+ eblit-core $1 $2 1
+}
+
+eblit-pkg pkg_setup v2
+
+src_prepare() { eblit-run src_prepare snapshots ; }
+src_configure() { eblit-run src_configure snapshots ; }
+src_compile() { eblit-run src_compile v1 ; }
+src_install() { eblit-run src_install v2 ; }
+src_test() { eblit-run src_test v1 ; }
+pkg_postinst() { eblit-run pkg_postinst v2 ; }