In the kodi package there is a X use flag in REQUIRED_USE that is on by default. However if you turn it off you get: -- !!! Problem resolving dependencies for media-tv/kodi ... done! !!! The ebuild selected to satisfy "kodi" has unmet requirements. - media-tv/kodi-17.6-r2::gentoo USE="bluray css dbus dvd mysql nonfree samba sftp (system-ffmpeg) systemd udev upnp webserver xslt zeroconf -X -airplay -alsa -bluetooth -caps -cec -debug -gles -java -lcms -libressl -libusb -lirc -nfs -opengl -pulseaudio -test -udisks -upower -vaapi -vdpau" ABI_X86="(64)" PYTHON_TARGETS="-python2_7" The following REQUIRED_USE flag constraints are unsatisfied: python_targets_python2_7 any-of ( gles opengl ) The above constraints are a subset of the following complete expression: python_targets_python2_7 any-of ( gles opengl ) gles? ( X ) opengl? ( X ) udev? ( !libusb ) udisks? ( dbus ) upower? ( dbus ) -- If I turn python_targets_python2_7 on then I get: -- !!! Problem resolving dependencies for media-tv/kodi ... done! !!! The ebuild selected to satisfy "kodi" has unmet requirements. - media-tv/kodi-17.6-r2::gentoo USE="bluray css dbus dvd mysql nonfree samba sftp (system-ffmpeg) systemd udev upnp webserver xslt zeroconf -X -airplay -alsa -bluetooth -caps -cec -debug -gles -java -lcms -libressl -libusb -lirc -nfs -opengl -pulseaudio -test -udisks -upower -vaapi -vdpau" ABI_X86="(64)" PYTHON_TARGETS="python2_7" The following REQUIRED_USE flag constraints are unsatisfied: any-of ( gles opengl ) -- So it appears that either way gles or opengl are required, and both of these flags also require X. So effectively X is not optional (so shouldn't be a use flag?). Also in the ebuild the variable PYTHON_REQ_USE is being set but doesn't appear to be used anywhere. However the variable PYTHON_REQUIRED_USE is being accessed but doesn't appear to be set anywhere (at least not in the ebuild itself (which doesn't inherit any eclass)). I'm wondering if that is a typo and perhaps that is related to X being always required.
> Also in the ebuild the variable PYTHON_REQ_USE is being set but doesn't appear to be used anywhere. However the variable PYTHON_REQUIRED_USE is being accessed but doesn't appear to be set anywhere (at least not in the ebuild itself (which doesn't inherit any eclass)). I'm wondering if that is a typo and perhaps that is related to X being always required. python-single-r1 uses PYTHON_REQ_USE and it sets PYTHON_REQUIRED_USE. See https://devmanual.gentoo.org/eclass-reference/python-single-r1.eclass/index.html
You seem to be right about the X use flag. I'll fix that. Thanks for pointing this out! Note that in Kodi 18 (currently unreleased, but there's a -9999 ebuild), you can use USE="-X" (you have to set exactly one of the X, wayland, gbm use flags).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05c5c07cefe500ebd0ad793aa10b3c0628fd490 commit a05c5c07cefe500ebd0ad793aa10b3c0628fd490 Author: Craig Andrews <candrews@gentoo.org> AuthorDate: 2018-06-04 14:55:55 +0000 Commit: Craig Andrews <candrews@gentoo.org> CommitDate: 2018-06-04 14:56:17 +0000 media-tv/kodi: 17 cannot be built without X so remove the use flag Closes: https://bugs.gentoo.org/657290 Package-Manager: Portage-2.3.40, Repoman-2.3.9 media-tv/kodi/kodi-17.6-r3.ebuild | 288 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 288 insertions(+)