When I tried to emerge php it tried emerging pdflib as a dependency but died complaining that if --with-pnglib is given then --with-zlib must also be given. I edited the ebuild script and placed --with-zlib under --with-pnglib under the econf section. I re-ran emereg php and the build worked fine. Just thought you would want to know. pdflib-4.0.1-r3 Thanks Nicholas
fixed in portage thanks for the catch