The following logic in ebuild is incorrect: if use egl; then emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) fi If "platforms" value is not defined, all supported platforms are automatically enabled, because the default value of platforms is ['auto']. For example with USE="-vulkan -egl": ... Program wayland-scanner found: NO meson.build:1276:2: ERROR: Program(s) ['wayland-scanner'] not found or not executable Also platforms is not egl-only thing. It should contain at least "x11", as required by GLX. For example If I pass "-Dplatforms=" to meson: ... meson.build:328:4: ERROR: Problem encountered: Cannot build GLX support without X11 platform support and at least one OpenGL API
With the following patch I can build mesa with USE=-egl: @@ -293,6 +291,8 @@ if use egl; then emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) + else + emesonargs+=( -Dplatforms=x11 ) fi if use gallium; then
Ah, thank you. Yes, this flag used to be called --with-egl-platforms= and was changed. I will confirm your patch is correct and then apply it.
Actually, I think we just want to pass -Dplatforms= unconditionally.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=462b00b1b5a789c26f48530ef3302c7e97fa4b94 commit 462b00b1b5a789c26f48530ef3302c7e97fa4b94 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2018-08-30 17:39:23 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2018-08-30 17:49:40 +0000 media-libs/mesa: Unconditionally pass -Dplatforms=... Closes: https://bugs.gentoo.org/663642 media-libs/mesa/mesa-9999.ebuild | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)