From 145df46088b978421691de5d4c502a7cb8eefcfe Mon Sep 17 00:00:00 2001 From: Matheus Date: Sat, 13 May 2023 22:12:47 -0300 Subject: [PATCH] bash port --- patches/bash/jinx-working-patch.patch | 48 +++++++++++++++++++++++++++ recipes/bash | 23 +++++++++++++ source-recipes/bash | 9 +++++ 3 files changed, 80 insertions(+) create mode 100644 patches/bash/jinx-working-patch.patch create mode 100644 recipes/bash create mode 100644 source-recipes/bash diff --git a/patches/bash/jinx-working-patch.patch b/patches/bash/jinx-working-patch.patch new file mode 100644 index 00000000..c8d2542d --- /dev/null +++ b/patches/bash/jinx-working-patch.patch @@ -0,0 +1,48 @@ +diff -ru bash-5.1/externs.h bash-5.1-patched/externs.h +--- bash-5.1/externs.h 2020-05-27 11:36:41.000000000 -0300 ++++ bash-5.1-patched/externs.h 2022-08-20 18:54:03.346557110 -0300 +@@ -290,7 +290,7 @@ + #endif /* !HAVE_GETDTABLESIZE */ + + #if !defined (HAVE_GETHOSTNAME) +-extern int gethostname PARAMS((char *, int)); ++extern int gethostname PARAMS((char *, size_t)); + #endif /* !HAVE_GETHOSTNAME */ + + extern int getmaxgroups PARAMS((void)); +diff -ru bash-5.1/subst.c bash-5.1-patched/subst.c +--- bash-5.1/subst.c 2020-11-16 12:33:15.000000000 -0300 ++++ bash-5.1-patched/subst.c 2022-08-20 19:06:46.039884500 -0300 +@@ -32,6 +32,7 @@ + #endif + #include + #include ++#include + + #if defined (HAVE_UNISTD_H) + # include +diff -ru bash-5.1/support/config.sub bash-5.1-patched/support/config.sub +--- bash-5.1/support/config.sub 2020-11-18 16:40:12.000000000 -0300 ++++ bash-5.1-patched/support/config.sub 2022-08-20 18:20:06.006572931 -0300 +@@ -1720,7 +1720,7 @@ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ +- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) ++ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | astral*) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) +diff -ru bash-5.1/support/shobj-conf bash-5.1-patched/support/shobj-conf +--- bash-5.1/support/shobj-conf 2019-12-13 11:51:17.000000000 -0300 ++++ bash-5.1-patched/support/shobj-conf 2022-09-14 21:09:42.592996760 -0300 +@@ -79,6 +79,9 @@ + SHOBJ_LDFLAGS='-shared -bglobalized -unres_symbols ignore' + ;; + ++astral*-*gcc*) ++ SHOBJ_CFLAGS=-fpic ++ ;; + sunos4*-*gcc*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD=/usr/bin/ld diff --git a/recipes/bash b/recipes/bash new file mode 100644 index 00000000..72a0a12c --- /dev/null +++ b/recipes/bash @@ -0,0 +1,23 @@ +name=bash +revision=1 +from_source=bash +imagedeps="base-devel" +hostdeps="xgcc xbinutils" +deps="mlibc" + +configure() { + ${source_dir}/configure --host=x86_64-astral --prefix=${prefix} --without-bash-malloc --disable-readline +} + +build() { + make -j ${parallelism} +} + +install() { + make install DESTDIR=${dest_dir} + + mkdir -p ${dest_dir}/bin + pushd ${dest_dir}/bin + ln -sv ${prefix}/bin/bash sh + popd +} diff --git a/source-recipes/bash b/source-recipes/bash new file mode 100644 index 00000000..d95a7ca9 --- /dev/null +++ b/source-recipes/bash @@ -0,0 +1,9 @@ +name=bash +version=5.1 +source_method=tarball +tarball_url="https://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz" +tarball_sha512=c44a0ce381469219548a3a27589af3fea4f22eda1ca4e9434b59fc16da81b471c29ce18e31590e0860a6a251a664b68c2b45e3a17d22cfc02799ffd9a208390c + +regenerate() { + true +}