mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 20:04:19 +08:00
Fix bash recipe
This commit is contained in:
parent
2c3e7f0f07
commit
1cebcf5f48
@ -1,108 +0,0 @@
|
||||
diff -ru source/general.c source-new/general.c
|
||||
--- source/general.c 2016-08-11 08:16:56.000000000 -0700
|
||||
+++ source-new/general.c 2017-08-07 19:55:47.437464359 -0700
|
||||
@@ -476,6 +476,7 @@
|
||||
void
|
||||
check_dev_tty ()
|
||||
{
|
||||
+#if 0
|
||||
int tty_fd;
|
||||
char *tty;
|
||||
|
||||
@@ -490,6 +491,7 @@
|
||||
}
|
||||
if (tty_fd >= 0)
|
||||
close (tty_fd);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Return 1 if PATH1 and PATH2 are the same file. This is kind of
|
||||
diff -ru source/include/posixwait.h source-new/include/posixwait.h
|
||||
--- source/include/posixwait.h 2008-08-12 07:03:03.000000000 -0700
|
||||
+++ source-new/include/posixwait.h 2017-08-07 18:37:29.854754332 -0700
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/* How to get the status of a job. For Posix, this is just an
|
||||
int, but for other systems we have to crack the union wait. */
|
||||
-#if !defined (_POSIX_VERSION)
|
||||
+#if 0
|
||||
typedef union wait WAIT;
|
||||
# define WSTATUS(t) (t.w_status)
|
||||
#else /* _POSIX_VERSION */
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/* More Posix P1003.1 definitions. In the POSIX versions, the parameter is
|
||||
passed as an `int', in the non-POSIX version, as `union wait'. */
|
||||
-#if defined (_POSIX_VERSION)
|
||||
+#if 1
|
||||
|
||||
# if !defined (WSTOPSIG)
|
||||
# define WSTOPSIG(s) ((s) >> 8)
|
||||
diff -ru source/lib/sh/getcwd.c source-new/lib/sh/getcwd.c
|
||||
--- source/lib/sh/getcwd.c 2012-03-10 07:48:50.000000000 -0800
|
||||
+++ source-new/lib/sh/getcwd.c 2017-08-07 19:53:52.379759811 -0700
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#if !defined (HAVE_GETCWD)
|
||||
+#if 0
|
||||
|
||||
#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
|
||||
#pragma alloca
|
||||
diff -ru source/lib/sh/oslib.c source-new/lib/sh/oslib.c
|
||||
--- source/lib/sh/oslib.c 2013-10-14 06:12:57.000000000 -0700
|
||||
+++ source-new/lib/sh/oslib.c 2017-08-07 19:10:21.375838312 -0700
|
||||
@@ -236,10 +236,10 @@
|
||||
#if !defined (HAVE_MKFIFO) && defined (PROCESS_SUBSTITUTION)
|
||||
int
|
||||
mkfifo (path, mode)
|
||||
- char *path;
|
||||
- int mode;
|
||||
+ const char *path;
|
||||
+ mode_t mode;
|
||||
{
|
||||
-#if defined (S_IFIFO)
|
||||
+#if 0
|
||||
return (mknod (path, (mode | S_IFIFO), 0));
|
||||
#else /* !S_IFIFO */
|
||||
return (-1);
|
||||
diff -ru source/lib/sh/winsize.c source-new/lib/sh/winsize.c
|
||||
--- source/lib/sh/winsize.c 2016-01-25 10:24:45.000000000 -0800
|
||||
+++ source-new/lib/sh/winsize.c 2017-08-07 19:14:41.571576687 -0700
|
||||
@@ -28,7 +28,6 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
-#include <sys/ioctl.h>
|
||||
|
||||
/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
|
||||
|
||||
diff -ru source/sig.c source-new/sig.c
|
||||
--- source/sig.c 2016-02-11 12:02:45.000000000 -0800
|
||||
+++ source-new/sig.c 2017-08-07 19:56:13.637701224 -0700
|
||||
@@ -684,7 +684,9 @@
|
||||
|
||||
/* Perform OPERATION on NEWSET, perhaps leaving information in OLDSET. */
|
||||
sigprocmask (operation, newset, oldset)
|
||||
- int operation, *newset, *oldset;
|
||||
+ int operation;
|
||||
+ const sigset_t *newset;
|
||||
+ sigset_t *oldset;
|
||||
{
|
||||
int old, new;
|
||||
|
||||
@@ -696,11 +698,11 @@
|
||||
switch (operation)
|
||||
{
|
||||
case SIG_BLOCK:
|
||||
- old = sigblock (new);
|
||||
+ //old = sigblock (new);
|
||||
break;
|
||||
|
||||
case SIG_SETMASK:
|
||||
- old = sigsetmask (new);
|
||||
+ //old = sigsetmask (new);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1,35 +0,0 @@
|
||||
diff -ru source/general.c source-new/general.c
|
||||
--- source/general.c 2016-08-11 08:16:56.000000000 -0700
|
||||
+++ source-new/general.c 2017-08-07 20:22:31.581566466 -0700
|
||||
@@ -909,10 +909,10 @@
|
||||
`:'. If I is 0, then the path has a leading colon. Trailing colons
|
||||
are handled OK by the `else' part of the if statement; an empty
|
||||
string is returned in that case. */
|
||||
- if (i && string[i] == ':')
|
||||
+ if (i && string[i] == ';')
|
||||
i++;
|
||||
|
||||
- for (start = i; string[i] && string[i] != ':'; i++)
|
||||
+ for (start = i; string[i] && string[i] != ';'; i++)
|
||||
;
|
||||
|
||||
*p_index = i;
|
||||
--- source/config-top.h 2016-05-19 20:34:02.000000000 +0200
|
||||
+++ build/config-top.h 2018-08-07 15:00:14.440837632 +0200
|
||||
@@ -63,14 +63,14 @@
|
||||
/* The default value of the PATH variable. */
|
||||
#ifndef DEFAULT_PATH_VALUE
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
- "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:."
|
||||
+ "/usr/local/bin;/usr/local/sbin;/usr/bin;/usr/sbin;/bin;/sbin;."
|
||||
#endif
|
||||
|
||||
/* The value for PATH when invoking `command -p'. This is only used when
|
||||
the Posix.2 confstr () function, or CS_PATH define are not present. */
|
||||
#ifndef STANDARD_UTILS_PATH
|
||||
#define STANDARD_UTILS_PATH \
|
||||
- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
|
||||
+ "/bin;/usr/bin;/sbin;/usr/sbin;/etc;/usr/etc"
|
||||
#endif
|
||||
|
||||
/* Default primary and secondary prompt strings. */
|
||||
@ -1,73 +0,0 @@
|
||||
--- 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 <unistd.h>
|
||||
-#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 <signal.h>],[
|
||||
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
|
||||
@ -1,21 +0,0 @@
|
||||
--- source/execute_cmd.c 2016-08-26 05:10:08.000000000 -0600
|
||||
+++ source-new/execute_cmd.c 2018-11-17 07:32:59.626764573 -0700
|
||||
@@ -1335,15 +1335,17 @@
|
||||
nullcmd = (command == 0) || (command->type == cm_simple && command->value.Simple->words == 0 && command->value.Simple->redirects == 0);
|
||||
if (posixly_correct && nullcmd)
|
||||
{
|
||||
-#if defined (HAVE_GETRUSAGE)
|
||||
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
|
||||
selfb.ru_utime.tv_sec = kidsb.ru_utime.tv_sec = selfb.ru_stime.tv_sec = kidsb.ru_stime.tv_sec = 0;
|
||||
selfb.ru_utime.tv_usec = kidsb.ru_utime.tv_usec = selfb.ru_stime.tv_usec = kidsb.ru_stime.tv_usec = 0;
|
||||
before.tv_sec = shell_start_time;
|
||||
before.tv_usec = 0;
|
||||
#else
|
||||
+# if defined (HAVE_TIMES)
|
||||
before.tms_utime = before.tms_stime = before.tms_cutime = before.tms_cstime = 0;
|
||||
tbefore = shell_start_time;
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
old_flags = command->flags;
|
||||
@ -1,5 +1,6 @@
|
||||
VERSION=4.4
|
||||
TAR=http://ftp.gnu.org/gnu/bash/bash-$VERSION.tar.gz
|
||||
BUILD_DEPENDS=(gettext)
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
@ -12,9 +13,17 @@ function recipe_update {
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$PWD/../sysroot"
|
||||
export LDFLAGS="-L$sysroot/lib"
|
||||
export CPPFLAGS="-I$sysroot/include"
|
||||
wget -O support/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
||||
./configure --build=${BUILD} --host=${HOST} --prefix=/ --disable-readline
|
||||
make -j"$(nproc)"
|
||||
./configure \
|
||||
--build=${BUILD} \
|
||||
--host=${HOST} \
|
||||
--prefix=/ \
|
||||
--disable-readline \
|
||||
bash_cv_getenv_redef=no
|
||||
make # -j"$(nproc)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
|
||||
1461
recipes/bash/redox.patch
Normal file
1461
recipes/bash/redox.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user