Tweak math/octave-forge-stk version 2.3.4
[dports.git] / Mk / bsd.sites.mk
1 # bsd.sites.mk - Popular master sites.
2 #
3 # Sites_MAINTAINER=             ports@FreeBSD.org
4 #
5 # This file does not have any designated maintainer, so feel free to
6 # commit to it yourself.  However, it is generally a good idea to
7 # notify the principal maintainer in case you have a change to one of
8 # the software environments (KDE, GNOME, etc.).
9 #
10 # Also, this file is included from bsd.port.mk for all invocations, so
11 # committing a syntax error to this file is a cardinal sin, and will
12 # be punished accordingly.  DO NOT COMMIT SOMETHING YOU HAVEN'T TESTED.
13 # You have been warned. :)
14 #
15 # Note: because it is included for all invocations, please keep the size
16 # of this file manageable.  If a distfile is unfetchable from the first
17 # few dozen locations, it is unlikely to be fetchable from any past that,
18 # and those fetch failures will simply waste time and bandwidth.  Please
19 # pick a globally representative subset.
20 #
21 # Note: all entries should terminate with a slash.
22 #
23 # $FreeBSD$
24 #
25
26 # Where to put distfiles that don't have any other master site
27 .if !defined(IGNORE_MASTER_SITE_LOCAL)
28 MASTER_SITE_LOCAL+= \
29         http://distcache.FreeBSD.org/local-distfiles/%SUBDIR%/ \
30         http://distcache.us-east.FreeBSD.org/local-distfiles/%SUBDIR%/ \
31         http://distcache.eu.FreeBSD.org/local-distfiles/%SUBDIR%/ \
32         http://distcache.us-west.FreeBSD.org/local-distfiles/%SUBDIR%/
33
34 MASTER_SITE_PORTS_JP+= \
35         ftp://ports.jp.FreeBSD.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \
36         ftp://ftp4.jp.FreeBSD.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \
37         ftp://ftp.ics.es.osaka-u.ac.jp/pub/mirrors/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/
38 .endif
39
40 ##
41 ##      KEEP THIS LIST SORTED
42 ##
43
44 .if !defined(IGNORE_MASTER_SITE_AFTERSTEP)
45 MASTER_SITE_AFTERSTEP+= \
46         ftp://ftp.afterstep.org/%SUBDIR%/ \
47         ftp://ftp.kddlabs.co.jp/X11/AfterStep/%SUBDIR%/ \
48         ftp://ftp.dti.ad.jp/pub/X/AfterStep/%SUBDIR%/
49 .endif
50
51 .if !defined(IGNORE_MASTER_SITE_APACHE)
52 MASTER_SITE_APACHE+= \
53         http://www.apache.org/dist/%SUBDIR%/ \
54         http://archive.apache.org/dist/%SUBDIR%/ \
55         http://ftp.twaren.net/Unix/Web/apache/%SUBDIR%/ \
56         http://apache.mirror.uber.com.au/%SUBDIR%/ \
57         http://apache.spd.co.il/%SUBDIR%/ \
58         http://ftp.mirrorservice.org/sites/ftp.apache.org/%SUBDIR%/ \
59         http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.apache.org/dist/%SUBDIR%/ \
60         ftp://mir1.ovh.net/ftp.apache.org/dist/%SUBDIR%/ \
61         ftp://ftp.forthnet.gr/pub/www/apache/%SUBDIR%/ \
62         ftp://xenia.sote.hu/pub/mirrors/www.apache.org/%SUBDIR%/ \
63         ftp://ftp.heanet.ie/mirrors/www.apache.org/dist/%SUBDIR%/ \
64         ftp://ftp.sunet.se/pub/www/servers/apache/dist/%SUBDIR%/ \
65         http://mirrors.ircam.fr/pub/apache/%SUBDIR%/
66 .endif
67
68 .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_BINARIES)
69 MASTER_SITE_APACHE_COMMONS_BINARIES+= \
70         ${MASTER_SITE_APACHE:S,%SUBDIR%,commons/&/binaries,}
71 .endif
72
73 .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_SOURCE)
74 MASTER_SITE_APACHE_COMMONS_SOURCE+= \
75         ${MASTER_SITE_APACHE:S,%SUBDIR%,commons/&/source,}
76 .endif
77
78 .if !defined(IGNORE_MASTER_SITE_APACHE_HTTPD)
79 MASTER_SITE_APACHE_HTTPD+= \
80         ${MASTER_SITE_APACHE:S,%SUBDIR%,httpd/&,}
81 .endif
82
83 .if !defined(IGNORE_MASTER_SITE_APACHE_JAKARTA)
84 MASTER_SITE_APACHE_JAKARTA+= \
85         ${MASTER_SITE_APACHE:S,%SUBDIR%,jakarta/&,}
86 .endif
87
88 .if !defined(IGNORE_MASTER_SITE_APACHE_TOMCAT)
89 MASTER_SITE_APACHE_TOMCAT+= \
90         ${MASTER_SITE_APACHE:S,%SUBDIR%,tomcat/&,}
91 .endif
92
93 .if !defined(IGNORE_MASTER_SITE_APACHE_XML)
94 MASTER_SITE_APACHE_XML+= \
95         ${MASTER_SITE_APACHE:S,%SUBDIR%,xml/&,}
96 .endif
97
98 .if !defined(IGNORE_MASTER_SITE_BERLIOS)
99 MASTER_SITE_BERLIOS+= \
100         ${MASTER_SITE_SOURCEFORGE}
101 .endif
102
103 .if !defined(IGNORE_MASTER_SITE_CHEESESHOP)
104 # PEP-449 Compatible MASTER_SITES
105 # Removal of the PyPI Mirror Auto Discovery and Naming Scheme
106 # Reference: https://www.python.org/dev/peps/pep-0449/
107 MASTER_SITE_CHEESESHOP+= \
108         https://pypi.python.org/packages/%SUBDIR%/ \
109         https://files.pythonhosted.org/packages/%SUBDIR%/
110 .endif
111
112 .if !defined(IGNORE_MASTER_SITE_COMP_SOURCES)
113 MASTER_SITE_COMP_SOURCES+= \
114         http://ftp.isc.org/pub/usenet/comp.sources.%SUBDIR%/ \
115         http://ftp.funet.fi/pub/archive/comp.sources.%SUBDIR%/ \
116         http://ftp.sunet.se/pub/usenet/ftp.uu.net/comp.sources.%SUBDIR%/ \
117         http://ftp.fi.netbsd.org/pub/misc/archive/comp.sources.%SUBDIR%/
118 .endif
119
120 .if !defined(IGNORE_MASTER_SITE_DEBIAN)
121 MASTER_SITE_DEBIAN+= \
122         http://cdn.debian.net/debian/%SUBDIR%/ \
123         http://www.gtlib.gatech.edu/pub/debian/%SUBDIR%/ \
124         ftp://ftp.us.debian.org/debian/%SUBDIR%/ \
125         ${MASTER_SITE_DEBIAN_NON_US:S,/debian-non-US/,/debian/,}
126 .endif
127
128 .if !defined(IGNORE_MASTER_SITE_DEBIAN_NON_US)
129 MASTER_SITE_DEBIAN_NON_US+= \
130         ftp://ftp.au.debian.org/debian-non-US/%SUBDIR%/ \
131         ftp://ftp.bg.debian.org/debian-non-US/%SUBDIR%/ \
132         ftp://ftp.br.debian.org/debian-non-US/%SUBDIR%/ \
133         ftp://ftp.cl.debian.org/debian-non-US/%SUBDIR%/ \
134         ftp://ftp.cz.debian.org/debian-non-US/%SUBDIR%/ \
135         ftp://ftp.de.debian.org/debian-non-US/%SUBDIR%/ \
136         ftp://ftp.ee.debian.org/debian-non-US/%SUBDIR%/ \
137         ftp://ftp.es.debian.org/debian-non-US/%SUBDIR%/ \
138         ftp://ftp.fi.debian.org/debian-non-US/%SUBDIR%/ \
139         ftp://ftp.fr.debian.org/debian-non-US/%SUBDIR%/ \
140         ftp://ftp.hk.debian.org/debian-non-US/%SUBDIR%/ \
141         ftp://ftp.hr.debian.org/debian-non-US/%SUBDIR%/ \
142         ftp://ftp.hu.debian.org/debian-non-US/%SUBDIR%/ \
143         ftp://ftp.ie.debian.org/debian-non-US/%SUBDIR%/ \
144         ftp://ftp.is.debian.org/debian-non-US/%SUBDIR%/ \
145         ftp://ftp.it.debian.org/debian-non-US/%SUBDIR%/ \
146         ftp://ftp.jp.debian.org/debian-non-US/%SUBDIR%/ \
147         ftp://ftp.nl.debian.org/debian-non-US/%SUBDIR%/ \
148         ftp://ftp.no.debian.org/debian-non-US/%SUBDIR%/ \
149         ftp://ftp.pl.debian.org/debian-non-US/%SUBDIR%/ \
150         ftp://ftp.ru.debian.org/debian-non-US/%SUBDIR%/ \
151         ftp://ftp.se.debian.org/debian-non-US/%SUBDIR%/ \
152         ftp://ftp.si.debian.org/debian-non-US/%SUBDIR%/ \
153         ftp://ftp.sk.debian.org/debian-non-US/%SUBDIR%/ \
154         ftp://ftp.uk.debian.org/debian-non-US/%SUBDIR%/ \
155         ftp://ftp.wa.au.debian.org/debian-non-US/%SUBDIR%/ \
156         ftp://ftp2.de.debian.org/debian-non-US/%SUBDIR%/ \
157         ftp://ftp.snt.utwente.nl/pub/linux/debian-non-US/%SUBDIR%/ \
158         ftp://ftp.df.lth.se/pub/debian-non-US/%SUBDIR%/ \
159         ftp://ftp.acc.umu.se/debian-non-US/%SUBDIR%/ \
160         ftp://mirror.symnds.com/debian-non-US/%SUBDIR%/
161 .endif
162
163 .if !defined(IGNORE_MASTER_SITE_DEBIAN_POOL)
164 MASTER_SITE_DEBIAN_POOL+= \
165         ${MASTER_SITE_DEBIAN:C|(/%SUBDIR%/)|/pool/main/${PORTNAME:C/^(.).*$/\1/}/${PORTNAME}/|}
166 .endif
167
168 .if !defined(IGNORE_MASTER_SITE_EASYSW)
169 MASTER_SITE_EASYSW+= \
170         http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/%SUBDIR%/ \
171         ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/%SUBDIR%/
172 .endif
173
174 .if !defined(IGNORE_MASTER_SITE_ECLIPSE)
175 MASTER_SITE_ECLIPSE+= \
176         ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse.org/%SUBDIR%/ \
177         ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/%SUBDIR%/ \
178         http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/%SUBDIR%/ \
179         ftp://sunsite.cnlab-switch.ch/mirror/eclipse/%SUBDIR%/ \
180         ftp://sunsite.cnlab-switch.ch/mirror/eclipse/eclipse/downloads/drops/%SUBDIR%/ \
181         ftp://sunsite.cnlab-switch.ch/mirror/eclipse/eclipse/downloads/drops4/%SUBDIR%/ \
182         http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/%SUBDIR%/
183 .endif
184
185 .if !defined(IGNORE_MASTER_SITE_EXIM)
186 MASTER_SITE_EXIM+= \
187         ftp://ftp.exim.org/pub/exim/%SUBDIR%/ \
188         ftp://exim.inode.at/exim/%SUBDIR%/ \
189         ftp://exim-ftp.itsoft.at/exim/exim/%SUBDIR%/ \
190         http://exim-ftp.itsoft.at/exim/%SUBDIR%/ \
191         ftp://ftp.easynet.be/exim/exim/%SUBDIR%/ \
192         ftp://mirror.kn.vutbr.cz/pub/ftp.exim.org/exim/%SUBDIR%/ \
193         http://exim.mirror.fr/exim/%SUBDIR%/ \
194         http://mirrors.zerg.biz/exim/exim/%SUBDIR%/ \
195         http://dl.ambiweb.de/mirrors/ftp.exim.org/exim/%SUBDIR%/ \
196         ftp://exim.noris.de/exim/%SUBDIR%/ \
197         ftp://ftp.bytemine.net/exim/exim/%SUBDIR%/ \
198         ftp://exim.mirror.iphh.net/ftp/exim/%SUBDIR%/ \
199         http://exim.mirror.iphh.net/ftp/exim/%SUBDIR%/ \
200         ftp://ftp.fu-berlin.de/unix/mail/exim/%SUBDIR%/ \
201         http://exim-ftp.octet.hu/exim/%SUBDIR%/ \
202         ftp://ftp.heanet.ie/pub/exim/%SUBDIR%/ \
203         http://ftp.heanet.ie/pub/exim/%SUBDIR%/ \
204         http://washitake.com/mail/exim/mirror/exim/%SUBDIR%/ \
205         ftp://ftp.tin.org/pub/mail/exim/%SUBDIR%/ \
206         http://exim.psshee.com/ftp/exim/%SUBDIR%/ \
207         ftp://mirror.hostfuss.com/exim/ftp/exim/%SUBDIR%/ \
208         http://mirror.hostfuss.com/exim/ftp/exim/%SUBDIR%/ \
209         ftp://ftp.nl.uu.net/pub/unix/mail/exim/exim/%SUBDIR%/ \
210         ftp://sunsite.uio.no/pub/mail/exim/exim/%SUBDIR%/ \
211         http://piotrkosoft.net/pub/mirrors/ftp.exim.org/exim/%SUBDIR%/ \
212         ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.exim.org/exim/%SUBDIR%/ \
213         ftp://sunsite.icm.edu.pl/pub/unix/mail/exim/exim/%SUBDIR%/ \
214         http://sunsite.icm.edu.pl/pub/unix/mail/exim/exim/%SUBDIR%/ \
215         ftp://ftp.is.co.za/networking/mail/mta/exim/ftp/exim/%SUBDIR%/ \
216         ftp://mirrors.dominios.pt/pub/ftp.exim.org/exim/%SUBDIR%/ \
217         ftp://mirror.switch.ch/mirror/exim/exim/%SUBDIR%/ \
218         http://mirror.switch.ch/ftp/mirror/exim/exim/%SUBDIR%/ \
219         ftp://ftp.reaper.org/pub/exim/exim/%SUBDIR%/ \
220         ftp://sunsite.cnlab-switch.ch/mirror/exim/exim/%SUBDIR%/ \
221         ftp://ftp.demon.co.uk/pub/mirrors/exim/%SUBDIR%/ \
222         ftp://mirror.tje.me.uk/pub/mirrors/ftp.exim.org/exim/%SUBDIR%/ \
223         http://mirror.tje.me.uk/pub/mirrors/ftp.exim.org/exim/%SUBDIR%/ \
224         ftp://ftp.fsckit.net/pub/exim/exim/%SUBDIR%/ \
225         ftp://idcnetwork.org/pub/exim/exim/%SUBDIR%/ \
226         http://ftp.exim.llorien.org/exim/%SUBDIR%
227 .endif
228
229 .if !defined(IGNORE_MASTER_SITE_CENTOS_LINUX)
230 MASTER_SITE_CENTOS_LINUX+= \
231         http://mirror.centos.org/%SUBDIR%/ \
232         http://vault.centos.org/%SUBDIR%/ \
233         http://mirror.centos.org/centos/${LINUX_DIST_VER}/os/${LINUX_REPO_ARCH}/Packages/ \
234         http://vault.centos.org/${LINUX_DIST_VER}/os/${LINUX_REPO_ARCH}/Packages/ \
235         http://vault.centos.org/${LINUX_DIST_VER}/os/Source/SPackages/:SOURCE
236 .endif
237
238 .if !defined(IGNORE_MASTER_SITE_CENTOS_LINUX)
239 MASTER_SITE_CENTOS_LINUX_UPDATES+= \
240         http://mirror.centos.org/centos/${LINUX_DIST_VER}/updates/${LINUX_REPO_ARCH}/Packages/ \
241         http://vault.centos.org/${LINUX_DIST_VER}/updates/${LINUX_REPO_ARCH}/Packages/ \
242         http://vault.centos.org/${LINUX_DIST_VER}/updates/Source/SPackages/:SOURCE
243 .endif
244
245 .if !defined(IGNORE_MASTER_SITE_EPEL)
246 MASTER_SITE_EPEL+= \
247         http://dl.fedoraproject.org/pub/epel/6/${LINUX_REPO_ARCH}/ \
248         http://dl.fedoraproject.org/pub/epel/6/SRPMS/:DEFAULT,SOURCE
249 .endif
250
251 .if !defined(IGNORE_MASTER_SITE_FEDORA_LINUX)
252 MASTER_SITE_FEDORA_LINUX+= \
253         http://archives.fedoraproject.org/pub/archive/fedora/linux/core/%SUBDIR%/ \
254         ftp://ftp.pbone.net/vol4/archive.fedoraproject.org/fedora/linux/core/%SUBDIR%/ \
255         ftp://mirror.solarvps.com/fedora/archive/fedora/linux/core/%SUBDIR%/ \
256         ftp://ftp.gmd.de/archives.fedoraproject.org/fedora/linux/core/%SUBDIR%/ \
257         ftp://mirror.fraunhofer.de/archives.fedoraproject.org/fedora/linux/core/%SUBDIR%/ \
258         ftp://linuxsoft.cern.ch/fedora/linux/core/%SUBDIR%/ \
259         ftp://ftp-mirror.bi.fraunhofer.de/archives.fedoraproject.org/fedora/linux/core/%SUBDIR%/ \
260         http://ftp.udl.es/pub/fedora/linux/core/%SUBDIR%/ \
261         http://ftp.sunet.se/pub/Linux/distributions/fedora/linux/core/%SUBDIR%/ \
262         ftp://ftp.sunet.se/pub/Linux/distributions/fedora/linux/core/%SUBDIR%/ \
263         ftp://ftp.udl.es/pub/fedora/linux/core/%SUBDIR%/ \
264         http://mirrors.kernel.org/fedora/core/%SUBDIR%/ \
265         ftp://mirrors.kernel.org/fedora/core/%SUBDIR%/ \
266         http://mirror.web-ster.com/fedora/core/%SUBDIR%/ \
267         ftp://mirror.web-ster.com/fedora/core/%SUBDIR%/ \
268         http://rpmfind.net/linux/fedora/core/%SUBDIR%/ \
269         ftp://ftp.gtlib.gatech.edu/pub/fedora.redhat/linux/core/%SUBDIR%/ \
270         ftp://fedora.mirrors.tds.net/pub/fedora-core/%SUBDIR%/ \
271         http://ftp.ndlug.nd.edu/pub/fedora/linux/core/%SUBDIR%/ \
272         ftp://ftp.ndlug.nd.edu/pub/fedora/linux/core/%SUBDIR%/ \
273         ftp://ftp.belnet.be/linux/fedora/linux/core/%SUBDIR%/ \
274         http://sunsite.mff.cuni.cz/pub/fedora/%SUBDIR%/ \
275         ftp://sunsite.mff.cuni.cz/pub/fedora/%SUBDIR%/ \
276         ftp://ultra.linux.cz/pub/fedora/%SUBDIR%/ \
277         http://fr2.rpmfind.net/linux/fedora/core/%SUBDIR%/ \
278         ftp://fr2.rpmfind.net/linux/fedora/core/%SUBDIR%/ \
279         http://wftp.tu-chemnitz.de/pub/linux/fedora-core/%SUBDIR%/ \
280         ftp://ftp.tu-chemnitz.de/pub/linux/fedora-core/%SUBDIR%/ \
281         http://ftp.heanet.ie/pub/fedora/linux/core/%SUBDIR%/ \
282         ftp://ftp.heanet.ie/pub/fedora/linux/core/%SUBDIR%/ \
283         ftp://alviss.et.tudelft.nl/pub/fedora/core/%SUBDIR%/ \
284         http://ftp.surfnet.nl/ftp/pub/os/Linux/distr/fedora/linux/core/%SUBDIR%/ \
285         ftp://ftp.surfnet.nl/pub/os/Linux/distr/fedora/linux/core/%SUBDIR%/ \
286         http://ftp.nluug.nl/ftp/pub/os/Linux/distr/fedora/linux/core/%SUBDIR%/ \
287         ftp://ftp.nluug.nl/pub/os/Linux/distr/fedora/linux/core/%SUBDIR%/ \
288         ftp://ftp.uninett.no/pub/linux/Fedora/core/%SUBDIR%/ \
289         http://ftp.man.poznan.pl/pub/linux/fedora/core/%SUBDIR%/ \
290         ftp://ftp.man.poznan.pl/pub/linux/fedora/%SUBDIR%/ \
291         http://ftp.ps.pl/pub/linux/fedora-core/%SUBDIR%/ \
292         ftp://ftp.ps.pl/pub/linux/fedora-core/%SUBDIR%/ \
293         ftp://ftp.kappa.ro/pub/Linux/Distributions/fedora/%SUBDIR%/ \
294         http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/core/%SUBDIR%/ \
295         ftp://ftp.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/core/%SUBDIR%/ \
296         ftp://ftp.hostrino.com/pub/fedora/linux/core/%SUBDIR%/ \
297         ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/core/%SUBDIR%/ \
298         http://ftp.kddilabs.jp/Linux/packages/fedora/core/%SUBDIR%/ \
299         ftp://ftp.kddilabs.jp/Linux/packages/fedora/core/%SUBDIR%/ \
300         ftp://ftp.riken.go.jp/pub/Linux/fedora/core/%SUBDIR%/ \
301         http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/%SUBDIR%/ \
302         ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/%SUBDIR%/ \
303         http://www.las.ic.unicamp.br/pub/fedora/linux/core/%SUBDIR%/ \
304         ftp://www.las.ic.unicamp.br/pub/fedora/linux/core/%SUBDIR%/ \
305         ftp://mirror.netglobalis.net/pub/fedora/%SUBDIR%/ \
306         http://mirror.pacific.net.au/linux/redhat/fedora/%SUBDIR%/ \
307         ftp://mirror.pacific.net.au/linux/redhat/fedora/%SUBDIR%/ \
308         http://ftp.univie.ac.at/systems/linux/fedora/core/%SUBDIR%/ \
309         http://mirror.aarnet.edu.au/pub/fedora/linux/core/%SUBDIR%/ \
310         ftp://mirror.aarnet.edu.au/pub/fedora/linux/core/%SUBDIR%/ \
311         http://fedora.mirror.iweb.ca/core/%SUBDIR%/ \
312         ftp://fedora.mirror.iweb.ca/core/%SUBDIR%/ \
313         ftp://ftp.telus.net/pub/fedora/linux/core/%SUBDIR%/ \
314         http://fedora.arcticnetwork.ca/linux/core/%SUBDIR%/ \
315         http://www.muug.mb.ca/pub/fedora/linux/core/%SUBDIR%/ \
316         ftp://ftp.muug.mb.ca/pub/fedora/linux/core/%SUBDIR%/ \
317         ftp://ftp.solnet.ch/mirror/fedora/linux/core/%SUBDIR%/ \
318         http://mirror.karneval.cz/pub/linux/fedora/linux/core/%SUBDIR%/ \
319         ftp://ftp.telmexchile.cl/Unix/fedora/linux/core/%SUBDIR%/ \
320         http://ftp.sh.cvut.cz/MIRRORS/fedora/%SUBDIR%/ \
321         ftp://ftp.sh.cvut.cz/MIRRORS/fedora/%SUBDIR%/ \
322         http://sunsite.mff.cuni.cz/MIRRORS/fedora.redhat.com/linux/core/%SUBDIR%/ \
323         ftp://sunsite.mff.cuni.cz/MIRRORS/fedora.redhat.com/linux/core/%SUBDIR%/ \
324         http://ftp-stud.hs-esslingen.de/pub/fedora/linux/core/%SUBDIR%/ \
325         ftp://ftp-stud.hs-esslingen.de/pub/fedora/linux/core/%SUBDIR%/ \
326         http://ftp.uni-erlangen.de/pub/Linux/MIRROR.fedora/core/%SUBDIR%/ \
327         http://ftp.uni-bayreuth.de/linux/fedora/linux/core/%SUBDIR%/ \
328         ftp://ftp.uni-bayreuth.de/pub/linux/fedora/linux/core/%SUBDIR%/ \
329         ftp://ftp.fu-berlin.de/linux/fedora/core/%SUBDIR%/ \
330         http://ftp.uni-koeln.de/mirrors/fedora/linux/core/%SUBDIR%/ \
331         ftp://ftp.uni-koeln.de/mirrors/fedora/linux/core/%SUBDIR%/ \
332         ftp://ftp.informatik.uni-frankfurt.de/pub/linux/Mirror/ftp.redhat.com/fedora/core/%SUBDIR%/ \
333         http://mirrors.ircam.fr/pub/fedora/linux/core/%SUBDIR%/ \
334         ftp://mirrors.ircam.fr/pub/fedora/linux/core/%SUBDIR%/ \
335         http://ftp.crihan.fr/mirrors/fedora.redhat.com/fedora/linux/core/%SUBDIR%/ \
336         ftp://ftp.crihan.fr/mirrors/fedora.redhat.com/fedora/linux/core/%SUBDIR%/ \
337         ftp://ftp.univ-pau.fr/pub/mirrors/fedora/%SUBDIR%/ \
338         ftp://ftp.lip6.fr/pub/linux/distributions/fedora/%SUBDIR%/ \
339         http://fr.rpmfind.net/linux/fedora/core/%SUBDIR%/ \
340         http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/core/%SUBDIR%/ \
341         http://ftp.rhnet.is/pub/fedora/linux/core/%SUBDIR%/ \
342         ftp://ftp.rhnet.is/pub/fedora/linux/core/%SUBDIR%/ \
343         http://ftp.unina.it/pub/linux/distributions/fedora/%SUBDIR%/ \
344         ftp://ftp.unina.it/pub/linux/distributions/fedora/%SUBDIR%/ \
345         http://ftp.iij.ad.jp/pub/linux/fedora/core/%SUBDIR%/ \
346         ftp://ftp.iij.ad.jp/pub/linux/fedora/core/%SUBDIR%/ \
347         http://ftp.dti.ad.jp/pub/Linux/Fedora/core/%SUBDIR%/ \
348         ftp://ftp.dti.ad.jp/pub/Linux/Fedora/core/%SUBDIR%/ \
349         http://ftp.nara.wide.ad.jp/pub/Linux/fedora/core/%SUBDIR%/ \
350         http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/core/%SUBDIR%/ \
351         ftp://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/core/%SUBDIR%/ \
352         http://ftp.jaist.ac.jp/pub/Linux/Fedora/core/%SUBDIR%/ \
353         ftp://ftp.jaist.ac.jp/pub/Linux/Fedora/core/%SUBDIR%/ \
354         http://ftp.riken.jp/Linux/fedora/core/%SUBDIR%/ \
355         ftp://ftp.kreonet.re.kr/pub/Linux/fedora/core/%SUBDIR%/ \
356         ftp://fedora.ifc.unam.mx/linux/fedora/core/%SUBDIR%/ \
357         ftp://ftp.quicknet.nl/pub/Linux/download.fedora.redhat.com/core/%SUBDIR%/ \
358         ftp://ftp.uib.no/pub/fedora/linux/core/%SUBDIR%/ \
359         ftp://ftp.tpnet.pl/d17/fedora/%SUBDIR%/ \
360         http://ftp.wsisiz.edu.pl/pub/linux/fedora/linux/core/%SUBDIR%/ \
361         ftp://ftp.pbone.net/pub/fedora/pub/fedora/linux/core/%SUBDIR%/ \
362         http://ftp.pwr.wroc.pl/pub/linux/fedora/linux/core/%SUBDIR%/ \
363         ftp://ftp.pwr.wroc.pl/pub/linux/fedora/linux/core/%SUBDIR%/ \
364         ftp://mirrors.hpcf.upr.edu/pub/Mirrors/redhat/download.fedora.redhat.com/%SUBDIR%/ \
365         http://ftp.astral.ro/mirrors/fedora/pub/fedora/linux/core/%SUBDIR%/ \
366         ftp://ftp.astral.ro/mirrors/fedora/pub/fedora/linux/core/%SUBDIR%/ \
367         ftp://ftp.rdsor.ro/pub/Linux/Distributions/Fedora/%SUBDIR%/ \
368         http://ftp.chg.ru/pub/Linux/fedora/linux/core/%SUBDIR%/ \
369         ftp://ftp.chg.ru/pub/Linux/fedora/linux/core/%SUBDIR%/ \
370         http://ftp.rhd.ru/pub/fedora/linux/core/%SUBDIR%/ \
371         ftp://ftp.rhd.ru/pub/fedora/linux/core/%SUBDIR%/ \
372         http://ftp.port80.se/fedora/core/%SUBDIR%/ \
373         ftp://ftp.port80.se/fedora/core/%SUBDIR%/ \
374         http://ftp.upjs.sk/pub/fedora/linux/core/%SUBDIR%/ \
375         ftp://ftp.upjs.sk/pub/fedora/linux/core/%SUBDIR%/ \
376         ftp://ftp.tlk-l.net/pub/mirrors/fedora.redhat.com/linux/core/%SUBDIR%/ \
377         http://limestone.uoregon.edu/ftp/fedora/%SUBDIR%/ \
378         ftp://limestone.uoregon.edu/fedora/%SUBDIR%/ \
379         ftp://fedora.bu.edu/core/%SUBDIR%/ \
380         http://mirror.anl.gov/pub/fedora-linux-core/%SUBDIR%/ \
381         ftp://mirror.anl.gov/pub/fedora-linux-core/%SUBDIR%/ \
382         ftp://ftp.cse.buffalo.edu/pub/Linux/fedora/linux/core/%SUBDIR%/ \
383         ftp://ftp.applios.net/pub/fedora/linux/core/%SUBDIR%/ \
384         http://mirror.steadfast.net/fedora/core/%SUBDIR%/ \
385         http://mirror.eas.muohio.edu/fedora/linux/core/%SUBDIR%/ \
386         http://mirror.engr.sjsu.edu/pub/fedora/linux/core/%SUBDIR%/ \
387         http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/core/%SUBDIR%/ \
388         ftp://ftp.gtlib.gatech.edu/pub/fedora.redhat/linux/core/%SUBDIR%/ \
389         http://mirror.cogentco.com/pub/linux/fedora/linux/core/%SUBDIR%/ \
390         http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/core/%SUBDIR%/ \
391         ftp://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/core/%SUBDIR%/
392 .endif
393
394 .if !defined(IGNORE_MASTER_SITE_FARSIGHT)
395 MASTER_SITE_FARSIGHT+= \
396         https://dl.farsightsecurity.com/dist/%SUBDIR%/
397 .endif
398
399 .if !defined(IGNORE_MASTER_SITE_FESTIVAL)
400 MASTER_SITE_FESTIVAL+= \
401         http://www.festvox.org/packed/festival/%SUBDIR%/ \
402         http://www.cstr.ed.ac.uk/downloads/festival/%SUBDIR%/ \
403         http://stuff.mit.edu/afs/sipb/project/speech-tools/src/festival/festvox.org/packed/festival/%SUBDIR%/
404 .endif
405
406 .if !defined(IGNORE_MASTER_SITE_FESTIVAL_OGI)
407 MASTER_SITE_FESTIVAL_OGI+= \
408         ftp://ftp.tuwien.ac.at/opsys/linux/blinux/festival/mirror.ogi-synth_home/ \
409         http://www.cslu.ogi.edu/tts/download/data/
410 .endif
411
412 #
413 # FreeBSD mirror sites
414 #
415 # For the full list, see the Handbook:
416 #
417 #    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html
418 #
419 .if !defined(IGNORE_MASTER_SITE_FREEBSD_ORG)
420 MASTER_SITE_FREEBSD_ORG+= \
421         ftp://ftp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
422         ftp://ftp.se.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
423         ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
424         ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
425         ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
426         ftp://ftp.dti.ad.jp/pub/FreeBSD/%SUBDIR%/
427 .endif
428
429 .if !defined(IGNORE_MASTER_SITE_FRUGALWARE)
430 MASTER_SITE_FRUGALWARE+= \
431         ftp://ftp7.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \
432         ftp://ftp2.frugalware.org/mirror/ftp.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \
433         ftp://ftp6.frugalware.org/mirrors/linux/frugalware/frugalware-stable/source/%SUBDIR%/ \
434         ftp://ftp4.frugalware.org/pub/linux/distributions/frugalware/frugalware-stable/source/%SUBDIR%/ \
435         ftp://ftp12.frugalware.org/mirrors/ftp.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \
436         ftp://ftp10.frugalware.org/pub/linux/frugalware/frugalware-stable/source/%SUBDIR%/
437 #       ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware/frugalware-stable/source/%SUBDIR%/
438 #       ftp://ftp3.frugalware.org/mirrors/frugalware/pub/frugalware/frugalware-stable/source/%SUBDIR%/
439 #       ftp://ftp9.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/
440 .endif
441
442 .if !defined(IGNORE_MASTER_SITE_GCC)
443 MASTER_SITE_GCC+= \
444         http://mirrors.kernel.org/sources.redhat.com/gcc/%SUBDIR%/ \
445         http://gcc.parentingamerica.com/%SUBDIR%/ \
446         http://gcc.skazkaforyou.com/%SUBDIR%/ \
447         http://gcc.cybermirror.org/%SUBDIR%/ \
448         http://gcc-uk.internet.bs/%SUBDIR%/ \
449         http://www.netgull.com/gcc/%SUBDIR%/ \
450         http://robotlab.itk.ppke.hu/gcc/%SUBDIR%/ \
451         http://gcc.fyxm.net/%SUBDIR%/ \
452         http://gcc.igor.onlinedirect.bg/%SUBDIR%/ \
453         ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/%SUBDIR%/ \
454         ftp://gcc.gnu.org/pub/gcc/%SUBDIR%/ \
455         ftp://ftp.lip6.fr/pub/gcc/%SUBDIR%/ \
456         ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/%SUBDIR%/ \
457         ftp://ftp.uvsq.fr/pub/gcc/%SUBDIR%/ \
458         ftp://ftp.gwdg.de/pub/misc/gcc/%SUBDIR%/ \
459         ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/gcc.gnu.org/pub/gcc/%SUBDIR%/ \
460         ftp://ftp.nluug.nl/mirror/languages/gcc/%SUBDIR%/ \
461         ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/%SUBDIR%/ \
462         ftp://ftp.ntua.gr/pub/gnu/gcc/%SUBDIR%/
463 .endif
464
465 .if !defined(IGNORE_MASTER_SITE_GENTOO)
466 MASTER_SITE_GENTOO+= \
467         http://gentoo.mirrors.pair.com/%SUBDIR%/ \
468         http://mirrors.tds.net/pub/gentoo/%SUBDIR%/ \
469         ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/%SUBDIR%/ \
470         http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/%SUBDIR%/ \
471         http://ftp.snt.utwente.nl/pub/os/linux/gentoo/%SUBDIR%/ \
472         http://trumpetti.atm.tut.fi/gentoo/%SUBDIR%/ \
473         http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/%SUBDIR%/ \
474         http://ftp.uni-erlangen.de/pub/mirrors/gentoo/%SUBDIR%/ \
475         http://darkstar.ist.utl.pt/gentoo/%SUBDIR%/ \
476         http://gentoo.inode.at/%SUBDIR%/ \
477         http://ftp.rhnet.is/pub/gentoo/%SUBDIR%/ \
478         http://gentoo.gg3.net/%SUBDIR%/ \
479         http://gentoo.kems.net/%SUBDIR%/ \
480         ftp://ftp.gtlib.gatech.edu/pub/gentoo/%SUBDIR%/ \
481         ftp://mirror.iawnet.sandia.gov/pub/gentoo/%SUBDIR%/ \
482         ftp://ftp.ussg.iu.edu/pub/linux/gentoo/%SUBDIR%/ \
483         ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/%SUBDIR%/ \
484         ftp://gentoo.mirrors.pair.com/%SUBDIR%/ \
485         ftp://mirrors.tds.net/pub/gentoo/%SUBDIR%/ \
486         ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/%SUBDIR%/ \
487         ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/%SUBDIR%/ \
488         ftp://trumpetti.atm.tut.fi/gentoo/%SUBDIR%/ \
489         ftp://sunsite.cnlab-switch.ch/mirror/gentoo/%SUBDIR%/ \
490         ftp://ftp.tu-clausthal.de/pub/linux/gentoo/%SUBDIR%/ \
491         ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/%SUBDIR%/ \
492         ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/%SUBDIR%/ \
493         ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/%SUBDIR%/ \
494         ftp://darkstar.ist.utl.pt/pub/gentoo/%SUBDIR%/ \
495         ftp://gentoo.inode.at/source/%SUBDIR%/ \
496         ftp://ftp.rhnet.is/pub/gentoo/%SUBDIR%/ \
497         ftp://files.gentoo.gr/%SUBDIR%/
498 .endif
499
500 .if !defined(IGNORE_MASTER_SITE_GITHUB)
501 #
502 # In order to use GitHub your port must define USE_GITHUB and the following
503 # variables:
504 #
505 # GH_ACCOUNT    - account name of the GitHub user hosting the project
506 #                 default: ${PORTNAME}
507 #
508 # GH_PROJECT    - name of the project on GitHub
509 #                 default: ${PORTNAME}
510 #
511 # GH_TAGNAME    - name of the tag to download (2.0.1, hash, ...)
512 #                 Using the name of a branch here is incorrect. It is
513 #                 possible to do GH_TAGNAME= GIT_HASH to do a snapshot.
514 #                 default: ${DISTVERSION}
515 # GH_TUPLE      - above shortened to account:project:tagname[:group]
516 #
517 .if defined(USE_GITHUB)
518 .  if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
519 IGNORE?=        Using master as GH_TAGNAME is invalid. \
520                 Must use a tag or commit hash so the upstream does \
521                 not "reroll" as soon as the branch is updated
522 .  endif
523 .  if defined(GH_TUPLE)
524 GH_ACCOUNT+=    ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1\4@}
525 GH_PROJECT+=    ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2\4@}
526 GH_TAGNAME+=    ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3\4@}
527 .  endif
528 # We are cheating and using backend URLS for Github here. See ports/194898
529 # comment #15 for explanation as to why and how to deal with it if it breaks.
530 MASTER_SITE_GITHUB+=            https://codeload.github.com/%SUBDIR%
531 MASTER_SITE_GITHUB_CLOUD+=      https://cloud.github.com/downloads/%SUBDIR%
532
533 .  if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault}
534 MASTER_SITES+=  GH
535 .  endif
536 GH_ACCOUNT_DEFAULT=     ${PORTNAME}
537 GH_ACCOUNT?=    ${GH_ACCOUNT_DEFAULT}
538 GH_PROJECT_DEFAULT=     ${PORTNAME}
539 GH_PROJECT?=    ${GH_PROJECT_DEFAULT}
540 # Use full PREFIX/SUFFIX and converted DISTVERSION
541 GH_TAGNAME_DEFAULT=     ${DISTVERSIONFULL}
542 GH_TAGNAME?=    ${GH_TAGNAME_DEFAULT}
543 # Iterate over GH_ACCOUNT, GH_PROJECT and GH_TAGNAME to extract groups
544 _GITHUB_GROUPS= DEFAULT
545 .  for _A in ${GH_ACCOUNT}
546 _S_TEMP=        ${_A:S/^${_A:C@:[^/:]+$@@}//:S/^://}
547 .    if !empty(_S_TEMP)
548 .      for _group in ${_S_TEMP:S/,/ /g}
549 _G_TEMP=        ${_group}
550 .        if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default
551 check-makevars::
552                 @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
553                 @${ECHO_MSG} "used in group definitions. Please fix your GH_ACCOUNT"
554                 @${FALSE}
555 .        endif
556 .        if !${_GITHUB_GROUPS:M${_group}}
557 _GITHUB_GROUPS+=        ${_group}
558 .         endif
559 GH_ACCOUNT_${_group}=   ${_A:C@^(.*):[^/:]+$@\1@}
560 .      endfor
561 .    else
562 GH_ACCOUNT_DEFAULT=     ${_A:C@^(.*):[^/:]+$@\1@}
563 .    endif
564 .  endfor
565 .  for _P in ${GH_PROJECT}
566 _S_TEMP=        ${_P:S/^${_P:C@:[^/:]+$@@}//:S/^://}
567 .    if !empty(_S_TEMP)
568 .      for _group in ${_S_TEMP:S/,/ /g}
569 _G_TEMP=        ${_group}
570 .        if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default
571 check-makevars::
572                 @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
573                 @${ECHO_MSG} "used in group definitions. Please fix your GH_PROJECT"
574                 @${FALSE}
575 .        endif
576 .        if !${_GITHUB_GROUPS:M${_group}}
577 _GITHUB_GROUPS+=        ${_group}
578 .         endif
579 GH_PROJECT_${_group}=   ${_P:C@^(.*):[^/:]+$@\1@}
580 .      endfor
581 .    else
582 GH_PROJECT_DEFAULT=     ${_P:C@^(.*):[^/:]+$@\1@}
583 .    endif
584 .  endfor
585 .  for _T in ${GH_TAGNAME}
586 _S_TEMP=        ${_T:S/^${_T:C@:[^/:]+$@@}//:S/^://}
587 .    if !empty(_S_TEMP)
588 .      for _group in ${_S_TEMP:S/,/ /g}
589 _G_TEMP=        ${_group}
590 .        if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default
591 check-makevars::
592                 @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
593                 @${ECHO_MSG} "used in group definitions. Please fix your GH_TAGNAME"
594                 @${FALSE}
595 .        endif
596 .        if !${_GITHUB_GROUPS:M${_group}}
597 _GITHUB_GROUPS+=        ${_group}
598 .         endif
599 GH_TAGNAME_${_group}=   ${_T:C@^(.*):[^/:]+$@\1@}
600 .      endfor
601 .    else
602 GH_TAGNAME_DEFAULT=     ${_T:C@^(.*):[^/:]+$@\1@}
603 .    endif
604 .  endfor
605 # Put the default values back into the variables so that the *default* behavior
606 # is not changed.
607 GH_ACCOUNT:=    ${GH_ACCOUNT_DEFAULT}
608 GH_PROJECT:=    ${GH_PROJECT_DEFAULT}
609 GH_TAGNAME:=    ${GH_TAGNAME_DEFAULT}
610 .  if defined(GH_TAGNAME)
611 GH_TAGNAME_SANITIZED=   ${GH_TAGNAME:S,/,-,}
612 # Github silently converts tags starting with v to not have v in the filename
613 # and extraction directory.
614 GH_TAGNAME_EXTRACT=     ${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/}
615 .  endif 
616 .  if defined(_GITHUB_MUST_SET_DISTNAME)
617 # GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice
618 .    if ${GH_TAGNAME} != ${DISTVERSIONFULL}
619 DISTNAME=       ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED}
620 .    else
621 DISTNAME=       ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED}
622 .    endif
623 .  endif
624 # This new scheme rerolls distfiles. Also ensure they are renamed to avoid
625 # conflicts. Use _GITHUB_REV in case github changes their zipping or structure
626 # which has happened before.
627 _GITHUB_REV=    0
628 .  if ${MASTER_SITES:MGH}
629 DISTNAME:=      ${DISTNAME}_GH${_GITHUB_REV}
630 .  endif
631 _GITHUB_EXTRACT_SUFX=   .tar.gz
632 # Put the DEFAULT distfile first
633 .  if !${USE_GITHUB:Mnodefault} && defined(_GITHUB_MUST_SET_DISTNAME)
634 DISTFILES+=     ${DISTNAME}${_GITHUB_EXTRACT_SUFX}
635 .  endif
636 # If there are non default groups
637 .  if !empty(_GITHUB_GROUPS:NDEFAULT)
638 # Then for each of the remaining groups, add DISTFILES and MASTER_SITES
639 # entries with the correct group and create {WRKSRC,DISTNAME,DISTFILES}_group
640 # helper variables.
641 .    for _group in ${_GITHUB_GROUPS:NDEFAULT}
642 GH_ACCOUNT_${_group}?=  ${GH_ACCOUNT_DEFAULT}
643 GH_PROJECT_${_group}?=  ${GH_PROJECT_DEFAULT}
644 GH_TAGNAME_${_group}?=  ${GH_TAGNAME_DEFAULT}
645 GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,}
646 GH_TAGNAME_${_group}_EXTRACT=   ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/}
647 DISTNAME_${_group}:=    ${GH_ACCOUNT_${_group}}-${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_SANITIZED}
648 DISTFILE_${_group}:=    ${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUFX}
649 DISTFILES:=     ${DISTFILES} ${DISTFILE_${_group}}:${_group}
650 MASTER_SITES:=  ${MASTER_SITES} ${MASTER_SITE_GITHUB:S@%SUBDIR%@${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}/tar.gz/${GH_TAGNAME_${_group}}?dummy=/:${_group}@}
651 WRKSRC_${_group}:=      ${WRKDIR}/${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_EXTRACT}
652 .    endfor
653 .  endif
654 .endif # defined(USE_GITHUB)
655 .endif # !defined(IGNORE_MASTER_SITE_GITHUB)
656
657 .if !defined(IGNORE_MASTER_SITE_GNOME)
658 MASTER_SITE_GNOME+= \
659         https://download.gnome.org/%SUBDIR%/ \
660         http://download.gnome.org/%SUBDIR%/ \
661         ftp://ftp.belnet.be/mirror/ftp.gnome.org/%SUBDIR%/ \
662         http://ftp.acc.umu.se/pub/GNOME/%SUBDIR%/ \
663         ftp://ftp.cse.buffalo.edu/pub/Gnome/%SUBDIR%/ \
664         http://fr2.rpmfind.net/linux/gnome.org/%SUBDIR%/ \
665         http://www.gtlib.gatech.edu/pub/gnome/%SUBDIR%/ \
666         ftp://ftp.dti.ad.jp/pub/X/gnome/%SUBDIR%/ \
667         http://linorg.usp.br/gnome/%SUBDIR%/ \
668         http://mirror.aarnet.edu.au/pub/gnome/%SUBDIR%/ \
669         ftp://ftp.kddlabs.co.jp/pub/GNOME/%SUBDIR%/ \
670         ftp://ftp.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/%SUBDIR%/ \
671         ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/%SUBDIR%/ \
672         http://ftp.gnome.org/pub/GNOME/%SUBDIR%/
673 .endif
674
675 .if !defined(IGNORE_MASTER_SITE_GIMP)
676 MASTER_SITE_GIMP+= \
677         http://gimp.mirrors.hoobly.com/pub/%SUBDIR%/ \
678         http://gimper.net/downloads/pub/%SUBDIR%/ \
679         http://mirror.hessmo.com/gimp/pub/%SUBDIR%/ \
680         http://de-mirror.gimper.net/pub/%SUBDIR%/ \
681         http://gimp.afri.cc/pub/%SUBDIR%/ \
682         http://download.gimp.org/pub/%SUBDIR%/
683 .endif
684
685 .if !defined(IGNORE_MASTER_SITE_GNU)
686 MASTER_SITE_GNU+= \
687         http://ftpmirror.gnu.org/%SUBDIR%/ \
688         http://ftp.gnu.org/gnu/%SUBDIR%/ \
689         ftp://ftp.gnu.org/gnu/%SUBDIR%/ \
690         http://www.gtlib.gatech.edu/pub/gnu/gnu/%SUBDIR%/ \
691         http://mirrors.kernel.org/gnu/%SUBDIR%/ \
692         ftp://ftp.kddlabs.co.jp/GNU/gnu/%SUBDIR%/ \
693         ftp://ftp.dti.ad.jp/pub/GNU/%SUBDIR%/ \
694         ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/%SUBDIR%/ \
695         ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/%SUBDIR%/ \
696         ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/%SUBDIR%/ \
697         http://ftp.funet.fi/pub/gnu/prep/%SUBDIR%/
698 .endif
699
700 .if !defined(IGNORE_MASTER_SITE_GNUPG)
701 MASTER_SITE_GNUPG+= \
702         http://artfiles.org/gnupg.org/%SUBDIR%/ \
703         http://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/%SUBDIR%/ \
704         ftp://ftp.sunet.se/pub/security/gnupg/%SUBDIR%/ \
705         ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/%SUBDIR%/ \
706         ftp://mirror.switch.ch/mirror/gnupg/%SUBDIR%/ \
707         http://gd.tuwien.ac.at/privacy/gnupg/%SUBDIR%/ \
708         http://mirrors.dotsrc.org/gcrypt/%SUBDIR%/ \
709         ftp://ftp.freenet.de/pub/ftp.gnupg.org/gcrypt/%SUBDIR%/ \
710         ftp://ftp.crysys.hu/pub/gnupg/%SUBDIR%/ \
711         http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/%SUBDIR%/ \
712         ftp://ftp.gnupg.org/gcrypt/%SUBDIR%/ \
713         http://mirror.tje.me.uk/pub/mirrors/ftp.gnupg.org/%SUBDIR%/
714 .endif
715
716 .if !defined(IGNORE_MASTER_SITE_GNUSTEP)
717 MASTER_SITE_GNUSTEP+= \
718         ftp://ftp.gnustep.org/pub/gnustep/%SUBDIR%/ \
719         http://ftp.gnustep.org/pub/gnustep/%SUBDIR%/
720 .endif
721
722 .if !defined(IGNORE_MASTER_SITE_GNU_ALPHA)
723 MASTER_SITE_GNU_ALPHA+= \
724         http://alpha.gnu.org/gnu/%SUBDIR%/ \
725         ftp://spinellicreations.com/alpha/gnu/%SUBDIR%/ \
726         http://www.nic.funet.fi/pub/gnu/alpha/gnu/%SUBDIR%/ \
727         http://mirror.thecodefactory.org/gnualpha/%SUBDIR%/ \
728         http://www.mirrorservice.org/sites/alpha.gnu.org/gnu/%SUBDIR%/ \
729         http://gnu.c3sl.ufpr.br/alpha/%SUBDIR%/ \
730         http://mirror.cedia.org.ec/gnualpha/%SUBDIR%/ \
731         http://gnu-alpha.mirrors.hostinginnederland.nl/%SUBDIR%/ \
732         http://gnualpha.uib.no/%SUBDIR%/ \
733         http://mirrors.fe.up.pt/pub/gnu-alpha/%SUBDIR%/ \
734         http://mirror.lihnidos.org/GNU/alpha/gnu/%SUBDIR%/ \
735         http://alpha-gnu-org.ip-connect.vn.ua/%SUBDIR%/
736 .endif
737
738 .if !defined(IGNORE_MASTER_SITE_GOOGLE_CODE)
739 PROJECTHOST?=   ${PORTNAME}
740 MASTER_SITE_GOOGLE_CODE+= \
741         http://${PROJECTHOST}.googlecode.com/files/
742 .endif
743
744 .if !defined(IGNORE_MASTER_SITE_HORDE)
745 MASTER_SITE_HORDE+= \
746         http://ftp.horde.org/pub/%SUBDIR%/ \
747         ftp://ftp.horde.org/pub/%SUBDIR%/ \
748         ftp://ftp.at.horde.org/infosys/webapps/horde/%SUBDIR%/ \
749         ftp://ftp.se.horde.org/mirror/horde/pub/%SUBDIR%/ \
750         ftp://ftp.tw.horde.org/pub/%SUBDIR%/ \
751         ftp://ftp.us.horde.org/pub/software/horde//%SUBDIR%/
752 .endif
753
754 .if !defined(IGNORE_MASTER_SITE_IDSOFTWARE)
755 MASTER_SITE_IDSOFTWARE+= \
756         ftp://ftp.gwdg.de/pub/misc2/ftp.idsoftware.com/idstuff/%SUBDIR%/ \
757         http://ftp4.de.freesbie.org/pub/misc/ftp.idsoftware.com/idstuff/%SUBDIR%/ \
758         ftp://ftp.fu-berlin.de/pc/games/idgames/idstuff/%SUBDIR%/ \
759         ftp://ftp.gamers.org/pub/idgames/idstuff/%SUBDIR%/ \
760         http://ftp.iinet.net.au/games/idstuff/%SUBDIR%/ \
761         ftp://ftp.mirror.nl/disk2/idsoftware/idstuff/%SUBDIR%/ \
762         ftp://freebsd.nsu.ru/mirrors/ftp.idsoftware.com/idstuff/%SUBDIR%/ \
763         ftp://ftp.ntua.gr/pub/vendors/idgames/idstuff/%SUBDIR%/ \
764         ftp://ftp.omen.net.au/games/idstuff/%SUBDIR%/ \
765         ftp://ftp.idsoftware.com/idstuff/%SUBDIR%/
766 .endif
767
768 .if !defined(IGNORE_MASTER_SITE_ISC)
769 MASTER_SITE_ISC+= \
770         http://ftp.isc.org/isc/%SUBDIR%/ \
771         ftp://ftp.isc.org/isc/%SUBDIR%/ \
772         ftp://ftp.ciril.fr/pub/isc/%SUBDIR%/ \
773         ftp://ftp.freenet.de/pub/ftp.isc.org/isc/%SUBDIR%/ \
774         ftp://ftp.iij.ad.jp/pub/network/isc/%SUBDIR%/ \
775         ftp://ftp.dti.ad.jp/pub/net/isc/%SUBDIR%/ \
776         ftp://ftp.u-aizu.ac.jp/pub/net/isc/%SUBDIR%/ \
777         ftp://ftp.task.gda.pl/mirror/ftp.isc.org/isc/%SUBDIR%/ \
778         ftp://ftp.sunet.se/pub/network/isc/%SUBDIR%/ \
779         ftp://ftp.mirrorservice.org/sites/ftp.isc.org/isc/%SUBDIR%/ \
780         ftp://ftp.nominum.com/pub/isc/%SUBDIR%/ \
781         ftp://ftp.ripe.net/mirrors/sites/ftp.isc.org/isc/%SUBDIR%/ \
782         ftp://ftp.ntua.gr/pub/net/isc/isc/%SUBDIR%/ \
783         ftp://ftp.funet.fi/pub/mirrors/ftp.isc.org/isc/%SUBDIR%/
784 .endif
785
786 # List:         http://download.kde.org/extra/mirrors.html
787 # Updated:      2012-10-26
788 .if !defined(IGNORE_MASTER_SITE_KDE)
789 MASTER_SITE_KDE+= \
790         http://download.kde.org/%SUBDIR%/ \
791         ftp://ftp.gtlib.gatech.edu/pub/kde/%SUBDIR%/ \
792         ftp://ftp.informatik.hu-berlin.de/pub/Mirrors/ftp.kde.org/%SUBDIR%/ \
793         http://ftp.gtlib.gatech.edu/pub/kde/%SUBDIR%/ \
794         ftp://ftp.solnet.ch/mirror/KDE/%SUBDIR%/ \
795         ftp://gd.tuwien.ac.at/kde/%SUBDIR%/ \
796         http://gd.tuwien.ac.at/kde/%SUBDIR%/ \
797         http://kde.mirrors.tds.net/pub/kde/%SUBDIR%/ \
798         ftp://ftp.rz.uni-wuerzburg.de/pub/unix/kde/%SUBDIR%/ \
799         http://mirrors.dotsrc.org/kde/%SUBDIR%/ \
800         ftp://mirrors.dotsrc.org/kde/%SUBDIR%/ \
801         ftp://ftp.fi.muni.cz/pub/kde/%SUBDIR%/ \
802         http://ftp.fi.muni.cz/pub/kde/%SUBDIR%/ \
803         ftp://sunsite.icm.edu.pl/pub/unix/kde/%SUBDIR%/ \
804         http://sunsite.icm.edu.pl/pub/unix/kde/%SUBDIR%/ \
805         ftp://ftp.sunet.se/pub/X11/kde/%SUBDIR%/ \
806         http://ftp.sunet.se/pub/X11/kde/%SUBDIR%/ \
807         ftp://ftp.kde.org/pub/kde/%SUBDIR%/ \
808         ftp://ftp.belnet.be/packages/kde/%SUBDIR%/ \
809         http://ftp.belnet.be/packages/kde/%SUBDIR%/ \
810         ftp://ftp.lip6.fr/pub/X11/kde/%SUBDIR%/ \
811         http://www-ftp.lip6.fr/pub/X11/kde/%SUBDIR%/ \
812         ftp://ftp.rhnet.is/pub/kde/%SUBDIR%/ \
813         http://ftp.rhnet.is/pub/kde/%SUBDIR%/ \
814         http://ftp-stud.fht-esslingen.de/Mirrors/ftp.kde.org/pub/kde/%SUBDIR%/ \
815         ftp://ftp.cronyx.ru/pub/mirror/kde/%SUBDIR%/ \
816         http://ftp.twaren.net/Unix/X/KDE/%SUBDIR%/ \
817         ftp://ftp.na.kde.org/pub/kde/%SUBDIR%/ \
818         ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/%SUBDIR%/ \
819         ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/kde/%SUBDIR%/ \
820         ftp://ftp.ntua.gr/pub/X11/kde/%SUBDIR%/ \
821         http://ftp.ntua.gr/pub/X11/kde/%SUBDIR%/ \
822         ftp://ftp.heanet.ie/mirrors/ftp.kde.org/%SUBDIR%/ \
823         http://ftp.heanet.ie/mirrors/ftp.kde.org/%SUBDIR%/ \
824         ftp://ftp.kddlabs.co.jp/pub/X11/kde/%SUBDIR%/ \
825         http://ftp.kddlabs.co.jp/pub/X11/kde/%SUBDIR%/ \
826         http://kde.mirror.uber.com.au/%SUBDIR%/ \
827         ftp://ftp.ussg.iu.edu/pub/kde/%SUBDIR%/ \
828         http://ftp.ussg.iu.edu/kde/%SUBDIR%/ \
829         ftp://ftp.sayclub.com/pub/X/KDE/%SUBDIR%/ \
830         http://ftp.sayclub.com/pub/X/KDE/%SUBDIR%/ \
831         ftp://carroll.aset.psu.edu/pub/kde/%SUBDIR%/ \
832         http://mirror.cc.columbia.edu/pub/software/kde/%SUBDIR%/ \
833         ftp://ftp.mirrorservice.org/sites/ftp.kde.org/pub/kde/%SUBDIR%/ \
834         http://www.mirrorservice.org/sites/ftp.kde.org/pub/kde/%SUBDIR%/ \
835         http://master.kde.org/%SUBDIR%/ \
836         http://ftp.icm.edu.pl/pub/unix/kde/%SUBDIR%/ \
837         http://kde-mirror.freenux.org/%SUBDIR%/ \
838         http://ftp.fi.muni.cz/pub/kde/%SUBDIR%/ \
839         ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/%SUBDIR%/ \
840         ftp://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/%SUBDIR%/ \
841         http://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/%SUBDIR%/
842 .endif
843
844 .if !defined(IGNORE_MASTER_SITE_LIBREOFFICE_DEV)
845 MASTER_SITE_LIBREOFFICE_DEV+= \
846         http://dev-www.libreoffice.org/src/%SUBDIR%/
847 .endif
848
849 .if !defined(IGNORE_MASTER_SITE_MATE)
850 MASTER_SITE_MATE+= \
851         http://pub.mate-desktop.org/releases/%SUBDIR%/
852 .endif
853
854 .if !defined(IGNORE_MASTER_SITE_MOZDEV)
855 MASTER_SITE_MOZDEV+= \
856         http://ftp.scarlet.be/pub/mozdev/%SUBDIR%/ \
857         http://ftp.rz.tu-bs.de/pub/mirror/downloads.mozdev.org/%SUBDIR%/ \
858         http://ftp.ntua.gr/pub/www/mozdev/%SUBDIR%/ \
859         http://ftp.heanet.ie/pub/mozdev/%SUBDIR%/ \
860         http://mozdev.oregonstate.edu/%SUBDIR%/ \
861         http://ftp.ntua.gr/pub/www/mozdev/%SUBDIR%/ \
862         http://www.devlib.org/mozdev/%SUBDIR%/ \
863         ftp://ftp.heanet.ie/pub/mozdev/%SUBDIR%/ \
864         http://mirrors.ibiblio.org/pub/mirrors/mozdev.org/%SUBDIR%/ \
865         http://ftp.osuosl.org/pub/mozdev/%SUBDIR%/
866 .endif
867
868 .if !defined(IGNORE_MASTER_SITE_MOZILLA)
869 MASTER_SITE_MOZILLA+= \
870         http://download.cdn.mozilla.net/pub/%SUBDIR%/ \
871         https://archive.mozilla.org/pub/%SUBDIR%/
872 .endif
873
874 .if !defined(IGNORE_MASTER_SITE_MOZILLA_ADDONS)
875 MASTER_SITE_MOZILLA_ADDONS+= \
876         https://addons.cdn.mozilla.net/user-media/%SUBDIR%/ \
877         http://kyoto-mz-dl.sinet.ad.jp/pub/mozilla.org/%SUBDIR%/
878 .endif
879
880 .if !defined(IGNORE_MASTER_SITE_MPLAYERHQ)
881 MASTER_SITE_MPLAYERHQ+= \
882         http://www.mplayerhq.hu/MPlayer/%SUBDIR%/ \
883         http://www1.mplayerhq.hu/MPlayer/%SUBDIR%/ \
884         http://www2.mplayerhq.hu/MPlayer/%SUBDIR%/ \
885         http://www3.mplayerhq.hu/MPlayer/%SUBDIR%/ \
886         http://www4.mplayerhq.hu/MPlayer/%SUBDIR%/ \
887         http://www5.mplayerhq.hu/MPlayer/%SUBDIR%/ \
888         ftp://ftp.mplayerhq.hu/MPlayer/%SUBDIR%/ \
889         ftp://ftp1.mplayerhq.hu/MPlayer/%SUBDIR%/ \
890         ftp://ftp4.mplayerhq.hu/MPlayer/%SUBDIR%/ \
891         ftp://ftp5.mplayerhq.hu/MPlayer/%SUBDIR%/
892 .endif
893
894 .if !defined(IGNORE_MASTER_SITE_MYSQL)
895 MASTER_SITE_MYSQL+= \
896         ftp://ftp.fi.muni.cz/pub/mysql/Downloads/%SUBDIR%/ \
897         http://mysql.mirrors.cybercity.dk/Downloads/%SUBDIR%/ \
898         ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/Downloads/%SUBDIR%/ \
899         ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/%SUBDIR%/ \
900         http://netmirror.org/mirror/mysql.com/Downloads/%SUBDIR%/ \
901         ftp://netmirror.org/mysql.com/Downloads/%SUBDIR%/ \
902         http://mirrors.ntua.gr/MySQL/Downloads/%SUBDIR%/ \
903         ftp://ftp.ntua.gr/pub/databases/mysql/Downloads/%SUBDIR%/ \
904         http://mysql.sote.hu/Downloads/%SUBDIR%/ \
905         ftp://ftp.rhnet.is/pub/mysql/Downloads/%SUBDIR%/ \
906         ftp://mirror.widexs.nl/pub/mysql/Downloads/%SUBDIR%/ \
907         ftp://mirror.switch.ch/mirror/mysql/Downloads/%SUBDIR%/ \
908         http://mysql.dp.ua/Downloads/%SUBDIR%/ \
909         http://mysql.mirrored.ca/Downloads/%SUBDIR%/ \
910         ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/%SUBDIR%/ \
911         http://mysql.mirrors.pair.com/Downloads/%SUBDIR%/ \
912         ftp://ftp.linorg.usp.br/mysql/Downloads/%SUBDIR%/ \
913         ftp://ftp.cbn.net.id/mirror/mysql/Downloads/%SUBDIR%/ \
914         ftp://ftp.easynet.be/mysql/Downloads/%SUBDIR%/ \
915         http://download.softagency.net/MySQL/Downloads/%SUBDIR%/
916 .endif
917
918 .if !defined(IGNORE_MASTER_SITE_NETBSD)
919 MASTER_SITE_NETBSD+= \
920         ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/%SUBDIR%/ \
921         ftp://ftp.iastate.edu/pub/netbsd/packages/distfiles/%SUBDIR%/ \
922         ftp://ftp.plig.net/pub/NetBSD/packages/distfiles/%SUBDIR%/ \
923         ftp://ftp.proxad.net/mirrors/ftp.netbsd.org/packages/distfiles/%SUBDIR%/ \
924         ftp://ftp.unina.it/pub/Unix/NetBSD/packages/distfiles/%SUBDIR%/ \
925         ftp://ftp.uninett.no/bsd/unix/NetBSD/packages/distfiles/%SUBDIR%/ \
926         ftp://sunsite.uio.no/bsd/unix/NetBSD/packages/distfiles/%SUBDIR%/ \
927         ftp://ftp.sunet.se/pub/NetBSD/packages/distfiles/%SUBDIR%/ \
928         ftp://ftp.demon.co.uk/pub/mirrors/NetBSD/packages/distfiles/%SUBDIR%/ \
929         ftp://ftp.dti.ad.jp/pub/NetBSD/packages/distfiles/%SUBDIR%/ \
930         ftp://ftp.funet.fi/pub/NetBSD/packages/distfiles/%SUBDIR%/
931 .endif
932
933 .if !defined(IGNORE_MASTER_SITE_NETLIB)
934 MASTER_SITE_NETLIB+= \
935         http://www.netlib.org/%SUBDIR%/ \
936         ftp://ftp.mirrorservice.org/sites/ftp.netlib.org/%SUBDIR%/ \
937         http://www.mirrorservice.org/sites/ftp.netlib.org/%SUBDIR%/ \
938         http://www.netlib.no/netlib/%SUBDIR%/ \
939         ftp://ftp.irisa.fr/pub/netlib/%SUBDIR%/ \
940         http://netlib.sandia.gov/%SUBDIR%/
941 .endif
942
943 .if !defined(IGNORE_MASTER_SITE_NVIDIA)
944 MASTER_SITE_NVIDIA+= \
945         http://jp.download.nvidia.com/%SUBDIR%/ \
946         http://us.download.nvidia.com/%SUBDIR%/ \
947         http://tw.download.nvidia.com/%SUBDIR%/ \
948         http://download.nvidia.com/%SUBDIR%/ \
949         http://download1.nvidia.com/%SUBDIR%/ \
950         ftp://download.nvidia.com/%SUBDIR%/ \
951         ftp://download1.nvidia.com/%SUBDIR%/
952 .endif
953
954 .if !defined(IGNORE_MASTER_SITE_OPENBSD)
955 MASTER_SITE_OPENBSD+= \
956         http://anga.funkfeuer.at/ftp/pub/OpenBSD/%SUBDIR%/ \
957         http://ftp.eu.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
958         ftp://ftp.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
959         ftp://openbsd.informatik.uni-erlangen.de/pub/OpenBSD/%SUBDIR%/ \
960         ftp://ftp5.usa.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
961         ftp://ftp3.usa.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
962         ftp://rt.fm/pub/OpenBSD/%SUBDIR%/ \
963         http://ftp.heanet.ie/pub/OpenBSD/%SUBDIR%/ \
964         http://ftp.belnet.be/packages/openbsd/%SUBDIR%/ \
965         http://mirror.pacific.net.au/OpenBSD/%SUBDIR%/ \
966         http://ftp.openbsd.dk/pub/OpenBSD/%SUBDIR%/ \
967         http://ftp.estpak.ee/pub/OpenBSD/%SUBDIR%/ \
968         http://mirror.internode.on.net/pub/OpenBSD/%SUBDIR%/ \
969         http://ftp.chg.ru/pub/OpenBSD/%SUBDIR%/ \
970         http://ftp.arcane-networks.fr/pub/OpenBSD/%SUBDIR%/ \
971         http://ftp.netbsd.se/OpenBSD/%SUBDIR%/ \
972         http://www.mirrorservice.org/pub/OpenBSD/%SUBDIR%/ \
973         http://mirror.switch.ch/ftp/pub/OpenBSD/%SUBDIR%/ \
974         http://ftp.jaist.ac.jp/pub/OpenBSD/%SUBDIR%/ \
975         http://ftp.cc.uoc.gr/mirrors/OpenBSD/%SUBDIR%/ \
976         http://mirror.hostfuss.com/pub/OpenBSD/%SUBDIR%/ \
977         ftp://ftp.stacken.kth.se/pub/OpenBSD/%SUBDIR%/ \
978         ftp://ftp.ca.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
979         ftp://ftp.freebsdchina.org/pub/OpenBSD/%SUBDIR%/ \
980         ftp://ftp.dkuug.dk/pub/OpenBSD/%SUBDIR%/ \
981         ftp://ftp.jyu.fi/pub/OpenBSD/%SUBDIR%/ \
982         ftp://ftp.irisa.fr/pub/OpenBSD/%SUBDIR%/ \
983         ftp://ftp.nara.wide.ad.jp/pub/OpenBSD/%SUBDIR%/ \
984         ftp://ftp.inet.no/pub/OpenBSD/%SUBDIR%/ \
985         ftp://ftp.nluug.nl/pub/OpenBSD/%SUBDIR%/ \
986         ftp://ftp.gamma.ru/pub/OpenBSD/%SUBDIR%/ \
987         ftp://ftp.rediris.es/pub/OpenBSD/%SUBDIR%/ \
988         ftp://ftp.su.se/pub/OpenBSD/%SUBDIR%/ \
989         ftp://osmirrors.cerias.purdue.edu/pub/OpenBSD/%SUBDIR%/ \
990         ftp://carroll.cac.psu.edu/pub/OpenBSD/%SUBDIR%/ \
991         ftp://openbsd.mirrors.tds.net/pub/OpenBSD/%SUBDIR%/ \
992         http://mirrors.nic.funet.fi/pub/OpenBSD/%SUBDIR%/
993 .endif
994
995 .if !defined(IGNORE_MASTER_SITE_OSSP)
996 MASTER_SITE_OSSP+= \
997         ftp://ftp.ossp.org/pkg/%SUBDIR%/ \
998         ftp://ftp.ntua.gr/pub/utils/ossp/%SUBDIR%/
999 .endif
1000
1001 .if !defined(IGNORE_MASTER_SITE_PACKETSTORM)
1002 MASTER_SITE_PACKETSTORM+= \
1003         http://dl.packetstormsecurity.net/%SUBDIR%/ \
1004         http://packetstorm.codar.com.br/%SUBDIR%/ \
1005         http://packetstorm.igor.onlinedirect.bg/%SUBDIR%/ \
1006         http://packetstorm.interhost.co.il/%SUBDIR%/ \
1007         http://packetstorm.foofus.com/%SUBDIR%/ \
1008         http://packetstorm.tacticalflex.com/%SUBDIR%/ \
1009         http://packetstorm.unixteacher.org/%SUBDIR%/ \
1010         http://packetstorm.wowhacker.com/%SUBDIR%/
1011 .endif
1012
1013 .if !defined(IGNORE_MASTER_SITE_PERL_CPAN)
1014
1015 _PERL_CPAN_SORT?= modules/by-module
1016
1017 # Please add URI to MASTER_SITE_PERL_CPAN_BY instead of this one.
1018 MASTER_SITE_PERL_CPAN?=
1019
1020 MASTER_SITE_PERL_CPAN_BY+= \
1021         http://cpan.metacpan.org/%CPANSORT%/%SUBDIR%/ \
1022         http://cpan.metacpan.org/modules/by-module/%SUBDIRPLUS%/ \
1023         http://www.cpan.org/%CPANSORT%/%SUBDIR%/ \
1024         ftp://ftp.cpan.org/pub/CPAN/%CPANSORT%/%SUBDIR%/ \
1025         http://www.cpan.dk/%CPANSORT%/%SUBDIR%/ \
1026         ftp://ftp.kddlabs.co.jp/lang/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
1027         http://ftp.jaist.ac.jp/pub/CPAN/%CPANSORT%/%SUBDIR%/ \
1028         ftp://ftp.sunet.se/pub/lang/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
1029         ftp://ftp.mirrorservice.org/sites/cpan.perl.org/CPAN/%CPANSORT%/%SUBDIR%/ \
1030         ftp://ftp.auckland.ac.nz/pub/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
1031         http://backpan.perl.org/%CPANSORT%/%SUBDIR%/ \
1032         ftp://ftp.funet.fi/pub/languages/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
1033         http://ftp.twaren.net/Unix/Lang/CPAN/%CPANSORT%/%SUBDIR%/ \
1034         ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%SUBDIRPLUS%/
1035
1036 _PERL_CPAN_FLAG=${MASTER_SITE_SUBDIR:C/(CPAN):.*$/\1/}
1037 _PERL_CPAN_ID=  ${MASTER_SITE_SUBDIR:C/^CPAN:(.)(.)(.*)$/\1\/\1\2\/\1\2\3/}
1038
1039 .if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan"
1040     _PERL_CPAN_SORT=authors/id/${_PERL_CPAN_ID}
1041     MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIR%\///:S/%SUBDIRPLUS%\//${PORTNAME:C/-.*//}\//}
1042 .else
1043     MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIRPLUS%\///}
1044 .endif
1045
1046 .endif
1047
1048 #
1049 # PostgreSQL master site
1050 #
1051 .if !defined(IGNORE_MASTER_SITE_PGSQL)
1052 MASTER_SITE_PGSQL+= \
1053         http://ftp.postgresql.org/pub/%SUBDIR%/ \
1054         https://ftp.postgresql.org/pub/%SUBDIR%/ \
1055         ftp://ftp.postgresql.org/pub/%SUBDIR%/
1056 .endif
1057
1058 .if !defined(IGNORE_MASTER_SITE_PHP)
1059 MASTER_SITE_PHP+= \
1060         http://de.php.net/%SUBDIR%/ \
1061         http://es.php.net/%SUBDIR%/ \
1062         http://fr.php.net/%SUBDIR%/ \
1063         http://it.php.net/%SUBDIR%/ \
1064         http://jp.php.net/%SUBDIR%/ \
1065         http://se.php.net/%SUBDIR%/ \
1066         http://uk3.php.net/%SUBDIR%/ \
1067         http://us2.php.net/%SUBDIR%/ \
1068         http://br.php.net/%SUBDIR%/ \
1069         http://cn.php.net/%SUBDIR%/
1070 .endif
1071
1072 .if !defined(IGNORE_MASTER_SITE_PYTHON)
1073 MASTER_SITE_PYTHON+= \
1074         http://www.python.org/%SUBDIR%/
1075 .endif
1076
1077 .if !defined(IGNORE_MASTER_SITE_QMAIL)
1078 MASTER_SITE_QMAIL+= \
1079         http://qmail.glasswings.com.au/%SUBDIR%/ \
1080         http://qmail.psshee.com/%SUBDIR%/ \
1081         http://mirrors.sunsite.dk/qmailwww/%SUBDIR%/ \
1082         http://www.agria.hu/qmail/%SUBDIR%/ \
1083         http://qmail.netvisao.pt/%SUBDIR%/ \
1084         http://qmail.ipg.sk/%SUBDIR%/ \
1085         http://qmail.omnis.ch/%SUBDIR%/ \
1086         http://www.qmail.org/%SUBDIR%/
1087 .endif
1088
1089 .if !defined(IGNORE_MASTER_SITE_QT)
1090 MASTER_SITE_QT+= \
1091         http://download.qt-project.org/%SUBDIR%/ \
1092         http://master.qt-project.org/%SUBDIR%/ \
1093         http://www.mirrorservice.org/sites/download.qt-project.org/%SUBDIR%/ \
1094         http://www.nic.funet.fi/pub/mirrors/download.qt-project.org/%SUBDIR%/ \
1095         http://qtmirror.ics.com/pub/qtproject/%SUBDIR%/ \
1096         http://anychimirror101.mirrors.tds.net/pub/Qt/%SUBDIR%/ \
1097         http://www.las.ic.unicamp.br/pub/qtproject/%SUBDIR%/ \
1098         http://linorg.usp.br/Qt/%SUBDIR%/ \
1099         http://ftp.jaist.ac.jp/pub/qtproject/%SUBDIR%/ \
1100         http://mirrors.neusoft.edu.cn/qt/%SUBDIR%/
1101 .endif
1102
1103 .if !defined(IGNORE_MASTER_SITE_REDHAT_LINUX)
1104 MASTER_SITE_REDHAT_LINUX+= \
1105         http://mirrors.usc.edu/pub/linux/distributions/redhat/redhat/linux/%SUBDIR%/ \
1106         http://www.gtlib.gatech.edu/pub/redhat/linux/%SUBDIR%/ \
1107         ftp://mirror.cs.wisc.edu/pub/mirrors/linux/redhat/%SUBDIR%/ \
1108         ftp://ftp.nluug.nl/site/ftp.redhat.com/redhat/linux/%SUBDIR%/ \
1109         ftp://ftp.icm.edu.pl/pub/linux/redhat/linux/%SUBDIR%/ \
1110         ftp://ftp.riken.go.jp/pub/Linux/redhat/linux/%SUBDIR%/ \
1111         ftp://ftp.kddlabs.co.jp/pub/Linux/packages/RedHat/redhat/linux/%SUBDIR%/
1112 .endif
1113
1114 .if !defined(IGNORE_MASTER_SITE_RUBY)
1115 MASTER_SITE_RUBY+= \
1116         http://cache.ruby-lang.org/pub/ruby/%SUBDIR%/ \
1117         http://ftp.ruby-lang.org/pub/ruby/%SUBDIR%/ \
1118         ftp://ftp.ruby-lang.org/pub/ruby/%SUBDIR%/ \
1119         ftp://ftp.fu-berlin.de/unix/languages/ruby/%SUBDIR%/ \
1120         ftp://ftp.kr.FreeBSD.org/pub/ruby/%SUBDIR%/ \
1121         ftp://ftp.iDaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/%SUBDIR%/
1122 .endif
1123
1124 # See http://rubygems.org/pages/about
1125 .if !defined(IGNORE_MASTER_SITE_RUBYGEMS)
1126 MASTER_SITE_RUBYGEMS+= \
1127         https://rubygems.global.ssl.fastly.net/gems/%SUBDIR%/
1128 .endif
1129
1130 .if !defined(IGNORE_MASTER_SITE_SAMBA)
1131 MASTER_SITE_SAMBA+= \
1132         http://ftp.samba.org/pub/%SUBDIR%/ \
1133         ftp://ca.samba.org/pub/%SUBDIR%/ \
1134         ftp://de.samba.org/pub/%SUBDIR%/
1135 .endif
1136
1137 # List: http://download.savannah.gnu.org/mirmon/
1138 .if !defined(IGNORE_MASTER_SITE_SAVANNAH)
1139 MASTER_SITE_SAVANNAH+= \
1140         http://download.savannah.gnu.org/releases/%SUBDIR%/ \
1141         http://download-mirror.savannah.gnu.org/releases/%SUBDIR%/ \
1142         http://nongnu.askapache.com/%SUBDIR%/ \
1143         http://mirror.lihnidos.org/GNU/savannah/%SUBDIR%/ \
1144         http://ftp.twaren.net/Unix/NonGNU/%SUBDIR%/ \
1145         ftp://ftp.twaren.net/Unix/NonGNU/%SUBDIR%/ \
1146         http://gnu.mirrors.pair.com/savannah/savannah/%SUBDIR%/ \
1147         ftp://gnu.mirrors.pair.com/savannah/%SUBDIR%/
1148 .endif
1149
1150 # List:         http://sourceforge.net/apps/trac/sourceforge/wiki/Mirrors
1151 # Updated:      2013-03-25
1152 .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE)
1153 MASTER_SITE_SOURCEFORGE+= http://downloads.sourceforge.net/project/%SUBDIR%/
1154 .for mirror in heanet sunet iweb switch freefr garr aarnet jaist master \
1155         nchc ncu internode waix hivelocity superb-dca3 ufpr tenet \
1156         netcologne ignum kent
1157 MASTER_SITE_SOURCEFORGE+= \
1158         http://${mirror}.dl.sourceforge.net/project/%SUBDIR%/
1159 .endfor
1160 .endif
1161
1162 .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE_JP)
1163 .for mirror in iij jaist keihanna osdn
1164 MASTER_SITE_SOURCEFORGE_JP+= \
1165         http://${mirror}.dl.sourceforge.jp/%SUBDIR%/
1166 .endfor
1167 .endif
1168
1169 .if !defined(IGNORE_MASTER_SITE_SOURCEWARE)
1170 MASTER_SITE_SOURCEWARE+= \
1171         http://mirrors.kernel.org/sources.redhat.com/%SUBDIR%/ \
1172         http://gd.tuwien.ac.at/gnu/sourceware/%SUBDIR%/ \
1173         ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/%SUBDIR%/
1174 .endif
1175
1176 .if !defined(IGNORE_MASTER_SITE_SUDO)
1177 MASTER_SITE_SUDO+= \
1178         http://www.sudo.ws/sudo/dist/ \
1179         http://ftp.arcane-networks.fr/pub/mirrors/sudo/ \
1180         http://sudo.p8ra.de/sudo/dist/ \
1181         http://sudo.cybermirror.org/ \
1182         http://sudo-ftp.basemirror.de/ \
1183         http://core.ring.gr.jp/archives/misc/sudo/ \
1184         http://www.ring.gr.jp/archives/misc/sudo/ \
1185         http://ftp.twaren.net/Unix/Security/Sudo/ \
1186         ftp://ftp.sudo.ws/pub/sudo/ \
1187         ftp://plier.ucar.edu/pub/sudo/ \
1188         ftp://obsd.isc.org/pub/sudo/ \
1189         ftp://ftp.uwsg.indiana.edu/pub/security/sudo/ \
1190         ftp://ftp.tuwien.ac.at/utils/admin-tools/sudo/ \
1191         ftp://sunsite.ualberta.ca/pub/Mirror/sudo/ \
1192         ftp://zoot.tele.dk/pub/sudo/ \
1193         ftp://ftp.in2p3.fr/pub/sudo/ \
1194         ftp://ftp.arcane-networks.fr/pub/mirrors/sudo/ \
1195         ftp://ftp.usbm.de/pub/sudo/ \
1196         ftp://ftp.cs.tu-berlin.de/pub/misc/sudo/ \
1197         ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/sudo/ \
1198         ftp://ftp.st.ryukoku.ac.jp/pub/security/tool/sudo/ \
1199         ftp://ftp.cin.nihon-u.ac.jp/pub/misc/sudo/ \
1200         ftp://core.ring.gr.jp/pub/misc/sudo/ \
1201         ftp://ftp.ring.gr.jp/pub/misc/sudo/ \
1202         ftp://sunsite.icm.edu.pl/packages/sudo/ \
1203         ftp://mirror.cdmon.com/pub/sudo/ \
1204         ftp://ftp.twaren.net/Unix/Security/Sudo/
1205 .endif
1206
1207 .if !defined(IGNORE_MASTER_SITE_SUNSITE)
1208 MASTER_SITE_SUNSITE+= \
1209         http://www.ibiblio.org/pub/Linux/%SUBDIR%/ \
1210         http://www.gtlib.gatech.edu/pub/Linux/%SUBDIR%/ \
1211         ftp://ftp.cs.tu-berlin.de/pub/linux/Mirrors/sunsite.unc.edu/%SUBDIR%/ \
1212         ftp://ftp.etsimo.uniovi.es/pub/linux/%SUBDIR%/ \
1213         ftp://ftp.lip6.fr/pub/linux/sunsite/%SUBDIR%/ \
1214         ftp://ftp.nluug.nl/pub/metalab/%SUBDIR%/ \
1215         ftp://ftp.nvg.ntnu.no/pub/mirrors/metalab.unc.edu/%SUBDIR%/ \
1216         ftp://ftp.icm.edu.pl/pub/Linux/sunsite/%SUBDIR%/ \
1217         ftp://ftp.cse.cuhk.edu.hk/pub4/Linux/%SUBDIR%/ \
1218         ftp://ftp.chg.ru/pub/Linux/sunsite/%SUBDIR%/ \
1219         ftp://ftp.sun.ac.za/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/
1220 .endif
1221
1222 .if !defined(IGNORE_MASTER_SITE_TCLTK)
1223 MASTER_SITE_TCLTK+= \
1224         ftp://ftp.tcl.tk/pub/tcl/%SUBDIR%/ \
1225         ftp://ftp.kddlabs.co.jp/lang/tcl/ftp.scriptics.com/%SUBDIR%/ \
1226         ftp://ftp.mirrorservice.org/sites/ftp.tcl.tk/pub/tcl/%SUBDIR%/ \
1227         ftp://ftp.funet.fi/pub/languages/tcl/tcl/%SUBDIR%/
1228 .endif
1229
1230 .if !defined(IGNORE_MASTER_SITE_TEX_CTAN)
1231 MASTER_SITE_TEX_CTAN+= \
1232         ftp://ctan.unsw.edu.au/tex-archive/%SUBDIR%/ \
1233         ftp://ftp.tex.ac.uk/tex-archive/%SUBDIR%/ \
1234         ftp://ftp.kddlabs.co.jp/CTAN/%SUBDIR%/ \
1235         ftp://ctan.tug.org/tex-archive/%SUBDIR%/ \
1236         ftp://ftp.dante.de/tex-archive/%SUBDIR%/ \
1237         ftp://ftp.chg.ru/pub/TeX/CTAN/%SUBDIR%/ \
1238         ftp://mirror.macomnet.net/pub/CTAN/%SUBDIR%/ \
1239         ftp://ftp.funet.fi/pub/TeX/CTAN/%SUBDIR%/
1240 .endif
1241
1242 # Derived from: https://www.torproject.org/getinvolved/mirrors.html.en
1243 .if !defined(IGNORE_MASTER_SITE_TOR)
1244 MASTER_SITE_TOR+= \
1245                 https://www.torproject.org/dist/%SUBDIR%/ \
1246                 https://archive.torproject.org/tor-package-archive/%SUBDIR%/ \
1247                 ftp://ftp.bit.nl/mirror/tor/%SUBDIR%/ \
1248                 http://cyberside.net.ee/tor/%SUBDIR%/ \
1249                 http://ftp.bit.nl/mirror/tor/%SUBDIR%/ \
1250                 http://mirror.hessmo.com/tor/dist/%SUBDIR%/ \
1251                 http://mirror.host4site.co.il/torproject.org/dist/%SUBDIR%/ \
1252                 http://mirror.open-networx.org/torproject.org/dist/%SUBDIR%/ \
1253                 http://mirror.tor.hu/dist/%SUBDIR%/ \
1254                 https://mirror.torland.me/torproject.org/dist/%SUBDIR%/ \
1255                 http://mirrors.chaos-darmstadt.de/tor-mirror/dist/%SUBDIR%/ \
1256                 http://theonionrouter.com/dist/%SUBDIR%/ \
1257                 http://tor.amorphis.eu/dist/%SUBDIR%/ \
1258                 http://tor.askapache.com/dist/%SUBDIR%/ \
1259                 http://tor.beme-it.de/dist/%SUBDIR%/ \
1260                 http://tor.borgmann.tv/dist/%SUBDIR%/ \
1261                 http://tor.ccc.de/dist/%SUBDIR%/ \
1262                 http://tor.cyberarmy.at/dist/%SUBDIR%/ \
1263                 http://tor.dont-know-me.at/dist/%SUBDIR%/ \
1264                 http://tor.factor.cc/dist/%SUBDIR%/ \
1265                 http://tor.homosu.net/dist/%SUBDIR%/ \
1266                 http://tor.idnr.ws/dist/%SUBDIR%/ \
1267                 http://tor.myrl.net/dist/%SUBDIR%/ \
1268                 http://tor.kamagurka.org/dist/%SUBDIR%/ \
1269                 http://tor.spline.de/dist/%SUBDIR%/ \
1270                 http://tor.vesta.nu/dist/%SUBDIR%/ \
1271                 http://torproj.xpdm.us/dist/%SUBDIR%/ \
1272                 https://torproject.antagonism.org/dist/%SUBDIR%/ \
1273                 https://torproject.crypto.is/dist/%SUBDIR%/ \
1274                 http://torproject.is/dist/%SUBDIR%/ \
1275                 http://torproject.nwlinux.us/dist/%SUBDIR%/ \
1276                 http://torproject.ph3x.at/dist/%SUBDIR%/ \
1277                 https://www.coevoet.nl/tor/dist/%SUBDIR%/ \
1278                 http://www.oignon.net/dist/%SUBDIR%/ \
1279                 http://www.torproject.nl/dist/%SUBDIR%/ \
1280                 http://www.torproject.org.nyud.net/dist/%SUBDIR%/ \
1281                 http://www.torproject.us/dist/%SUBDIR%/ \
1282                 http://www.torservers.net/mirrors/torproject.org/dist/%SUBDIR%/
1283 .endif
1284
1285 .if !defined(IGNORE_MASTER_SITE_TUCOWS)
1286 MASTER_SITE_TUCOWS+= \
1287         http://iinets.linux.tucows.com/files/%SUBDIR%/
1288 .endif
1289
1290 .if !defined(IGNORE_MASTER_SITE_WINDOWMAKER)
1291 MASTER_SITE_WINDOWMAKER+= \
1292         ftp://ftp.windowmaker.info/pub/%SUBDIR%/ \
1293         ftp://ftp.uvsq.fr/pub/X11/window-managers/windowmaker/%SUBDIR%/
1294 .endif
1295
1296 .if !defined(IGNORE_MASTER_SITE_XCONTRIB)
1297 MASTER_SITE_XCONTRIB+= \
1298         ftp://ftp.gwdg.de/pub/x11/x.org/contrib/%SUBDIR%/ \
1299         ftp://ftp.x.org/contrib/%SUBDIR%/ \
1300         ftp://ftp.sunet.se/pub/X11/ftp.x.org/contrib/%SUBDIR%/ \
1301         ftp://ftp.dti.ad.jp/pub/X/XFree86/mirror/X.Org/contrib/%SUBDIR%/ \
1302         ftp://ftp.kddlabs.co.jp/X11/ftp.x.org/contrib/%SUBDIR%/ \
1303         ftp://ftp2.x.org/contrib/%SUBDIR%/
1304 .endif
1305
1306 .if !defined(IGNORE_MASTER_SITE_XFCE)
1307 MASTER_SITE_XFCE+= \
1308         http://mirror.perldude.de/archive.xfce.org/%SUBDIR%/ \
1309         http://mirror.netcologne.de/xfce/%SUBDIR%/ \
1310         http://ftp.udc.es/xfce/%SUBDIR%/ \
1311         http://xfce.mirror.uber.com.au/%SUBDIR%/ \
1312         http://archive.be.xfce.org/%SUBDIR%/ \
1313         http://archive.be2.xfce.org/%SUBDIR%/ \
1314         http://archive.al-us.xfce.org/%SUBDIR%/ \
1315         http://mirrors.tummy.com/pub/archive.xfce.org/%SUBDIR%/
1316 .endif
1317
1318 .if !defined(IGNORE_MASTER_SITE_XORG)
1319 MASTER_SITE_XORG+= \
1320         http://xorg.freedesktop.org/releases/%SUBDIR%/ \
1321         http://xorg.mirrors.pair.com/%SUBDIR%/ \
1322         http://mirror.us.leaseweb.net/xorg/%SUBDIR%/ \
1323         http://mirror.csclub.uwaterloo.ca/x.org/%SUBDIR%/ \
1324         http://artfiles.org/x.org/pub/%SUBDIR%/ \
1325         http://ftp.gwdg.de/pub/x11/x.org/pub/%SUBDIR%/ \
1326         http://gd.tuwien.ac.at/X11/%SUBDIR%/ \
1327         http://mi.mirror.garr.it/mirrors/x.org/%SUBDIR%/ \
1328         http://mirror.switch.ch/ftp/mirror/X11/pub/%SUBDIR%/ \
1329         http://mirrors.ircam.fr/pub/x.org/%SUBDIR%/ \
1330         http://www.mirrorservice.org/sites/ftp.x.org/pub/%SUBDIR%/ \
1331         http://www.portal-to-web.de/pub/mirrors/x.org/%SUBDIR%/ \
1332         http://x.cybermirror.org/%SUBDIR%/ \
1333         http://x.europnews.de/pub/%SUBDIR%/ \
1334         http://xorg.mirror.solnet.ch/pub/%SUBDIR%/ \
1335         http://mirror.nl.leaseweb.net/xorg/%SUBDIR%/ \
1336         http://mirror.de.leaseweb.net/xorg/%SUBDIR%/ \
1337         http://mirrors.go-part.com/xorg/%SUBDIR%/ \
1338         http://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/%SUBDIR%/ \
1339         http://ftp.kaist.ac.kr/x.org/%SUBDIR%/
1340 .endif
1341
1342 .if !defined(IGNORE_MASTER_SITE_KERNEL_ORG)
1343 MASTER_SITE_KERNEL_ORG+= \
1344         https://www.kernel.org/pub/%SUBDIR%/ \
1345         ftp://ftp.ntu.edu.tw/%SUBDIR%/ \
1346         http://ftp.sunet.se/pub/Linux/kernel.org/%SUBDIR%/ \
1347         http://ftp.yandex.ru/pub/%SUBDIR%/ \
1348         http://ftp.heanet.ie/pub/%SUBDIR%/ \
1349         http://slackware.cs.utah.edu/pub/kernel.org/pub/%SUBDIR%/
1350 .endif
1351
1352 # Macro magic
1353
1354 MASTER_SITES_ABBREVS=   CPAN:PERL_CPAN \
1355                         GH:GITHUB \
1356                         GHC:GITHUB_CLOUD \
1357                         LODEV:LIBREOFFICE_DEV \
1358                         NL:NETLIB \
1359                         RG:RUBYGEMS \
1360                         SF:SOURCEFORGE \
1361                         SFJP:SOURCEFORGE_JP
1362 MASTER_SITES_SUBDIRS=   APACHE_COMMONS_BINARIES:${PORTNAME:S,commons-,,} \
1363                         APACHE_COMMONS_SOURCE:${PORTNAME:S,commons-,,} \
1364                         APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \
1365                         BERLIOS:${PORTNAME:tl}.berlios \
1366                         CHEESESHOP:source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/} \
1367                         DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \
1368                         FARSIGHT:${PORTNAME} \
1369                         FESTIVAL:${PORTVERSION} \
1370                         GCC:releases/${DISTNAME} \
1371                         GENTOO:distfiles \
1372                         GIMP:${PORTNAME}/${PORTVERSION:R}/ \
1373                         GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/ \
1374                         GITHUB_CLOUD:${GH_ACCOUNT}/${GH_PROJECT}/ \
1375                         GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
1376                         GNU:${PORTNAME} \
1377                         GNUPG:${PORTNAME} \
1378                         GNU_ALPHA:${PORTNAME} \
1379                         HORDE:${PORTNAME} \
1380                         LIBREOFFICE_DEV:${PORTNAME} \
1381                         MATE:${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
1382                         MOZDEV:${PORTNAME:tl} \
1383                         NETLIB:${PORTNAME} \
1384                         PERL_CPAN:${PORTNAME:C/-.*//} \
1385                         QT:archive/qt/${PORTVERSION:R} \
1386                         SAMBA:${PORTNAME} \
1387                         SAVANNAH:${PORTNAME:tl} \
1388                         SOURCEFORGE:${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION} \
1389                         XFCE:xfce/${XFCE_MASTER_SITE_VER}/src
1390
1391 .if defined(MASTER_SITES) && ${MASTER_SITES:N*\:/*}
1392
1393 .for _site__ in ${MASTER_SITES}
1394 _site_=${_site__}
1395 .       if ${_site_:M*\:/*}
1396 MASTER_SITES_EXP+=      ${_site_}
1397 MASTER_SITES_EXP:=      ${MASTER_SITES_EXP}
1398 .       else
1399 _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@}
1400 .               if ${_site_urlpath_:M*/*}
1401 _site_url_=             ${_site_urlpath_:C@^([^/]+)/.*$@\1@}
1402 _site_subdir_=  ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!}
1403 .               else
1404 _site_url_=             ${_site_urlpath_}
1405 .undef _site_subdir_
1406 .               endif
1407 _site_group_=   ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://}
1408 .               for _abbrev_ in ${MASTER_SITES_ABBREVS}
1409 .                       if ${_site_url_} == ${_abbrev_:C/:.*//}
1410 _site_url_=     ${_abbrev_:C/.*://}
1411 .                       endif
1412 .               endfor
1413 .               if !defined(MASTER_SITE_SUBDIR)
1414 .                       for _subdir_ in ${MASTER_SITES_SUBDIRS}
1415 .                               if ${_site_url_} == ${_subdir_:C/:.*//}
1416 _site_subdir_?= ${_subdir_:C/.*://}
1417 .                               endif
1418 .                       endfor
1419 .               endif
1420 .               ifdef MASTER_SITE_${_site_url_}
1421 .                       ifdef _site_subdir_
1422 MASTER_SITES_EXP+=      ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//}
1423 .                       else
1424 MASTER_SITES_EXP+=      ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//}
1425 .                       endif
1426 MASTER_SITES_EXP:=      ${MASTER_SITES_EXP}
1427 .               endif
1428 .       endif
1429 .endfor
1430 MASTER_SITES=   ${MASTER_SITES_EXP}
1431
1432 .endif
1433
1434 .if defined(PATCH_SITES) && ${PATCH_SITES:N*\:/*}
1435
1436 .for _site__ in ${PATCH_SITES}
1437 _site_=${_site__}
1438 .       if ${_site_:M*\:/*}
1439 PATCH_SITES_EXP+=       ${_site_}
1440 PATCH_SITES_EXP:=       ${PATCH_SITES_EXP}
1441 .       else
1442 _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@}
1443 .               if ${_site_urlpath_:M*/*}
1444 _site_url_=             ${_site_urlpath_:C@^([^/]+)/.*$@\1@}
1445 _site_subdir_=  ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!}
1446 .               else
1447 _site_url_=             ${_site_urlpath_}
1448 .undef _site_subdir_
1449 .               endif
1450 _site_group_=   ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://}
1451 .               for _abbrev_ in ${MASTER_SITES_ABBREVS}
1452 .                       if ${_site_url_} == ${_abbrev_:C/:.*//}
1453 _site_url_=     ${_abbrev_:C/.*://}
1454 .                       endif
1455 .               endfor
1456 .               if !defined(MASTER_SITE_SUBDIR)
1457 .                       for _subdir_ in ${MASTER_SITES_SUBDIRS}
1458 .                               if ${_site_url_} == ${_subdir_:C/:.*//}
1459 _site_subdir_?= ${_subdir_:C/.*://}
1460 .                               endif
1461 .                       endfor
1462 .               endif
1463 .               ifdef MASTER_SITE_${_site_url_}
1464 .                       ifdef _site_subdir_
1465 PATCH_SITES_EXP+=       ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//}
1466 .                       else
1467 PATCH_SITES_EXP+=       ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//}
1468 .                       endif
1469 PATCH_SITES_EXP:=       ${PATCH_SITES_EXP}
1470 .               endif
1471 .       endif
1472 .endfor
1473 PATCH_SITES=    ${PATCH_SITES_EXP}
1474
1475 .endif