To actually use Apache-Gallery it requires (at least) media-libs/imlib2, dev-perl/ImageInfo and dev-perl/ImageSize. Other dependencies I haven't actually checked for runtime required-ness.
Additionally, without any useflags, imlib2 is not strictly broken, but relatively useless to Apache-Gallery.
Steps to Reproduce:
1. emerge --buildpkg Apache-Gallery
2. move packages to other computer
3. emerge -k Apache-Gallery
The mentioned required packages are not installed.
Apache-Gallery RDEPENDs on these packages, so it can be actually used.
Do you want to add a patch, maybe bump the ebuild and proxy-maintain it?
Has been fixed in the meantime.