gnome-extra/gucharmap: amd64 stable wrt bug #691430
[gentoo.git] / gnome-extra / gucharmap / gucharmap-11.0.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 VALA_USE_DEPEND="vapigen"
6
7 inherit gnome2 vala versionator
8
9 DESCRIPTION="Unicode character map viewer and library"
10 HOMEPAGE="https://wiki.gnome.org/Apps/Gucharmap"
11
12 LICENSE="GPL-3+"
13 SLOT="2.90"
14 KEYWORDS="alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~sh sparc x86 ~x86-fbsd"
15
16 IUSE="debug +introspection test vala"
17 REQUIRED_USE="vala? ( introspection )"
18
19 UNICODE_VERSION=$(get_version_component_range 1-2)
20
21 COMMON_DEPEND="
22         =app-i18n/unicode-data-${UNICODE_VERSION}*
23         >=dev-libs/glib-2.32:2
24         >=x11-libs/pango-1.2.1[introspection?]
25         >=x11-libs/gtk+-3.16:3[introspection?]
26         media-libs/freetype:2
27         introspection? ( >=dev-libs/gobject-introspection-0.9.0:= )
28 "
29 RDEPEND="${COMMON_DEPEND}
30         !<gnome-extra/gucharmap-3:0
31 "
32 DEPEND="${RDEPEND}
33         dev-util/desktop-file-utils
34         dev-util/glib-utils
35         >=dev-util/gtk-doc-am-1
36         >=dev-util/intltool-0.40
37         dev-util/itstool
38         sys-devel/gettext
39         virtual/pkgconfig
40         test? ( app-text/docbook-xml-dtd:4.1.2 )
41         vala? ( $(vala_depend) )
42 "
43
44 src_prepare() {
45         # prevent file collisions with slot 0
46         sed -e "s:GETTEXT_PACKAGE=gucharmap$:GETTEXT_PACKAGE=gucharmap-${SLOT}:" \
47                 -i configure.ac configure || die "sed configure.ac configure failed"
48
49         # avoid autoreconf
50         sed -e 's/-Wall //g' -i configure || die "sed failed"
51
52         use vala && vala_src_prepare
53         gnome2_src_prepare
54 }
55
56 src_configure() {
57         # unihan is not really conditional
58         # https://bugzilla.gnome.org/show_bug.cgi?id=768210#c5
59         # https://gitlab.gnome.org/GNOME/gucharmap/issues/13
60         gnome2_src_configure \
61                 --disable-static \
62                 --with-unicode-data=/usr/share/unicode-data \
63                 $(usex debug --enable-debug=yes ' ') \
64                 $(use_enable introspection) \
65                 $(use_enable vala)
66 }