1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 VALA_MIN_API_VERSION="0.16"
7 VALA_USE_DEPEND="vapigen"
9 PYTHON_COMPAT=( python2_7 )
11 inherit autotools eutils multilib-minimal python-single-r1 vala
13 DESCRIPTION="A library to allow applications to export a menu into the Unity Menu bar"
14 HOMEPAGE="http://launchpad.net/libappindicator"
15 SRC_URI="http://launchpad.net/${PN}/${PV%.*}/${PV}/+download/${P}.tar.gz"
17 LICENSE="LGPL-2.1 LGPL-3"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="+introspection python"
23 >=dev-libs/dbus-glib-0.98[${MULTILIB_USEDEP}]
24 >=dev-libs/glib-2.26:2[${MULTILIB_USEDEP}]
25 >=dev-libs/libdbusmenu-0.6.2[gtk,${MULTILIB_USEDEP}]
26 >=dev-libs/libindicator-12.10.0:0[${MULTILIB_USEDEP}]
27 x11-libs/gtk+:2[${MULTILIB_USEDEP},introspection?]
28 introspection? ( >=dev-libs/gobject-introspection-1 )
29 python? ( ${PYTHON_DEPS} )
32 virtual/pkgconfig[${MULTILIB_USEDEP}]
33 introspection? ( $(vala_depend) )
35 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
38 use python && python-single-r1_pkg_setup
43 sed -i -e 's/ -Werror//' {src,tests}/Makefile.{am,in} || die
45 epatch "${FILESDIR}"/${P}-conditional-py-bindings.patch
48 # Disable MONO for now because of https://bugs.gentoo.org/382491
49 sed -i -e '/^MONO_REQUIRED_VERSION/s:=.*:=9999:' configure || die
52 multilib_src_configure() {
53 if multilib_is_native_abi; then
54 local -x VALAC VAPIGEN_VAPIDIR PKG_CONFIG_PATH
55 use introspection && vala_src_prepare
60 --disable-silent-rules \
63 $(multilib_native_use_enable introspection) \
64 $(multilib_native_use_enable python)
67 multilib_src_install() {
68 emake -j1 DESTDIR="${D}" install
71 multilib_src_install_all() {
72 dodoc AUTHORS ChangeLog
74 prune_libtool_files --modules
76 # installed by slot 3 as well
77 rm -r "${D}"usr/share/gtk-doc || die