git: de841b40d24d - main - sysutils/xxd: New port

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Thu, 30 Mar 2023 20:44:58 UTC
The branch main has been updated by madpilot:

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

commit de841b40d24d22ab51ad05ed632e025903fbb41f
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2023-03-30 20:42:54 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2023-03-30 20:42:54 +0000

    sysutils/xxd: New port
    
    Xxd creates a hex dump of a given file or standard input.
    It can also convert a hex dump back to its original binary form.
    
    This is the standalone version of the xxd tool provided by vim.
    
    Submitted by:   Gianmarco Giovannelli <gmarco@giovannelli.it>
---
 editors/vim/Makefile   |  4 ++++
 sysutils/Makefile      |  1 +
 sysutils/xxd/Makefile  | 26 ++++++++++++++++++++++++++
 sysutils/xxd/distinfo  |  3 +++
 sysutils/xxd/pkg-descr |  2 ++
 5 files changed, 36 insertions(+)

diff --git a/editors/vim/Makefile b/editors/vim/Makefile
index c151df5186bc..e77dc7e135bd 100644
--- a/editors/vim/Makefile
+++ b/editors/vim/Makefile
@@ -45,6 +45,10 @@ CONFLICTS_INSTALL=	${FLAVORS:N${FLAVOR}:S/^/vim-/}
 ${f}_PKGNAMESUFFIX=	-${f}
 .endfor
 
+.for f in ${FLAVORS:Ntiny}
+${f}_CONFLICTS_INSTALL=	xxd
+.endfor
+
 # GUI flavors
 .if ${FLAVOR:U} == console
 GUI=		no
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 5e962fa21448..42ed40b9fc2c 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1630,6 +1630,7 @@
     SUBDIR += xpipe
     SUBDIR += xstow
     SUBDIR += xsysstats
+    SUBDIR += xxd
     SUBDIR += yadf
     SUBDIR += yadm
     SUBDIR += yank
diff --git a/sysutils/xxd/Makefile b/sysutils/xxd/Makefile
new file mode 100644
index 000000000000..378f364cf4bf
--- /dev/null
+++ b/sysutils/xxd/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	xxd
+DISTVERSIONPREFIX=	v
+DISTVERSION=	9.0.1366
+CATEGORIES=	sysutils
+
+MAINTAINER=	gmarco@giovannelli.it
+COMMENT=	Hexdump and reverse hexdump utility
+WWW=		https://github.com/mew-cx/xxd
+
+CONFLICTS_INSTALL=	vim-[0-9]* vim-gtk2 vim-gtk3 vim-motif vim-x11
+
+ALL_TARGET=	${PORTNAME}
+PORTSCOUT=	ignore:1
+EXTRACT_AFTER_ARGS=	--include='*/src/xxd*'
+WRKSRC_SUBDIR=	src/xxd
+
+PLIST_FILES=	bin/xxd
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	vim
+GH_PROJECT=	vim
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/xxd ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/sysutils/xxd/distinfo b/sysutils/xxd/distinfo
new file mode 100644
index 000000000000..621edaeec981
--- /dev/null
+++ b/sysutils/xxd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1680090877
+SHA256 (vim-vim-v9.0.1366_GH0.tar.gz) = a9e52c123ab0cc7f96d320c3f1e0fc7d65fab8a081b4887651f9f1a75ca001c1
+SIZE (vim-vim-v9.0.1366_GH0.tar.gz) = 16974070
diff --git a/sysutils/xxd/pkg-descr b/sysutils/xxd/pkg-descr
new file mode 100644
index 000000000000..15a6cd75699f
--- /dev/null
+++ b/sysutils/xxd/pkg-descr
@@ -0,0 +1,2 @@
+Xxd creates a hex dump of a given file or standard input.
+It can also convert a hex dump back to its original binary form.