When installing this ebuild ther eis no checking checking for the png USE flag being set on media-libs/gd and dev-perl/GD.
Please, clarify what do you mean, including some error messages.
dev-perl/GDGraph depends on media-libs/gd. By default the dspam-web bits tries to create PNG files, but www-apps/dspam-web doesn't check if media-libs/gd is built with png support, and thus the dev-perl/GDGraph package won't build properly and this crashing the building of www-apps/dspam-web. Basically pkg_config (or prior to that) for www-apps/dspam-web should check the media-libs/gd is built with the png USE-flag set.