It seems bug 480862 also affects dev-texlive/texlive-latex-2012, because I get the same problem from that bug. Trying to build the docs / the pdf via latex, it takes a long time resulting in a 2 gigabyte logfile from latex. That will also get output into build.log from the amd64 build and tee'd into the real build.log. That resulted in my /var/tmp/portage-tmpfs filling up and an abort of the build. Just removing the "has_version '>=dev-texlive/texlive-latex-2013'" from the fix for #480862 (epatch "${FILESDIR}/${P}-latex_hacks.patch") works for me, including an correctly looking /usr/share/doc/libcaca-dev/pdf/libcaca.pdf
This horrible mess was just pushed out to stable.
I've got the same problem with the same version of libcaca on two different machines, both amd64.
+ 01 Aug 2014; Samuli Suominen <ssuominen@gentoo.org> + libcaca-0.99_beta18-r2.ebuild: + Use -latex_hacks.patch also with =dev-texlive/texlive-latex-2012* wrt #517474 + by Torsten Kaiser