User:ManDay/Deprecating the virtual OpenGL ebuild

This page discusses the resolution of

Current situation and historical context
Packages which want to use Khronos' OpenGL rendering API also need an API for creating a rendering context in the windowing system. The API for creating a rendering context specifically for X11 is called GLX and another, more generic API for Wayland and other windowing systems is called EGL.

Historically, Mesa provided its implementation of OpenGL and GLX in a single library called libGL. Since the OpenGL functionality was thereby glued to X11 functionality, it was either libGL with OpenGL and GLX - and therefore dependence on X11 libraries - or nothing. There was no support for (full) OpenGL on X11-free systems, such as those running pure Wayland.

Since the emergence of GlVnd, an abstraction to provide OpenGL regardless of which implementation - such as Mesa - runs behind it, this is no longer true. OpenGL and GLX are now provided though GlVnd's abstraction as separate pieces, called libOpenGL and libGLX, respectively.

Resulting problems

 * 1) Currently, many packages which require in any, nonspecific way OpenGL or GLX depend on   without finer distinction. , to satisfy all possible combinations, therefore pulls in   to guarantee the availability of GLX but, on the downside, requires X11, although it is often not needed.
 * 2) Further,  's original purpose to abstract away different OpenGL implementations is deprecated by GlVnd, which also extends to the abstraction of GLX, EGL, and GLES.

Resolution
Both problems can be adressed simultaneously. as a non-configurable middleman will be depreated in favour of depending on, which can be configured through USE-flags according to the depender's need of OpenGL, GLES, GLX, and EGL.

What to do if my ebuild depends on ?

 * 1) Determine against which libraries the software in your ebuild is linked and depend on   accordingly. If you do not know this off hand, you can use.
 * 2) * libGL or possibly libGLX →
 * 3) * libOpenGL →
 * 4) If your ebuild can be configured for with or without support for X or Wayland, reflect the USE-Flag conditionally, e.g..
 * 5) Remove the dependency on