From 4fcefcc47e9e1a96539acfbd6169cfabcda8a862 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Wed, 13 Dec 2017 22:19:25 -0700
Subject: [PATCH] Add newlibtest repo

---
 recipes/extrautils/recipe.sh |  2 +-
 recipes/newlibtest/recipe.sh | 39 ++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 recipes/newlibtest/recipe.sh

diff --git a/recipes/extrautils/recipe.sh b/recipes/extrautils/recipe.sh
index de7b40e11..f36cbfcab 100644
--- a/recipes/extrautils/recipe.sh
+++ b/recipes/extrautils/recipe.sh
@@ -1,5 +1,5 @@
 GIT=https://github.com/redox-os/extrautils.git
-BUILD_DEPENDS=xz
+BUILD_DEPENDS=(xz)
 export PKG_CONFIG_ALLOW_CROSS=1
 export PKG_CONFIG_PATH=
 export PKG_CONFIG_LIBDIR="$PWD/sysroot/lib/pkgconfig"
diff --git a/recipes/newlibtest/recipe.sh b/recipes/newlibtest/recipe.sh
new file mode 100644
index 000000000..81024e556
--- /dev/null
+++ b/recipes/newlibtest/recipe.sh
@@ -0,0 +1,39 @@
+GIT=https://github.com/redox-os/newlibtest.git
+BUILD_DEPENDS=(newlib)
+
+function recipe_version {
+    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+    skip=1
+}
+
+function recipe_update {
+    echo "skipping update"
+    skip=1
+}
+
+function recipe_build {
+    sysroot="${PWD}/../sysroot"
+    export CC="${HOST}-gcc"
+    export LD="${HOST}-ld"
+    export CFLAGS="-nostdinc -nostdlib -static $sysroot/lib/crt0.o"
+    export LIBS="-I $sysroot/include -L $sysroot/lib -lc -lm"
+
+    make all
+    skip=1
+}
+
+function recipe_test {
+    echo "skipping test"
+    skip=1
+}
+
+function recipe_clean {
+    make clean
+    skip=1
+}
+
+function recipe_stage {
+    dest="$(realpath $1)"
+    make DESTDIR="$dest" prefix=/ install
+    skip=1
+}
-- 
GitLab