Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140584706
D2952.id54425.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
16 KB
Referenced Files
None
Subscribers
None
D2952.id54425.diff
View Options
Index: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -1932,89 +1932,89 @@
</sect3>
</sect2>
- <sect2 xml:id="makefile-master_sites-github">
- <title><varname>USE_GITHUB</varname></title>
+ <sect2 xml:id="makefile-master_sites-github">
+ <title><varname>USE_GITHUB</varname></title>
- <para>If the distribution file comes from a specific commit or
- tag on <link xlink:href="https://github.com">GitHub</link>
- for which there is no officially released file, there is an
- easy way to set the right <varname>DISTNAME</varname> and
- <varname>MASTER_SITES</varname> automatically. These
- variables are available:</para>
+ <para>If the distribution file comes from a specific commit or
+ tag on <link xlink:href="https://github.com">GitHub</link>
+ for which there is no officially released file, there is an
+ easy way to set the right <varname>DISTNAME</varname> and
+ <varname>MASTER_SITES</varname> automatically. These
+ variables are available:</para>
- <table xml:id="makefile-master_sites-github-description">
- <title><varname>USE_GITHUB</varname> Description</title>
+ <table xml:id="makefile-master_sites-github-description">
+ <title><varname>USE_GITHUB</varname> Description</title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Variable</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Variable</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
- <tbody>
- <row>
- <entry><varname>GH_ACCOUNT</varname></entry>
- <entry>Account name of the GitHub user hosting the
- project</entry>
- <entry><literal>${PORTNAME}</literal></entry>
- </row>
+ <tbody>
+ <row>
+ <entry><varname>GH_ACCOUNT</varname></entry>
+ <entry>Account name of the GitHub user hosting the
+ project</entry>
+ <entry><literal>${PORTNAME}</literal></entry>
+ </row>
- <row>
- <entry><varname>GH_PROJECT</varname></entry>
- <entry>Name of the project on GitHub</entry>
- <entry><literal>${PORTNAME}</literal></entry>
- </row>
+ <row>
+ <entry><varname>GH_PROJECT</varname></entry>
+ <entry>Name of the project on GitHub</entry>
+ <entry><literal>${PORTNAME}</literal></entry>
+ </row>
- <row>
- <entry><varname>GH_TAGNAME</varname></entry>
- <entry>Name of the tag to download (2.0.1, hash, ...)
- Using the name of a branch here is incorrect. It is
- also possible to use the hash of a commit id to do a
- snapshot.</entry>
- <entry><literal>${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}</literal></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <row>
+ <entry><varname>GH_TAGNAME</varname></entry>
+ <entry>Name of the tag to download (2.0.1, hash, ...)
+ Using the name of a branch here is incorrect. It is
+ also possible to use the hash of a commit id to do a
+ snapshot.</entry>
+ <entry><literal>${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <example xml:id="makefile-master_sites-github-ex1">
- <title>Simple Use of <varname>USE_GITHUB</varname></title>
+ <example xml:id="makefile-master_sites-github-ex1">
+ <title>Simple Use of <varname>USE_GITHUB</varname></title>
- <para>While trying to make a port for version
- <literal>1.2.7</literal> of <application>pkg</application>
- from the &os; user on github, at <link
- xlink:href="https://github.com/freebsd/pkg"/>, The
- <filename>Makefile</filename> would end up looking like
- this (slightly stripped for the example):</para>
+ <para>While trying to make a port for version
+ <literal>1.2.7</literal> of <application>pkg</application>
+ from the &os; user on github, at <link
+ xlink:href="https://github.com/freebsd/pkg"/>, The
+ <filename>Makefile</filename> would end up looking like
+ this (slightly stripped for the example):</para>
- <programlisting>PORTNAME= pkg
+ <programlisting>PORTNAME= pkg
PORTVERSION= 1.2.7
USE_GITHUB= yes
GH_ACCOUNT= freebsd</programlisting>
- <para>It will automatically have
- <varname>MASTER_SITES</varname> set to <literal>GH
- GHC</literal> and <varname>WRKSRC</varname> to
- <literal>${WRKDIR}/pkg-1.2.7</literal>.</para>
- </example>
+ <para>It will automatically have
+ <varname>MASTER_SITES</varname> set to <literal>GH
+ GHC</literal> and <varname>WRKSRC</varname> to
+ <literal>${WRKDIR}/pkg-1.2.7</literal>.</para>
+ </example>
- <example xml:id="makefile-master_sites-github-ex2">
- <title>More Complete Use of
- <varname>USE_GITHUB</varname></title>
-
- <para>While trying to make a port for the bleeding edge
- version of <application>pkg</application> from the &os;
- user on github, at <link
- xlink:href="https://github.com/freebsd/pkg"/>, the
- <filename>Makefile</filename> ends up looking like
- this (slightly stripped for the example):</para>
+ <example xml:id="makefile-master_sites-github-ex2">
+ <title>More Complete Use of
+ <varname>USE_GITHUB</varname></title>
+
+ <para>While trying to make a port for the bleeding edge
+ version of <application>pkg</application> from the &os;
+ user on github, at <link
+ xlink:href="https://github.com/freebsd/pkg"/>, the
+ <filename>Makefile</filename> ends up looking like
+ this (slightly stripped for the example):</para>
- <programlisting>PORTNAME= pkg-devel
+ <programlisting>PORTNAME= pkg-devel
PORTVERSION= 1.3.0.a.20140411
USE_GITHUB= yes
@@ -2022,77 +2022,77 @@
GH_PROJECT= pkg
GH_TAGNAME= 6dbb17b</programlisting>
- <para>It will automatically have
- <varname>MASTER_SITES</varname> set to <literal>GH
- GHC</literal> and <varname>WRKSRC</varname> to
- <literal>${WRKDIR}/pkg-6dbb17b</literal>.</para>
- </example>
+ <para>It will automatically have
+ <varname>MASTER_SITES</varname> set to <literal>GH
+ GHC</literal> and <varname>WRKSRC</varname> to
+ <literal>${WRKDIR}/pkg-6dbb17b</literal>.</para>
+ </example>
- <example xml:id="makefile-master_sites-github-ex3">
- <title>Use of <varname>USE_GITHUB</varname> with
- <varname>DISTVERSIONPREFIX</varname></title>
-
- <para>From time to time, <varname>GH_TAGNAME</varname> is a
- slight variation from <varname>DISTVERSION</varname>.
- For example, if the version is <literal>1.0.2</literal>,
- the tag is <literal>v1.0.2</literal>. In those cases, it
- is possible to use <varname>DISTVERSIONPREFIX</varname> or
- <varname>DISTVERSIONSUFFIX</varname>:</para>
+ <example xml:id="makefile-master_sites-github-ex3">
+ <title>Use of <varname>USE_GITHUB</varname> with
+ <varname>DISTVERSIONPREFIX</varname></title>
+
+ <para>From time to time, <varname>GH_TAGNAME</varname> is a
+ slight variation from <varname>DISTVERSION</varname>.
+ For example, if the version is <literal>1.0.2</literal>,
+ the tag is <literal>v1.0.2</literal>. In those cases, it
+ is possible to use <varname>DISTVERSIONPREFIX</varname> or
+ <varname>DISTVERSIONSUFFIX</varname>:</para>
- <programlisting>PORTNAME= foo
+ <programlisting>PORTNAME= foo
PORTVERSION= 1.0.2
DISTVERSIONPREFIX= v
USE_GITHUB= yes</programlisting>
- <para>It will automatically set
- <varname>GH_TAGNAME</varname> to
- <literal>v1.0.2</literal>, while <varname>WRKSRC</varname>
- will be kept to
- <varname>${WRKDIR}/foo-1.0.2</varname>.</para>
- </example>
+ <para>It will automatically set
+ <varname>GH_TAGNAME</varname> to
+ <literal>v1.0.2</literal>, while <varname>WRKSRC</varname>
+ will be kept to
+ <varname>${WRKDIR}/foo-1.0.2</varname>.</para>
+ </example>
+
+ <sect3>
+ <title>Fetching Multiple Files From GitHub</title>
- <sect3>
- <title>Fetching Multiple Files From GitHub</title>
+ <para>The <varname>USE_GITHUB</varname> framework also
+ supports fetching multiple distribution files from
+ different places in GitHub. It works in a way very
+ similar to <xref
+ linkend="porting-master-sites-n"/>.</para>
+
+ <para>Multiple values are added to
+ <varname>GH_ACCOUNT</varname>,
+ <varname>GH_PROJECT</varname>, and
+ <varname>GH_TAGNAME</varname>. Each different value is
+ assigned a tag. The main value can either have no tag, or
+ the <literal>:DEFAULT</literal> tag. A value can be
+ omitted if it is the same as the default as listed in
+ <xref
+ linkend="makefile-master_sites-github-description"/>.</para>
- <para>The <varname>USE_GITHUB</varname> framework also
- supports fetching multiple distribution files from
- different places in GitHub. It works in a way very
- similar to <xref
- linkend="porting-master-sites-n"/>.</para>
-
- <para>Multiple values are added to
- <varname>GH_ACCOUNT</varname>,
- <varname>GH_PROJECT</varname>, and
- <varname>GH_TAGNAME</varname>. Each different value is
- assigned a tag. The main value can either have no tag, or
- the <literal>:DEFAULT</literal> tag. A value can be
- omitted if it is the same as the default as listed in
- <xref
- linkend="makefile-master_sites-github-description"/>.</para>
-
- <para>For each tag, a
- <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>
- helper variable is created, containing the directory into
- which the file has been extracted. The
- <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>
- variables can be used to move directories around during
- <buildtarget>post-extract</buildtarget>, or add to
- <varname>CONFIGURE_ARGS</varname>, or whatever is needed
- so that the software builds correctly.</para>
-
- <example xml:id="makefile-master_sites-github-multi">
- <title>Use of <varname>USE_GITHUB</varname> with Multiple
- Distribution Files</title>
-
- <para>From time to time, there is a need to fetch more
- than one distribution file. For example, when the
- upstream git repository uses submodules. This can be
- done easily using tags in the
- <varname>GH_<replaceable>*</replaceable></varname>
- variables:</para>
+ <para>For each tag, a
+ <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>
+ helper variable is created, containing the directory into
+ which the file has been extracted. The
+ <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>
+ variables can be used to move directories around during
+ <buildtarget>post-extract</buildtarget>, or add to
+ <varname>CONFIGURE_ARGS</varname>, or whatever is needed
+ so that the software builds correctly.</para>
+
+ <example xml:id="makefile-master_sites-github-multi">
+ <title>Use of <varname>USE_GITHUB</varname> with Multiple
+ Distribution Files</title>
+
+ <para>From time to time, there is a need to fetch more
+ than one distribution file. For example, when the
+ upstream git repository uses submodules. This can be
+ done easily using tags in the
+ <varname>GH_<replaceable>*</replaceable></varname>
+ variables:</para>
- <programlisting>PORTNAME= foo
+ <programlisting>PORTNAME= foo
PORTVERSION= 1.0.2
USE_GITHUB= yes
@@ -2103,36 +2103,36 @@
CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib}
post-extract:
- @${MV} ${WRKSRC_icons} ${WRKSRC}/icons</programlisting>
+ @${MV} ${WRKSRC_icons} ${WRKSRC}/icons</programlisting>
- <para>This will fetch three distribution files from
- github. The default one comes from
- <filename>foo/foo</filename> and is version
- <literal>1.0.2</literal>. The second one, tagged
- <literal>icons</literal>, comes from
- <filename>bar/foo-icons</filename> and is in version
- <literal>1.0</literal>. The third one comes from
- <filename>bar/foo-contrib</filename> and uses the
- <application>Git</application> commit
- <literal>fa579bc</literal>. The distribution files are
- 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-contrib-fa579bc_GH0.tar.gz</filename>.</para>
-
- <para>All the distribution files are extracted in
- <varname>${WRKDIR}</varname> in their respective
- subdirectories. The default file is still extracted in
- <varname>${WRKSRC}</varname>, in this case,
- <filename>${WRKDIR}/foo-1.0.2</filename>. Each
- additional distribution file is extracted in
- <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>.
- Here, for the <literal>icons</literal> tag, it is called
- <varname>${WRKSRC_icons}</varname> and it contains
- <filename>${WRKDIR}/foo-icons-1.0</filename>. The file
- with the <literal>contrib</literal> tag is called
- <varname>${WRKSRC_contrib}</varname> and contains
- <literal>${WRKDIR}/foo-contrib-fa579bc</literal>.</para>
- </example>
+ <para>This will fetch three distribution files from
+ github. The default one comes from
+ <filename>foo/foo</filename> and is version
+ <literal>1.0.2</literal>. The second one, tagged
+ <literal>icons</literal>, comes from
+ <filename>bar/foo-icons</filename> and is in version
+ <literal>1.0</literal>. The third one comes from
+ <filename>bar/foo-contrib</filename> and uses the
+ <application>Git</application> commit
+ <literal>fa579bc</literal>. The distribution files are
+ 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-contrib-fa579bc_GH0.tar.gz</filename>.</para>
+
+ <para>All the distribution files are extracted in
+ <varname>${WRKDIR}</varname> in their respective
+ subdirectories. The default file is still extracted in
+ <varname>${WRKSRC}</varname>, in this case,
+ <filename>${WRKDIR}/foo-1.0.2</filename>. Each
+ additional distribution file is extracted in
+ <varname>${WRKSRC_<replaceable>tag</replaceable>}</varname>.
+ Here, for the <literal>icons</literal> tag, it is called
+ <varname>${WRKSRC_icons}</varname> and it contains
+ <filename>${WRKDIR}/foo-icons-1.0</filename>. The file
+ with the <literal>contrib</literal> tag is called
+ <varname>${WRKSRC_contrib}</varname> and contains
+ <literal>${WRKDIR}/foo-contrib-fa579bc</literal>.</para>
+ </example>
</sect3>
</sect2>
@@ -2924,8 +2924,8 @@
<literal>${PKGNAMEPREFIX}${PORTNAME}</literal> are
fine). This will change <varname>DISTDIR</varname> 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 the port into
+ <filename>/usr/ports/distfiles/${DIST_SUBDIR}</filename>, and
+ in effect puts everything that is required for the port into
that subdirectory.</para>
<para>It will also look at the subdirectory with the same name
@@ -4570,7 +4570,7 @@
<note>
<para>Some variables are not in this list, in particular
<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
its option set changes.</para>
</note>
@@ -4785,8 +4785,9 @@
<filename>pkg-plist</filename> with the corresponding entries,
such as
<literal>@(<replaceable>owner</replaceable>,<replaceable>group</replaceable>,)</literal>,
- <literal>@owner <replaceable>owner</replaceable></literal>, and
- <literal>@group <replaceable>group</replaceable></literal>.
+ <literal>@owner <replaceable>owner</replaceable></literal>,
+ and <literal>@group
+ <replaceable>group</replaceable></literal>.
These operators work until overridden, or until the end
of <filename>pkg-plist</filename>, so do not forget to reset
them after they are no longer needed. The default ownership
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 26, 2:35 PM (6 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27283981
Default Alt Text
D2952.id54425.diff (16 KB)
Attached To
Mode
D2952: Indent the new <sect2> (from <sect3>) one step back.
Attached
Detach File
Event Timeline
Log In to Comment