Historically, OpenGL was provided by libGL in Mesa, which in turn only came from GLX. Therefore, if someone wanted (full) OpenGL (as opposed to GLES) from Mesa, they needed USE=X on Mesa. Since splitting libGlVnd from Mesa, OpenGL is now provided by libOpenGL, which is decoupled from GLX. Therefore, we can have OpenGL without X11 related components. Bug 560096 added IUSE=X to Mesa to enable/disable GLX, but at the same time introduced the mesa[X] dependency into virtual/opengl with 105caec6052322f095a5ee26ae097798aa9b5a9e to make sure everyone requiring OpenGL would still get it from Mesa. However, this means effectively a dependency on GLX and thereby X11, which is uneeded in many cases where the consumer works with libOpenGl instead of libGl (e.g. media-gfx/blender). I suppose that ideally, those consumers of OpenGL which explicitly require GLX (X11 related APIs from OpenGL) would express this besides their dependence on virtual/opengl (by depending on mesa[X]) while virtual/opengl should depend on media-libs/mesa only in a way that guarantees either libGL or libOpenGL (I'm not entirely sure how/if the presence of libOpenGL is controlled in Mesa, currently). Alternatively (but I think it's the worse alternative), IUSE=X could be reflected on virtual/opengl to control its dependence on mesa[X].
Something between "closely related" and "dupe of" bug 301337.
Created attachment 865594 [details, diff] Patch for opengl-7.0-r2.ebuild Allows virtual/opengl and media-libs/mesa to be built without X USE flag.
(In reply to junkmailnotread from comment #2) > Created attachment 865594 [details, diff] [details, diff] > Patch for opengl-7.0-r2.ebuild > > Allows virtual/opengl and media-libs/mesa to be built without X USE flag. It's not something that can just be changed on virtual/opengl without extra work. Some revdeps need libglvnd[X] and some others don't -- and then mesa[X] at least guarantee libglvnd is built with USE=X for now preventing anything from breaking. So if add a USE=X, would still need to check all revdeps for which ones need virtual/opengl[X] and which don't. Given little reason for this virtual nowadays, virtual/opengl is slowly getting replaced by libglvnd or libglvnd[X] (as needed) in ebuilds though.
Understood. I encountered this bug in my attempt to build a pure Wayland desktop. This patch was my path of least resistance.
OP did write up a plan at https://wiki.gentoo.org/wiki/User:ManDay/Deprecating_the_virtual_OpenGL_ebuild. Just someone has to start executing it.
Something that's always made me hesitate is the presence of dev-util/mingw64-runtime in the virtual. That wasn't acknowledged in the plan. Maybe we don't care because we don't have Windows profiles anymore, although I was a little sad about them being removed. I'm not even sure if that dependency made sense though.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6208af8875d0e69b7b8bb9f2b7497f0cc858c438 commit 6208af8875d0e69b7b8bb9f2b7497f0cc858c438 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2024-02-27 19:53:01 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2024-12-11 17:21:31 +0000 virtual/opengl: Depend on libglvnd instead of mesa Bug: https://bugs.gentoo.org/925627 Closes: https://bugs.gentoo.org/301337 Closes: https://bugs.gentoo.org/890334 Closes: https://github.com/gentoo/gentoo/pull/35556 Signed-off-by: Matt Turner <mattst88@gentoo.org> profiles/default/linux/package.use.force | 6 ++++++ virtual/opengl/opengl-8.ebuild | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+)