Permalink
Browse files

Add ibus-xkb and libgnomekbd.

  • Loading branch information...
1 parent a13687e commit a72989e064a015994eade70c5bcbf5cb96b37617 @fujiwarat committed Jan 17, 2013
@@ -0,0 +1 @@
+Configuration cheader_filename="libgnomekbd/gkbd-configuration.h"
View
@@ -28,24 +28,46 @@ dist_vapi_DATA = \
$(NULL)
# Don't rebuild vapi every time gir is updated.
+if ENABLE_LIBGNOMEKBD
vapi_deps = \
$(srcdir)/IBusXKB-1.0.metadata \
| \
+ $(builddir)/gkbd.vapi \
$(top_srcdir)/src/IBusXKB-@IBUS_XKB_API_VERSION@.gir \
$(NULL)
+else
+vapi_deps = \
+ $(srcdir)/IBusXKB-1.0.metadata \
+ | \
+ $(top_srcdir)/src/IBusXKB-@IBUS_XKB_API_VERSION@.gir \
+ $(NULL)
+endif
ibus-xkb-@IBUS_XKB_API_VERSION@.vapi: $(vapi_deps)
$(AM_V_GEN) $(VAPIGEN) --library ibus-xkb-@IBUS_XKB_API_VERSION@ \
--metadatadir=$(srcdir) \
--pkg=ibus-1.0 \
$(top_srcdir)/src/IBusXKB-@IBUS_XKB_API_VERSION@.gir
+if ENABLE_LIBGNOMEKBD
+$(builddir)/gkbd.vapi:
+ $(AM_V_GEN) $(VAPIGEN) --library gkbd \
+ --metadatadir $(srcdir) \
+ --pkg gtk+-3.0 --pkg glib-2.0 --pkg gmodule-2.0 \
+ /usr/share/gir-1.0/Gkbd-3.0.gir
+ $(NULL)
+endif
+
EXTRA_DIST = \
+ Gkbd-3.0.metadata \
IBusXKB-1.0.metadata \
config.vapi \
xi.vapi \
+ Xkl-1.0.metadata \
$(NULL)
+CLEANFILES = gkbd.vapi
+
MAINTAINERCLEANFILES = ibus-xkb-@IBUS_XKB_API_VERSION@.vapi
-include $(top_srcdir)/git.mk
@@ -0,0 +1,3 @@
+Xkl cheader_filename="libxklavier/xklavier.h"
+Engine
+ .filter_events.evt ref type="X.Event"
View
@@ -161,24 +161,20 @@ else
enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
fi
-# For source compatibility with ibus patch.
-AM_CONDITIONAL([ENABLE_XKB], [1])
-
-# Check for x11
-PKG_CHECK_MODULES(X11, [
- x11
-])
-AC_CHECK_HEADERS([X11/XKBlib.h])
-
-PKG_CHECK_MODULES(XKB,
- [xkbfile],,
- [XKB_LIBS="-lxkbfile"]
+# --disable-vala option.
+AC_ARG_ENABLE(vala,
+ AS_HELP_STRING([--disable-vala],
+ [Do not build ibus vala binding]),
+ [enable_vala=$enableval],
+ [enable_vala=yes]
)
-
-# For source compatibility with ibus patch.
-AC_DEFINE(HAVE_XKB, 1, [define to 1 if you have xkbfile])
-HAVE_IBUS_XKB=true
-AC_SUBST(HAVE_IBUS_XKB)
+if test x"$enable_vala" = x"yes"; then
+ AC_PATH_PROG([VAPIGEN], [vapigen], [false])
+fi
+AM_CONDITIONAL([ENABLE_VALA], [test x"$enable_vala" = x"yes"])
+if test x"$enable_vala" != x"yes"; then
+ enable_vala="no (disabled, use --enable-vala to enable)"
+fi
# --disable-dconf option.
AC_ARG_ENABLE(dconf,
@@ -226,12 +222,20 @@ else
enable_gconf="no (disabled, use --enable-gconf to enable)"
fi
+# Option for XKB command.
+PKG_CHECK_MODULES(XKB,
+ [xkbfile],,
+ [XKB_LIBS="-lxkbfile"]
+)
+
+AC_CHECK_HEADERS([X11/XKBlib.h])
+
# --enable-libgnomekbd option.
AC_ARG_ENABLE(libgnomekbd,
AS_HELP_STRING([--enable-libgnomekbd],
[Use libgnomekbd to handle the keymaps]),
[enable_libgnomekbd=$enableval],
- [enable_libgnomekbd=no]
+ [enable_libgnomekbd=yes]
)
AM_CONDITIONAL([ENABLE_LIBGNOMEKBD], [test x"$enable_libgnomekbd" = x"yes"])
if test x"$enable_libgnomekbd" = x"yes"; then
@@ -243,8 +247,8 @@ if test x"$enable_libgnomekbd" = x"yes"; then
atk
])
HAVE_IBUS_GKBD=true
+ enable_libgnomekbd="yes (enabled, use --disable-libgnomekbd to disable)"
else
- enable_libgnomekbd="no (disabled, use --enable-libgnomekbd to enable)"
HAVE_IBUS_GKBD=false
fi
AC_SUBST(HAVE_IBUS_GKBD)
@@ -356,6 +360,9 @@ fi
GETTEXT_PACKAGE=ibus-xkb
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
+GLIB_DEFINE_LOCALEDIR(GLIB_LOCALE_DIR)
+GLIB_LOCALE_DIR=$localedir
+AC_SUBST(GLIB_LOCALE_DIR)
AM_GLIB_GNU_GETTEXT
@@ -376,6 +383,7 @@ bindings/vala/Makefile
data/Makefile
data/dconf/Makefile
engine/Makefile
+engine/ibus-xkb/Makefile
engine/xkb.xml.in
setup/Makefile
setup/ibus-setup-xkb
View
@@ -1,5 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<gconfschemafile>
<schemalist>
+ <schema>
+ <key>/schemas/desktop/ibus/general/use_xmodmap</key>
+ <applyto>/desktop/ibus/general/use_xmodmap</applyto>
+ <owner>ibus</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Use xmodmap</short>
+ <long>Run xmodmap if .xmodmap/.Xmodmap exists.</long>
+ </locale>
+ </schema>
+ <schema>
+ <!-- or
+ /schemas/desktop/ibus/engine/xkb/xkb_latin_layouts
+ /desktop/ibus/engine/xkb/xkb_latin_layouts
+ -->
+ <key>/schemas/desktop/ibus/general/xkb_latin_layouts</key>
+ <applyto>/desktop/ibus/general/xkb_latin_layouts</applyto>
+ <owner>ibus</owner>
+ <type>list</type>
+ <list_type>string</list_type>
+ <default>[ara,bg,cz,dev,gr,gur,in,jp(kana),mal,mkd,ru,ua]</default>
+ <locale name="C">
+ <short>Latin layout which have no ASCII</short>
+ <long>us layout is appended to the latin layouts. variant is not needed.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/ibus/general/load_xkb_layouts</key>
+ <applyto>/desktop/ibus/general/load_xkb_layouts</applyto>
+ <owner>ibus</owner>
+ <type>list</type>
+ <list_type>string</list_type>
+ <default>[us,us(chr),us(dvorak),ad,al,am,ara,az,ba,bd,be,bg,br,bt,by,
+de,dk,ca,ch,cn(tib),cz,ee,epo,es,et,fi,fo,fr,
+gb,ge,ge(dsb),ge(ru),ge(os),gh,gh(akan),gh(ewe),gh(fula),gh(ga),gh(hausa),
+gn,gr,hu,hr,ie,ie(CloGaelach),il,
+in,
+in(tel),in(bolnagri),iq,iq(ku),ir,ir(ku),is,it,jp,
+kg,kh,kz,la,latam,lk,lk(tam_unicode),lt,lv,ma,ma(tifinagh),mal,mao,
+me,mk,mm,mt,mv,ng,ng(hausa),ng,ng(igbo),ng(yoruba),nl,no,no(smi),np,
+pk,pl,pl(csb),pt,ro,rs,ru,ru(cv),ru(kom),ru(sah),ru(tt),ru(xal),
+se,si,sk,sy,sy(ku),th,tj,tr,ua,uz,vn
+]</default>
+ <locale name="C">
+ <short>XKB layout list which is shown on ibus-setup</short>
+ <long>XKB layout list which is shown on ibus-setup.
+ The format is "layout" or "layout(variant)".</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/ibus/general/hotkey/triggers-no-modifiers</key>
+ <applyto>/desktop/ibus/general/hotkey/triggers-no-modifiers</applyto>
+ <owner>ibus</owner>
+ <type>list</type>
+ <list_type>string</list_type>
+ <default>[]</default>
+ <locale name="C">
+ <short>Trigger shortcut keys without modifier keys</short>
+ <long>Trigger shortcut keys without modifier keys.
+ The list is used by ibus-gjs.</long>
+ </locale>
+ </schema>
</schemalist>
</gconfschemafile>
@@ -0,0 +1,61 @@
+# vim:set noet ts=4:
+#
+# ibus-xkb - IBus XKB
+#
+# Copyright (c) 2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2012 Red Hat, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA
+
+libibus_xkb = $(top_builddir)/src/libibus-xkb-common.la
+
+INCLUDES = \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ $(NULL)
+
+AM_CFLAGS = \
+ $(INCLUDES) \
+ -DG_LOG_DOMAIN=\"IBUS\" \
+ -DIBUS_DISABLE_DEPRECATED \
+ -Wno-unused-variable \
+ -Wno-unused-but-set-variable \
+ -Wno-unused-function \
+ $(NULL)
+
+libexec_PROGRAMS = ibus-xkb
+
+ibus_xkb_SOURCES = \
+ ibus-xkb-main.c \
+ xkblib.h \
+ xkblib.c \
+ $(NULL)
+ibus_xkb_CFLAGS = \
+ @XKB_CFLAGS@ \
+ @X11_CFLAGS@ \
+ @GLIB2_CFLAGS@ \
+ $(NULL)
+ibus_xkb_LDADD = \
+ @XKB_LIBS@ \
+ @X11_LIBS@ \
+ @GLIB2_LIBS@ \
+ $(libibus_xkb) \
+ $(NULL)
+
+$(libibus_xkb):
+ $(MAKE) -C $(top_builddir)/src
+
+-include $(top_srcdir)/git.mk
Oops, something went wrong.

0 comments on commit a72989e

Please sign in to comment.