Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/721

Submitted by:   wb@willbarton.com (Will Barton)
Reviewed by:
Approved by:
Obtained from:

This patch makes a few corrections to the mirror site list documentation I submitted a few days
ago, based on suggestions made by Dr. Ernie.  (1) Be a bit more specific about the nature of the
various tokens in the example in Chapter 2, and (2) Be a bit more specific about
master_sites.mirror_subdir in the example in Chapter 2.

git-svn-id: https://svn.macports.org/repository/macports/trunk/doc@3093 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Felix Kronlage
Felix Kronlage committed Jul 30, 2003
1 parent 20c66e2 commit 01f21f889677090cc54dccdbb04cc6319743b0b7
Showing with 29 additions and 10 deletions.
  1. +3 −3 guide/xml/details.xml
  2. +26 −7 guide/xml/quick.xml
@@ -17,14 +17,14 @@
something more advanced and realise all that power is there.</para>

<para>All key value pairs in a Portfile are single lines so line breaks
must be escaped with a back solidus '\'. </para>
must be escaped with a back slash ('\'). </para>
<para>Variables syntax is ${foo} for the foo variant.</para>
<sect2>
<title>Special characters</title>
<para>As the Portfile is a TCL script certain charachters are
"special". These have a special meaning in TCL and if you dont
want that special meaning, they must be escaped. In general a
charachter is escaped using the back solidus '\'. The main
character is escaped using the back slash ('\'). The main
characters you need to be careful with are
<simplelist type="inline">
<member>$</member>
@@ -361,7 +361,7 @@ formats. </userinput></programlisting></para>
<programlisting><userinput>master_sites http://www.somesite.org/files/ \
http://www.somemirror.org/somesite_org/files/</userinput></programlisting>

<tip><para>Always put the trailing forward solidus at the
<tip><para>Always put the trailing forward slash at the
end of a url, and remember to not include the filename
itself.</para></tip>

@@ -388,19 +388,38 @@ variant ipv6 {

<para>It is possible to use predefined lists of mirror sites in
your <filename>Portfile</filename>, such as SourceForge or GNU
mirrors. A full list of mirror site types is available in
Chapter 3, 'Fetch phase'. The straight-forward usage is:</para>
mirrors. The straight-forward usage is:</para>

<programlisting>master_sites sourceforge http://distfiles.opendarwin.org/
master_sites.mirror_subdir ${name}</programlisting>

<para>In this example, <varname>sourceforge</varname> is the name
of the mirror site list (See Chapter 3, 'Fetch Phase' for a list
of all available mirror site lists),
<varname>http://distfiles.opendarwin.org/</varname> is a normal
<varname>master_sites</varname> URL, and
<varname>${name}</varname> (the value of the
<varname>name</varname> keyword in the
<filename>Portfile</filename>) is the subdirectory to append to
any mirror site lists specified.</para>

<para>This will search all of the mirror sites for SourceForge and
then http://distfiles.opendarwin.org, appending
<varname>${name}</varname> to the end of each SoureForge mirror
site in the list, for example:</para>
site in the list. This example will try to fetch from:</para>

<programlisting>http://us.dl.sourceforge.net/${name}/
ftp://us.dl.sourceforge.net/pub/sourceforge/${name}/
...
http://distfiles.opendarwin.org/</programlisting>

<programlisting>http://us.dl.sourceforge.net/${name}
ftp://us.dl.sourceforge.net/pub/sourceforge/${name}</programlisting>
<para>Note that the value of
<varname>master_sites.mirror_subdir</varname> is
<emphasis>not</emphasis> appended to
<varname>http://distfiles.opendarwin.org/</varname>, this URL is
treated normally. In this example
<varname>master_sites.mirror_subdir</varname> is a required
key.</para>

<para>You can also use the mirror site lists in
<varname>patch_sites</varname> and use
@@ -598,7 +617,7 @@ ftp://us.dl.sourceforge.net/pub/sourceforge/${name}</programlisting>
<example id="expat">
<title>Expat <filename>Portfile</filename></title>
<programlisting><![CDATA[########################### libxslt Portfile ##################################
# $Id: quick.xml,v 1.13 2003/07/20 17:00:53 fkr Exp $
# $Id: quick.xml,v 1.14 2003/07/30 14:35:39 fkr Exp $
PortSystem 1.0
@@ -626,7 +645,7 @@ long_description Gnome library for applying XSL stylesheet transformations to \
<title>Neon <filename>Portfile</filename></title>

<programlisting><![CDATA[###########################neon Portfile####################################
# $Id: quick.xml,v 1.13 2003/07/20 17:00:53 fkr Exp $
# $Id: quick.xml,v 1.14 2003/07/30 14:35:39 fkr Exp $
PortSystem 1.0
name neon

0 comments on commit 01f21f8

Please sign in to comment.
You can’t perform that action at this time.