Bug 229127 - x11/libxkbcommon: add missing a dependency on x11/xkeyboard-config
Summary: x11/libxkbcommon: add missing a dependency on x11/xkeyboard-config
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2018-06-18 21:11 UTC by Bertrand Petit
Modified: 2019-01-23 07:29 UTC (History)
4 users (show)

See Also:
tobik: maintainer-feedback? (x11)

libxkbcommon.diff (505 bytes, patch)
2019-01-20 11:46 UTC, Tobias Kortkamp
tobik: maintainer-approval? (x11)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Petit 2018-06-18 21:11:53 UTC
After compiling and installing graphics/xpdf4 on a host without desktop environment, the xpdf command produce the following output and does not accept any keyboard input.

xkbcommon: ERROR: failed to add default include path /usr/local/share/X11/xkb
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .

The error message was right as /usr/local/share/X11/xkb was empty. After installing x11/xkeyboard-config xpdf stoped emiting that message and correctly accepted keyboard input. xpdf is so far the only command affected.

A dependency on x11/xkeyboard-config is obviously missing in x11-toolkits/qt5-gui. The dependency could alternatively be set on the x11/libxkbcommon port.
Comment 1 Raphael Kubo da Costa freebsd_committer 2018-06-18 21:57:18 UTC
Hmm, I think it makes more sense to make libxkbcommon have a run-time dependency on xkeyboard-config.

libxkbcommon's PACKAGING says:

    - (build optional, runtime) xkeyboard-config.
      During build, for automatically detecting the value of
      -Dxkb-config-root instead of guessing (/usr/share/X11/xkb).
      During runtime, not strictly needed, but most users of the library
      would need it.

while its README.md says:

    libxkbcommon does not distribute a keymap dataset itself, other than
    for testing purposes. The most common dataset is xkeyboard-config, which
    is used by all current distributions for their X11 XKB data.

Arch Linux, Fedora, openSUSE and Debian already have this dependency in their packages.
Comment 2 Tobias Kortkamp freebsd_committer 2019-01-18 11:34:20 UTC
The suggestion to add a xkeyboard-config run dependency to libxkbcommon makes
a lot of sense to me.  I had to add an xkeyboard-config dependency to kodi-devel
too in ports r490630 to workaround this issue here.

Can we get some x11@ feedback here ASAP please?  This is broken and easily 
Comment 3 Tobias Kortkamp freebsd_committer 2019-01-20 11:46:51 UTC
Created attachment 201281 [details]
Comment 4 commit-hook freebsd_committer 2019-01-22 21:04:06 UTC
A commit references this bug:

Author: zeising
Date: Tue Jan 22 21:03:10 UTC 2019
New revision: 490981
URL: https://svnweb.freebsd.org/changeset/ports/490981

  x11/libxkbcommon: Add dep on xkeyboard-config

  Add a run time dependency on x11/xkeyboard-config in x11/libxkbcommon.
  While not strictly necessary, this is recommended upstream, since almost all
  uses of libxkbcommon also needs xkeyboard-config.  This is similar to how it
  is done in other distributions.

  This solves issues when graphics/xpdf4 is installed without a desktop or
  graphical environment, as well as other places.

  PR:		229127
  Reported by:	Bertrand Petit
  Suggested by:	tobik

Comment 5 Niclas Zeising freebsd_committer 2019-01-22 21:05:43 UTC
Comitted as suggested, thank you!
Comment 6 Tobias Kortkamp freebsd_committer 2019-01-23 07:29:18 UTC
(In reply to Niclas Zeising from comment #5)
Thank you.