version bump
authorMatti Bickel <mabi@gentoo.org>
Thu, 27 May 2010 23:05:05 +0000 (23:05 +0000)
committerMatti Bickel <mabi@gentoo.org>
Thu, 27 May 2010 23:05:05 +0000 (23:05 +0000)
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64

17 files changed:
dev-lang/php/ChangeLog
dev-lang/php/Manifest
dev-lang/php/files/70_mod_php5.conf-apache2
dev-lang/php/files/70_mod_php5_concurr.conf-apache2
dev-lang/php/files/eblits/common-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/common-v2.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/pkg_postinst-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/pkg_setup-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_compile-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_compile-v2.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_configure-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_install-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_install-v2.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_prepare-v1.eblit [new file with mode: 0644]
dev-lang/php/files/eblits/src_test-v1.eblit [new file with mode: 0644]
dev-lang/php/metadata.xml
dev-lang/php/php-5.3.2.ebuild [new file with mode: 0644]

index fb033a2aa80987fb4869bc812e55f41056f43e8d..35610a37586ae83dbec98504c9616cbd71a05ef4 100644 (file)
@@ -1,6 +1,22 @@
 # ChangeLog for dev-lang/php
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.376 2010/03/29 21:59:43 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.377 2010/05/27 23:05:04 mabi Exp $
+
+*php-5.3.2 (27 May 2010)
+
+  27 May 2010; <mabi@gentoo.org> files/70_mod_php5_concurr.conf-apache2,
+  files/70_mod_php5.conf-apache2, +files/eblits/common-v1.eblit,
+  +files/eblits/common-v2.eblit, +files/eblits/pkg_postinst-v1.eblit,
+  +files/eblits/pkg_setup-v1.eblit, +files/eblits/src_compile-v1.eblit,
+  +files/eblits/src_compile-v2.eblit, +files/eblits/src_configure-v1.eblit,
+  +files/eblits/src_install-v1.eblit, +files/eblits/src_install-v2.eblit,
+  +files/eblits/src_prepare-v1.eblit, +files/eblits/src_test-v1.eblit,
+  +php-5.3.2.ebuild:
+  version bump (bug #274512, #312775); see
+  http://www.php.net/ChangeLog-5.php#5.3.2 for a list of changes and the
+  migration guide for an update from 5.2:
+  http://www.php.net/manual/en/migration53.php; expect more bumps as we fix
+  open bugs
 
   29 Mar 2010; Markus Meier <maekke@gentoo.org> php-5.2.13.ebuild:
   amd64 stable, bug #306939
index 2af500ac90cb67da05876cc10920fd15dce57542..033498752d45133cd88e2881dd4a1acb8dbf8364 100644 (file)
@@ -1,12 +1,20 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX 20php4-envd 145 RMD160 fb57b2d202ab1031303e7525a8ef5b353dc04ef8 SHA1 34ef066d2de22f147fc86bbe884692af7631f726 SHA256 17cd1a952434988b4c2125e4d1eef1df7114809f404605d35f255674419dd5d5
 AUX 20php5-envd 145 RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 SHA1 f1cef57c0def8e2c5422aaf136f40b4ff47801d2 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4
-AUX 70_mod_php5.conf-apache2 490 RMD160 745bdb5db622577f473703d5ee8dc7f3c66f8f0c SHA1 7daf9c9ec2e6d108f850981853f9f4f599be0b71 SHA256 5667d06cb7a18c30d11decd28d55b87e36287c76c4d3a450b1cb37271e7fdcd1
+AUX 70_mod_php5.conf-apache2 348 RMD160 9f3f49a52ebf92c2650501c5ceb6f95ce4bb2e76 SHA1 62992e793446b4a9a64900d1ecba7bae06873382 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c
 AUX 70_mod_php5.conf-apache2-r1 374 RMD160 ca06cdc9d1a3dc4129a60c938ee3a1b542497fbb SHA1 4733066b6324c5870e716485484c44c7c26a9ff1 SHA256 815c1ca23c9afe8479568ceaac4057eb91ea5444fbd863866b29adb4eea2c82b
-AUX 70_mod_php5_concurr.conf-apache2 414 RMD160 1783b6c830119f021c3fb6cb35a631f43c4fa70c SHA1 09f9076f35bc84994fc8c687b4befc0400475f1a SHA256 ccc3bc073eafc83f98049679a411801e80f84620bd51c37c36de2b9ee9492aa2
+AUX 70_mod_php5_concurr.conf-apache2 348 RMD160 9f3f49a52ebf92c2650501c5ceb6f95ce4bb2e76 SHA1 62992e793446b4a9a64900d1ecba7bae06873382 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c
 AUX 70_mod_php5_concurr.conf-apache2-r1 376 RMD160 4f7de5c0784b6191450b5c1a7de7ad941620e199 SHA1 c42a23bd7a1d3e8c7e0ac906f50f180116349f76 SHA256 c05f499d9c8927391c586b94716a9f59d63767165552ea527ec7ff63c36eaa40
+AUX eblits/common-v1.eblit 376 RMD160 524d38035ef01b215c6dc06699c41550c246de9d SHA1 b85091f9e56b20217e5c2d3e25cef055642cd088 SHA256 d395752919fe05fa64a0e09deaf690e008a04f2c580f42233b5a854a1012045e
+AUX eblits/common-v2.eblit 377 RMD160 b19bbc6f9b4a483e61c3ffaeec64b084428afeda SHA1 9125ee3ec41d980c656e87466f5046802d0aab28 SHA256 046719f0ba027553bc5f364697ae8b8c15883a0e650fd4c10b26dbc68fa2c948
+AUX eblits/pkg_postinst-v1.eblit 2184 RMD160 ce65ba811eab10862d067c7e2b4bdc8d2b0aee56 SHA1 11c14f2235041cfb08e33cf2550bebef2037e92b SHA256 9e1cd81be4f051f3156de0ce5398a338b2ab6f8e73047c5983beda47f2f762b0
+AUX eblits/pkg_setup-v1.eblit 643 RMD160 b0ac84af7c2cddaca058ca0562306cdc8ddff108 SHA1 88572e5da2d10b2bcbfa3f35a2d39366cbabb364 SHA256 6b7181294ce309d5cdee68e1f7e7c9365910c940db4391ae1ca62e0d6eb9b27e
+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-v1.eblit 9827 RMD160 272b8c5720b4a8f3f9deb601bfd68cc26273adab SHA1 dbfca765215b9539c88767389b6b615a07604146 SHA256 8947ca3957ecf8592db09c71862d4274f866005552a453ad15e842288079fd46
+AUX eblits/src_install-v1.eblit 3646 RMD160 1e7eaea9a769b4c7e324eab4e3eae3f6e12d65b4 SHA1 2e4e84f4ee39b49b9c07c4332553b9c3ea6796bf SHA256 fe673568b92064c63932752c2a599e0577488988e3c56bb4448107cbe0dd5619
+AUX eblits/src_install-v2.eblit 3584 RMD160 3296864c3393fcef3fd70c8f43d0a5a7c3c1760c SHA1 b7eb10bd944caceec0826b948b3e237bd67a7440 SHA256 093ef7303cf6415b7e141918e2382f5624450dc377c32dbbebcb1a926466051d
+AUX eblits/src_prepare-v1.eblit 2723 RMD160 8e725c88d5b3c3cecd4756fc2ca7995098bef732 SHA1 21aa9c37c10c91efd8d654e0b2c25256c1a0786e SHA256 d70b0601db99236e1d3b200875145a7f7ef6ec601e23808f0a08d159893f55e4
+AUX eblits/src_test-v1.eblit 1480 RMD160 68ef731042ef236efee923649b318239c0219d52 SHA1 81c047f180e43eb1e6b0309ee8d6751950ce1b97 SHA256 ddc836ca2e7b2abac20450fc6eb8c7d30277c567d23051016b903ece1d07a6b2
 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 php4-ldvs 22 RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 SHA1 8c66355dfb80e2ecc6ee6faae30bf7dbb1727651 SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde
@@ -16,6 +24,7 @@ DIST php-5.2.11.tar.bz2 9030787 RMD160 6aad53dee864ab89f794a9d3c2aa32d435ed5654
 DIST php-5.2.12.tar.bz2 9075161 RMD160 027f3597fd961d2a95682e2f0738415f8a911371 SHA1 6605f23b70e3db824047830f08d636e09ec10ff3 SHA256 e65756a8412726a491ca48da1e0693eaeb3f38f19fb6cbc8f53005cab1f2491a
 DIST php-5.2.13.tar.bz2 9084518 RMD160 9e21d32a7b757d25ed827834b26235ea1eebfcc8 SHA1 7127a21f1b493e3cd43f45cadecdb46b623eb1fb SHA256 2b50a2535e3bb9a98cd4d1633f9452d877276c40b385915261f040d535c7eadb
 DIST php-5.2.9.tar.bz2 10203122 RMD160 fc2b316ff05462667704027cf2a1a4ac0a238422 SHA1 1c738dbd7e3f8d723b6ce2e0fbc90a69e249f5f0 SHA256 30166dda7c3d8bdcb2753ab79260be25454cdf3673d681b7651f8d32006ee2a6
+DIST php-5.3.2.tar.bz2 10477662 RMD160 60a8aac0d51511ecaf8dcad9d31bdf072c0c99cf SHA1 79ea4ee3da3a7542d1e348ac963a5b38bcbb4b6b SHA256 9a380a574adcb3a9abe3226e7c3a9bae619e8a1b90842ec2a7edf0ad92afdeda
 DIST php-patchset-5.2.10-r0.tar.bz2 11015 RMD160 703a9f3dce390c9572c88099035a09d343e98452 SHA1 62071c0f6edb892b43ba5150a04c28deab59ef4d SHA256 f949b2ea3dc7eb1456e473b9597288def2d86e58cfe9dd4ce5a8cf25cdcd6d0c
 DIST php-patchset-5.2.10-r1.tar.bz2 11294 RMD160 1f23bbb661f40ac44ed4e39e51abc0a8d5d2b9a0 SHA1 66841d8f64058e6fdd74fb82dc686e75f5f36f6d SHA256 e32a9f08307707476dec5ad44a6923c7827d7635c2b723d3e70cc82eee1da1e3
 DIST php-patchset-5.2.11-r0.tar.bz2 10171 RMD160 f02780907f8d2fa44aba1974de4376b5e14497c0 SHA1 47586ffae72ff3966afa4cf20ae355190dbac29c SHA256 441bc612aa7e19e2a4c2fd37181fb652e84cdf002d1841ebcf2e631d0bd4cd99
@@ -23,10 +32,12 @@ DIST php-patchset-5.2.11-r1.tar.bz2 10403 RMD160 53ce1a43697db2cf79eba89a548f52e
 DIST php-patchset-5.2.12-r0.tar.bz2 10181 RMD160 e78dc3a500838e163da4eb5853dfe539430486c3 SHA1 91244c62af3ef3a0ebd1a396dbe22d2732512c89 SHA256 ca0cb19e98cb073fa0dd9157c728a9285b97198f1b522727e040f0f00dd8255f
 DIST php-patchset-5.2.13-r0.tar.bz2 10207 RMD160 b367c17742553fcfbf4cb1b76f8dd4aae9f08cf8 SHA1 20b60e3aef34d0b558f0c896c6981957490b2ba9 SHA256 c71dad65178186786393164a0cb4f056b85f0e00579da3dc2dbe5b863ec4262b
 DIST php-patchset-5.2.9-r2.tar.bz2 17294 RMD160 1367ccf198686df2ff81408b1d6fb7096fa6790b SHA1 d5d1528aa775ff4af9251a6843a5f18bffcb4795 SHA256 ba77dab6cf96f874070afee76d1ad7b48a55a8738bc0e0bc6c54f011b9070dc1
+DIST php-patchset-5.3.2-r0.tar.bz2 9735 RMD160 392246b80036916887ddd59a017997bed226a2a2 SHA1 a2a3a75986995e1cfe480fb0a952033c0034dc21 SHA256 9b4c4a66e9b6d7f74a19dc33b1bb167cc52596cdc7d874f6d3bb2adb8cf70a86
 DIST suhosin-patch-5.2.10-0.9.7.patch.gz 23072 RMD160 18df1686a48d652f581591115b51461e9dacf5a4 SHA1 3768bbded0bb2376414322b26308342452cb927a SHA256 51d8496172b838c4bbb40f783b535162169b5e218cd6093ecc25cfcfa0c469f8
 DIST suhosin-patch-5.2.11-0.9.7.patch.gz 23050 RMD160 0f6d442aace34c221f9fbff42a63e7f3b4489f15 SHA1 248419332131efc53f3306c2a57a4b1a9dc92cc1 SHA256 392f10c9b7d9c47f30e989fb7775cc46d36153b933bf7ac9ccd8826b2954584b
 DIST suhosin-patch-5.2.13-0.9.7.patch.gz 22989 RMD160 63a022a5bf0fb8c6688f4c0ebcfaa8a437ea6935 SHA1 e2faf8db2d7facbd44cee2f737ce87732835d341 SHA256 787743e5d201ab2ce3fcc3f252eedd7f167470fa1f55af0646d7f03aab89d184
 DIST suhosin-patch-5.2.9-0.9.7.patch.gz 23026 RMD160 1d2e01a935c4bbc9e858796f8f6004b4f75950b3 SHA1 4197644330a4f182f4dd64beb9db29406ed300ca SHA256 6f7a86cff1cdd1007ba248292f6adfe3b7c01adfed56c2e937c87c60210bbc38
+DIST suhosin-patch-5.3.2-0.9.9.1.patch.gz 40847 RMD160 64d8b7ec2ec91fd7a43b0cd95c0aa0df5b666768 SHA1 c48d3f24341d3b0214ca3e980320b23864aa93ba SHA256 a61f081022888bf78997e434744d6c0604194c73a00e70c1165524a0a6329de2
 EBUILD php-5.2.10-r1.ebuild 16745 RMD160 fe4cfc9b98bc59896b47eedd5e130ba7ff959b41 SHA1 99e861e950fba9a53ff076a6899553313cee4fc4 SHA256 dba2f96e34bf26fcd9561a531590ab2698da19ff33fe302c8c05a091c4c9300d
 EBUILD php-5.2.10-r2.ebuild 16837 RMD160 42203f775e0684373492a476cf3a80b9eb0048b1 SHA1 fbc5e68c94757e2b5f4fb6b994663132d16ce5d5 SHA256 8ed75d0f54bdd8e72ecc73c4e71a7866d6e0c569b22b3a1897fc1608e5db7ba6
 EBUILD php-5.2.10.ebuild 16724 RMD160 5647b04c6b6d44f1fb68ab531f4aaa5a80a20716 SHA1 21e7c02154fb181e1c4b301a62bba9aa6df20253 SHA256 44772c82d4532a26709c32bc50f837803f1d77b5a07335dfcd9f3be4536e1632
@@ -35,12 +46,6 @@ EBUILD php-5.2.11.ebuild 16796 RMD160 4d55fe8a9787c726a23a426e891ceffbb44faef6 S
 EBUILD php-5.2.12.ebuild 16901 RMD160 42ad4d01a89392445e491f1d784a7f23028fb0dc SHA1 17f6e1da1793a06c10636e332440c37535262a7d SHA256 cbab429ae3fe5bc0fe4cb961dbb1df91be35c04f7c8340cfee39117afcfeddcc
 EBUILD php-5.2.13.ebuild 16879 RMD160 c580f3e8de5be0a3338ae3f816153c1d42b4337f SHA1 4bc3f1792d3f85a96ecbf538f97c76d1de8dda4a SHA256 811314bfdf521766794650581c963b31d81c10071311e20121e4a1ca5458a51f
 EBUILD php-5.2.9-r2.ebuild 16727 RMD160 aa0e1af3e50b550111c3d1490adc9e8ed2432b34 SHA1 1e4b46b562d74e758db1ec52751419cd02333878 SHA256 7187f6feedc92c355543713cb07218a48f1cd45e9394fa6d4a00bbe7e5b3010b
-MISC ChangeLog 64640 RMD160 c1079f150346d832d3c362821c7432e2906b5922 SHA1 103ee65e5730797043ddda5b28e154ad03b7d443 SHA256 7b068168bba21acef9daa5e12f7cf97f2a1875af477885ed8ee043049196f653
-MISC metadata.xml 1494 RMD160 c8579965284d7e60e3bf12600eea425175e6c480 SHA1 24c24ff7bb2efb47c02f604f0896c99da87ffe67 SHA256 6a5df2911eff7c828d9da402914c08554b8c8752b0545a74af9ba6f8fa8f59a9
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.14 (GNU/Linux)
-
-iEYEARECAAYFAkuxIo0ACgkQkKaRLQcq0GIIQwCfTpTEml+ihNxFJ/J133DNKGnh
-gzUAoLZNIr1EKoCSrPL65DT0SsuJZd5d
-=zp8u
------END PGP SIGNATURE-----
+EBUILD php-5.3.2.ebuild 9410 RMD160 137150ee266079a66061be04ac8a43ea3ce7cb64 SHA1 6ec9d2d564da6d84f41a94624429766e566a0707 SHA256 5ef55a9a34a8e758c0e23186cec00b9edb3f8bb2063c8312cb15f1d8831bdc59
+MISC ChangeLog 65433 RMD160 5f3f00b3cfec9c6de84e6e15115d3d8b47c57741 SHA1 4b7faa34b4cfee0d75237af136016f67c3932c74 SHA256 5f1777f69693e986447d0d665fb9820b592cfaf6dcefb7637cf83801e5e7203e
+MISC metadata.xml 2185 RMD160 2e1d4afa19f7370b62080f3f62bc0f8e525b82bd SHA1 2b758e52eb1e1130fffe162e6cd2122deaf18bf3 SHA256 8a8be20f80edd56dd9f16b90f4ff91fde426b05861e737750664223801e2c667
index a8254359fa0c7004c60cddbcfc512d1ebdbfa8b0..7ec8739cf83750d5ace419f59646036fd4112436 100644 (file)
@@ -6,12 +6,8 @@
 
        # 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
+               AddHandler application/x-httpd-php .php .php5 .phtml
+               AddHandler application/x-httpd-php-source .phps
        </IfModule>
 
        DirectoryIndex index.php index.phtml
index 710e21136b3a7a2a6691fcfa19ff908e051bb421..7ec8739cf83750d5ace419f59646036fd4112436 100644 (file)
@@ -6,10 +6,8 @@
 
        # 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
+               AddHandler application/x-httpd-php .php .php5 .phtml
+               AddHandler application/x-httpd-php-source .phps
        </IfModule>
 
        DirectoryIndex index.php index.phtml
diff --git a/dev-lang/php/files/eblits/common-v1.eblit b/dev-lang/php/files/eblits/common-v1.eblit
new file mode 100644 (file)
index 0000000..56ec510
--- /dev/null
@@ -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/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
new file mode 100644 (file)
index 0000000..519a7c9
--- /dev/null
@@ -0,0 +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.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/pkg_postinst-v1.eblit b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
new file mode 100644 (file)
index 0000000..3441735
--- /dev/null
@@ -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/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_setup-v1.eblit b/dev-lang/php/files/eblits/pkg_setup-v1.eblit
new file mode 100644 (file)
index 0000000..05aa23b
--- /dev/null
@@ -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/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/src_compile-v1.eblit b/dev-lang/php/files/eblits/src_compile-v1.eblit
new file mode 100644 (file)
index 0000000..dbbba43
--- /dev/null
@@ -0,0 +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.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-src_compile() {
+       SAPIS="${WORKDIR}/sapis"
+
+       if use cli ; then
+               php_sapi_build cli
+               cp sapi/cli/php "${SAPIS}/cli/" \
+                       || die "Unable to copy cli SAPI"
+       fi
+
+       if use cgi ; then
+               php_sapi_build cgi
+               cp sapi/cgi/php-cgi "${SAPIS}/cgi/" \
+                       || die "Unable to copy cgi SAPI"
+       fi
+
+       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() {
+       local sapi="$1"
+       php_set_ini_dir ${sapi}
+
+       mkdir -p "${SAPIS}/${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
new file mode 100644 (file)
index 0000000..40423e1
--- /dev/null
@@ -0,0 +1,87 @@
+# 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.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-src_compile() {
+       SAPI_DIR="${WORKDIR}/sapis"
+       local is_first_sapi=1
+
+       for sapi in ${SAPIS} ; do
+               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() {
+       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-v1.eblit b/dev-lang/php/files/eblits/src_configure-v1.eblit
new file mode 100644 (file)
index 0000000..60d41f4
--- /dev/null
@@ -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/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_install-v1.eblit b/dev-lang/php/files/eblits/src_install-v1.eblit
new file mode 100644 (file)
index 0000000..6ee2bf8
--- /dev/null
@@ -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/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
new file mode 100644 (file)
index 0000000..e592109
--- /dev/null
@@ -0,0 +1,115 @@
+# 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.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}
+
+       local sapi="", file=""
+
+       for sapi in ${SAPIS}; do
+               if use "${sapi}" ; then
+                       einfo "Installing 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/modules/"
+                                       newins "${file}" "${file/*\/}"
+                               else
+                                       dolib.so "${file}" || die "Unable to install ${sapi} sapi"
+                               fi
+                       else
+                               dobin "${file}" || die "Unable to install ${sapi} sapi"
+                       fi
+
+                       php_install_ini "${sapi}"
+               fi
+       done
+
+       # 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
+
+       # 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
+}
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 (file)
index 0000000..25987e1
--- /dev/null
@@ -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/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_test-v1.eblit b/dev-lang/php/files/eblits/src_test-v1.eblit
new file mode 100644 (file)
index 0000000..5196c87
--- /dev/null
@@ -0,0 +1,54 @@
+# 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.1 2010/05/27 23:05:04 mabi Exp $
+
+eblit-php-src_test() {
+       vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+       if [[ ! -x "${S}/sapi/cli/php" ]] ; then
+               ewarn "Test phase requires USE=cli, skipping"
+               return
+       else
+               export TEST_PHP_EXECUTABLE="${S}/sapi/cli/php"
+       fi
+
+       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}" \
+               "${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
+       done
+
+       local failed="$(find -name '*.out')"
+       if [[ ${failed} != "" ]] ; then
+               ewarn "The following test cases failed unexpectedly:"
+               for name in ${failed}; do
+                       ewarn "  ${name/.out/}"
+               done
+       else
+               einfo "No unexpected test failures, all fine"
+       fi
+
+       if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+               local passed=""
+               for name in ${EXPECTED_TEST_FAILURES}; do
+                       [[ -f "${name}.diff" ]] && continue
+                       passed="${passed} ${name}"
+               done
+               if [[ ${passed} != "" ]] ; then
+                       einfo "The following test cases passed unexpectedly:"
+                       for name in ${passed}; do
+                               ewarn "  ${passed}"
+                       done
+               else
+                       einfo "None of the known-to-fail tests passed, all fine"
+               fi
+       fi
+}
+
+
index 57468d418703ab2280e4ab36a3bdfdbf7cc8a3a2..09a50059bb3bfdd226e6a1015f71d84a1f05ef81 100644 (file)
@@ -6,17 +6,25 @@
                <flag name='cli'>Enable CLI SAPI</flag>
                <flag name='concurrentmodphp'>Make it possible to load both mod_php4 and mod_php5 into the same Apache2 instance (experimental)</flag>
                <flag name='discard-path'>Switch on common security setting for CGI SAPI</flag>
+               <flag name='embed'>Enable embed SAPI</flag>
+               <flag name='enchant'>Add supports Enchant spelling library.</flag>
                <flag name='fastbuild'>Build PHP quicker (experimental)</flag>
                <flag name='fdftk'>Add supports for Adobe's FDF toolkit.</flag>
+               <flag name='fileinfo'>Add fileinfo extension support</flag>
                <flag name='filter'>Add filter extension support</flag>
                <flag name='force-cgi-redirect'>Switch on common security setting for CGI SAPI</flag>
                <flag name='hash'>Enable the hash extension</flag>
+               <flag name='intl'>Enables the intl extension for extended internalization support</flag>
                <flag name='java-external'>Use the external java extension rather than the bundled one</flag>
                <flag name='json'>Enable JSON support</flag>
                <flag name='ldap-sasl'>Add SASL support for the PHP LDAP extension</flag>
+               <flag name='mysqlnd'>Use native driver for mysql, mysqli, PDO_Mysql</flag>
+               <flag name='pcre'>Adds support for Perl Compatible Regular Expressions  (deprecated: always "on" in php 5.3)</flag>
                <flag name='pic'>Force shared modules to build as PIC on x86 (speed tradeoff with memory usage)</flag>
                <flag name='pdo'>Enable the bundled PDO extensions</flag>
-               <flag name='reflection'>Enable the reflection extension (Reflection API)</flag>
+               <flag name='phar'>Enables the phar extension to provide phar archive support</flag>
+               <flag name='reflection'>Enable the reflection extension (Reflection API) (deprecated: always "on" in php 5.3)</flag>
+               <flag name='spl'>Adds support for the Standard PHP Library (deprecated: always "on" in php 5.3)</flag>
                <flag name='suhosin'>Add Suhosin support (patch and extension from http://www.suhosin.org/)</flag>
                <flag name='xmlreader'>Enable XMLReader support</flag>
                <flag name='xmlwriter'>Enable XMLWriter support</flag>
diff --git a/dev-lang/php/php-5.3.2.ebuild b/dev-lang/php/php-5.3.2.ebuild
new file mode 100644 (file)
index 0000000..116294e
--- /dev/null
@@ -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/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