From 80cb620b9344f7469c02fc61970c5fdcd9dc9104 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Tue, 12 Dec 2023 19:20:15 -0700
Subject: [PATCH] mesa-glu: convert recipe to toml

---
 recipes/libs/mesa-glu/recipe.sh   | 31 -------------------------------
 recipes/libs/mesa-glu/recipe.toml | 11 +++++++++++
 2 files changed, 11 insertions(+), 31 deletions(-)
 delete mode 100644 recipes/libs/mesa-glu/recipe.sh
 create mode 100644 recipes/libs/mesa-glu/recipe.toml

diff --git a/recipes/libs/mesa-glu/recipe.sh b/recipes/libs/mesa-glu/recipe.sh
deleted file mode 100644
index 175759ac4..000000000
--- a/recipes/libs/mesa-glu/recipe.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-VERSION=9.0.1
-TAR=https://archive.mesa3d.org/glu/glu-$VERSION.tar.xz
-BUILD_DEPENDS=(mesa)
-
-function recipe_version {
-    echo "$VERSION"
-    skip=1
-}
-
-function recipe_build {
-    sysroot="$(realpath ../sysroot)"
-    export CFLAGS="-I$sysroot/include"
-    export CPPFLAGS="-I$sysroot/include"
-    export LDFLAGS="-L$sysroot/lib"
-    wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
-    ./configure --build=${BUILD} --host="${HOST}" --prefix=/ --enable-osmesa
-    "$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 -f "$dest/lib/"*.la
-    skip=1
-}
diff --git a/recipes/libs/mesa-glu/recipe.toml b/recipes/libs/mesa-glu/recipe.toml
new file mode 100644
index 000000000..9844b0c8a
--- /dev/null
+++ b/recipes/libs/mesa-glu/recipe.toml
@@ -0,0 +1,11 @@
+[source]
+tar = "https://archive.mesa3d.org/glu/glu-9.0.1.tar.xz"
+blake3 = "461543526cd681bc8fa91a1ece9519188c64ce7ad130a71213bdd0867e0884c9"
+
+[build]
+dependencies = ["mesa"]
+template = "custom"
+script = """
+COOKBOOK_CONFIGURE_FLAGS+=(--enable-osmesa)
+cookbook_configure
+"""
-- 
GitLab