From c4df5d226f19fdb8c21f83ac9b0635f2263b83f5 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jeremy@system76.com>
Date: Thu, 13 Dec 2018 12:04:14 -0700
Subject: [PATCH] Add hematite

---
 recipes/hematite/recipe.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 recipes/hematite/recipe.sh

diff --git a/recipes/hematite/recipe.sh b/recipes/hematite/recipe.sh
new file mode 100644
index 000000000..1eac2e09a
--- /dev/null
+++ b/recipes/hematite/recipe.sh
@@ -0,0 +1,17 @@
+GIT=https://gitlab.redox-os.org/redox-os/hematite.git
+GIT_UPSTREAM=https://github.com/PistonDevelopers/hematite.git
+BUILD_DEPENDS=(mesa)
+BRANCH=redox
+
+function recipe_build {
+    sysroot="$(realpath ../sysroot)"
+    cp -p "$ROOT/Xargo.toml" "Xargo.toml"
+    xargo rustc --target "$TARGET" --release ${CARGOFLAGS} \
+        -- \
+        -L "${sysroot}/lib" \
+        -l OSMesa \
+        -l glapi \
+        -l stdc++ \
+        -C link-args="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
+    skip=1
+}
-- 
GitLab