Indent the new <sect2> (from <sect3>) one step back.

And fixup the few whitespace errors igor -RZ reports.

Whitespace only, translators can ignore.

Approved by:	wblock (mentor)
Differential Revision:	https://reviews.freebsd.org/D2952
This commit is contained in:
Mathieu Arnold 2015-06-30 15:38:37 +00:00
parent bec94907eb
commit 0413d7e930
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46902

View file

@ -1932,89 +1932,89 @@ MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
</sect3> </sect3>
</sect2> </sect2>
<sect2 xml:id="makefile-master_sites-github"> <sect2 xml:id="makefile-master_sites-github">
<title><varname>USE_GITHUB</varname></title> <title><varname>USE_GITHUB</varname></title>
<para>If the distribution file comes from a specific commit or <para>If the distribution file comes from a specific commit or
tag on <link xlink:href="https://github.com">GitHub</link> tag on <link xlink:href="https://github.com">GitHub</link>
for which there is no officially released file, there is an for which there is no officially released file, there is an
easy way to set the right <varname>DISTNAME</varname> and easy way to set the right <varname>DISTNAME</varname> and
<varname>MASTER_SITES</varname> automatically. These <varname>MASTER_SITES</varname> automatically. These
variables are available:</para> variables are available:</para>
<table xml:id="makefile-master_sites-github-description"> <table xml:id="makefile-master_sites-github-description">
<title><varname>USE_GITHUB</varname> Description</title> <title><varname>USE_GITHUB</varname> Description</title>
<tgroup cols="3"> <tgroup cols="3">
<thead> <thead>
<row> <row>
<entry>Variable</entry> <entry>Variable</entry>
<entry>Description</entry> <entry>Description</entry>
<entry>Default</entry> <entry>Default</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry><varname>GH_ACCOUNT</varname></entry> <entry><varname>GH_ACCOUNT</varname></entry>
<entry>Account name of the GitHub user hosting the <entry>Account name of the GitHub user hosting the
project</entry> project</entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GH_PROJECT</varname></entry> <entry><varname>GH_PROJECT</varname></entry>
<entry>Name of the project on GitHub</entry> <entry>Name of the project on GitHub</entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GH_TAGNAME</varname></entry> <entry><varname>GH_TAGNAME</varname></entry>
<entry>Name of the tag to download (2.0.1, hash, ...) <entry>Name of the tag to download (2.0.1, hash, ...)
Using the name of a branch here is incorrect. It is Using the name of a branch here is incorrect. It is
also possible to use the hash of a commit id to do a also possible to use the hash of a commit id to do a
snapshot.</entry> snapshot.</entry>
<entry><literal>${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}</literal></entry> <entry><literal>${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}</literal></entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
<example xml:id="makefile-master_sites-github-ex1"> <example xml:id="makefile-master_sites-github-ex1">
<title>Simple Use of <varname>USE_GITHUB</varname></title> <title>Simple Use of <varname>USE_GITHUB</varname></title>
<para>While trying to make a port for version <para>While trying to make a port for version
<literal>1.2.7</literal> of <application>pkg</application> <literal>1.2.7</literal> of <application>pkg</application>
from the &os; user on github, at <link from the &os; user on github, at <link
xlink:href="https://github.com/freebsd/pkg"/>, The xlink:href="https://github.com/freebsd/pkg"/>, The
<filename>Makefile</filename> would end up looking like <filename>Makefile</filename> would end up looking like
this (slightly stripped for the example):</para> this (slightly stripped for the example):</para>
<programlisting>PORTNAME= pkg <programlisting>PORTNAME= pkg
PORTVERSION= 1.2.7 PORTVERSION= 1.2.7
USE_GITHUB= yes USE_GITHUB= yes
GH_ACCOUNT= freebsd</programlisting> GH_ACCOUNT= freebsd</programlisting>
<para>It will automatically have <para>It will automatically have
<varname>MASTER_SITES</varname> set to <literal>GH <varname>MASTER_SITES</varname> set to <literal>GH
GHC</literal> and <varname>WRKSRC</varname> to GHC</literal> and <varname>WRKSRC</varname> to
<literal>${WRKDIR}/pkg-1.2.7</literal>.</para> <literal>${WRKDIR}/pkg-1.2.7</literal>.</para>
</example> </example>
<example xml:id="makefile-master_sites-github-ex2"> <example xml:id="makefile-master_sites-github-ex2">
<title>More Complete Use of <title>More Complete Use of
<varname>USE_GITHUB</varname></title> <varname>USE_GITHUB</varname></title>
<para>While trying to make a port for the bleeding edge <para>While trying to make a port for the bleeding edge
version of <application>pkg</application> from the &os; version of <application>pkg</application> from the &os;
user on github, at <link user on github, at <link
xlink:href="https://github.com/freebsd/pkg"/>, the xlink:href="https://github.com/freebsd/pkg"/>, the
<filename>Makefile</filename> ends up looking like <filename>Makefile</filename> ends up looking like
this (slightly stripped for the example):</para> this (slightly stripped for the example):</para>
<programlisting>PORTNAME= pkg-devel <programlisting>PORTNAME= pkg-devel
PORTVERSION= 1.3.0.a.20140411 PORTVERSION= 1.3.0.a.20140411
USE_GITHUB= yes USE_GITHUB= yes
@ -2022,77 +2022,77 @@ GH_ACCOUNT= freebsd
GH_PROJECT= pkg GH_PROJECT= pkg
GH_TAGNAME= 6dbb17b</programlisting> GH_TAGNAME= 6dbb17b</programlisting>
<para>It will automatically have <para>It will automatically have
<varname>MASTER_SITES</varname> set to <literal>GH <varname>MASTER_SITES</varname> set to <literal>GH
GHC</literal> and <varname>WRKSRC</varname> to GHC</literal> and <varname>WRKSRC</varname> to
<literal>${WRKDIR}/pkg-6dbb17b</literal>.</para> <literal>${WRKDIR}/pkg-6dbb17b</literal>.</para>
</example> </example>
<example xml:id="makefile-master_sites-github-ex3"> <example xml:id="makefile-master_sites-github-ex3">
<title>Use of <varname>USE_GITHUB</varname> with <title>Use of <varname>USE_GITHUB</varname> with
<varname>DISTVERSIONPREFIX</varname></title> <varname>DISTVERSIONPREFIX</varname></title>
<para>From time to time, <varname>GH_TAGNAME</varname> is a <para>From time to time, <varname>GH_TAGNAME</varname> is a
slight variation from <varname>DISTVERSION</varname>. slight variation from <varname>DISTVERSION</varname>.
For example, if the version is <literal>1.0.2</literal>, For example, if the version is <literal>1.0.2</literal>,
the tag is <literal>v1.0.2</literal>. In those cases, it the tag is <literal>v1.0.2</literal>. In those cases, it
is possible to use <varname>DISTVERSIONPREFIX</varname> or is possible to use <varname>DISTVERSIONPREFIX</varname> or
<varname>DISTVERSIONSUFFIX</varname>:</para> <varname>DISTVERSIONSUFFIX</varname>:</para>
<programlisting>PORTNAME= foo <programlisting>PORTNAME= foo
PORTVERSION= 1.0.2 PORTVERSION= 1.0.2
DISTVERSIONPREFIX= v DISTVERSIONPREFIX= v
USE_GITHUB= yes</programlisting> USE_GITHUB= yes</programlisting>
<para>It will automatically set <para>It will automatically set
<varname>GH_TAGNAME</varname> to <varname>GH_TAGNAME</varname> to
<literal>v1.0.2</literal>, while <varname>WRKSRC</varname> <literal>v1.0.2</literal>, while <varname>WRKSRC</varname>
will be kept to will be kept to
<varname>${WRKDIR}/foo-1.0.2</varname>.</para> <varname>${WRKDIR}/foo-1.0.2</varname>.</para>
</example> </example>
<sect3> <sect3>
<title>Fetching Multiple Files From GitHub</title> <title>Fetching Multiple Files From GitHub</title>
<para>The <varname>USE_GITHUB</varname> framework also <para>The <varname>USE_GITHUB</varname> framework also
supports fetching multiple distribution files from supports fetching multiple distribution files from
different places in GitHub. It works in a way very different places in GitHub. It works in a way very
similar to <xref similar to <xref
linkend="porting-master-sites-n"/>.</para> linkend="porting-master-sites-n"/>.</para>
<para>Multiple values are added to <para>Multiple values are added to
<varname>GH_ACCOUNT</varname>, <varname>GH_ACCOUNT</varname>,
<varname>GH_PROJECT</varname>, and <varname>GH_PROJECT</varname>, and
<varname>GH_TAGNAME</varname>. Each different value is <varname>GH_TAGNAME</varname>. Each different value is
assigned a tag. The main value can either have no tag, or assigned a tag. The main value can either have no tag, or
the <literal>:DEFAULT</literal> tag. A value can be the <literal>:DEFAULT</literal> tag. A value can be
omitted if it is the same as the default as listed in omitted if it is the same as the default as listed in
<xref <xref
linkend="makefile-master_sites-github-description"/>.</para> linkend="makefile-master_sites-github-description"/>.</para>
<para>For each tag, a <para>For each tag, a
<varname>${WRKSRC_<replaceable>tag</replaceable>}</varname> <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>
helper variable is created, containing the directory into helper variable is created, containing the directory into
which the file has been extracted. The which the file has been extracted. The
<varname>${WRKSRC_<replaceable>tag</replaceable>}</varname> <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>
variables can be used to move directories around during variables can be used to move directories around during
<buildtarget>post-extract</buildtarget>, or add to <buildtarget>post-extract</buildtarget>, or add to
<varname>CONFIGURE_ARGS</varname>, or whatever is needed <varname>CONFIGURE_ARGS</varname>, or whatever is needed
so that the software builds correctly.</para> so that the software builds correctly.</para>
<example xml:id="makefile-master_sites-github-multi"> <example xml:id="makefile-master_sites-github-multi">
<title>Use of <varname>USE_GITHUB</varname> with Multiple <title>Use of <varname>USE_GITHUB</varname> with Multiple
Distribution Files</title> Distribution Files</title>
<para>From time to time, there is a need to fetch more <para>From time to time, there is a need to fetch more
than one distribution file. For example, when the than one distribution file. For example, when the
upstream git repository uses submodules. This can be upstream git repository uses submodules. This can be
done easily using tags in the done easily using tags in the
<varname>GH_<replaceable>*</replaceable></varname> <varname>GH_<replaceable>*</replaceable></varname>
variables:</para> variables:</para>
<programlisting>PORTNAME= foo <programlisting>PORTNAME= foo
PORTVERSION= 1.0.2 PORTVERSION= 1.0.2
USE_GITHUB= yes USE_GITHUB= yes
@ -2103,36 +2103,36 @@ GH_TAGNAME= 1.0:icons fa579bc:contrib
CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib} CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib}
post-extract: post-extract:
@${MV} ${WRKSRC_icons} ${WRKSRC}/icons</programlisting> @${MV} ${WRKSRC_icons} ${WRKSRC}/icons</programlisting>
<para>This will fetch three distribution files from <para>This will fetch three distribution files from
github. The default one comes from github. The default one comes from
<filename>foo/foo</filename> and is version <filename>foo/foo</filename> and is version
<literal>1.0.2</literal>. The second one, tagged <literal>1.0.2</literal>. The second one, tagged
<literal>icons</literal>, comes from <literal>icons</literal>, comes from
<filename>bar/foo-icons</filename> and is in version <filename>bar/foo-icons</filename> and is in version
<literal>1.0</literal>. The third one comes from <literal>1.0</literal>. The third one comes from
<filename>bar/foo-contrib</filename> and uses the <filename>bar/foo-contrib</filename> and uses the
<application>Git</application> commit <application>Git</application> commit
<literal>fa579bc</literal>. The distribution files are <literal>fa579bc</literal>. The distribution files are
named <filename>foo-foo-1.0.2_GH0.tar.gz</filename>, named <filename>foo-foo-1.0.2_GH0.tar.gz</filename>,
<filename>bar-foo-icons-1.0_GH0.tar.gz</filename>, and <filename>bar-foo-icons-1.0_GH0.tar.gz</filename>, and
<filename>bar-foo-contrib-fa579bc_GH0.tar.gz</filename>.</para> <filename>bar-foo-contrib-fa579bc_GH0.tar.gz</filename>.</para>
<para>All the distribution files are extracted in <para>All the distribution files are extracted in
<varname>${WRKDIR}</varname> in their respective <varname>${WRKDIR}</varname> in their respective
subdirectories. The default file is still extracted in subdirectories. The default file is still extracted in
<varname>${WRKSRC}</varname>, in this case, <varname>${WRKSRC}</varname>, in this case,
<filename>${WRKDIR}/foo-1.0.2</filename>. Each <filename>${WRKDIR}/foo-1.0.2</filename>. Each
additional distribution file is extracted in additional distribution file is extracted in
<varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>. <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>.
Here, for the <literal>icons</literal> tag, it is called Here, for the <literal>icons</literal> tag, it is called
<varname>${WRKSRC_icons}</varname> and it contains <varname>${WRKSRC_icons}</varname> and it contains
<filename>${WRKDIR}/foo-icons-1.0</filename>. The file <filename>${WRKDIR}/foo-icons-1.0</filename>. The file
with the <literal>contrib</literal> tag is called with the <literal>contrib</literal> tag is called
<varname>${WRKSRC_contrib}</varname> and contains <varname>${WRKSRC_contrib}</varname> and contains
<literal>${WRKDIR}/foo-contrib-fa579bc</literal>.</para> <literal>${WRKDIR}/foo-contrib-fa579bc</literal>.</para>
</example> </example>
</sect3> </sect3>
</sect2> </sect2>
@ -2924,8 +2924,8 @@ PATCHFILES= patch1:test</programlisting>
<literal>${PKGNAMEPREFIX}${PORTNAME}</literal> are <literal>${PKGNAMEPREFIX}${PORTNAME}</literal> are
fine). This will change <varname>DISTDIR</varname> from the fine). This will change <varname>DISTDIR</varname> from the
default <filename>/usr/ports/distfiles</filename> to default <filename>/usr/ports/distfiles</filename> to
<filename>/usr/ports/distfiles/${DIST_SUBDIR}</filename>, and in <filename>/usr/ports/distfiles/${DIST_SUBDIR}</filename>, and
effect puts everything that is required for the port into in effect puts everything that is required for the port into
that subdirectory.</para> that subdirectory.</para>
<para>It will also look at the subdirectory with the same name <para>It will also look at the subdirectory with the same name
@ -4570,7 +4570,7 @@ LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
<note> <note>
<para>Some variables are not in this list, in particular <para>Some variables are not in this list, in particular
<varname>PKGNAMEPREFIX</varname> and <varname>PKGNAMEPREFIX</varname> and
<varname>PKGNAMESUFFIX</varname>. This is intentional. A <varname>PKGNAMESUFFIX</varname>. This is intentional. A
port <emphasis>must not</emphasis> change its name when port <emphasis>must not</emphasis> change its name when
its option set changes.</para> its option set changes.</para>
</note> </note>
@ -4785,8 +4785,9 @@ PORTVERSION= 1.0</programlisting>
<filename>pkg-plist</filename> with the corresponding entries, <filename>pkg-plist</filename> with the corresponding entries,
such as such as
<literal>@(<replaceable>owner</replaceable>,<replaceable>group</replaceable>,)</literal>, <literal>@(<replaceable>owner</replaceable>,<replaceable>group</replaceable>,)</literal>,
<literal>@owner <replaceable>owner</replaceable></literal>, and <literal>@owner <replaceable>owner</replaceable></literal>,
<literal>@group <replaceable>group</replaceable></literal>. and <literal>@group
<replaceable>group</replaceable></literal>.
These operators work until overridden, or until the end These operators work until overridden, or until the end
of <filename>pkg-plist</filename>, so do not forget to reset of <filename>pkg-plist</filename>, so do not forget to reset
them after they are no longer needed. The default ownership them after they are no longer needed. The default ownership