diff --git a/recipes/libc-bench/recipe.sh b/recipes/libc-bench/recipe.sh new file mode 100644 index 000000000..a136c82ca --- /dev/null +++ b/recipes/libc-bench/recipe.sh @@ -0,0 +1,34 @@ +VERSION=20110206 +TAR=http://www.etalabs.net/releases/libc-bench-$VERSION.tar.gz + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + make -j"$(nproc)" + skip=1 +} + +function recipe_test { + echo "skipping test" + skip=1 +} + +function recipe_clean { + make clean + skip=1 +} + +function recipe_stage { + dest="$(realpath $1)" + mkdir -v "$dest/bin" + cp -v "libc-bench" "$dest/bin" + skip=1 +} diff --git a/recipes/libc-bench/redox.patch b/recipes/libc-bench/redox.patch new file mode 100644 index 000000000..07d33e7da --- /dev/null +++ b/recipes/libc-bench/redox.patch @@ -0,0 +1,42 @@ +diff -ruw source/Makefile source-new/Makefile +--- source/Makefile 2011-01-31 00:13:00.000000000 -0700 ++++ source-new/Makefile 2018-12-25 09:07:37.564520567 -0700 +@@ -4,7 +4,7 @@ + + CFLAGS = -Os + LDFLAGS = -static +-LIBS = -lpthread -lrt -lpthread ++LIBS = -lpthread + + + all: libc-bench +diff -ruw source/utf8.c source-new/utf8.c +--- source/utf8.c 2011-01-24 20:08:38.000000000 -0700 ++++ source-new/utf8.c 2018-12-25 08:52:35.893821291 -0700 +@@ -3,7 +3,7 @@ + #include + #include + #include +-#include ++//#include + + size_t b_utf8_bigbuf(void *dummy) + { +@@ -18,7 +18,7 @@ + || setlocale(LC_CTYPE, "en.UTF-8") + || setlocale(LC_CTYPE, "de_DE-8") + || setlocale(LC_CTYPE, "fr_FR-8"); +- if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1; ++ //if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1; + + buf = malloc(500000); + wbuf = malloc(500000*sizeof(wchar_t)); +@@ -56,7 +56,7 @@ + || setlocale(LC_CTYPE, "en.UTF-8") + || setlocale(LC_CTYPE, "de_DE-8") + || setlocale(LC_CTYPE, "fr_FR-8"); +- if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1; ++ //if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1; + + buf = malloc(500000); + l = 0;