build: use symbol versioning

Symbol versions provide a means by which ELF utilities can determine
whether a program is incompatible with a too-old library version so
that package management tools can autodetect version-based
dependencies and suggest upgrade paths.

[ran: swap xkbcommon.map and xkbcommon-x11.map]

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Ran Benita <ran234@gmail.com>
master
Jan Engelhardt 2014-09-09 19:08:46 +02:00 committed by Ran Benita
parent a931740cc7
commit 5444f6a8ca
3 changed files with 84 additions and 0 deletions

View File

@ -84,6 +84,7 @@ libxkbcommon_la_SOURCES = \
src/utf8.h \
src/utils.c \
src/utils.h
libxkbcommon_la_LDFLAGS = -Wl,--version-script=${srcdir}/xkbcommon.map
if ENABLE_X11
pkgconfig_DATA += xkbcommon-x11.pc
@ -97,6 +98,7 @@ lib_LTLIBRARIES += libxkbcommon-x11.la
libxkbcommon_x11_la_CFLAGS = $(AM_CFLAGS) $(XCB_XKB_CFLAGS)
libxkbcommon_x11_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/x11
libxkbcommon_x11_la_LIBADD = libxkbcommon.la $(XCB_XKB_LIBS)
libxkbcommon_x11_la_LDFLAGS = -Wl,--version-script=${srcdir}/xkbcommon-x11.map
libxkbcommon_x11_la_SOURCES = \
src/x11/keymap.c \

9
xkbcommon-x11.map Normal file
View File

@ -0,0 +1,9 @@
V_0.4.3 {
global:
xkb_x11_setup_xkb_extension;
xkb_x11_get_core_keyboard_device_id;
xkb_x11_keymap_new_from_device;
xkb_x11_state_new_from_device;
local:
*;
};

73
xkbcommon.map Normal file
View File

@ -0,0 +1,73 @@
V_0.4.3 {
global:
xkb_keysym_get_name;
xkb_keysym_from_name;
xkb_keysym_to_utf8;
xkb_keysym_to_utf32;
xkb_context_new;
xkb_context_ref;
xkb_context_unref;
xkb_context_set_user_data;
xkb_context_get_user_data;
xkb_context_include_path_append;
xkb_context_include_path_append_default;
xkb_context_include_path_reset_defaults;
xkb_context_include_path_clear;
xkb_context_num_include_paths;
xkb_context_include_path_get;
xkb_context_set_log_level;
xkb_context_get_log_level;
xkb_context_set_log_verbosity;
xkb_context_get_log_verbosity;
xkb_context_set_log_fn;
xkb_keymap_new_from_names;
xkb_keymap_new_from_file;
xkb_keymap_new_from_string;
xkb_keymap_new_from_buffer;
xkb_keymap_ref;
xkb_keymap_unref;
xkb_keymap_get_as_string;
xkb_keymap_min_keycode;
xkb_keymap_max_keycode;
xkb_keymap_key_for_each;
xkb_keymap_num_mods;
xkb_keymap_mod_get_name;
xkb_keymap_mod_get_index;
xkb_keymap_num_layouts;
xkb_keymap_layout_get_name;
xkb_keymap_layout_get_index;
xkb_keymap_num_layouts_for_key;
xkb_keymap_num_levels_for_key;
xkb_keymap_key_get_syms_by_level;
xkb_keymap_num_leds;
xkb_keymap_led_get_name;
xkb_keymap_led_get_index;
xkb_keymap_key_repeats;
xkb_state_new;
xkb_state_ref;
xkb_state_unref;
xkb_state_get_keymap;
xkb_state_update_key;
xkb_state_update_mask;
xkb_state_key_get_syms;
xkb_state_key_get_utf8;
xkb_state_key_get_utf32;
xkb_state_key_get_one_sym;
xkb_state_key_get_layout;
xkb_state_key_get_level;
xkb_state_serialize_mods;
xkb_state_serialize_layout;
xkb_state_mod_name_is_active;
xkb_state_mod_names_are_active;
xkb_state_mod_index_is_active;
xkb_state_mod_indices_are_active;
xkb_state_mod_index_is_consumed;
xkb_state_mod_mask_remove_consumed;
xkb_state_key_get_consumed_mods;
xkb_state_layout_name_is_active;
xkb_state_layout_index_is_active;
xkb_state_led_name_is_active;
xkb_state_led_index_is_active;
local:
*;
};