From fcc027677da55c41dcaea045f5b9ff8b088e6495 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 7 Jun 2020 20:16:00 +0000 Subject: Initial commit of alternative cross LFS git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/ncurses.xml | 339 +++++++++----------------------------------------- 1 file changed, 58 insertions(+), 281 deletions(-) (limited to 'chapter06/ncurses.xml') diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index b37f1f69c..93cf85263 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + @@ -16,23 +16,25 @@ Ncurses-&ncurses-version; - + Ncurses + tools - <para>The Ncurses package contains libraries for terminal-independent - handling of character screens.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/ncurses.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&ncurses-ch6-sbu;</seg> - <seg>&ncurses-ch6-du;</seg> + <seg>&ncurses-ch5-sbu;</seg> + <seg>&ncurses-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -41,23 +43,45 @@ <sect2 role="installation"> <title>Installation of Ncurses - Don't install a static library that is not handled by configure: + First, ensure that gawk is found first during configuration: -sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in +sed -i s/mawk// configure + + Then, run the following commands to build the tic + program on the build host: + +mkdir build +cd build +../configure +make -C include +make -C progs tic +cd .. Prepare Ncurses for compilation: -./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --with-shared \ - --without-debug \ - --without-normal \ - --enable-pc-files \ - --enable-widec +./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./config.guess) \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-ada \ + --without-normal \ + --enable-widec \ + --enable-pc-files The meaning of the new configure options: + + --without-ada + + This ensures that Ncurses does not build support for the Ada + compiler which may be present on the host but will not be available + once we enter the chroot environment. + + + --enable-widec @@ -87,293 +111,46 @@ - + Compile the package: make - This package has a test suite, but it can only be run after the - package has been installed. The tests reside in the - test/ directory. See the - README file in that directory for further details. - - Install the package: - -make install + +make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install +ln -s libncursesw.so $LFS/usr/lib/libncurses.so Move the shared libraries to the /lib directory, where they are expected to reside: -mv -v /usr/lib/libncursesw.so.6* /lib +mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib Because the libraries have been moved, one symlink points to a non-existent file. Recreate it: -ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /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 -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc -done - - 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 ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so - If desired, install the Ncurses documentation: - -mkdir -v /usr/share/doc/ncurses-&ncurses-version; -cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version; - - - - 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. However, the only known binary-only - applications that link against non-wide-character Ncurses libraries - require version 5. If you must have such libraries because of some binary-only - application or to be compliant with LSB, build the package again with the - following commands: - -make distclean -./configure --prefix=/usr \ - --with-shared \ - --without-normal \ - --without-debug \ - --without-cxx-binding \ - --with-abi-version=5 -make sources libs -cp -av lib/lib*.so.5* /usr/lib - - - Contents of Ncurses - - - Installed programs - Installed libraries - Installed directories - - - - captoinfo (link to tic), - clear, - infocmp, - infotocap (link to tic), - ncursesw6-config, - reset (link to tset), - tabs, - tic, - toe, - tput, and - tset - - - libcursesw.so (symlink and linker script to libncursesw.so), - libformw.so, - libmenuw.so, - libncursesw.so, - libncurses++w.a, - libpanelw.so, and their non-wide-character counterparts without "w" - in the library names. - - /usr/share/tabset, - /usr/share/terminfo, and - /usr/share/doc/ncurses-&ncurses-version; - - - - - - Short Descriptions - - - - - captoinfo - - Converts a termcap description into a terminfo description - - captoinfo - - - - - - clear - - Clears the screen, if possible - - clear - - - - - - infocmp - - Compares or prints out terminfo descriptions - - infocmp - - - - - - infotocap - - Converts a terminfo description into a termcap description - - infotocap - - - - - - ncursesw6-config - - Provides configuration information for ncurses - - ncursesw6-config - - - - - - reset - - Reinitializes a terminal to its default values - - reset - - - - - - tabs - - Clears and sets tab stops on a terminal - - tabs - - - - - - tic - - The terminfo entry-description compiler that translates a - terminfo file from source format into the binary format needed for the - ncurses library routines [A terminfo file contains information on the - capabilities of a certain terminal.] - - tic - - - - - - toe - - Lists all available terminal types, giving the primary name and - description for each - - toe - - - - - - tput - - Makes the values of terminal-dependent capabilities available to - the shell; it can also be used to reset or initialize a terminal or - report its long name - - tput - - - - - - tset - - Can be used to initialize terminals - - tset - - - - - - libcursesw - - A link to libncursesw - - libcursesw - - - - - - libncursesw - - Contains functions to display text in many complex ways on a - terminal screen; a good example of the use of these functions is the - menu displayed during the kernel's make - menuconfig - - libncursesw - - - - - - libformw - - Contains functions to implement forms - - libformw - - - - - - libmenuw - - Contains functions to implement menus - - libmenuw - - - - - - libpanelw - - Contains functions to implement panels - - libpanelw - - - + + - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-ncurses" role="."/></para> </sect2> -- cgit v1.2.3-54-g00ecf