From ab807fab5921362fe5e4201a735a8dd7782d5818 Mon Sep 17 00:00:00 2001
From: Bendeguz Pisch <pisch.beni@gmail.com>
Date: Tue, 5 Mar 2024 18:05:15 +0000
Subject: [PATCH] Update ZSTD recipe status and add simple build script

---
 recipes/wip/tools/zstd/recipe.toml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/recipes/wip/tools/zstd/recipe.toml b/recipes/wip/tools/zstd/recipe.toml
index 25125f6f2..b7bc0a791 100644
--- a/recipes/wip/tools/zstd/recipe.toml
+++ b/recipes/wip/tools/zstd/recipe.toml
@@ -1,5 +1,15 @@
-#TODO missing script for building, see https://github.com/facebook/zstd#build-instructions
+#TODO waiting for openat implementation, building without openat fails
+#NOTE although project supports building without openat, but the corresponding #if check
+# checks for the presence of st_mtime, and if it exists it falsely assumes that AT_FDCWD is supported too
+# for more info see starting from programs/util.c line 262: #if (PLATFORM_POSIX_VERSION >= 200809L) && defined(st_mtime)
+
 [source]
 tar = "https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz"
+
 [build]
 template = "custom"
+script = """
+rsync -av --delete "${COOKBOOK_SOURCE}/" ./
+${COOKBOOK_MAKE}
+"""
+
-- 
GitLab