Merged in jessicah/haikuports/bash-no-dotfiles (pull request #538)

bash: update to patch 39; put settings in ~/config/settings
This commit is contained in:
Jerome Duval
2015-06-10 11:40:19 +02:00

View File

@@ -7,7 +7,7 @@ incorporates useful features from the Korn and C shells (ksh and csh).
HOMEPAGE="http://www.gnu.org/software/bash/"
SRC_URI="https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz"
CHECKSUM_SHA256="afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4"
for i in {001..033}; do
for i in {001..039}; do
eval "SRC_URI_$i=\"https://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i#noarchive\""
done
CHECKSUM_SHA256_001="ecb3dff2648667513e31554b3ad054ccd89fce38e33367c9459ac3a285153742"
@@ -43,6 +43,13 @@ CHECKSUM_SHA256_030="85434f8a2f379d0c49a3ff6d9ffa12c8b157188dd739e556d638217d2a5
CHECKSUM_SHA256_031="cd529f59dd0f2fdd49d619fe34691da6f0affedf87cc37cd460a9f3fe812a61d"
CHECKSUM_SHA256_032="889357d29a6005b2c3308ca5b6286cb223b5e9c083219e5db3156282dd554f4a"
CHECKSUM_SHA256_033="fb2a7787a13fbe027a7335aca6eb3c21cdbd813e9edc221274b6a9d8692eaa16"
CHECKSUM_SHA256_034="f1694f04f110defe1330a851cc2768e7e57ddd2dfdb0e3e350ca0e3c214ff889"
CHECKSUM_SHA256_035="370d85e51780036f2386dc18c5efe996eba8e652fc1973f0f4f2ab55a993c1e3"
CHECKSUM_SHA256_036="ac5f82445b36efdb543dbfae64afed63f586d7574b833e9aa9cd5170bc5fd27c"
CHECKSUM_SHA256_037="33f170dd7400ab3418d749c55c6391b1d161ef2de7aced1873451b3a3fca5813"
CHECKSUM_SHA256_038="adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367"
CHECKSUM_SHA256_039="ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec"
PATCHES="bash-kill_by_name.patch"
SOURCE_DIR="bash-4.3"
REVISION="1"
@@ -74,6 +81,7 @@ BUILD_PREREQUIRES="
cmd:make
cmd:awk
cmd:patch
cmd:autoconf
"
PATCH()
@@ -81,6 +89,8 @@ PATCH()
for i in {001..033}; do
patch -p0 < ../../sources-$i/bash43-$i
done
# store bash settings under ~/config/settings
find -type f | xargs sed -i -e 's,~/\.,~/config/settings/,g'
}
BUILD()
@@ -92,9 +102,30 @@ BUILD()
INSTALL()
{
make install-strip
ln -s bash $binDir/sh
ln -s bash $binDir/sh
# migrate bash files to ~/config/settings
mkdir -p $prefix/boot/post-install
cat <<'EOF' > $prefix/boot/post-install/move-bash-files.sh
#!/bin/sh
for f in ~/.bash* ; do
name=`basename $f | sed -e 's/^\.//'`
if [ ! -e ~/config/settings/$name ]; then
echo "Moving $f to ~/config/settings/$name..."
mv $f ~/config/settings/$name
else
echo "Removing $f, as already exists at ~/config/settings/$name..."
rm $f
fi
done
EOF
chmod a+x $prefix/boot/post-install/move-bash-files.sh
}
POST_INSTALL_SCRIPTS="
boot/post-install/move-bash-files.sh
"
TEST()
{
make check