This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merging build-bash and build-mksh into build-shell and adding heirloo…
…m sh
- Loading branch information
Showing
7 changed files
with
169 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
#!/bin/bash | ||
shopt -s extglob | ||
|
||
shell=$1 version=$2 bin_name=${3:-$shell$version} | ||
|
||
mkdir -p build/{bin,man/man1} || exit | ||
|
||
case $shell in | ||
mksh) | ||
cd build && | ||
wget -c -O "mksh-$version.tgz" "https://www.mirbsd.org/MirOS/dist/mir/mksh/snapshot/mksh-$version.tgz" && | ||
|
||
gzip -cd "mksh-$version.tgz" | pax -r && | ||
cd mksh && | ||
sh Build.sh && | ||
cp mksh "../bin/$bin_name" && | ||
cp mksh.1 "../man/man1/$bin_name.1" | ||
;; | ||
bourne) | ||
cd build && | ||
wget -c -O heirloom-sh.tar.bz2 "http://sourceforge.net/projects/heirloom/files/heirloom-sh/$version/heirloom-sh-$version.tar.bz2/download" && | ||
bzip2 -cd heirloom-sh.tar.bz2 | pax -rs '|^[^/]*|heirloom-sh|' && | ||
cd heirloom-sh && | ||
make && | ||
cp sh ../bin/$bin_name && | ||
cp sh.1 ../man/man1/$bin_name.1 | ||
;; | ||
bash) : ;; #handled below | ||
*) exit 1;; | ||
esac | ||
|
||
# bash | ||
case $version in | ||
devel) | ||
mkdir -p build/loadables && | ||
cd bash && | ||
./configure && | ||
make && | ||
cp bash "../build/bin/$bin_name" && | ||
cp doc/bash.1 "../build/man/man1/$bin_name.1" && | ||
# loadable builtins | ||
cd examples/loadables && | ||
make && | ||
for file in !(*.*); do | ||
[[ -f $file && -x $file ]] || continue | ||
cp "${file}" ../../../build/loadables | ||
done | ||
;; | ||
1.14.7) | ||
cd build && | ||
wget -c -O "bash-$version.tar.gz" "http://ftp.gnu.org/gnu/bash/bash-$version.tar.gz" && | ||
gzip -cd "bash-$version.tar.gz" | pax -r && | ||
cd "bash-$version" && | ||
patch -p0 << 'EOF' && | ||
diff -ur bash-1.14.7.orig/machines.h bash-1.14.7/machines.h | ||
--- ../bash-1.14.7.orig/machines.h 1995-12-18 20:13:22.000000000 +0100 | ||
+++ ../bash-1.14.7/machines.h 2012-09-16 20:04:56.545130869 +0200 | ||
@@ -76,6 +76,32 @@ | ||
#define MACHINE_CFLAGS | ||
/* **************************************************************** */ | ||
+/* */ | ||
+/* x86 64-bit machines */ | ||
+/* */ | ||
+/* **************************************************************** */ | ||
+ | ||
+#if defined (__x86_64__) && defined (__linux__) | ||
+# define M_MACHINE "x86_64" | ||
+# define M_OS "Linux" | ||
+# define SYSDEP_CFLAGS -DHAVE_GETDTABLESIZE -DHAVE_BCOPY \ | ||
+ -DHAVE_GETPW_DECLS -DHAVE_GETHOSTNAME | ||
+# define REQUIRED_LIBRARIES | ||
+# define HAVE_GETGROUPS | ||
+# define HAVE_STRERROR | ||
+# define VOID_SIGHANDLER | ||
+# define HAVE_SYS_SIGLIST | ||
+# define SEARCH_LIB_NEEDS_SPACE | ||
+# if defined (__GNUC__) | ||
+# define HAVE_FIXED_INCLUDES | ||
+# endif /* __GNUC__ */ | ||
+# undef USE_GNU_MALLOC | ||
+# undef HAVE_SETLINEBUF | ||
+# undef HAVE_GETWD | ||
+#endif /* __x86_64__ && __linux__ */ | ||
+ | ||
+ | ||
+/* **************************************************************** */ | ||
/* */ | ||
/* Sun Microsystems Machines */ | ||
/* */ | ||
@@ -889,8 +915,6 @@ | ||
# define HAVE_STRERROR | ||
# define VOID_SIGHANDLER | ||
# define HAVE_SYS_SIGLIST | ||
-# define HAVE_VFPRINTF | ||
-# define HAVE_VARARGS_H | ||
# define SEARCH_LIB_NEEDS_SPACE | ||
# if defined (__GNUC__) | ||
# define HAVE_FIXED_INCLUDES | ||
diff -ur bash-1.14.7.orig/support/getcppsyms.c bash-1.14.7/support/getcppsyms.c | ||
--- ../bash-1.14.7.orig/support/getcppsyms.c 1995-05-31 17:02:14.000000000 +0200 | ||
+++ ../bash-1.14.7/support/getcppsyms.c 2012-09-16 19:57:00.501120007 +0200 | ||
@@ -422,6 +422,12 @@ | ||
#if defined (vax) | ||
printf (" -Dvax"); | ||
#endif /* vax */ | ||
+#if defined (__x86_64) | ||
+ printf (" -D__x86_64"); | ||
+#endif /* __x86_64 */ | ||
+#if defined (__x86_64__) | ||
+ printf (" -D__x86_64__"); | ||
+#endif /* __x86_64__ */ | ||
printf ("\n"); | ||
exit (0); | ||
EOF | ||
make && | ||
cp bash "../bin/$bin_name" && | ||
cp documentation/bash.1 "../man/man1/$bin_name.1" | ||
;; | ||
2.05b) | ||
cd build && | ||
wget -c -O "bash-$version.tar.gz" "http://ftp.gnu.org/gnu/bash/bash-$version.tar.gz" && | ||
gzip -cd "bash-$version.tar.gz" | pax -r && | ||
cd "bash-$version" && | ||
wget -r --level=1 -A 'bash*-[0-9][0-9][0-9]' -nH --cut-dirs=2 "http://ftp.gnu.org/gnu/bash/bash-$version-patches/" && | ||
cat "../bash-$version-patches"/bash*-[0-9][0-9][0-9] | patch -p0 || exit | ||
./configure --without-bash-malloc && # bash2's malloc doesn't build | ||
make && | ||
cp bash "../bin/$bin_name" && | ||
cp doc/bash.1 "../man/man1/$bin_name.1" | ||
;; | ||
3.[0-2]|4.[0-2]) | ||
cd build && | ||
wget -c -O "bash-$version.tar.gz" "http://ftp.gnu.org/gnu/bash/bash-$version.tar.gz" && | ||
gzip -cd "bash-$version.tar.gz" | pax -r && | ||
cd "bash-$version" && | ||
wget -r --level=1 -A 'bash*-[0-9][0-9][0-9]' -nH --cut-dirs=2 "http://ftp.gnu.org/gnu/bash/bash-$version-patches/" && | ||
cat "../bash-$version-patches"/bash*-[0-9][0-9][0-9] | patch -p0 || exit | ||
./configure && | ||
make && | ||
cp bash "../bin/$bin_name" && | ||
cp doc/bash.1 "../man/man1/$bin_name.1" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.