--- /dev/null
+#!/bin/sh
+
+BASE_HEADER_FILE="./xkbcommon/xkbcommon-keysyms.h"
+
+LC_CTYPE=C python ./makekeys.py ${BASE_HEADER_FILE} > ./src/ks_tables.h
--- /dev/null
+#!/bin/sh
+
+KEYMAP_FILE_PATH="/usr/share/X11/xkb/tizen_key_layout.txt"
+BASE_KEYSYM="0x10090000"
+TARGET_HEADER_FILE="./xkbcommon/tizen_keymap.h"
+TEMP_TEXT_FILE="./temp_file.txt"
+NEW_DEFINE_SYM_FILE="./new_define_sym.txt"
+KEYMAP_HEADER_FILE="./xkbcommon/xkbcommon-keysyms.h"
+cout=1
+BASE_KEYSYM_DEC=`python -c "print int('$BASE_KEYSYM', 16)"`
+
+if [ -e ${KEYMAP_FILE_PATH} ]
+then
+ echo "${TIZEN_PROFILE} have a key layout file: ${KEYMAP_FILE_PATH}"
+else
+ echo "${TIZEN_PROFILE} doesn't have a key layout file: ${KEYMAP_FILE_PATH}"
+ exit
+fi
+
+echo "Generate a tizen keymap header file"
+
+while read KEYNAME KEYCODE
+do
+ KEYSYM="XKB_KEY_${KEYNAME}"
+ grep -rn "${KEYSYM}" $KEYMAP_HEADER_FILE > $TEMP_TEXT_FILE
+ FINDED_DEFINE=`cat temp_file.txt | awk '{print $2}'`
+
+ BOOL_FOUND_SYM=false
+ for SEARCH_SYM in ${FINDED_DEFINE}
+ do
+ if [ "$SEARCH_SYM" = "$KEYSYM" ]
+ then
+ BOOL_FOUND_SYM=true
+ break
+ fi
+ done
+ if [ "$BOOL_FOUND_SYM" = false ]
+ then
+ echo "${KEYSYM}" >> $NEW_DEFINE_SYM_FILE
+ fi
+done < ${KEYMAP_FILE_PATH}
+
+sed -i '$s/#endif//g' ${KEYMAP_HEADER_FILE}
+echo "/**************************************************************" >> ${KEYMAP_HEADER_FILE}
+echo " * These keys defined for tizen platform." >> ${KEYMAP_HEADER_FILE}
+echo " * Key symbols are defined by keymap builder." >> ${KEYMAP_HEADER_FILE}
+echo " */" >> ${KEYMAP_HEADER_FILE}
+
+while read KEYNAME
+do
+ KEYSYM_DEC=$(echo $BASE_KEYSYM_DEC $cout | awk '{print $1 + $2}')
+ KEYSYM=$(printf "%x" $KEYSYM_DEC)
+ echo -en "#define ${KEYNAME}\t\t0x$KEYSYM\n" >> ${KEYMAP_HEADER_FILE}
+ cout=$(echo $cout 1 | awk '{print $1 + $2}')
+done < ${NEW_DEFINE_SYM_FILE}
+
+echo "" >> ${KEYMAP_HEADER_FILE}
+echo "" >> ${KEYMAP_HEADER_FILE}
+echo "#endif" >> ${KEYMAP_HEADER_FILE}
+
+rm $NEW_DEFINE_SYM_FILE
+rm $TEMP_TEXT_FILE
libxkbcommon_link_deps += libxkbcommon_def
libxkbcommon_link_args += '/DEF:' + libxkbcommon_def.full_path()
endif
+
+## For tizen profile ##
+tizen_profile = get_option('tizen-profile')
+if tizen_profile == 'common'
+ libxkbcommon_link_args += '-D_F_TIZEN_COMMON_PROFILE_'
+endif
+
libxkbcommon = library(
'xkbcommon',
'include/xkbcommon/xkbcommon.h',
value: true,
description: 'Enable installing bash completion scripts',
)
+option(
+ 'tizen-profile',
+ type: 'string',
+ value: 'common',
+ description: 'Enable support for Wayland utility programs',
+)
+
BuildRequires: flex
BuildRequires: libtool >= 2
BuildRequires: pkgconfig(xorg-macros) >= 1.8
+%if "%{?profile}" == "common"
+%else
+BuildRequires: python
+BuildRequires: e-tizen-data
+%endif
%description
Keyboard handling library using XKB data.
%setup -qn %{name}
cp %{SOURCE1001} .
+# Generate tizen keymap header except common profile
+%if "%{?profile}" == "common"
+%else
+export TIZEN_PROFILE="%{?profile}"
+chmod a+x ./make_tizen_keymap.sh
+./make_tizen_keymap.sh
+chmod a+x ./gen_tables.sh
+./gen_tables.sh
+%endif
+
%build
-%autogen --disable-static --disable-x11
+%autogen --disable-static --disable-x11 --with-tizen-profile="%{?profile}"
%__make %{?_smp_mflags} V=1;
%install
--- /dev/null
+libdir=@abs_top_builddir@/.libs
+includedir=@abs_top_srcdir@
+
+Name: xkbcommon
+Description: XKB API common to servers and clients (uninstalled)
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir} @TIZEN_COMMON_CFLAGS@
+Libs: -L${libdir} -lxkbcommon
--- /dev/null
+libdir=@abs_top_builddir@/.libs
+includedir=@abs_top_srcdir@
+
+Name: xkbcommon-x11
+Description: XKB API common to servers and clients - X11 support (uninstalled)
+Version: @PACKAGE_VERSION@
+Requires: xkbcommon
+Requires.private: xcb xcb-xkb
+Cflags: -I${includedir} @TIZEN_COMMON_CFLAGS@
+Libs: -L${libdir} -lxkbcommon-x11
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: xkbcommon-x11
+Description: XKB API common to servers and clients - X11 support
+Version: @PACKAGE_VERSION@
+Requires: xkbcommon
+Requires.private: xcb xcb-xkb
+Cflags: -I${includedir} @TIZEN_COMMON_CFLAGS@
+Libs: -L${libdir} -lxkbcommon-x11
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: xkbcommon
+Description: XKB API common to servers and clients
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir} @TIZEN_COMMON_CFLAGS@
+Libs: -L${libdir} -lxkbcommon