From 30239250d6fe4448f7081144125e3bb74e3e7042 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Mon, 30 Dec 2024 10:04:44 -0700
Subject: [PATCH] Add mupen64plus recipe

---
 recipes/emulators/mupen64plus/recipe.toml | 35 +++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 recipes/emulators/mupen64plus/recipe.toml

diff --git a/recipes/emulators/mupen64plus/recipe.toml b/recipes/emulators/mupen64plus/recipe.toml
new file mode 100644
index 000000000..d28ca0bc9
--- /dev/null
+++ b/recipes/emulators/mupen64plus/recipe.toml
@@ -0,0 +1,35 @@
+[source]
+tar = "https://github.com/mupen64plus/mupen64plus-core/releases/download/2.6.0/mupen64plus-core-src-2.6.0.tar.gz"
+blake3 = "faef6f557b32165adf5ad7f12a22f1dfda98893f59cbf910b697a86e610652a9"
+
+[build]
+template = "custom"
+dependencies = [
+    "freetype2",
+    "liborbital",
+    "libpng",
+    "llvm18",
+    "mesa",
+    "mesa-glu",
+    "sdl2",
+    "zlib",
+]
+script = """
+rsync -av --delete "${COOKBOOK_SOURCE}/" ./
+#TODO: support Redox in UNAME
+"${COOKBOOK_MAKE}" \
+    CROSS_COMPILE="${TARGET}-" \
+    GLES_LIB="" \
+    GL_CFLAGS="$("${TARGET}-pkg-config" --cflags osmesa)" \
+    GL_LDLIBS="$("${TARGET}-pkg-config" --libs osmesa)" \
+    HOST_CPU="${TARGET%%-*}" \
+    SDL_CFLAGS="$("${TARGET}-pkg-config" --cflags sdl2)" \
+    SDL_LDFLAGS="$("${TARGET}-pkg-config" --libs sdl2)" \
+    UNAME=Linux \
+    USE_GLES=1 \
+    V=1 \
+    VULKAN=0 \
+    -C projects/unix \
+    -j "${COOKBOOK_MAKE_JOBS}" \
+    all
+"""
-- 
GitLab