Created attachment 286983 [details, diff]
It's caused by src/graphic/surface.cpp expecting png.h to include zlib.h too which was changed in libpng-1.5.
Attached patch fixes this by including zlib.h explicitly.
in portage. thanks for the bug report and patch.
*** Bug 383815 has been marked as a duplicate of this bug. ***