Add WIP bash port

This commit is contained in:
Robin Burchell 2019-05-28 01:40:12 +02:00 committed by Andreas Kling
parent 19afcfe03c
commit b12a096437
Notes: sideshowbarker 2024-07-19 13:52:53 +09:00
4 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,18 @@
diff -Nru pristine/bash-5.0/locale.c bash-5.0/locale.c
+++ bash-5.0/locale.c 2019-05-21 02:18:05.843104487 +0200
@@ -76,6 +76,7 @@
void
set_default_locale ()
{
+ return;
#if defined (HAVE_SETLOCALE)
default_locale = setlocale (LC_ALL, "");
if (default_locale)
@@ -95,6 +96,7 @@
void
set_default_locale_vars ()
{
+ return;
char *val;
#if defined (HAVE_SETLOCALE)

View file

@ -0,0 +1,13 @@
diff --git a/include/stdc.h b/include/stdc.h
index c66492f0..5991f4bd 100644
--- a/include/stdc.h
+++ b/include/stdc.h
@@ -22,6 +22,8 @@
#if !defined (_STDC_H_)
#define _STDC_H_
+#include <stdio.h>
+
/* Adapted from BSD /usr/include/sys/cdefs.h. */
/* A function can be defined using prototypes and compile on both ANSI C

View file

@ -0,0 +1,13 @@
diff --git a/support/config.sub b/support/config.sub
index f208558e..fb8fa19e 100755
--- a/support/config.sub
+++ b/support/config.sub
@@ -1360,7 +1360,7 @@ case $os in
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd*)
+ | midnightbsd* | serenity*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)

30
Ports/bash.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/sh
MAKEOPTS=" " # bash will die weirdly if you try build with multiple jobs.
INSTALLOPTS=" "
PORT_DIR=bash
function fetch() {
run_fetch_git "https://git.savannah.gnu.org/git/bash.git"
# Add serenity as a system for configure
run_patch .bash-serenity-system.patch -p1
# For some reason, the build fails due to FILE* being undefined without this.
# This is probably a LibC bug, but work around it for now.
run_patch .bash-serenity-include-stdio.patch -p1
# Locale calls crash right now. LibC bug, probably.
run_patch .bash-serenity-disable-locale.patch -p1
}
function configure() {
run_configure_autotools --disable-nls --without-bash-malloc
}
function build() {
# Avoid some broken cross compile tests...
run_command perl -p -i -e "s/GETCWD_BROKEN 1/GETCWD_BROKEN 0/" config.h
run_command perl -p -i -e "s/CAN_REDEFINE_GETENV 1/CAN_REDEFINE_GETENV 0/" config.h
run_make
}
function install() {
run_make_install
}
source ./.port_include.sh