Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/ncurses.xml

    r5bef8f2 r91f9a17  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="ISO-8859-1"?>
    22<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
    33  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
     
    100100        <listitem>
    101101          <para>This switch causes wide-character libraries (e.g., <filename
    102           class="libraryfile">libncursesw.so.&ncurses-release;</filename>)
     102          class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
    103103          to be built instead of normal ones (e.g., <filename
    104           class="libraryfile">libncurses.so.&ncurses-release;</filename>).
     104          class="libraryfile">libncurses.so.&ncurses-version;</filename>).
    105105          These wide-character libraries are usable in both multibyte and
    106106          traditional 8-bit locales, while normal libraries work properly
     
    128128
    129129    <para>The installation of this package will overwrite
    130     <filename class="libraryfile">libncursesw.so.&ncurses-release;</filename>
     130    <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>
    131131    in-place.  It may crash the shell process which is using code and data
    132132    from the library file.  Install the package with
    133133    <literal>DESTDIR</literal>, and replace the library file correctly using
    134     <command>install</command> command (the header
    135     <filename>curses.h</filename> is also edited to ensure the
    136     wide-character ABI to be used as what we've done in
    137     <xref linkend='ch-tools-ncurses'/>):</para>
     134    <command>install</command> command:</para>
    138135
    139136<screen><userinput remap="install">make DESTDIR=$PWD/dest install
    140 install -vm755 dest/usr/lib/libncursesw.so.&ncurses-release; /usr/lib
    141 rm -v  dest/usr/lib/libncursesw.so.&ncurses-release;
    142 sed -e 's/^#if.*XOPEN.*$/#if 1/' \
    143     -i dest/usr/include/curses.h
     137install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
     138rm -v  dest/usr/lib/libncursesw.so.&ncurses-version;
    144139cp -av dest/* /</userinput></screen>
    145140
    146141    <para>Many applications still expect the linker to be able to find
    147     non-wide-character Ncurses libraries. Trick such applications into
    148     linking with wide-character libraries by means of symlinks
    149     (note that the <filename class='extension'>.so</filename> links are
    150     only safe with <filename>curses.h</filename> edited to always use the
    151     wide-character ABI):</para>
     142    non-wide-character Ncurses libraries. Trick such applications into linking with
     143    wide-character libraries by means of symlinks and linker scripts:</para>
    152144
    153145<screen><userinput remap="install">for lib in ncurses form panel menu ; do
    154     ln -sfv lib${lib}w.so /usr/lib/lib${lib}.so
    155     ln -sfv ${lib}w.pc    /usr/lib/pkgconfig/${lib}.pc
     146    rm -vf                    /usr/lib/lib${lib}.so
     147    echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
     148    ln -sfv ${lib}w.pc        /usr/lib/pkgconfig/${lib}.pc
    156149done</userinput></screen>
    157150
     
    160153    buildable:</para>
    161154
    162 <screen><userinput remap="install">ln -sfv libncursesw.so /usr/lib/libcurses.so</userinput></screen>
     155<screen><userinput remap="install">rm -vf                     /usr/lib/libcursesw.so
     156echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
     157ln -sfv libncurses.so      /usr/lib/libcurses.so</userinput></screen>
    163158
    164159    <para>If desired, install the Ncurses documentation:</para>
     
    212207        </seg>
    213208        <seg>
    214            libcurses.so (symlink),
    215            libform.so (symlink),
     209           libcursesw.so (symlink and linker script to libncursesw.so),
    216210           libformw.so,
    217            libmenu.so (symlink),
    218211           libmenuw.so,
    219            libncurses.so (symlink),
    220212           libncursesw.so,
    221213           libncurses++w.so,
    222            libpanel.so (symlink),
    223            and libpanelw.so,
    224         </seg>
     214           libpanelw.so, and their non-wide-character counterparts without "w"
     215              in the library names.</seg>
    225216        <seg>
    226217           /usr/share/tabset,
     
    352343      </varlistentry>
    353344
     345      <varlistentry id="libcursesw">
     346        <term><filename class="libraryfile">libcursesw</filename></term>
     347        <listitem>
     348          <para>A link to <filename>libncursesw</filename></para>
     349          <indexterm zone="ch-system-ncurses libcursesw">
     350            <primary sortas="c-libcursesw">libcursesw</primary>
     351          </indexterm>
     352        </listitem>
     353      </varlistentry>
     354
    354355      <varlistentry id="libncursesw">
    355356        <term><filename class="libraryfile">libncursesw</filename></term>
Note: See TracChangeset for help on using the changeset viewer.