From 241f1cec6cb93b0196658dfb9d0f7c2618d1d37a Mon Sep 17 00:00:00 2001 From: Florent Thoumie Date: Wed, 23 Nov 2005 11:43:13 +0000 Subject: [PATCH] - Add FUSE option to compile ntfsmount with FUSE support [1]. - Add local patch to make FUSE support compile on FreeBSD [1]. - Force --enable-gnome-vfs when WITH_GNOMEVFS2 is set. Asked by: Sergei Mozhaisky [1] --- sysutils/ntfsprogs/Makefile | 21 +++++++++++++++---- .../files/patch-ntfsprogs_ntfsmount.c | 14 +++++++++++++ sysutils/ntfsprogs/pkg-plist | 2 ++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c diff --git a/sysutils/ntfsprogs/Makefile b/sysutils/ntfsprogs/Makefile index 90ea4b641718..535778152581 100644 --- a/sysutils/ntfsprogs/Makefile +++ b/sysutils/ntfsprogs/Makefile @@ -7,6 +7,7 @@ PORTNAME= ntfsprogs PORTVERSION= 1.12.1 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= linux-ntfs @@ -24,7 +25,8 @@ USE_AUTOTOOLS= libtool:13:inc CONFIGURE_ARGS= --program-transform-name="" CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -OPTIONS= GNOMEVFS2 "Install GnomeVFS 2.0 libntfs interface" off +OPTIONS= GNOMEVFS2 "Install GnomeVFS 2.0 libntfs interface" off \ + FUSE "Compile with Fuse interface" off MAN8= libntfs-gnomevfs.8 \ mkntfs.8 \ @@ -46,11 +48,22 @@ MLINKS= mkntfs.8 mkfs.ntfs.8 .include .if defined(WITH_GNOMEVFS2) +CONFIGURE_ARGS+=--enable-gnome-vfs USE_GNOME= gnomevfs2 -PLIST_SUB= GNOMEVFS2="" +PLIST_SUB+= GNOMEVFS2="" .else -CONFIGURE_ARGS= --disable-gnome-vfs -PLIST_SUB= GNOMEVFS2="@comment " +CONFIGURE_ARGS+=--disable-gnome-vfs +PLIST_SUB+= GNOMEVFS2="@comment " +.endif + +.if defined(WITH_FUSE) +CONFIGURE_ARGS+=--enable-fuse-module +PLIST_SUB+= FUSE="" +LIB_DEPENDS+= fuse.2:${PORTSDIR}/sysutils/fusefs-libs +MLINKS+= ntfsmount.8 mount.ntfs-fuse.8 +.else +CONFIGURE_ARGS+=--disable-fuse-module +PLIST_SUB+= FUSE="@comment " .endif post-patch: diff --git a/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c b/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c new file mode 100644 index 000000000000..16d148cf4d80 --- /dev/null +++ b/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c @@ -0,0 +1,14 @@ +--- ntfsprogs/ntfsmount.c.orig Wed Nov 23 12:33:56 2005 ++++ ntfsprogs/ntfsmount.c Wed Nov 23 12:32:15 2005 +@@ -228,7 +228,11 @@ + size = 0; + sfs->f_ffree = size; + /* Maximum length of filenames. */ ++#ifdef __FreeBSD__ ++ sfs->f_namemax = NTFS_MAX_NAME_LEN; ++#else + sfs->f_namelen = NTFS_MAX_NAME_LEN; ++#endif + return 0; + } + diff --git a/sysutils/ntfsprogs/pkg-plist b/sysutils/ntfsprogs/pkg-plist index 5ceeaeb18bae..55940bb04397 100644 --- a/sysutils/ntfsprogs/pkg-plist +++ b/sysutils/ntfsprogs/pkg-plist @@ -3,6 +3,7 @@ bin/ntfscluster bin/ntfsfix bin/ntfsinfo bin/ntfsls +%%FUSE%%bin/ntfsmount include/ntfs/attrib.h include/ntfs/attrlist.h include/ntfs/bitmap.h @@ -39,6 +40,7 @@ lib/libntfs.so lib/libntfs.so.8 sbin/mkntfs sbin/mkfs.ntfs +%%FUSE%%sbin/mount.ntfs-fuse sbin/ntfsclone sbin/ntfscp sbin/ntfslabel