*/*: Discontinue Gentoo SuperH port
[gentoo.git] / gnome-base / gvfs / gvfs-1.42.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 SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${PF}-patchset.tar.xz"
11
12 LICENSE="LGPL-2+"
13 SLOT="0"
14
15 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"
16 RESTRICT="!test? ( test )"
17 # elogind/systemd only relevant to udisks (in v1.38.1)
18 REQUIRED_USE="
19         ?? ( elogind systemd )
20         cdda? ( udev )
21         google? ( gnome-online-accounts )
22         gphoto2? ( udev )
23         mtp? ( udev )
24         udisks? ( udev )
25 "
26 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
27
28 RDEPEND="
29         >=dev-libs/glib-2.57.2:2
30         >=gnome-base/gsettings-desktop-schemas-3.33.0
31         afp? ( >=dev-libs/libgcrypt-1.2.2:0= )
32         sys-apps/dbus
33         app-crypt/gcr:=
34         policykit? (
35                 >=sys-auth/polkit-0.114
36                 sys-libs/libcap )
37         http? (
38                 dev-libs/libxml2:2
39                 >=net-libs/libsoup-2.58.0:2.4 )
40         zeroconf? ( >=net-dns/avahi-0.6[dbus] )
41         udev? ( >=dev-libs/libgudev-147:= )
42         fuse? ( >=sys-fs/fuse-3.0.0:3 )
43         udisks? ( >=sys-fs/udisks-1.97:2 )
44         systemd? ( >=sys-apps/systemd-206:0= )
45         elogind? ( >=sys-auth/elogind-229:0= )
46         ios? (
47                 >=app-pda/libimobiledevice-1.2:=
48                 >=app-pda/libplist-1:= )
49         gnome-online-accounts? ( >=net-libs/gnome-online-accounts-3.17.1:= )
50         gnome-keyring? ( app-crypt/libsecret )
51         bluray? ( media-libs/libbluray:= )
52         mtp? (
53                 >=dev-libs/libusb-1.0.21
54                 >=media-libs/libmtp-1.1.15 )
55         samba? ( >=net-fs/samba-4[client] )
56         archive? ( app-arch/libarchive:= )
57         cdda? (
58                 dev-libs/libcdio:0=
59                 >=dev-libs/libcdio-paranoia-0.78.2 )
60         google? ( >=dev-libs/libgdata-0.17.9:=[crypt,gnome-online-accounts] )
61         gphoto2? ( >=media-libs/libgphoto2-2.5.0:= )
62         nfs? ( >=net-fs/libnfs-1.9.8 )
63         net-misc/openssh
64 "
65 DEPEND="${RDEPEND}"
66 BDEPEND="
67         >=dev-util/meson-0.49
68         dev-util/glib-utils
69         app-text/docbook-xsl-stylesheets
70         app-text/docbook-xml-dtd:4.2
71         dev-libs/libxslt
72         >=sys-devel/gettext-0.19.8
73         virtual/pkgconfig
74         dev-util/gdbus-codegen
75 "
76
77 PATCHES=(
78         "${WORKDIR}"/patches
79 )
80
81 src_configure() {
82         local enable_logind="false"
83         if use systemd || use elogind; then
84                 enable_logind="true"
85         fi
86
87         local enable_gcrypt="false"
88         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
89                 enable_gcrypt="true"
90         fi
91
92         local enable_libusb="false"
93         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
94                 enable_libusb="true"
95         fi
96
97         local emesonargs=(
98                 -Dsystemduserunitdir="$(systemd_get_userunitdir)"
99                 -Dtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
100                 $(meson_use policykit admin)
101                 $(meson_use ios afc)
102                 $(meson_use afp)
103                 $(meson_use archive)
104                 $(meson_use cdda)
105                 $(meson_use zeroconf dnssd)
106                 $(meson_use gnome-online-accounts goa)
107                 $(meson_use google)
108                 $(meson_use gphoto2)
109                 $(meson_use http)
110                 $(meson_use mtp)
111                 $(meson_use nfs)
112                 -Dsftp=true
113                 $(meson_use samba smb)
114                 $(meson_use udisks udisks2)
115                 $(meson_use bluray)
116                 $(meson_use fuse)
117                 -Dgcr=true
118                 -Dgcrypt=${enable_gcrypt}
119                 $(meson_use udev gudev)
120                 $(meson_use gnome-keyring keyring)
121                 -Dlogind=${enable_logind}
122                 -Dlibusb=${enable_libusb}
123                 -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
124                 -Dinstalled_tests=false
125                 -Dman=true
126         )
127         meson_src_configure
128 }
129
130 pkg_postinst() {
131         xdg_pkg_postinst
132         gnome2_schemas_update
133         gnome2_giomodule_cache_update
134 }
135
136 pkg_postrm() {
137         xdg_pkg_postrm
138         gnome2_schemas_update
139         gnome2_giomodule_cache_update
140 }