Files
master/chapter05/ncurses.html
2015-05-23 18:50:06 +08:00

175 lines
6.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"application/xhtml+xml; charset=utf-8" />
<title>
5.15.&nbsp;Ncurses-5.9
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
media="print" />
</head>
<body class="lfs" id="lfs-7.7-systemd">
<div class="navheader">
<h4>
Linux From Scratch - Version 7.7-systemd
</h4>
<h3>
第五章 构建临时系统
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="check.html" title="Check-0.9.14">上一页</a>
<p>
Check-0.9.14
</p>
</li>
<li class="next">
<a accesskey="n" href="bash.html" title="Bash-4.3.30">下一页</a>
<p>
Bash-4.3.30
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter05.html" title=
"第五章 构建临时系统">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
<div class="wrap" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="ch-tools-ncurses" name="ch-tools-ncurses"></a>5.15.
Ncurses-5.9
</h1>
<div class="package" lang="en" xml:lang="en">
<p>
Ncurses软件包包含与终端无关的处理字符界面的库。
</p>
<div class="segmentedlist">
<div class="seglistitem">
<div class="seg">
<strong class="segtitle">估计构建时间:</strong>
<span class="segbody">0.5 SBU</span>
</div>
<div class="seg">
<strong class="segtitle">所需磁盘空间:</strong>
<span class="segbody">45 MB</span>
</div>
</div>
</div>
</div>
<div class="installation" lang="en" xml:lang="en">
<h2 class="sect2">
5.15.1. 安装Ncurses
</h2>
<p>
配置Ncurses准备编译
</p>
<pre class="userinput">
<kbd class="command">./configure --prefix=/tools \
--with-shared \
--without-debug \
--without-ada \
--enable-widec \
--enable-overwrite</kbd>
</pre>
<div class="variablelist">
<p class="title">
<strong>配置脚本参数的含义:</strong>
</p>
<dl class="variablelist">
<dt>
<span class="term"><em class=
"parameter"><code>--without-ada</code></em></span>
</dt>
<dd>
<p>
这个选项会保证Ncurse不会编译对宿主机系统里可能存在的Ada编译器的支持而这在我们<span class="command"><strong>chroot</strong></span>切换环境后就不再可用。
</p>
</dd>
<dt>
<span class="term"><em class=
"parameter"><code>--enable-overwrite</code></em></span>
</dt>
<dd>
<p>
这个选项会告诉Ncurses安装它的头文件到<code class="filename">/tools/include</code>目录,而不是<code class="filename">/tools/include/ncurses</code>目录保证其他软件包可以正常找到Ncurses的头文件。
</p>
</dd>
<dt>
<span class="term"><em class=
"parameter"><code>--enable-widec</code></em></span>
</dt>
<dd>
<p>
这个选项会控制编译宽字符库(比如,<code class="filename">libncursesw.so.5.9</code>)而不是默认的普通库(比如,<code class="filename">libncurses.so.5.9</code>。这些宽字符库在多字节和传统的8位环境下使用而普通库只能用于8位环境。宽字符库和普通库的源代码是兼容的单并不是二进制兼容。
</p>
</dd>
</dl>
</div>
<p>
编译软件包:
</p>
<pre class="userinput">
<kbd class="command">make</kbd>
</pre>
<p>
这个软件包有测试套件,但是只有在安装后才能执行。测试用例在<code class="filename">test/</code>目录里。查看该目录下的<code class="filename">README</code>文件了解更多细节。
</p>
<p>
安装软件包:
</p>
<pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
</div>
<div class="content" lang="en" xml:lang="en">
<p>
关于这个软件包的详细资料请查看本书章节:<a class="xref" href=
"../chapter06/ncurses.html#contents-ncurses" title=
"6.20.2.&nbsp;Ncurses软件包内容">6.20.2,&ldquo;Ncurses软件包内容&rdquo;</a>
</p>
</div>
</div>
<div class="navfooter">
<div class="book">
<div class="titlepage">
<div class="author">
<span class="firstname">翻译团队:<a href="http://lctt.github.io/" target="_blank">LCTT</a></span>
<span class="surname">译者/校对:<a href="http://github.com/zpl1025" target="_blank">zpl1025</a>/</span>
</div>
</div>
</div>
<ul>
<li class="prev">
<a accesskey="p" href="check.html" title="Check-0.9.14">上一页</a>
<p>
Check-0.9.14
</p>
</li>
<li class="next">
<a accesskey="n" href="bash.html" title="Bash-4.3.30">下一页</a>
<p>
Bash-4.3.30
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter05.html" title=
"第五章 构建临时系统">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
</body>
</html>