1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python2_7 )
8 VALA_MIN_API_VERSION="0.20"
9 VALA_USE_DEPEND="vapigen"
10 # Vapigen is needed for the vala binding
11 # Valac is needed when building from git for the engine
14 inherit autotools bash-completion-r1 eutils gnome2-utils multilib python-single-r1 readme.gentoo vala virtualx
16 DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
17 HOMEPAGE="http://code.google.com/p/ibus/"
21 KEYWORDS="~alpha amd64 arm ~ia64 ppc ~ppc64 ~sparc x86 ~x86-fbsd"
22 IUSE="deprecated gconf gtk +gtk3 +introspection nls +python test vala wayland +X"
25 deprecated? ( python )
26 vala? ( introspection )
28 ${PYTHON_REQUIRED_USE}
29 || ( deprecated ( gtk3 introspection ) ) )" #342903
31 [[ -n ${UPSTREAM_VER} ]] && \
32 UPSTRAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
34 SRC_URI="https://github.com/ibus/ibus/releases/download/${PV}/${P}.tar.gz
35 ${UPSTRAM_PATCHSET_URI}"
38 >=dev-libs/glib-2.26:2
42 >=gnome-base/dconf-0.13.4
44 gconf? ( >=gnome-base/gconf-2.12:2 )
45 gtk? ( x11-libs/gtk+:2 )
46 gtk3? ( x11-libs/gtk+:3 )
47 python? ( ${PYTHON_DEPS} )
51 introspection? ( >=dev-libs/gobject-introspection-0.6.8 )
52 nls? ( virtual/libintl )
53 wayland? ( dev-libs/wayland )"
54 RDEPEND="${COMMON_DEPEND}
59 >=dev-python/dbus-python-0.83
60 dev-python/pygobject:2
63 dev-python/pygobject:3
64 x11-libs/gdk-pixbuf:2[introspection]
65 x11-libs/pango[introspection]
66 x11-libs/gtk+:3[introspection] )
68 DEPEND="${COMMON_DEPEND}
73 nls? ( >=sys-devel/gettext-0.16.1 )
74 vala? ( $(vala_depend) )"
76 # stress test in bus/ fails
77 # IBUS-CRITICAL **: bus_test_client_init: assertion `ibus_bus_is_connected (_bus)' failed
80 DOCS="AUTHORS ChangeLog NEWS README"
82 DISABLE_AUTOFORMATTING="yes"
83 DOC_CONTENTS="To use ibus, you should:
84 1. Get input engines from sunrise overlay.
85 Run \"emerge -s ibus-\" in your favorite terminal
86 for a list of packages we already have.
91 3. Set the following in your user startup scripts
92 such as .xinitrc, .xsession or .xprofile:
94 export XMODIFIERS=\"@im=ibus\"
95 export GTK_IM_MODULE=\"ibus\"
96 export QT_IM_MODULE=\"xim\"
101 use python && python-single-r1_pkg_setup
105 # Upstream's patchset
106 if [[ -n ${UPSTREAM_VER} ]]; then
107 EPATCH_SUFFIX="patch" \
110 epatch "${WORKDIR}"/patches-upstream
113 # We run "dconf update" in pkg_postinst/postrm to avoid sandbox violations
114 sed -e 's/dconf update/:/' \
115 -i data/dconf/Makefile.{am,in} || die
116 use vala && vala_src_prepare
124 python_conf="PYTHON=${PYTHON}
125 $(use_enable deprecated python-library)
126 $(use_enable gtk3 setup)"
128 python_conf="--disable-python-library --disable-setup"
132 $(use_enable introspection) \
133 $(use_enable gconf) \
134 $(use_enable gtk gtk2) \
135 $(use_enable gtk xim) \
137 $(use_enable gtk3 ui) \
139 $(use_enable test tests) \
140 $(use_enable X xim) \
142 $(use_enable wayland) \
147 unset DBUS_SESSION_BUS_ADDRESS
154 prune_libtool_files --all
156 mv "${ED}"/usr/share/bash-completion/completions/ibus.bash "${T}"
157 rm -rf "${ED}"/usr/share/bash-completion || die
158 newbashcomp "${T}"/ibus.bash ${PN}
159 insinto /etc/X11/xinit/xinput.d
160 newins xinput-ibus ibus.conf
162 keepdir /usr/share/ibus/{engine,icons} #289547
164 use deprecated && python_optimize
165 use python && use gtk3 && python_optimize
167 readme.gentoo_create_doc
171 use gconf && gnome2_gconf_savelist
172 gnome2_schemas_savelist
177 use gconf && gnome2_gconf_install
178 use gtk && gnome2_query_immodules_gtk2
179 use gtk3 && gnome2_query_immodules_gtk3
180 gnome2_schemas_update
181 gnome2_icon_cache_update
182 readme.gentoo_print_elog
186 use gtk && gnome2_query_immodules_gtk2
187 use gtk3 && gnome2_query_immodules_gtk3
188 use gconf && gnome2_schemas_update
189 gnome2_schemas_savelist
190 gnome2_icon_cache_update