*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / app-office / gnumeric / gnumeric-1.12.44.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5 GNOME2_LA_PUNT="yes"
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit gnome2 flag-o-matic python-r1
9
10 DESCRIPTION="The GNOME Spreadsheet"
11 HOMEPAGE="http://www.gnumeric.org/"
12 LICENSE="GPL-2"
13
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16
17 IUSE="+introspection libgda perl python"
18 # python-loader plugin is python2.7 only
19 REQUIRED_USE="
20         introspection? ( ${PYTHON_REQUIRED_USE} )
21         python? ( || ( $(python_gen_useflags -2) ) )"
22
23 # Missing gnome-extra/libgnomedb required version in tree
24 # but its upstream is dead and will be dropped soon.
25
26 # lots of missing files, also fails tests due to 80-bit long story
27 # upstream bug #721556
28 RESTRICT="test"
29
30 RDEPEND="
31         app-arch/bzip2
32         sys-libs/zlib
33         >=dev-libs/glib-2.40.0:2
34         >=gnome-extra/libgsf-1.14.33:=
35         >=x11-libs/goffice-0.10.42:0.10
36         >=dev-libs/libxml2-2.4.12:2
37         >=x11-libs/pango-1.24.0:=
38
39         >=x11-libs/gtk+-3.8.7:3
40         x11-libs/cairo:=[svg]
41
42         introspection? ( ${PYTHON_DEPS}
43         >=dev-libs/gobject-introspection-1:= )
44         perl? ( dev-lang/perl:= )
45         python? ( $(python_gen_impl_dep '' -2)
46                 >=dev-python/pygobject-3:3[${PYTHON_USEDEP}] )
47         libgda? ( gnome-extra/libgda:5[gtk] )
48 "
49 DEPEND="${RDEPEND}
50         app-text/docbook-xml-dtd:4.5
51         app-text/yelp-tools
52         dev-util/gtk-doc-am
53         >=dev-util/intltool-0.35.0
54         virtual/pkgconfig
55 "
56
57 src_prepare() {
58         # Manage gi overrides ourselves
59         sed '/SUBDIRS/ s/introspection//' -i Makefile.{am,in} || die
60         gnome2_src_prepare
61 }
62
63 src_configure() {
64         if use python ; then
65                 python_setup -2
66         fi
67         gnome2_src_configure \
68                 --disable-static \
69                 --with-zlib \
70                 $(use_with libgda gda) \
71                 $(use_enable introspection) \
72                 $(use_with perl) \
73                 $(use_with python)
74 }
75
76 src_install() {
77         gnome2_src_install
78         if use introspection; then
79                 python_moduleinto gi.overrides
80                 python_foreach_impl python_domodule introspection/gi/overrides/Gnm.py
81         fi
82 }