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 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 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/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 diff --git a/recipes/cargo/recipe.sh b/recipes/cargo/recipe.sh index 55f0ea18b..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 -BUILD_DEPENDS=(openssl) +BRANCH=redox_rebase +BUILD_DEPENDS=(openssl zlib) function recipe_build { + export DEP_OPENSSL_ROOT="$PWD/../sysroot" export OPENSSL_DIR="$PWD/../sysroot" + export DEP_Z_ROOT="$PWD/../sysroot" } 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/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/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" 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 +} diff --git a/recipes/git/recipe.sh b/recipes/git/recipe.sh index f9b212c4f..cedf42ac6 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" @@ -14,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" 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 +} 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/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 +} diff --git a/recipes/newlibtest/recipe.sh b/recipes/newlibtest/recipe.sh new file mode 100644 index 000000000..fdbed7c51 --- /dev/null +++ b/recipes/newlibtest/recipe.sh @@ -0,0 +1,40 @@ +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="-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 +} + +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 +} 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/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 } diff --git a/recipes/rust/config.toml b/recipes/rust/config.toml index 14828f7e9..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"] @@ -9,11 +8,9 @@ docs = false submodules = false [rust] -codegen-units = 0 use-jemalloc = false backtrace = false rpath = false -codegen-tests = false [target.x86_64-unknown-redox] cc = "x86_64-unknown-redox-gcc" diff --git a/recipes/rust/recipe.sh b/recipes/rust/recipe.sh index aa3383ca7..afab8847d 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 } diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index c4636deca..93a4845bc 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]*\ @@ -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() +{ @@ -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,266 @@ +/* + 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" + @@ -572,22 +574,36 @@ 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; + } + + 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:/-1/-1/%d/%d/SDL", width, height); -+ this->hidden->fd = open(path, O_RDONLY); ++ snprintf(path, 4096, "orbital:a/-1/-1/%d/%d/SDL", width, height); ++ 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"); ++ 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 +613,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 +655,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 +669,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 +686,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 +731,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 +744,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, diff --git a/recipes/terminfo/recipe.sh b/recipes/terminfo/recipe.sh new file mode 100644 index 000000000..2321f0df0 --- /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 + cp -r * ../stage/share/ + skip=1 +} 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 +} 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 } 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 } diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index 0c70d7bbe..2dde4ea82 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/tar.gz/v$VERSION function recipe_version { echo "$VERSION" @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + ./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 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 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 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