changes proposed by tommy[D] \#gentoo-sunrise@freenode
[mimi_vx_overlay.git] / sys-fs / ntfs3g-ar / ntfs3g-ar-2013.1.13.4.ebuild
blobf9b8a288f31fcc62b8d9ca885ec1725ad2018460
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=5
6 inherit eutils linux-info udev versionator
8 MY_PV="$(get_version_component_range 1-3)AR.$(get_version_component_range 4)"
9 MY_P="${PN/3g-ar/-3g_ntfsprogs}-${MY_PV}"
11 DESCRIPTION="NTFS-3G Advanced variant supporting ACLs, junction points, compression and more"
12 HOMEPAGE="http://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html"
13 SRC_URI="http://jp-andre.pagesperso-orange.fr/${MY_P}.tgz"
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="acl crypt debug +external-fuse +ntfsprogs static-libs suid xattr"
20 RDEPEND="!<sys-apps/util-linux-2.20.1-r2
21 !sys-fs/ntfsprogs
22 crypt? (
23 >=dev-libs/libgcrypt-1.2.2
24 >=net-libs/gnutls-1.4.4
26 external-fuse? ( >=sys-fs/fuse-2.8.0 )"
27 DEPEND="${RDEPEND}
28 sys-apps/attr
29 virtual/pkgconfig"
31 S=${WORKDIR}/${MY_P}
33 DOCS="AUTHORS ChangeLog CREDITS README"
35 pkg_setup() {
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"
42 linux-info_pkg_setup
46 src_prepare() {
47 # add missing $(sbindir) references
48 sed -e 's:sbin\($\|/\):$(sbindir)\1:g' \
49 -i ntfsprogs/Makefile.in src/Makefile.in || die
52 src_configure() {
53 econf \
54 --prefix="${EPREFIX}"/usr \
55 --exec-prefix="${EPREFIX}"/usr \
56 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
57 $(use_enable debug) \
58 --enable-ldscript \
59 --disable-ldconfig \
60 $(use_enable acl posix-acls) \
61 $(use_enable xattr xattr-mappings) \
62 $(use_enable crypt crypto) \
63 $(use_enable ntfsprogs) \
64 --without-uuid \
65 --enable-extras \
66 $(use_enable static-libs static) \
67 --with-fuse=$(usex external-fuse external internal)
70 src_install() {
71 default
73 use suid && fperms u+s /usr/bin/${MY_PN}
74 udev_dorules "${FILESDIR}"/99-ntfs3g.rules
75 prune_libtool_files
77 # http://bugs.gentoo.org/398069
78 rmdir "${D}"/sbin
80 dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
83 pkg_pretend() {
84 if [[ ${MERGE_TYPE} != binary ]]; then
85 # Bug 450024
86 if $(tc-getLD) --version | grep -q "GNU gold"; then
87 eerror "ntfs-3g does not function correctly when built with the gold linker."
88 eerror "Please select the bfd linker with binutils-config."
89 die "GNU gold detected"
94 pkg_postinst() {
95 ewarn "This is an advanced features release of the ntfs-3g package. It"
96 ewarn "passes standard tests on i386 and x86_64 CPUs but users should"
97 ewarn "still backup their data. More info at:"
98 ewarn "http://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html"
100 if use suid; then
101 ewarn
102 ewarn "You have chosen to install ${PN} with the binary setuid root. This"
103 ewarn "means that if there any undetected vulnerabilities in the binary,"
104 ewarn "then local users may be able to gain root access on your machine."