This package fails to build with LDFLAGS="-Wl,--as-needed" because of wrong order of the linker arguments, and unresolved symbols in libPgm2asc.a. The attached patch fixes that. Note that i don't use the "gtk" flag on this package (no GTK+-1.2 here), so i don't know whether the frontend compiles.
Created attachment 86361 [details, diff] files/gocr-0.40-as-needed.patch
Created attachment 86362 [details, diff] gocr-0.40-ebuild.patch
Patch looks fine for me.
Added to CVS in gocr-0.40-r1 Thanks for supplying the patch! Just a quick remark: remember to use || die in your ebuilds on patches for style.