From 09046db8d24dc5957055561e6dac1563d26f40d8 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Tue, 12 Dec 2023 19:48:42 -0700
Subject: [PATCH] fribidi: convert to toml

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

diff --git a/recipes/libs/fribidi/recipe.sh b/recipes/libs/fribidi/recipe.sh
deleted file mode 100644
index 3cf595220..000000000
--- a/recipes/libs/fribidi/recipe.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-VERSION="1.0.13"
-TAR="https://github.com/fribidi/fribidi/releases/download/v${VERSION}/fribidi-${VERSION}.tar.xz"
-BUILD_DEPENDS=()
-
-function recipe_version {
-	echo "$VERSION"
-	skip=1
-}
-
-function recipe_build {
-	sysroot="$(realpath ../sysroot)"
-	export CFLAGS="-I$sysroot/include"
-	export LDFLAGS="-L$sysroot/lib --static"
-	./configure \
-	    --build=${BUILD} \
-	    --host=${HOST} \
-	    --prefix=/ \
-	    --disable-shared \
-	    --enable-static
-	sed -i 's|#define HAVE_SYS_TIMES_H 1|/* #undef HAVE_SYS_TIMES_H */|g' config.h
-	"$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/fribidi/recipe.toml b/recipes/libs/fribidi/recipe.toml
new file mode 100644
index 000000000..f84cda4ac
--- /dev/null
+++ b/recipes/libs/fribidi/recipe.toml
@@ -0,0 +1,12 @@
+[source]
+tar = "https://github.com/fribidi/fribidi/releases/download/v1.0.13/fribidi-1.0.13.tar.xz"
+blake3 = "b43d333a98e39fc25cf7ce5fd11409424cf33e74aa28ec4a727f867aea83ce39"
+
+[build]
+template = "custom"
+script = """
+COOKBOOK_CONFIGURE_FLAGS+=(
+    ac_cv_header_sys_times_h=no
+)
+cookbook_configure
+"""
-- 
GitLab