Skip to content

Commit

Permalink
FL-349: fix vala dependency in ibus-1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
janzhou committed Jan 22, 2013
1 parent 557902a commit 1cbf969
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 51 deletions.
2 changes: 0 additions & 2 deletions app-i18n/ibus/ibus-1.4.1.ebuild
@@ -1,6 +1,4 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus/ibus-1.4.1.ebuild,v 1.12 2012/10/08 01:05:22 naota Exp $

EAPI=4
PYTHON_DEPEND="python? 2:2.5"
Expand Down
2 changes: 0 additions & 2 deletions app-i18n/ibus/ibus-1.4.2.ebuild
@@ -1,6 +1,4 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus/ibus-1.4.2.ebuild,v 1.3 2012/10/08 01:05:22 naota Exp $

EAPI=4
PYTHON_DEPEND="python? 2:2.5"
Expand Down
2 changes: 0 additions & 2 deletions app-i18n/ibus/ibus-1.4.99.20121006.ebuild
@@ -1,6 +1,4 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus/ibus-1.4.99.20121006.ebuild,v 1.1 2012/10/13 23:49:23 naota Exp $

EAPI=4
PYTHON_DEPEND="python? 2:2.5"
Expand Down
119 changes: 74 additions & 45 deletions app-i18n/ibus/ibus-1.5.1.ebuild
@@ -1,11 +1,13 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus/ibus-1.4.2.ebuild,v 1.3 2012/10/08 01:05:22 naota Exp $

EAPI=4
PYTHON_DEPEND="python? 2:2.5"
VALA_MIN_API_VERSION="0.18"
VALA_USE_DEPEND="vapigen"
# Vapigen is needed for the vala binding
# Valac is needed when building from git for the engine

inherit eutils gnome2-utils multilib python autotools
inherit eutils gnome2-utils multilib python vala virtualx

DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
HOMEPAGE="http://code.google.com/p/ibus/"
Expand All @@ -14,42 +16,48 @@ SRC_URI="http://ibus.googlecode.com/files/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
IUSE="dconf doc +gconf gtk +gtk3 +introspection nls +python vala +X"
REQUIRED_USE="|| ( gtk gtk3 X )" #342903
IUSE="dconf deprecated +gconf gtk +gtk3 +introspection nls +python test vala +X"
REQUIRED_USE="|| ( gtk gtk3 X )
deprecated? ( python )
python? ( || ( deprecated ( gtk3 introspection ) ) )" #342903

RDEPEND=">=dev-libs/glib-2.26
dconf? ( >=gnome-base/dconf-0.7.5 )
gconf? ( >=gnome-base/gconf-2.12:2 )
gnome-base/librsvg
COMMON_DEPEND=">=dev-libs/glib-2.26:2
gnome-base/librsvg:2
sys-apps/dbus[X?]
app-text/iso-codes
dconf? ( >=gnome-base/dconf-0.13.4 )
gconf? ( >=gnome-base/gconf-2.12:2 )
gtk? ( x11-libs/gtk+:2 )
gtk3? ( x11-libs/gtk+:3 )
X? (
x11-libs/libX11
x11-libs/gtk+:2
)
x11-libs/gtk+:2 )
introspection? ( >=dev-libs/gobject-introspection-0.6.8 )
python? (
dev-python/notify-python
>=dev-python/dbus-python-0.83
)
nls? ( virtual/libintl )"
# X? ( x11-libs/libX11 )
# gtk? ( x11-libs/gtk+:2 x11-libs/gtk+:3 )
# vala? ( dev-lang/vala )
DEPEND="${RDEPEND}
>=dev-lang/perl-5.8.1
dev-util/intltool
virtual/pkgconfig
doc? ( >=dev-util/gtk-doc-1.9 )
nls? ( >=sys-devel/gettext-0.16.1 )"
RDEPEND="${RDEPEND}
RDEPEND="${COMMON_DEPEND}
python? (
dev-python/pygtk
dev-python/pyxdg
deprecated? (
>=dev-python/dbus-python-0.83
dev-python/pygobject:2
dev-python/pygtk:2 )
gtk3? (
dev-python/pygobject:3
x11-libs/gdk-pixbuf:2[introspection]
x11-libs/pango[introspection]
x11-libs/gtk+:3[introspection] )
)"
DEPEND="${COMMON_DEPEND}
>=dev-lang/perl-5.8.1
dev-util/gtk-doc-am
dev-util/intltool
virtual/pkgconfig
nls? ( >=sys-devel/gettext-0.16.1 )
vala? ( $(vala_depend) )"

