Diff fuse-2.9.9-r2 with a fuse-3.15.0

/usr/portage/sys-fs/fuse/fuse-3.15.0.ebuild 2023-10-09 14:52:35.512368502 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit autotools flag-o-matic linux-info udev
6
PYTHON_COMPAT=( python3_{10..11} )
7
inherit flag-o-matic meson-multilib udev python-any-r1
7 8

  
8 9
DESCRIPTION="An interface for filesystems implemented in userspace"
9 10
HOMEPAGE="https://github.com/libfuse/libfuse"
10
SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.gz"
11
# For bug #809920 to avoid a gettext dependency
12
# extracted from sys-devel/gettext-0.21-r1
13
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/iconv.m4.bz2"
14

  
15
LICENSE="GPL-2"
16
SLOT="0"
17
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
18
IUSE="examples static-libs"
11
SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.xz"
19 12

  
20
BDEPEND="sys-devel/gettext
21
	virtual/pkgconfig"
13
LICENSE="GPL-2 LGPL-2.1"
14
SLOT="3"
15
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
16
IUSE="+suid test"
17
RESTRICT="!test? ( test ) test? ( userpriv )"
18

  
19
BDEPEND="
20
	virtual/pkgconfig
21
	test? (
22
		${PYTHON_DEPS}
23
		$(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
24
	)
25
"
22 26
RDEPEND=">=sys-fs/fuse-common-3.3.0-r1"
23 27

  
24
PATCHES=(
25
	"${FILESDIR}"/${PN}-2.9.3-kernel-types.patch
26
	"${FILESDIR}"/${PN}-2.9.9-avoid-calling-umount.patch
27
	"${FILESDIR}"/${PN}-2.9.9-closefrom-glibc-2-34.patch
28
)
28
DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt )
29 29

  
30
pkg_setup() {
31
	if use kernel_linux ; then
32
		CONFIG_CHECK="~FUSE_FS"
33
		WARNING_FUSE_FS="You need to have FUSE module built to use user-mode utils"
34
		linux-info_pkg_setup
35
	fi
30
python_check_deps() {
31
	python_has_version "dev-python/pytest[${PYTHON_USEDEP}]"
36 32
}
37 33

  
38
src_prepare() {
39
	default
40

  
41
	# Can be dropped along with additional SRC_URI if dropping eautoreconf
42
	cp "${WORKDIR}"/iconv.m4 m4/ || die
43
	eautoreconf
34
pkg_setup() {
35
	use test && python-any-r1_pkg_setup
44 36
}
45 37

  
46
src_configure() {
47
	# lto not supported yet -- https://github.com/libfuse/libfuse/issues/198
48
	# gcc-9 with -flto leads to link failures: #663518 (see also #863899)
49
	# https://gcc.gnu.org/PR91186
38
multilib_src_configure() {
39
	# bug #853058
50 40
	filter-lto
51
	# ... and strict aliasing warnings, bug #863899
52
	append-flags -fno-strict-aliasing
53 41

  
54
	econf \
55
		INIT_D_PATH="${EPREFIX}/etc/init.d" \
56
		MOUNT_FUSE_PATH="${EPREFIX}/sbin" \
57
		UDEV_RULES_PATH="${EPREFIX}/$(get_udevdir)/rules.d" \
58
		$(use_enable static-libs static) \
59
		--disable-example
60
}
61

  
62
src_install() {
63
	local DOCS=( AUTHORS ChangeLog README.md README.NFS NEWS doc/how-fuse-works doc/kernel.txt )
64
	default
65

  
66
	if use examples ; then
67
		docinto examples
68
		dodoc example/*
69
	fi
42
	local emesonargs=(
43
		$(meson_use test examples)
44
		$(meson_use test tests)
45
		-Duseroot=false
46
		-Dinitscriptdir=
47
		-Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
48
	)
49
	meson_src_configure
50
}
70 51

  
71
	find "${ED}" -name '*.la' -delete || die
52
src_test() {
53
	if has sandbox ${FEATURES}; then
54
		ewarn "Sandbox enabled, skipping tests"
55
	else
56
		multilib-minimal_src_test
57
	fi
58
}
72 59

  
73
	# installed via fuse-common
74
	rm -r "${ED}"/{etc,$(get_udevdir)} || die
60
multilib_src_test() {
61
	epytest
62
}
75 63

  
76
	# handled by the device manager
77
	rm -r "${D}"/dev || die
64
multilib_src_install_all() {
65
	# Installed via fuse-common
66
	rm -r "${ED}"{/etc,$(get_udevdir)} || die
67

  
68
	# useroot=false prevents the build system from doing this.
69
	use suid && fperms u+s /usr/bin/fusermount3
70

  
71
	# manually install man pages to respect compression
72
	rm -r "${ED}"/usr/share/man || die
73
	doman doc/{fusermount3.1,mount.fuse3.8}
78 74
}
Thank you!