Created attachment 429728 [details] ebuild for xkeyboard-config-2.17 without libX11 dependency x11-misc/xkeyboard-config-2.17 does not actually depend on libX11. We should remove it in the ebuild. The attached patch is tested on a libX11-free system with weston as the display server.
Created attachment 429730 [details, diff] patch file for removing X11 dependency from xkeyboard-config-2.17
The upstream configure.ac contains the comment # xkeyboard-config does not have build-time dependencies. However, it does # have run-time dependencies and keyboard layouts may not work without the # right libX11 or xproto installed. # By default, we enable these run-time dependencies as build-time # dependencies so that those building on their local machines are warned # that the resulting build may not work. and later (conditionally) checks for >=libxproto-7.0.20 and >=libx11-1.4.3. Is wayland/weston a substitute for these runtime dependencies?
We already set --disable-runtime-deps in the gentoo-stock ebuild when building xkeyboard-config. So we are not checking these run-time dependencies as build dependencies, as opposed to what upstream configure.ac said. Anyway, Weston only use xkeyboard-config for the (static) xkb definition files, and does not require any runtime dependencies at all (for xkeyboard-config). Only If a system does not have libX11 and friends installed, then it surely cannot have an xserver, and in this case it would be fairly safe to assume that it is either a headless server or an X11-free system (for instance, a Wayland-only system), in which case I believe it is safe to not having these dependencies.
Created attachment 429808 [details, diff] Patch for removing X11 dependencies from xkeyboard-config Also I forgot to remove xproto from the original patch. This one is the corrected one.
Created attachment 429810 [details] resulting ebuild
The point of checking the runtime dependencies is that on systems using X with older versions of libX11 and xproto the keymaps/rules won't work. So we want to ensure that libX11 and xproto are of high enough version when X is used. On the other hand, all versions in the tree are sufficient for that.
Maybe add USE flag X?
It might work to block older versions that are incompatible.
(In reply to Chí-Thanh Christopher Nguyễn from comment #8) > It might work to block older versions that are incompatible. Which you did in commit e66751674fba6abf1926db5a1fec6e75cdb8b2fe Author: Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> Date: Sat Jun 4 11:41:47 2016 +0200 x11-misc/xkeyboard-config: Version bump Also block incompatible libX11 and xkbcomp instead of depending on them. so all that's left is the dependency on xproto. configure.ac lumps xproto in with libX11 in that it's required at runtime to have such-and-such version, but it doesn't actually have a build-time dependence on it. That seems impossible for a package like xproto, which is nothing but headers. Fixed by commit ab0bede71310a0a6a691b540758ffe5d9b757935 Author: Matt Turner <mattst88@gentoo.org> Date: Fri Mar 3 22:59:47 2017 -0800 x11-misc/xkeyboard-config: Drop dependence on xproto.