From 5536f7440f2f4a12782e8d741cbbba5f1c3cfea8 Mon Sep 17 00:00:00 2001 From: Archaic Date: Mon, 26 Dec 2005 19:00:06 +0000 Subject: Applied Alexander Patrakov's patch which adds UTF-8 capability to the development branch of the LFS Book. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7235 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/ncurses.xml | 94 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 82 insertions(+), 12 deletions(-) (limited to 'chapter06/ncurses.xml') diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index 50e2bdc33..be459b36d 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -28,10 +28,49 @@ Gawk, GCC, Glibc, Grep, Make, and Sed Installation of Ncurses + + +Since the release of Ncurses-&ncurses-version;, a memory leak and some +display bugs were found and fixed upstream. Apply those fixes: + +patch -Np1 -i ../&ncurses-fixes-patch; Prepare Ncurses for compilation: -./configure --prefix=/usr --with-shared --without-debug +./configure --prefix=/usr --with-shared --without-debug --enable-widec + +The meaning of the configure options: + + + +--enable-widec +This switch causes wide-character libraries +(e.g. libncursesw.so.&ncurses-version;) +to be built instead of normal ones +(e.g. libncurses.so.&ncurses-version;). +Those wide-character libraries are usable in both multibyte and traditional 8-bit +locales, while normal libraries work properly only in 8-bit locales. +Wide-character and normal libraries are source-compatible, but not +binary-compatible. + + + + Compile the package: @@ -49,18 +88,48 @@ Gawk, GCC, Glibc, Grep, Make, and Sed Fix a library that should not be executable: -chmod -v 644 /usr/lib/libncurses++.a +chmod -v 644 /usr/lib/libncurses++w.a Move the libraries to the /lib directory, where they are expected to reside: -mv -v /usr/lib/libncurses.so.5* /lib - -Because the libraries have been moved, a few symlinks point to -non-existent files. Recreate those symlinks: - -ln -sfv ../../lib/libncurses.so.5 /usr/lib/libncurses.so -ln -sfv libncurses.so /usr/lib/libcurses.so +mv -v /usr/lib/libncursesw.so.5* /lib + +Because the libraries have been moved, one symlink points to +a non-existent file. Recreate it: + +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 really old applications that look for +-lcurses at build time are still +buildable: + +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 + +The instructions above don't create non-wide-character Ncurses +libraries since nothing in LFS and BLFS would link against them at runtime. +If you must have such libraries because of some binary-only application, +build them with the following commands: +make distclean && +./configure --prefix=/usr --with-shared --without-normal \ + --without-debug --without-cxx-binding && +make sources libs && +cp -av lib/lib*.so.5* /usr/lib + @@ -71,8 +140,10 @@ ln -sfv libncurses.so /usr/lib/libcurses.so Installed libraries captoinfo (link to tic), clear, infocmp, infotocap (link to tic), reset (link to tset), tack, tic, toe, tput, and tset -libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so], libmenu.[a,so], -libncurses++.a, libncurses.[a,so], and libpanel.[a,so] +libcursesw.[a,so] (symlink and linker script to libncursesw.[a,so]), +libformw.[a,so], libmenuw.[a,so], +libncurses++w.a, libncursesw.[a,so], libpanelw.[a,so] and their +non-wide-character counterparts without "w" in the library names. Short Descriptions @@ -212,4 +283,3 @@ menu displayed during the kernel's make menuconfig - -- cgit v1.2.3-54-g00ecf