From a42121231331d6f1b2fd87e3ed85c104446b2f5a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 10 Dec 2018 12:44:02 -0700 Subject: [PATCH] Recipe cleanup and add freeglut (WIP) --- recipes/cmatrix/recipe.sh | 2 +- recipes/curl/01-no-nonblock.patch | 14 +++-- ...select.patch => 02-redox-sys-select.patch} | 10 ++-- recipes/curl/02-threaded-resolver-fix.patch | 31 ---------- recipes/curl/recipe.sh | 19 ++++-- recipes/eduke32/recipe.sh | 2 +- recipes/expat/recipe.sh | 2 +- recipes/freeglut/recipe.sh | 44 ++++++++++++++ recipes/freeglut/redox_cross_toolchain.cmake | 1 + recipes/freetype/recipe.sh | 7 +-- recipes/gears/recipe.sh | 2 +- recipes/gigalomania/recipe.sh | 2 +- recipes/git/recipe.sh | 2 +- recipes/gnu-binutils/recipe.sh | 2 +- recipes/jansson/recipe.sh | 2 +- recipes/libiconv/recipe.sh | 1 + recipes/libjpeg/recipe.sh | 1 + recipes/libpng/recipe.sh | 1 + recipes/mdp/recipe.sh | 2 +- recipes/mesa/recipe.sh | 11 ++-- recipes/mesa_glu/recipe.sh | 10 ++-- recipes/netsurf/recipe.sh | 2 +- recipes/newlibtest/recipe.sh | 2 +- recipes/openjazz/recipe.sh | 8 +-- recipes/osdemo/recipe.sh | 2 +- recipes/readline/recipe.sh | 2 +- recipes/scummvm/recipe.sh | 2 +- recipes/sdl/recipe.sh | 20 +++++-- recipes/sdl_gfx/recipe.sh | 11 ++-- recipes/sdl_image/recipe.sh | 13 ++-- recipes/sdl_mixer/recipe.sh | 20 +++++-- recipes/sdl_ttf/01_redox.patch | 59 +++++++++++++++++-- recipes/sdl_ttf/recipe.sh | 15 ++--- recipes/sopwith/recipe.sh | 3 +- recipes/ssh/recipe.sh | 4 +- recipes/syobonaction/recipe.sh | 7 +-- recipes/vim/recipe.sh | 2 +- recipes/zlib/recipe.sh | 1 - 38 files changed, 215 insertions(+), 126 deletions(-) rename recipes/curl/{03-redox-sys-select.patch => 02-redox-sys-select.patch} (52%) delete mode 100644 recipes/curl/02-threaded-resolver-fix.patch create mode 100644 recipes/freeglut/recipe.sh create mode 100644 recipes/freeglut/redox_cross_toolchain.cmake diff --git a/recipes/cmatrix/recipe.sh b/recipes/cmatrix/recipe.sh index 0d001a958..3dd1d835f 100644 --- a/recipes/cmatrix/recipe.sh +++ b/recipes/cmatrix/recipe.sh @@ -13,7 +13,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" ./configure --host=${HOST} --prefix=/ --without-fonts diff --git a/recipes/curl/01-no-nonblock.patch b/recipes/curl/01-no-nonblock.patch index a2b4dd4aa..e27622937 100644 --- a/recipes/curl/01-no-nonblock.patch +++ b/recipes/curl/01-no-nonblock.patch @@ -1,12 +1,14 @@ -diff -ru source/lib/nonblock.c source-new/lib/nonblock.c ---- source/lib/nonblock.c 2017-08-07 15:42:29.000000000 -0700 -+++ source-new/lib/nonblock.c 2017-08-17 10:57:30.123497389 -0700 +diff -ruw source/lib/nonblock.c source-new/lib/nonblock.c +--- source/lib/nonblock.c 2018-10-27 04:00:54.000000000 -0600 ++++ source-new/lib/nonblock.c 2018-12-10 12:40:21.350755609 -0700 @@ -47,7 +47,7 @@ int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ int nonblock /* TRUE or FALSE */) { -#if defined(USE_BLOCKING_SOCKETS) -+#if 1 - ++#if defined(USE_BLOCKING_SOCKETS) || defined(__redox__) + (void)sockfd; + (void)nonblock; return 0; /* returns success */ - +Only in source-new/lib: nonblock.c.orig +Only in source-new/lib: nonblock.c.rej diff --git a/recipes/curl/03-redox-sys-select.patch b/recipes/curl/02-redox-sys-select.patch similarity index 52% rename from recipes/curl/03-redox-sys-select.patch rename to recipes/curl/02-redox-sys-select.patch index a99771f5f..10c691203 100644 --- a/recipes/curl/03-redox-sys-select.patch +++ b/recipes/curl/02-redox-sys-select.patch @@ -1,10 +1,12 @@ ---- source/include/curl/curl.h 2017-08-07 15:42:29.000000000 -0700 -+++ build/include/curl/curl.h 2018-09-20 14:27:20.462414020 -0700 -@@ -74,6 +74,7 @@ +diff -ruw source/include/curl/curl.h source-new/include/curl/curl.h +--- source/include/curl/curl.h 2018-10-30 10:53:59.000000000 -0600 ++++ source-new/include/curl/curl.h 2018-12-10 12:42:52.504393368 -0700 +@@ -74,7 +74,7 @@ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ -+ defined(__redox__) || \ +- defined(__CYGWIN__) || \ ++ defined(__CYGWIN__) || defined(__redox__) \ (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) #include #endif diff --git a/recipes/curl/02-threaded-resolver-fix.patch b/recipes/curl/02-threaded-resolver-fix.patch deleted file mode 100644 index d885ca4e8..000000000 --- a/recipes/curl/02-threaded-resolver-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit 3cb4bb6b5fb8a936cb69e2e9ea6a4e692122abb9 -Author: Jakub Zakrzewski -Date: Tue Aug 15 13:21:33 2017 -0400 - - curl-confopts.m4: fix --disable-threaded-resolver - - Closes https://github.com/curl/curl/issues/1784 - -diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 -index d77a884d5..6dcd0f1a6 100644 ---- a/m4/curl-confopts.m4 -+++ b/m4/curl-confopts.m4 -@@ -37,14 +37,14 @@ AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver]) - AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]), - OPT_THRES=$enableval) - case "$OPT_THRES" in -- *) -- dnl configure option not specified -- want_thres="yes" -- ;; - no) - dnl --disable-threaded-resolver option used - want_thres="no" - ;; -+ *) -+ dnl configure option not specified -+ want_thres="yes" -+ ;; - esac - AC_MSG_RESULT([$want_thres]) - ]) diff --git a/recipes/curl/recipe.sh b/recipes/curl/recipe.sh index 71f896e49..b404b20e9 100644 --- a/recipes/curl/recipe.sh +++ b/recipes/curl/recipe.sh @@ -1,10 +1,10 @@ -TAR=https://curl.haxx.se/download/curl-7.55.1.tar.gz -BRANCH=redox +VERSION="7.62.0" +TAR=https://curl.haxx.se/download/curl-$VERSION.tar.gz BUILD_DEPENDS=(openssl zlib) DEPENDS="ca-certificates" function recipe_version { - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + echo "$VERSION" skip=1 } @@ -14,9 +14,19 @@ function recipe_update { } function recipe_build { + sysroot="$(realpath ../sysroot)" wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub autoreconf -i - ./configure --prefix=/ --host=${HOST} --disable-tftp --disable-ftp --disable-ntlm-wb --disable-threaded-resolver --with-zlib="$PWD/../sysroot" --with-ssl="$PWD/../sysroot" --with-ca-path=/ssl/certs + ./configure \ + --prefix=/ \ + --host=${HOST} \ + --disable-tftp \ + --disable-ftp \ + --disable-ntlm-wb \ + --disable-threaded-resolver \ + --with-zlib="$sysroot" \ + --with-ssl="$sysroot" \ + --with-ca-path=/ssl/certs make -j"$(nproc)" skip=1 } @@ -34,6 +44,5 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install - rm -rf "$1"/share skip=1 } diff --git a/recipes/eduke32/recipe.sh b/recipes/eduke32/recipe.sh index 426eb715c..f60f998bc 100644 --- a/recipes/eduke32/recipe.sh +++ b/recipes/eduke32/recipe.sh @@ -13,7 +13,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" export SDLCONFIG="$sysroot/bin/sdl-config" diff --git a/recipes/expat/recipe.sh b/recipes/expat/recipe.sh index f98564e4a..e2277e783 100644 --- a/recipes/expat/recipe.sh +++ b/recipes/expat/recipe.sh @@ -30,6 +30,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install - rm -rf "$1"/{lib/pkgconfig,share} + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/freeglut/recipe.sh b/recipes/freeglut/recipe.sh new file mode 100644 index 000000000..3108f2088 --- /dev/null +++ b/recipes/freeglut/recipe.sh @@ -0,0 +1,44 @@ +TAR=https://cytranet.dl.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz + +BUILD_DEPENDS=(mesa mesa_glu) + +function recipe_version { + echo "3.0.0" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include" + export CPPFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib" + cmake \ + -D CMAKE_TOOLCHAIN_FILE=../redox_cross_toolchain.cmake \ + -D CMAKE_INSTALL_PREFIX=/ \ + -D FREEGLUT_GLES=0 \ + . + #./configure --host="${HOST}" --prefix=/ --enable-osmesa + 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)" + make DESTDIR="$dest" install + skip=1 +} diff --git a/recipes/freeglut/redox_cross_toolchain.cmake b/recipes/freeglut/redox_cross_toolchain.cmake new file mode 100644 index 000000000..d2a3fb7b6 --- /dev/null +++ b/recipes/freeglut/redox_cross_toolchain.cmake @@ -0,0 +1 @@ +SET(CMAKE_SYSTEM_NAME Redox) diff --git a/recipes/freetype/recipe.sh b/recipes/freetype/recipe.sh index ce2cc9a2f..5999cf0d1 100644 --- a/recipes/freetype/recipe.sh +++ b/recipes/freetype/recipe.sh @@ -1,4 +1,4 @@ -VERSION=2.9 +VERSION=2.9.1 TAR=https://download.savannah.gnu.org/releases/freetype/freetype-$VERSION.tar.gz BUILD_DEPENDS=(zlib libpng) @@ -13,10 +13,9 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" - ./configure --host=${HOST} --prefix='/' make -j"$(nproc)" skip=1 @@ -35,6 +34,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install - sed -i -e "s%//lib/libpng16.la%$dest/../sysroot/lib/libpng16.la%" "$dest/lib/libfreetype.la" + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/gears/recipe.sh b/recipes/gears/recipe.sh index e4c618a88..11f49bf1f 100644 --- a/recipes/gears/recipe.sh +++ b/recipes/gears/recipe.sh @@ -12,7 +12,7 @@ function recipe_update { function recipe_build { cp ../gears.c gears.c - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" set -x "${CXX}" -I "$sysroot/include" -L "$sysroot/lib" gears.c -o gears -lorbital -lOSMesa -lGLU -lglapi -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm set +x diff --git a/recipes/gigalomania/recipe.sh b/recipes/gigalomania/recipe.sh index e1f020034..5a215443d 100644 --- a/recipes/gigalomania/recipe.sh +++ b/recipes/gigalomania/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { export CPPHOST=${HOST}-g++ - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" make all -j"$(nproc)" diff --git a/recipes/git/recipe.sh b/recipes/git/recipe.sh index b004bd8ed..fe275cc59 100644 --- a/recipes/git/recipe.sh +++ b/recipes/git/recipe.sh @@ -16,7 +16,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" ./configure --host=${HOST} --prefix=/ ac_cv_fread_reads_directories=yes ac_cv_snprintf_returns_bogus=yes ac_cv_lib_curl_curl_global_init=yes CURL_CONFIG=no diff --git a/recipes/gnu-binutils/recipe.sh b/recipes/gnu-binutils/recipe.sh index fb6512988..a4878e05f 100644 --- a/recipes/gnu-binutils/recipe.sh +++ b/recipes/gnu-binutils/recipe.sh @@ -12,7 +12,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" mkdir -p "$sysroot/usr" ln -sf "$sysroot/include" "$sysroot/usr/include" ln -sf "$sysroot/lib" "$sysroot/usr/lib" diff --git a/recipes/jansson/recipe.sh b/recipes/jansson/recipe.sh index a89e9caa5..b40c99066 100644 --- a/recipes/jansson/recipe.sh +++ b/recipes/jansson/recipe.sh @@ -12,7 +12,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" ./configure --host=${HOST} --prefix=/ diff --git a/recipes/libiconv/recipe.sh b/recipes/libiconv/recipe.sh index 71f90b2c8..da36d9f6c 100644 --- a/recipes/libiconv/recipe.sh +++ b/recipes/libiconv/recipe.sh @@ -30,5 +30,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/libjpeg/recipe.sh b/recipes/libjpeg/recipe.sh index b3361c51c..5db06702b 100644 --- a/recipes/libjpeg/recipe.sh +++ b/recipes/libjpeg/recipe.sh @@ -30,5 +30,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/libpng/recipe.sh b/recipes/libpng/recipe.sh index 8acf9f359..1aa63ed92 100644 --- a/recipes/libpng/recipe.sh +++ b/recipes/libpng/recipe.sh @@ -37,5 +37,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install + rm -f "$dest/bin/"*-config "$dest/lib/"*.la skip=1 } diff --git a/recipes/mdp/recipe.sh b/recipes/mdp/recipe.sh index e3a9b834c..006a7e9f3 100644 --- a/recipes/mdp/recipe.sh +++ b/recipes/mdp/recipe.sh @@ -13,7 +13,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include -I$sysroot/include/ncursesw" export LDFLAGS="-L$sysroot/lib" make -j"$(nproc)" diff --git a/recipes/mesa/recipe.sh b/recipes/mesa/recipe.sh index 35e311beb..069702dad 100644 --- a/recipes/mesa/recipe.sh +++ b/recipes/mesa/recipe.sh @@ -14,13 +14,14 @@ function recipe_update { } function recipe_build { - NOCONFIGURE=1 ./autogen.sh - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1" export CPPFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1" export LDFLAGS="-L$sysroot/lib" - EXPAT_LIBS="-lexpat" EXPAT_CFLAGS="." \ - ./configure --host="${HOST}" --prefix=/ \ + NOCONFIGURE=1 ./autogen.sh + ./configure \ + --host="${HOST}" \ + --prefix=/ \ --disable-dri \ --disable-dri3 \ --disable-driglx-direct \ @@ -48,6 +49,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install - sed -i -e "s%//lib/libglapi.la%$dest/lib/libglapi.la%" "$dest/lib/"*.la + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/mesa_glu/recipe.sh b/recipes/mesa_glu/recipe.sh index 59876c4f1..b93a7dbd7 100644 --- a/recipes/mesa_glu/recipe.sh +++ b/recipes/mesa_glu/recipe.sh @@ -1,8 +1,9 @@ -TAR=ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.bz2 +VERSION=9.0.0 +TAR=ftp://ftp.freedesktop.org/pub/mesa/glu/glu-$VERSION.tar.bz2 BUILD_DEPENDS=(mesa) function recipe_version { - echo "9.0.0" + echo "$VERSION" skip=1 } @@ -12,11 +13,11 @@ function recipe_update { } function recipe_build { - wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include" export CPPFLAGS="-I$sysroot/include" export LDFLAGS="-L$sysroot/lib" + wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub ./configure --host="${HOST}" --prefix=/ --enable-osmesa make -j"$(nproc)" skip=1 @@ -35,5 +36,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/netsurf/recipe.sh b/recipes/netsurf/recipe.sh index e00cab215..4fca8bc6d 100644 --- a/recipes/netsurf/recipe.sh +++ b/recipes/netsurf/recipe.sh @@ -14,7 +14,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export TARGET="framebuffer" export CFLAGS="-I$sysroot/include -I${PWD}/inst-${TARGET}/include" export LDFLAGS="-L$sysroot/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition" diff --git a/recipes/newlibtest/recipe.sh b/recipes/newlibtest/recipe.sh index 237f08c16..9dac27fee 100644 --- a/recipes/newlibtest/recipe.sh +++ b/recipes/newlibtest/recipe.sh @@ -12,7 +12,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" 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" diff --git a/recipes/openjazz/recipe.sh b/recipes/openjazz/recipe.sh index b051dec2a..aae30c7c1 100644 --- a/recipes/openjazz/recipe.sh +++ b/recipes/openjazz/recipe.sh @@ -2,10 +2,6 @@ VERSION=0.1 GIT=https://github.com/AlisterT/openjazz BUILD_DEPENDS=(sdl liborbital zlib) -export CFLAGS="-I$PWD/sysroot/include/ -I$PWD/sysroot/include/SDL/ -UUSE_SOCKETS -UUSE_SDL_NET" -export CPPFLAGS="$CFLAGS" -export LDFLAGS="-L$PWD/sysroot/lib/" - function recipe_version { echo "$VERSION" skip=1 @@ -17,6 +13,10 @@ function recipe_update { } function recipe_build { + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include -UUSE_SOCKETS -UUSE_SDL_NET" + export CPPFLAGS="$CFLAGS" + export LDFLAGS="-L$sysroot/lib" touch INSTALL NEWS README AUTHORS ChangeLog COPYING autoreconf -fvi autoconf diff --git a/recipes/osdemo/recipe.sh b/recipes/osdemo/recipe.sh index 9ed2cd262..3c3f0ce7f 100644 --- a/recipes/osdemo/recipe.sh +++ b/recipes/osdemo/recipe.sh @@ -12,7 +12,7 @@ function recipe_update { function recipe_build { cp ../osdemo.c osdemo.c - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" set -x "${CXX}" -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -lorbital -lOSMesa -lGLU -lglapi -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm set +x diff --git a/recipes/readline/recipe.sh b/recipes/readline/recipe.sh index 665678bca..c13c1dacb 100644 --- a/recipes/readline/recipe.sh +++ b/recipes/readline/recipe.sh @@ -13,7 +13,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CFLAGS="-I$sysroot/include" ./configure --disable-shared --host=${HOST} --prefix="" diff --git a/recipes/scummvm/recipe.sh b/recipes/scummvm/recipe.sh index bd573dad6..6d5ca82b5 100644 --- a/recipes/scummvm/recipe.sh +++ b/recipes/scummvm/recipe.sh @@ -14,7 +14,7 @@ function recipe_update { function recipe_build { wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" ./configure \ --host=${HOST} \ diff --git a/recipes/sdl/recipe.sh b/recipes/sdl/recipe.sh index 433536b6e..375ac7775 100644 --- a/recipes/sdl/recipe.sh +++ b/recipes/sdl/recipe.sh @@ -2,9 +2,6 @@ VERSION=1.2.15 TAR=https://www.libsdl.org/release/SDL-$VERSION.tar.gz BUILD_DEPENDS=(liborbital) -export CFLAGS="-I$PWD/sysroot/include/" -export LDFLAGS="-L$PWD/sysroot/lib/" - function recipe_version { echo "$VERSION" skip=1 @@ -16,8 +13,22 @@ function recipe_update { } function recipe_build { + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib" ./autogen.sh - ./configure --prefix=/ --host=${HOST} --disable-shared --disable-pulseaudio --disable-video-x11 --disable-loadso --disable-threads --enable-audio --enable-dummyaudio --enable-video-orbital --enable-cdrom + ./configure \ + --host=${HOST} \ + --prefix=/ \ + --disable-shared \ + --disable-pulseaudio \ + --disable-video-x11 \ + --disable-loadso \ + --disable-threads \ + --enable-audio \ + --enable-dummyaudio \ + --enable-video-orbital \ + --enable-cdrom make -j"$(nproc)" skip=1 } @@ -35,5 +46,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install + rm -f "$dest/bin/"*-config "$dest/lib/"*.la skip=1 } diff --git a/recipes/sdl_gfx/recipe.sh b/recipes/sdl_gfx/recipe.sh index bf8bc274f..351c8b978 100644 --- a/recipes/sdl_gfx/recipe.sh +++ b/recipes/sdl_gfx/recipe.sh @@ -1,10 +1,7 @@ -VERSION=2.0.25 +VERSION=2.0.26 TAR=https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-$VERSION.tar.gz BUILD_DEPENDS=(sdl liborbital libiconv) -export CFLAGS="-I$PWD/sysroot/include/" -export LDFLAGS="-L$PWD/sysroot/lib/" - function recipe_version { echo "$VERSION" skip=1 @@ -16,6 +13,9 @@ function recipe_update { } function recipe_build { + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib" ./autogen.sh ./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest make -j"$(nproc)" @@ -34,8 +34,7 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" - sysroot="$(realpath ../sysroot)" make DESTDIR="$dest" install - sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/sdl_image/recipe.sh b/recipes/sdl_image/recipe.sh index cb5ff8d24..75c6f2c6b 100644 --- a/recipes/sdl_image/recipe.sh +++ b/recipes/sdl_image/recipe.sh @@ -1,9 +1,6 @@ VERSION=1.2.12 TAR=https://www.libsdl.org/projects/SDL_image/release/SDL_image-$VERSION.tar.gz -BUILD_DEPENDS=(sdl liborbital libjpeg libpng zlib) - -export CFLAGS="-I$PWD/sysroot/include/" -export LDFLAGS="-L$PWD/sysroot/lib/" +BUILD_DEPENDS=(sdl liborbital libiconv libjpeg libpng zlib) function recipe_version { echo "$VERSION" @@ -16,6 +13,9 @@ function recipe_update { } function recipe_build { + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib" ./autogen.sh ./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest --enable-png --enable-jpg make -j"$(nproc)" @@ -34,10 +34,7 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" - sysroot="$(realpath ../sysroot)" make DESTDIR="$dest" install - sed -i -e "s%//lib/libpng.la%$sysroot/lib/libpng.la%" "$dest/lib/"*.la - sed -i -e "s%//lib/libjpeg.la%$sysroot/lib/libjpeg.la%" "$dest/lib/"*.la - sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/sdl_mixer/recipe.sh b/recipes/sdl_mixer/recipe.sh index 1ffab835a..12b3b4e87 100644 --- a/recipes/sdl_mixer/recipe.sh +++ b/recipes/sdl_mixer/recipe.sh @@ -2,9 +2,6 @@ VERSION=1.2.12 TAR=https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-$VERSION.tar.gz BUILD_DEPENDS=(sdl liborbital) -export CFLAGS="-I$PWD/sysroot/include/" -export LDFLAGS="-L$PWD/sysroot/lib/" - function recipe_version { echo "$VERSION" skip=1 @@ -16,8 +13,20 @@ function recipe_update { } function recipe_build { + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib" ./autogen.sh - ./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest --disable-music-cmd --disable-music-mp3 --disable-smpegtest --disable-music-midi --disable-music-mod + ./configure \ + --prefix=/ \ + --host=${HOST} \ + --disable-shared \ + --disable-sdltest \ + --disable-music-cmd \ + --disable-music-mp3 \ + --disable-smpegtest \ + --disable-music-midi \ + --disable-music-mod make -j"$(nproc)" skip=1 } @@ -34,8 +43,7 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" - sysroot="$(realpath ../sysroot)" make DESTDIR="$dest" install - sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/sdl_ttf/01_redox.patch b/recipes/sdl_ttf/01_redox.patch index 9366f51c1..1ed96943b 100644 --- a/recipes/sdl_ttf/01_redox.patch +++ b/recipes/sdl_ttf/01_redox.patch @@ -1,7 +1,7 @@ -diff -rupNw source-original/config.sub source/config.sub ---- source-original/config.sub 2012-01-19 07:30:05.000000000 +0100 -+++ source/config.sub 2018-05-01 17:31:52.766229515 +0200 -@@ -1276,7 +1276,7 @@ case $os in +diff -ruw source/config.sub source-new/config.sub +--- source/config.sub 2012-01-14 21:44:08.000000000 -0700 ++++ source-new/config.sub 2018-12-10 12:17:28.136784814 -0700 +@@ -1276,7 +1276,7 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ @@ -9,4 +9,53 @@ diff -rupNw source-original/config.sub source/config.sub + | -kopensolaris* | -redox* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ \ No newline at end of file + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ +Only in source-new: config.sub.orig +diff -ruw source/configure.in source-new/configure.in +--- source/configure.in 2012-01-14 21:44:08.000000000 -0700 ++++ source-new/configure.in 2018-12-10 12:17:12.724883206 -0700 +@@ -91,38 +91,13 @@ + AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue) + + dnl Check for the FreeType 2 library +-dnl +-dnl Get the cflags and libraries from the freetype-config script +-dnl +-AC_ARG_WITH(freetype-prefix,[ --with-freetype-prefix=PFX Prefix where FREETYPE is +-installed (optional)], +- freetype_prefix="$withval", freetype_prefix="") +-AC_ARG_WITH(freetype-exec-prefix,[ --with-freetype-exec-prefix=PFX Exec prefix +-where FREETYPE is installed (optional)], +- freetype_exec_prefix="$withval", freetype_exec_prefix="") +- +-if test x$freetype_exec_prefix != x ; then +- freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix" +- if test x${FREETYPE_CONFIG+set} != xset ; then +- FREETYPE_CONFIG=$freetype_exec_prefix/bin/freetype-config +- fi +-fi +-if test x$freetype_prefix != x ; then +- freetype_args="$freetype_args --prefix=$freetype_prefix" +- if test x${FREETYPE_CONFIG+set} != xset ; then +- FREETYPE_CONFIG=$freetype_prefix/bin/freetype-config +- fi +-fi +-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) +-no_freetype="" +-if test "$FREETYPE_CONFIG" = "no" ; then +- AC_MSG_ERROR([ +-*** Unable to find FreeType2 library (http://www.freetype.org/) ++PKG_CHECK_MODULES([FT2], [freetype2 >= 7.0.1], [], [dnl ++ AC_CHECK_FT2(,,[AC_MSG_ERROR([dnl ++*** Unable to find FreeType2 library (http://www.freetype.org/)])] ++ ) + ]) +-else +- CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`" +- LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`" +-fi ++CFLAGS="$CFLAGS $FT2_CFLAGS" ++LIBS="$LIBS $FT2_LIBS" + + dnl Check for SDL + SDL_VERSION=1.2.4 diff --git a/recipes/sdl_ttf/recipe.sh b/recipes/sdl_ttf/recipe.sh index 3e3e2c6a5..2fbc04b17 100644 --- a/recipes/sdl_ttf/recipe.sh +++ b/recipes/sdl_ttf/recipe.sh @@ -2,9 +2,6 @@ VERSION=2.0.11 TAR=https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$VERSION.tar.gz BUILD_DEPENDS=(sdl liborbital freetype libpng zlib) -export CFLAGS="-I$PWD/sysroot/include/ -I$PWD/sysroot/include/freetype2/" -export LDFLAGS="-L$PWD/sysroot/lib/" - function recipe_version { echo "$VERSION" skip=1 @@ -16,10 +13,9 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" - export SDL_CONFIG="$sysroot/bin/sdl-config" - export FREETYPE_CONFIG="$sysroot/bin/freetype-config" - + sysroot="$(realpath ../sysroot)" + export CFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib" ./autogen.sh ./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest make -j"$(nproc)" @@ -38,10 +34,7 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" - sysroot="$(realpath ../sysroot)" make DESTDIR="$dest" install - sed -i -e "s%//lib/libfreetype.la%$sysroot/lib/libfreetype.la%" "$dest/lib/"*.la - sed -i -e "s%//lib/libpng16.la%$sysroot/lib/libpng16.la%" "$dest/lib/"*.la - sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la + rm -f "$dest/lib/"*.la skip=1 } diff --git a/recipes/sopwith/recipe.sh b/recipes/sopwith/recipe.sh index 432c5f715..eddace877 100644 --- a/recipes/sopwith/recipe.sh +++ b/recipes/sopwith/recipe.sh @@ -14,9 +14,10 @@ function recipe_update { function recipe_build { wget -O autotools/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" export LDFLAGS="-L$sysroot/lib" + export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config ./configure --host=${HOST} --prefix='' --with-sdl-prefix="$sysroot" make -j"$(nproc)" skip=1 diff --git a/recipes/ssh/recipe.sh b/recipes/ssh/recipe.sh index 43ad7c677..ffdba5384 100644 --- a/recipes/ssh/recipe.sh +++ b/recipes/ssh/recipe.sh @@ -14,7 +14,7 @@ function recipe_update { function newlib_build { rm -rf ../newlib - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" cd .. git clone --recursive https://github.com/sajattack/newlib -b ssh-deps cd newlib @@ -42,7 +42,7 @@ function newlib_build { function recipe_build { newlib_build - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" ./configure --host=${HOST} --prefix=/ diff --git a/recipes/syobonaction/recipe.sh b/recipes/syobonaction/recipe.sh index 732434652..aa8dc940d 100644 --- a/recipes/syobonaction/recipe.sh +++ b/recipes/syobonaction/recipe.sh @@ -13,11 +13,10 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" - export SDL_CONFIG="$sysroot/bin/sdl-config" - export CPPFLAGS="-I$sysroot/include -I$sysroot/include/SDL" + sysroot="$(realpath ../sysroot)" + export SDL_CONFIG="${PKG_CONFIG} sdl" + export CPPFLAGS="-I$sysroot/include" export LDFLAGS="-L$sysroot/lib" - make -j"$(nproc)" skip=1 } diff --git a/recipes/vim/recipe.sh b/recipes/vim/recipe.sh index a0d0e686b..98623b57b 100644 --- a/recipes/vim/recipe.sh +++ b/recipes/vim/recipe.sh @@ -14,7 +14,7 @@ function recipe_update { } function recipe_build { - sysroot="${PWD}/../sysroot" + sysroot="$(realpath ../sysroot)" export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" export vim_cv_toupper_broken=set diff --git a/recipes/zlib/recipe.sh b/recipes/zlib/recipe.sh index 1aa1cd8e9..0a294e316 100644 --- a/recipes/zlib/recipe.sh +++ b/recipes/zlib/recipe.sh @@ -30,6 +30,5 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install - rm -rf "$1"/share skip=1 }