From fef75bfaa986a5554b4d65ff325d6fff0c9e2b50 Mon Sep 17 00:00:00 2001
From: Koichiro Iwao
Date: Sun, 11 Jun 2023 02:56:50 +0900
Subject: [PATCH] textproc/yamlfmt: add new port
Simple command line tool for formatting yaml files.
WWW: https://github.com/google/yamlfmt
---
textproc/Makefile | 1 +
textproc/yamlfmt/Makefile | 19 +++++++++++++++++++
textproc/yamlfmt/distinfo | 5 +++++
textproc/yamlfmt/pkg-descr | 2 ++
4 files changed, 27 insertions(+)
create mode 100644 textproc/yamlfmt/Makefile
create mode 100644 textproc/yamlfmt/distinfo
create mode 100644 textproc/yamlfmt/pkg-descr
diff --git a/textproc/Makefile b/textproc/Makefile
index 8b2d52e905016..3abe9a238d4c4 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -2096,6 +2096,7 @@
SUBDIR += yamcha
SUBDIR += yaml-mode.el
SUBDIR += yaml.el
+ SUBDIR += yamlfmt
SUBDIR += ydiff
SUBDIR += yelp-tools
SUBDIR += yelp-xsl
diff --git a/textproc/yamlfmt/Makefile b/textproc/yamlfmt/Makefile
new file mode 100644
index 0000000000000..c2d20b4924912
--- /dev/null
+++ b/textproc/yamlfmt/Makefile
@@ -0,0 +1,19 @@
+PORTNAME= yamlfmt
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.9.0
+CATEGORIES= textproc
+
+MAINTAINER= meta@FreeBSD.org
+COMMENT= Simple command line tool for formatting yaml files
+WWW= https://github.com/google/yamlfmt
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+GO_MODULE= github.com/google/yamlfmt
+GO_TARGET= ./cmd/yamlfmt
+
+PLIST_FILES= ${GO_TARGET:T:S,^,bin/,}
+
+.include
diff --git a/textproc/yamlfmt/distinfo b/textproc/yamlfmt/distinfo
new file mode 100644
index 0000000000000..81fda4def65fe
--- /dev/null
+++ b/textproc/yamlfmt/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1686315209
+SHA256 (go/textproc_yamlfmt/yamlfmt-v0.9.0/v0.9.0.mod) = a091e8def09a41ca26a568f45f4448d1bff43d52c7ebdfd869c4bd48b35430e0
+SIZE (go/textproc_yamlfmt/yamlfmt-v0.9.0/v0.9.0.mod) = 268
+SHA256 (go/textproc_yamlfmt/yamlfmt-v0.9.0/v0.9.0.zip) = 8567c41ff71bbf7d2a8238e46bb3df87f87790803d72065c0b962b78187b15d4
+SIZE (go/textproc_yamlfmt/yamlfmt-v0.9.0/v0.9.0.zip) = 49994
diff --git a/textproc/yamlfmt/pkg-descr b/textproc/yamlfmt/pkg-descr
new file mode 100644
index 0000000000000..bb4605ebb9025
--- /dev/null
+++ b/textproc/yamlfmt/pkg-descr
@@ -0,0 +1,2 @@
+Simple and easy-to-use command line tool for formatting yaml files written in
+G o language.