Created attachment 429878 [details]
Attempting to build media-libs/cogl on a system with wayland and without xorg-server or (most) X libraries, I noticed that the dependencies for cogl were a little off. I will attach an ebuild with the following changes:
* Add an "X" use flag
* Make some dependencies only required if the X use flag is set, to match configure
* Only pass --enable-xlib-egl-platform to configure if both X and gles2 use flags are set
* Make the opengl use flag depend on the X use flag (cogl also supports opengl with quartz or WGL, but our ebuild doesn't support those)
* Make the kms use flag depend on the egl use flag, to match what configure claims.
This builds and installs on a system without some of those X libraries, and clutter installs on top of it. I have not yet gotten to a point where I can attempt running it. I also have not tested the ebuild on a "normal" system that does have X.
This has not been done yet because clutter & co needed extensive work and testing to get to properly support disabling X dependencies and have correct forward and reverse dependencies.
We do intend to fix this but it will probably enter the tree with Gnome 3.22. In the mean time, could you refresh your patch and attach it to this report as a unified patch ?