# stress test in bus/ fails
# IBUS-CRITICAL **: bus_test_client_init: assertion `ibus_bus_is_connected (_bus)' failed
RESTRICT="test"

DOCS="AUTHORS ChangeLog NEWS README"
Expand All @@ -62,32 +70,41 @@ pkg_setup() {
}

src_prepare() {
>py-compile #397497
echo ibus/_config.py >> po/POTFILES.skip

epatch \
"${FILESDIR}"/${PN}-gconf-2.m4.patch

eautoreconf
# We run "dconf update" in pkg_postinst/postrm to avoid sandbox violations
sed -e 's/dconf update/$(NULL)/' \
-i data/dconf/Makefile.{am,in} || die
use python && python_clean_py-compile_files
use vala && vala_src_prepare
}

src_configure() {
# We cannot call $(PYTHON) if we haven't called python_pkg_setup
use python && PYTHON=$(PYTHON) || PYTHON=
local python_conf
if use python; then
# We cannot call $(PYTHON) if we haven't called python_pkg_setup
python_conf="PYTHON=$(PYTHON)
$(use_enable deprecated python-library)
$(use_enable gtk3 setup)"
else
python_conf="--disable-python-library --disable-setup"
fi
econf \
$(use_enable dconf) \
$(use_enable doc gtk-doc) \
$(use_enable doc gtk-doc-html) \
$(use_enable introspection) \
$(use_enable gconf) \
$(use_enable gtk gtk2) \
$(use_enable gtk xim) \
$(use_enable gtk3) \
$(use_enable gtk3 ui) \
$(use_enable nls) \
$(use_enable python) \
$(use_enable test tests) \
$(use_enable vala) \
$(use_enable X xim) \
PYTHON="${PYTHON}"
${python_conf}
}

src_test() {
unset DBUS_SESSION_BUS_ADDRESS
Xemake check || die
}

src_install() {
Expand All @@ -107,10 +124,16 @@ pkg_preinst() {
}

pkg_postinst() {
if use dconf; then
ebegin "Updating dconf system databases"
dconf update
eend $?
fi
use gconf && gnome2_gconf_install
use gtk && update_gtk_immodules
use gtk3 && update_gtk3_immodules
use python && python_mod_optimize /usr/share/${PN}
use gtk && gnome2_query_immodules_gtk2
use gtk3 && gnome2_query_immodules_gtk3
use deprecated && python_mod_optimize ${PN}
use python && use gtk3 && python_mod_optimize /usr/share/${PN}
gnome2_icon_cache_update

elog "To use ibus, you should:"
Expand All @@ -132,8 +155,14 @@ pkg_postinst() {
}

pkg_postrm() {
use gtk && gnome2_query_immmodules_gtk2
use gtk3 && gnome2_query_immmodules_gtk3
use python && python_mod_cleanup /usr/share/${PN}
if use dconf; then
ebegin "Updating dconf system databases"
dconf update
eend $?
fi
use gtk && gnome2_query_immodules_gtk2
use gtk3 && gnome2_query_immodules_gtk3
use deprecated && python_mod_cleanup ${PN}
use python && use gtk3 && python_mod_cleanup /usr/share/${PN}
gnome2_icon_cache_update
}

0 comments on commit 1cbf969

Please sign in to comment.