git: 2633fefb6d4a - main - sysutils/fusefs-ntfs: add CRYPTO and EXTRAS options to the port

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Thu, 26 May 2022 08:47:18 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2633fefb6d4aa613e8b8c14fc3cedcc55c0d95bf

commit 2633fefb6d4aa613e8b8c14fc3cedcc55c0d95bf
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-05-26 08:46:44 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-05-26 08:46:44 +0000

    sysutils/fusefs-ntfs: add CRYPTO and EXTRAS options to the port
    
    This gives users more flexibility and alleviates the need of ad
    hoc patching of `ntfsprogs/Makefile.in'.  Enable extra programs
    by default as they pull no additional dependencies while making
    up for a more featureful package.
---
 sysutils/fusefs-ntfs/Makefile                      | 16 ++++++++++++--
 .../fusefs-ntfs/files/patch-ntfsprogs__Makefile.in | 25 ----------------------
 sysutils/fusefs-ntfs/pkg-plist                     |  8 +++++--
 3 files changed, 20 insertions(+), 29 deletions(-)

diff --git a/sysutils/fusefs-ntfs/Makefile b/sysutils/fusefs-ntfs/Makefile
index d029b406c992..8c38543297b7 100644
--- a/sysutils/fusefs-ntfs/Makefile
+++ b/sysutils/fusefs-ntfs/Makefile
@@ -22,10 +22,22 @@ CONFIGURE_ARGS=	--exec-prefix=${PREFIX} --disable-mount-helper \
 		--disable-mtab --with-fuse=external --disable-ldconfig
 INSTALL_TARGET=	install-strip
 
-OPTIONS_DEFINE=	LOCK UBLIO DOCS
-OPTIONS_DEFAULT=LOCK UBLIO
+OPTIONS_DEFINE=	CRYPTO DOCS EXTRAS LOCK UBLIO
+OPTIONS_DEFAULT=EXTRAS LOCK UBLIO
+OPTIONS_SUB=	yes
+
+CRYPTO_DESC=	Enable crypto-related code and utilities
+CRYPTO_LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
+			libgnutls.so:security/gnutls \
+			libgpg-error.so:security/libgpg-error
+CRYPTO_CONFIGURE_ON=	--enable-crypto
+
+EXTRAS_DESC=	Build and install extra NTFS utilities
+EXTRAS_CONFIGURE_ON=	--enable-extras
+
 LOCK_DESC=	Lock the device when mounting (avoids access)
 LOCK_CFLAGS=	-DUSE_LOCK
+
 UBLIO_DESC=	Enable user space cache for improved speed
 UBLIO_EXTRA_PATCHES=	${FILESDIR}/extra-patch-ublio
 UBLIO_LIB_DEPENDS=	libublio.so:devel/libublio
diff --git a/sysutils/fusefs-ntfs/files/patch-ntfsprogs__Makefile.in b/sysutils/fusefs-ntfs/files/patch-ntfsprogs__Makefile.in
deleted file mode 100644
index 88a6d8fb2f74..000000000000
--- a/sysutils/fusefs-ntfs/files/patch-ntfsprogs__Makefile.in
+++ /dev/null
@@ -1,25 +0,0 @@
---- ntfsprogs/Makefile.in.orig	2017-03-23 09:43:00 UTC
-+++ ntfsprogs/Makefile.in
-@@ -87,7 +87,9 @@ target_triplet = @target@
- @ENABLE_NTFSPROGS_TRUE@sbin_PROGRAMS = mkntfs$(EXEEXT) \
- @ENABLE_NTFSPROGS_TRUE@	ntfslabel$(EXEEXT) \
- @ENABLE_NTFSPROGS_TRUE@	ntfsundelete$(EXEEXT) \
-+@ENABLE_NTFSPROGS_TRUE@	ntfsusermap$(EXEEXT) \
- @ENABLE_NTFSPROGS_TRUE@	ntfsresize$(EXEEXT) ntfsclone$(EXEEXT) \
-+@ENABLE_NTFSPROGS_TRUE@	ntfsrecover$(EXEEXT) \
- @ENABLE_NTFSPROGS_TRUE@	ntfscp$(EXEEXT)
- @ENABLE_CRYPTO_TRUE@@ENABLE_NTFSPROGS_TRUE@am__append_1 = ntfsdecrypt
- @ENABLE_EXTRAS_TRUE@@ENABLE_NTFSPROGS_TRUE@am__append_2 = $(EXTRA_PROGRAM_NAMES)
-@@ -1424,12 +1426,8 @@ uninstall-man: uninstall-man8
- # mkfs.ntfs[.8] hard link
- 
- @ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@install-exec-hook:
--@ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@	$(INSTALL) -d $(DESTDIR)/sbin
--@ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@	$(LN_S) -f $(sbindir)/mkntfs $(DESTDIR)/sbin/mkfs.ntfs
- 
- @ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@install-data-hook:
--@ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@	$(INSTALL) -d $(DESTDIR)$(man8dir)
--@ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@	$(LN_S) -f mkntfs.8 $(DESTDIR)$(man8dir)/mkfs.ntfs.8
- 
- @ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@uninstall-local:
- @ENABLE_MOUNT_HELPER_TRUE@@ENABLE_NTFSPROGS_TRUE@	$(RM) -f $(DESTDIR)/sbin/mkfs.ntfs
diff --git a/sysutils/fusefs-ntfs/pkg-plist b/sysutils/fusefs-ntfs/pkg-plist
index a7971bf9953e..426ae30d2910 100644
--- a/sysutils/fusefs-ntfs/pkg-plist
+++ b/sysutils/fusefs-ntfs/pkg-plist
@@ -4,9 +4,15 @@ bin/ntfs-3g.probe
 bin/ntfscat
 bin/ntfscluster
 bin/ntfscmp
+%%CRYPTO%%bin/ntfsdecrypt
 bin/ntfsfix
 bin/ntfsinfo
 bin/ntfsls
+%%EXTRAS%%bin/ntfsrecover
+%%EXTRAS%%bin/ntfssecaudit
+%%EXTRAS%%bin/ntfstruncate
+%%EXTRAS%%bin/ntfsusermap
+%%EXTRAS%%bin/ntfswipe
 include/ntfs-3g/acls.h
 include/ntfs-3g/attrib.h
 include/ntfs-3g/attrlist.h
@@ -77,10 +83,8 @@ sbin/mkntfs
 sbin/ntfsclone
 sbin/ntfscp
 sbin/ntfslabel
-sbin/ntfsrecover
 sbin/ntfsresize
 sbin/ntfsundelete
-sbin/ntfsusermap
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
 @dir lib/ntfs-3g