#!/bin/sh set -o errexit # First argument of this script is the package name # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Applying patches (if any) apply_patches ${1} cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --with-shared \ --without-debug \ --enable-widec make -j ${MAKEJOBS} make install # Move the libraries to the /lib directory, where they are expected to reside: mv -fv /usr/lib/libncursesw.so.5* /lib # Because the libraries have been moved, one symlink points to a non-existent file: ln -sfvT ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so # Many applications still expect the linker to be able to find # non-wide-character Ncurses libraries. Trick such applications # into linking with wide-character libraries by means of symlinks # and linker scripts: 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 -sfvT lib${lib}w.a /usr/lib/lib${lib}.a done ln -sfvT libncurses++w.a /usr/lib/libncurses++.a # Finally, make sure that old applications that look for # -lcurses at build time are still buildable: rm -vf /usr/lib/libcursesw.so echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so ln -sfv libncurses.so /usr/lib/libcurses.so ln -sfv libncursesw.a /usr/lib/libcursesw.a ln -sfv libncurses.a /usr/lib/libcurses.a ldconfig exit $?