The line dolib.so lib${PN}.so* || die should be dolib.so lib${PN}.so.* || die With the current line, emerge dies with a file exists error. The cgcode build is creating the files libcgcode.so and libcgcode.so.1.0, which are identical. The build system is expecting to create symlinks for libcgcode.so. So the change to the dolib.so line makes the copy just copy libcgcode.so.1.0 and then the symlink works.
+*cgcode-1.0-r1 (21 Nov 2011) + + 21 Nov 2011; Justin Lecher <jlec@gentoo.org> +cgcode-1.0-r1.ebuild, + metadata.xml: + Install correct symlink for libs, #386227 +