summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Markus With <olemarkus@gentoo.org>2012-11-23 14:45:43 +0000
committerOle Markus With <olemarkus@gentoo.org>2012-11-23 14:45:43 +0000
commit137e34b02e3df74e373e75e5cd14e943f4a7bf81 (patch)
tree0b57f8405ff5c0ac4c8d84120fb67b96236afe7c /dev-lang
parentVersion bump, drop old (diff)
downloadgentoo-2-137e34b02e3df74e373e75e5cd14e943f4a7bf81.tar.gz
gentoo-2-137e34b02e3df74e373e75e5cd14e943f4a7bf81.tar.bz2
gentoo-2-137e34b02e3df74e373e75e5cd14e943f4a7bf81.zip
Version bumps
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/php/Manifest24
-rw-r--r--dev-lang/php/php-5.3.19.ebuild912
-rw-r--r--dev-lang/php/php-5.4.9.ebuild864
-rw-r--r--dev-lang/php/php-5.5.0_alpha1.ebuild12
4 files changed, 1790 insertions, 22 deletions
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
index b283948c736c..c9d62c521a38 100644
--- a/dev-lang/php/Manifest
+++ b/dev-lang/php/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
AUX 20php5-envd 145 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4 SHA512 581aa86479e3cd584ee1bc6dc6d4a135fe8ec343fe5519566d728d81f7018cfb23658bd0c0368951d380982c75adbb4f45acf3c146868aaf4e4ec8e9f2fad1ce WHIRLPOOL b9cfe0e80ba437bbc6008223c268bdafcde306ba8083dce96815804f3e1ec0937706e0db091149785a0076a6c6eaab8f7dff28578b706e84b4bb4e67850a4ecd
AUX 70_mod_php5.conf-apache2 348 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c SHA512 c74ec09c3c4124a15e14ece4bb769bb889466160cc0878ca3d55d5afc30fd4c05673c40428b75be669f72e82ba29f60ed19767caca77bba8adc12aae1c83f6f3 WHIRLPOOL fd503ec904a3853b90f8f4cc2042cf9014fdb1383a508d22e680559009b5b1e0beb5a09909a393e53868a64712c63e35642915787fa4176af07cb594adedb441
AUX eblits/common-v2.eblit 386 SHA256 16cace03f7c6efdbc5baceb56eb3f3af1db3292e3f49b0627c8392d630360839 SHA512 d312235445e550f415242dca28cc34afe5cc9a95a74aadce46b48497fa98fcf58d9f6b7e0c3693bd8afb927f3291e11988ec0cbce7b51a08de798ea42126d783 WHIRLPOOL 5caf97f31c6f780b8e1c84539820f72deee66ed6ef8f88da2dcb924561d8e94d9701a8849ba9188f30c31e99146c978e8a6546aad878e720fa672f037fd80441
@@ -21,31 +18,26 @@ AUX php-fpm-r4.init 1157 SHA256 37e34461babfb5881169f9729fbdde7d4aba533f123e2c48
AUX php5-ldvs 22 SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79 SHA512 689a0a12b3527741d2e47870c125e93be73a127e5e798c4b685ccb11653be5a8615faf3178c71a6346fe264d3c4ec76601bc05878fef67b9dbd2e45be59a344d WHIRLPOOL b24f193a1067f699c8efb199ba4e3f1fdd22c13dff98655206b30072ce8c8035fb4ed9288f694856f9978bd9935d3a5589cd968316920e712779c45b44897634
DIST php-5.3.15.tar.bz2 11307865 SHA256 f9b725659e64228a60883bd134afe1f638900b6b8fa93ba98053095b0892f1ef SHA512 40334a3c7957637506d265fc9c534a8e35dabd83683d30094f1b48b69e4b20a40715d0b4ad98fb8467e91f74f878fb148b910e7d0a5df22ee3e601b4228c8180 WHIRLPOOL 7b8fee9c90a9af88d95b5ee7877081b0030cee0ccc2d431ddb97c3bd857624c1124aa2109b709334387e4b073ce3bbf3297bd13c1d805791fb41cb226faac0df
DIST php-5.3.18.tar.bz2 11335289 SHA256 f065deecb78abb8ef101e1098866024af4ca10cb30139608c9a18e40236f1a2f SHA512 39b9532b65b86737ad825c76c42551840707c7eee311af7307bfbb1a41f7533ff6afec07fc9c3d42c8684aa08d814118ae3ff020b25fab1faaf1229e0ab9568d WHIRLPOOL 480916325f4e05ed4f7d4b40a62c6c8966111abdab687a74772749f9291991797106b39d74b9a00984eeb70b28096059032c77439d38a2e1467f2362e46ebd79
+DIST php-5.3.19.tar.bz2 11359557 SHA256 814ce55b950158c4ddadbcd0b2d7d8cb4b570de4a29b9db021020594e2469fd6 SHA512 917dc765c917b8e33bc60afe528ec5477995970cb1fc45325c0abf5ebf88b35741a97c3b51b53491695cb7e50acc15ac1731eb040517e6a67703ddd603881a39 WHIRLPOOL ca90bb1f3e45839f2d6797e0825613ddec869f2d8007570f2c9056d16e22d3c50b0a0560244ede75ae014b4b98df5efa774e397e82fb18e8f16a45cb08eb4723
DIST php-5.4.5.tar.bz2 11011780 SHA256 7af9a1b6b1653f15d679c8e505b24c4dc2dc2a8d55521a142a7f523d06ae6ad9 SHA512 568144b57ecf8ceadbeb33a2071bae68a58e60624084fec4e6b11f96c94ad2bc136a0db9a8d8a1b1663a7baf8a0a97dacf35578cfde0642ee0cc8b047c177866 WHIRLPOOL ecb8c8c35cf896db94c5f5c9a673fbabd40ba71511fd651ac52f2b6dd25070dc5236854149f51e550f58aa26214693d0875cad4bd6bbbb820062143eac27d71d
DIST php-5.4.6.tar.bz2 11026249 SHA256 031181ef9167b31ce1dad9146b7a1a6151da44b3bafc0756fb7c5794b24ac0f5 SHA512 bf6c377999538c815ddc149ed7f8ba5feb08e3ae4e2f1abe559a6ad2a9ce6a7205ec62345640c1f8498d3ddea62bc997f31f8f77caca6a483b123551f1695cf1 WHIRLPOOL e7d0924b0a9c0d85e257be0cf0c314cda19d6da02f02111562a47873ab72b0ea20419e4c25b29c46cfc3df0aa1a30f767d88f5131456c36af60f71b47bcf76fe
DIST php-5.4.8.tar.bz2 11056057 SHA256 d02810b7949938ee7190116e7483e1a06b3fa8373d3bbc0ea65a41265afce79f SHA512 e04ee08e7d1b6f80183846206d02576ad22ea3f41e956bab970344b195f1d2267f1ff69439988cea7084c18576d7855383e48094bdb7684d43cb0f78e4a5e7b8 WHIRLPOOL 963153d85236bd105cbf11a89dd0db11e590cc292bb499abaa9271dbb47eeb124ef011af9561cb5569840d32130934c70cd8ebb4d619147892044ab8c3be09bd
+DIST php-5.4.9.tar.bz2 11144400 SHA256 c0649971cfa9723701d085e227376374569689689b8421e4dcfac56c2f6fcac5 SHA512 70b42e6f160aadc6a0d0541617acf0decd85bfe18db88bb524dd479dd4a1c1b63a519eb116eb594a542b90b627494a1a3388a616350ea6c4203abce325a1edb5 WHIRLPOOL 9d27c3e6ebbb8b8f95e9c21a62363a3e6a43ff12eae279372204c281513fb7f1625a0da779d84024ef4410f6fd403c9fc9812f0f2d148f0d137fe71f0b7007f7
DIST php-5.5.0alpha1.tar.bz2 11572429 SHA256 8dd5b13fd5372b613722d1814ad2fbd733ea3b59866f078610ca9a73b3f10994 SHA512 dcf99740ae3cff53758e78f41f10bc32e64c3ac4bffe784a9ae3ac957f216402d744920ce253124914411b0ae936684a86fd965a0531bc038553b31718840c8d WHIRLPOOL 397d4ca4233041b66e3073640a6daf5b5c07d0daf72f58493b1befd0fdb176f4f8a2d408676708dd4bcc7ae4270fd5abf1a0e71f8c060cef5543bed1effdf51c
+DIST php-patchset-5.3-r0.tar.bz2 7368 SHA256 1a67b34a681dea33ea38f0ffc32b70a78b4c5dc1c3603d1bba31bb130d803ef7 SHA512 765b0cf56a3e63ded4ad1d1ba67567881ad06bdc2814cc07004fa338f38fd69078819c7463d2c55e00805c8f33fa925b94228bf7bc3d223acc33c6cff540024c WHIRLPOOL 59e18b33e11d968fac2a4571173121bf8141bb2f1eab62192e15bc59e351d3ab973f04343b447681d8a2adddf0844edb8a481d027bfc14c7e1fd8222169094ec
DIST php-patchset-5.3.15-r0.tar.bz2 7357 SHA256 df239b883d40386cf98e44bd107a36ebcb34554058c0857748c5715ba2dcb1e8 SHA512 c1bd1933a2119037c38fbb46fc0799dd0a9c5acaf11fc4d8d885f644a429350ddcf170bb74e91bfa11139e35b52c73c5db60a2783ab0b5113c675373699c11d1 WHIRLPOOL 87a2993c0c9573241f73e1fa3f0e6bcaee39df6f4ce5501299ea84731ef15eeca05e3d04948c92cf278df6c45edc3f580c28a99667f22d377b1566662c67ff9f
DIST php-patchset-5.3.18-r0.tar.bz2 7360 SHA256 8e7d449a4ab50dd8da241f2992fdaee012eafe4da6c66609231cff68d84c5c9f SHA512 625f456649964a959c7aa399c6c4fbeff8dd0b45372153819d42b447069e78cce99b4b6c30d89a64b211d230e17ef28e99d5e3b9055dd59e19b8103337de8d09 WHIRLPOOL cb1ae11173fa6d0a0f26a313d036f6f2109bc704531c5db76a584cc243b5f16ccff3c5e0c943196b5f13a7603e222c2f2c0eb393d754faf66fa5d54e5f627fde
DIST php-patchset-5.4-2.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
-DIST php-patchset-5.5-0.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
+DIST php-patchset-5.4-r2.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
+DIST php-patchset-5.5-r0.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
DIST suhosin-patch-5.3.9-0.9.10.patch.gz 40967 SHA256 4438caeab0a10c6c94aee9f7eaa703f5799f97d4e0579f43a947bb7314e38317 SHA512 98c56d41fac123626cbd1bcf4ca8afba5a9a960fd58a60e08c91a68cab7589162c4f9e1b0c39abaf173775cb63091a04c4224ee278410ec0afdbe9f3cf05f322 WHIRLPOOL f551823324919cc14cc5f0b4dc2ed75e292fcb2dbe3a34b2c954d4f3cd8ff27937b7a8a0e5665ddc4e737908d2530abf3c61397b040dd6aadcc31163d762b42e
EBUILD php-5.3.15.ebuild 10731 SHA256 f3dd41dc3e5cf6d6d0247b9bfe2aa4a9f47ac98061dd4424da7aea5dc006280f SHA512 12849addd9a5c9dc7e21405d6918b375c805fd5457355733c163c796cc927330c31e981ef2ad9f4c1e50bead93abdfe4ff9e36ebd7cc040c44d6ec7a7851de62 WHIRLPOOL b3845ca35cd00a5b6645d76ec7f82ca4e3d4c29eecb88111eef9b8294d15641faa091630fb4c623a79b61e7edcf7c2baace78b0d4d86b6e448d205cc79e803df
EBUILD php-5.3.18.ebuild 24987 SHA256 2302e976385d49a1f86841837683dbbb9fffe44d942dd13be46e31f982de8fb4 SHA512 d09f08231a01437784d71bc3e4b791e6dc6128178c7a94ef307368b20ab22cb24c6e49d5426f35d6d00aefeb65e6279006a657619bb749eba5be8c43664873a9 WHIRLPOOL d4834f6a25dc38545e637b620b45b60306421e27d5ce99ad21c14c507104619231acc65b4f7519bd7a454fefb1793ab083d123b26f84f4652fb9ceeab188497d
+EBUILD php-5.3.19.ebuild 24729 SHA256 b6bd8e081ad1256d5bab58b79e120c17312b3e8fe7b4ec72f591969a3895779a SHA512 7458af153f60ec2caa344348504defd45eafc58917174ce0e3a429edf8188290523e0ef598c2af06e7f5474e4ad00b1a4c5d340923c9f540c9a7b4e31dfd3852 WHIRLPOOL 2e37ebc1980dc9d48feb71c72a6d6455d3f219ca4c65b2de52528a70e41f4f4e2200b743e183ba7c9d30bdb8cd0435ddf450322095311e6f2859f98ead420e1d
EBUILD php-5.4.5.ebuild 10449 SHA256 fe1ccc25a397885386c27354bf3c39033b0d06c1d53a442eedd06b9c71ca8e4e SHA512 39db961344fac186d5dec534d11d47392f389100e7a9850133065fe0a77077333182f0c4570f3b0c19a639a9a3d41c84fc5c461326431c5d4df6cf53b56947ff WHIRLPOOL 69ca656b6d12e3a14db0d8e9fa79b36f82448e2f1987728f9d342aa10de81ac69c57035467a9b273910896df3f547fc385c748352b094fce1a04ff0f1c5aa730
EBUILD php-5.4.6.ebuild 10445 SHA256 ecb7aa8c58e7b83789e462609a934215a3d0283df008b8371acad3b5b7cba2af SHA512 efebb61d873e60f3828c8a16c246c766c51b71e6db434b97e27bd938ec3c8a85926ef2a48212446290fa1f6f13572ded0dc717f4f9c249810f18d649962ee9af WHIRLPOOL 4490ac8df5e1758c15acef77e48ce4df207e82c9bd350afeef4ecd1c7539faeeafb090c626c802ec475398013cb86ac0117e5a1de813c59846f384e5fba5a5b3
EBUILD php-5.4.8.ebuild 24452 SHA256 cb5376eb5d3917d1c9f2f2014d9403544a2ea72c115a812ed67d5928862538d6 SHA512 8619aa6e40b4c2afd9e9148790396798c22c873eed2e5e89e54ad08ff0df0d3b2050f7f89f19510ea1073178d1ec02d6d2b69808dc0a32ba96b692109b6361c9 WHIRLPOOL 50ac2248d00fef9f7da315df467d413c251d3d0ab6dafd7e4a3f36f5ad43a01efc908d4c98b3067e8bcdf30e91d2a9e0e40f736b7b1ce88ad7f605ea4a700738
-EBUILD php-5.5.0_alpha1.ebuild 24484 SHA256 6047c832a92d2802f51d3c6ae6eb439e11a13cdad3d0d2dd8ae5f88bee4d3d1d SHA512 f20b523e951db67db6ec86e6f5d8b5ee0642f7fd5a6c430f6cf834e5a699896316e2f8c0431a0d089f56a53187500707e0b14767d9beb27a868f6d4e156a0fec WHIRLPOOL 9d33395cd4388f8fad7722b88a62b65f3c229f8d85577bd0339f682cc06aea505ec39fa6ed2eb7967c10f0a326eaa623b73ebbc3fe0fb96b47baeef410164eb6
+EBUILD php-5.4.9.ebuild 24171 SHA256 f8168757aa85d7840c3f4ca7af8a5c34d8e8bf321ce6b94c4ba5594486ec0867 SHA512 73240ee11a8cb4e1a2b5622f76c3c8eba598fc181cb8bb0ca65827ecf2dbd32fba58b99b6514a4ab69fade5b298ce644315ee6b13572abdc0c5345a3cb93d6f4 WHIRLPOOL 23ad4c4e4efdeefbb6b1d9a2c9bca89e34c3cdfe2c6f1e1c33ea4abac5288680b17debf28552bc285fe745330dbe5d516b9a0618c4b051611c278afddc546d27
+EBUILD php-5.5.0_alpha1.ebuild 24483 SHA256 3a07b38ed53bf338906439630df7913356a6b8000bd0436d291e7110b7eb7bd6 SHA512 f1a69747bdd970e478dabe98fa1a64eec748b89546d7e91823cb9caba5ce2b7cd508f06b2331c18fb0d19ad035996586ded14a157078db755bd51740e6b76081 WHIRLPOOL dbaa9e3bad5d3a70c45dade97e68a013d48d6a43b10a59d082c163983e3a8e02d29abeac08e1d83fb4474e444a690dc28d71fdc87b5d8998aa003933f285b9d8
MISC ChangeLog 106194 SHA256 24d2d5adcdc119479370ce183520f007a73dfe1d5ac113837e47f642f3e3b88b SHA512 38a3530fe92ca20aced659d69046f3f31bf39f4d375c9634bfa87c5d41ea76aa35068db33db5b627a96bbc41ecd167cf121bbc78dafec9dd1baea45c81b5a9aa WHIRLPOOL c2cc78d60d5c71a15979db6cfacd8ccacb3d0d9a6053177968c845c7d17dbaf4691a3e0d7139240a44346877389b4cf56cf63d9b872d19c5107e027580399ffa
MISC metadata.xml 1628 SHA256 e828635c903aec3fdb71705b49a1f95da4bdb6b7109a032fbf2a92960b6814b5 SHA512 c2559714ff99860cd9e1c0381632fc7920866722ee0f1dbae9ea4b167b8e0e08ab1ac33662d9bdbcf47117bb7e78c21adeddf49839c64b9aa20403688db2ac40 WHIRLPOOL 3dcd68f57cc2c72535940cf87ac124de2227bfdf8696bbd28c39233bede8335da55080d51711be0d7d2b71e5a32c41c40b32bc68e50bb8ca25eedf1599d5cc77
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
-
-iQEcBAEBCAAGBQJQpN6VAAoJEGurSuXEqSv1+fMH/itXbjt1UWPhA/v4bRckIncG
-5OGQu0QDHmqFuxcRA1gxNkX9yKEWgpcxBwkVjg5A7Kqnrv94eNQp/fEQhj3OstgR
-QF+M+oFnKJRN3svVtmUIsVRENPoJnIogvm2KD7rL5n2A553tJhlrB7z2uvTndon7
-sLXhD7M1J0pt32gKMiIgFGycQ3ErpFKLPQFd/cHPngjRoL4nZukp5tc31Ed5ds8u
-kMf6TXB1wcsSPKZddZdywIq9ib/pAQNCAHZh9FoJfifZW1LMS3B0cnl54vMS0iB4
-k+iEPB5kpFKa1ljH24z6BjrjudLLvpriPZamH8dYYzQvC8R3K852xh9NiRRUqbE=
-=q8HW
------END PGP SIGNATURE-----
diff --git a/dev-lang/php/php-5.3.19.ebuild b/dev-lang/php/php-5.3.19.ebuild
new file mode 100644
index 000000000000..57b4987da314
--- /dev/null
+++ b/dev-lang/php/php-5.3.19.ebuild
@@ -0,0 +1,912 @@
+# 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.19.ebuild,v 1.1 2012/11/23 14:45:43 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 ~mips ~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)"
+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-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-${SLOT}-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"
+
+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 selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite2 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.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 )
+ sqlite2? ( =dev-db/sqlite-2* )
+ sqlite? ( >=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 ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? ( =${CATEGORY}/${PN}-${SLOT}*[unicode] )"
+
+RDEPEND="${RDEPEND} fpm? ( selinux? ( sec-policy/selinux-phpfpm ) )"
+
+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
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+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 /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|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 = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "apache2" ]] ; then
+ insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
+ "70_mod_php${PHP_MV}.conf"
+ 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#${EPREFIX}}"
+ 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#${EPREFIX}}/bin/php-fpm" "/usr/bin/php-fpm"
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-production
+
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+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}/patches/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
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ 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)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 )
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl )
+ $(use_with curlwrappers curlwrappers )
+ $(use_enable xml dom )
+ $(use_with enchant enchant /usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext )
+ $(use_with gmp gmp )
+ $(use_enable hash hash )
+ $(use_with mhash mhash )
+ $(use_with iconv iconv )
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos /usr)
+ $(use_enable xml libxml )
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt )
+ $(use_with mssql mssql )
+ $(use_with unicode onig /usr)
+ $(use_with ssl openssl )
+ $(use_with ssl openssl-dir /usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql )
+ $(use_enable posix posix )
+ $(use_with spell pspell )
+ $(use_with recode recode )
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp )
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )"
+ if version_is_at_least 5.3.16-r2; then
+ my_conf+=" $(use_with sqlite2 sqlite /usr) "
+ use sqlite2 && my_conf+=" $(use_enable unicode sqlite-utf8)"
+ else
+ my_conf+=" $(use_with sqlite sqlite /usr) "
+ use sqlite && my_conf+=" $(use_enable unicode sqlite-utf8)"
+ fi
+ my_conf+="
+ $(use_with sqlite sqlite3 /usr)
+ $(use_with sybase-ct sybase-ct /usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with tidy tidy )
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc )
+ $(use_with xsl xsl )
+ $(use_enable zip zip )
+ $(use_with zlib zlib )
+ $(use_enable debug debug )"
+
+ # 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
+ my_conf+="
+ $(use_with cdb cdb )
+ $(use_with berkdb db4 )
+ $(use_enable flatfile flatfile )
+ $(use_with gdbm gdbm )
+ $(use_enable inifile inifile )
+ $(use_with qdbm qdbm )"
+
+ # Support for the GD graphics library
+ my_conf+="
+ $(use_with truetype freetype-dir /usr)
+ $(use_with truetype t1lib /usr)
+ $(use_enable cjk gd-jis-conv )
+ $(use_with gd jpeg-dir /usr)
+ $(use_with gd png-dir /usr)
+ $(use_with xpm xpm-dir /usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd )"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap )
+ $(use_with ssl imap-ssl )"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase /usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap )
+ $(use_with ldap-sasl ldap-sasl )"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql /usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock /var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli /usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC /usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc /usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql /usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite /usr)
+ $(use_with odbc pdo-odbc unixODBC,/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline )
+ $(use_with libedit libedit )"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm )"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ 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
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # 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
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mibs/.index
+
+ SAPI_DIR="${WORKDIR}/sapis"
+
+ for sapi in ${SAPIS} ; do
+ use "${sapi}" || continue
+
+ php_sapi_build "${sapi}"
+ php_sapi_copy "${sapi}"
+ done
+}
+
+php_sapi_build() {
+ mkdir -p "${SAPI_DIR}/$1"
+
+ cd "${WORKDIR}/sapis-build/$1"
+ 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"
+ ;;
+ 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"
+ fi
+}
+
+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#${EPREFIX}}/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"
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # 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}"
+
+ 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#${EPREFIX}}/apache2/"
+ newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ 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}$(get_libname)"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ fi
+ 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}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+}
+
+src_test() {
+ vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/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}"
+
+ 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
+}
+
+#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.9.ebuild b/dev-lang/php/php-5.4.9.ebuild
new file mode 100644
index 000000000000..5c288a34574b
--- /dev/null
+++ b/dev-lang/php/php-5.4.9.ebuild
@@ -0,0 +1,864 @@
+# 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.9.ebuild,v 1.1 2012/11/23 14:45:43 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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/stas/${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-pre"
+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}-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"
+
+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 selinux +session sharedmem
+ +simplexml snmp soap sockets 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="
+ >=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-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] )"
+
+RDEPEND="${RDEPEND} fpm? ( selinux? ( sec-policy/selinux-phpfpm ) )"
+
+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
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+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 /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|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 = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "apache2" ]] ; then
+ insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
+ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
+ "70_mod_php${PHP_MV}.conf"
+ 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#${EPREFIX}}"
+ 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#${EPREFIX}}/bin/php-fpm" "/usr/bin/php-fpm"
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-production
+
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+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}/patches/opt/imap-kolab-annotations.patch"
+
+ # Change PHP branding
+ # Get the alpha/beta/rc version
+ local ver=$(get_version_component_range 4)
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-${ver}-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
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/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)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv )
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xsl xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # 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
+ my_conf+="
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 ${EPREFIX}/usr)
+ $(use_enable flatfile flatfile )
+ $(use_with gdbm gdbm ${EPREFIX}/usr)
+ $(use_enable inifile inifile )
+ $(use_with qdbm qdbm ${EPREFIX}/usr)"
+
+ # Support for the GD graphics library
+ my_conf+="
+ $(use_with truetype freetype-dir ${EPREFIX}/usr)
+ $(use_with truetype t1lib ${EPREFIX}/usr)
+ $(use_enable cjk gd-jis-conv )
+ $(use_with gd jpeg-dir ${EPREFIX}/usr)
+ $(use_with gd png-dir ${EPREFIX}/usr)
+ $(use_with xpm xpm-dir ${EPREFIX}/usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ 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=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # 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=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+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#${EPREFIX}}/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"
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # 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}"
+
+ 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#${EPREFIX}}/apache2/"
+ newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ 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}$(get_libname)"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ fi
+ 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}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+}
+
+src_test() {
+ vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/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}"
+
+ 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
+}
+
+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 ${EPREFIX}/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 ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ 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
+ 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_prerm() {
+ local sapi
+ local slot
+ for sapi in ${SAPIS}; do
+ slot=$(eselect php show $sapi 2> /dev/null)
+ slot=${slot/php/}
+ if [[ $slot == $SLOT ]]; then
+ ewarn "You have removed the active version of the $sapi SAPI"
+ ewarn "Fix the issue using \`eselect php\`"
+ fi
+ done
+}
diff --git a/dev-lang/php/php-5.5.0_alpha1.ebuild b/dev-lang/php/php-5.5.0_alpha1.ebuild
index 01befecdd0ee..e856ce37d188 100644
--- a/dev-lang/php/php-5.5.0_alpha1.ebuild
+++ b/dev-lang/php/php-5.5.0_alpha1.ebuild
@@ -1,6 +1,6 @@
# 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.5.0_alpha1.ebuild,v 1.1 2012/11/15 12:18:46 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.0_alpha1.ebuild,v 1.2 2012/11/23 14:45:43 olemarkus Exp $
EAPI=4
@@ -55,7 +55,7 @@ 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-$SLOT-${PHP_PATCHSET}.tar.bz2")"
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
PHP_FPM_INIT_VER="4"
PHP_FPM_CONF_VER="1"
@@ -107,7 +107,7 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
mssql mysql mysqlnd mysqli nls
oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
readline recode selinux +session sharedmem
- +simplexml snmp soap sockets spell sqlite3 ssl
+ +simplexml snmp soap sockets spell sqlite ssl
sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
@@ -164,7 +164,7 @@ DEPEND="
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 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
ssl? ( >=dev-libs/openssl-0.9.7 )
sybase-ct? ( dev-db/freetds )
tidy? ( app-text/htmltidy )
@@ -460,7 +460,7 @@ src_configure() {
$(use_with snmp snmp "${EPREFIX}"/usr)
$(use_enable soap soap )
$(use_enable sockets sockets )
- $(use_with sqlite3 sqlite3 "${EPREFIX}"/usr)
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
$(use_enable sysvipc sysvmsg )
$(use_enable sysvipc sysvsem )
@@ -577,7 +577,7 @@ src_configure() {
fi
my_conf+="
$(use_with postgres pdo-pgsql )
- $(use_with sqlite3 pdo-sqlite ${EPREFIX}/usr)
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
if use oci8-instant-client ; then
my_conf+="