X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;ds=sidebyside;f=stage2%2Fcis-ncurses;h=54e594b21d2844485523899a9b16b236e7ba3c11;hb=7a241252d60ff447f09cf5c417d7c79a209f0bce;hp=3b7e884f0e62a807ebb25981d7832004040ce929;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-ncurses b/stage2/cis-ncurses index 3b7e884..54e594b 100755 --- a/stage2/cis-ncurses +++ b/stage2/cis-ncurses @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,44 +9,42 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +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 && + --enable-widec +make -j ${MAKEJOBS} +make install -# To be FHS compliant... -mv -fv /usr/lib/libncursesw.so.5* /lib && +# Move the libraries to the /lib directory, where they are expected to reside: +mv -fv /usr/lib/libncursesw.so.5* /lib -# Fixing some symlinks after the move -ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so && +# 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 curses ncurses form panel menu ; do +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${lib}w.a /usr/lib/lib${lib}.a + ln -sfvT lib${lib}w.a /usr/lib/lib${lib}.a done -ln -sfv libncurses++w.a /usr/lib/libncurses++.a && +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 && +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 +ldconfig + exit $?