From 7e696080e928cd9f062c0c5fdf27815018bc2f62 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Wed, 13 Dec 2023 14:56:11 -0700
Subject: [PATCH] diffutils: convert to toml

---
 recipes/tools/diffutils/recipe.sh   | 36 -----------------------------
 recipes/tools/diffutils/recipe.toml | 21 +++++++++++++++++
 2 files changed, 21 insertions(+), 36 deletions(-)
 delete mode 100644 recipes/tools/diffutils/recipe.sh
 create mode 100644 recipes/tools/diffutils/recipe.toml

diff --git a/recipes/tools/diffutils/recipe.sh b/recipes/tools/diffutils/recipe.sh
deleted file mode 100644
index 4d04c16b4..000000000
--- a/recipes/tools/diffutils/recipe.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-VERSION=3.6
-TAR=https://ftp.gnu.org/gnu/diffutils/diffutils-$VERSION.tar.xz
-
-function recipe_version {
-    echo "$VERSION"
-    skip=1
-}
-
-function recipe_build {
-    export LDFLAGS="-static"
-    autoreconf
-    ./configure \
-        --build=${BUILD} \
-        --host=${HOST} \
-        --prefix=/ \
-        gt_cv_locale_fr=false \
-        gt_cv_locale_fr_utf8=false \
-        gt_cv_locale_ja=false \
-        gt_cv_locale_tr_utf8=false \
-        gt_cv_locale_zh_CN=false
-    "$REDOX_MAKE" -j"$($NPROC)"
-    skip=1
-}
-
-function recipe_clean {
-    "$REDOX_MAKE" clean
-    skip=1
-}
-
-function recipe_stage {
-    dest="$(realpath $1)"
-    "$REDOX_MAKE" DESTDIR="$dest" install
-    ${HOST}-strip "$dest"/bin/*
-    rm -rf "$dest"/{lib,share}
-    skip=1
-}
diff --git a/recipes/tools/diffutils/recipe.toml b/recipes/tools/diffutils/recipe.toml
new file mode 100644
index 000000000..0261fc5ff
--- /dev/null
+++ b/recipes/tools/diffutils/recipe.toml
@@ -0,0 +1,21 @@
+[source]
+tar = "https://ftp.gnu.org/gnu/diffutils/diffutils-3.6.tar.xz"
+blake3 = "086a95093c15edcdb826e75ff4de6c2213de6fbd2eb13538d07bdc3286dfb4a4"
+patches = ["diffutils.patch"]
+script = """
+autoreconf
+"""
+
+[build]
+template = "custom"
+script = """
+export LDFLAGS="-static"
+COOKBOOK_CONFIGURE_FLAGS+=(
+    gt_cv_locale_fr=false
+    gt_cv_locale_fr_utf8=false
+    gt_cv_locale_ja=false
+    gt_cv_locale_tr_utf8=false
+    gt_cv_locale_zh_CN=false
+)
+cookbook_configure
+"""
-- 
GitLab