bash: add recipe for version 5.0.011.

This commit is contained in:
Jerome Duval
2019-09-10 20:42:51 +02:00
parent 1dbd1fed8b
commit d119cd7352
2 changed files with 125 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
SUMMARY="The GNU Bourne Again Shell"
DESCRIPTION="Bash is an sh-compatible command language interpreter that \
executes commands read from the standard input or from a file. Bash also \
incorporates useful features from the Korn and C shells (ksh and csh)."
HOMEPAGE="https://www.gnu.org/software/bash/"
COPYRIGHT="1987-2018 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ftpmirror.gnu.org/bash/bash-5.0.tar.gz"
CHECKSUM_SHA256="b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d"
for i in {001..11}; do
eval "SOURCE_URI_$i=\"https://ftpmirror.gnu.org/bash/bash-5.0-patches/bash50-$i#noarchive\""
done
CHECKSUM_SHA256_001="f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289"
CHECKSUM_SHA256_002="87e87d3542e598799adb3e7e01c8165bc743e136a400ed0de015845f7ff68707"
CHECKSUM_SHA256_003="4eebcdc37b13793a232c5f2f498a5fcbf7da0ecb3da2059391c096db620ec85b"
CHECKSUM_SHA256_004="14447ad832add8ecfafdce5384badd933697b559c4688d6b9e3d36ff36c62f08"
CHECKSUM_SHA256_005="5bf54dd9bd2c211d2bfb34a49e2c741f2ed5e338767e9ce9f4d41254bf9f8276"
CHECKSUM_SHA256_006="d68529a6ff201b6ff5915318ab12fc16b8a0ebb77fda3308303fcc1e13398420"
CHECKSUM_SHA256_007="17b41e7ee3673d8887dd25992417a398677533ab8827938aa41fad70df19af9b"
CHECKSUM_SHA256_008="eec64588622a82a5029b2776e218a75a3640bef4953f09d6ee1f4199670ad7e3"
CHECKSUM_SHA256_009="ed3ca21767303fc3de93934aa524c2e920787c506b601cc40a4897d4b094d903"
CHECKSUM_SHA256_010="d6fbc325f0b5dc54ddbe8ee43020bced8bd589ddffea59d128db14b2e52a8a11"
CHECKSUM_SHA256_011="2c4de332b91eaf797abbbd6c79709690b5cbd48b12e8dfe748096dbd7bf474ea"
SOURCE_DIR="bash-5.0"
PATCHES="
bash-kill_by_name.patch
bash-5.0.patchset
"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
bash = $portVersion
cmd:bash = $portVersion
cmd:bashbug = $portVersion
cmd:sh
"
REQUIRES="
haiku
lib:libhistory
lib:libreadline >= 7
lib:libncursesw
lib:libintl
lib:libiconv
"
BUILD_REQUIRES="
haiku_devel
devel:libhistory
devel:libreadline >= 7
devel:libncursesw
devel:libintl
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:bison
cmd:cmp
cmd:gcc
cmd:make
cmd:patch
cmd:sed
"
GLOBAL_WRITABLE_FILES="settings/bashrc keep-old"
PATCH()
{
for i in {001..011}; do
echo "Applying patch $i..."
eval f=\$sourceDir$i/bash50-$i
sed -e "s|\.\./bash-5.0/||" "$f" | patch -p0
done
# store bash settings under ~/config/settings
find -type f | xargs sed -i -e 's,~/\.,~/config/settings/,g'
}
BUILD()
{
CPPFLAGS="-DUSE_MKTEMP=1 -DUSE_MKSTEMP=1" runConfigure ./configure \
--without-bash-malloc --with-installed-readline
make $jobArgs
}
INSTALL()
{
make install-strip
ln -s bash $binDir/sh
# Use bash-completion, if available
cat <<'EOF' > $settingsDir/bashrc
#!/bin/bash
[[ $PS1 && -f /system/data/bash-completion/bash_completion ]] && \
. /system/data/bash-completion/bash_completion
EOF
}
TEST()
{
make check
}

View File

@@ -0,0 +1,21 @@
From aec63b7ae85f2dcbaa088c52148d1f64ecd4d15e Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Fri, 27 Jan 2017 16:27:11 +0000
Subject: Use /bin/printf (instead of /usr/bin/printf)
diff --git a/tests/intl2.sub b/tests/intl2.sub
index 64961bc..36f7182 100644
--- a/tests/intl2.sub
+++ b/tests/intl2.sub
@@ -3,7 +3,7 @@ export LANG=de_DE.UTF-8
printf '%.4f\n' 1
LANG=C printf '%.4f\n' 1
-LANG=C /usr/bin/printf '%.4f\n' 1
+LANG=C /bin/printf '%.4f\n' 1
env LANG=C printf '%.4f\n' 1
(LANG=C; printf '%.4f\n' 1)
--
2.11.0