virtual/pypy3: Bump to 6.0.0
[gentoo.git] / app-editors / gedit-plugins / gedit-plugins-3.22.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5 GNOME2_LA_PUNT="yes" # plugins are dlopened
6 PYTHON_COMPAT=( python3_{4,5,6} )
7 PYTHON_REQ_USE="xml"
8 VALA_MIN_API_VERSION="0.28"
9
10 inherit eutils gnome2 multilib python-single-r1 vala
11
12 DESCRIPTION="Official plugins for gedit"
13 HOMEPAGE="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins"
14
15 LICENSE="GPL-2+"
16 KEYWORDS="amd64 x86"
17 SLOT="0"
18
19 IUSE_plugins="charmap git terminal vala zeitgeist"
20 IUSE="+python ${IUSE_plugins}"
21 # python-single-r1 would request disabling PYTHON_TARGETS on libpeas
22 REQUIRED_USE="
23         charmap? ( python )
24         git? ( python )
25         python? ( ${PYTHON_REQUIRED_USE} )
26         terminal? ( python )
27         zeitgeist? ( python )
28 "
29
30 RDEPEND="
31         >=app-editors/gedit-3.16
32         >=dev-libs/glib-2.32:2
33         >=dev-libs/libpeas-1.7.0[gtk]
34         >=x11-libs/gtk+-3.9:3
35         >=x11-libs/gtksourceview-3.21.3:3.0
36         python? (
37                 ${PYTHON_DEPS}
38                 >=app-editors/gedit-3.16[introspection,python,${PYTHON_USEDEP}]
39                 dev-libs/libpeas[python,${PYTHON_USEDEP}]
40                 >=dev-python/dbus-python-0.82[${PYTHON_USEDEP}]
41                 dev-python/pycairo[${PYTHON_USEDEP}]
42                 dev-python/pygobject:3[cairo,${PYTHON_USEDEP}]
43                 >=x11-libs/gtk+-3.9:3[introspection]
44                 >=x11-libs/gtksourceview-3.14:3.0[introspection]
45                 x11-libs/pango[introspection]
46                 x11-libs/gdk-pixbuf:2[introspection]
47         )
48         charmap? ( >=gnome-extra/gucharmap-3:2.90[introspection] )
49         git? ( >=dev-libs/libgit2-glib-0.0.6 )
50         terminal? ( x11-libs/vte:2.91[introspection] )
51         vala? ( $(vala_depend) )
52         zeitgeist? ( >=gnome-extra/zeitgeist-0.9.12[introspection] )
53 "
54 DEPEND="${RDEPEND}
55         app-text/yelp-tools
56         >=dev-util/intltool-0.40.0
57         >=sys-devel/gettext-0.17
58         virtual/pkgconfig
59 "
60
61 pkg_setup() {
62         use python && [[ ${MERGE_TYPE} != binary ]] && python-single-r1_pkg_setup
63 }
64
65 src_prepare() {
66         use vala && vala_src_prepare
67         gnome2_src_prepare
68 }
69
70 src_configure() {
71         gnome2_src_configure \
72                 $(use_enable python) \
73                 $(use_enable vala) \
74                 $(use_enable zeitgeist)
75 }
76
77 src_install() {
78         gnome2_src_install
79
80         # FIXME: crazy !!!
81         if use python; then
82                 find "${ED}"/usr/share/gedit -name "*.py*" -delete || die
83                 find "${ED}"/usr/share/gedit -type d -empty -delete || die
84         fi
85
86         # FIXME: upstream made this automagic...
87         clean_plugin charmap
88         clean_plugin git
89         clean_plugin terminal
90 }
91
92 clean_plugin() {
93         if use !${1} ; then
94                 rm -rf "${ED}"/usr/share/gedit/plugins/${1}*
95                 rm -rf "${ED}"/usr/$(get_libdir)/gedit/plugins/${1}*
96         fi
97 }