1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7,8} )
7 inherit meson multilib-minimal flag-o-matic udev python-any-r1
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"
13 LICENSE="GPL-2 LGPL-2.1"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
17 RESTRICT="!test? ( test )"
19 BDEPEND="virtual/pkgconfig
22 $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
24 RDEPEND=">=sys-fs/fuse-common-3.3.0-r1"
26 DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt )
29 has_version "dev-python/pytest[${PYTHON_USEDEP}]"
33 use test && python-any-r1_pkg_setup
39 # lto not supported yet -- https://github.com/libfuse/libfuse/issues/198
42 # passthough_ll is broken on systems with 32-bit pointers
43 cat /dev/null > example/meson.build || die
46 multilib_src_configure() {
49 -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
54 multilib_src_compile() {
59 ${EPYTHON} -m pytest test || die
62 multilib_src_install() {
63 DESTDIR="${D}" eninja install
66 multilib_src_install_all() {
69 # installed via fuse-common
70 rm -r "${ED}"/{etc,$(get_udevdir)} || die
72 # useroot=false prevents the build system from doing this.
73 use suid && fperms u+s /usr/bin/fusermount3
75 # manually install man pages to respect compression
76 rm -r "${ED}"/usr/share/man || die
77 doman doc/{fusermount3.1,mount.fuse3.8}