From 6d513c4991b7f1205ff4688235fe1c0006d68b51 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Mon, 25 Sep 2023 08:56:00 -0600
Subject: [PATCH] ncurses: convert to new recipe format

---
 recipes/ncurses/recipe.sh   | 35 -----------------------------------
 recipes/ncurses/recipe.toml | 22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 35 deletions(-)
 delete mode 100644 recipes/ncurses/recipe.sh
 create mode 100644 recipes/ncurses/recipe.toml

diff --git a/recipes/ncurses/recipe.sh b/recipes/ncurses/recipe.sh
deleted file mode 100644
index f20be355c..000000000
--- a/recipes/ncurses/recipe.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-VERSION=6.4
-TAR=https://ftp.gnu.org/gnu/ncurses/ncurses-$VERSION.tar.gz
-DEPENDS="terminfo"
-
-function recipe_version {
-    echo "$VERSION"
-    skip=1
-}
-
-function recipe_build {
-    ./configure \
-        --build=${BUILD} \
-        --host=${HOST} \
-        --prefix="" \
-        --disable-db-install \
-        --without-ada \
-        --without-cxx-binding \
-        --without-tests \
-        cf_cv_func_mkstemp=yes
-    "$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
-    rm -rf "$1"/bin
-    rm -rf "$1"/share/{doc,info,man}
-    skip=1
-}
diff --git a/recipes/ncurses/recipe.toml b/recipes/ncurses/recipe.toml
new file mode 100644
index 000000000..6e191319d
--- /dev/null
+++ b/recipes/ncurses/recipe.toml
@@ -0,0 +1,22 @@
+[source]
+tar = "https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz"
+blake3 = "0d1c9fdf53c0ca4bd66ba707d49a079d2dd6f5a960cdec74a56e29952c4ffe73"
+
+[build]
+template = "custom"
+script = """
+COOKBOOK_CONFIGURE_FLAGS+=(
+    --disable-db-install
+    --without-ada
+    --without-cxx-binding
+    --without-tests
+    cf_cv_func_mkstemp=yes
+)
+cookbook_configure
+rm -rfv "${COOKBOOK_STAGE}/bin" "${COOKBOOK_STAGE}/share/"{doc,info,man}
+"""
+
+[package]
+dependencies = [
+    "terminfo",
+]
-- 
GitLab