- MFen: 1.868 -> 1.872
Obtained from: The FreeBSD Traditional Chinese Project
This commit is contained in:
parent
669d62eeb8
commit
79cac97c58
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30841
1 changed files with 39 additions and 67 deletions
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD$
|
||||
Original Revision: 1.868
|
||||
Original Revision: 1.872
|
||||
-->
|
||||
|
||||
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
|
||||
|
@ -4972,6 +4972,16 @@ PLIST_SUB+= NLS="@comment "
|
|||
exist or the distfile does not exist in the directory. In such case, using
|
||||
author's id as <makevar>MASTER_SITE_SUBDIR</makevar> is allowed.</para>
|
||||
|
||||
<para>All of the tunable knobs below accept both <literal>YES</literal>
|
||||
and a version string, like <literal>5.8.0+</literal>. Using
|
||||
<literal>YES</literal> means that the port can be used with all
|
||||
of the supported <application>Perl</application> versions. If a port
|
||||
only works with specific versions of <application>Perl</application>,
|
||||
it can be indicated with a version string, specifying a minimal version
|
||||
(e.g. <literal>5.7.3+</literal>), a maximal version (e.g.
|
||||
<literal>5.8.0-</literal>) or an exact version (e.g.
|
||||
<literal>5.8.3</literal>).</para>
|
||||
|
||||
<table frame="none">
|
||||
<title>Variables for ports that use <literal>perl</literal></title>
|
||||
|
||||
|
@ -8764,31 +8774,31 @@ as .putsy.conf and edit it.</programlisting>
|
|||
</sect1>
|
||||
|
||||
<sect1 id="porting-prefix">
|
||||
<title><makevar>PREFIX</makevar> and <makevar>DESTDIR</makevar></title>
|
||||
<title><makevar>PREFIX</makevar> 以及 <makevar>DESTDIR</makevar></title>
|
||||
|
||||
<para><makevar>PREFIX</makevar> determines the location where
|
||||
the port will install. It is usually <filename>/usr/local</filename>,
|
||||
or <filename>/opt</filename>. User can set <makevar>PREFIX</makevar>
|
||||
to anything he wants. Your port must respect this variable.</para>
|
||||
<para><makevar>PREFIX</makevar> 變數會決定該 port 所會安裝的位置,
|
||||
通常是 <filename>/usr/local</filename> 或 <filename>/opt</filename>
|
||||
。 使用者可以藉由設定 <makevar>PREFIX</makevar> 決定要裝在哪邊,
|
||||
而你所維護的 port 必須遵循該規則。</para>
|
||||
|
||||
<para><makevar>DESTDIR</makevar>, if set by user, determines the
|
||||
complete alternative environment, usually a jail, or an installed
|
||||
system mounted elsewhere than <filename>/</filename>.
|
||||
A port will actually install into
|
||||
<makevar>DESTDIR</makevar>/<makevar>PREFIX</makevar>, and register
|
||||
with the package database in <makevar>DESTDIR</makevar>/var/db/pkg.
|
||||
It is very important to write ports that respect
|
||||
<makevar>DESTDIR</makevar>.</para>
|
||||
<para>若使用者有設定 <makevar>DESTDIR</makevar> 變數,
|
||||
那麼它會採用所設定的環境,通常可能是 jail 環境或者是並非掛載於
|
||||
<filename>/</filename> 上的系統。 通常 port 會裝在
|
||||
<makevar>DESTDIR</makevar>/<makevar>PREFIX</makevar> 底下,
|
||||
並且會紀錄在 <makevar>DESTDIR</makevar>/var/db/pkg 內的套件資料庫。
|
||||
由於事實上 <makevar>DESTDIR</makevar> 會由 ports 架構透過
|
||||
&man.chroot.8; 來自動處理,所以您不需去作相關修改或刻意維護
|
||||
<makevar>DESTDIR</makevar> 相容的 ports。</para>
|
||||
|
||||
<para>The value of <makevar>PREFIX</makevar> will be set
|
||||
to <makevar>LOCALBASE_REL</makevar> (default
|
||||
<filename>/usr/local</filename>). If
|
||||
<makevar>USE_X_PREFIX</makevar> or <makevar>USE_IMAKE</makevar> is
|
||||
set, <makevar>PREFIX</makevar> will be <makevar>X11BASE_REL</makevar> (default
|
||||
<filename>/usr/X11R6</filename>). If
|
||||
<makevar>USE_LINUX_PREFIX</makevar> is set, <makevar>PREFIX</makevar>
|
||||
will be <makevar>LINUXBASE_REL</makevar> (default
|
||||
<filename>/compat/linux</filename>).</para>
|
||||
<para><makevar>PREFIX</makevar> 變數若無特別設定,會與
|
||||
<makevar>LOCALBASE</makevar> 相同 (預設為
|
||||
<filename>/usr/local</filename>)。 若有設定
|
||||
<makevar>USE_X_PREFIX</makevar> 或 <makevar>USE_IMAKE</makevar>,
|
||||
那麼 <makevar>PREFIX</makevar> 則為 <makevar>X11BASE</makevar> (
|
||||
為了相容的理由,預設仍為 <filename>/usr/X11R6</filename>,
|
||||
但不久後會徹底移除)。 若有設定 <makevar>USE_LINUX_PREFIX</makevar>,
|
||||
那麼 <makevar>PREFIX</makevar> 則為 <makevar>LINUXBASE</makevar> (
|
||||
預設為 <filename>/compat/linux</filename>)。</para>
|
||||
|
||||
<para>Avoiding the hard-coding of <filename>/usr/local</filename> or
|
||||
<filename>/usr/X11R6</filename> anywhere in the source will make the
|
||||
|
@ -8838,48 +8848,6 @@ as .putsy.conf and edit it.</programlisting>
|
|||
<literal>-DPAGER=\"/usr/local/bin/less\"</literal>. This way it will
|
||||
have a better chance of working if the system administrator has
|
||||
moved the whole <filename>/usr/local</filename> tree somewhere else.</para>
|
||||
|
||||
<para>Note that <makevar>LOCALBASE</makevar>,
|
||||
<makevar>LINUXBASE</makevar>, <makevar>X11BASE</makevar>,
|
||||
<makevar>DOCSDIR</makevar>, <makevar>EXAMPLESDIR</makevar>,
|
||||
<makevar>DATADIR</makevar>, <makevar>DESKTOPDIR</makevar> variables
|
||||
already contain <makevar>DESTDIR</makevar>. Using
|
||||
<makevar>DESTDIR</makevar> <makevar>LOCALBASE</makevar> is
|
||||
wrong. Use <makevar>LOCALBASE_REL</makevar>,
|
||||
<makevar>LINUXBASE_REL</makevar>, <makevar>X11BASE_REL</makevar>
|
||||
if you need a variable relative to <makevar>DESTDIR</makevar>.
|
||||
To keep things terse, <makevar>TARGETDIR</makevar> can be used to
|
||||
replace <makevar>DESTDIR</makevar> <makevar>PREFIX</makevar>.</para>
|
||||
|
||||
<para>Example of correct usage:</para>
|
||||
|
||||
<programlisting>post-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/helper ${TARGETDIR}/bin/helper
|
||||
${INSTALL_DATA} ${WRKSRC}/guide.txt ${DOCSDIR}</programlisting>
|
||||
|
||||
<para>When referencing dependencies in the port, the
|
||||
<makevar>LOCALBASE</makevar> is used, as we are working with
|
||||
dependencies inside the target environment. For hardcoding file
|
||||
paths in the software, <makevar>LOCALBASE_REL</makevar> must
|
||||
be used, because the software will run inside the target
|
||||
environment.</para>
|
||||
|
||||
<para>Example of correct usage:</para>
|
||||
|
||||
<programlisting>RUN_DEPENDS= ${LOCALBASE}/share/gonzo/launch.dat:${PORTSDIR}/games/gonzo
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/usr/gonzo/launch.dat|${LOCALBASE_REL}/share/gonzo/launch.dat}' ${WRKSRC}/main.c
|
||||
@${REINPLACE_CMD} -e 's|/etc/game.conf|${PREFIX}/etc/game.conf|' ${WRKSRC}/loader.c
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA} ${WRKSRC}/example/conf ${TARGETDIR}/etc/game.conf</programlisting>
|
||||
|
||||
<para>In packing lists and in <filename>pkg-*</filename> scripts,
|
||||
<literal>%%LOCALBASE%%</literal>, <literal>%%LINUXBASE%%</literal>
|
||||
and <literal>%%X11BASE%%</literal> expansions will contain paths
|
||||
stripped of <makevar>DESTDIR</makevar>, as all these files are
|
||||
processed of a context of target environment.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="testing-tinderbox">
|
||||
|
@ -11243,10 +11211,14 @@ Reference: <http://www.freebsd.org/ports/portaudit/74a9541d-5d6c-11d8-80e3-00
|
|||
<entry>602110</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>6.2-STABLE after MFC of BOP_BDFLUSH and caused breakage
|
||||
of the filesystem modules KBI.</entry>
|
||||
<entry>6.2-STABLE after MFC of BOP_BDFLUSH and caused
|
||||
breakage of the filesystem modules KBI.</entry>
|
||||
<entry>602111</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>6.2-STABLE after libutil(3) MFC's.</entry>
|
||||
<entry>602112</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.0-CURRENT.</entry>
|
||||
<entry>700000</entry>
|
||||
|
|
Loading…
Reference in a new issue