gnome-base/gnome: bump to 3.34.4
[gentoo.git] / gnome-base / gvfs / gvfs-1.40.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit gnome.org gnome2-utils meson systemd xdg
7
8 DESCRIPTION="Virtual filesystem implementation for GIO"
9 HOMEPAGE="https://wiki.gnome.org/Projects/gvfs"
10
11 LICENSE="LGPL-2+"
12 SLOT="0"
13
14 IUSE="afp archive bluray cdda elogind fuse google gnome-keyring gnome-online-accounts gphoto2 +http ios mtp nfs policykit samba systemd test +udev udisks zeroconf"
15 RESTRICT="!test? ( test )"
16 # elogind/systemd only relevant to udisks (in v1.38.1)
17 REQUIRED_USE="
18         ?? ( elogind systemd )
19         cdda? ( udev )
20         google? ( gnome-online-accounts )
21         gphoto2? ( udev )
22         mtp? ( udev )
23         udisks? ( udev )
24 "
25 KEYWORDS="~alpha amd64 arm arm64 ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
26
27 RDEPEND="
28         >=dev-libs/glib-2.57.2:2
29         afp? ( >=dev-libs/libgcrypt-1.2.2:0= )
30         sys-apps/dbus
31         app-crypt/gcr:=
32         policykit? (
33                 >=sys-auth/polkit-0.114
34                 sys-libs/libcap )
35         http? (
36                 dev-libs/libxml2:2
37                 >=net-libs/libsoup-2.58.0:2.4 )
38         zeroconf? ( >=net-dns/avahi-0.6[dbus] )
39         udev? ( >=dev-libs/libgudev-147:= )
40         fuse? ( >=sys-fs/fuse-2.8.0:0 )
41         udisks? ( >=sys-fs/udisks-1.97:2 )
42         systemd? ( >=sys-apps/systemd-206:0= )
43         elogind? ( >=sys-auth/elogind-229:0= )
44         ios? (
45                 >=app-pda/libimobiledevice-1.2:=
46                 >=app-pda/libplist-1:= )
47         gnome-online-accounts? ( >=net-libs/gnome-online-accounts-3.17.1:= )
48         gnome-keyring? ( app-crypt/libsecret )
49         bluray? ( media-libs/libbluray:= )
50         mtp? (
51                 >=dev-libs/libusb-1.0.21
52                 >=media-libs/libmtp-1.1.15 )
53         samba? ( >=net-fs/samba-4[client] )
54         archive? ( app-arch/libarchive:= )
55         cdda? (
56                 dev-libs/libcdio:0=
57                 >=dev-libs/libcdio-paranoia-0.78.2 )
58         google? ( >=dev-libs/libgdata-0.17.9:=[crypt,gnome-online-accounts] )
59         gphoto2? ( >=media-libs/libgphoto2-2.5.0:= )
60         nfs? ( >=net-fs/libnfs-1.9.8 )
61         net-misc/openssh
62 "
63 DEPEND="${RDEPEND}"
64 BDEPEND="
65         >=dev-util/meson-0.49
66         dev-util/glib-utils
67         app-text/docbook-xsl-stylesheets
68         app-text/docbook-xml-dtd:4.2
69         dev-libs/libxslt
70         >=sys-devel/gettext-0.19.8
71         virtual/pkgconfig
72         dev-util/gdbus-codegen
73 "
74
75 PATCHES=(
76         # from gnome-3-32 branch, fixes RPATH of libgvfsdaemon.so
77         "${FILESDIR}"/${PV}-gvfsdaemon-rpath.patch
78 )
79
80 src_configure() {
81         local enable_logind="false"
82         if use systemd || use elogind; then
83                 enable_logind="true"
84         fi
85
86         local enable_gcrypt="false"
87         if use afp; then # currently HAVE_GCRYPT and linkage only used with afp; check it on big bumps (grep for HAVE_GCRYPT and enable_gcrypt); adjust depends if changes
88                 enable_gcrypt="true"
89         fi
90
91         local enable_libusb="false"
92         if use mtp; then # currently HAVE_LIBUSB and linkage only used with mtp; check it on big bumps (grep for HAVE_LIBUSB and enable_libusb); adjust depends if changes
93                 enable_libusb="true"
94         fi
95
96         local emesonargs=(
97                 -Dsystemduserunitdir="$(systemd_get_userunitdir)"
98                 -Dtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
99                 $(meson_use policykit admin)
100                 $(meson_use ios afc)
101                 $(meson_use afp)
102                 $(meson_use archive)
103                 $(meson_use cdda)
104                 $(meson_use zeroconf dnssd)
105                 $(meson_use gnome-online-accounts goa)
106                 $(meson_use google)
107                 $(meson_use gphoto2)
108                 $(meson_use http)
109                 $(meson_use mtp)
110                 $(meson_use nfs)
111                 -Dsftp=true
112                 $(meson_use samba smb)
113                 $(meson_use udisks udisks2)
114                 $(meson_use bluray)
115                 $(meson_use fuse)
116                 -Dgcr=true
117                 -Dgcrypt=${enable_gcrypt}
118                 $(meson_use udev gudev)
119                 $(meson_use gnome-keyring keyring)
120                 -Dlogind=${enable_logind}
121                 -Dlibusb=${enable_libusb}
122                 -Ddevel_utils=false # wouldn't install any of it as of 1.38.1; some tests need it, but they aren't automated tests in v1.38.1
123                 -Dinstalled_tests=false
124                 -Dman=true
125         )
126         meson_src_configure
127 }
128
129 pkg_postinst() {
130         xdg_pkg_postinst
131         gnome2_schemas_update
132         gnome2_giomodule_cache_update
133 }
134
135 pkg_postrm() {
136         xdg_pkg_postrm
137         gnome2_schemas_update
138         gnome2_giomodule_cache_update
139 }