There is no USE-flag (or alternative) available to compile php with static zlib library. Everey emerge results in shared library useage.
This is a problem because of a specific issue regarding PHP and Flash files:
when accessing properties of a Flash file server response is:
The image is a compressed SWF file, but you do not have a static version
of the zlib extension enabled."
(see e.g. http://www.mombu.com/php/php/t-36753-cant-get-size-of-swf-images-because-zlib-is-missing-936672.html)
It is a well-known problem with a well-known solution (work-around?): compile zlib statically with PHP.
On gentoo however this doesn't seem possible. I've tried adding USE-flag static but that doesn't help.
Steps to Reproduce:
1. ensure you have zlib and static in your USE-flags
2. emerge -av dev-lang/php
php-5.2.4_pre200708051230-r2 gets emerged succesfully.
check the emerge output: GCC compiles zlib=shared
zlib should be compiled static.
IMHO it would be better to introduce a PHP-specific use-flag: e.g. zlib-static.
It's no advisable to compile every library statically.
Remove sharedext from your USE flags if you need this.
Tried this in a recompile and it works!!
Apparantly in my search for the solution I oversaw this flag. Thanx for the quick help.