1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils linux-info udev toolchain-funcs
9 MY_P=${MY_PN}_ntfsprogs-${PV}
11 DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
12 HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
13 SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
17 KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~amd64-linux ~arm-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
26 external-fuse? ( >=sys-fs/fuse-2.8.0 )"
33 DOCS="AUTHORS ChangeLog CREDITS README"
36 if use external-fuse && use kernel_linux; then
37 if kernel_is lt 2 6 9; then
38 die "Your kernel is too old."
40 CONFIG_CHECK="~FUSE_FS"
41 FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
47 # add missing $(sbindir) references
48 sed -e 's:sbin\($\|/\):$(sbindir)\1:g' \
49 -i ntfsprogs/Makefile.in src/Makefile.in || die
50 epatch "${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
55 --prefix="${EPREFIX}"/usr \
56 --exec-prefix="${EPREFIX}"/usr \
57 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
61 $(use_enable acl posix-acls) \
62 $(use_enable xattr xattr-mappings) \
63 $(use_enable ntfsdecrypt crypto) \
64 $(use_enable ntfsprogs) \
67 $(use_enable static-libs static) \
68 --with-fuse=$(usex external-fuse external internal)
74 use suid && fperms u+s /usr/bin/${MY_PN}
75 udev_dorules "${FILESDIR}"/99-ntfs3g.rules
78 # https://bugs.gentoo.org/398069
81 dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
85 if [[ ${MERGE_TYPE} != binary ]]; then
87 if tc-ld-is-gold; then
88 eerror "ntfs-3g does not function correctly when built with the gold linker."
89 eerror "Please select the bfd linker with binutils-config."
90 die "GNU gold detected"