added ncurses toolchain step

This commit is contained in:
ag-tsotetsi
2026-02-08 11:28:45 +02:00
parent b314b0acfc
commit 0fdf14d5f0
2 changed files with 73 additions and 0 deletions

66
build/ncurses/build.bash Normal file
View File

@@ -0,0 +1,66 @@
. "$PROJECTDIR/build/ncurses/package.env"
fetch $NCURSES_URL
cd "$SOURCES" && tar xf ncurses-$NCURSES_VERSION.tar.gz && cd ncurses-$NCURSES_VERSION
bootstrap() {
echo bootstrap
}
toolchain() {
mkdir -p build
pushd build
../configure --prefix="$SYSROOT/cross" AWK=gawk > /dev/null
make -C include > /dev/null
make -C progs tic > /dev/null
install progs/tic "$SYSROOT/cross/bin"
popd
./configure \
--prefix=/usr \
--host=$TARGET \
--build=$(./config.guess) \
--mandir=/usr/share/man \
--with-manpage-format=normal \
--with-shared \
--without-normal \
--with-cxx-shared \
--without-debug \
--without-ada \
--disable-stripping \
AWK=gawk > /dev/null
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
ln -s libncursesw.so "$SYSROOT/usr/lib/libncurses.so"
sed -e 's/^#if.*XOPEN.*$/#if 1/' -i "$SYSROOT/usr/include/curses.h"
}
setup() {
echo setup
}
final() {
echo final
}
case $1 in
bootstrap)
bootstrap
;;
toolchain)
toolchain
;;
setup)
setup
;;
final)
final
;;
esac
cd "$SOURCES" && rm -rf "$SOURCES/ncurses-$NCURSES_VERSION"

View File

@@ -0,0 +1,7 @@
export NCURSES_VERSION=6.6
IFS='.' read -r NCURSES_VERSION_MAJOR NCURSES_VERSION_MINOR NCURSES_VERSION_PATCH <<< $NCURSES_VERSION
export NCURSES_VERSION_MAJOR NCURSES_VERSION_MINOR NCURSES_VERSION_PATCH
export NCURSES_URL=https://mirror.ufs.ac.za/gnu/ncurses/ncurses-$NCURSES_VERSION.tar.gz