From fc4249236b803fcb0903b8539792c17a58fd7448 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 Jan 2023 10:56:56 +0530 Subject: [PATCH] Add 6.2 - Build ncurses --- scripts/chapter6/6.3-ncurses.sh | 45 +++++++++++++++++++++++++++++++++ scripts/main.sh | 14 +++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 scripts/chapter6/6.3-ncurses.sh diff --git a/scripts/chapter6/6.3-ncurses.sh b/scripts/chapter6/6.3-ncurses.sh new file mode 100644 index 0000000..b67432a --- /dev/null +++ b/scripts/chapter6/6.3-ncurses.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +cd $LFS/sources +tar xf ncurses-6.3.tar.gz +cd ncurses-6.3 + +sed -i s/mawk// configure + +mkdir build +pushd build + ../configure + make -C include + make -C progs tic +popd + +./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./config.guess) \ + --mandir=/usr/share/man \ + --with-manpage-format=normal \ + --with-shared \ + --without-normal \ + --with-cxx-shared \ + --without-debug \ + --without-ada \ + --disable-stripping \ + --enable-widec + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install +echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so + +cd $LFS/sources +rm -rf ncurses-6.3 diff --git a/scripts/main.sh b/scripts/main.sh index b05fca3..acfbc31 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -200,6 +200,18 @@ su - lfs -c "bash $PWD/chapter6/6.2-m4.sh" check_exit_code if [ $exit_status -ne 0 ] then - stop_script "chapter6/6/2-m4.sh" + stop_script "chapter6/6.2-m4.sh" +fi + +# Chapter 6.3 +# =========== +echo "Building ncurses" +su - lfs -c "bash $PWD/chapter6/6.3-ncurses.sh" + +# Exit onn error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.3-ncurses.sh" fi