git: 00c9f36e5eff - main - sysutils/ntfs2btrfs: new port had been added (+)

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Tue, 25 Apr 2023 11:22:50 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=00c9f36e5effce6ba902d5ba018f43a6dae6d66d

commit 00c9f36e5effce6ba902d5ba018f43a6dae6d66d
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-04-25 11:21:42 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-04-25 11:21:42 +0000

    sysutils/ntfs2btrfs: new port had been added (+)
    
    Ntfs2btrfs is a tool for in-place conversion of Microsoft's
    NTFS file system to the open-source file system Btrfs.
---
 sysutils/Makefile             |  1 +
 sysutils/ntfs2btrfs/Makefile  | 25 +++++++++++++++++++++++++
 sysutils/ntfs2btrfs/distinfo  |  3 +++
 sysutils/ntfs2btrfs/pkg-descr |  5 +++++
 4 files changed, 34 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 407a5ef30cf8..6c4abddf1b86 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -834,6 +834,7 @@
     SUBDIR += nrg2iso
     SUBDIR += nss_ndb
     SUBDIR += nsysctl
+    SUBDIR += ntfs2btrfs
     SUBDIR += ntfy
     SUBDIR += ntpstat
     SUBDIR += nut
diff --git a/sysutils/ntfs2btrfs/Makefile b/sysutils/ntfs2btrfs/Makefile
new file mode 100644
index 000000000000..358e6dba4554
--- /dev/null
+++ b/sysutils/ntfs2btrfs/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	ntfs2btrfs
+PORTVERSION=	20220812
+CATEGORIES=	sysutils
+
+MAINTAINER=	danfe@FreeBSD.org
+COMMENT=	NTFS to Btrfs in-place conversion utility
+WWW=		https://github.com/maharmstone/ntfs2btrfs
+
+LICENSE=	GPLv2+
+
+BUILD_DEPENDS=	${LOCALBASE}/include/fmt/format.h:devel/libfmt
+LIB_DEPENDS=	liblzo2.so:archivers/lzo2 libzstd.so:archivers/zstd
+
+USES=		cmake pkgconfig
+USE_GITHUB=	yes
+GH_ACCOUNT=	maharmstone
+
+PLIST_FILES=	sbin/${PORTNAME} share/man/man8/${PORTNAME}.8.gz
+
+post-patch:
+# One should not try to mmap(2) disk devices on FreeBSD, it won't work
+	@${REINPLACE_CMD} -e '3390s,WIN32,_${OPSYS}__,' \
+		${WRKSRC}/src/ntfs2btrfs.cpp
+
+.include <bsd.port.mk>
diff --git a/sysutils/ntfs2btrfs/distinfo b/sysutils/ntfs2btrfs/distinfo
new file mode 100644
index 000000000000..632de3f2784e
--- /dev/null
+++ b/sysutils/ntfs2btrfs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660262820
+SHA256 (maharmstone-ntfs2btrfs-20220812_GH0.tar.gz) = 9ce07535e6191ab45f204a4dd281be4768d7917df4426ee7c71aa9c308a2fe93
+SIZE (maharmstone-ntfs2btrfs-20220812_GH0.tar.gz) = 98059
diff --git a/sysutils/ntfs2btrfs/pkg-descr b/sysutils/ntfs2btrfs/pkg-descr
new file mode 100644
index 000000000000..ed0ee1654542
--- /dev/null
+++ b/sysutils/ntfs2btrfs/pkg-descr
@@ -0,0 +1,5 @@
+Ntfs2btrfs is a tool which does in-place conversion of Microsoft's NTFS
+file system to the open-source file system Btrfs, much as btrfs-convert
+does for ext2.  The original image is saved as a reflink copy at
+``image/ntfs.img'', and if you want to keep the conversion you can delete
+this to free up space.