From 78512b258c6f11f0ef6e1f78105446133053a907 Mon Sep 17 00:00:00 2001
From: Ribbon <ribbon_45@proton.me>
Date: Thu, 11 Jul 2024 06:14:08 +0000
Subject: [PATCH] Add recipes

---
 recipes/wip/dev/other/mold/recipe.toml  | 27 +++++++++++++++++++++++++
 recipes/wip/net/sharing/qft/recipe.toml |  5 +++++
 recipes/wip/text/zed/recipe.toml        | 20 ++++++++++++++++++
 3 files changed, 52 insertions(+)
 create mode 100644 recipes/wip/dev/other/mold/recipe.toml
 create mode 100644 recipes/wip/net/sharing/qft/recipe.toml
 create mode 100644 recipes/wip/text/zed/recipe.toml

diff --git a/recipes/wip/dev/other/mold/recipe.toml b/recipes/wip/dev/other/mold/recipe.toml
new file mode 100644
index 000000000..e61f76c59
--- /dev/null
+++ b/recipes/wip/dev/other/mold/recipe.toml
@@ -0,0 +1,27 @@
+#TODO not compiled or tested
+#TODO maybe incomplete script
+# build instructions - https://github.com/rui314/mold#how-to-build
+[source]
+git = "https://github.com/rui314/mold"
+rev = "cf1c02d097fc57113b7f9fabf1bc15f810b8b27c"
+[build]
+template = "custom"
+dependencies = [
+    "library1",
+]
+script = """
+COOKBOOK_CONFIGURE="cmake"
+COOKBOOK_CONFIGURE_FLAGS=(
+    -DCMAKE_BUILD_TYPE=Release
+    -DCMAKE_CROSSCOMPILING=True
+    -DCMAKE_EXE_LINKER_FLAGS="-static"
+    -DCMAKE_INSTALL_PREFIX="/"
+    -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
+    -DCMAKE_SYSTEM_NAME=Generic
+    -DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
+    -DCMAKE_VERBOSE_MAKEFILE=On
+    -DCMAKE_CXX_COMPILER=c++
+"${COOKBOOK_SOURCE}"
+)
+cookbook_configure
+"""
diff --git a/recipes/wip/net/sharing/qft/recipe.toml b/recipes/wip/net/sharing/qft/recipe.toml
new file mode 100644
index 000000000..6aeb4bab3
--- /dev/null
+++ b/recipes/wip/net/sharing/qft/recipe.toml
@@ -0,0 +1,5 @@
+#TODO not compiled or tested
+[source]
+git = "https://github.com/CramBL/quick-file-transfer"
+[build]
+template = "cargo"
diff --git a/recipes/wip/text/zed/recipe.toml b/recipes/wip/text/zed/recipe.toml
new file mode 100644
index 000000000..eb2f2340d
--- /dev/null
+++ b/recipes/wip/text/zed/recipe.toml
@@ -0,0 +1,20 @@
+#TODO not compiled or tested
+#TODO maybe missing dependencies, see https://github.com/zed-industries/zed/blob/main/script/linux#L15
+# build instructions - https://zed.dev/docs/development/linux
+[source]
+git = "https://github.com/zed-industries/zed"
+[build]
+template = "custom"
+dependencies = [
+    "fontconfig",
+    "libxkbcommon",
+    "openssl1",
+    "zstd",
+    "libgit2",
+    "sqlite3",
+]
+script = """
+cookbook_cargo_packages cli zed
+mv "${COOKBOOK_STAGE}/usr/bin/cli" "${COOKBOOK_STAGE}/usr/bin/zed-cli"
+mv "${COOKBOOK_STAGE}/usr/bin/zed" "${COOKBOOK_STAGE}/usr/bin/zed-editor"
+"""
-- 
GitLab