1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit linux-info udev toolchain-funcs libtool
8 MY_P=${MY_PN}_ntfsprogs-${PV}
10 DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
11 HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
12 SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
15 # The subslot matches the SONAME major #.
17 KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
18 IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
20 RDEPEND="!<sys-apps/util-linux-2.20.1-r2
23 >=dev-libs/libgcrypt-1.2.2:0
24 >=net-libs/gnutls-1.4.4
35 S="${WORKDIR}/${MY_P}"
37 DOCS="AUTHORS ChangeLog CREDITS README"
40 "${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
41 "${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
43 "${FILESDIR}"/${PN}-2017.3.23-check-mftmirr.patch
44 "${FILESDIR}"/${PN}-2017.3.23-big-sectors.patch
45 "${FILESDIR}"/${PN}-2017.3.23-full-clusters.patch
49 if use external-fuse && use kernel_linux; then
50 if kernel_is lt 2 6 9; then
51 die "Your kernel is too old."
53 CONFIG_CHECK="~FUSE_FS"
54 FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
61 # Keep the symlinks in the same place we put the main binaries.
62 # Having them in / when all the progs are in /usr is pointless.
64 -e 's:/sbin:$(sbindir):g' \
65 {ntfsprogs,src}/Makefile.in || die #578336
66 # Note: patches apply to Makefile.in, so don't run autotools here.
71 # disable hd library until we have the right library in the tree and
72 # don't links to hwinfo one causing issues like bug #602360
75 --prefix="${EPREFIX}"/usr \
76 --exec-prefix="${EPREFIX}"/usr \
77 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
81 $(use_enable acl posix-acls) \
82 $(use_enable xattr xattr-mappings) \
83 $(use_enable ntfsdecrypt crypto) \
84 $(use_enable ntfsprogs) \
85 $(use_enable ntfsprogs quarantined) \
89 $(use_enable static-libs static) \
90 --with-fuse=$(usex external-fuse external internal)
96 use suid && fperms u+s /usr/bin/${MY_PN}
97 # Not needed with the link of mount.ntfs being created, causes
98 # issues like bug #635080
99 # udev_dorules "${FILESDIR}"/99-ntfs3g.rules
100 dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
102 find "${D}" -name '*.la' -type f -delete || die