Add 8.28 - Build ncurses

This commit is contained in:
Aditya 2023-01-11 15:21:48 +05:30
parent 16b4d89bd1
commit 247b542db0
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,49 @@
#!/bin/bash
cd /sources
tar xf ncurses-6.3.tar.gz
cd ncurses-6.3
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-shared \
--without-debug \
--without-normal \
--with-cxx-shared \
--enable-pc-files \
--enable-widec \
--with-pkg-config-libdir=/usr/lib/pkgconfig
if [ $? -ne 0 ]
then
exit 1
fi
make -j5
if [ $? -ne 0 ]
then
exit 1
fi
make DESTDIR=$PWD/dest install
install -vm755 dest/usr/lib/libncursesw.so.6.3 /usr/lib
rm -v dest/usr/lib/libncursesw.so.6.3
cp -av dest/* /
for lib in ncurses form panel menu ; do
rm -vf /usr/lib/lib${lib}.so
echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
done
rm -vf /usr/lib/libcursesw.so
echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so
mkdir -pv /usr/share/doc/ncurses-6.3
cp -v -R doc/* /usr/share/doc/ncurses-6.3
cd /sources
rm -rf ncurses-6.3

View file

@ -869,3 +869,15 @@ then
stop_script "chapter8/8.27-pkg-config.sh" stop_script "chapter8/8.27-pkg-config.sh"
fi fi
# Chapter 8.28
# ============
echo "Building ncurses"
su -c "bash $SCRIPT/chapter8/8/28-ncurses.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter8/8.28-ncurses.sh"
fi