f678ef39697c2e94ef1aac04e5cf8be6fa9b31e8
[gentoo.git] / gnome-base / gnome-desktop / gnome-desktop-3.32.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit gnome.org gnome2-utils meson virtualx xdg
6
7 DESCRIPTION="Library with common API for various GNOME modules"
8 HOMEPAGE="https://gitlab.gnome.org/GNOME/gnome-desktop/"
9 SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz"
10
11 LICENSE="GPL-2+ LGPL-2+ FDL-1.1+"
12 SLOT="3/17" # subslot = libgnome-desktop-3 soname version
13 IUSE="debug gtk-doc +introspection seccomp udev"
14 KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
15
16 # cairo[X] needed for gnome-bg
17 COMMON_DEPEND="
18         >=x11-libs/gdk-pixbuf-2.36.5:2[introspection?]
19         >=x11-libs/gtk+-3.3.6:3[X,introspection?]
20         >=dev-libs/glib-2.53.0:2
21         >=gnome-base/gsettings-desktop-schemas-3.27.0[introspection?]
22         x11-misc/xkeyboard-config
23         app-text/iso-codes
24         x11-libs/libX11
25         udev? (
26                 sys-apps/hwids
27                 virtual/libudev:= )
28         seccomp? ( sys-libs/libseccomp )
29
30         x11-libs/cairo:=[X]
31         introspection? ( >=dev-libs/gobject-introspection-1.54:= )
32 "
33 DEPEND="${COMMON_DEPEND}
34         media-libs/fontconfig
35 "
36 RDEPEND="${COMMON_DEPEND}
37         seccomp? ( sys-apps/bubblewrap )
38 "
39 BDEPEND="
40         app-text/docbook-xml-dtd:4.1.2
41         dev-util/gdbus-codegen
42         gtk-doc? ( >=dev-util/gtk-doc-1.14 )
43         dev-util/itstool
44         >=sys-devel/gettext-0.19.8
45         x11-base/xorg-proto
46         virtual/pkgconfig
47 "
48 # Includes X11/Xatom.h in libgnome-desktop/gnome-bg.c which comes from xorg-proto
49
50 PATCHES=(
51         # Translation updates and nvidia builtin display detection fix from origin/gnome-3-32
52         "${WORKDIR}"/patches/
53         "${FILESDIR}"/${PV}-optional-introspection.patch # add introspection meson option
54         "${FILESDIR}"/${PV}-fix-tests-without-locale.patch # fix tests when he_IL.utf8 or other tested locales not present
55 )
56
57 src_prepare() {
58         # Don't build manual test programs that will never get run
59         sed -i -e "/'test-.*'/d" libgnome-desktop/meson.build || die
60         xdg_src_prepare
61 }
62
63 src_configure() {
64         local emesonargs=(
65                 -Dgnome_distributor=Gentoo
66                 -Ddate_in_gnome_version=true
67                 -Ddesktop_docs=true
68                 $(meson_use debug debug_tools)
69                 $(meson_use introspection)
70                 $(meson_feature udev)
71                 $(meson_use gtk-doc gtk_doc)
72                 -Dinstalled_tests=false
73         )
74         meson_src_configure
75 }
76
77 src_test() {
78         virtx meson_src_test
79 }