diff options
author | Xin LI <delphij@FreeBSD.org> | 2005-08-28 17:54:30 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2005-08-28 17:54:30 +0000 |
commit | 51ad97a1258d3d26a872cb7d282cc98c3bfe7eab (patch) | |
tree | 197c9a818575ef48c4ead122be673381c8e6749c | |
parent | 294bade795169bc3f9086b759d8476b9ff846e5e (diff) |
Notes
-rw-r--r-- | zh_CN.GB2312/books/porters-handbook/book.sgml | 306 |
1 files changed, 99 insertions, 207 deletions
diff --git a/zh_CN.GB2312/books/porters-handbook/book.sgml b/zh_CN.GB2312/books/porters-handbook/book.sgml index 33a1b36fd0..2465ed7954 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.594 + Original Revision: 1.603 $FreeBSD$ --> @@ -177,14 +177,16 @@ asami@cs.berkeley.edu</programlisting> <sect2> <title><filename>pkg-plist</filename> (port 的装箱单)</title> - <para>这份文件列出了 port 安装的所有文件。 - 之所以也被称为 装箱单 (“packing list”) 是因为 package - 的制作就是将这份列表里的文件打包。 + <para>这份文件列出了 port 所要安装的所有文件。 由于 package + 也是据此进行打包, 因此它也被称作 <quote>装箱单(packing list)</quote>. 这个文件中, 路径是相对于安装的路径的 (通常是 <filename>/usr/local</filename> 或 <filename>/usr/X11R6</filename>)。 如果您使用 <makevar>MAN<replaceable>n</replaceable></makevar> - 变量的话, 请不要在这里列出任何联机手册。</para> + 变量的话, 请不要在这里列出任何联机手册。 假如 port + 在安装过程中会创建一些目录, 请务必增加对应的 + <literal>@dirrm</literal> 行, + 以便在 package 被卸载时予以自动删除。</para> <para>下面是一个简单的例子:</para> @@ -198,15 +200,12 @@ lib/X11/oneko/mouse.xpm <para>参考 &man.pkg.create.1; 的联机手册以获得更多有关装箱单的细节</para> <note> - <para>您应该在列表里列出所有的文件而不仅仅是目录名。 - 如果这个 port 在安装的过程中给自己创建了目录, - 则一定要加入 <literal>@dirrm</literal> 以便在删除这个 - port 时能将这些目录也一并删除。</para> - <para>建议您将这个文件里的所有的文件名按字母排序。 这样, 在升级这个port的时候就能够更方便地核实所做的修改。</para> + </note> - <para>手工创建一份这样的文件列表将会是一件非常枯燥的事情。 + <note> + <para>手工创建一份这样的文件列表是一件非常枯燥的事情。 如果 port 要安装非常多的文件的话, 请参考 <link linkend="porting-autoplist">自动创建这个文件列表</link> 一节, 会帮您省下不少时间。</para> @@ -1591,7 +1590,7 @@ PORTEPOCH= 1</programlisting> <row> <entry><filename>offix*</filename></entry> - <entry><ulink url="http://leb.net/OffiX/">OffiX</ulink> 相关套件。</entry> + <entry><ulink url="http://leb.net/offix/">OffiX</ulink> 相关的套件。</entry> <entry></entry> </row> @@ -1663,6 +1662,12 @@ PORTEPOCH= 1</programlisting> </row> <row> + <entry><filename>scheme*</filename></entry> + <entry>与 Scheme 语言有关的 port。</entry> + <entry></entry> + </row> + + <row> <entry><filename>science</filename></entry> <entry>科学相关但不适合放在 <filename>astro</filename>、 @@ -1690,12 +1695,6 @@ PORTEPOCH= 1</programlisting> </row> <row> - <entry><filename>tcl76*</filename></entry> - <entry>依赖于 Tcl 7.6 版运行的 port。</entry> - <entry></entry> - </row> - - <row> <entry><filename>tcl80*</filename></entry> <entry>依赖于 Tcl 8.0 版运行的 port。</entry> <entry></entry> @@ -1720,6 +1719,12 @@ PORTEPOCH= 1</programlisting> </row> <row> + <entry><filename>tcl84*</filename></entry> + <entry>需要依赖 Tcl 8.4 版运行的 port。</entry> + <entry></entry> + </row> + + <row> <entry><filename>textproc</filename></entry> <entry>文本处理的实用程序。</entry> <entry>这个分类并不适合于那些应该放到 @@ -1727,24 +1732,12 @@ PORTEPOCH= 1</programlisting> </row> <row> - <entry><filename>tk42*</filename></entry> - <entry>依赖于 Tk 4.2 版运行的 port。</entry> - <entry></entry> - </row> - - <row> <entry><filename>tk80*</filename></entry> <entry>依赖于 Tk 8.0 版运行的 port。</entry> <entry></entry> </row> <row> - <entry><filename>tk81*</filename></entry> - <entry>依赖于 Tk 8.1 版运行的 port。</entry> - <entry></entry> - </row> - - <row> <entry><filename>tk82*</filename></entry> <entry>依赖于 Tk 8.2 版运行的 port。</entry> <entry></entry> @@ -1757,6 +1750,12 @@ PORTEPOCH= 1</programlisting> </row> <row> + <entry><filename>tk84*</filename></entry> + <entry>依赖于 Tk 8.4 版运行的 port。</entry> + <entry></entry> + </row> + + <row> <entry><filename>tkstep80*</filename></entry> <entry>需要 TkSTEP 8.0 来运行的 port。</entry> <entry></entry> @@ -1825,6 +1824,12 @@ PORTEPOCH= 1</programlisting> </row> <row> + <entry><filename>x11-themes</filename></entry> + <entry>X11 主题。</entry> + <entry></entry> + </row> + + <row> <entry><filename>x11-toolkits</filename></entry> <entry>X11 工具包。</entry> <entry></entry> @@ -1837,6 +1842,14 @@ PORTEPOCH= 1</programlisting> </row> <row> + <entry><filename>xfce*</filename></entry> + <entry>与 + <ulink url="http://www.xfce.org/">Xfce</ulink> + 桌面环境有关的 port。</entry> + <entry></entry> + </row> + + <row> <entry><filename>zope*</filename></entry> <entry><ulink url="http://www.zope.org/">Zope</ulink> 相关的支持。</entry> <entry></entry> @@ -4819,14 +4832,21 @@ _DOCSDIR= . <entry><makevar>USE_PYTHON</makevar></entry> <entry>此 port 需要 Python。 可以用 - <literal>2.3+</literal> 这样的形式来指定所希望的版本。</entry> + <literal>2.3+</literal> 这样的形式来指定所希望的版本。 + 除此之外, 也可以用横线来分隔两个版本号, + 以表示某个范围的版本, 例如: <literal>2.1-2.3</literal></entry> </row> <row> <entry><makevar>USE_PYDISTUTILS</makevar></entry> <entry>使用 Python distutils 来完成配置、 编译和安装。 对包含 - <filename>setup.py</filename> 的 port 而言这是必需的。</entry> + <filename>setup.py</filename> 的 port 而言这是必需的。 + 它会自动覆盖默认的 + <maketarget>do-build</maketarget> 和 + <maketarget>do-install</maketarget> 两个 target。 + 如果没有定义 <makevar>GNU_CONFIGURE</makevar>, + 也会覆盖 <maketarget>do-configure</maketarget> 行为。</entry> </row> <row> @@ -4839,11 +4859,26 @@ _DOCSDIR= . <row> <entry><makevar>PYTHON_SITELIBDIR</makevar></entry> - <entry>全站 package 所在的目录。 一般用于安装 - Python 模块。 如果可能, 尽量在 + <entry>全站 package 所在的目录, 它包括了 Python + 的安装目录 (通常是 <makevar>LOCALBASE</makevar>)。 + 而 <makevar>PYTHON_SITELIBDIR</makevar> 变量, + 对于安装 Python 模块则非常有用。</entry> + </row> + + <row> + <entry><makevar>PYTHONPREFIX_SITELIBDIR</makevar></entry> + + <entry>去掉了 PREFIX 部分的 PYTHON_SITELIBDIR。 应尽量在 <filename>pkg-plist</filename> 中使用 - <literal>%%PYTHON_SITELIBDIR%%</literal>。 默认值: - <literal>lib/python2.4/site-packages</literal></entry> + <literal>%%PYTHON_SITELIBDIR%%</literal> 变量。 + <literal>%%PYTHON_SITELIBDIR%%</literal> 默认为 + <literal>lib/python%%PYTHON_VERSION%%/site-packages</literal></entry> + </row> + + <row> + <entry><makevar>PYTHON_CMD</makevar></entry> + + <entry>Python 解释器的命令行, 包括版本号。</entry> </row> <row> @@ -4855,7 +4890,8 @@ _DOCSDIR= . <row> <entry><makevar>PYXML</makevar></entry> - <entry>将 XML 扩展模块加入依赖关系。</entry> + <entry>将 XML 扩展模块加入依赖关系。 (对于 + Python 2.0 和更高版本不再需要, 因为它已经成为了标准组件)。</entry> </row> <row> @@ -5113,176 +5149,6 @@ USE_SDL+= mixer </sect1> </chapter> -<!-- - - <chapter> - <title>ELF support</title> - - <para>Since FreeBSD changed to an ELF binary format shortly after - 3.0-RELEASE, we need to convert many ports that build shared - libraries to support ELF. Complicating this task is that a 3.0 - system can run as both ELF and a.out, and we wish to unofficially - support the 2.2 branch as long as possible. Below are the guidelines on - how to convert a.out only ports to support both a.out and ELF - compilation.</para> - - <para>Some part of this list is only applicable during the conversion, - but will be left here for a while for reference in case you have come - across some old port you wish to upgrade.</para> - - <sect1> - <title>Moving a.out libraries out of the way</title> - - <para>Any a.out libraries should be moved out of - <filename>/usr/local/lib</filename> and similar to an - <filename>aout</filename> subdirectory. (If you do not move them out - of the way, ELF ports will happily overwrite a.out libraries.) The - <maketarget>move-aout-libs</maketarget> target in the 3.0-CURRENT - <filename>src/Makefile</filename> (called from - <maketarget>aout-to-elf</maketarget>) will do this for you. It will - only move a.out libs so it is safe to call it on a system with both - ELF and a.out libs in the standard directories.</para> - </sect1> - - <sect1> - <title>Format</title> - - <para>The ports tree will build packages in the format the machine is - in. This means a.out for 2.2 and a.out or ELF for 3.0 depending on - what <command>`objformat`</command> returns. Also, once users move - a.out libraries to a subdirectory, building a.out libraries will be - unsupported. (I.e., it may still work if you know what you are - doing, but you are on your own.)</para> - - <note> - <para>If a port only works for a.out, set - <makevar>BROKEN_ELF</makevar> to a string describing the reason - why. Such ports will be skipped during a build on an ELF - system.</para> - </note> - </sect1> - - <sect1> - <title><makevar>PORTOBJFORMAT</makevar></title> - - <para><filename>bsd.port.mk</filename> will set - <makevar>PORTOBJFORMAT</makevar> to <literal>aout</literal> or - <literal>elf</literal> and export it in the environments - <envar>CONFIGURE_ENV</envar>, <envar>SCRIPTS_ENV</envar> and - <envar>MAKE_ENV</envar>. (It is always going to be - <literal>aout</literal> in 2.2-STABLE). It is also passed to - <maketarget>PLIST_SUB</maketarget> as - <literal>PORTOBJFORMAT=${PORTOBJFORMAT}</literal>. (See comment on - <literal>ldconfig</literal> lines below.)</para> - - <para>The variable is set using this line in - <filename>bsd.port.mk</filename>:</para> - - <programlisting>PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting> - - <para>Ports' make processes should use this variable to decide what to - do. However, if the port's <filename>configure</filename> script - already automatically detects an ELF system, it is not necessary to - refer to <makevar>PORTOBJFORMAT</makevar>.</para> - </sect1> - - <sect1> - <title>Building shared libraries</title> - - <para>The following are differences in handling shared libraries for - a.out and ELF.</para> - - <itemizedlist> - <listitem> - <para>Shared library versions</para> - - <para>An ELF shared library should be called - <filename>libfoo.so.<replaceable>M</replaceable></filename> - where <replaceable>M</replaceable> is the single version number, - and an a.out library should be called - <filename>libfoo.so.<replaceable>M</replaceable>.<replaceable>N</replaceable></filename> - where <replaceable>M</replaceable> is the major version and - <replaceable>N</replaceable> is the minor version number. - Do not mix those; <emphasis>never</emphasis> install an ELF - shared library called - <filename>libfoo.so.<replaceable>N</replaceable>.<replaceable>M</replaceable></filename> - or an a.out shared library (or symlink) called - <filename>libfoo.so.<replaceable>N</replaceable></filename>.</para> - </listitem> - - <listitem> - <para>Linker command lines</para> - - <para>Assuming <command>cc -shared</command> is used rather than - <command>ld</command> directly, the only difference is that you - need to add - <option>-Wl,-<replaceable>soname,libfoo.so.M</replaceable></option> - on the command line for ELF.</para> - </listitem> - </itemizedlist> - - <para>You need to install a symlink from - <filename>libfoo.so</filename> to - <filename>libfoo.so.<replaceable>N</replaceable></filename> to make - ELF linkers happy. Since it should be listed in - <filename>pkg-plist</filename> too, and it will not hurt in the a.out case - (some ports even require the link for dynamic loading), you should - just make this link regardless of the setting of - <makevar>PORTOBJFORMAT</makevar>.</para> - </sect1> - - <sect1> - <title><makevar>LIB_DEPENDS</makevar></title> - - <para>All port <filename>Makefile</filename>s are edited to remove minor numbers from - <makevar>LIB_DEPENDS</makevar>, and also to have the regexp support - removed. (E.g., <literal>foo\\.1\\.\\(33|40\\)</literal> becomes - <literal>foo.2</literal>.) They will be matched using <command>grep - -wF</command>.</para> - </sect1> - - <sect1> - <title><filename>pkg-plist</filename></title> - - <para><filename>pkg-plist</filename> should contain the short (ELF) shlib - names if the a.out minor number is zero, and the long (a.out) names - otherwise. <filename>bsd.port.mk</filename> will automatically add - <literal>.0</literal> to the end of short shlib lines if - <makevar>PORTOBJFORMAT</makevar> equals <literal>aout</literal>, and - will delete the minor number from long shlib names if - <makevar>PORTOBJFORMAT</makevar> equals - <literal>elf</literal>.</para> - - <para>In cases where you really need to install shlibs with two - versions on an ELF system or those with one version on an a.out - system (for instance, ports that install compatibility libraries for - other operating systems), define the variable - <makevar>NO_FILTER_SHLIBS</makevar>. This will turn off the editing - of <filename>pkg-plist</filename> mentioned in the previous - paragraph.</para> - </sect1> - - <sect1> - <title><literal>ldconfig</literal></title> - - <para>The <literal>ldconfig</literal> line in <filename>Makefile</filename>s should - read:</para> - - <programlisting>${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting> - - <para>In <filename>pkg-plist</filename> it should read;</para> - - <programlisting>@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ... -@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting> - - <para>This is to ensure that the correct <command>ldconfig</command> - will be called depending on the format of the package, not the - default format of the system.</para> - </sect1> - </chapter> - ---> - <chapter id="porting-masterdir"> <title><makevar>MASTERDIR</makevar> (主 port 所在的目录)</title> @@ -7969,9 +7835,33 @@ Reference: <http://www.freebsd.org/ports/portaudit/74a9541d-5d6c-11d8-80e3-00 <entry>600032</entry> </row> <row> + <entry>所有自 RELENG_5 以来没有修改过的共享库的版本递增之后的 + 6.0-STABLE。</entry> + <entry>600033</entry> + </row> + <row> + <entry>为 dev_clone 处理出口函数中增加身份信息参数之后的 + 6.0-STABLE。</entry> + <entry>600034</entry> + </row> + <row> <entry>7.0-CURRENT。</entry> <entry>700000</entry> </row> + <row> + <entry>所有自 RELENG_5 以来没有修改过的共享库的版本递增之后的 + 7.0-CURRENT。</entry> + <entry>700001</entry> + </row> + <row> + <entry>为 dev_clone 处理出口函数中增加身份信息参数之后的 + 7.0-CURRENT。</entry> + <entry>700002</entry> + </row> + <row> + <entry>将 memmem(3) 加入 libc 之后的 7.0-CURRENT。</entry> + <entry>700003</entry> + </row> </tbody> </tgroup> </table> @@ -8285,6 +8175,7 @@ pgsql:*:70:70:PostgreSQL pseudo-user:/usr/local/pgsql:/bin/sh oracle:*:71:71::0:0:Oracle:/usr/local/oracle7:/sbin/nologin ircd:*:72:72:IRC daemon:/nonexistent:/nonexistent ircservices:*:73:73:IRC services:/nonexistent:/nonexistent +simscan:*:74:74:Simscan User:/nonexistent:/sbin/nologin ifmail:*:75:66:Ifmail user:/nonexistent:/nonexistent www:*:80:80:World Wide Web Owner:/nonexistent:/sbin/nologin alias:*:81:81:QMail user:/var/qmail/alias:/nonexistent @@ -8358,6 +8249,7 @@ xten:*:67: dialer:*:68: network:*:69: pgsql:*:70: +simscan:*:74: www:*:80: qnofiles:*:81: qmail:*:82: |