@NiLuJe, also you should be able to remove all xdg/mime/desktop hacks due to
https://github.com/kovidgoyal/calibre/pull/988
And python-html2text at least is definitely a missing dependency (and beatifulsoup3 is an outdated one as Kovid noted). I don't know if Gentoo builds run in a minimal chroot like Arch Linux ones do, which tends to discover missing dependencies

but either way, you should run the testsuite as it will check for both explicitly. The minimal chroot build would ensure that an unspecified dep pulled in by other packages on the system would produce failures.
Also yes, you should probably use a system mathjax, see e.g.
https://git.archlinux.org/svntogit/c...es/calibre#n69
But you might want a package for
https://www.archlinux.org/packages/c...apydscript-ng/ as it will dramatically speed up building all .pyj, and you do need to regenerate the server javascript.