added bash toolchain step & formatted
This commit is contained in:
49
build/bash/build.bash
Normal file
49
build/bash/build.bash
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
. "$PROJECTDIR/build/bash/package.env"
|
||||||
|
|
||||||
|
fetch $BASH_URL
|
||||||
|
|
||||||
|
cd "$SOURCES" && tar xf bash-$BASH_VERSION.tar.gz && cd bash-$BASH_VERSION
|
||||||
|
|
||||||
|
|
||||||
|
bootstrap() {
|
||||||
|
echo bootstrap
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
toolchain() {
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--build=$(sh support/config.guess) \
|
||||||
|
--host=$TARGET \
|
||||||
|
--without-bash-malloc > /dev/null
|
||||||
|
|
||||||
|
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
|
||||||
|
ln -sv bash "$SYSROOT/bin/sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
echo setup
|
||||||
|
}
|
||||||
|
|
||||||
|
final() {
|
||||||
|
echo final
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
bootstrap)
|
||||||
|
bootstrap
|
||||||
|
;;
|
||||||
|
toolchain)
|
||||||
|
toolchain
|
||||||
|
;;
|
||||||
|
setup)
|
||||||
|
setup
|
||||||
|
;;
|
||||||
|
final)
|
||||||
|
final
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
cd "$SOURCES" && rm -rf "$SOURCES/bash-$BASH_VERSION"
|
||||||
7
build/bash/package.env
Normal file
7
build/bash/package.env
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export BASH_VERSION=5.3
|
||||||
|
|
||||||
|
IFS='.' read -r BASH_VERSION_MAJOR BASH_VERSION_MINOR <<< $BASH_VERSION
|
||||||
|
export BASH_VERSION_MAJOR BASH_VERSION_MINOR
|
||||||
|
|
||||||
|
export BASH_URL=https://mirror.ufs.ac.za/gnu/bash/bash-$BASH_VERSION.tar.gz
|
||||||
|
|
||||||
@@ -7,36 +7,36 @@ cd "$SOURCES" && tar xf ncurses-$NCURSES_VERSION.tar.gz && cd ncurses-$NCURSES_V
|
|||||||
|
|
||||||
|
|
||||||
bootstrap() {
|
bootstrap() {
|
||||||
echo bootstrap
|
echo bootstrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
toolchain() {
|
toolchain() {
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
pushd build
|
pushd build
|
||||||
../configure --prefix="$SYSROOT/cross" AWK=gawk > /dev/null
|
../configure --prefix="$SYSROOT/cross" AWK=gawk > /dev/null
|
||||||
make -C include > /dev/null
|
make -C include > /dev/null
|
||||||
make -C progs tic > /dev/null
|
make -C progs tic > /dev/null
|
||||||
install progs/tic "$SYSROOT/cross/bin"
|
install progs/tic "$SYSROOT/cross/bin"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--host=$TARGET \
|
--host=$TARGET \
|
||||||
--build=$(./config.guess) \
|
--build=$(./config.guess) \
|
||||||
--mandir=/usr/share/man \
|
--mandir=/usr/share/man \
|
||||||
--with-manpage-format=normal \
|
--with-manpage-format=normal \
|
||||||
--with-shared \
|
--with-shared \
|
||||||
--without-normal \
|
--without-normal \
|
||||||
--with-cxx-shared \
|
--with-cxx-shared \
|
||||||
--without-debug \
|
--without-debug \
|
||||||
--without-ada \
|
--without-ada \
|
||||||
--disable-stripping \
|
--disable-stripping \
|
||||||
AWK=gawk > /dev/null
|
AWK=gawk > /dev/null
|
||||||
|
|
||||||
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
|
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
|
||||||
ln -s libncursesw.so "$SYSROOT/usr/lib/libncurses.so"
|
ln -s libncursesw.so "$SYSROOT/usr/lib/libncurses.so"
|
||||||
sed -e 's/^#if.*XOPEN.*$/#if 1/' -i "$SYSROOT/usr/include/curses.h"
|
sed -e 's/^#if.*XOPEN.*$/#if 1/' -i "$SYSROOT/usr/include/curses.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
@@ -48,13 +48,13 @@ final() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
bootstrap)
|
bootstrap)
|
||||||
bootstrap
|
bootstrap
|
||||||
;;
|
;;
|
||||||
toolchain)
|
toolchain)
|
||||||
toolchain
|
toolchain
|
||||||
;;
|
;;
|
||||||
setup)
|
setup)
|
||||||
setup
|
setup
|
||||||
;;
|
;;
|
||||||
final)
|
final)
|
||||||
|
|||||||
Reference in New Issue
Block a user