emacs-cvs ebuild applies patches in src_compile instead of in src_unpack. This
means that if one uses the ebuild command (as opposed to emerge), there can be
problems where the code is patched twice.
I think the problem could be reproduced like this:
ebuild emacs-cvs-xx.xx.ebuild unpack
ebuild emacs-cvs-xx.xx.ebuild compile (and then ctrl-c part way through the
ebuild emacs-cvs-xx.xx.ebuild compile (will fail because the patches have
already been applied)
The ebuilds should have a src_pack() which calls cvs_src_pack() (from
cvs.eclass) and then uses epatch. I tried to do but was unsuccessful---I don't
know enough about eclasses.
Fixed in emacs-cvs-22.0.50-r1 (currently masked).