app-editors/vim-core: stable 8.2.0360 for sparc, bug #715732
[gentoo.git] / app-editors / gedit / gedit-3.34.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7,8} )
6 VALA_MIN_API_VERSION="0.26"
7 VALA_USE_DEPEND="vapigen"
8
9 inherit gnome.org gnome2-utils meson python-single-r1 vala xdg
10
11 DESCRIPTION="A text editor for the GNOME desktop"
12 HOMEPAGE="https://wiki.gnome.org/Apps/Gedit"
13
14 LICENSE="GPL-2+ CC-BY-SA-3.0"
15 SLOT="0"
16
17 IUSE="+introspection +python gtk-doc spell vala"
18 REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} ) spell? ( python )"
19
20 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
21
22 # X libs are not needed for OSX (aqua)
23 DEPEND="
24         >=dev-libs/glib-2.44:2
25         >=x11-libs/gtk+-3.22.0:3[introspection?]
26         >=x11-libs/gtksourceview-4.0.2:4[introspection?]
27         >=dev-libs/libpeas-1.14.1[gtk]
28         >=dev-libs/libxml2-2.5.0:2
29         >=net-libs/libsoup-2.60:2.4
30         x11-libs/libX11
31
32         spell? ( >=app-text/gspell-0.2.5:0= )
33         introspection? ( >=dev-libs/gobject-introspection-1.54:= )
34         python? (
35                 ${PYTHON_DEPS}
36                 $(python_gen_cond_dep '
37                         dev-python/pycairo[${PYTHON_MULTI_USEDEP}]
38                         >=dev-python/pygobject-3:3[cairo,${PYTHON_MULTI_USEDEP}]
39                         dev-libs/libpeas[python,${PYTHON_SINGLE_USEDEP}]
40                 ')
41         )
42 "
43 RDEPEND="${DEPEND}
44         x11-themes/adwaita-icon-theme
45         gnome-base/gsettings-desktop-schemas
46         gnome-base/gvfs
47 "
48 BDEPEND="
49         ${vala_depend}
50         app-text/docbook-xml-dtd:4.1.2
51         dev-util/glib-utils
52         gtk-doc? ( >=dev-util/gtk-doc-1 )
53         dev-util/itstool
54         >=sys-devel/gettext-0.18
55         virtual/pkgconfig
56 "
57 PATCHES=(
58         "${FILESDIR}"/3.32.2-make-spell-optional.patch
59 )
60
61 pkg_setup() {
62         use python && python-single-r1_pkg_setup
63 }
64
65 src_prepare() {
66         use vala && vala_src_prepare
67         xdg_src_prepare
68 }
69
70 src_configure() {
71         local emesonargs=(
72                 $(meson_use introspection)
73                 $(meson_use vala vapi)
74                 $(meson_use python plugins)
75                 $(meson_use gtk-doc documentation)
76                 -Denable-gvfs-metadata=yes
77                 $(meson_use spell)
78         )
79         meson_src_configure
80 }
81
82 # Only appdata and desktop file validation in v3.32.2
83 src_test() { :; }
84
85 src_install() {
86         meson_src_install
87         if use python; then
88                 python_optimize
89                 python_optimize "${ED}/usr/$(get_libdir)/gedit/plugins/"
90         fi
91 }
92
93 pkg_postinst() {
94         xdg_pkg_postinst
95         gnome2_schemas_update
96 }
97
98 pkg_postrm() {
99         xdg_pkg_postrm
100         gnome2_schemas_update
101 }