From 04f6d62a3ecb2011f3025ed559bb6f5aa6d6612e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 16 Aug 2018 18:46:30 -0600 Subject: [PATCH 01/14] Use relibc branch of ion --- recipes/ion/recipe.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/ion/recipe.sh b/recipes/ion/recipe.sh index fda62673f..3660e6f62 100644 --- a/recipes/ion/recipe.sh +++ b/recipes/ion/recipe.sh @@ -1 +1,2 @@ GIT=https://gitlab.redox-os.org/redox-os/ion.git +BRANCH=relibc From c49323d8bc6920cee9fbfb0b4fce79423f89dab8 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 19 Aug 2018 11:26:47 -0600 Subject: [PATCH 02/14] Fix repo urls for init and netdb --- recipes/init/recipe.sh | 2 +- recipes/netdb/recipe.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/init/recipe.sh b/recipes/init/recipe.sh index ee32b737a..bdc53785a 100644 --- a/recipes/init/recipe.sh +++ b/recipes/init/recipe.sh @@ -1 +1 @@ -GIT=https://gitlab.redox-os.org/redox-os/init +GIT=https://gitlab.redox-os.org/redox-os/init.git diff --git a/recipes/netdb/recipe.sh b/recipes/netdb/recipe.sh index 638f3d251..12503ac97 100644 --- a/recipes/netdb/recipe.sh +++ b/recipes/netdb/recipe.sh @@ -1,4 +1,4 @@ -GIT=https://gitlab.redox-os.org/redox-os/netdb +GIT=https://gitlab.redox-os.org/redox-os/netdb.git function recipe_version { printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" From 1ce61efb450e0836690312adf05f99ed6e0f43e7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 19 Aug 2018 17:53:22 -0600 Subject: [PATCH 03/14] Fix incorrect header include --- recipes/sdl/01_orbital.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index 02e2f7996..2c9d9c2c1 100644 --- a/recipes/sdl/01_orbital.patch +++ b/recipes/sdl/01_orbital.patch @@ -416,9 +416,9 @@ diff -rupNw source-original/src/video/orbital/SDL_orbitalvideo.c source/src/vide +#include "SDL_orbitalevents_c.h" +#include "SDL_orbitalmouse_c.h" + ++#include +#include +#include -+#include +#include +#include + From 8aefc0353fba5a63331b410c8ab942bbf37dd4c7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 19 Aug 2018 18:02:27 -0600 Subject: [PATCH 04/14] Remove unused header file sys/redox.h --- recipes/sdl/01_orbital.patch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index 2c9d9c2c1..ba7666d2e 100644 --- a/recipes/sdl/01_orbital.patch +++ b/recipes/sdl/01_orbital.patch @@ -373,7 +373,7 @@ diff -rupNw source-original/src/video/orbital/SDL_orbitalmouse_c.h source/src/vi diff -rupNw source-original/src/video/orbital/SDL_orbitalvideo.c source/src/video/orbital/SDL_orbitalvideo.c --- source-original/src/video/orbital/SDL_orbitalvideo.c 1970-01-01 01:00:00.000000000 +0100 +++ source/src/video/orbital/SDL_orbitalvideo.c 2018-05-01 17:32:53.000320923 +0200 -@@ -0,0 +1,250 @@ +@@ -0,0 +1,249 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2012 Sam Lantinga @@ -419,7 +419,6 @@ diff -rupNw source-original/src/video/orbital/SDL_orbitalvideo.c source/src/vide +#include +#include +#include -+#include +#include + +#define ORBITALVID_DRIVER_NAME "orbital" From a92a4b8d652b6bb8494c5e6d64e29d61ef5f971d Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 27 Aug 2018 15:34:18 -0600 Subject: [PATCH 05/14] Remove use of autoconf --- recipes/gcc/recipe.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/gcc/recipe.sh b/recipes/gcc/recipe.sh index f7ad69a30..d3e47ea7c 100644 --- a/recipes/gcc/recipe.sh +++ b/recipes/gcc/recipe.sh @@ -18,9 +18,6 @@ function recipe_build { cp config.sub isl/config.sub cp config.sub mpfr/config.sub cp -f config.sub mpc/config.sub - pushd libstdc++-v3 - autoconf2.64 - popd ./configure --host=${HOST} --target=${HOST} --prefix=/ --enable-static --disable-shared --disable-dlopen --disable-nls --enable-languages=c,c++ make all-gcc all-target-libgcc all-target-libstdc++-v3 From 3286f7e4b60fb65b77097074c520feac5fa596de Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 8 Sep 2018 11:05:50 -0600 Subject: [PATCH 06/14] Use relibc branch for openssl --- recipes/openssl/recipe.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/openssl/recipe.sh b/recipes/openssl/recipe.sh index 872d9d980..21722d841 100644 --- a/recipes/openssl/recipe.sh +++ b/recipes/openssl/recipe.sh @@ -1,5 +1,5 @@ -GIT=https://github.com/ids1024/openssl.git -BRANCH=redox +GIT=https://gitlab.redox-os.org/redox-os/openssl.git +BRANCH=relibc function recipe_version { printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" From 6f4957952d48e69f52d06a0519061bd75df99f79 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 14 Sep 2018 20:56:31 -0600 Subject: [PATCH 07/14] Add ripgrep --- recipes/ripgrep/recipe.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes/ripgrep/recipe.sh diff --git a/recipes/ripgrep/recipe.sh b/recipes/ripgrep/recipe.sh new file mode 100644 index 000000000..bd1541552 --- /dev/null +++ b/recipes/ripgrep/recipe.sh @@ -0,0 +1 @@ +GIT=https://github.com/jackpot51/ripgrep.git From 974ea6514edcbf186ecb335b6505bf6edc2da58b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 18 Sep 2018 16:13:33 -0600 Subject: [PATCH 08/14] Add example driver --- recipes/exampled/recipe.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes/exampled/recipe.sh diff --git a/recipes/exampled/recipe.sh b/recipes/exampled/recipe.sh new file mode 100644 index 000000000..b56a7b49f --- /dev/null +++ b/recipes/exampled/recipe.sh @@ -0,0 +1 @@ +GIT=https://gitlab.redox-os.org/redox-os/exampled.git From 453279bbc603ed82d411772d319ef0f603bdf813 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 20 Sep 2018 14:40:36 -0700 Subject: [PATCH 09/14] Add patch for curl missing sys/select.h --- recipes/curl/03-redox-sys-select.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 recipes/curl/03-redox-sys-select.patch diff --git a/recipes/curl/03-redox-sys-select.patch b/recipes/curl/03-redox-sys-select.patch new file mode 100644 index 000000000..a99771f5f --- /dev/null +++ b/recipes/curl/03-redox-sys-select.patch @@ -0,0 +1,10 @@ +--- 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 @@ + #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ ++ defined(__redox__) || \ + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) + #include + #endif From 518c1c59cb226257c67cc0219626342d7e40e15f Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Fri, 10 Aug 2018 15:09:53 +0200 Subject: [PATCH 10/14] Bash: Needed patches for relibc --- recipes/bash/03-autotools-relibc-stuff.patch | 73 ++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 recipes/bash/03-autotools-relibc-stuff.patch diff --git a/recipes/bash/03-autotools-relibc-stuff.patch b/recipes/bash/03-autotools-relibc-stuff.patch new file mode 100644 index 000000000..c3dc542a9 --- /dev/null +++ b/recipes/bash/03-autotools-relibc-stuff.patch @@ -0,0 +1,73 @@ +--- a/aclocal.m4 2015-12-02 15:22:19.000000000 +0100 ++++ b/aclocal.m4 2018-08-03 17:26:40.798221239 +0200 +@@ -576,49 +576,7 @@ + fi + ]) + +-AC_DEFUN(BASH_FUNC_GETENV, +-[AC_MSG_CHECKING(to see if getenv can be redefined) +-AC_CACHE_VAL(bash_cv_getenv_redef, +-[AC_TRY_RUN([ +-#ifdef HAVE_UNISTD_H +-# include +-#endif +-#ifndef __STDC__ +-# ifndef const +-# define const +-# endif +-#endif +-char * +-getenv (name) +-#if defined (__linux__) || defined (__bsdi__) || defined (convex) +- const char *name; +-#else +- char const *name; +-#endif /* !__linux__ && !__bsdi__ && !convex */ +-{ +-return "42"; +-} +-main() +-{ +-char *s; +-/* The next allows this program to run, but does not allow bash to link +- when it redefines getenv. I'm not really interested in figuring out +- why not. */ +-#if defined (NeXT) +-exit(1); +-#endif +-s = getenv("ABCDE"); +-exit(s == 0); /* force optimizer to leave getenv in */ +-} +-], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no, +- [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes) +- bash_cv_getenv_redef=yes] +-)]) +-AC_MSG_RESULT($bash_cv_getenv_redef) +-if test $bash_cv_getenv_redef = yes; then +-AC_DEFINE(CAN_REDEFINE_GETENV) +-fi +-]) ++bash_cv_getenv_redef=no + + # We should check for putenv before calling this + AC_DEFUN(BASH_FUNC_STD_PUTENV, +@@ -1200,7 +1158,7 @@ + AC_TRY_LINK([#include ],[ + sigset_t ss; + struct sigaction sa; +- sigemptyset(&ss); sigsuspend(&ss); ++ sigemptyset(&ss); /* sigsuspend(&ss); */ + sigaction(SIGINT, &sa, (struct sigaction *) 0); + sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); + ], bash_cv_signal_vintage=posix, +--- a/configure.ac 2016-09-07 22:56:28.000000000 +0200 ++++ b/configure.ac 2018-08-03 09:10:42.818015670 +0200 +@@ -52,7 +52,7 @@ + AC_CANONICAL_BUILD + + dnl configure defaults +-opt_bash_malloc=yes ++opt_bash_malloc=no + opt_afs=no + opt_curses=no + opt_with_installed_readline=no From 47f919a4a1bb3faea3ed4db4f72dd2ad36e19995 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Wed, 3 Oct 2018 00:34:36 +0200 Subject: [PATCH 11/14] prboom: Remove unnecessary patches for relibc --- recipes/prboom/01_redox.patch | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/recipes/prboom/01_redox.patch b/recipes/prboom/01_redox.patch index 16cdd8284..35f29a679 100644 --- a/recipes/prboom/01_redox.patch +++ b/recipes/prboom/01_redox.patch @@ -10,27 +10,6 @@ diff -burpN source-original/configure.ac source/configure.ac AC_DECL_SYS_SIGLIST AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(unistd.h asm/byteorder.h sched.h) -diff -burpN source-original/src/d_deh.c source/src/d_deh.c ---- source-original/src/d_deh.c 2008-10-11 14:10:38.000000000 +0200 -+++ source/src/d_deh.c 2018-04-22 23:41:16.949896859 +0200 -@@ -54,17 +54,6 @@ - #define TRUE 1 - #define FALSE 0 - --#ifndef HAVE_STRLWR --#include -- --static char* strlwr(char* str) --{ -- char* p; -- for (p=str; *p; p++) *p = tolower(*p); -- return str; --} --#endif -- - // killough 10/98: new functions, to allow processing DEH files in-memory - // (e.g. from wads) - diff -burpN source-original/src/SDL/i_video.c source/src/SDL/i_video.c --- source-original/src/SDL/i_video.c 2008-10-18 15:32:29.000000000 +0200 +++ source/src/SDL/i_video.c 2018-04-23 00:51:18.944949507 +0200 From 6debeffe5bc7d155741d165f099b94b3d56275e4 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Wed, 3 Oct 2018 20:31:51 +0200 Subject: [PATCH 12/14] Add libiconv recipe --- recipes/libiconv/01_redox.patch | 30 +++++++++++++++++++++++++++++ recipes/libiconv/recipe.sh | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 recipes/libiconv/01_redox.patch create mode 100644 recipes/libiconv/recipe.sh diff --git a/recipes/libiconv/01_redox.patch b/recipes/libiconv/01_redox.patch new file mode 100644 index 000000000..350347866 --- /dev/null +++ b/recipes/libiconv/01_redox.patch @@ -0,0 +1,30 @@ +diff -rupNw source-original/srclib/getprogname.c source/srclib/getprogname.c +--- source-original/srclib/getprogname.c 2017-01-02 00:02:21.000000000 +0100 ++++ source/srclib/getprogname.c 2018-10-03 19:32:07.382785859 +0200 +@@ -144,7 +144,7 @@ getprogname (void) + } + return p; + # else +-# error "getprogname module not ported to this OS" ++ return "?"; + # endif + } + +diff -rupNw source-original/srclib/signal.in.h source/srclib/signal.in.h +--- source-original/srclib/signal.in.h 2017-01-02 00:02:22.000000000 +0100 ++++ source/srclib/signal.in.h 2018-10-03 19:46:53.323659264 +0200 +@@ -186,12 +186,12 @@ _GL_WARN_ON_USE (raise, "raise can crash + + /* Maximum signal number + 1. */ + # ifndef NSIG +-# define NSIG 32 ++# define NSIG 64 + # endif + + /* This code supports only 32 signals. */ + # if !GNULIB_defined_verify_NSIG_constraint +-typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; ++typedef int verify_NSIG_constraint[NSIG <= 64 ? 1 : -1]; + # define GNULIB_defined_verify_NSIG_constraint 1 + # endif + diff --git a/recipes/libiconv/recipe.sh b/recipes/libiconv/recipe.sh new file mode 100644 index 000000000..580e04446 --- /dev/null +++ b/recipes/libiconv/recipe.sh @@ -0,0 +1,34 @@ +VERSION=1.15 +TAR=https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$VERSION.tar.gz + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + ./configure --host=${HOST} --prefix='/' --disable-shared --enable-static + 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 + skip=1 +} From 7a36806ed3582e3c0f6ac77d9bb1868874ca1ecb Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Mon, 8 Oct 2018 20:47:48 +0200 Subject: [PATCH 13/14] netsurf: Use libiconv, fix the linking errors with relibc --- recipes/netsurf/recipe.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/netsurf/recipe.sh b/recipes/netsurf/recipe.sh index f7ede53d6..19b3faca4 100644 --- a/recipes/netsurf/recipe.sh +++ b/recipes/netsurf/recipe.sh @@ -1,6 +1,6 @@ VERSION=3.7 TAR=http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-$VERSION.tar.gz -BUILD_DEPENDS=(curl expat libjpeg libpng openssl sdl zlib freetype liborbital) +BUILD_DEPENDS=(curl expat libjpeg libpng openssl sdl zlib freetype liborbital libiconv) DEPENDS="ca-certificates orbital" function recipe_version { @@ -17,7 +17,7 @@ function recipe_build { sysroot="${PWD}/../sysroot" export TARGET="framebuffer" export CFLAGS="-I$sysroot/include -I${PWD}/inst-${TARGET}/include" - export LDFLAGS="-L$sysroot/lib -L${PWD}/inst-${TARGET}/lib" + export LDFLAGS="-L$sysroot/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition" make V=1 skip=1 From e0a859bfe926386227016df3865fa7cb479ae136 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sun, 14 Oct 2018 16:26:43 +0200 Subject: [PATCH 14/14] netsurf: Fix libiconv linking --- recipes/netsurf/01_redox.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/netsurf/01_redox.patch b/recipes/netsurf/01_redox.patch index 7d1a715b0..201a4a801 100644 --- a/recipes/netsurf/01_redox.patch +++ b/recipes/netsurf/01_redox.patch @@ -222,7 +222,7 @@ diff -rupNw source-original/netsurf/frontends/framebuffer/Makefile source/netsur diff -rupNw source-original/netsurf/Makefile.config source/netsurf/Makefile.config --- source-original/netsurf/Makefile.config 1970-01-01 01:00:00.000000000 +0100 +++ source/netsurf/Makefile.config 2018-03-04 20:43:18.244957528 +0100 -@@ -0,0 +1,27 @@ +@@ -0,0 +1,28 @@ +override NETSURF_HOMEPAGE := "https://www.redox-os.org/" +override NETSURF_FB_FRONTEND := sdl + @@ -232,6 +232,7 @@ diff -rupNw source-original/netsurf/Makefile.config source/netsurf/Makefile.conf +override NETSURF_USE_CURL := YES +override NETSURF_USE_PNG := YES + ++override NETSURF_USE_LIBICONV_PLUG := NO +override NETSURF_USE_NSSVG := NO +override NETSURF_USE_RSVG := NO +override NETSURF_USE_DUKTAPE := NO