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