From cad6d8f852c03f253d682a8309e4f47acbd9f7af Mon Sep 17 00:00:00 2001
From: Ribbon <ribbon_45@proton.me>
Date: Mon, 26 Feb 2024 19:42:16 +0000
Subject: [PATCH] Add the Celestia recipe

---
 recipes/wip/science/celestia/recipe.toml | 35 ++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 recipes/wip/science/celestia/recipe.toml

diff --git a/recipes/wip/science/celestia/recipe.toml b/recipes/wip/science/celestia/recipe.toml
new file mode 100644
index 000000000..28b7436d4
--- /dev/null
+++ b/recipes/wip/science/celestia/recipe.toml
@@ -0,0 +1,35 @@
+#TODO probably wrong script, see https://github.com/CelestiaProject/Celestia/blob/master/INSTALL.md#celestia-install-instructions-for-unix
+#TODO finish the recipes of some dependencies
+#TODO the SDL2 frontend is limited, Qt6 or Qt5 is preferred
+[source]
+tar = "https://github.com/CelestiaProject/Celestia/releases/download/1.6.4/celestia-1.6.4.tar.xz"
+[build]
+template = "custom"
+dependencies = [
+    "mesa",
+    "mesa-glu",
+    "sdl2",
+    "libepoxy",
+    "libeigen",
+    "libfmt",
+    "freetype2",
+    "libpng",
+    "libjpeg",
+    "luajit",
+]
+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
+    -DENABLE_INTERFACE=ON
+"${COOKBOOK_SOURCE}"
+)
+cookbook_configure
+"""
-- 
GitLab