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 @@ + GH_SUBDIR + When the software needs an additional + distribution file to be extracted within + ${WRKSRC}, this variable can be + used. See the examples in + for more information. + (none) + + + GH_TUPLE GH_TUPLE allows putting all the GH_ACCOUNT, - GH_PROJECT, and - GH_TAGNAME into one variable. The + GH_PROJECT, + GH_TAGNAME, and + GH_SUBDIR into one variable. The format is - account:project:tagname:group. + account:project:tagname:group/subdir. + The + /subdir + part is optional. It is helpful when there is more than one GitHub project from which to fetch. @@ -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 +CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib} This will fetch three distribution files from github. The default one comes from @@ -2165,6 +2178,16 @@ with the contrib tag is called ${WRKSRC_contrib} and contains ${WRKDIR}/foo-contrib-fa579bc. + + The software's build system expects to find the icons + in an ext/icons subdirectory in its + sources, so GH_SUBDIR is used. What it + basically does, after making sure + ext/icons does not exist, and that + ext exists, is this: + + post-extract: + @${MV} ${WRKSRC_icons} ${WRKSRC}/ext/icons @@ -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 +CONFIGURE_ARGS= --with-contrib=${WRKSRC_contrib} Grouping was used in the previous example with bar:icons,contrib. Some redundant