From c113d6d65caf9363f7de0100654962fde194520a Mon Sep 17 00:00:00 2001 From: Agustin Chiappe Berrini Date: Sat, 11 Nov 2017 20:27:04 -0500 Subject: [PATCH 01/30] Fix xz's recipe --- recipes/xz/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index 0c70d7bbe..7fc3ba56e 100644 --- a/recipes/xz/recipe.sh +++ b/recipes/xz/recipe.sh @@ -1,5 +1,5 @@ VERSION=5.2.3 -TAR=https://tukaani.org/xz/xz-$VERSION.tar.gz +TAR=https://codeload.github.com/xz-mirror/xz/archive/v$VERSION.tar.gz function recipe_version { echo "$VERSION" From 22c98abf7939aa3dff85b59b4e608bf902c6ecbc Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 13 Nov 2017 21:10:34 -0700 Subject: [PATCH 02/30] Clean up compilation of Rust --- recipes/rust/config.toml | 1 - recipes/rust/recipe.sh | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/rust/config.toml b/recipes/rust/config.toml index 14828f7e9..795350968 100644 --- a/recipes/rust/config.toml +++ b/recipes/rust/config.toml @@ -9,7 +9,6 @@ docs = false submodules = false [rust] -codegen-units = 0 use-jemalloc = false backtrace = false rpath = false diff --git a/recipes/rust/recipe.sh b/recipes/rust/recipe.sh index b7410e3a4..1dcc4c016 100644 --- a/recipes/rust/recipe.sh +++ b/recipes/rust/recipe.sh @@ -35,7 +35,7 @@ function recipe_fetch { function recipe_prepare { rm -rf "$LLVM_PREFIX" mkdir -p "$LLVM_PREFIX" - + rm -rf "$LLVM_BUILD" mkdir "$LLVM_BUILD" } @@ -53,8 +53,7 @@ function recipe_build { make install popd - cp ../{config.toml,llvm-config} ./ - python x.py build + python x.py build --config ../config.toml --jobs $(nproc) skip=1 } From d14d183a1de4e9b87730ae27700fbcaed04ded99 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 14 Nov 2017 19:55:29 -0700 Subject: [PATCH 03/30] Add version for ca-certificates --- recipes/ca-certificates/recipe.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/ca-certificates/recipe.sh b/recipes/ca-certificates/recipe.sh index f4e00f7a0..3f81b9cad 100644 --- a/recipes/ca-certificates/recipe.sh +++ b/recipes/ca-certificates/recipe.sh @@ -1,3 +1,8 @@ +function recipe_version { + date "+%Y%m%d" + skip=1 +} + function recipe_fetch { if [ ! -d source ] then From 25803c9a506f80dfe985c1f39d30ffcc7f2cc06c Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 14 Nov 2017 20:02:38 -0700 Subject: [PATCH 04/30] Disable LLVM ninja build Enable compilation of codegen tests --- recipes/rust/config.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/rust/config.toml b/recipes/rust/config.toml index 795350968..353699d3c 100644 --- a/recipes/rust/config.toml +++ b/recipes/rust/config.toml @@ -1,6 +1,5 @@ [llvm] static-libstdcpp = true -ninja = true [build] host = ["x86_64-unknown-redox"] @@ -12,7 +11,6 @@ submodules = false use-jemalloc = false backtrace = false rpath = false -codegen-tests = false [target.x86_64-unknown-redox] cc = "x86_64-unknown-redox-gcc" From 4cf1f88f3e0e810693159eae0d50714f732e5382 Mon Sep 17 00:00:00 2001 From: Paul Sajna Date: Fri, 17 Nov 2017 16:54:59 -0800 Subject: [PATCH 05/30] Fix recipe for xz --- recipes/xz/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index 7fc3ba56e..63ae1f26f 100644 --- a/recipes/xz/recipe.sh +++ b/recipes/xz/recipe.sh @@ -1,5 +1,5 @@ VERSION=5.2.3 -TAR=https://codeload.github.com/xz-mirror/xz/archive/v$VERSION.tar.gz +TAR=https://codeload.github.com/xz-mirror/xz/tar.gz/v$VERSION function recipe_version { echo "$VERSION" From 6091455593a96659399200d8d97e44a7b46563bb Mon Sep 17 00:00:00 2001 From: Paul Sajna Date: Fri, 17 Nov 2017 17:03:05 -0800 Subject: [PATCH 06/30] run autogen.sh in xz recipe --- recipes/xz/recipe.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index 63ae1f26f..872778753 100644 --- a/recipes/xz/recipe.sh +++ b/recipes/xz/recipe.sh @@ -13,6 +13,7 @@ function recipe_update { function recipe_build { wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub + ./autogen.sh ./configure --host=${HOST} --prefix=/ --enable-threads=no make skip=1 From c70d5e1573834de0911971b2967142593a03a1b9 Mon Sep 17 00:00:00 2001 From: Paul Sajna Date: Fri, 17 Nov 2017 19:12:38 -0800 Subject: [PATCH 07/30] 3rd attempt at fixing xz xD --- recipes/xz/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index 872778753..2dde4ea82 100644 --- a/recipes/xz/recipe.sh +++ b/recipes/xz/recipe.sh @@ -12,8 +12,8 @@ function recipe_update { } function recipe_build { - wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub ./autogen.sh + wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub ./configure --host=${HOST} --prefix=/ --enable-threads=no make skip=1 From 531567689407d00fb159222227fb8fd73b79b709 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sun, 19 Nov 2017 01:25:49 +0100 Subject: [PATCH 08/30] Add generaluser-gs recipe --- recipes/generaluser-gs/recipe.sh | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 recipes/generaluser-gs/recipe.sh diff --git a/recipes/generaluser-gs/recipe.sh b/recipes/generaluser-gs/recipe.sh new file mode 100644 index 000000000..34438dad9 --- /dev/null +++ b/recipes/generaluser-gs/recipe.sh @@ -0,0 +1,33 @@ +VERSION=1.471 +GIT=https://github.com/xTibor/redox-generaluser-gs.git + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + echo "skipping build" + skip=1 +} + +function recipe_test { + echo "skipping test" + skip=1 +} + +function recipe_clean { + echo "skipping clean" + skip=1 +} + +function recipe_stage { + mkdir -pv "$1/share/generaluser-gs" + cp -Rv ./* "$1/share/generaluser-gs" + skip=1 +} From b91513990b7bb7cd245c5440973402e26c04e577 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sun, 19 Nov 2017 01:26:06 +0100 Subject: [PATCH 09/30] Add timidity recipe --- recipes/timidity/recipe.sh | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes/timidity/recipe.sh diff --git a/recipes/timidity/recipe.sh b/recipes/timidity/recipe.sh new file mode 100644 index 000000000..5f1eaa495 --- /dev/null +++ b/recipes/timidity/recipe.sh @@ -0,0 +1,42 @@ +VERSION=2.14.0 +GIT=https://github.com/xTibor/redox-timidity.git +BRANCH=redox +DEPENDS="generaluser-gs" + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + autoreconf -f -i + wget -O autoconf/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub + ./configure --host=${HOST} --prefix='' + make + 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" install + + mkdir -pv "$1/share/timidity" + echo "soundfont /share/generaluser-gs/generaluser-gs.sf2" >> "$1/share/timidity/timidity.cfg" + + skip=1 +} From 3abc40d3283e35676aaae97200e312f440c8a447 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 19 Nov 2017 10:37:22 -0700 Subject: [PATCH 10/30] Replace cargo branch --- recipes/cargo/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cargo/recipe.sh b/recipes/cargo/recipe.sh index 55f0ea18b..25f1bc857 100644 --- a/recipes/cargo/recipe.sh +++ b/recipes/cargo/recipe.sh @@ -1,5 +1,5 @@ GIT=https://github.com/redox-os/cargo.git -BRANCH=redox +BRANCH=redox_rebase BUILD_DEPENDS=(openssl) function recipe_build { From cf5b60a8d926e3ced0738c9da597d2152a78cc7a Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sun, 19 Nov 2017 19:06:38 +0100 Subject: [PATCH 11/30] ffmpeg: Fix package version --- recipes/ffmpeg/recipe.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/ffmpeg/recipe.sh b/recipes/ffmpeg/recipe.sh index 565577dce..7b74bc381 100644 --- a/recipes/ffmpeg/recipe.sh +++ b/recipes/ffmpeg/recipe.sh @@ -1,5 +1,11 @@ +VERSION=3.3 GIT=https://github.com/FFmpeg/FFmpeg -BRANCH=release/3.3 +BRANCH=release/$VERSION + +function recipe_version { + echo "$VERSION" + skip=1 +} function recipe_update { echo "skipping update" From 51bc5e0e25b0afe8bd1ab135e5e107874b3886ca Mon Sep 17 00:00:00 2001 From: Paul Sajna Date: Sun, 19 Nov 2017 20:07:58 -0800 Subject: [PATCH 12/30] Add recipe for netdb --- recipes/netdb/recipe.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 recipes/netdb/recipe.sh diff --git a/recipes/netdb/recipe.sh b/recipes/netdb/recipe.sh new file mode 100644 index 000000000..f1c3cf978 --- /dev/null +++ b/recipes/netdb/recipe.sh @@ -0,0 +1,31 @@ +GIT=https://github.com/redox-os/netdb + +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 { + echo "skipping build" + skip=1 +} + +function recipe_test { + echo "skipping test" + skip=1 +} + +function recipe_clean { + echo "skipping clean" + skip=1 +} + +function recipe_stage { + cp -r * ../stage/ + skip=1 +} From 36bbaca4cffa1f7aa6ece13cb6463a83367b0719 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 20 Nov 2017 20:36:20 -0700 Subject: [PATCH 13/30] Add dependency directories for curl --- recipes/cargo/recipe.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/cargo/recipe.sh b/recipes/cargo/recipe.sh index 25f1bc857..3a688e5af 100644 --- a/recipes/cargo/recipe.sh +++ b/recipes/cargo/recipe.sh @@ -1,7 +1,9 @@ GIT=https://github.com/redox-os/cargo.git BRANCH=redox_rebase -BUILD_DEPENDS=(openssl) +BUILD_DEPENDS=(openssl zlib) function recipe_build { + export DEP_OPENSSL_ROOT="$PWD/../sysroot" export OPENSSL_DIR="$PWD/../sysroot" + export DEP_Z_ROOT="$PWD/../sysroot" } From d155f52d99c9851695b5a6a122dc2d672dbd6edb Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 21 Nov 2017 19:17:23 -0700 Subject: [PATCH 14/30] Add async flag for SDL --- recipes/sdl/01_orbital.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index c4636deca..dabe5afa6 100644 --- a/recipes/sdl/01_orbital.patch +++ b/recipes/sdl/01_orbital.patch @@ -16,7 +16,7 @@ diff -rupN sdl/configure.in sdl-redox/configure.in @@ -1646,6 +1646,19 @@ AC_HELP_STRING([--enable-video-dummy], [ fi } - + +dnl Set up the Orbital video driver. +CheckOrbitalVideo() +{ @@ -581,7 +581,7 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ + } + + char path[4096]; -+ snprintf(path, 4096, "orbital:/-1/-1/%d/%d/SDL", width, height); ++ snprintf(path, 4096, "orbital:a/-1/-1/%d/%d/SDL", width, height); + this->hidden->fd = open(path, O_RDONLY); + printf("%s at %d\n", path, this->hidden->fd); + From 72c6f2331413f234a956ce05a678826eb54e7043 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 21 Nov 2017 19:39:40 -0700 Subject: [PATCH 15/30] Update SDL patch --- recipes/sdl/01_orbital.patch | 76 ++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index dabe5afa6..ded4f4f14 100644 --- a/recipes/sdl/01_orbital.patch +++ b/recipes/sdl/01_orbital.patch @@ -1,6 +1,6 @@ diff -rupN sdl/build-scripts/config.sub sdl-redox/build-scripts/config.sub ---- sdl/build-scripts/config.sub 2012-01-18 22:30:05.000000000 -0800 -+++ sdl-redox/build-scripts/config.sub 2016-07-27 18:17:26.683907466 -0700 +--- sdl/build-scripts/config.sub 2012-01-18 23:30:05.000000000 -0700 ++++ sdl-redox/build-scripts/config.sub 2017-11-21 19:24:52.456066921 -0700 @@ -1276,7 +1276,7 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ @@ -55,8 +55,8 @@ diff -rupN sdl/configure.in sdl-redox/configure.in CheckDummyAudio CheckDLOPEN diff -rupN sdl/include/SDL_config.h.in sdl-redox/include/SDL_config.h.in ---- sdl/include/SDL_config.h.in 2012-01-18 22:30:05.000000000 -0800 -+++ sdl-redox/include/SDL_config.h.in 2016-07-27 18:17:26.683907466 -0700 +--- sdl/include/SDL_config.h.in 2012-01-18 23:30:05.000000000 -0700 ++++ sdl-redox/include/SDL_config.h.in 2017-11-21 19:24:52.460053442 -0700 @@ -268,6 +268,7 @@ #undef SDL_VIDEO_DRIVER_GGI #undef SDL_VIDEO_DRIVER_IPOD @@ -66,8 +66,8 @@ diff -rupN sdl/include/SDL_config.h.in sdl-redox/include/SDL_config.h.in #undef SDL_VIDEO_DRIVER_PHOTON #undef SDL_VIDEO_DRIVER_PICOGUI diff -rupN sdl/src/video/orbital/SDL_orbitalevents.c sdl-redox/src/video/orbital/SDL_orbitalevents.c ---- sdl/src/video/orbital/SDL_orbitalevents.c 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalevents.c 2016-07-27 18:17:26.683907466 -0700 +--- sdl/src/video/orbital/SDL_orbitalevents.c 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalevents.c 2017-11-21 19:24:52.460053442 -0700 @@ -0,0 +1,159 @@ +/* + SDL - Simple DirectMedia Layer @@ -229,8 +229,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalevents.c sdl-redox/src/video/orbital + +/* end of SDL_orbitalevents.c ... */ diff -rupN sdl/src/video/orbital/SDL_orbitalevents_c.h sdl-redox/src/video/orbital/SDL_orbitalevents_c.h ---- sdl/src/video/orbital/SDL_orbitalevents_c.h 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalevents_c.h 2016-07-27 18:17:26.683907466 -0700 +--- sdl/src/video/orbital/SDL_orbitalevents_c.h 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalevents_c.h 2017-11-21 19:24:52.460053442 -0700 @@ -0,0 +1,32 @@ +/* + SDL - Simple DirectMedia Layer @@ -265,8 +265,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalevents_c.h sdl-redox/src/video/orbit + +/* end of SDL_orbitalevents_c.h ... */ diff -rupN sdl/src/video/orbital/SDL_orbitalmouse.c sdl-redox/src/video/orbital/SDL_orbitalmouse.c ---- sdl/src/video/orbital/SDL_orbitalmouse.c 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalmouse.c 2016-07-27 18:17:26.683907466 -0700 +--- sdl/src/video/orbital/SDL_orbitalmouse.c 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalmouse.c 2017-11-21 19:24:52.460053442 -0700 @@ -0,0 +1,33 @@ +/* + SDL - Simple DirectMedia Layer @@ -302,8 +302,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalmouse.c sdl-redox/src/video/orbital/ + int unused; +}; diff -rupN sdl/src/video/orbital/SDL_orbitalmouse_c.h sdl-redox/src/video/orbital/SDL_orbitalmouse_c.h ---- sdl/src/video/orbital/SDL_orbitalmouse_c.h 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalmouse_c.h 2016-07-27 18:17:26.683907466 -0700 +--- sdl/src/video/orbital/SDL_orbitalmouse_c.h 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalmouse_c.h 2017-11-21 19:24:52.460053442 -0700 @@ -0,0 +1,26 @@ +/* + SDL - Simple DirectMedia Layer @@ -332,8 +332,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalmouse_c.h sdl-redox/src/video/orbita + +/* Functions to be exported */ diff -rupN sdl/src/video/orbital/SDL_orbitalscancode.h sdl-redox/src/video/orbital/SDL_orbitalscancode.h ---- sdl/src/video/orbital/SDL_orbitalscancode.h 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalscancode.h 2016-07-27 18:17:26.687240818 -0700 +--- sdl/src/video/orbital/SDL_orbitalscancode.h 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalscancode.h 2017-11-21 19:24:52.460053442 -0700 @@ -0,0 +1,80 @@ +#define SCANCODE_A 0x1E +#define SCANCODE_B 0x30 @@ -416,9 +416,9 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalscancode.h sdl-redox/src/video/orbit +#define SCANCODE_PERIOD 0x34 +#define SCANCODE_SLASH 0x35 diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/SDL_orbitalvideo.c ---- sdl/src/video/orbital/SDL_orbitalvideo.c 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalvideo.c 2016-07-27 18:17:26.687240818 -0700 -@@ -0,0 +1,243 @@ +--- sdl/src/video/orbital/SDL_orbitalvideo.c 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalvideo.c 2017-11-21 19:34:44.269053445 -0700 +@@ -0,0 +1,261 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2012 Sam Lantinga @@ -463,6 +463,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ +#include +#include +#include ++#include ++#include + +#define ORBITALVID_DRIVER_NAME "orbital" + @@ -574,20 +576,29 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ +{ + if ( this->hidden->fd ) { + close( this->hidden->fd ); ++ this->hidden->fd = 0; + } + + if ( this->hidden->buffer ) { -+ SDL_free( this->hidden->buffer ); ++ redox_funmap( this->hidden->buffer ); ++ this->hidden->buffer = NULL; + } + + char path[4096]; + snprintf(path, 4096, "orbital:a/-1/-1/%d/%d/SDL", width, height); + this->hidden->fd = open(path, O_RDONLY); ++ if ( this->hidden->fd <= 0 ) { ++ this->hidden->fd = 0; ++ SDL_SetError("Couldn't create window for requested mode"); ++ return(NULL); ++ } + printf("%s at %d\n", path, this->hidden->fd); + -+ this->hidden->buffer = SDL_malloc(width * height * (bpp / 8)); ++ this->hidden->buffer = redox_fmap(this->hidden->fd, 0, width * height * (bpp / 8)); + if ( ! this->hidden->buffer ) { -+ SDL_SetError("Couldn't allocate buffer for requested mode"); ++ close(this->hidden->fd); ++ this->hidden->fd = 0; ++ SDL_SetError("Couldn't map window for requested mode"); + return(NULL); + } + @@ -597,8 +608,10 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ + + /* Allocate the new pixel format for the screen */ + if ( ! SDL_ReallocFormat(current, bpp, 0, 0, 0, 0) ) { -+ SDL_free(this->hidden->buffer); ++ redox_funmap(this->hidden->buffer); + this->hidden->buffer = NULL; ++ close(this->hidden->fd); ++ this->hidden->fd = 0; + SDL_SetError("Couldn't allocate new pixel format for requested mode"); + return(NULL); + } @@ -637,7 +650,7 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ + +static void ORBITAL_UpdateRects(_THIS, int numrects, SDL_Rect *rects) +{ -+ write(this->hidden->fd, this->hidden->buffer, this->hidden->w * this->hidden->h * 4); ++ fsync(this->hidden->fd); +} + +int ORBITAL_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors) @@ -651,7 +664,12 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ +*/ +void ORBITAL_VideoQuit(_THIS) +{ -+ if ( this->hidden->fd ) { ++ if ( this->hidden->buffer ) { ++ redox_funmap( this->hidden->buffer ); ++ this->hidden->buffer = NULL; ++ } ++ ++ if ( this->hidden->fd >= 0) { + close( this->hidden->fd ); + this->hidden->fd = 0; + } @@ -663,8 +681,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ + } +} diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.h sdl-redox/src/video/orbital/SDL_orbitalvideo.h ---- sdl/src/video/orbital/SDL_orbitalvideo.h 1969-12-31 16:00:00.000000000 -0800 -+++ sdl-redox/src/video/orbital/SDL_orbitalvideo.h 2016-07-27 18:17:26.687240818 -0700 +--- sdl/src/video/orbital/SDL_orbitalvideo.h 1969-12-31 17:00:00.000000000 -0700 ++++ sdl-redox/src/video/orbital/SDL_orbitalvideo.h 2017-11-21 19:24:52.460053442 -0700 @@ -0,0 +1,41 @@ +/* + SDL - Simple DirectMedia Layer @@ -708,8 +726,8 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.h sdl-redox/src/video/orbital/ + +#endif /* _SDL_orbitalvideo_h */ diff -rupN sdl/src/video/SDL_sysvideo.h sdl-redox/src/video/SDL_sysvideo.h ---- sdl/src/video/SDL_sysvideo.h 2012-01-18 22:30:06.000000000 -0800 -+++ sdl-redox/src/video/SDL_sysvideo.h 2016-07-27 18:17:26.683907466 -0700 +--- sdl/src/video/SDL_sysvideo.h 2012-01-18 23:30:06.000000000 -0700 ++++ sdl-redox/src/video/SDL_sysvideo.h 2017-11-21 19:24:52.460053442 -0700 @@ -410,6 +410,9 @@ extern VideoBootStrap AALIB_bootstrap; #if SDL_VIDEO_DRIVER_CACA extern VideoBootStrap CACA_bootstrap; @@ -721,8 +739,8 @@ diff -rupN sdl/src/video/SDL_sysvideo.h sdl-redox/src/video/SDL_sysvideo.h extern VideoBootStrap DUMMY_bootstrap; #endif diff -rupN sdl/src/video/SDL_video.c sdl-redox/src/video/SDL_video.c ---- sdl/src/video/SDL_video.c 2012-01-18 22:30:06.000000000 -0800 -+++ sdl-redox/src/video/SDL_video.c 2016-07-27 18:17:26.683907466 -0700 +--- sdl/src/video/SDL_video.c 2012-01-18 23:30:06.000000000 -0700 ++++ sdl-redox/src/video/SDL_video.c 2017-11-21 19:24:52.460053442 -0700 @@ -126,6 +126,9 @@ static VideoBootStrap *bootstrap[] = { #if SDL_VIDEO_DRIVER_CACA &CACA_bootstrap, From bef342ff07cb980f68c0cc362a11cff4ef8e2eb1 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 21 Nov 2017 20:18:20 -0700 Subject: [PATCH 16/30] Disable CPU optimizations that may break machines --- recipes/prboom/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/prboom/recipe.sh b/recipes/prboom/recipe.sh index f3ef660ff..f8c084424 100644 --- a/recipes/prboom/recipe.sh +++ b/recipes/prboom/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { autoreconf -if wget -O autotools/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - ./configure --prefix=/ --host=${HOST} --disable-sdltest --disable-gl --without-net --with-sdl-prefix="$PWD/../sysroot" + ./configure --prefix=/ --host=${HOST} --disable-sdltest --disable-cpu-opt --disable-gl --without-net --with-sdl-prefix="$PWD/../sysroot" make skip=1 } From 1750721923b266141fd862269f12e4bd834a3ec5 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 21 Nov 2017 19:50:30 -0800 Subject: [PATCH 17/30] Add recipe for cmatrix (#108) * Add recipe for cmatrix * Add recipe for terminfo * Fix recipe for cmatrix --- recipes/cmatrix/cmatrix.patch | 101 ++++++++++++++++++++++++++++++++++ recipes/cmatrix/recipe.sh | 51 +++++++++++++++++ recipes/terminfo/recipe.sh | 32 +++++++++++ 3 files changed, 184 insertions(+) create mode 100644 recipes/cmatrix/cmatrix.patch create mode 100644 recipes/cmatrix/recipe.sh create mode 100644 recipes/terminfo/recipe.sh diff --git a/recipes/cmatrix/cmatrix.patch b/recipes/cmatrix/cmatrix.patch new file mode 100644 index 000000000..0cb612655 --- /dev/null +++ b/recipes/cmatrix/cmatrix.patch @@ -0,0 +1,101 @@ +diff -ru source/cmatrix.c source-new/cmatrix.c +--- source/cmatrix.c 2017-11-18 13:21:42.992870796 -0800 ++++ source-new/cmatrix.c 2017-11-18 13:20:45.446407288 -0800 +@@ -37,7 +37,7 @@ + #ifdef HAVE_NCURSES_H + #include + #else +-#include ++#include + #endif + + #ifdef HAVE_SYS_IOCTL_H +@@ -215,47 +215,49 @@ + + void handle_sigwinch(int s) { + +- char *tty = NULL; +- int fd = 0; +- int result = 0; +- struct winsize win; +- +- tty = ttyname(0); +- if (!tty) { +- return; +- } +- fd = open(tty, O_RDWR); +- if (fd == -1) { +- return; +- } +- result = ioctl(fd, TIOCGWINSZ, &win); +- if (result == -1) { +- return; +- } +- +- COLS = win.ws_col; +- LINES = win.ws_row; +- +- if(LINES <10){ +- LINES = 10; +- } +- if(COLS <10){ +- COLS = 10; +- } +- +-#ifdef HAVE_RESIZETERM +- resizeterm(LINES, COLS); +-#ifdef HAVE_WRESIZE +- if (wresize(stdscr, LINES, COLS) == ERR) { +- c_die("Cannot resize window!"); +- } +-#endif /* HAVE_WRESIZE */ +-#endif /* HAVE_RESIZETERM */ +- +- var_init(); +- /* Do these because width may have changed... */ +- clear(); +- refresh(); ++/* ++ * char *tty = NULL; ++ * int fd = 0; ++ * int result = 0; ++ * struct winsize win; ++ * ++ * tty = ttyname(0); ++ * if (!tty) { ++ * return; ++ * } ++ * fd = open(tty, O_RDWR); ++ * if (fd == -1) { ++ * return; ++ * } ++ * result = ioctl(fd, TIOCGWINSZ, &win); ++ * if (result == -1) { ++ * return; ++ * } ++ * ++ * COLS = win.ws_col; ++ * LINES = win.ws_row; ++ * ++ * if(LINES <10){ ++ * LINES = 10; ++ * } ++ * if(COLS <10){ ++ * COLS = 10; ++ * } ++ * ++ *#ifdef HAVE_RESIZETERM ++ * resizeterm(LINES, COLS); ++ *#ifdef HAVE_WRESIZE ++ * if (wresize(stdscr, LINES, COLS) == ERR) { ++ * c_die("Cannot resize window!"); ++ * } ++ *#endif [> HAVE_WRESIZE <] ++ *#endif [> HAVE_RESIZETERM <] ++ * ++ * var_init(); ++ * [> Do these because width may have changed... <] ++ * clear(); ++ * refresh(); ++ */ + } diff --git a/recipes/cmatrix/recipe.sh b/recipes/cmatrix/recipe.sh new file mode 100644 index 000000000..171789b34 --- /dev/null +++ b/recipes/cmatrix/recipe.sh @@ -0,0 +1,51 @@ +GIT=https://github.com/abishekvashok/cmatrix +BUILD_DEPENDS=(ncurses) +DEPENDS=(terminfo) + +export AR="${HOST}-ar" +export AS="${HOST}-as" +export CC="${HOST}-gcc" +export CXX="${HOST}-g++" +export LD="${HOST}-ld" +export NM="${HOST}-nm" +export OBJCOPY="${HOST}-objcopy" +export OBJDUMP="${HOST}-objdump" +export RANLIB="${HOST}-ranlib" +export READELF="${HOST}-readelf" +export STRIP="${HOST}-strip" + +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 LDFLAGS="-L$sysroot/lib" + export CPPFLAGS="-I$sysroot/include" + ./configure --host=${HOST} --prefix=/ --without-fonts + make + 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" install + rm -rf $1/share/man + skip=1 +} diff --git a/recipes/terminfo/recipe.sh b/recipes/terminfo/recipe.sh new file mode 100644 index 000000000..e45ed9dc9 --- /dev/null +++ b/recipes/terminfo/recipe.sh @@ -0,0 +1,32 @@ +GIT=https://github.com/sajattack/terminfo + +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 { + echo "skipping build" + skip=1 +} + +function recipe_test { + echo "skipping test" + skip=1 +} + +function recipe_clean { + echo "skipping clean" + skip=1 +} + +function recipe_stage { + mkdir -p ../stage/share/terminfo + cp -r * ../stage/share/terminfo/ + skip=1 +} From 123c12ad393c748098d80b3e857fe2cca934aaf0 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 21 Nov 2017 21:07:21 -0700 Subject: [PATCH 18/30] sdl: Require 32 bpp --- recipes/sdl/01_orbital.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index ded4f4f14..93a4845bc 100644 --- a/recipes/sdl/01_orbital.patch +++ b/recipes/sdl/01_orbital.patch @@ -418,7 +418,7 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalscancode.h sdl-redox/src/video/orbit diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/SDL_orbitalvideo.c --- sdl/src/video/orbital/SDL_orbitalvideo.c 1969-12-31 17:00:00.000000000 -0700 +++ sdl-redox/src/video/orbital/SDL_orbitalvideo.c 2017-11-21 19:34:44.269053445 -0700 -@@ -0,0 +1,261 @@ +@@ -0,0 +1,266 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2012 Sam Lantinga @@ -574,6 +574,11 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ +SDL_Surface *ORBITAL_SetVideoMode(_THIS, SDL_Surface *current, + int width, int height, int bpp, Uint32 flags) +{ ++ if ( bpp != 32 ) { ++ SDL_SetError("Unsupported color depth - must use 32-bits per pixel"); ++ return(NULL); ++ } ++ + if ( this->hidden->fd ) { + close( this->hidden->fd ); + this->hidden->fd = 0; @@ -586,7 +591,7 @@ diff -rupN sdl/src/video/orbital/SDL_orbitalvideo.c sdl-redox/src/video/orbital/ + + char path[4096]; + snprintf(path, 4096, "orbital:a/-1/-1/%d/%d/SDL", width, height); -+ this->hidden->fd = open(path, O_RDONLY); ++ this->hidden->fd = open(path, O_RDWR); + if ( this->hidden->fd <= 0 ) { + this->hidden->fd = 0; + SDL_SetError("Couldn't create window for requested mode"); From e4c9e702d2081dd4342c4690412586aa36448b03 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Thu, 23 Nov 2017 22:28:19 +0100 Subject: [PATCH 19/30] Add ca-certificates dependency for git --- recipes/git/recipe.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/git/recipe.sh b/recipes/git/recipe.sh index f9b212c4f..e2e001672 100644 --- a/recipes/git/recipe.sh +++ b/recipes/git/recipe.sh @@ -1,6 +1,7 @@ VERSION=2.13.1 TAR=https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.xz BUILD_DEPENDS=(zlib curl openssl expat) +DEPENDS="ca-certificates" export AR="${HOST}-ar" export AS="${HOST}-as" From 00bac37c7288ed1371cd34a8bfc375de13c372e7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 26 Nov 2017 09:12:26 -0700 Subject: [PATCH 20/30] Add unfetch script --- unfetch.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 unfetch.sh diff --git a/unfetch.sh b/unfetch.sh new file mode 100755 index 000000000..a63be6a73 --- /dev/null +++ b/unfetch.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +source config.sh + +if [ $# = 0 ] +then + recipes="$(ls -1 recipes)" +else + recipes="$@" +fi + +for recipe in $recipes +do + ./cook.sh "$recipe" unfetch +done From 7d02f68aad6b8e5d3a923b44cd07359f53aacadc Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 26 Nov 2017 19:14:35 -0700 Subject: [PATCH 21/30] Use poll with git --- recipes/git/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/git/recipe.sh b/recipes/git/recipe.sh index e2e001672..cedf42ac6 100644 --- a/recipes/git/recipe.sh +++ b/recipes/git/recipe.sh @@ -15,7 +15,7 @@ export RANLIB="${HOST}-ranlib" export READELF="${HOST}-readelf" export STRIP="${HOST}-strip" -MAKEFLAGS="NO_MMAP=1 NEEDS_SSL_WITH_CURL=1 NEEDS_CRYPTO_WITH_SSL=1 NO_UNIX_SOCKETS=1 NO_POLL=1 NEEDS_LIBICONV= NEEDS_LIBRT= BLK_SHA1=1" +MAKEFLAGS="NO_MMAP=1 NEEDS_SSL_WITH_CURL=1 NEEDS_CRYPTO_WITH_SSL=1 NO_UNIX_SOCKETS=1 NEEDS_LIBICONV= NEEDS_LIBRT= BLK_SHA1=1" function recipe_version { echo "$VERSION" From 2d5b7b9b5bb9a6058241a08a58f2f402a50f6166 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sun, 3 Dec 2017 22:43:28 +0100 Subject: [PATCH 22/30] Add ncursesw recipe, terminfo changes --- recipes/ncurses/recipe.sh | 3 ++- recipes/ncursesw/01-config-sub.patch | 21 +++++++++++++++ recipes/ncursesw/recipe.sh | 38 ++++++++++++++++++++++++++++ recipes/terminfo/recipe.sh | 6 ++--- recipes/vim/recipe.sh | 3 ++- 5 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 recipes/ncursesw/01-config-sub.patch create mode 100644 recipes/ncursesw/recipe.sh diff --git a/recipes/ncurses/recipe.sh b/recipes/ncurses/recipe.sh index a31c4ab02..ee3b27c5d 100644 --- a/recipes/ncurses/recipe.sh +++ b/recipes/ncurses/recipe.sh @@ -1,5 +1,6 @@ VERSION=6.0 TAR=http://ftp.gnu.org/gnu/ncurses/ncurses-$VERSION.tar.gz +DEPENDS="terminfo" function recipe_version { echo "$VERSION" @@ -13,7 +14,7 @@ function recipe_update { function recipe_build { export CPPFLAGS="-P" - ./configure --host=${HOST} --prefix="" + ./configure --host=${HOST} --prefix="" --disable-db-install make skip=1 } diff --git a/recipes/ncursesw/01-config-sub.patch b/recipes/ncursesw/01-config-sub.patch new file mode 100644 index 000000000..8ed32be67 --- /dev/null +++ b/recipes/ncursesw/01-config-sub.patch @@ -0,0 +1,21 @@ +diff -ru source/config.sub source-new/config.sub +--- source/config.sub 2015-05-02 13:52:04.000000000 +0200 ++++ source-new/config.sub 2017-08-13 13:12:16.485670615 +0200 +@@ -2,7 +2,7 @@ + # Configuration validation subroutine script. + # Copyright 1992-2015 Free Software Foundation, Inc. + +-timestamp='2015-03-08' ++timestamp='2017-08-13' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -1371,7 +1371,7 @@ + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. +- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ ++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -redox* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ diff --git a/recipes/ncursesw/recipe.sh b/recipes/ncursesw/recipe.sh new file mode 100644 index 000000000..8f454dbe9 --- /dev/null +++ b/recipes/ncursesw/recipe.sh @@ -0,0 +1,38 @@ +VERSION=6.0 +TAR=http://ftp.gnu.org/gnu/ncurses/ncurses-$VERSION.tar.gz +DEPENDS="terminfo" + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + export CPPFLAGS="-P" + ./configure --host=${HOST} --prefix="" --enable-widec --disable-db-install + make + 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" install + rm -rf "$1"/bin + rm -rf "$1"/share/{doc,info,man} + skip=1 +} diff --git a/recipes/terminfo/recipe.sh b/recipes/terminfo/recipe.sh index e45ed9dc9..2321f0df0 100644 --- a/recipes/terminfo/recipe.sh +++ b/recipes/terminfo/recipe.sh @@ -21,12 +21,12 @@ function recipe_test { } function recipe_clean { - echo "skipping clean" + echo "skipping clean" skip=1 } function recipe_stage { - mkdir -p ../stage/share/terminfo - cp -r * ../stage/share/terminfo/ + mkdir -p ../stage/share + cp -r * ../stage/share/ skip=1 } diff --git a/recipes/vim/recipe.sh b/recipes/vim/recipe.sh index c14e95e90..b0b64523d 100644 --- a/recipes/vim/recipe.sh +++ b/recipes/vim/recipe.sh @@ -1,6 +1,7 @@ VERSION=8.0.586 TAR=http://ftp.vim.org/vim/unix/vim-$VERSION.tar.bz2 BUILD_DEPENDS=(ncurses) +DEPENDS="terminfo" export AR="${HOST}-ar" export AS="${HOST}-as" @@ -35,7 +36,7 @@ function recipe_build { export vim_cv_stat_ignores_slash=no export vim_cv_memmove_handles_overlap=yes ./configure --host=${HOST} --prefix=/ --with-tlib=ncurses - make + make skip=1 } From 8b56ce4a032e3ce9363b09b79b2e94a6c5a1b33b Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Mon, 4 Dec 2017 04:27:18 +0100 Subject: [PATCH 23/30] Add mdp recipe --- recipes/mdp/recipe.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 recipes/mdp/recipe.sh diff --git a/recipes/mdp/recipe.sh b/recipes/mdp/recipe.sh new file mode 100644 index 000000000..c24965373 --- /dev/null +++ b/recipes/mdp/recipe.sh @@ -0,0 +1,40 @@ +GIT=https://github.com/visit1985/mdp.git +BUILD_DEPENDS=(ncursesw) +DEPENDS="terminfo" + +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="-I$sysroot/include -I$sysroot/include/ncursesw" + export LDFLAGS="-L$sysroot/lib" + + make + 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 +} From 94ceffa8607aee9519f11ff2a3ab1383f3d69295 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 8 Dec 2017 20:57:33 -0700 Subject: [PATCH 24/30] Use all possible bins from uutils --- recipes/uutils/recipe.sh | 63 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/recipes/uutils/recipe.sh b/recipes/uutils/recipe.sh index 5ee486280..563c97527 100644 --- a/recipes/uutils/recipe.sh +++ b/recipes/uutils/recipe.sh @@ -2,12 +2,63 @@ GIT=https://github.com/redox-os/uutils.git GIT_UPSTREAM=https://github.com/uutils/coreutils.git CARGOFLAGS="--no-default-features --features redox" +BINS=( + base32 + base64 + basename + chmod + cksum + comm + cp + cut + date + dircolors + dirname + echo + env + expand + expr + factor + false + fmt + fold + head + install + link + ls + mktemp + mv + od + paste + printenv + printf + pwd + readlink + realpath + relpath + rm + rmdir + seq + shuf + sleep + split + sum + tac + tee + tr + true + truncate + tsort + unexpand + uniq + wc + yes +) + function recipe_stage { mkdir -p "$1/bin" - ln -s uutils "$1/bin/chmod" - ln -s uutils "$1/bin/env" - ln -s uutils "$1/bin/expr" - ln -s uutils "$1/bin/install" - ln -s uutils "$1/bin/ls" - ln -s uutils "$1/bin/mktemp" + for bin in "${BINS[@]}" + do + ln -s uutils "$1/bin/$bin" + done } From 4fcefcc47e9e1a96539acfbd6169cfabcda8a862 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 13 Dec 2017 22:19:25 -0700 Subject: [PATCH 25/30] 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 +} From 527599d49c24d24eeecc1438c75477d3a3c59221 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 14 Dec 2017 20:05:28 -0700 Subject: [PATCH 26/30] Fix build of newlibtest --- cook.sh | 4 ++-- recipes/newlibtest/recipe.sh | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cook.sh b/cook.sh index 242688365..0de729bda 100755 --- a/cook.sh +++ b/cook.sh @@ -226,7 +226,7 @@ function op { fi popd > /dev/null ;; - prepare) + prepare) skip=0 if [ "$(type -t recipe_prepare)" = "function" ] then @@ -248,7 +248,7 @@ function op { pkg --target=$TARGET install --root sysroot "$REPO/$i.tar.gz" done fi - + rm -rf build cp -rp source build diff --git a/recipes/newlibtest/recipe.sh b/recipes/newlibtest/recipe.sh index 81024e556..fdbed7c51 100644 --- a/recipes/newlibtest/recipe.sh +++ b/recipes/newlibtest/recipe.sh @@ -15,8 +15,9 @@ 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" + export CFLAGS="-static -nostdinc -I $sysroot/include -I /usr/lib/gcc/x86_64-unknown-redox/7.0.1/include/ -nostdlib -L $sysroot/lib" + export CRT="$sysroot/lib/crt0.o" + export CLIBS="-lc -lm" make all skip=1 From 8efba6e883898df9fbed40ef28de681821da47ef Mon Sep 17 00:00:00 2001 From: Alex Lyon Date: Fri, 15 Dec 2017 21:09:05 -0800 Subject: [PATCH 27/30] Add recipes for nulld and zerod --- recipes/nulld/recipe.sh | 1 + recipes/zerod/recipe.sh | 1 + 2 files changed, 2 insertions(+) create mode 100644 recipes/nulld/recipe.sh create mode 100644 recipes/zerod/recipe.sh diff --git a/recipes/nulld/recipe.sh b/recipes/nulld/recipe.sh new file mode 100644 index 000000000..accc4b401 --- /dev/null +++ b/recipes/nulld/recipe.sh @@ -0,0 +1 @@ +GIT=https://github.com/redox-os/nulld.git diff --git a/recipes/zerod/recipe.sh b/recipes/zerod/recipe.sh new file mode 100644 index 000000000..855f8c055 --- /dev/null +++ b/recipes/zerod/recipe.sh @@ -0,0 +1 @@ +GIT=https://github.com/redox-os/zerod.git From 0e25e6ae5e246c0cc5dd9db4609b8b83f2ace658 Mon Sep 17 00:00:00 2001 From: Tommie Levy Date: Sat, 23 Dec 2017 20:20:11 -0500 Subject: [PATCH 28/30] Fix ci maybe --- setup.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.sh b/setup.sh index 9f30c1d75..bb8e5218e 100755 --- a/setup.sh +++ b/setup.sh @@ -1,9 +1,6 @@ #!/usr/bin/env bash set -e -echo "Downloading latest libc-artifacts" -git submodule update --init --remote libc-artifacts - echo "Downloading latest pkgutils" git submodule update --init --remote pkgutils cargo update --manifest-path pkgutils/Cargo.toml From 5ce3e4ef2dd38c77d66eba379c0b85776b3bb7f1 Mon Sep 17 00:00:00 2001 From: Tommie Levy Date: Sat, 23 Dec 2017 20:28:29 -0500 Subject: [PATCH 29/30] Remove cookbook's defuct ci config --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index afb0d2576..000000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: generic -sudo: required -install: - - curl https://sh.rustup.rs -sSf > rustup; chmod +x rustup; ./rustup --default-toolchain nightly -y - - export PATH="$HOME/.cargo/bin:$PATH"; ./setup.sh -script: export PATH="$HOME/.cargo/bin:$PATH"; ./ci.sh -notifications: - email: false From 4b81f4f6df29651dfdee5c9ccf365048cc070168 Mon Sep 17 00:00:00 2001 From: Tommie Levy Date: Sat, 23 Dec 2017 21:43:37 -0500 Subject: [PATCH 30/30] Remove travis ci badge in readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 423512a1e..1604f845c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # cookbook A collection of package recipes for Redox. -[![Travis Build Status](https://travis-ci.org/redox-os/cookbook.svg?branch=master)](https://travis-ci.org/redox-os/cookbook) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) ## Setup