sys-fs/ntfs3g: x86 stable wrt bug #717640
[gentoo.git] / sys-fs / fuse / fuse-3.8.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7,8} )
6
7 inherit meson multilib-minimal flag-o-matic udev python-any-r1
8
9 DESCRIPTION="An interface for filesystems implemented in userspace"
10 HOMEPAGE="https://github.com/libfuse/libfuse"
11 SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.xz"
12
13 LICENSE="GPL-2 LGPL-2.1"
14 SLOT="3"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
16 IUSE="+suid test"
17 RESTRICT="!test? ( test )"
18
19 BDEPEND="virtual/pkgconfig
20         test? (
21                 ${PYTHON_DEPS}
22                 $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
23         )"
24 RDEPEND=">=sys-fs/fuse-common-3.3.0-r1"
25
26 DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt )
27
28 python_check_deps() {
29         has_version "dev-python/pytest[${PYTHON_USEDEP}]"
30 }
31
32 pkg_setup() {
33         use test && python-any-r1_pkg_setup
34 }
35
36 src_prepare() {
37         default
38
39         # lto not supported yet -- https://github.com/libfuse/libfuse/issues/198
40         filter-flags '-flto*'
41
42         # passthough_ll is broken on systems with 32-bit pointers
43         cat /dev/null > example/meson.build || die
44 }
45
46 multilib_src_configure() {
47         local emesonargs=(
48                 -Duseroot=false
49                 -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
50         )
51         meson_src_configure
52 }
53
54 multilib_src_compile() {
55         eninja
56 }
57
58 multilib_src_test() {
59         ${EPYTHON} -m pytest test || die
60 }
61
62 multilib_src_install() {
63         DESTDIR="${D}" eninja install
64 }
65
66 multilib_src_install_all() {
67         einstalldocs
68
69         # installed via fuse-common
70         rm -r "${ED}"/{etc,$(get_udevdir)} || die
71
72         # useroot=false prevents the build system from doing this.
73         use suid && fperms u+s /usr/bin/fusermount3
74
75         # manually install man pages to respect compression
76         rm -r "${ED}"/usr/share/man || die
77         doman doc/{fusermount3.1,mount.fuse3.8}
78 }