#!/bin/sh # 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 && # Fix a library that shouldn't be executable. chmod -v 644 /usr/lib/libncurses++w.a && # To be FHS compliant... mv -fv /usr/lib/libncursesw.so.5* /lib && # Fixing some symlinks after the move ln -sfv ../../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 curses 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${lib}w.a /usr/lib/lib${lib}.a done ln -sfv 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 # Return last error exit $?