Technically, libepoxy can run without libX11 and should, like here, where I only run pure wayland. In fact, the code allows for it (it is no RDEPEND). I was told that it was only a decision made upstream to require libX11 at configure time so that if the user wants to run epoxy ontop of X11, it will not fail. Which I find kind of backwards reasoning. If the configure script detects that the user is not on linux in the first place, it will allow them to not have X11. I suppose Gentoo could patch this in the configure script so that X is not required when it's actually superflous.
Generally, x11 project tries to avoid maintaining patches which were not accepted upstream. The best way forward would be to create a patch that makes the dependency configurable and convincing upstream to apply it.
Such a patch would be trivial. However, I was already told that upstream rejected the idea. I'm not to judge upstream's decisisions but I'd definitely appreciate it and so will probably other people without X. After all, the risk of "shooting oneself in the foot" (which is supposedly the reason for this imposed dependency) i assumed to be removed by portage USE flags.
You can use package.provided if you don't want the library that libepoxy is depending on. Also I guess upstream would accept a patch that allows disabling the configure check but still has it enabled by default.
(In reply to Cedric Sodhi from comment #2) > Such a patch would be trivial. However, I was already told that upstream > rejected the idea. Citation needed :)
Created attachment 463184 [details] libepoxy-1.4.0.ebuild Upstream's position on this changed and they now have a configure check that we can use for this. I've attached the ebuild I'm using for this. Note that this ebuild also switches to eapi 6, so there's some changes related to that also.
Thanks dolphinling. Fixed by: commit 8824c4ff99ce377f488b2a95be19809b17f6a5fd Author: Matt Turner <mattst88@gentoo.org> Date: Fri Mar 3 23:37:13 2017 -0800 media-libs/libepoxy: Add USE=X and port to EAPI=6. (available in 1.4.1)
Would have been nice to actually go through the consumers and file bugs for stuff that now need a libepoxy[X(+)] depend.
And it's already asked to be stabled too, so stable consumers will be breaking. I can't deal with it soon enough, I'll just take care of the independently reported gtk+ bug, I guess in the stable versions too then...