The attached patch applied over current ebuild adds three flags to libtheora
ebuild: encode pic and doc.
With the first is possible to build libtheora with only the decoder instead of
both encoder and decoder (which is probably the most used setup).
The second is the usual one.
The third make optional the build of documentation, with optional build
dependency on doxygen.
This way it won't create the doxygen documentation if it's not requested (to
achieve this I used the usual autoconf cache trick).
I also disabled the dependency tracking, as gentoo's are always one-time
builds.
HTH, Diego