As I don't use whether kde nor gnome, I tend exclude gnome-* (only gnome-base available) and kde-* via /etc/portage/excludes (now as a post-sync task since using git repository). This lightens my portage tree and speeds up a bit a lot of things. As a result: emerge =glfw-3.2.1 -pv -> emerge: there are no ebuilds to satisfy "kde-frameworks/extra-cmake-modules". First thing I tend to do is: emerge =glfw-3.2.1 -1 --nodeps And it just works. Then I looked at packages needing this library: equery depends glfw -> app-text/mupdf-1.11-r1 (opengl ? >=media-libs/glfw-3.2) the only one at home, so thought maybe the missing cmake modules would prevent mupdf to compile with gl backend USE="opengl" emerge =mupdf-1.11-r1 -1 also works with no error, mupdf-gl binary is compiled and working This led me think that kde-frameworks/extra-cmake-modules is maybe not a mandatory dependency for glfw, so I open this ticket as there are maybe other softwares requiring kde-frameworks/extra-cmake-modules to be installed to be able to use glfw. Sorry for not being kind enough to look through the whole tree (moreover as I said before, my portage tree isn't full), hope this may help glfw maintainer.
I have the same issue with same conditionals (my tree is not full). Please handle this.
I found related bug report #598664 . And last comment #4 about this. >ECM is only needed when using wayland (see https://github.com/glfw/glfw/blob/master/CMakeLists.txt#L285) Thus the extra-cmake-modules dependency should only be required if wayland USE-flag is enabled.
commit 9bab4f898b87e95270cd39bddfa7c2ca0b87f7d4 Author: Lars Wendler <polynomial-c@gentoo.org> Date: Wed May 31 09:11:07 2017 media-libs/glfw: Only depend on extra-cmake-modules with USE="wayland" https://bugs.gentoo.org/598664#c4 Package-Manager: Portage-2.3.6, Repoman-2.3.2
#comment 2 Thanks you for pointing out the exact issue. #comment 3 Thanks for the push. It resolves the issue yet, but I still don't understand why putting it under kde-frameworks, apart being a kde community piece of code, it isn't related to kde desktop itself, and I was thinking stuffs under kde-* were, isn't there a better category for this one (same problem is really annoying with some gnome-* for years now).