<emphasis remap=..>...</emphasis> -> <makevar>...</makevar>

This commit is contained in:
Nik Clayton 1998-08-11 08:29:39 +00:00
parent ef411ca3f4
commit e1b4ca8f64
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3322
4 changed files with 224 additions and 354 deletions

View file

@ -315,3 +315,5 @@ for example,
25. <emphasis remap=..>...</emphasis> -> <literal>...</literal> 25. <emphasis remap=..>...</emphasis> -> <literal>...</literal>
26. <emphasis remap=..>...</emphasis> -> <makevar>...</makevar>

View file

@ -26067,8 +26067,7 @@
<para>This section tells you how to do a quick port. In many <para>This section tells you how to do a quick port. In many
cases, it is not enough, but we will see.</para> cases, it is not enough, but we will see.</para>
<para>First, get the original tarball and put it into <emphasis <para>First, get the original tarball and put it into <makevar>&#36;{DISTDIR}</makevar>, which defaults to
remap=tt>&#36;{DISTDIR}</emphasis>, which defaults to
<filename>/usr/ports/distfiles</filename>.</para> <filename>/usr/ports/distfiles</filename>.</para>
<note> <note>
@ -26266,31 +26265,28 @@
<listitem> <listitem>
<para>The fetch target is run. The fetch target is <para>The fetch target is run. The fetch target is
responsible for making sure that the tarball exists responsible for making sure that the tarball exists
locally in <emphasis remap=tt>&#36;{DISTDIR}</emphasis>. locally in <makevar>&#36;{DISTDIR}</makevar>.
If fetch cannot find the required files in <emphasis If fetch cannot find the required files in <makevar>&#36;{DISTDIR}</makevar> it will look up the
remap=tt>&#36;{DISTDIR}</emphasis> it will look up the URL <makevar>&#36;{MASTER_SITES}</makevar>,
URL <emphasis remap=tt>&#36;{MASTER_SITES}</emphasis>,
which is set in the Makefile, as well as our main ftp which is set in the Makefile, as well as our main ftp
site at <ulink site at <ulink
URL="ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/,</ulink> where we put sanctioned distfiles as backup. It will then attempt to fetch the named distribution file with <emphasis remap=tt>&#36;{FETCH}</emphasis>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <emphasis remap=tt>&#36;{DISTDIR}</emphasis> for future use and proceed. URL="ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/,</ulink> where we put sanctioned distfiles as backup. It will then attempt to fetch the named distribution file with <makevar>&#36;{FETCH}</makevar>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <makevar>&#36;{DISTDIR}</makevar> for future use and proceed.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The extract target is run. It looks for your ports' <para>The extract target is run. It looks for your ports'
distribution file in <emphasis distribution file in <makevar>&#36;{DISTDIR}</makevar> (typically a gzip'd
remap=tt>&#36;{DISTDIR}</emphasis> (typically a gzip'd
tarball) and unpacks it into a temporary subdirectory tarball) and unpacks it into a temporary subdirectory
specified by <emphasis remap=tt>&#36;{WRKDIR}</emphasis> specified by <makevar>&#36;{WRKDIR}</makevar>
(defaults to <filename>work</filename>). (defaults to <filename>work</filename>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The patch target is run. First, any patches defined <para>The patch target is run. First, any patches defined
in <emphasis remap=tt>&#36;{PATCHFILES}</emphasis> are in <makevar>&#36;{PATCHFILES}</makevar> are
applied. Second, if any patches are found in <emphasis applied. Second, if any patches are found in <makevar>&#36;{PATCHDIR}</makevar> (defaults to the
remap=tt>&#36;{PATCHDIR}</emphasis> (defaults to the
<filename>patches</filename> subdirectory), they are <filename>patches</filename> subdirectory), they are
applied at this time in alphabetical order. applied at this time in alphabetical order.
</para> </para>
@ -26309,9 +26305,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>If <emphasis <para>If <makevar>&#36;{HAS_CONFIGURE}</makevar> or
remap=tt>&#36;{HAS_CONFIGURE}</emphasis> or <makevar>&#36;{GNU_CONFIGURE}</makevar>
<emphasis remap=tt>&#36;{GNU_CONFIGURE}</emphasis>
is set, is set,
<filename>&#36;{WRKSRC}/configure</filename> is <filename>&#36;{WRKSRC}/configure</filename> is
run. run.
@ -26319,9 +26314,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>If <emphasis <para>If <makevar>&#36;{USE_IMAKE}</makevar> is set,
remap=tt>&#36;{USE_IMAKE}</emphasis> is set, <makevar>&#36;{XMKMF}</makevar>
<emphasis remap=tt>&#36;{XMKMF}</emphasis>
(default: <command>xmkmf (default: <command>xmkmf
-a</command>) is run. -a</command>) is run.
</para> </para>
@ -26335,9 +26329,8 @@
<listitem> <listitem>
<para>The build target is run. This is responsible for <para>The build target is run. This is responsible for
descending into the ports' private working directory descending into the ports' private working directory
(<emphasis remap=tt>&#36;{WRKSRC}</emphasis>) and (<makevar>&#36;{WRKSRC}</makevar>) and
building it. If <emphasis building it. If <makevar>&#36;{USE_GMAKE}</makevar> is set, GNU
remap=tt>&#36;{USE_GMAKE}</emphasis> is set, GNU
<command>make</command> will be used, <command>make</command> will be used,
otherwise the system <command>make</command> otherwise the system <command>make</command>
will be used. will be used.
@ -26399,7 +26392,7 @@
<para>Get the original sources (normally) as a compressed <para>Get the original sources (normally) as a compressed
tarball (<filename>&lt;foo&gt;.tar.gz</filename> or tarball (<filename>&lt;foo&gt;.tar.gz</filename> or
<filename>&lt;foo&gt;.tar.Z</filename>) and copy it into <filename>&lt;foo&gt;.tar.Z</filename>) and copy it into
<emphasis remap=tt>&#36;{DISTDIR}</emphasis>. Always use <makevar>&#36;{DISTDIR}</makevar>. Always use
<emphasis>mainstream</emphasis> sources when and where you <emphasis>mainstream</emphasis> sources when and where you
can.</para> can.</para>
@ -26410,13 +26403,12 @@
<informalexample> <informalexample>
<screen>ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/</screen> <screen>ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/</screen>
</informalexample> as the last resort. Please refer to this </informalexample> as the last resort. Please refer to this
location as <emphasis location as <makevar>&#36;{MASTER_SITE_LOCAL}</makevar>. Send mail to
remap=tt>&#36;{MASTER_SITE_LOCAL}</emphasis>. Send mail to
the &a.ports;if you are not sure what to do.</para> the &a.ports;if you are not sure what to do.</para>
<para>If your port requires some additional `patches' that are <para>If your port requires some additional `patches' that are
available on the Internet, fetch them too and put them in available on the Internet, fetch them too and put them in
<emphasis remap=tt>&#36;{DISTDIR}</emphasis>. Do not worry if <makevar>&#36;{DISTDIR}</makevar>. Do not worry if
they come from site other than where you got the main source they come from site other than where you got the main source
tarball, we have a way to handle these situations (see the tarball, we have a way to handle these situations (see the
description of <xref linkend="porting-patchfiles" description of <xref linkend="porting-patchfiles"
@ -26465,15 +26457,13 @@
<emphasis>alphabetical order</emphasis>, thus <emphasis <emphasis>alphabetical order</emphasis>, thus <emphasis
remap=tt>aa</emphasis> first, <emphasis remap=tt>aa</emphasis> first, <emphasis
remap=tt>ab</emphasis> second and so on. These files remap=tt>ab</emphasis> second and so on. These files
should be stored in <emphasis should be stored in <makevar>&#36;{PATCHDIR}</makevar>, from where they will be
remap=tt>&#36;{PATCHDIR}</emphasis>, from where they will be
automatically applied. All patches should be relative to automatically applied. All patches should be relative to
<emphasis remap=tt>&#36;{WRKSRC}</emphasis> (generally the <makevar>&#36;{WRKSRC}</makevar> (generally the
directory your port's tarball unpacks itself into, that being directory your port's tarball unpacks itself into, that being
where the build is done). To make fixes and upgrades easier where the build is done). To make fixes and upgrades easier
you should avoid having more than one patch fix the same file you should avoid having more than one patch fix the same file
(e.g., patch-aa and patch-ab both changing <emphasis (e.g., patch-aa and patch-ab both changing <makevar>&#36;{WRKSRC}</makevar>/foobar.c).</para>
remap=tt>&#36;{WRKSRC}</emphasis>/foobar.c).</para>
</sect4> </sect4>
@ -26521,15 +26511,9 @@
<sect4> <sect4>
<title>The original source</title> <title>The original source</title>
<para>Does it live in <emphasis <para>Does it live in <makevar>&#36;{DISTDIR}</makevar> as a standard gzip'd
remap=tt>&#36;{DISTDIR}</emphasis> as a standard gzip'd
tarball? If so, you can go on to the next step. If not, you tarball? If so, you can go on to the next step. If not, you
should look at overriding any of the <emphasis should look at overriding any of the <makevar>&#36;{EXTRACT_CMD}</makevar>, <makevar>&#36;{EXTRACT_BEFORE_ARGS}</makevar>, <makevar>&#36;{EXTRACT_AFTER_ARGS}</makevar>, <makevar>&#36;{EXTRACT_SUFX}</makevar>, or <makevar>&#36;{DISTFILES}</makevar> variables, depending on
remap=tt>&#36;{EXTRACT_CMD}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_BEFORE_ARGS}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_AFTER_ARGS}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_SUFX}</emphasis>, or <emphasis
remap=tt>&#36;{DISTFILES}</emphasis> variables, depending on
how alien a format your port's distribution file is. (The how alien a format your port's distribution file is. (The
most common case is <literal>EXTRACT_SUFX=.tar.Z</literal>, most common case is <literal>EXTRACT_SUFX=.tar.Z</literal>,
when the tarball is condensed by regular compress, not when the tarball is condensed by regular compress, not
@ -26545,12 +26529,10 @@
<sect4> <sect4>
<title>DISTNAME</title> <title>DISTNAME</title>
<para>You should set <emphasis <para>You should set <makevar>&#36;{DISTNAME}</makevar> to be the base name of
remap=tt>&#36;{DISTNAME}</emphasis> to be the base name of
your port. The default rules expect the distribution file your port. The default rules expect the distribution file
list (<emphasis remap=tt>&#36;{DISTFILES}</emphasis>) to be list (<makevar>&#36;{DISTFILES}</makevar>) to be
named <emphasis named <makevar>&#36;{DISTNAME}&#36;{EXTRACT_SUFX}</makevar> by
remap=tt>&#36;{DISTNAME}&#36;{EXTRACT_SUFX}</emphasis> by
default which, if it is a normal tarball, is going to be default which, if it is a normal tarball, is going to be
something like: something like:
<informalexample> <informalexample>
@ -26568,14 +26550,12 @@
<para>All this behavior can be overridden, of course, it simply <para>All this behavior can be overridden, of course, it simply
represents the most common time-saving defaults. For a port represents the most common time-saving defaults. For a port
requiring multiple distribution files, simply set <emphasis requiring multiple distribution files, simply set <makevar>&#36;{DISTFILES}</makevar> explicitly. If only a
remap=tt>&#36;{DISTFILES}</emphasis> explicitly. If only a subset of <makevar>&#36;{DISTFILES}</makevar> are
subset of <emphasis remap=tt>&#36;{DISTFILES}</emphasis> are actual extractable archives, then set them up in <makevar>&#36;{EXTRACT_ONLY}</makevar>, which will override
actual extractable archives, then set them up in <emphasis the <makevar>&#36;{DISTFILES}</makevar> list when
remap=tt>&#36;{EXTRACT_ONLY}</emphasis>, which will override
the <emphasis remap=tt>&#36;{DISTFILES}</emphasis> list when
it comes to extraction, and the rest will be just left in it comes to extraction, and the rest will be just left in
<emphasis remap=tt>&#36;{DISTDIR}</emphasis> for later <makevar>&#36;{DISTDIR}</makevar> for later
use.</para> use.</para>
</sect4> </sect4>
@ -26587,8 +26567,7 @@
<filename>/usr/ports/packages/All</filename> and links are <filename>/usr/ports/packages/All</filename> and links are
made from one or more subdirectories of made from one or more subdirectories of
<filename>/usr/ports/packages</filename>. The names of these <filename>/usr/ports/packages</filename>. The names of these
subdirectories are specified by the variable <emphasis subdirectories are specified by the variable <makevar>&#36;{CATEGORIES}</makevar>. It is intended to
remap=tt>&#36;{CATEGORIES}</emphasis>. It is intended to
make life easier for the user when he is wading through the make life easier for the user when he is wading through the
pile of packages on the ftp site or the CD-ROM. Please take a pile of packages on the ftp site or the CD-ROM. Please take a
look at the existing categories (you can find them in <ulink look at the existing categories (you can find them in <ulink
@ -26604,13 +26583,11 @@
<title>MASTER_SITES</title> <title>MASTER_SITES</title>
<para>Record the directory part of the ftp/http-URL pointing at <para>Record the directory part of the ftp/http-URL pointing at
the original tarball in <emphasis the original tarball in <makevar>&#36;{MASTER_SITES}</makevar>. Do not forget the
remap=tt>&#36;{MASTER_SITES}</emphasis>. Do not forget the
trailing slash (<filename>/</filename>)!</para> trailing slash (<filename>/</filename>)!</para>
<para>The make macros will try to use this specification for <para>The make macros will try to use this specification for
grabbing the distribution file with <emphasis grabbing the distribution file with <makevar>&#36;{FETCH}</makevar> if they cannot find it
remap=tt>&#36;{FETCH}</emphasis> if they cannot find it
already on the system.</para> already on the system.</para>
<para>It is recommended that you put multiple sites on this <para>It is recommended that you put multiple sites on this
@ -26644,17 +26621,14 @@
<title>PATCHFILES</title> <title>PATCHFILES</title>
<para>If your port requires some additional patches that are <para>If your port requires some additional patches that are
available by ftp or http, set <emphasis available by ftp or http, set <makevar>&#36;{PATCHFILES}</makevar> to the names of the
remap=tt>&#36;{PATCHFILES}</emphasis> to the names of the files and <makevar>&#36;{PATCH_SITES}</makevar> to
files and <emphasis remap=tt>&#36;{PATCH_SITES}</emphasis> to
the URL of the directory that contains them (the format is the the URL of the directory that contains them (the format is the
same as <emphasis same as <makevar>&#36;{MASTER_SITES}</makevar>).</para>
remap=tt>&#36;{MASTER_SITES}</emphasis>).</para>
<para>If the patch is not relative to the top of the source tree <para>If the patch is not relative to the top of the source tree
(i.e., <emphasis remap=tt>&#36;{WKRSRC}</emphasis>) because it (i.e., <makevar>&#36;{WKRSRC}</makevar>) because it
contains some extra pathnames, set <emphasis contains some extra pathnames, set <makevar>&#36;{PATCH_DIST_STRIP}</makevar> accordingly.
remap=tt>&#36;{PATCH_DIST_STRIP}</emphasis> accordingly.
For instance, if all the pathnames in the patch has an extra For instance, if all the pathnames in the patch has an extra
<filename>foozolix-1.0/</filename> in front of the <filename>foozolix-1.0/</filename> in front of the
filenames, then set filenames, then set
@ -26667,14 +26641,13 @@
<para>If the patch is distributed with some other files, such as <para>If the patch is distributed with some other files, such as
documentation, in a gzip'd tarball, you can't just use documentation, in a gzip'd tarball, you can't just use
<emphasis remap=tt>&#36;{PATCHFILES}</emphasis>. If that is <makevar>&#36;{PATCHFILES}</makevar>. If that is
the case, add the name and the location of the patch tarball the case, add the name and the location of the patch tarball
to <emphasis remap=tt>&#36;{DISTFILES}</emphasis> and to <makevar>&#36;{DISTFILES}</makevar> and
<emphasis remap=tt>&#36;{MASTER_SITES}</emphasis>. Then, from <makevar>&#36;{MASTER_SITES}</makevar>. Then, from
the <emphasis remap=tt>pre-patch</emphasis> target, apply the the <emphasis remap=tt>pre-patch</emphasis> target, apply the
patch either by running the patch command from there, or patch either by running the patch command from there, or
copying the patch file into the <emphasis copying the patch file into the <makevar>&#36;{PATCHDIR}</makevar> directory and calling it
remap=tt>&#36;{PATCHDIR}</emphasis> directory and calling it
<filename>patch-&lt;xx&gt;</filename>.</para> <filename>patch-&lt;xx&gt;</filename>.</para>
<note> <note>
@ -26853,8 +26826,7 @@
<literal>GNU_CONFIGURE=yes</literal>. If you want to give <literal>GNU_CONFIGURE=yes</literal>. If you want to give
some extra arguments to GNU <command>configure</command> (other than the default some extra arguments to GNU <command>configure</command> (other than the default
<literal>--prefix=&#36;{PREFIX}</literal>), set those extra <literal>--prefix=&#36;{PREFIX}</literal>), set those extra
arguments in <emphasis arguments in <makevar>&#36;{CONFIGURE_ARGS}</makevar>.</para>
remap=tt>&#36;{CONFIGURE_ARGS}</emphasis>.</para>
<para>If your package is an X application that creates <para>If your package is an X application that creates
<filename>Makefile</filename>s from <filename>Makefile</filename>s from
@ -26867,10 +26839,8 @@
<para>If your port's source <filename>Makefile</filename> has <para>If your port's source <filename>Makefile</filename> has
something else than <emphasis remap=tt>all</emphasis> as the something else than <emphasis remap=tt>all</emphasis> as the
main build target, set <emphasis main build target, set <makevar>&#36;{ALL_TARGET}</makevar> accordingly. Same
remap=tt>&#36;{ALL_TARGET}</emphasis> accordingly. Same goes for <emphasis remap=tt>install</emphasis> and <makevar>&#36;{INSTALL_TARGET}</makevar>.</para>
goes for <emphasis remap=tt>install</emphasis> and <emphasis
remap=tt>&#36;{INSTALL_TARGET}</emphasis>.</para>
</sect4> </sect4>
@ -26923,22 +26893,21 @@
<listitem> <listitem>
<para>If the port refers to the Motif library as <para>If the port refers to the Motif library as
<option>-lXm</option> in its Makefile or Imakefile, <option>-lXm</option> in its Makefile or Imakefile,
simply substitute <emphasis simply substitute <makevar>&#36;{MOTIFLIB}</makevar> for it.
remap=tt>&#36;{MOTIFLIB}</emphasis> for it.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>If the port uses <literal>XmClientLibs</literal> in its Imakefile, <para>If the port uses <literal>XmClientLibs</literal> in its Imakefile,
change it to <emphasis remap=tt>&#36;{MOTIFLIB} change it to <makevar>&#36;{MOTIFLIB}
&#36;{XTOOLLIB} &#36;{XLIB}</emphasis>.</para> &#36;{XTOOLLIB} &#36;{XLIB}</makevar>.</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</para> </para>
<note> <note>
<para><emphasis remap=tt>&#36;{MOTIFLIB}</emphasis> (usually) <para><makevar>&#36;{MOTIFLIB}</makevar> (usually)
expands to <option>-L/usr/X11R6/lib -lXm</option> or expands to <option>-L/usr/X11R6/lib -lXm</option> or
<filename>/usr/X11R6/lib/libXm.a</filename>, so there is <filename>/usr/X11R6/lib/libXm.a</filename>, so there is
no need to add <option>-L</option> or no need to add <option>-L</option> or
@ -27308,7 +27277,7 @@
<filename>work</filename> subdirectory, <command>make clean</command> will <filename>work</filename> subdirectory, <command>make clean</command> will
<emphasis>nuke</emphasis> it completely! If you need <emphasis>nuke</emphasis> it completely! If you need
auxiliary files that are not scripts or patches, put them in auxiliary files that are not scripts or patches, put them in
the <emphasis remap=tt>&#36;{FILESDIR}</emphasis> subdirectory the <makevar>&#36;{FILESDIR}</makevar> subdirectory
(<filename>files</filename> by default) and use the (<filename>files</filename> by default) and use the
<emphasis remap=tt>post-extract</emphasis> target to copy them <emphasis remap=tt>post-extract</emphasis> target to copy them
to the <filename>work</filename> subdirectory.</para> to the <filename>work</filename> subdirectory.</para>
@ -27326,7 +27295,7 @@
<note> <note>
<para>Note that these files are not used only for packaging <para>Note that these files are not used only for packaging
anymore, and are <emphasis>mandatory</emphasis> now, even if anymore, and are <emphasis>mandatory</emphasis> now, even if
<emphasis remap=tt>&#36;{NO_PACKAGE}</emphasis> is <makevar>&#36;{NO_PACKAGE}</makevar> is
set.</para> set.</para>
</note> </note>
</sect4> </sect4>
@ -27388,22 +27357,22 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_PROGRAM}</emphasis> is <para><makevar>${INSTALL_PROGRAM}</makevar> is
a command to install binary executables.</para> a command to install binary executables.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_SCRIPT}</emphasis> is a <para><makevar>${INSTALL_SCRIPT}</makevar> is a
command to install executable scripts.</para> command to install executable scripts.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_DATA}</emphasis> is a <para><makevar>${INSTALL_DATA}</makevar> is a
command to install sharable data.</para> command to install sharable data.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_MAN}</emphasis> is a <para><makevar>${INSTALL_MAN}</makevar> is a
command to install manpages and other documentation (it command to install manpages and other documentation (it
doesn't compress anything).</para> doesn't compress anything).</para>
</listitem> </listitem>
@ -27466,11 +27435,10 @@
remap=tt>post-install</emphasis> target.</para> remap=tt>post-install</emphasis> target.</para>
<para>Create a new directory for your port. The directory name <para>Create a new directory for your port. The directory name
should reflect what the port is. This usually means <emphasis should reflect what the port is. This usually means <makevar>&#36;{PKGNAME}</makevar> minus the version part.
remap=tt>&#36;{PKGNAME}</emphasis> minus the version part.
However, if you think the user might want different versions However, if you think the user might want different versions
of the port to be installed at the same time, you can use the of the port to be installed at the same time, you can use the
whole <emphasis remap=tt>&#36;{PKGNAME}</emphasis>.</para> whole <makevar>&#36;{PKGNAME}</makevar>.</para>
<para>Make the installation dependent to the variable <para>Make the installation dependent to the variable
<acronym>NOPORTDOCS</acronym> so that users can disable it in <acronym>NOPORTDOCS</acronym> so that users can disable it in
@ -27508,11 +27476,9 @@
<filename>/usr/ports/distfiles</filename>. If your port <filename>/usr/ports/distfiles</filename>. If your port
requires a lot of files to be fetched, or contains a file that requires a lot of files to be fetched, or contains a file that
has a name that might conflict with other ports (e.g., has a name that might conflict with other ports (e.g.,
`Makefile'), set <emphasis `Makefile'), set <makevar>&#36;{DIST_SUBDIR}</makevar> to the name of the
remap=tt>&#36;{DIST_SUBDIR}</emphasis> to the name of the port (<makevar>&#36;{PKGNAME}</makevar> without the
port (<emphasis remap=tt>&#36;{PKGNAME}</emphasis> without the version part should work fine). This will change <makevar>&#36;{DISTDIR}</makevar> from the default
version part should work fine). This will change <emphasis
remap=tt>&#36;{DISTDIR}</emphasis> from the default
<filename>/usr/ports/distfiles</filename> to <filename>/usr/ports/distfiles</filename> to
<filename>/usr/ports/distfiles/&#36;{DIST_SUBDIR}</filename>, <filename>/usr/ports/distfiles/&#36;{DIST_SUBDIR}</filename>,
and in effect puts everything that is required for your port and in effect puts everything that is required for your port
@ -27520,14 +27486,11 @@
<para>It will also look at the subdirectory with the same name <para>It will also look at the subdirectory with the same name
on the backup master site at on the backup master site at
<filename>ftp.freebsd.org</filename>. (Setting <emphasis <filename>ftp.freebsd.org</filename>. (Setting <makevar>&#36;{DISTDIR}</makevar> explicitly in your
remap=tt>&#36;{DISTDIR}</emphasis> explicitly in your Makefile will not accomplish this, so please use <makevar>&#36;{DIST_SUBDIR}</makevar>.)</para>
Makefile will not accomplish this, so please use <emphasis
remap=tt>&#36;{DIST_SUBDIR}</emphasis>.)</para>
<note> <note>
<para>This does not affect the <emphasis <para>This does not affect the <makevar>&#36;{MASTER_SITES}</makevar> you define in your
remap=tt>&#36;{MASTER_SITES}</emphasis> you define in your
Makefile.</para> Makefile.</para>
</note> </note>
</sect4> </sect4>
@ -27575,14 +27538,10 @@
<sect4> <sect4>
<title>PREFIX</title> <title>PREFIX</title>
<para>Do try to make your port install relative to <emphasis <para>Do try to make your port install relative to <makevar>&#36;{PREFIX}</makevar>. (The value of this
remap=tt>&#36;{PREFIX}</emphasis>. (The value of this variable will be set to <makevar>&#36;{LOCALBASE}</makevar> (default
variable will be set to <emphasis <filename>/usr/local</filename>), unless <makevar>&#36;{USE_IMAKE}</makevar> or <makevar>&#36;{USE_X11}</makevar> is set, in which case it
remap=tt>&#36;{LOCALBASE}</emphasis> (default will be <makevar>&#36;{X11BASE}</makevar> (default
<filename>/usr/local</filename>), unless <emphasis
remap=tt>&#36;{USE_IMAKE}</emphasis> or <emphasis
remap=tt>&#36;{USE_X11}</emphasis> is set, in which case it
will be <emphasis remap=tt>&#36;{X11BASE}</emphasis> (default
<filename>/usr/X11R6</filename>).)</para> <filename>/usr/X11R6</filename>).)</para>
<para>Not hard-coding <filename>/usr/local</filename> or <para>Not hard-coding <filename>/usr/local</filename> or
@ -27593,11 +27552,11 @@
replacing the occurrences of <filename>/usr/local</filename> replacing the occurrences of <filename>/usr/local</filename>
(or <filename>/usr/X11R6</filename> for X ports that do not (or <filename>/usr/X11R6</filename> for X ports that do not
use imake) in the various scripts/Makefiles in the port to use imake) in the various scripts/Makefiles in the port to
read <emphasis remap=tt>&#36;{PREFIX}</emphasis>, as this read <makevar>&#36;{PREFIX}</makevar>, as this
variable is automatically passed down to every stage of the variable is automatically passed down to every stage of the
build and install processes.</para> build and install processes.</para>
<para>The variable <emphasis remap=tt>&#36;{PREFIX}</emphasis> <para>The variable <makevar>&#36;{PREFIX}</makevar>
can be reassigned in your Makefile or in the user's can be reassigned in your Makefile or in the user's
environment. However, it is strongly discouraged for environment. However, it is strongly discouraged for
individual ports to set this variable explicitly in the individual ports to set this variable explicitly in the
@ -27617,7 +27576,7 @@
<title>Subdirectories</title> <title>Subdirectories</title>
<para>Try to let the port put things in the right subdirectories <para>Try to let the port put things in the right subdirectories
of <emphasis remap=tt>&#36;{PREFIX}</emphasis>. Some ports of <makevar>&#36;{PREFIX}</makevar>. Some ports
lump everything and put it in the subdirectory with the port's lump everything and put it in the subdirectory with the port's
name, which is incorrect. Also, many ports put everything name, which is incorrect. Also, many ports put everything
except binaries, header files and manual pages in the a except binaries, header files and manual pages in the a
@ -27820,9 +27779,8 @@
</informalexample> </informalexample>
</para> </para>
<para>If your <emphasis remap=tt>&#36;{DISTNAME}</emphasis> <para>If your <makevar>&#36;{DISTNAME}</makevar>
doesn't look like that, set <emphasis doesn't look like that, set <makevar>&#36;{PKGNAME}</makevar> to something in that
remap=tt>&#36;{PKGNAME}</emphasis> to something in that
format.</para> format.</para>
<para> <para>
@ -27872,9 +27830,7 @@
</orderedlist> </orderedlist>
</para> </para>
<para>Here are some (real) examples on how to convert a <emphasis <para>Here are some (real) examples on how to convert a <makevar>&#36;{DISTNAME}</makevar> into a suitable <makevar>&#36;{PKGNAME}</makevar>:</para>
remap=tt>&#36;{DISTNAME}</emphasis> into a suitable <emphasis
remap=tt>&#36;{PKGNAME}</emphasis>:</para>
<para> <para>
<informalexample> <informalexample>

View file

@ -26067,8 +26067,7 @@
<para>This section tells you how to do a quick port. In many <para>This section tells you how to do a quick port. In many
cases, it is not enough, but we will see.</para> cases, it is not enough, but we will see.</para>
<para>First, get the original tarball and put it into <emphasis <para>First, get the original tarball and put it into <makevar>&#36;{DISTDIR}</makevar>, which defaults to
remap=tt>&#36;{DISTDIR}</emphasis>, which defaults to
<filename>/usr/ports/distfiles</filename>.</para> <filename>/usr/ports/distfiles</filename>.</para>
<note> <note>
@ -26266,31 +26265,28 @@
<listitem> <listitem>
<para>The fetch target is run. The fetch target is <para>The fetch target is run. The fetch target is
responsible for making sure that the tarball exists responsible for making sure that the tarball exists
locally in <emphasis remap=tt>&#36;{DISTDIR}</emphasis>. locally in <makevar>&#36;{DISTDIR}</makevar>.
If fetch cannot find the required files in <emphasis If fetch cannot find the required files in <makevar>&#36;{DISTDIR}</makevar> it will look up the
remap=tt>&#36;{DISTDIR}</emphasis> it will look up the URL <makevar>&#36;{MASTER_SITES}</makevar>,
URL <emphasis remap=tt>&#36;{MASTER_SITES}</emphasis>,
which is set in the Makefile, as well as our main ftp which is set in the Makefile, as well as our main ftp
site at <ulink site at <ulink
URL="ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/,</ulink> where we put sanctioned distfiles as backup. It will then attempt to fetch the named distribution file with <emphasis remap=tt>&#36;{FETCH}</emphasis>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <emphasis remap=tt>&#36;{DISTDIR}</emphasis> for future use and proceed. URL="ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/,</ulink> where we put sanctioned distfiles as backup. It will then attempt to fetch the named distribution file with <makevar>&#36;{FETCH}</makevar>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <makevar>&#36;{DISTDIR}</makevar> for future use and proceed.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The extract target is run. It looks for your ports' <para>The extract target is run. It looks for your ports'
distribution file in <emphasis distribution file in <makevar>&#36;{DISTDIR}</makevar> (typically a gzip'd
remap=tt>&#36;{DISTDIR}</emphasis> (typically a gzip'd
tarball) and unpacks it into a temporary subdirectory tarball) and unpacks it into a temporary subdirectory
specified by <emphasis remap=tt>&#36;{WRKDIR}</emphasis> specified by <makevar>&#36;{WRKDIR}</makevar>
(defaults to <filename>work</filename>). (defaults to <filename>work</filename>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The patch target is run. First, any patches defined <para>The patch target is run. First, any patches defined
in <emphasis remap=tt>&#36;{PATCHFILES}</emphasis> are in <makevar>&#36;{PATCHFILES}</makevar> are
applied. Second, if any patches are found in <emphasis applied. Second, if any patches are found in <makevar>&#36;{PATCHDIR}</makevar> (defaults to the
remap=tt>&#36;{PATCHDIR}</emphasis> (defaults to the
<filename>patches</filename> subdirectory), they are <filename>patches</filename> subdirectory), they are
applied at this time in alphabetical order. applied at this time in alphabetical order.
</para> </para>
@ -26309,9 +26305,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>If <emphasis <para>If <makevar>&#36;{HAS_CONFIGURE}</makevar> or
remap=tt>&#36;{HAS_CONFIGURE}</emphasis> or <makevar>&#36;{GNU_CONFIGURE}</makevar>
<emphasis remap=tt>&#36;{GNU_CONFIGURE}</emphasis>
is set, is set,
<filename>&#36;{WRKSRC}/configure</filename> is <filename>&#36;{WRKSRC}/configure</filename> is
run. run.
@ -26319,9 +26314,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>If <emphasis <para>If <makevar>&#36;{USE_IMAKE}</makevar> is set,
remap=tt>&#36;{USE_IMAKE}</emphasis> is set, <makevar>&#36;{XMKMF}</makevar>
<emphasis remap=tt>&#36;{XMKMF}</emphasis>
(default: <command>xmkmf (default: <command>xmkmf
-a</command>) is run. -a</command>) is run.
</para> </para>
@ -26335,9 +26329,8 @@
<listitem> <listitem>
<para>The build target is run. This is responsible for <para>The build target is run. This is responsible for
descending into the ports' private working directory descending into the ports' private working directory
(<emphasis remap=tt>&#36;{WRKSRC}</emphasis>) and (<makevar>&#36;{WRKSRC}</makevar>) and
building it. If <emphasis building it. If <makevar>&#36;{USE_GMAKE}</makevar> is set, GNU
remap=tt>&#36;{USE_GMAKE}</emphasis> is set, GNU
<command>make</command> will be used, <command>make</command> will be used,
otherwise the system <command>make</command> otherwise the system <command>make</command>
will be used. will be used.
@ -26399,7 +26392,7 @@
<para>Get the original sources (normally) as a compressed <para>Get the original sources (normally) as a compressed
tarball (<filename>&lt;foo&gt;.tar.gz</filename> or tarball (<filename>&lt;foo&gt;.tar.gz</filename> or
<filename>&lt;foo&gt;.tar.Z</filename>) and copy it into <filename>&lt;foo&gt;.tar.Z</filename>) and copy it into
<emphasis remap=tt>&#36;{DISTDIR}</emphasis>. Always use <makevar>&#36;{DISTDIR}</makevar>. Always use
<emphasis>mainstream</emphasis> sources when and where you <emphasis>mainstream</emphasis> sources when and where you
can.</para> can.</para>
@ -26410,13 +26403,12 @@
<informalexample> <informalexample>
<screen>ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/</screen> <screen>ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/</screen>
</informalexample> as the last resort. Please refer to this </informalexample> as the last resort. Please refer to this
location as <emphasis location as <makevar>&#36;{MASTER_SITE_LOCAL}</makevar>. Send mail to
remap=tt>&#36;{MASTER_SITE_LOCAL}</emphasis>. Send mail to
the &a.ports;if you are not sure what to do.</para> the &a.ports;if you are not sure what to do.</para>
<para>If your port requires some additional `patches' that are <para>If your port requires some additional `patches' that are
available on the Internet, fetch them too and put them in available on the Internet, fetch them too and put them in
<emphasis remap=tt>&#36;{DISTDIR}</emphasis>. Do not worry if <makevar>&#36;{DISTDIR}</makevar>. Do not worry if
they come from site other than where you got the main source they come from site other than where you got the main source
tarball, we have a way to handle these situations (see the tarball, we have a way to handle these situations (see the
description of <xref linkend="porting-patchfiles" description of <xref linkend="porting-patchfiles"
@ -26465,15 +26457,13 @@
<emphasis>alphabetical order</emphasis>, thus <emphasis <emphasis>alphabetical order</emphasis>, thus <emphasis
remap=tt>aa</emphasis> first, <emphasis remap=tt>aa</emphasis> first, <emphasis
remap=tt>ab</emphasis> second and so on. These files remap=tt>ab</emphasis> second and so on. These files
should be stored in <emphasis should be stored in <makevar>&#36;{PATCHDIR}</makevar>, from where they will be
remap=tt>&#36;{PATCHDIR}</emphasis>, from where they will be
automatically applied. All patches should be relative to automatically applied. All patches should be relative to
<emphasis remap=tt>&#36;{WRKSRC}</emphasis> (generally the <makevar>&#36;{WRKSRC}</makevar> (generally the
directory your port's tarball unpacks itself into, that being directory your port's tarball unpacks itself into, that being
where the build is done). To make fixes and upgrades easier where the build is done). To make fixes and upgrades easier
you should avoid having more than one patch fix the same file you should avoid having more than one patch fix the same file
(e.g., patch-aa and patch-ab both changing <emphasis (e.g., patch-aa and patch-ab both changing <makevar>&#36;{WRKSRC}</makevar>/foobar.c).</para>
remap=tt>&#36;{WRKSRC}</emphasis>/foobar.c).</para>
</sect4> </sect4>
@ -26521,15 +26511,9 @@
<sect4> <sect4>
<title>The original source</title> <title>The original source</title>
<para>Does it live in <emphasis <para>Does it live in <makevar>&#36;{DISTDIR}</makevar> as a standard gzip'd
remap=tt>&#36;{DISTDIR}</emphasis> as a standard gzip'd
tarball? If so, you can go on to the next step. If not, you tarball? If so, you can go on to the next step. If not, you
should look at overriding any of the <emphasis should look at overriding any of the <makevar>&#36;{EXTRACT_CMD}</makevar>, <makevar>&#36;{EXTRACT_BEFORE_ARGS}</makevar>, <makevar>&#36;{EXTRACT_AFTER_ARGS}</makevar>, <makevar>&#36;{EXTRACT_SUFX}</makevar>, or <makevar>&#36;{DISTFILES}</makevar> variables, depending on
remap=tt>&#36;{EXTRACT_CMD}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_BEFORE_ARGS}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_AFTER_ARGS}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_SUFX}</emphasis>, or <emphasis
remap=tt>&#36;{DISTFILES}</emphasis> variables, depending on
how alien a format your port's distribution file is. (The how alien a format your port's distribution file is. (The
most common case is <literal>EXTRACT_SUFX=.tar.Z</literal>, most common case is <literal>EXTRACT_SUFX=.tar.Z</literal>,
when the tarball is condensed by regular compress, not when the tarball is condensed by regular compress, not
@ -26545,12 +26529,10 @@
<sect4> <sect4>
<title>DISTNAME</title> <title>DISTNAME</title>
<para>You should set <emphasis <para>You should set <makevar>&#36;{DISTNAME}</makevar> to be the base name of
remap=tt>&#36;{DISTNAME}</emphasis> to be the base name of
your port. The default rules expect the distribution file your port. The default rules expect the distribution file
list (<emphasis remap=tt>&#36;{DISTFILES}</emphasis>) to be list (<makevar>&#36;{DISTFILES}</makevar>) to be
named <emphasis named <makevar>&#36;{DISTNAME}&#36;{EXTRACT_SUFX}</makevar> by
remap=tt>&#36;{DISTNAME}&#36;{EXTRACT_SUFX}</emphasis> by
default which, if it is a normal tarball, is going to be default which, if it is a normal tarball, is going to be
something like: something like:
<informalexample> <informalexample>
@ -26568,14 +26550,12 @@
<para>All this behavior can be overridden, of course, it simply <para>All this behavior can be overridden, of course, it simply
represents the most common time-saving defaults. For a port represents the most common time-saving defaults. For a port
requiring multiple distribution files, simply set <emphasis requiring multiple distribution files, simply set <makevar>&#36;{DISTFILES}</makevar> explicitly. If only a
remap=tt>&#36;{DISTFILES}</emphasis> explicitly. If only a subset of <makevar>&#36;{DISTFILES}</makevar> are
subset of <emphasis remap=tt>&#36;{DISTFILES}</emphasis> are actual extractable archives, then set them up in <makevar>&#36;{EXTRACT_ONLY}</makevar>, which will override
actual extractable archives, then set them up in <emphasis the <makevar>&#36;{DISTFILES}</makevar> list when
remap=tt>&#36;{EXTRACT_ONLY}</emphasis>, which will override
the <emphasis remap=tt>&#36;{DISTFILES}</emphasis> list when
it comes to extraction, and the rest will be just left in it comes to extraction, and the rest will be just left in
<emphasis remap=tt>&#36;{DISTDIR}</emphasis> for later <makevar>&#36;{DISTDIR}</makevar> for later
use.</para> use.</para>
</sect4> </sect4>
@ -26587,8 +26567,7 @@
<filename>/usr/ports/packages/All</filename> and links are <filename>/usr/ports/packages/All</filename> and links are
made from one or more subdirectories of made from one or more subdirectories of
<filename>/usr/ports/packages</filename>. The names of these <filename>/usr/ports/packages</filename>. The names of these
subdirectories are specified by the variable <emphasis subdirectories are specified by the variable <makevar>&#36;{CATEGORIES}</makevar>. It is intended to
remap=tt>&#36;{CATEGORIES}</emphasis>. It is intended to
make life easier for the user when he is wading through the make life easier for the user when he is wading through the
pile of packages on the ftp site or the CD-ROM. Please take a pile of packages on the ftp site or the CD-ROM. Please take a
look at the existing categories (you can find them in <ulink look at the existing categories (you can find them in <ulink
@ -26604,13 +26583,11 @@
<title>MASTER_SITES</title> <title>MASTER_SITES</title>
<para>Record the directory part of the ftp/http-URL pointing at <para>Record the directory part of the ftp/http-URL pointing at
the original tarball in <emphasis the original tarball in <makevar>&#36;{MASTER_SITES}</makevar>. Do not forget the
remap=tt>&#36;{MASTER_SITES}</emphasis>. Do not forget the
trailing slash (<filename>/</filename>)!</para> trailing slash (<filename>/</filename>)!</para>
<para>The make macros will try to use this specification for <para>The make macros will try to use this specification for
grabbing the distribution file with <emphasis grabbing the distribution file with <makevar>&#36;{FETCH}</makevar> if they cannot find it
remap=tt>&#36;{FETCH}</emphasis> if they cannot find it
already on the system.</para> already on the system.</para>
<para>It is recommended that you put multiple sites on this <para>It is recommended that you put multiple sites on this
@ -26644,17 +26621,14 @@
<title>PATCHFILES</title> <title>PATCHFILES</title>
<para>If your port requires some additional patches that are <para>If your port requires some additional patches that are
available by ftp or http, set <emphasis available by ftp or http, set <makevar>&#36;{PATCHFILES}</makevar> to the names of the
remap=tt>&#36;{PATCHFILES}</emphasis> to the names of the files and <makevar>&#36;{PATCH_SITES}</makevar> to
files and <emphasis remap=tt>&#36;{PATCH_SITES}</emphasis> to
the URL of the directory that contains them (the format is the the URL of the directory that contains them (the format is the
same as <emphasis same as <makevar>&#36;{MASTER_SITES}</makevar>).</para>
remap=tt>&#36;{MASTER_SITES}</emphasis>).</para>
<para>If the patch is not relative to the top of the source tree <para>If the patch is not relative to the top of the source tree
(i.e., <emphasis remap=tt>&#36;{WKRSRC}</emphasis>) because it (i.e., <makevar>&#36;{WKRSRC}</makevar>) because it
contains some extra pathnames, set <emphasis contains some extra pathnames, set <makevar>&#36;{PATCH_DIST_STRIP}</makevar> accordingly.
remap=tt>&#36;{PATCH_DIST_STRIP}</emphasis> accordingly.
For instance, if all the pathnames in the patch has an extra For instance, if all the pathnames in the patch has an extra
<filename>foozolix-1.0/</filename> in front of the <filename>foozolix-1.0/</filename> in front of the
filenames, then set filenames, then set
@ -26667,14 +26641,13 @@
<para>If the patch is distributed with some other files, such as <para>If the patch is distributed with some other files, such as
documentation, in a gzip'd tarball, you can't just use documentation, in a gzip'd tarball, you can't just use
<emphasis remap=tt>&#36;{PATCHFILES}</emphasis>. If that is <makevar>&#36;{PATCHFILES}</makevar>. If that is
the case, add the name and the location of the patch tarball the case, add the name and the location of the patch tarball
to <emphasis remap=tt>&#36;{DISTFILES}</emphasis> and to <makevar>&#36;{DISTFILES}</makevar> and
<emphasis remap=tt>&#36;{MASTER_SITES}</emphasis>. Then, from <makevar>&#36;{MASTER_SITES}</makevar>. Then, from
the <emphasis remap=tt>pre-patch</emphasis> target, apply the the <emphasis remap=tt>pre-patch</emphasis> target, apply the
patch either by running the patch command from there, or patch either by running the patch command from there, or
copying the patch file into the <emphasis copying the patch file into the <makevar>&#36;{PATCHDIR}</makevar> directory and calling it
remap=tt>&#36;{PATCHDIR}</emphasis> directory and calling it
<filename>patch-&lt;xx&gt;</filename>.</para> <filename>patch-&lt;xx&gt;</filename>.</para>
<note> <note>
@ -26853,8 +26826,7 @@
<literal>GNU_CONFIGURE=yes</literal>. If you want to give <literal>GNU_CONFIGURE=yes</literal>. If you want to give
some extra arguments to GNU <command>configure</command> (other than the default some extra arguments to GNU <command>configure</command> (other than the default
<literal>--prefix=&#36;{PREFIX}</literal>), set those extra <literal>--prefix=&#36;{PREFIX}</literal>), set those extra
arguments in <emphasis arguments in <makevar>&#36;{CONFIGURE_ARGS}</makevar>.</para>
remap=tt>&#36;{CONFIGURE_ARGS}</emphasis>.</para>
<para>If your package is an X application that creates <para>If your package is an X application that creates
<filename>Makefile</filename>s from <filename>Makefile</filename>s from
@ -26867,10 +26839,8 @@
<para>If your port's source <filename>Makefile</filename> has <para>If your port's source <filename>Makefile</filename> has
something else than <emphasis remap=tt>all</emphasis> as the something else than <emphasis remap=tt>all</emphasis> as the
main build target, set <emphasis main build target, set <makevar>&#36;{ALL_TARGET}</makevar> accordingly. Same
remap=tt>&#36;{ALL_TARGET}</emphasis> accordingly. Same goes for <emphasis remap=tt>install</emphasis> and <makevar>&#36;{INSTALL_TARGET}</makevar>.</para>
goes for <emphasis remap=tt>install</emphasis> and <emphasis
remap=tt>&#36;{INSTALL_TARGET}</emphasis>.</para>
</sect4> </sect4>
@ -26923,22 +26893,21 @@
<listitem> <listitem>
<para>If the port refers to the Motif library as <para>If the port refers to the Motif library as
<option>-lXm</option> in its Makefile or Imakefile, <option>-lXm</option> in its Makefile or Imakefile,
simply substitute <emphasis simply substitute <makevar>&#36;{MOTIFLIB}</makevar> for it.
remap=tt>&#36;{MOTIFLIB}</emphasis> for it.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>If the port uses <literal>XmClientLibs</literal> in its Imakefile, <para>If the port uses <literal>XmClientLibs</literal> in its Imakefile,
change it to <emphasis remap=tt>&#36;{MOTIFLIB} change it to <makevar>&#36;{MOTIFLIB}
&#36;{XTOOLLIB} &#36;{XLIB}</emphasis>.</para> &#36;{XTOOLLIB} &#36;{XLIB}</makevar>.</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</para> </para>
<note> <note>
<para><emphasis remap=tt>&#36;{MOTIFLIB}</emphasis> (usually) <para><makevar>&#36;{MOTIFLIB}</makevar> (usually)
expands to <option>-L/usr/X11R6/lib -lXm</option> or expands to <option>-L/usr/X11R6/lib -lXm</option> or
<filename>/usr/X11R6/lib/libXm.a</filename>, so there is <filename>/usr/X11R6/lib/libXm.a</filename>, so there is
no need to add <option>-L</option> or no need to add <option>-L</option> or
@ -27308,7 +27277,7 @@
<filename>work</filename> subdirectory, <command>make clean</command> will <filename>work</filename> subdirectory, <command>make clean</command> will
<emphasis>nuke</emphasis> it completely! If you need <emphasis>nuke</emphasis> it completely! If you need
auxiliary files that are not scripts or patches, put them in auxiliary files that are not scripts or patches, put them in
the <emphasis remap=tt>&#36;{FILESDIR}</emphasis> subdirectory the <makevar>&#36;{FILESDIR}</makevar> subdirectory
(<filename>files</filename> by default) and use the (<filename>files</filename> by default) and use the
<emphasis remap=tt>post-extract</emphasis> target to copy them <emphasis remap=tt>post-extract</emphasis> target to copy them
to the <filename>work</filename> subdirectory.</para> to the <filename>work</filename> subdirectory.</para>
@ -27326,7 +27295,7 @@
<note> <note>
<para>Note that these files are not used only for packaging <para>Note that these files are not used only for packaging
anymore, and are <emphasis>mandatory</emphasis> now, even if anymore, and are <emphasis>mandatory</emphasis> now, even if
<emphasis remap=tt>&#36;{NO_PACKAGE}</emphasis> is <makevar>&#36;{NO_PACKAGE}</makevar> is
set.</para> set.</para>
</note> </note>
</sect4> </sect4>
@ -27388,22 +27357,22 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_PROGRAM}</emphasis> is <para><makevar>${INSTALL_PROGRAM}</makevar> is
a command to install binary executables.</para> a command to install binary executables.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_SCRIPT}</emphasis> is a <para><makevar>${INSTALL_SCRIPT}</makevar> is a
command to install executable scripts.</para> command to install executable scripts.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_DATA}</emphasis> is a <para><makevar>${INSTALL_DATA}</makevar> is a
command to install sharable data.</para> command to install sharable data.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_MAN}</emphasis> is a <para><makevar>${INSTALL_MAN}</makevar> is a
command to install manpages and other documentation (it command to install manpages and other documentation (it
doesn't compress anything).</para> doesn't compress anything).</para>
</listitem> </listitem>
@ -27466,11 +27435,10 @@
remap=tt>post-install</emphasis> target.</para> remap=tt>post-install</emphasis> target.</para>
<para>Create a new directory for your port. The directory name <para>Create a new directory for your port. The directory name
should reflect what the port is. This usually means <emphasis should reflect what the port is. This usually means <makevar>&#36;{PKGNAME}</makevar> minus the version part.
remap=tt>&#36;{PKGNAME}</emphasis> minus the version part.
However, if you think the user might want different versions However, if you think the user might want different versions
of the port to be installed at the same time, you can use the of the port to be installed at the same time, you can use the
whole <emphasis remap=tt>&#36;{PKGNAME}</emphasis>.</para> whole <makevar>&#36;{PKGNAME}</makevar>.</para>
<para>Make the installation dependent to the variable <para>Make the installation dependent to the variable
<acronym>NOPORTDOCS</acronym> so that users can disable it in <acronym>NOPORTDOCS</acronym> so that users can disable it in
@ -27508,11 +27476,9 @@
<filename>/usr/ports/distfiles</filename>. If your port <filename>/usr/ports/distfiles</filename>. If your port
requires a lot of files to be fetched, or contains a file that requires a lot of files to be fetched, or contains a file that
has a name that might conflict with other ports (e.g., has a name that might conflict with other ports (e.g.,
`Makefile'), set <emphasis `Makefile'), set <makevar>&#36;{DIST_SUBDIR}</makevar> to the name of the
remap=tt>&#36;{DIST_SUBDIR}</emphasis> to the name of the port (<makevar>&#36;{PKGNAME}</makevar> without the
port (<emphasis remap=tt>&#36;{PKGNAME}</emphasis> without the version part should work fine). This will change <makevar>&#36;{DISTDIR}</makevar> from the default
version part should work fine). This will change <emphasis
remap=tt>&#36;{DISTDIR}</emphasis> from the default
<filename>/usr/ports/distfiles</filename> to <filename>/usr/ports/distfiles</filename> to
<filename>/usr/ports/distfiles/&#36;{DIST_SUBDIR}</filename>, <filename>/usr/ports/distfiles/&#36;{DIST_SUBDIR}</filename>,
and in effect puts everything that is required for your port and in effect puts everything that is required for your port
@ -27520,14 +27486,11 @@
<para>It will also look at the subdirectory with the same name <para>It will also look at the subdirectory with the same name
on the backup master site at on the backup master site at
<filename>ftp.freebsd.org</filename>. (Setting <emphasis <filename>ftp.freebsd.org</filename>. (Setting <makevar>&#36;{DISTDIR}</makevar> explicitly in your
remap=tt>&#36;{DISTDIR}</emphasis> explicitly in your Makefile will not accomplish this, so please use <makevar>&#36;{DIST_SUBDIR}</makevar>.)</para>
Makefile will not accomplish this, so please use <emphasis
remap=tt>&#36;{DIST_SUBDIR}</emphasis>.)</para>
<note> <note>
<para>This does not affect the <emphasis <para>This does not affect the <makevar>&#36;{MASTER_SITES}</makevar> you define in your
remap=tt>&#36;{MASTER_SITES}</emphasis> you define in your
Makefile.</para> Makefile.</para>
</note> </note>
</sect4> </sect4>
@ -27575,14 +27538,10 @@
<sect4> <sect4>
<title>PREFIX</title> <title>PREFIX</title>
<para>Do try to make your port install relative to <emphasis <para>Do try to make your port install relative to <makevar>&#36;{PREFIX}</makevar>. (The value of this
remap=tt>&#36;{PREFIX}</emphasis>. (The value of this variable will be set to <makevar>&#36;{LOCALBASE}</makevar> (default
variable will be set to <emphasis <filename>/usr/local</filename>), unless <makevar>&#36;{USE_IMAKE}</makevar> or <makevar>&#36;{USE_X11}</makevar> is set, in which case it
remap=tt>&#36;{LOCALBASE}</emphasis> (default will be <makevar>&#36;{X11BASE}</makevar> (default
<filename>/usr/local</filename>), unless <emphasis
remap=tt>&#36;{USE_IMAKE}</emphasis> or <emphasis
remap=tt>&#36;{USE_X11}</emphasis> is set, in which case it
will be <emphasis remap=tt>&#36;{X11BASE}</emphasis> (default
<filename>/usr/X11R6</filename>).)</para> <filename>/usr/X11R6</filename>).)</para>
<para>Not hard-coding <filename>/usr/local</filename> or <para>Not hard-coding <filename>/usr/local</filename> or
@ -27593,11 +27552,11 @@
replacing the occurrences of <filename>/usr/local</filename> replacing the occurrences of <filename>/usr/local</filename>
(or <filename>/usr/X11R6</filename> for X ports that do not (or <filename>/usr/X11R6</filename> for X ports that do not
use imake) in the various scripts/Makefiles in the port to use imake) in the various scripts/Makefiles in the port to
read <emphasis remap=tt>&#36;{PREFIX}</emphasis>, as this read <makevar>&#36;{PREFIX}</makevar>, as this
variable is automatically passed down to every stage of the variable is automatically passed down to every stage of the
build and install processes.</para> build and install processes.</para>
<para>The variable <emphasis remap=tt>&#36;{PREFIX}</emphasis> <para>The variable <makevar>&#36;{PREFIX}</makevar>
can be reassigned in your Makefile or in the user's can be reassigned in your Makefile or in the user's
environment. However, it is strongly discouraged for environment. However, it is strongly discouraged for
individual ports to set this variable explicitly in the individual ports to set this variable explicitly in the
@ -27617,7 +27576,7 @@
<title>Subdirectories</title> <title>Subdirectories</title>
<para>Try to let the port put things in the right subdirectories <para>Try to let the port put things in the right subdirectories
of <emphasis remap=tt>&#36;{PREFIX}</emphasis>. Some ports of <makevar>&#36;{PREFIX}</makevar>. Some ports
lump everything and put it in the subdirectory with the port's lump everything and put it in the subdirectory with the port's
name, which is incorrect. Also, many ports put everything name, which is incorrect. Also, many ports put everything
except binaries, header files and manual pages in the a except binaries, header files and manual pages in the a
@ -27820,9 +27779,8 @@
</informalexample> </informalexample>
</para> </para>
<para>If your <emphasis remap=tt>&#36;{DISTNAME}</emphasis> <para>If your <makevar>&#36;{DISTNAME}</makevar>
doesn't look like that, set <emphasis doesn't look like that, set <makevar>&#36;{PKGNAME}</makevar> to something in that
remap=tt>&#36;{PKGNAME}</emphasis> to something in that
format.</para> format.</para>
<para> <para>
@ -27872,9 +27830,7 @@
</orderedlist> </orderedlist>
</para> </para>
<para>Here are some (real) examples on how to convert a <emphasis <para>Here are some (real) examples on how to convert a <makevar>&#36;{DISTNAME}</makevar> into a suitable <makevar>&#36;{PKGNAME}</makevar>:</para>
remap=tt>&#36;{DISTNAME}</emphasis> into a suitable <emphasis
remap=tt>&#36;{PKGNAME}</emphasis>:</para>
<para> <para>
<informalexample> <informalexample>

View file

@ -26067,8 +26067,7 @@
<para>This section tells you how to do a quick port. In many <para>This section tells you how to do a quick port. In many
cases, it is not enough, but we will see.</para> cases, it is not enough, but we will see.</para>
<para>First, get the original tarball and put it into <emphasis <para>First, get the original tarball and put it into <makevar>&#36;{DISTDIR}</makevar>, which defaults to
remap=tt>&#36;{DISTDIR}</emphasis>, which defaults to
<filename>/usr/ports/distfiles</filename>.</para> <filename>/usr/ports/distfiles</filename>.</para>
<note> <note>
@ -26266,31 +26265,28 @@
<listitem> <listitem>
<para>The fetch target is run. The fetch target is <para>The fetch target is run. The fetch target is
responsible for making sure that the tarball exists responsible for making sure that the tarball exists
locally in <emphasis remap=tt>&#36;{DISTDIR}</emphasis>. locally in <makevar>&#36;{DISTDIR}</makevar>.
If fetch cannot find the required files in <emphasis If fetch cannot find the required files in <makevar>&#36;{DISTDIR}</makevar> it will look up the
remap=tt>&#36;{DISTDIR}</emphasis> it will look up the URL <makevar>&#36;{MASTER_SITES}</makevar>,
URL <emphasis remap=tt>&#36;{MASTER_SITES}</emphasis>,
which is set in the Makefile, as well as our main ftp which is set in the Makefile, as well as our main ftp
site at <ulink site at <ulink
URL="ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/,</ulink> where we put sanctioned distfiles as backup. It will then attempt to fetch the named distribution file with <emphasis remap=tt>&#36;{FETCH}</emphasis>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <emphasis remap=tt>&#36;{DISTDIR}</emphasis> for future use and proceed. URL="ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/,</ulink> where we put sanctioned distfiles as backup. It will then attempt to fetch the named distribution file with <makevar>&#36;{FETCH}</makevar>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <makevar>&#36;{DISTDIR}</makevar> for future use and proceed.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The extract target is run. It looks for your ports' <para>The extract target is run. It looks for your ports'
distribution file in <emphasis distribution file in <makevar>&#36;{DISTDIR}</makevar> (typically a gzip'd
remap=tt>&#36;{DISTDIR}</emphasis> (typically a gzip'd
tarball) and unpacks it into a temporary subdirectory tarball) and unpacks it into a temporary subdirectory
specified by <emphasis remap=tt>&#36;{WRKDIR}</emphasis> specified by <makevar>&#36;{WRKDIR}</makevar>
(defaults to <filename>work</filename>). (defaults to <filename>work</filename>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The patch target is run. First, any patches defined <para>The patch target is run. First, any patches defined
in <emphasis remap=tt>&#36;{PATCHFILES}</emphasis> are in <makevar>&#36;{PATCHFILES}</makevar> are
applied. Second, if any patches are found in <emphasis applied. Second, if any patches are found in <makevar>&#36;{PATCHDIR}</makevar> (defaults to the
remap=tt>&#36;{PATCHDIR}</emphasis> (defaults to the
<filename>patches</filename> subdirectory), they are <filename>patches</filename> subdirectory), they are
applied at this time in alphabetical order. applied at this time in alphabetical order.
</para> </para>
@ -26309,9 +26305,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>If <emphasis <para>If <makevar>&#36;{HAS_CONFIGURE}</makevar> or
remap=tt>&#36;{HAS_CONFIGURE}</emphasis> or <makevar>&#36;{GNU_CONFIGURE}</makevar>
<emphasis remap=tt>&#36;{GNU_CONFIGURE}</emphasis>
is set, is set,
<filename>&#36;{WRKSRC}/configure</filename> is <filename>&#36;{WRKSRC}/configure</filename> is
run. run.
@ -26319,9 +26314,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>If <emphasis <para>If <makevar>&#36;{USE_IMAKE}</makevar> is set,
remap=tt>&#36;{USE_IMAKE}</emphasis> is set, <makevar>&#36;{XMKMF}</makevar>
<emphasis remap=tt>&#36;{XMKMF}</emphasis>
(default: <command>xmkmf (default: <command>xmkmf
-a</command>) is run. -a</command>) is run.
</para> </para>
@ -26335,9 +26329,8 @@
<listitem> <listitem>
<para>The build target is run. This is responsible for <para>The build target is run. This is responsible for
descending into the ports' private working directory descending into the ports' private working directory
(<emphasis remap=tt>&#36;{WRKSRC}</emphasis>) and (<makevar>&#36;{WRKSRC}</makevar>) and
building it. If <emphasis building it. If <makevar>&#36;{USE_GMAKE}</makevar> is set, GNU
remap=tt>&#36;{USE_GMAKE}</emphasis> is set, GNU
<command>make</command> will be used, <command>make</command> will be used,
otherwise the system <command>make</command> otherwise the system <command>make</command>
will be used. will be used.
@ -26399,7 +26392,7 @@
<para>Get the original sources (normally) as a compressed <para>Get the original sources (normally) as a compressed
tarball (<filename>&lt;foo&gt;.tar.gz</filename> or tarball (<filename>&lt;foo&gt;.tar.gz</filename> or
<filename>&lt;foo&gt;.tar.Z</filename>) and copy it into <filename>&lt;foo&gt;.tar.Z</filename>) and copy it into
<emphasis remap=tt>&#36;{DISTDIR}</emphasis>. Always use <makevar>&#36;{DISTDIR}</makevar>. Always use
<emphasis>mainstream</emphasis> sources when and where you <emphasis>mainstream</emphasis> sources when and where you
can.</para> can.</para>
@ -26410,13 +26403,12 @@
<informalexample> <informalexample>
<screen>ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/</screen> <screen>ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/</screen>
</informalexample> as the last resort. Please refer to this </informalexample> as the last resort. Please refer to this
location as <emphasis location as <makevar>&#36;{MASTER_SITE_LOCAL}</makevar>. Send mail to
remap=tt>&#36;{MASTER_SITE_LOCAL}</emphasis>. Send mail to
the &a.ports;if you are not sure what to do.</para> the &a.ports;if you are not sure what to do.</para>
<para>If your port requires some additional `patches' that are <para>If your port requires some additional `patches' that are
available on the Internet, fetch them too and put them in available on the Internet, fetch them too and put them in
<emphasis remap=tt>&#36;{DISTDIR}</emphasis>. Do not worry if <makevar>&#36;{DISTDIR}</makevar>. Do not worry if
they come from site other than where you got the main source they come from site other than where you got the main source
tarball, we have a way to handle these situations (see the tarball, we have a way to handle these situations (see the
description of <xref linkend="porting-patchfiles" description of <xref linkend="porting-patchfiles"
@ -26465,15 +26457,13 @@
<emphasis>alphabetical order</emphasis>, thus <emphasis <emphasis>alphabetical order</emphasis>, thus <emphasis
remap=tt>aa</emphasis> first, <emphasis remap=tt>aa</emphasis> first, <emphasis
remap=tt>ab</emphasis> second and so on. These files remap=tt>ab</emphasis> second and so on. These files
should be stored in <emphasis should be stored in <makevar>&#36;{PATCHDIR}</makevar>, from where they will be
remap=tt>&#36;{PATCHDIR}</emphasis>, from where they will be
automatically applied. All patches should be relative to automatically applied. All patches should be relative to
<emphasis remap=tt>&#36;{WRKSRC}</emphasis> (generally the <makevar>&#36;{WRKSRC}</makevar> (generally the
directory your port's tarball unpacks itself into, that being directory your port's tarball unpacks itself into, that being
where the build is done). To make fixes and upgrades easier where the build is done). To make fixes and upgrades easier
you should avoid having more than one patch fix the same file you should avoid having more than one patch fix the same file
(e.g., patch-aa and patch-ab both changing <emphasis (e.g., patch-aa and patch-ab both changing <makevar>&#36;{WRKSRC}</makevar>/foobar.c).</para>
remap=tt>&#36;{WRKSRC}</emphasis>/foobar.c).</para>
</sect4> </sect4>
@ -26521,15 +26511,9 @@
<sect4> <sect4>
<title>The original source</title> <title>The original source</title>
<para>Does it live in <emphasis <para>Does it live in <makevar>&#36;{DISTDIR}</makevar> as a standard gzip'd
remap=tt>&#36;{DISTDIR}</emphasis> as a standard gzip'd
tarball? If so, you can go on to the next step. If not, you tarball? If so, you can go on to the next step. If not, you
should look at overriding any of the <emphasis should look at overriding any of the <makevar>&#36;{EXTRACT_CMD}</makevar>, <makevar>&#36;{EXTRACT_BEFORE_ARGS}</makevar>, <makevar>&#36;{EXTRACT_AFTER_ARGS}</makevar>, <makevar>&#36;{EXTRACT_SUFX}</makevar>, or <makevar>&#36;{DISTFILES}</makevar> variables, depending on
remap=tt>&#36;{EXTRACT_CMD}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_BEFORE_ARGS}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_AFTER_ARGS}</emphasis>, <emphasis
remap=tt>&#36;{EXTRACT_SUFX}</emphasis>, or <emphasis
remap=tt>&#36;{DISTFILES}</emphasis> variables, depending on
how alien a format your port's distribution file is. (The how alien a format your port's distribution file is. (The
most common case is <literal>EXTRACT_SUFX=.tar.Z</literal>, most common case is <literal>EXTRACT_SUFX=.tar.Z</literal>,
when the tarball is condensed by regular compress, not when the tarball is condensed by regular compress, not
@ -26545,12 +26529,10 @@
<sect4> <sect4>
<title>DISTNAME</title> <title>DISTNAME</title>
<para>You should set <emphasis <para>You should set <makevar>&#36;{DISTNAME}</makevar> to be the base name of
remap=tt>&#36;{DISTNAME}</emphasis> to be the base name of
your port. The default rules expect the distribution file your port. The default rules expect the distribution file
list (<emphasis remap=tt>&#36;{DISTFILES}</emphasis>) to be list (<makevar>&#36;{DISTFILES}</makevar>) to be
named <emphasis named <makevar>&#36;{DISTNAME}&#36;{EXTRACT_SUFX}</makevar> by
remap=tt>&#36;{DISTNAME}&#36;{EXTRACT_SUFX}</emphasis> by
default which, if it is a normal tarball, is going to be default which, if it is a normal tarball, is going to be
something like: something like:
<informalexample> <informalexample>
@ -26568,14 +26550,12 @@
<para>All this behavior can be overridden, of course, it simply <para>All this behavior can be overridden, of course, it simply
represents the most common time-saving defaults. For a port represents the most common time-saving defaults. For a port
requiring multiple distribution files, simply set <emphasis requiring multiple distribution files, simply set <makevar>&#36;{DISTFILES}</makevar> explicitly. If only a
remap=tt>&#36;{DISTFILES}</emphasis> explicitly. If only a subset of <makevar>&#36;{DISTFILES}</makevar> are
subset of <emphasis remap=tt>&#36;{DISTFILES}</emphasis> are actual extractable archives, then set them up in <makevar>&#36;{EXTRACT_ONLY}</makevar>, which will override
actual extractable archives, then set them up in <emphasis the <makevar>&#36;{DISTFILES}</makevar> list when
remap=tt>&#36;{EXTRACT_ONLY}</emphasis>, which will override
the <emphasis remap=tt>&#36;{DISTFILES}</emphasis> list when
it comes to extraction, and the rest will be just left in it comes to extraction, and the rest will be just left in
<emphasis remap=tt>&#36;{DISTDIR}</emphasis> for later <makevar>&#36;{DISTDIR}</makevar> for later
use.</para> use.</para>
</sect4> </sect4>
@ -26587,8 +26567,7 @@
<filename>/usr/ports/packages/All</filename> and links are <filename>/usr/ports/packages/All</filename> and links are
made from one or more subdirectories of made from one or more subdirectories of
<filename>/usr/ports/packages</filename>. The names of these <filename>/usr/ports/packages</filename>. The names of these
subdirectories are specified by the variable <emphasis subdirectories are specified by the variable <makevar>&#36;{CATEGORIES}</makevar>. It is intended to
remap=tt>&#36;{CATEGORIES}</emphasis>. It is intended to
make life easier for the user when he is wading through the make life easier for the user when he is wading through the
pile of packages on the ftp site or the CD-ROM. Please take a pile of packages on the ftp site or the CD-ROM. Please take a
look at the existing categories (you can find them in <ulink look at the existing categories (you can find them in <ulink
@ -26604,13 +26583,11 @@
<title>MASTER_SITES</title> <title>MASTER_SITES</title>
<para>Record the directory part of the ftp/http-URL pointing at <para>Record the directory part of the ftp/http-URL pointing at
the original tarball in <emphasis the original tarball in <makevar>&#36;{MASTER_SITES}</makevar>. Do not forget the
remap=tt>&#36;{MASTER_SITES}</emphasis>. Do not forget the
trailing slash (<filename>/</filename>)!</para> trailing slash (<filename>/</filename>)!</para>
<para>The make macros will try to use this specification for <para>The make macros will try to use this specification for
grabbing the distribution file with <emphasis grabbing the distribution file with <makevar>&#36;{FETCH}</makevar> if they cannot find it
remap=tt>&#36;{FETCH}</emphasis> if they cannot find it
already on the system.</para> already on the system.</para>
<para>It is recommended that you put multiple sites on this <para>It is recommended that you put multiple sites on this
@ -26644,17 +26621,14 @@
<title>PATCHFILES</title> <title>PATCHFILES</title>
<para>If your port requires some additional patches that are <para>If your port requires some additional patches that are
available by ftp or http, set <emphasis available by ftp or http, set <makevar>&#36;{PATCHFILES}</makevar> to the names of the
remap=tt>&#36;{PATCHFILES}</emphasis> to the names of the files and <makevar>&#36;{PATCH_SITES}</makevar> to
files and <emphasis remap=tt>&#36;{PATCH_SITES}</emphasis> to
the URL of the directory that contains them (the format is the the URL of the directory that contains them (the format is the
same as <emphasis same as <makevar>&#36;{MASTER_SITES}</makevar>).</para>
remap=tt>&#36;{MASTER_SITES}</emphasis>).</para>
<para>If the patch is not relative to the top of the source tree <para>If the patch is not relative to the top of the source tree
(i.e., <emphasis remap=tt>&#36;{WKRSRC}</emphasis>) because it (i.e., <makevar>&#36;{WKRSRC}</makevar>) because it
contains some extra pathnames, set <emphasis contains some extra pathnames, set <makevar>&#36;{PATCH_DIST_STRIP}</makevar> accordingly.
remap=tt>&#36;{PATCH_DIST_STRIP}</emphasis> accordingly.
For instance, if all the pathnames in the patch has an extra For instance, if all the pathnames in the patch has an extra
<filename>foozolix-1.0/</filename> in front of the <filename>foozolix-1.0/</filename> in front of the
filenames, then set filenames, then set
@ -26667,14 +26641,13 @@
<para>If the patch is distributed with some other files, such as <para>If the patch is distributed with some other files, such as
documentation, in a gzip'd tarball, you can't just use documentation, in a gzip'd tarball, you can't just use
<emphasis remap=tt>&#36;{PATCHFILES}</emphasis>. If that is <makevar>&#36;{PATCHFILES}</makevar>. If that is
the case, add the name and the location of the patch tarball the case, add the name and the location of the patch tarball
to <emphasis remap=tt>&#36;{DISTFILES}</emphasis> and to <makevar>&#36;{DISTFILES}</makevar> and
<emphasis remap=tt>&#36;{MASTER_SITES}</emphasis>. Then, from <makevar>&#36;{MASTER_SITES}</makevar>. Then, from
the <emphasis remap=tt>pre-patch</emphasis> target, apply the the <emphasis remap=tt>pre-patch</emphasis> target, apply the
patch either by running the patch command from there, or patch either by running the patch command from there, or
copying the patch file into the <emphasis copying the patch file into the <makevar>&#36;{PATCHDIR}</makevar> directory and calling it
remap=tt>&#36;{PATCHDIR}</emphasis> directory and calling it
<filename>patch-&lt;xx&gt;</filename>.</para> <filename>patch-&lt;xx&gt;</filename>.</para>
<note> <note>
@ -26853,8 +26826,7 @@
<literal>GNU_CONFIGURE=yes</literal>. If you want to give <literal>GNU_CONFIGURE=yes</literal>. If you want to give
some extra arguments to GNU <command>configure</command> (other than the default some extra arguments to GNU <command>configure</command> (other than the default
<literal>--prefix=&#36;{PREFIX}</literal>), set those extra <literal>--prefix=&#36;{PREFIX}</literal>), set those extra
arguments in <emphasis arguments in <makevar>&#36;{CONFIGURE_ARGS}</makevar>.</para>
remap=tt>&#36;{CONFIGURE_ARGS}</emphasis>.</para>
<para>If your package is an X application that creates <para>If your package is an X application that creates
<filename>Makefile</filename>s from <filename>Makefile</filename>s from
@ -26867,10 +26839,8 @@
<para>If your port's source <filename>Makefile</filename> has <para>If your port's source <filename>Makefile</filename> has
something else than <emphasis remap=tt>all</emphasis> as the something else than <emphasis remap=tt>all</emphasis> as the
main build target, set <emphasis main build target, set <makevar>&#36;{ALL_TARGET}</makevar> accordingly. Same
remap=tt>&#36;{ALL_TARGET}</emphasis> accordingly. Same goes for <emphasis remap=tt>install</emphasis> and <makevar>&#36;{INSTALL_TARGET}</makevar>.</para>
goes for <emphasis remap=tt>install</emphasis> and <emphasis
remap=tt>&#36;{INSTALL_TARGET}</emphasis>.</para>
</sect4> </sect4>
@ -26923,22 +26893,21 @@
<listitem> <listitem>
<para>If the port refers to the Motif library as <para>If the port refers to the Motif library as
<option>-lXm</option> in its Makefile or Imakefile, <option>-lXm</option> in its Makefile or Imakefile,
simply substitute <emphasis simply substitute <makevar>&#36;{MOTIFLIB}</makevar> for it.
remap=tt>&#36;{MOTIFLIB}</emphasis> for it.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>If the port uses <literal>XmClientLibs</literal> in its Imakefile, <para>If the port uses <literal>XmClientLibs</literal> in its Imakefile,
change it to <emphasis remap=tt>&#36;{MOTIFLIB} change it to <makevar>&#36;{MOTIFLIB}
&#36;{XTOOLLIB} &#36;{XLIB}</emphasis>.</para> &#36;{XTOOLLIB} &#36;{XLIB}</makevar>.</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</para> </para>
<note> <note>
<para><emphasis remap=tt>&#36;{MOTIFLIB}</emphasis> (usually) <para><makevar>&#36;{MOTIFLIB}</makevar> (usually)
expands to <option>-L/usr/X11R6/lib -lXm</option> or expands to <option>-L/usr/X11R6/lib -lXm</option> or
<filename>/usr/X11R6/lib/libXm.a</filename>, so there is <filename>/usr/X11R6/lib/libXm.a</filename>, so there is
no need to add <option>-L</option> or no need to add <option>-L</option> or
@ -27308,7 +27277,7 @@
<filename>work</filename> subdirectory, <command>make clean</command> will <filename>work</filename> subdirectory, <command>make clean</command> will
<emphasis>nuke</emphasis> it completely! If you need <emphasis>nuke</emphasis> it completely! If you need
auxiliary files that are not scripts or patches, put them in auxiliary files that are not scripts or patches, put them in
the <emphasis remap=tt>&#36;{FILESDIR}</emphasis> subdirectory the <makevar>&#36;{FILESDIR}</makevar> subdirectory
(<filename>files</filename> by default) and use the (<filename>files</filename> by default) and use the
<emphasis remap=tt>post-extract</emphasis> target to copy them <emphasis remap=tt>post-extract</emphasis> target to copy them
to the <filename>work</filename> subdirectory.</para> to the <filename>work</filename> subdirectory.</para>
@ -27326,7 +27295,7 @@
<note> <note>
<para>Note that these files are not used only for packaging <para>Note that these files are not used only for packaging
anymore, and are <emphasis>mandatory</emphasis> now, even if anymore, and are <emphasis>mandatory</emphasis> now, even if
<emphasis remap=tt>&#36;{NO_PACKAGE}</emphasis> is <makevar>&#36;{NO_PACKAGE}</makevar> is
set.</para> set.</para>
</note> </note>
</sect4> </sect4>
@ -27388,22 +27357,22 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_PROGRAM}</emphasis> is <para><makevar>${INSTALL_PROGRAM}</makevar> is
a command to install binary executables.</para> a command to install binary executables.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_SCRIPT}</emphasis> is a <para><makevar>${INSTALL_SCRIPT}</makevar> is a
command to install executable scripts.</para> command to install executable scripts.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_DATA}</emphasis> is a <para><makevar>${INSTALL_DATA}</makevar> is a
command to install sharable data.</para> command to install sharable data.</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis remap=tt>${INSTALL_MAN}</emphasis> is a <para><makevar>${INSTALL_MAN}</makevar> is a
command to install manpages and other documentation (it command to install manpages and other documentation (it
doesn't compress anything).</para> doesn't compress anything).</para>
</listitem> </listitem>
@ -27466,11 +27435,10 @@
remap=tt>post-install</emphasis> target.</para> remap=tt>post-install</emphasis> target.</para>
<para>Create a new directory for your port. The directory name <para>Create a new directory for your port. The directory name
should reflect what the port is. This usually means <emphasis should reflect what the port is. This usually means <makevar>&#36;{PKGNAME}</makevar> minus the version part.
remap=tt>&#36;{PKGNAME}</emphasis> minus the version part.
However, if you think the user might want different versions However, if you think the user might want different versions
of the port to be installed at the same time, you can use the of the port to be installed at the same time, you can use the
whole <emphasis remap=tt>&#36;{PKGNAME}</emphasis>.</para> whole <makevar>&#36;{PKGNAME}</makevar>.</para>
<para>Make the installation dependent to the variable <para>Make the installation dependent to the variable
<acronym>NOPORTDOCS</acronym> so that users can disable it in <acronym>NOPORTDOCS</acronym> so that users can disable it in
@ -27508,11 +27476,9 @@
<filename>/usr/ports/distfiles</filename>. If your port <filename>/usr/ports/distfiles</filename>. If your port
requires a lot of files to be fetched, or contains a file that requires a lot of files to be fetched, or contains a file that
has a name that might conflict with other ports (e.g., has a name that might conflict with other ports (e.g.,
`Makefile'), set <emphasis `Makefile'), set <makevar>&#36;{DIST_SUBDIR}</makevar> to the name of the
remap=tt>&#36;{DIST_SUBDIR}</emphasis> to the name of the port (<makevar>&#36;{PKGNAME}</makevar> without the
port (<emphasis remap=tt>&#36;{PKGNAME}</emphasis> without the version part should work fine). This will change <makevar>&#36;{DISTDIR}</makevar> from the default
version part should work fine). This will change <emphasis
remap=tt>&#36;{DISTDIR}</emphasis> from the default
<filename>/usr/ports/distfiles</filename> to <filename>/usr/ports/distfiles</filename> to
<filename>/usr/ports/distfiles/&#36;{DIST_SUBDIR}</filename>, <filename>/usr/ports/distfiles/&#36;{DIST_SUBDIR}</filename>,
and in effect puts everything that is required for your port and in effect puts everything that is required for your port
@ -27520,14 +27486,11 @@
<para>It will also look at the subdirectory with the same name <para>It will also look at the subdirectory with the same name
on the backup master site at on the backup master site at
<filename>ftp.freebsd.org</filename>. (Setting <emphasis <filename>ftp.freebsd.org</filename>. (Setting <makevar>&#36;{DISTDIR}</makevar> explicitly in your
remap=tt>&#36;{DISTDIR}</emphasis> explicitly in your Makefile will not accomplish this, so please use <makevar>&#36;{DIST_SUBDIR}</makevar>.)</para>
Makefile will not accomplish this, so please use <emphasis
remap=tt>&#36;{DIST_SUBDIR}</emphasis>.)</para>
<note> <note>
<para>This does not affect the <emphasis <para>This does not affect the <makevar>&#36;{MASTER_SITES}</makevar> you define in your
remap=tt>&#36;{MASTER_SITES}</emphasis> you define in your
Makefile.</para> Makefile.</para>
</note> </note>
</sect4> </sect4>
@ -27575,14 +27538,10 @@
<sect4> <sect4>
<title>PREFIX</title> <title>PREFIX</title>
<para>Do try to make your port install relative to <emphasis <para>Do try to make your port install relative to <makevar>&#36;{PREFIX}</makevar>. (The value of this
remap=tt>&#36;{PREFIX}</emphasis>. (The value of this variable will be set to <makevar>&#36;{LOCALBASE}</makevar> (default
variable will be set to <emphasis <filename>/usr/local</filename>), unless <makevar>&#36;{USE_IMAKE}</makevar> or <makevar>&#36;{USE_X11}</makevar> is set, in which case it
remap=tt>&#36;{LOCALBASE}</emphasis> (default will be <makevar>&#36;{X11BASE}</makevar> (default
<filename>/usr/local</filename>), unless <emphasis
remap=tt>&#36;{USE_IMAKE}</emphasis> or <emphasis
remap=tt>&#36;{USE_X11}</emphasis> is set, in which case it
will be <emphasis remap=tt>&#36;{X11BASE}</emphasis> (default
<filename>/usr/X11R6</filename>).)</para> <filename>/usr/X11R6</filename>).)</para>
<para>Not hard-coding <filename>/usr/local</filename> or <para>Not hard-coding <filename>/usr/local</filename> or
@ -27593,11 +27552,11 @@
replacing the occurrences of <filename>/usr/local</filename> replacing the occurrences of <filename>/usr/local</filename>
(or <filename>/usr/X11R6</filename> for X ports that do not (or <filename>/usr/X11R6</filename> for X ports that do not
use imake) in the various scripts/Makefiles in the port to use imake) in the various scripts/Makefiles in the port to
read <emphasis remap=tt>&#36;{PREFIX}</emphasis>, as this read <makevar>&#36;{PREFIX}</makevar>, as this
variable is automatically passed down to every stage of the variable is automatically passed down to every stage of the
build and install processes.</para> build and install processes.</para>
<para>The variable <emphasis remap=tt>&#36;{PREFIX}</emphasis> <para>The variable <makevar>&#36;{PREFIX}</makevar>
can be reassigned in your Makefile or in the user's can be reassigned in your Makefile or in the user's
environment. However, it is strongly discouraged for environment. However, it is strongly discouraged for
individual ports to set this variable explicitly in the individual ports to set this variable explicitly in the
@ -27617,7 +27576,7 @@
<title>Subdirectories</title> <title>Subdirectories</title>
<para>Try to let the port put things in the right subdirectories <para>Try to let the port put things in the right subdirectories
of <emphasis remap=tt>&#36;{PREFIX}</emphasis>. Some ports of <makevar>&#36;{PREFIX}</makevar>. Some ports
lump everything and put it in the subdirectory with the port's lump everything and put it in the subdirectory with the port's
name, which is incorrect. Also, many ports put everything name, which is incorrect. Also, many ports put everything
except binaries, header files and manual pages in the a except binaries, header files and manual pages in the a
@ -27820,9 +27779,8 @@
</informalexample> </informalexample>
</para> </para>
<para>If your <emphasis remap=tt>&#36;{DISTNAME}</emphasis> <para>If your <makevar>&#36;{DISTNAME}</makevar>
doesn't look like that, set <emphasis doesn't look like that, set <makevar>&#36;{PKGNAME}</makevar> to something in that
remap=tt>&#36;{PKGNAME}</emphasis> to something in that
format.</para> format.</para>
<para> <para>
@ -27872,9 +27830,7 @@
</orderedlist> </orderedlist>
</para> </para>
<para>Here are some (real) examples on how to convert a <emphasis <para>Here are some (real) examples on how to convert a <makevar>&#36;{DISTNAME}</makevar> into a suitable <makevar>&#36;{PKGNAME}</makevar>:</para>
remap=tt>&#36;{DISTNAME}</emphasis> into a suitable <emphasis
remap=tt>&#36;{PKGNAME}</emphasis>:</para>
<para> <para>
<informalexample> <informalexample>