aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/ncurses.xml
diff options
context:
space:
mode:
authorJeremy Huntwork <jhuntwork@linuxfromscratch.org>2006-01-06 01:59:08 +0000
committerJeremy Huntwork <jhuntwork@linuxfromscratch.org>2006-01-06 01:59:08 +0000
commitfa21b3dc894b9964620968dfae6685d69ce89fb9 (patch)
tree2353b9af8cae48156b98e651873d483e994e352a /chapter06/ncurses.xml
parent60e34b52810dd47567ca18aa2c86fe4cd7c9fd01 (diff)
Initial support of UTF-8. Thanks Alexander Patrakov.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7245 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06/ncurses.xml')
-rw-r--r--chapter06/ncurses.xml95
1 files changed, 83 insertions, 12 deletions
diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml
index 50e2bdc33..2df394b7a 100644
--- a/chapter06/ncurses.xml
+++ b/chapter06/ncurses.xml
@@ -28,10 +28,49 @@ Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
<sect2 role="installation">
<title>Installation of Ncurses</title>
+<!-- Uncomment if using a dated ncurses release instead of a numbered one.
+
+<para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
+and features added. The most important news are .......
+To get these fixes and features, apply the rollup patch:</para>
+
+<screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
+-->
+
+<para>Since the release of Ncurses-&ncurses-version;, a memory leak and some
+display bugs were found and fixed upstream. Apply those fixes:</para>
+
+<screen><userinput>patch -Np1 -i ../&ncurses-fixes-patch;</userinput></screen>
<para>Prepare Ncurses for compilation:</para>
-<screen><userinput>./configure --prefix=/usr --with-shared --without-debug</userinput></screen>
+<screen><userinput>./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
+
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--enable-widec</parameter></term>
+<listitem><para>This switch causes wide-character libraries
+(e.g., <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
+to be built instead of normal ones
+(e.g., <filename class="libraryfile">libncurses.so.&ncurses-version;</filename>).
+These 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.</para>
+</listitem>
+</varlistentry>
+<!--
+<varlistentry>
+<term><parameter>- -without-cxx-binding</parameter></term>
+<listitem><para>This optional switch causes the
+<filename class="libraryfile">libncurses++w.a</filename> library
+not to be built. Nothing in LFS and BLFS uses this library.</para>
+</listitem>
+</varlistentry>
+-->
+</variablelist>
<para>Compile the package:</para>
@@ -49,18 +88,49 @@ Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
<para>Fix a library that should not be executable:</para>
-<screen><userinput>chmod -v 644 /usr/lib/libncurses++.a</userinput></screen>
+<screen><userinput>chmod -v 644 /usr/lib/libncurses++w.a</userinput></screen>
<para>Move the libraries to the <filename class="directory">/lib</filename> directory,
where they are expected to reside:</para>
-<screen><userinput>mv -v /usr/lib/libncurses.so.5* /lib</userinput></screen>
-
-<para>Because the libraries have been moved, a few symlinks point to
-non-existent files. Recreate those symlinks:</para>
-
-<screen><userinput>ln -sfv ../../lib/libncurses.so.5 /usr/lib/libncurses.so
-ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
+<screen><userinput>mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
+
+<para>Because the libraries have been moved, one symlink points to
+a non-existent file. Recreate it:</para>
+
+<screen><userinput>ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
+
+<para>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:</para>
+
+<screen><userinput>for lib in curses ncurses form panel menu ; do \
+ rm -vf /usr/lib/lib${lib}.so ; \
+ echo "INPUT(-l${lib}w)" &gt;/usr/lib/lib${lib}.so ; \
+ ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
+done &amp;&amp;
+ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
+
+<para>Finally, make sure that old applications that look for
+<filename class="libaryfile">-lcurses</filename> at build time are still
+buildable:</para>
+
+<screen><userinput>echo "INPUT(-lncursesw)" &gt;/usr/lib/libcursesw.so &amp;&amp;
+ln -sfv libncurses.so /usr/lib/libcurses.so &amp;&amp;
+ln -sfv libncursesw.a /usr/lib/libcursesw.a &amp;&amp;
+ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
+
+<note><para>The instructions above don't create non-wide-character Ncurses
+libraries since no package installed by compiling from sources would link
+against them at runtime.
+If you must have such libraries because of some binary-only application,
+build them with the following commands:</para>
+<screen role="nodump"><userinput>make distclean &amp;&amp;
+./configure --prefix=/usr --with-shared --without-normal \
+ --without-debug --without-cxx-binding &amp;&amp;
+make sources libs &amp;&amp;
+cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
+</note>
</sect2>
@@ -71,8 +141,10 @@ ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
<segtitle>Installed libraries</segtitle>
<seglistitem><seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
reset (link to tset), tack, tic, toe, tput, and tset</seg>
-<seg>libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so], libmenu.[a,so],
-libncurses++.a, libncurses.[a,so], and libpanel.[a,so]</seg></seglistitem>
+<seg>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.</seg></seglistitem>
</segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
@@ -212,4 +284,3 @@ menu displayed during the kernel's <command>make menuconfig</command></para>
</sect2>
</sect1>
-