The ebuild sets a wrong LDPATH (except for x86) for postgresql. E.g. I couldn't install postfix with postgres flag. Reproducible: Always
Created attachment 266857 [details, diff] fix the LDPATH This is how I solved the problem.
*** This bug has been marked as a duplicate of bug 359867 ***