Date: Fri, 3 Apr 2015 11:38:44 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r46445 - head/en_US.ISO8859-1/books/porters-handbook/makefiles Message-ID: <201504031138.t33Bcikw007543@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Fri Apr 3 11:38:43 2015 New Revision: 46445 URL: https://svnweb.freebsd.org/changeset/doc/46445 Log: Improve and update MASTER_SITES section. Differential Revision: https://reviews.freebsd.org/D2134 Approved by: wblock (mentor) Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Fri Apr 3 05:11:59 2015 (r46444) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Fri Apr 3 11:38:43 2015 (r46445) @@ -1643,36 +1643,63 @@ PORTEPOCH= 1</programlisting> set.</para> </important> - <para>If the original tarball is part of one of the popular - archives such as SourceForge, GNU, or Perl CPAN, it may be - possible refer to those sites in an easy compact form using - predefined macros (for example, <literal>SF</literal>, - <literal>GNU</literal> or <literal>CPAN</literal>). - Set <varname>MASTER_SITES</varname> to one of these values. - Here is an example:</para> + <sect3 xml:id="makefile-master_sites-shorthand"> + <title>Using + <varname>MASTER_SITE_<replaceable>*</replaceable></varname> + Variables</title> + + <para>Shortcut abbreviations are available for popular archives + like SourceForge (<literal>SF</literal>), GNU + (<literal>GNU</literal>), or Perl CPAN + (<literal>CPAN</literal>). <varname>MASTER_SITES</varname> can + use them directly:</para> <programlisting>MASTER_SITES= GNU/make</programlisting> - <para>The older expanded format can still be used, although there - really is no reason to do so:</para> + <para>The older expanded format still works, but all ports + should be converted to the compact format. The expanded + format looks like this:</para> <programlisting>MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= make</programlisting> - <para>These values and variables are defined in - <filename>/usr/ports/Mk/bsd.sites.mk</filename>. There are - new entries added all the time, so make sure to check the - latest version of this file before submitting a port.</para> + <para>These values and variables are defined in <link + xlink:href="https://svnweb.freebsd.org/ports/head/Mk/bsd.sites.mk?view=markup"><filename>Mk/bsd.sites.mk</filename></link>. + New entries are added often, so make sure to check the latest + version of this file before submitting a port.</para> + + <tip> + <para>For any + <varname>MASTER_SITE_<replaceable>FOO</replaceable></varname> + variable, the shorthand + <literal><replaceable>FOO</replaceable></literal> can be + used. For example, use:</para> + + <programlisting>MASTER_SITES= <replaceable>FOO</replaceable></programlisting> + + <para>If <varname>MASTER_SITE_SUBDIR</varname> is needed, use + this:</para> + + <programlisting>MASTER_SITES= <replaceable>FOO</replaceable>/<replaceable>bar</replaceable></programlisting> + </tip> + </sect3> + + <sect3 xml:id="makefile-master_sites-magic"> + <title>Magic MASTER_SITES Macros</title> <para>Several <emphasis>magic</emphasis> macros exist for popular sites with a predictable directory structure. For these, just use the abbreviation and the system will try to - guess the correct subdirectory automatically.</para> + guess the correct subdirectory automatically. For a port + named <literal>Stardict</literal>, of version + <literal>1.2.3</literal>, and hosted on SourceForge, adding + this line:</para> <programlisting>MASTER_SITES= SF</programlisting> - <para>If the guess is incorrect, it can be overridden as - follows.</para> + <para>Will infer a subdirectory named + <literal>/project/stardict/stardict/1.2.3</literal>. If the + guess is incorrect, it can be overridden as follows.</para> <programlisting>MASTER_SITES= SF/stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting> @@ -1696,96 +1723,112 @@ MASTER_SITE_SUBDIR= stardict/WyabdcRealP <tbody> <row> <entry><varname>APACHE_JAKARTA</varname></entry> - <entry><literal>/dist/jakarta/${PORTNAME:S,-,,/,}/source</literal></entry> + <entry><literal>${PORTNAME:S,-,/,}/source</literal></entry> </row> <row> <entry><varname>BERLIOS</varname></entry> - <entry><literal>/${PORTNAME:L}</literal></entry> + <entry><literal>${PORTNAME:tl}.berlios</literal></entry> </row> <row> <entry><varname>CHEESESHOP</varname></entry> - <entry><literal>/packages/source/source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</literal></entry> + <entry><literal>source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</literal></entry> </row> <row> <entry><varname>DEBIAN</varname></entry> - <entry><literal>/debian/pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</literal></entry> + <entry><literal>pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</literal></entry> + </row> + + <row> + <entry><varname>FARSIGHT</varname></entry> + <entry><literal>${PORTNAME}</literal></entry> </row> <row> <entry><varname>GCC</varname></entry> - <entry><literal>/pub/gcc/releases/${DISTNAME}</literal></entry> + <entry><literal>releases/${DISTNAME}</literal></entry> </row> <row> <entry><varname>GH</varname></entry> - <entry><literal>/${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}</literal></entry> + <entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/</literal></entry> </row> <row> <entry><varname>GHC</varname></entry> - <entry><literal>/downloads/${GH_ACCOUNT}/${GH_PROJECT}/</literal></entry> + <entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/</literal></entry> + </row> + + <row> + <entry><varname>GHL</varname></entry> + <entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/</literal></entry> </row> <row> <entry><varname>GNOME</varname></entry> - <entry><literal>/pub/GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> + <entry><literal>sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> + </row> + + <row> + <entry><varname>GIMP</varname></entry> + <entry><literal>${PORTNAME}/${PORTVERSION:R}/</literal></entry> </row> <row> <entry><varname>GNU</varname></entry> - <entry><literal>/gnu/${PORTNAME}</literal></entry> + <entry><literal>${PORTNAME}</literal></entry> </row> <row> - <entry><varname>HORDE</varname></entry> - <entry><literal>/pub/${PORTNAME}</literal></entry> + <entry><varname>GNU_ALPHA</varname></entry> + <entry><literal>${PORTNAME}</literal></entry> </row> <row> - <entry><varname>LOGILAB</varname></entry> - <entry><literal>/pub/${PORTNAME}</literal></entry> + <entry><varname>HORDE</varname></entry> + <entry><literal>${PORTNAME}</literal></entry> </row> <row> - <entry><varname>MATE</varname></entry> - <entry><literal>/releases/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> + <entry><varname>LODEV</varname></entry> + <entry><literal>${PORTNAME}</literal></entry> </row> <row> - <entry><varname>MOZDEV</varname></entry> - <entry><literal>/pub/mozdev/${PORTNAME:L}</literal></entry> + <entry><varname>MATE</varname></entry> + <entry><literal>${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> </row> <row> - <entry><varname>CPAN</varname></entry> - <entry><literal>/pub/CPAN/modules/by-module/${PORTNAME:C/-.*//}</literal></entry> + <entry><varname>MOZDEV</varname></entry> + <entry><literal>${PORTNAME:tl}</literal></entry> </row> <row> - <entry><varname>PYTHON</varname></entry> - <entry><literal>/ftp/python/${PYTHON_PORTVERSION:C/rc[0-9]//}</literal></entry> + <entry><varname>NL</varname></entry> + <entry><literal>${PORTNAME}</literal></entry> </row> <row> - <entry><varname>RUBYFORGE</varname></entry> - <entry><literal>/${PORTNAME:L}</literal></entry> + <entry><varname>CPAN</varname></entry> + <entry><literal>${PORTNAME:C/-.*//}</literal></entry> </row> <row> <entry><varname>SAVANNAH</varname></entry> - <entry><literal>/${PORTNAME:L}</literal></entry> + <entry><literal>${PORTNAME:tl}</literal></entry> </row> <row> <entry><varname>SF</varname></entry> - <entry><literal>/project/${PORTNAME:L}/${PORTNAME:L}/${PORTVERSION}</literal></entry> + <entry><literal>${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION}</literal></entry> </row> </tbody> </tgroup> </table> + </sect3> <sect3 xml:id="makefile-master_sites-github"> <title><varname>USE_GITHUB</varname></title>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504031138.t33Bcikw007543>