source: clfs-sysroot/BOOK/final-system/common/man.xml@ e84c831

Last change on this file since e84c831 was 7b3c921, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Add Man Internationalization patch.

  • Property mode set to 100644
File size: 8.3 KB
RevLine 
[02095ae]1<?xml version="1.0" encoding="ISO-8859-1"?>
[c439b8a]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[02095ae]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-man" role="wrap">
9 <?dbhtml filename="man.html"?>
10
11 <title>Man-&man-version;</title>
12
13 <indexterm zone="ch-system-man">
14 <primary sortas="a-Man">Man</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Man package contains programs for finding and viewing man
21 pages.</para>
22
23 </sect2>
24
25 <sect2 role="installation">
26 <title>Installation of Man</title>
27
[7b3c921]28 <para os="p1">This patch adds support for Internationalization:</para>
29
30<screen os="p2"><userinput>patch -Np1 -i ../&man-i18n-patch;</userinput></screen>
31
[02095ae]32 <para os="a">A few adjustments need to be made to the sources of Man.</para>
33
[6b1f979]34 <para os="b">First, a <command>sed</command> substitution is needed to
35 modify <command>configure</command>'s default search path for executables.
36 It cycles through the values in <envar>PREPATH</envar> until it finds the
[4f85e0f]37 program it is looking for. The <option>-R</option> switch is also added to
38 the <envar>PAGER</envar> variable so that escape sequences are properly
39 handled by Less:</para>
[02095ae]40
[3349a3a]41<screen os="c"><userinput>cp configure{,.orig}
[6b1f979]42sed -e "/PREPATH=/s@=.*@=\"$(eval echo ${CLFS}/{,usr/}{sbin,bin})\"@g" \
43 -e 's@-is@&amp;R@g' configure.orig &gt; configure</userinput></screen>
[02095ae]44
[c413747]45 <para os="d">Another couple of <command>sed</command> substitutions
46 comment out the <quote>MANPATH /usr/man</quote> and
47 <quote>MANPATH /usr/local/man</quote> lines in the
48 <filename>man.conf</filename> file to prevent redundant
[f386fcc]49 results when using programs such as <command>whatis</command>:</para>
[02095ae]50
[3349a3a]51<screen os="e"><userinput>cp src/man.conf.in{,.orig}
[f386fcc]52sed -e 's@MANPATH./usr/man@#&amp;@g' \
53 -e 's@MANPATH./usr/local/man@#&amp;@g' \
54 src/man.conf.in.orig &gt; src/man.conf.in</userinput></screen>
[02095ae]55
[d11b860]56 <para os="f">Prepare Man for compilation:</para>
[02095ae]57
[d11b860]58<screen os="g"><userinput>./configure -confdir=/etc</userinput></screen>
[02095ae]59
[d11b860]60 <variablelist os="h">
[02095ae]61 <title>The meaning of the configure options:</title>
62
63 <varlistentry>
64 <term><parameter>-confdir=/etc</parameter></term>
65 <listitem>
66 <para>This tells the <command>man</command> program to look for the
67 <filename>man.conf</filename> configuration file in the <filename
68 class="directory">/etc</filename> directory.</para>
69 </listitem>
70 </varlistentry>
71 </variablelist>
72
[d11b860]73 <para os="i">Configure was modified to look in <filename
[6b1f979]74 class="directory">${CLFS}</filename> for the paths of helper
75 programs. Right now all of the programs have <filename
76 class="directory">${CLFS}</filename> as a prefix. Remove that prefix
77 with the following command:</para>
[02095ae]78
[d11b860]79<screen os="j"><userinput>cp conf_script{,.orig}
[6b1f979]80sed "s@${CLFS}@@" conf_script.orig &gt; conf_script</userinput></screen>
[02095ae]81
[977c5d0]82 <para os="k">The <command>makemsg</command> program, in Man's source, is
83 executed during the build. Compile it using the host's <command>gcc</command>:</para>
[02095ae]84
[d11b860]85<screen os="l"><userinput>gcc src/makemsg.c -o src/makemsg</userinput></screen>
[02095ae]86
[d11b860]87 <para os="m">Compile the package:</para>
[02095ae]88
[d11b860]89<screen os="n"><userinput>make</userinput></screen>
[02095ae]90
[d11b860]91 <para os="o">Install the package:</para>
[6b1f979]92
[d11b860]93<screen os="p"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
[6b1f979]94
[d11b860]95 <note os="q">
[02095ae]96 <para>If you will be working on a terminal that does not support
97 text attributes such as color and bold, you can disable Select
98 Graphic Rendition (SGR) escape sequences by editing the
99 <filename>man.conf</filename> file and adding the <option>-c</option>
100 option to the <envar>NROFF</envar> variable. If you use multiple
101 terminal types for one computer it may be better to selectively add
102 the <envar>GROFF_NO_SGR</envar> environment variable for the terminals
103 that do not support SGR.</para>
104 </note>
105
[d11b860]106 <para os="r">If the character set of the locale uses 8-bit characters, search
[02095ae]107 for the line beginning with <quote>NROFF</quote> in
108 <filename>/etc/man.conf</filename>, and verify that it matches the
109 following:</para>
110
[d11b860]111<screen os="s">NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
[02095ae]112
[d11b860]113 <para os="t">Note that <quote>latin1</quote> should be used even if it is not
[02095ae]114 the character set of the locale. The reason is that, according to the
115 specification, <command>groff</command> has no means of typesetting
116 characters outside International Organization for Standards (ISO) 8859-1
117 without some strange escape codes. When formatting man pages,
118 <command>groff</command> thinks that they are in the ISO 8859-1 encoding
119 and this <parameter>-Tlatin1</parameter> switch tells
120 <command>groff</command> to use the same encoding for output. Since
121 <command>groff</command> does no recoding of input characters, the f
122 ormatted result is really in the same encoding as input, and therefore
123 it is usable as the input for a pager.</para>
124
[d11b860]125 <para os="u">This does not solve the problem of a non-working
[02095ae]126 <command>man2dvi</command> program for localized man pages in
127 non-ISO 8859-1 locales. Also, it does not work with multibyte
128 character sets. The first problem does not currently have a solution.
[755f44a]129 The second issue is not of concern because the CLFS installation does
[02095ae]130 not support multibyte character sets.</para>
131
132 </sect2>
133
134 <sect2 id="contents-man" role="content">
135 <title>Contents of Man</title>
136
137 <segmentedlist>
138 <segtitle>Installed programs</segtitle>
139
140 <seglistitem>
141 <seg>apropos, makewhatis, man, man2dvi, man2html, and whatis</seg>
142 </seglistitem>
143 </segmentedlist>
144
145 <variablelist>
146 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
147 <?dbfo list-presentation="list"?>
148 <?dbhtml list-presentation="table"?>
149
150 <varlistentry id="apropos">
151 <term><command>apropos</command></term>
152 <listitem>
153 <para>Searches the <command>whatis</command> database and
154 displays the short descriptions of system commands that contain
155 a given string</para>
156 <indexterm zone="ch-system-man apropos">
157 <primary sortas="b-apropos">apropos</primary>
158 </indexterm>
159 </listitem>
160 </varlistentry>
161
162 <varlistentry id="makewhatis">
163 <term><command>makewhatis</command></term>
164 <listitem>
165 <para>Builds the <command>whatis</command> database; it reads all
166 the man pages in the <envar>MANPATH</envar> and writes the name
167 and a short description in the <command>whatis</command> database
168 for each page</para>
169 <indexterm zone="ch-system-man makewhatis">
170 <primary sortas="b-makewhatis">makewhatis</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
175 <varlistentry id="man">
176 <term><command>man</command></term>
177 <listitem>
178 <para>Formats and displays the requested on-line man page</para>
179 <indexterm zone="ch-system-man man">
180 <primary sortas="b-man">man</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="man2dvi">
186 <term><command>man2dvi</command></term>
187 <listitem>
188 <para>Converts a man page into dvi format</para>
189 <indexterm zone="ch-system-man man2dvi">
190 <primary sortas="b-man2dvi">man2dvi</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry id="man2html">
196 <term><command>man2html</command></term>
197 <listitem>
198 <para>Converts a man page into HTML</para>
199 <indexterm zone="ch-system-man man2html">
200 <primary sortas="b-man2html">man2html</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
205 <varlistentry id="whatis">
206 <term><command>whatis</command></term>
207 <listitem>
208 <para>Searches the <command>whatis</command> database and
209 displays the short descriptions of system commands that
210 contain the given keyword as a separate word</para>
211 <indexterm zone="ch-system-man whatis">
212 <primary sortas="b-whatis">whatis</primary>
213 </indexterm>
214 </listitem>
215 </varlistentry>
216
217 </variablelist>
218
219 </sect2>
220
221</sect1>
Note: See TracBrowser for help on using the repository browser.