# # spec file for package libxkbcommon # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if ! 0%{?suse_version} || 0%{?suse_version} >= 1315 %bcond_without x11 %else %bcond_with x11 %endif Name: libxkbcommon Version: 0.8.2 Release: 3.1 Summary: Library for handling xkb descriptions License: MIT Group: Development/Libraries/C and C++ Url: http://xkbcommon.org/ #Git-Clone: git://github.com/xkbcommon/libxkbcommon Source: https://xkbcommon.org/download/%name-%version.tar.xz Source2: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build #git#BuildRequires: autoconf >= 2.62 #git#BuildRequires: automake BuildRequires: bison BuildRequires: flex #git#BuildRequires: libtool >= 2 BuildRequires: pkgconfig BuildRequires: xz BuildRequires: pkgconfig(xkeyboard-config) BuildRequires: pkgconfig(xorg-macros) >= 1.8 BuildRequires: pkgconfig(xproto) %if %{with x11} BuildRequires: pkgconfig(xcb-xkb) >= 1.10 %endif %description xkbcommon is a keymap handling library, which can parse XKB descriptions (e.g. from xkeyboard-config), and use this to help its users make sense of their keyboard input. Unfortunately, X11's requirements mean this is not actually usable for the X server, but it should be perfectly usable for client toolkits, as well as alternative windowing systems, compositors and system-level clients such as Wayland and kmscon. %package -n libxkbcommon0 Summary: Library for handling xkb descriptions Group: System/Libraries Requires: xkeyboard-config %description -n libxkbcommon0 xkbcommon is a keymap handling library, which can parse XKB descriptions (e.g. from xkeyboard-config), and use this to help its users make sense of their keyboard input. Unfortunately, X11's requirements mean this is not actually usable for the X server, but it should be perfectly usable for client toolkits, as well as alternative windowing systems, compositors and system-level clients such as Wayland and kmscon. %package -n libxkbcommon-x11-0 Summary: Library for handling xkb descriptions using XKB-X11 Group: System/Libraries %description -n libxkbcommon-x11-0 An addon library that supports creating keymaps with the XKB X11 protocol by querying the X server directly. %package devel Summary: Development files for the libxkbcommon library Group: Development/Libraries/C and C++ Requires: libxkbcommon0 = %version-%release %description devel xkbcommon is a keymap handling library, which can parse XKB descriptions (e.g. from xkeyboard-config), and use this to help its users make sense of their keyboard input. Unfortunately, X11's requirements mean this is not actually usable for the X server, but it should be perfectly usable for client toolkits, as well as alternative windowing systems, compositors and system-level clients such as Wayland and kmscon. This package contains the development headers for the library found in libxkbcommon. %package x11-devel Summary: Development files for the libxkbcommon-x11 library Group: Development/Libraries/C and C++ Requires: libxkbcommon-x11-0 = %version-%release %description x11-devel xkbcommon is a keymap handling library, which can parse XKB descriptions (e.g. from xkeyboard-config), and use this to help its users make sense of their keyboard input. This package contains the development headers for the library found in %name-x11-0. %prep %setup -q %build if [ ! -e configure ]; then NOCONFIGURE=1 ./autogen.sh fi %if %{with x11} extra_opts=--enable-x11 %else extra_opts=--disable-x11 %endif # Ensure people will use pkgconfig to locate headers. %configure --disable-static --includedir="%_includedir/%name" $extra_opts make %{?_smp_mflags} V=1 %install %make_install rm -f "%buildroot/%_libdir"/*.la %check make check %post -n libxkbcommon0 -p /sbin/ldconfig %postun -n libxkbcommon0 -p /sbin/ldconfig %post -n libxkbcommon-x11-0 -p /sbin/ldconfig %postun -n libxkbcommon-x11-0 -p /sbin/ldconfig %files -n libxkbcommon0 %defattr(-,root,root) %doc LICENSE NEWS %_libdir/libxkbcommon.so.* %files devel %defattr(-,root,root) %doc LICENSE NEWS %_includedir/%name/ %if %{with x11} %exclude %_includedir/%name/xkbcommon/xkbcommon-x11.h %endif %_libdir/libxkbcommon.so %_libdir/pkgconfig/xkbcommon.pc %exclude /usr/share/doc/libxkbcommon %if %{with x11} %files -n libxkbcommon-x11-0 %defattr(-,root,root) %doc LICENSE NEWS %_libdir/libxkbcommon-x11.so.* %files x11-devel %defattr(-,root,root) %doc LICENSE NEWS %dir %_includedir/%name %dir %_includedir/%name/xkbcommon %_includedir/%name/xkbcommon/xkbcommon-x11.h %_libdir/libxkbcommon-x11.so %_libdir/pkgconfig/xkbcommon-x11.pc %endif %changelog * Tue Aug 7 2018 jengelh@inai.de - Update to new upstream release 0.8.2 (boo#1105832) * Fix a few NULL-dereferences, out-of-bounds access and undefined behavior in the XKB text format parser. * CVEs fixed: CVE-2018-15853, CVE-2018-15854, CVE-2018-15855, CVE-2018-15856, CVE-2018-15857, CVE-2018-15858, CVE-2018-15859, CVE-2018-15861, CVE-2018-15862, CVE-2018-15863, CVE-2018-15864 - run make check * Fri Dec 15 2017 jengelh@inai.de - Update to new upstream release 0.8.0 * Added xkb_keysym_to_{upper,lower} to perform case-conversion directly on keysyms. This is useful in some odd cases, but working with the Unicode representations should be preferred when possible. * Added Unicode conversion rules for the signifblank and permille keysyms. * Fixed a bug in the parsing of XKB key type definitions where the number of levels were determined by the number of level * names*. Keymaps which omit level names were hence miscompiled. This regressed in version 0.4.3. Keymaps from xkeyboard-config were not affected since they don't omit level names. * Thu Oct 19 2017 jayvdb@gmail.com - Allow building x11 subpackage on any distribution * Mon Aug 7 2017 jengelh@inai.de - Update to new upstream release 0.7.2 * Added new keysym definitions from xproto. * New APIs: XKB_KEY_XF86Keyboard, XKB_KEY_XF86WWAN, XKB_KEY_XF86RFKill, XKB_KEY_XF86AudioPreset. * Wed Jan 18 2017 jengelh@inai.de - Update to new upstream release 0.7.1 * Fixed various reported problems when the current locale is tr_TR.UTF-8. * Fri Nov 11 2016 jengelh@inai.de - Update to new upstream release 0.7.0 * Added support for different "modes" of calculating consumed modifiers. The existing mode, based on the XKB standard, has proven to be unintuitive in various shortcut implementations. * A new mode, based on the calculation used by the GTK toolkit, is added. This mode is less eager to declare a modifier as consumed. * Fri Apr 8 2016 zaitor@opensuse.org - Update to version 0.6.1: * Add LICENSE to distributed files in tarball releases. * Minor typo fix in xkb_keymap_get_as_string() documentation. - Changes from version 0.6.0: * If the XKB_CONFIG_ROOT environment variable is set, it is used as the XKB configuration root instead of the path determined at build time. * Tests and benchmarks now build correctly on OSX. * An XKB keymap provides a name for each key it defines. Traditionally these names are limited to at most 4 characters, and are thus somewhat obscure, but might still be useful (xkbcommon lifts the 4 character limit). * The new functions xkb_keymap_key_get_name() and xkb_keymap_key_by_name() can be used to get the name of a key or find a key by name. Note that a key may have aliases. * Documentation improvements. * New API: + xkb_keymap_key_by_name(). + xkb_keymap_key_get_name(). * Mon Nov 2 2015 mlin@suse.com - Requires xkeyboard-config, bsc#952403 * libxkbcommon should brings xkeyboard-config together always as libxkbcommon does not distribute xkb data itself, and especially requires xkeyboard-config for any rely on libxkbcommon in the minimal system. * Mon Nov 3 2014 hrvoje.senjan@gmail.com - Update to version 0.5.0: * Added support for Compose/dead keys in a new module (included in libxkbcommon). See the documentation or the xkbcommon/xkbcommon-compose.h header file for more details. * Improved and reordered some sections of the documentation. * The doxygen HTML pages were made nicer to read. * Most tests now run also on non-linux platforms. * A warning is emitted by default about RMLVO values which are not used during keymap compilation, which are most often a user misconfiguration. For example, "terminate:ctrl_alt_backspace" instead of "terminate:ctrl_alt_bksp". * Added symbol versioning for libxkbcommon and libxkbcommon-x11. Note: binaries compiled against this and future versions will not be able to link against the previous versions of the library. * Removed several compatablity symbols from the binary (the API isn't affected). This affects binaries which: 1. Were compiled against a pre-stable (<0.2.0) version of libxkbcommon, and 2. Are linked against the this or later version of libxkbcommon. Such a scenario is likely to fail already. * If Xvfb is not available, the x11comp test is now correctly skipped instead of hanging. * Benchmarks were moved to a separate bench/ directory. * Build fixes from OpenBSD. * Fixed a bug where key type entries such as "map[None] = Level2;" were ignored. * New API: XKB_COMPOSE_* xkb_compose_* * Thu Sep 11 2014 jengelh@inai.de - Add commentary about upcoming symbol version support to .spec file. * Tue Sep 9 2014 jengelh@inai.de - Switch to library versioning as described in Shared Library Packaging guidelines. This permits installation of multiple libxkbcommons. * Thu Aug 21 2014 dimstar@opensuse.org - Update to version 0.4.3: + Fixed a bug which caused xkb_x11_keymap_new_from_device() to misrepresent modifiers for some keymaps. https://github.com/xkbcommon/libxkbcommon/issues/9 + Fixed a bug which caused xkb_x11_keymap_new_from_device() to ignore XKB PrivateAction's. + Modifiers are now always fully resolved after xkb_state_update_mask(). Previously the given state components were used as-is, without considering virtual modifier mappings. Note: this only affects non-standard uses of xkb_state_update_mask(). + Added a test for xkbcommon-x11, "x11comp". The test uses the system's Xvfb server and xkbcomp. If they do not exist or fail, the test is skipped. + Fixed memory leaks after parse errors in the XKB yacc parser. + The fix required changes which are currently incompatible with byacc. * Thu Jul 24 2014 jengelh@inai.de - Add symbol versioning to xkbcommon * Wed May 21 2014 hrvoje.senjan@gmail.com - Update to new upstream release 0.4.2 * Fixed a bug where explicitly passing "--enable-x11" to ./configure would in fact disable it (regressed in 0.4.1). * Added @since version annotations to the API documentation for everything introduced after the initial stable release (0.2.0). * Added a section to the documentation about keysym transformations, and clarified which functions perform a given transformation. * XKB files which fail to compile during keymap construction can no longer have any effect on the resulting keymap: changes are only applied when the entire compilation succeeds. Note: this was a minor correctness issue inherited from xkbcomp. * Fix an out-of-bounds array access in src/x11/util.c:adopt_atoms() error-handling code. Note: it seems impossible to trigger in the current code since the input size cannot exceed the required size. - Add back -enable-x11 flag for 1315+ * Wed Apr 9 2014 mlin@suse.com - Add COPYING and NEWS to files list * Tue Apr 8 2014 mlin@suse.com - Replace %%suse_version >= 1320 to 1315 in order to build -x11 package for SLE12 * Fri Apr 4 2014 hrvoje.senjan@gmail.com - Update to new upstream release 0.4.1 * Added two new functions, xkb_state_key_get_utf{8,32}(). They combine the operations of xkb_state_key_get_syms() and xkb_keysym_to_utf{8,32}(), and provide a nicer interface for it (espcially for multiple-keysyms-per-level). * The xkb_state_key_get_utf{8,32}() functions now apply Control transformation: when the Control modifier is active, the string is converted to an appropriate control character. This matches the behavior of libX11's XLookupString(3), and required by the XKB specification: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier fdo#75892 * The consumed modifiers for a key are now calculated similarly to libX11. The previous behavior caused a bug where Shift would not cancel an active Caps Lock. * Make xkbcommon-x11 work with the keymap reported by the XQuartz X server. fdo#75798 * Reduce memory usage during keymap compilation some more. * New API: xkb_state_key_get_consumed_mods() xkb_state_key_get_utf8() xkb_state_key_get_utf32() * Deprecated API: XKB_MAP_COMPILE_PLACEHOLDER, XKB_MAP_NO_FLAGS use XKB_KEYMAP_NO_FLAGS instead. - Temporary ommit passing --enable-x11 flag, this release has a bug that actually disables x11 if explicitly enabled (fixed upstream, but used this approach instead of cherry-picking the patch, for the sake of avoiding three new BuildRequires & autoreconf) * Sat Mar 8 2014 hrvoje.senjan@gmail.com - Update to new upstream release 0.4.0 * Add a new add-on library, xkbcommon-x11, to support creating keymaps with the XKB X11 protocol, by querying the X server directly. See the xkbcommon/xkbcommon-x11.h header file for more details. This library requires libxcb-xkb >= 1.10, and is enabled by default. It can be disabled with the --disable-x11 configure switch. Distributions are encouraged to split the necessary files for this library (libxkbcommon-x11.so, xkbcommon-x11.pc, xkbcommon/xkbcommon-x11.h) to a separate package, such that the main package does not depend on X11 libraries. * Fix the keysym <-> name lookup table to not require huge amounts of relocations. * Fix a bug in the keysym <-> name lookup, whereby lookup might fail in some rare cases. * Reduce memory usage during keymap compilation. * New API: New keysyms from xproto 7.0.25 (German T3 layout keysyms). XKB_MOD_NAME_NUM for the usual NumLock modifier. xkb_x11_* types and functions, XKB_X11_* constants. - Add and build new libxkbcommon-x11-0 and libxkbcommon-x11-devel packages for openSUSE 13.2 and newer * Wed Apr 17 2013 jengelh@inai.de - Update to new upstream release 0.3.0 * This introduces the xkb_keymap_new_from_buffer API, relaxes restrictions on the xkb_keymap_new_from_names API, introduces support for setting default keymaps from the environment, and includes several new bugfixes, as well as swathes of testing improvements. * Tue Oct 23 2012 jengelh@inai.de - Update to first tarball release 0.2.0 * Tue Sep 25 2012 sndirsch@suse.com - specfile cleanup * Thu Nov 11 2010 jengelh@medozas.de - Initial package