Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167859785
D7661.id19721.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D7661.id19721.diff
View Options
Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -1982,13 +1982,28 @@
</row>
<row>
+ <entry><varname>GH_SUBDIR</varname></entry>
+ <entry>When the software needs an additional
+ distribution file to be extracted within
+ <varname>${WRKSRC}</varname>, this variable can be
+ used. See the examples in <xref
+ linkend="makefile-master_sites-github-multiple"/>
+ for more information.</entry>
+ <entry>(none)</entry>
+ </row>
+
+ <row>
<entry><varname>GH_TUPLE</varname></entry>
<entry><varname>GH_TUPLE</varname> allows putting all
the <varname>GH_ACCOUNT</varname>,
- <varname>GH_PROJECT</varname>, and
- <varname>GH_TAGNAME</varname> into one variable. The
+ <varname>GH_PROJECT</varname>,
+ <varname>GH_TAGNAME</varname>, and
+ <varname>GH_SUBDIR</varname> into one variable. The
format is
- <replaceable>account</replaceable><literal>:</literal><replaceable>project</replaceable><literal>:</literal><replaceable>tagname</replaceable><literal>:</literal><replaceable>group</replaceable>.
+ <replaceable>account</replaceable><literal>:</literal><replaceable>project</replaceable><literal>:</literal><replaceable>tagname</replaceable><literal>:</literal><replaceable>group</replaceable><literal>/</literal><replaceable>subdir</replaceable>.
+ The
+ <literal>/</literal><replaceable>subdir</replaceable>
+ part is optional.
It is helpful when there is more than one GitHub
project from which to fetch.</entry>
</row>
@@ -2132,11 +2147,9 @@
GH_ACCOUNT= bar:icons,contrib
GH_PROJECT= foo-icons:icons foo-contrib:contrib
GH_TAGNAME= 1.0:icons fa579bc:contrib
+GH_SUBDIR= ext/icons:icons
-CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib}
-
-post-extract:
- @${MV} ${WRKSRC_icons} ${WRKSRC}/icons</programlisting>
+CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib}</programlisting>
<para>This will fetch three distribution files from
github. The default one comes from
@@ -2165,6 +2178,16 @@
with the <literal>contrib</literal> tag is called
<varname>${WRKSRC_contrib}</varname> and contains
<literal>${WRKDIR}/foo-contrib-fa579bc</literal>.</para>
+
+ <para>The software's build system expects to find the icons
+ in an <literal>ext/icons</literal> subdirectory in its
+ sources, so <varname>GH_SUBDIR</varname> is used. What it
+ basically does, after making sure
+ <literal>ext/icons</literal> does not exist, and that
+ <literal>ext</literal> exists, is this:</para>
+
+ <programlisting>post-extract:
+ @${MV} ${WRKSRC_icons} ${WRKSRC}/ext/icons</programlisting>
</example>
<example xml:id="makefile-master_sites-github-multi2">
@@ -2180,13 +2203,10 @@
PORTVERSION= 1.0.2
USE_GITHUB= yes
-GH_TUPLE= bar:foo-icons:1.0:icons \
+GH_TUPLE= bar:foo-icons:1.0:icons/ext/icons \
bar:foo-contrib:fa579bc:contrib
-CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib}
-
-post-extract:
- @${MV} ${WRKSRC_icons} ${WRKSRC}/icons</programlisting>
+CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib}</programlisting>
<para>Grouping was used in the previous example with
<literal>bar:icons,contrib</literal>. Some redundant
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 26, 1:38 AM (14 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37261547
Default Alt Text
D7661.id19721.diff (3 KB)
Attached To
Mode
D7661: Document GH_SUBDIR.
Attached
Detach File
Event Timeline
Log In to Comment