aboutsummaryrefslogtreecommitdiff
path: root/zh_CN.GB2312/books/porters-handbook
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2006-12-05 02:36:13 +0000
committerXin LI <delphij@FreeBSD.org>2006-12-05 02:36:13 +0000
commit84faf46fcaa235124249098a80ee91d192de92ba (patch)
treec3efcc4ebe5d32681bd62e23de59ca43dbf9a2c5 /zh_CN.GB2312/books/porters-handbook
parent37a6cd8d7dbae8d10a88c7ca39daec71ff935cfd (diff)
Notes
Diffstat (limited to 'zh_CN.GB2312/books/porters-handbook')
-rw-r--r--zh_CN.GB2312/books/porters-handbook/book.sgml80
1 files changed, 79 insertions, 1 deletions
diff --git a/zh_CN.GB2312/books/porters-handbook/book.sgml b/zh_CN.GB2312/books/porters-handbook/book.sgml
index 41c5fecaef..fcf815ebbb 100644
--- a/zh_CN.GB2312/books/porters-handbook/book.sgml
+++ b/zh_CN.GB2312/books/porters-handbook/book.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.769
+ Original Revision: 1.772
$FreeBSD$
-->
@@ -3674,6 +3674,42 @@ RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar
</sect2>
+ <sect2>
+ <title>自动激活的特性</title>
+
+ <para>在使用 GNU configure 脚本时, 一定要小心有些特性会由其自动检测而激活。
+ 您应通过明确地指定相应的
+ <literal>--without-xxx</literal> 或 <literal>--disable-xxx</literal>
+ 参数到 <makevar>CONFIGURE_ARGS</makevar> 来禁用不希望的特性。</para>
+
+ <example>
+ <title>处理选项时的错误做法</title>
+ <programlisting>.if defined(WITH_FOO)
+LIB_DEPENDS+= foo.0:${PORTSDIR}/devel/foo
+CONFIGURE_ARGS+= --enable-foo
+.endif</programlisting>
+ </example>
+
+ <para>在前面的例子中, 假设系统中已经安装了 libfoo 库。 用户可能并不希望应用程序使用 libfoo,
+ 因此他在 <literal>make config</literal> 对话框中关掉了这个选项。
+ 但是, 应用程序的 configure 脚本检测到了系统中存在这个库,
+ 并将其加入到了最终可执行文件支持的功能中。 现在, 如果用户决定从系统中卸载 libfoo 时,
+ ports 系统就无法保护这个应用程序免遭破坏了 (因为没有记录 libfoo 的依赖关系)。</para>
+
+ <example>
+ <title>处理选项时的正确做法</title>
+ <programlisting>.if defined(WITH_FOO)
+LIB_DEPENDS+= foo.0:${PORTSDIR}/devel/foo
+CONFIGURE_ARGS+= --enable-foo
+.else
+CONFIGURE_ARGS+= --disable-foo
+.endif</programlisting>
+ </example>
+
+ <para>在第二个例子中, libfoo 库被明确禁用。 即使系统中已经安装了这个库,
+ configure 脚本也不会启用相应的功能了。</para>
+ </sect2>
+
</sect1>
<sect1 id="makefile-wrkdir">
@@ -6436,6 +6472,44 @@ PLIST_SUB+= VERSION="${VER_STR}"
而无需 <makevar>WX_PREMK</makevar> 的参与。</para>
</note>
</sect2>
+
+ <sect2 id="wx-additional-config-args">
+ <title>额外的 <command>configure</command> 参数</title>
+
+ <para>某些 GNU <command>configure</command> 脚本在只设置了
+ <literal>WX_CONFIG</literal> 环境变量时, 无法自动找到
+ <application>wxWidgets</application>, 而需要使用额外的参数来加以指定。
+ 您可以使用 <makevar>WX_CONF_ARGS</makevar> 变量来给出这些参数。</para>
+
+ <table frame="none">
+ <title>可用于 <makevar>WX_CONF_ARGS</makevar> 的值</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>可用值</entry>
+
+ <entry>结果</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><literal>absolute</literal></entry>
+
+ <entry><literal>--with-wx-config=${WX_CONFIG}</literal></entry>
+ </row>
+
+ <row>
+ <entry><literal>relative</literal></entry>
+
+ <entry><literal>--with-wx=${X11BASE}
+ --with-wx-config=${WX_CONFIG:T}</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect2>
</sect1>
<sect1 id="using-lua">
@@ -9962,6 +10036,10 @@ Reference: &lt;http://www.freebsd.org/ports/portaudit/74a9541d-5d6c-11d8-80e3-00
<entry>加入了 libelf 之后的 7.0-CURRENT。</entry>
<entry>700025</entry>
</row>
+ <row>
+ <entry>对音效相关的 sysctl 进行大幅调整之后的 7.0-CURRENT。</entry>
+ <entry>700026</entry>
+ </row>
</tbody>
</tgroup>
</table>