bsd.sites.mk 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194
  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. # Where to put distfiles that don't have any other master site
  23. .if !defined(IGNORE_MASTER_SITE_LOCAL)
  24. MASTER_SITE_LOCAL+= \
  25. http://distcache.FreeBSD.org/local-distfiles/%SUBDIR%/ \
  26. http://distcache.us-east.FreeBSD.org/local-distfiles/%SUBDIR%/ \
  27. http://distcache.eu.FreeBSD.org/local-distfiles/%SUBDIR%/ \
  28. http://distcache.us-west.FreeBSD.org/local-distfiles/%SUBDIR%/
  29. MASTER_SITE_PORTS_JP+= \
  30. ftp://ports.jp.FreeBSD.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \
  31. ftp://ftp4.jp.FreeBSD.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \
  32. ftp://ftp.ics.es.osaka-u.ac.jp/pub/mirrors/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/
  33. .endif
  34. ##
  35. ## KEEP THIS LIST SORTED
  36. ##
  37. .if !defined(IGNORE_MASTER_SITE_AFTERSTEP)
  38. MASTER_SITE_AFTERSTEP+= \
  39. ftp://ftp.afterstep.org/%SUBDIR%/ \
  40. ftp://ftp.kddlabs.co.jp/X11/AfterStep/%SUBDIR%/
  41. .endif
  42. .if !defined(IGNORE_MASTER_SITE_APACHE)
  43. MASTER_SITE_APACHE+= \
  44. https://dlcdn.apache.org/%SUBDIR%/ \
  45. https://ftp.wayne.edu/apache/%SUBDIR%/ \
  46. https://mirror.its.dal.ca/apache/%SUBDIR%/ \
  47. http://mirror.cogentco.com/pub/apache/%SUBDIR%/ \
  48. http://mirror.navercorp.com/apache/%SUBDIR%/ \
  49. http://ftp.kddi-research.jp/infosystems/apache/%SUBDIR%/ \
  50. http://miroir.univ-lorraine.fr/apache/%SUBDIR%/
  51. .endif
  52. .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_BINARIES)
  53. MASTER_SITE_APACHE_COMMONS_BINARIES+= \
  54. ${MASTER_SITE_APACHE:S,%SUBDIR%,commons/&/binaries,}
  55. .endif
  56. .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_SOURCE)
  57. MASTER_SITE_APACHE_COMMONS_SOURCE+= \
  58. ${MASTER_SITE_APACHE:S,%SUBDIR%,commons/&/source,}
  59. .endif
  60. .if !defined(IGNORE_MASTER_SITE_APACHE_HTTPD)
  61. MASTER_SITE_APACHE_HTTPD+= \
  62. ${MASTER_SITE_APACHE:S,%SUBDIR%,httpd/&,}
  63. .endif
  64. .if !defined(IGNORE_MASTER_SITE_APACHE_JAKARTA)
  65. MASTER_SITE_APACHE_JAKARTA+= \
  66. ${MASTER_SITE_APACHE:S,%SUBDIR%,jakarta/&,}
  67. .endif
  68. .if !defined(IGNORE_MASTER_SITE_APACHE_TOMCAT)
  69. MASTER_SITE_APACHE_TOMCAT+= \
  70. ${MASTER_SITE_APACHE:S,%SUBDIR%,tomcat/&,}
  71. .endif
  72. .if !defined(IGNORE_MASTER_SITE_APACHE_XML)
  73. MASTER_SITE_APACHE_XML+= \
  74. ${MASTER_SITE_APACHE:S,%SUBDIR%,xml/&,}
  75. .endif
  76. .if !defined(IGNORE_MASTER_SITE_BERLIOS)
  77. MASTER_SITE_BERLIOS+= \
  78. ${MASTER_SITE_SOURCEFORGE}
  79. .endif
  80. .if !defined(IGNORE_MASTER_SITE_COMP_SOURCES)
  81. MASTER_SITE_COMP_SOURCES+= \
  82. http://ftp.isc.org/pub/usenet/comp.sources.%SUBDIR%/ \
  83. http://ftp.funet.fi/pub/archive/comp.sources.%SUBDIR%/ \
  84. http://ftp.fi.netbsd.org/pub/misc/archive/comp.sources.%SUBDIR%/
  85. .endif
  86. .if !defined(IGNORE_MASTER_SITE_CRAN)
  87. MASTER_SITE_CRAN+= \
  88. https://cloud.r-project.org/%SUBDIR%/ \
  89. https://stat.ethz.ch/CRAN/%SUBDIR%/ \
  90. http://cran.utstat.utoronto.ca/%SUBDIR%/ \
  91. https://cran.csiro.au/%SUBDIR%/ \
  92. https://mirrors.tuna.tsinghua.edu.cn/CRAN/%SUBDIR%/ \
  93. https://mirror.las.iastate.edu/CRAN/%SUBDIR%/ \
  94. https://cran.ma.imperial.ac.uk/%SUBDIR%/ \
  95. https://cran.ism.ac.jp/%SUBDIR%/
  96. .endif
  97. .if !defined(IGNORE_MASTER_SITE_CRAN_ARCHIVE)
  98. MASTER_SITE_CRAN_ARCHIVE+= ${MASTER_SITE_CRAN:S,$,Archive/${PORTNAME}/,}
  99. .endif
  100. .if !defined(IGNORE_MASTER_SITE_CRATESIO)
  101. MASTER_SITE_CRATESIO+= https://crates.io/api/v1/crates/%SUBDIR%/download?dummy=/
  102. .endif
  103. .if !defined(IGNORE_MASTER_SITE_DEBIAN)
  104. MASTER_SITE_DEBIAN+= http://deb.debian.org/debian/%SUBDIR%/
  105. . for country in am au at by be br bg ca cl cn hr cz dk fi fr de hk hu is it \
  106. jp kr lt md nl nc nz no pl pt ru sk si es se ch tw uk us
  107. MASTER_SITE_DEBIAN+= http://ftp.${country}.debian.org/debian/%SUBDIR%/
  108. . endfor
  109. .endif
  110. .if !defined(IGNORE_MASTER_SITE_DEBIAN_POOL)
  111. MASTER_SITE_DEBIAN_POOL+= \
  112. ${MASTER_SITE_DEBIAN:C|(/%SUBDIR%/)|/pool/main/${PORTNAME:C/^(.).*$/\1/}/${PORTNAME}/|}
  113. .endif
  114. .if !defined(IGNORE_MASTER_SITE_ECLIPSE)
  115. MASTER_SITE_ECLIPSE+= \
  116. https://ftp-stud.hs-esslingen.de/pub/Mirrors/eclipse/%SUBDIR%/ \
  117. https://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/%SUBDIR%/
  118. .endif
  119. # List: https://www.exim.org/mirmon/ftp_mirrors.html
  120. .if !defined(IGNORE_MASTER_SITE_EXIM)
  121. MASTER_SITE_EXIM+= \
  122. https://exim.mirror.globo.tech/exim/%SUBDIR%/ \
  123. https://mirror.easyname.at/exim-ftp/exim/%SUBDIR%/ \
  124. https://www.mirrorservice.org/sites/ftp.exim.org/pub/exim/%SUBDIR%/ \
  125. https://exim.mirror.iphh.net/ftp/exim/%SUBDIR%/ \
  126. http://ftp.carnet.hr/misc/exim/exim/%SUBDIR%/ \
  127. http://ftp.kaist.ac.kr/exim/exim/%SUBDIR%/ \
  128. http://sunsite.icm.edu.pl/pub/unix/mail/exim/exim/%SUBDIR%/ \
  129. https://ftp.exim.org/pub/exim/%SUBDIR%/
  130. .endif
  131. .if !defined(IGNORE_MASTER_SITE_CENTOS_LINUX)
  132. MASTER_SITE_CENTOS_LINUX+= \
  133. http://mirror.centos.org/%SUBDIR%/:DEFAULT,aarch64,amd64,i386 \
  134. http://vault.centos.org/%SUBDIR%/:DEFAULT,aarch64,amd64,i386,SOURCE
  135. .endif
  136. .if !defined(IGNORE_MASTER_SITE_ROCKY_LINUX)
  137. MASTER_SITE_ROCKY_LINUX+= \
  138. https://dl.rockylinux.org/pub/rocky/%SUBDIR%/:DEFAULT,aarch64,amd64,SOURCE \
  139. https://dl.rockylinux.org/vault/rocky/%SUBDIR%/:DEFAULT,aarch64,amd64,SOURCE
  140. .endif
  141. .if !defined(IGNORE_MASTER_SITE_EPEL7)
  142. MASTER_SITE_EPEL7+= \
  143. https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/%SUBDIR%/:DEFAULT,aarch64 \
  144. https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/%SUBDIR%/:DEFAULT,amd64 \
  145. https://dl.fedoraproject.org/pub/epel/7/SRPMS/Packages/%SUBDIR%/:SOURCE \
  146. http://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/%SUBDIR%/:DEFAULT,aarch64 \
  147. http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/%SUBDIR%/:DEFAULT,amd64 \
  148. http://dl.fedoraproject.org/pub/epel/7/SRPMS/Packages/%SUBDIR%/:SOURCE
  149. .endif
  150. .if !defined(IGNORE_MASTER_SITE_RPMFUSION9)
  151. MASTER_SITE_RPMFUSION9+= \
  152. https://ftp.icm.edu.pl/pub/Linux/dist/rpmfusion/free/el/updates/9/aarch64/%SUBDIR%/:DEFAULT,aarch64 \
  153. https://ftp.icm.edu.pl/pub/Linux/dist/rpmfusion/free/el/updates/9/x86_64/%SUBDIR%/:DEFAULT,amd64 \
  154. https://ftp.icm.edu.pl/pub/Linux/dist/rpmfusion/free/el/updates/9/SRPMS/%SUBDIR%/:DEFAULT,SOURCE
  155. .endif
  156. .if !defined(IGNORE_MASTER_SITE_FARSIGHT)
  157. MASTER_SITE_FARSIGHT+= \
  158. https://dl.farsightsecurity.com/dist/%SUBDIR%/
  159. .endif
  160. .if !defined(IGNORE_MASTER_SITE_FESTIVAL)
  161. MASTER_SITE_FESTIVAL+= \
  162. http://www.festvox.org/packed/festival/%SUBDIR%/ \
  163. http://www.cstr.ed.ac.uk/downloads/festival/%SUBDIR%/
  164. .endif
  165. .if !defined(IGNORE_MASTER_SITE_FESTIVAL_OGI)
  166. MASTER_SITE_FESTIVAL_OGI+= \
  167. http://www.cslu.ogi.edu/tts/download/data/
  168. .endif
  169. #
  170. # FreeBSD mirror sites
  171. #
  172. # For the full list, see the Handbook:
  173. #
  174. # https://docs.FreeBSD.org/en/books/handbook/mirrors/#mirrors-ftp
  175. #
  176. .if !defined(IGNORE_MASTER_SITE_FREEBSD_ORG)
  177. MASTER_SITE_FREEBSD_ORG+= \
  178. https://download.FreeBSD.org/%SUBDIR%/ \
  179. ftp://ftp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
  180. ftp://ftp.se.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
  181. ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
  182. ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \
  183. ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/%SUBDIR%/
  184. .endif
  185. .if !defined(IGNORE_MASTER_SITE_FRUGALWARE)
  186. MASTER_SITE_FRUGALWARE+= \
  187. ftp://ftp7.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \
  188. ftp://ftp6.frugalware.org/mirrors/linux/frugalware/frugalware-stable/source/%SUBDIR%/ \
  189. ftp://ftp12.frugalware.org/mirrors/ftp.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/
  190. .endif
  191. .if !defined(IGNORE_MASTER_SITE_GCC)
  192. MASTER_SITE_GCC+= \
  193. https://mirrors.kernel.org/sourceware/gcc/%SUBDIR%/ \
  194. https://ftp-stud.hs-esslingen.de/pub/Mirrors/sourceware.org/gcc/%SUBDIR%/ \
  195. https://ftp.funet.fi/pub/mirrors/sourceware.org/pub/gcc/%SUBDIR%/ \
  196. https://ftp.mpi-inf.mpg.de/pub/gnu/mirror/gcc.gnu.org/pub/gcc/%SUBDIR%/ \
  197. https://mirrorservice.org/sites/sourceware.org/pub/gcc/%SUBDIR%/ \
  198. http://mirror.koddos.net/gcc/%SUBDIR%/ \
  199. http://ftp.ntua.gr/pub/gnu/gcc/%SUBDIR%/ \
  200. http://gcc.gnu.org/pub/gcc/%SUBDIR%/
  201. .endif
  202. .if !defined(IGNORE_MASTER_SITE_GENTOO)
  203. MASTER_SITE_GENTOO+= \
  204. https://mirror.leaseweb.com/gentoo/%SUBDIR%/ \
  205. https://mirror.rackspace.com/gentoo/%SUBDIR%/ \
  206. https://mirror.init7.net/gentoo/%SUBDIR%/ \
  207. https://mirrors.rit.edu/gentoo/%SUBDIR%/ \
  208. http://ftp.iij.ad.jp/pub/linux/gentoo/%SUBDIR%/ \
  209. http://ftp.belnet.be/pub/rsync.gentoo.org/gentoo/%SUBDIR%/ \
  210. http://ftp.uni-hannover.de/gentoo/%SUBDIR%/ \
  211. http://gentoo-mirror.flux.utah.edu/%SUBDIR%/
  212. .endif
  213. # Keep this before USE_GITHUB
  214. .if !empty(MASTER_SITES:M*/github.com/*/archive/*)
  215. DEV_WARNING+= "MASTER_SITES contains ${MASTER_SITES:M*/github.com/*/archive/*}, please use USE_GITHUB instead."
  216. .endif
  217. .if !defined(IGNORE_MASTER_SITE_GITHUB)
  218. #
  219. # In order to use GitHub your port must define USE_GITHUB and the following
  220. # variables:
  221. #
  222. # GH_ACCOUNT - account name of the GitHub user hosting the project
  223. # default: ${PORTNAME}
  224. #
  225. # GH_PROJECT - name of the project on GitHub
  226. # default: ${PORTNAME}
  227. #
  228. # GH_TAGNAME - name of the tag to download (2.0.1, hash, ...)
  229. # Using the name of a branch here is incorrect. It is
  230. # possible to do GH_TAGNAME= GIT_HASH to do a snapshot.
  231. # default: ${DISTVERSIONFULL}
  232. #
  233. # GH_SUBDIR - directory relative to WRKSRC where to move this distfile's
  234. # content after extracting.
  235. #
  236. # GH_TUPLE - above shortened to account:project:tagname[:group][/subdir]
  237. #
  238. . if defined(USE_GITHUB)
  239. . if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
  240. IGNORE?= Using master as GH_TAGNAME is invalid. \
  241. Must use a tag or commit hash so the upstream does \
  242. not "reroll" as soon as the branch is updated
  243. . endif
  244. . if defined(GH_TUPLE)
  245. . for _tuple in ${GH_TUPLE}
  246. _t_tmp=${_tuple}
  247. . if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\4@:S/://:C/[a-zA-Z0-9_.+-]//g}
  248. check-makevars::
  249. @${ECHO_MSG} "The ${_tuple} GH_TUPLE line has"
  250. @${ECHO_MSG} "a tag containing something else than [a-zA-Z0-9_.+-]"
  251. @${FALSE}
  252. . endif
  253. . endfor
  254. GH_ACCOUNT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\1\4@}
  255. GH_PROJECT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\2\4@}
  256. GH_TAGNAME+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\3\4@}
  257. GH_SUBDIR+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\6\4@:M/*:S/^\///}
  258. . endif
  259. # We are cheating and using backend URLS for GitHub here. See ports/194898
  260. # comment #15 for explanation as to why and how to deal with it if it breaks.
  261. MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR%
  262. MASTER_SITE_GITHUB_CLOUD+= https://cloud.github.com/downloads/%SUBDIR%
  263. . if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault}
  264. MASTER_SITES+= GH
  265. . endif
  266. GH_ACCOUNT_DEFAULT= ${PORTNAME}
  267. GH_ACCOUNT?= ${GH_ACCOUNT_DEFAULT}
  268. GH_PROJECT_DEFAULT= ${PORTNAME}
  269. GH_PROJECT?= ${GH_PROJECT_DEFAULT}
  270. # Use full PREFIX/SUFFIX and converted DISTVERSION
  271. GH_TAGNAME_DEFAULT= ${DISTVERSIONFULL}
  272. GH_TAGNAME?= ${GH_TAGNAME_DEFAULT}
  273. # Iterate over GH_ACCOUNT, GH_PROJECT, GH_TAGNAME and GH_SUBDIR to extract groups
  274. _GITHUB_GROUPS= DEFAULT
  275. . for _gh_v in GH_ACCOUNT GH_PROJECT GH_TAGNAME GH_SUBDIR
  276. . for _v_ex in ${${_gh_v}}
  277. _GH_GROUPS= ${_v_ex:S/^${_v_ex:C@:[^/:]+$@@}//:S/^://}
  278. . if !empty(_GH_GROUPS)
  279. . for _group in ${_GH_GROUPS:S/,/ /g}
  280. . if ${_group} == all || ${_group} == ALL || ${_group} == default
  281. check-makevars::
  282. @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
  283. @${ECHO_MSG} "used in group definitions. Please fix your ${_gh_v}"
  284. @${FALSE}
  285. . endif
  286. . if !${_GITHUB_GROUPS:M${_group}}
  287. _GITHUB_GROUPS+= ${_group}
  288. . endif
  289. ${_gh_v}_${_group}= ${_v_ex:C@^(.*):[^/:]+$@\1@}
  290. . endfor
  291. . else
  292. ${_gh_v}_DEFAULT= ${_v_ex:C@^(.*):[^/:]+$@\1@}
  293. . endif
  294. . endfor
  295. . endfor
  296. # Put the default values back into the variables so that the *default* behavior
  297. # is not changed.
  298. GH_ACCOUNT:= ${GH_ACCOUNT_DEFAULT}
  299. GH_PROJECT:= ${GH_PROJECT_DEFAULT}
  300. GH_TAGNAME:= ${GH_TAGNAME_DEFAULT}
  301. GH_SUBDIR:= ${GH_SUBDIR_DEFAULT}
  302. . if defined(GH_TAGNAME)
  303. # If you change either of the _SANITIZED or _EXTRACT variables, please keep the
  304. # changes in sync with the GH_TAGNAME_${_group}_* variables 50 lines below.
  305. GH_TAGNAME_SANITIZED= ${GH_TAGNAME:S,/,-,g}
  306. # GitHub silently converts tags starting with v to not have v in the filename
  307. # and extraction directory. It also replaces + with -.
  308. GH_TAGNAME_EXTRACT= ${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g:C/--*/-/g}
  309. . endif
  310. # This new scheme rerolls distfiles. Also ensure they are renamed to avoid
  311. # conflicts. Use _GITHUB_REV in case github changes their zipping or structure
  312. # which has happened before.
  313. _GITHUB_REV= 0
  314. _GITHUB_EXTRACT_SUFX= .tar.gz
  315. # Put the DEFAULT distfile first
  316. _GITHUB_CLONE_DIR?= ${WRKDIR}/git-clone
  317. _PORTS_DIRECTORIES+= ${_GITHUB_CLONE_DIR}
  318. . if !${USE_GITHUB:Mnodefault} && empty(MASTER_SITES:MGHC)
  319. # GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice
  320. . if ${GH_TAGNAME} != ${DISTVERSIONFULL}
  321. DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED}
  322. . else
  323. DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED}
  324. . endif
  325. DISTNAME_DEFAULT:= ${DISTNAME}_GH${_GITHUB_REV}
  326. DISTFILE_DEFAULT= ${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX}
  327. DISTNAME:= ${DISTNAME_DEFAULT}
  328. DISTFILES+= ${DISTFILE_DEFAULT}
  329. git-clone: git-clone-DEFAULT
  330. git-clone-DEFAULT: ${_GITHUB_CLONE_DIR}
  331. @git clone https://github.com/${GH_ACCOUNT_DEFAULT}/${GH_PROJECT_DEFAULT}.git ${_GITHUB_CLONE_DIR}/${GH_PROJECT_DEFAULT}
  332. @${ECHO_MSG} "Cloned the default github repository into ${_GITHUB_CLONE_DIR}/${GH_PROJECT_DEFAULT}" | ${FMT_80}
  333. . endif
  334. . if !empty(GH_SUBDIR)
  335. _SITES_extract:= 690:post-extract-gh-DEFAULT
  336. post-extract-gh-DEFAULT:
  337. @${RMDIR} ${WRKSRC}/${GH_SUBDIR_DEFAULT} 2>/dev/null || :
  338. @${MKDIR} ${WRKSRC}/${GH_SUBDIR_DEFAULT:H} 2>/dev/null || :
  339. @${LN} -s ${GH_SUBDIR_DEFAULT:C/[^\/]//g:C/\//..\//g:S/^$/./} ${WRKSRC}/${GH_SUBDIR_DEFAULT}
  340. . endif
  341. # If there are non default groups
  342. . if !empty(_GITHUB_GROUPS:NDEFAULT)
  343. # Then for each of the remaining groups, add DISTFILES and MASTER_SITES
  344. # entries with the correct group and create {WRKSRC,DISTNAME,DISTFILES}_group
  345. # helper variables.
  346. . for _group in ${_GITHUB_GROUPS:NDEFAULT}
  347. GH_ACCOUNT_${_group}?= ${GH_ACCOUNT_DEFAULT}
  348. GH_PROJECT_${_group}?= ${GH_PROJECT_DEFAULT}
  349. GH_TAGNAME_${_group}?= ${GH_TAGNAME_DEFAULT}
  350. # If you change either of the _SANITIZED or _EXTRACT variables, please keep the
  351. # changes in sync with the GH_TAGNAME_* variables 50 lines above.
  352. GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,g}
  353. GH_TAGNAME_${_group}_EXTRACT= ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g:C/--*/-/g}
  354. _GH_TUPLE_OUT:= ${_GH_TUPLE_OUT} ${GH_ACCOUNT_${_group}}:${GH_PROJECT_${_group}}:${GH_TAGNAME_${_group}}:${_group}/${GH_SUBDIR_${_group}}
  355. DISTNAME_${_group}:= ${GH_ACCOUNT_${_group}}-${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_SANITIZED}
  356. DISTFILE_${_group}:= ${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUFX}
  357. DISTFILES:= ${DISTFILES} ${DISTFILE_${_group}}:${_group}
  358. MASTER_SITES:= ${MASTER_SITES} ${MASTER_SITE_GITHUB:S@%SUBDIR%@${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}/tar.gz/${GH_TAGNAME_${_group}}?dummy=/:${_group}@}
  359. WRKSRC_${_group}:= ${WRKDIR}/${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_EXTRACT}
  360. . if !empty(GH_SUBDIR_${_group})
  361. # In order to sort the subdir extraction so that foo/bar is moved in before
  362. # foo/bar/baz, we count the number of / in the path and use it to order the
  363. # targets. This handles up to 9 levels. The max as of r463123 is 4.
  364. _SITES_extract:= ${_SITES_extract} 69${GH_SUBDIR_${_group}:C=[^/]+= =g:[#]}:post-extract-gh-${_group}
  365. post-extract-gh-${_group}:
  366. @${RMDIR} ${WRKSRC}/${GH_SUBDIR_${_group}} 2>/dev/null || :
  367. @${MKDIR} ${WRKSRC}/${GH_SUBDIR_${_group}:H} 2>/dev/null || :
  368. @${MV} ${WRKSRC_${_group}} ${WRKSRC}/${GH_SUBDIR_${_group}}
  369. @${LN} -s ${WRKSRC:T}/${GH_SUBDIR_${_group}} ${WRKSRC_${_group}}
  370. . endif
  371. git-clone: git-clone-${_group}
  372. git-clone-${_group}: ${_GITHUB_CLONE_DIR}
  373. @git clone https://github.com/${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}.git ${_GITHUB_CLONE_DIR}/${GH_PROJECT_${_group}}
  374. @${ECHO_MSG} "Cloned the ${_group} github repository into ${_GITHUB_CLONE_DIR}/${GH_PROJECT_${_group}}" | ${FMT_80}
  375. . endfor
  376. . endif
  377. convert-to-gh-tuple:
  378. @${ECHO_MSG} ${GH_ACCOUNT}:${GH_PROJECT}:${GH_TAGNAME} ${_GH_TUPLE_OUT:S/\/$//}
  379. WWW?= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/
  380. . endif # defined(USE_GITHUB)
  381. .endif # !defined(IGNORE_MASTER_SITE_GITHUB)
  382. # Keep this before USE_GITLAB
  383. # first try to detect when fetch was called by makesum, which passes
  384. # MASTER_SITES and would cause a bogus warning here.
  385. .if !(make(fetch) && !empty(NO_CHECKSUM) && !empty(DISABLE_SIZE))
  386. . if !empty(MASTER_SITES:M*//*/*/*/-/archive/${DISTVERSIONFULL}/)
  387. DEV_WARNING+= "MASTER_SITES contains ${MASTER_SITES:M*//*/*/*/-/archive/${DISTVERSIONFULL}/}, please use USE_GITLAB instead."
  388. . endif
  389. .endif
  390. .if !defined(IGNORE_MASTER_SITE_GITLAB)
  391. #
  392. # In order to use GitLab your port must define USE_GITLAB and the following
  393. # variables:
  394. #
  395. # GL_SITE - site URL hosting GitLab and the project
  396. # default: https://gitlab.com
  397. #
  398. # GL_ACCOUNT - account name of the GitLab user hosting the project
  399. # default: ${PORTNAME}
  400. #
  401. # GL_PROJECT - name of the project on GitLab
  402. # default: ${PORTNAME}
  403. #
  404. # GL_TAGNAME - name of the tag to download (2.0.1, hash, ...)
  405. # Using the name of a branch here is incorrect. It is
  406. # possible to do GL_TAGNAME= GIT_HASH to do a snapshot.
  407. # default: ${DISTVERSIONFULL}
  408. #
  409. # GL_SUBDIR - directory relative to WRKSRC where to move this distfile's
  410. # content after extracting.
  411. #
  412. # GL_TUPLE - above shortened to [site[:port][/webroot]:]account:project:tagname:group[/subdir]
  413. #
  414. . if defined(USE_GITLAB)
  415. . if !defined(GL_TAGNAME) && defined(GL_COMMIT)
  416. GL_TAGNAME= ${GL_COMMIT}
  417. DEV_WARNING+= "GL_COMMIT is deprecated, please use GL_TAGNAME instead"
  418. . endif
  419. . if defined(GL_TUPLE)
  420. . for _tuple in ${GL_TUPLE}
  421. . if ${_tuple:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\7@:S/^://:C/[a-zA-Z0-9_.+-]//g}
  422. check-makevars::
  423. @${ECHO_MSG} "The ${_tuple}"
  424. @${ECHO_MSG} "GL_TUPLE is improperly formatted or, the tagname"
  425. @${ECHO_MSG} "section contains something other than [a-zA-Z0-9_.+-]"
  426. @${FALSE}
  427. . endif
  428. . endfor
  429. GL_SITE+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\1\8@:S@::@:@}
  430. GL_ACCOUNT+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\5\8@}
  431. GL_PROJECT+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\6\8@}
  432. GL_TAGNAME+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\7\8@}
  433. GL_SUBDIR+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\9\8@:M/*:S/^\///}
  434. . endif
  435. . if empty(USE_GITLAB:Mnodefault)
  436. MASTER_SITES+= ${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/archive/${GL_TAGNAME:C@^[a-f0-9]{40}$@\0.tar.gz?dummy=@}/
  437. . endif
  438. GL_SITE_DEFAULT= https://gitlab.com
  439. GL_SITE?= ${GL_SITE_DEFAULT}
  440. GL_ACCOUNT_DEFAULT= ${PORTNAME}
  441. GL_ACCOUNT?= ${GL_ACCOUNT_DEFAULT}
  442. GL_PROJECT_DEFAULT= ${PORTNAME}
  443. GL_PROJECT?= ${GL_PROJECT_DEFAULT}
  444. GL_TAGNAME_DEFAULT= ${DISTVERSIONFULL}
  445. GL_TAGNAME?= ${GL_TAGNAME_DEFAULT}
  446. _GITLAB_GROUPS= DEFAULT
  447. . for _gl_v in GL_SITE GL_ACCOUNT GL_PROJECT GL_TAGNAME GL_SUBDIR
  448. . for _v_ex in ${${_gl_v}}
  449. _GL_GROUPS= ${_v_ex:S/^${_v_ex:C@:[^/:]+$@@}//:S/^://}
  450. . if !empty(_GL_GROUPS)
  451. . for _group in ${_GL_GROUPS:S/,/ /g}
  452. . if ${_group} == all || ${_group} == ALL || ${_group} == default
  453. check-makevars::
  454. @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
  455. @${ECHO_MSG} "used in group definitions. Please fix your ${_gl_v}"
  456. @${FALSE}
  457. . endif
  458. . if !${_GITLAB_GROUPS:M${_group}}
  459. _GITLAB_GROUPS+= ${_group}
  460. . endif
  461. ${_gl_v}_${_group}= ${_v_ex:C@^(.*):[^/:]+$@\1@}
  462. . endfor
  463. . else
  464. ${_gl_v}_DEFAULT= ${_v_ex:C@^(.*):[^/:]+$@\1@}
  465. . endif
  466. . endfor
  467. . endfor
  468. GL_SITE:= ${GL_SITE_DEFAULT}
  469. GL_ACCOUNT:= ${GL_ACCOUNT_DEFAULT}
  470. GL_PROJECT:= ${GL_PROJECT_DEFAULT}
  471. GL_TAGNAME:= ${GL_TAGNAME_DEFAULT}
  472. GL_SUBDIR:= ${GL_SUBDIR_DEFAULT}
  473. _GITLAB_REV= 0
  474. _GITLAB_EXTRACT_SUFX= .tar.gz
  475. _GITLAB_TAG_EXTRACT_SUFX= .tar.bz2
  476. _GITLAB_CLONE_DIR?= ${WRKDIR}/git-clone
  477. _PORTS_DIRECTORIES+= ${_GITLAB_CLONE_DIR}
  478. . if !${USE_GITLAB:Mnodefault}
  479. . if ${GL_TAGNAME:C/^[a-f0-9]{40}$//}
  480. DISTNAME:= ${GL_PROJECT}-${GL_TAGNAME}
  481. DISTFILES+= ${DISTNAME}${_GITLAB_TAG_EXTRACT_SUFX}
  482. . else
  483. DISTNAME:= ${GL_ACCOUNT}-${GL_PROJECT}-${GL_TAGNAME}_GL${_GITLAB_REV}
  484. DISTFILES+= ${DISTNAME}${_GITLAB_EXTRACT_SUFX}
  485. . endif
  486. git-clone: git-clone-DEFAULT
  487. git-clone-DEFAULT: ${_GITLAB_CLONE_DIR}
  488. @git clone ${GL_SITE_DEFAULT}/${GL_ACCOUNT_DEFAULT}/${GL_PROJECT_DEFAULT}.git ${_GITLAB_CLONE_DIR}/${GL_PROJECT_DEFAULT}
  489. @${ECHO_MSG} "Cloned the default GitLab repository into ${_GITLAB_CLONE_DIR}/${GL_PROJECT_DEFAULT}" | ${FMT_80}
  490. . endif
  491. . if !empty(GL_SUBDIR)
  492. _SITES_extract:= 69${GL_SUBDIR_${_group}:C=[^/]+= =g:[#]}:post-extract-gl-DEFAULT
  493. post-extract-gl-DEFAULT:
  494. @${RMDIR} ${WRKSRC}/${GL_SUBDIR_DEFAULT} 2>/dev/null || :
  495. @${MKDIR} ${WRKSRC}/${GL_SUBDIR_DEFAULT:H} 2>/dev/null || :
  496. @${LN} -s ${GL_SUBDIR_DEFAULT:C/[^\/]//g:C/\//..\//g:S/^$/./} ${WRKSRC}/${GL_SUBDIR_DEFAULT}
  497. . endif
  498. . if !empty(_GITLAB_GROUPS:NDEFAULT)
  499. . for _group in ${_GITLAB_GROUPS:NDEFAULT}
  500. # We set GL_SITE earlier, we need to verify it's not empty
  501. . if empty(GL_SITE_${_group})
  502. GL_SITE_${_group}= ${GL_SITE_DEFAULT}
  503. . endif
  504. GL_ACCOUNT_${_group}?= ${GL_ACCOUNT_DEFAULT}
  505. GL_PROJECT_${_group}?= ${GL_PROJECT_DEFAULT}
  506. _GL_TUPLE_OUT:= ${_GL_TUPLE_OUT} ${GL_SITE_${_group}}:${GL_ACCOUNT_${_group}}:${GL_PROJECT_${_group}}:${GL_TAGNAME_${_group}}:${_group}/${GL_SUBDIR_${_group}}
  507. . if ${GL_TAGNAME_${_group}:C/^[a-f0-9]{40}$//}
  508. DISTNAME_${_group}:= ${GL_PROJECT_${_group}}-${GL_TAGNAME_${_group}}
  509. DISTFILE_${_group}:= ${DISTNAME_${_group}}${_GITLAB_TAG_EXTRACT_SUFX}
  510. MASTER_SITES:= ${MASTER_SITES} ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}/-/archive/${GL_TAGNAME_${_group}}/:${_group}
  511. . else
  512. DISTNAME_${_group}:= ${GL_ACCOUNT_${_group}}-${GL_PROJECT_${_group}}-${GL_TAGNAME_${_group}}_GL${_GITLAB_REV}
  513. DISTFILE_${_group}:= ${DISTNAME_${_group}}${_GITLAB_EXTRACT_SUFX}
  514. MASTER_SITES:= ${MASTER_SITES} ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}/-/archive/${GL_TAGNAME_${_group}}.tar.gz?dummy=/:${_group}
  515. . endif
  516. DISTFILES:= ${DISTFILES} ${DISTFILE_${_group}}:${_group}
  517. WRKSRC_${_group}:= ${WRKDIR}/${GL_PROJECT_${_group}}-${GL_TAGNAME_${_group}}
  518. . if !empty(GL_SUBDIR_${_group})
  519. _SITES_extract:= ${_SITES_extract} 690:post-extract-gl-${_group}
  520. post-extract-gl-${_group}:
  521. @${RMDIR} ${WRKSRC}/${GL_SUBDIR_${_group}} 2>/dev/null || :
  522. @${MKDIR} ${WRKSRC}/${GL_SUBDIR_${_group}:H} 2>/dev/null || :
  523. @${MV} ${WRKSRC_${_group}} ${WRKSRC}/${GL_SUBDIR_${_group}}
  524. @${LN} -s ${WRKSRC:T}/${GL_SUBDIR_${_group}} ${WRKSRC_${_group}}
  525. . endif
  526. git-clone: git-clone-${_group}
  527. git-clone-${_group}: ${_GITLAB_CLONE_DIR}
  528. @git clone ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}.git ${_GITLAB_CLONE_DIR}/${GL_PROJECT_${_group}}
  529. @${ECHO_MSG} "Cloned the ${_group} GitLab repository into ${_GITLAB_CLONE_DIR}/${GL_PROJECT_${_group}}" | ${FMT_80}
  530. . endfor
  531. . endif
  532. WWW?= https://gitlab.com/${GL_ACCOUNT}/${GL_PROJECT}/
  533. . endif # defined(USE_GITLAB)
  534. .endif # !defined(IGNORE_MASTER_SITE_GITLAB)
  535. .if !defined(IGNORE_MASTER_SITE_GNOME)
  536. MASTER_SITE_GNOME+= \
  537. https://download.gnome.org/%SUBDIR%/ \
  538. https://gitlab.gnome.org/GNOME/${PORTNAME}/-/archive/${PORTVERSION}/ \
  539. http://ftp.belnet.be/mirror/ftp.gnome.org/gnomeftp/%SUBDIR%/ \
  540. ftp://ftp.belnet.be/mirror/ftp.gnome.org/gnomeftp/%SUBDIR%/ \
  541. https://ftp.acc.umu.se/pub/GNOME/%SUBDIR%/ \
  542. ftp://ftp.cse.buffalo.edu/pub/Gnome/%SUBDIR%/ \
  543. https://fr2.rpmfind.net/linux/gnome.org/%SUBDIR%/ \
  544. ftp://ftp.kddlabs.co.jp/pub/GNOME/%SUBDIR%/ \
  545. ftp://ftp.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/%SUBDIR%/ \
  546. ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/%SUBDIR%/
  547. .endif
  548. .if !defined(IGNORE_MASTER_SITE_GIMP)
  549. MASTER_SITE_GIMP+= \
  550. http://gimp.mirrors.hoobly.com/pub/%SUBDIR%/ \
  551. http://gimp.afri.cc/pub/%SUBDIR%/ \
  552. https://download.gimp.org/pub/%SUBDIR%/
  553. .endif
  554. .if !defined(IGNORE_MASTER_SITE_GNU)
  555. MASTER_SITE_GNU+= \
  556. https://ftpmirror.gnu.org/%SUBDIR%/ \
  557. https://mirrors.kernel.org/gnu/%SUBDIR%/ \
  558. https://mirror.netcologne.de/gnu/%SUBDIR%/ \
  559. https://www.nic.funet.fi/pub/gnu/gnu/%SUBDIR%/ \
  560. http://mirror.navercorp.com/gnu/%SUBDIR%/ \
  561. http://ftp.halifax.rwth-aachen.de/gnu/%SUBDIR%/ \
  562. http://ftp.kddilabs.jp/GNU/gnu/%SUBDIR%/ \
  563. ftp://mirrors.rit.edu/gnu/%SUBDIR%/ \
  564. ftp://ftp.fu-berlin.de/unix/gnu/%SUBDIR%/ \
  565. ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/%SUBDIR%/ \
  566. https://ftp.gnu.org/gnu/%SUBDIR%/
  567. .endif
  568. # List: https://gnupg.org/download/mirrors.html (contains stale information)
  569. .if !defined(IGNORE_MASTER_SITE_GNUPG)
  570. MASTER_SITE_GNUPG+= \
  571. https://mirrors.dotsrc.org/gcrypt/%SUBDIR%/ \
  572. https://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/%SUBDIR%/ \
  573. https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/%SUBDIR%/ \
  574. http://www.ring.gr.jp/pub/net/gnupg/%SUBDIR%/ \
  575. https://gnupg.org/ftp/gcrypt/%SUBDIR%/
  576. .endif
  577. .if !defined(IGNORE_MASTER_SITE_GNUSTEP)
  578. MASTER_SITE_GNUSTEP+= \
  579. ftp://ftp.gnustep.org/pub/gnustep/%SUBDIR%/ \
  580. http://ftp.gnustep.org/pub/gnustep/%SUBDIR%/
  581. .endif
  582. .if !defined(IGNORE_MASTER_SITE_GNU_ALPHA)
  583. MASTER_SITE_GNU_ALPHA+= \
  584. https://alpha.gnu.org/gnu/%SUBDIR%/ \
  585. ftp://spinellicreations.com/alpha/gnu/%SUBDIR%/ \
  586. http://www.nic.funet.fi/pub/gnu/alpha/gnu/%SUBDIR%/ \
  587. http://mirror.thecodefactory.org/gnualpha/%SUBDIR%/ \
  588. https://www.mirrorservice.org/sites/alpha.gnu.org/gnu/%SUBDIR%/ \
  589. http://gnu.c3sl.ufpr.br/alpha/%SUBDIR%/ \
  590. https://mirror.cedia.org.ec/gnualpha/%SUBDIR%/ \
  591. http://gnu-alpha.mirrors.hostinginnederland.nl/%SUBDIR%/ \
  592. https://gnualpha.uib.no/%SUBDIR%/ \
  593. https://mirrors.fe.up.pt/pub/gnu-alpha/%SUBDIR%/ \
  594. http://mirror.lihnidos.org/GNU/alpha/gnu/%SUBDIR%/ \
  595. https://alpha-gnu-org.ip-connect.vn.ua/%SUBDIR%/
  596. .endif
  597. .if !defined(IGNORE_MASTER_SITE_HACKAGE)
  598. MASTER_SITE_HACKAGE+= \
  599. https://hackage.haskell.org/package/ \
  600. http://hackage.haskell.org/package/
  601. .endif
  602. .if !defined(IGNORE_MASTER_SITE_IDSOFTWARE)
  603. MASTER_SITE_IDSOFTWARE+= \
  604. ftp://ftp.gwdg.de/pub/misc2/ftp.idsoftware.com/idstuff/%SUBDIR%/ \
  605. http://ftp4.de.freesbie.org/pub/misc/ftp.idsoftware.com/idstuff/%SUBDIR%/ \
  606. ftp://ftp.fu-berlin.de/pc/games/idgames/idstuff/%SUBDIR%/ \
  607. ftp://ftp.gamers.org/pub/idgames/idstuff/%SUBDIR%/ \
  608. http://ftp.iinet.net.au/games/idstuff/%SUBDIR%/ \
  609. ftp://ftp.mirror.nl/disk2/idsoftware/idstuff/%SUBDIR%/ \
  610. ftp://freebsd.nsu.ru/mirrors/ftp.idsoftware.com/idstuff/%SUBDIR%/ \
  611. ftp://ftp.ntua.gr/pub/vendors/idgames/idstuff/%SUBDIR%/ \
  612. ftp://ftp.omen.net.au/games/idstuff/%SUBDIR%/ \
  613. ftp://ftp.idsoftware.com/idstuff/%SUBDIR%/
  614. .endif
  615. .if !defined(IGNORE_MASTER_SITE_ISC)
  616. MASTER_SITE_ISC+= \
  617. https://ftp.isc.org/isc/%SUBDIR%/ \
  618. ftp://ftp.isc.org/isc/%SUBDIR%/ \
  619. ftp://ftp.ciril.fr/pub/isc/%SUBDIR%/ \
  620. ftp://ftp.freenet.de/pub/ftp.isc.org/isc/%SUBDIR%/ \
  621. ftp://ftp.iij.ad.jp/pub/network/isc/%SUBDIR%/ \
  622. ftp://ftp.u-aizu.ac.jp/pub/net/isc/%SUBDIR%/ \
  623. ftp://ftp.task.gda.pl/mirror/ftp.isc.org/isc/%SUBDIR%/ \
  624. ftp://ftp.mirrorservice.org/sites/ftp.isc.org/isc/%SUBDIR%/ \
  625. ftp://ftp.nominum.com/pub/isc/%SUBDIR%/ \
  626. ftp://ftp.ripe.net/mirrors/sites/ftp.isc.org/isc/%SUBDIR%/ \
  627. ftp://ftp.ntua.gr/pub/net/isc/isc/%SUBDIR%/ \
  628. ftp://ftp.funet.fi/pub/mirrors/ftp.isc.org/isc/%SUBDIR%/
  629. .endif
  630. .if !defined(IGNORE_MASTER_SITE_KDE)
  631. MASTER_SITE_KDE+= \
  632. https://download.kde.org/%SUBDIR%/
  633. .endif
  634. .if !defined(IGNORE_MASTER_SITE_LIBREOFFICE_DEV)
  635. MASTER_SITE_LIBREOFFICE_DEV+= \
  636. https://dev-www.libreoffice.org/src/%SUBDIR%/
  637. .endif
  638. .if !defined(IGNORE_MASTER_SITE_MATE)
  639. MASTER_SITE_MATE+= \
  640. https://pub.mate-desktop.org/releases/%SUBDIR%/
  641. .endif
  642. .if !defined(IGNORE_MASTER_SITE_MOZDEV)
  643. MASTER_SITE_MOZDEV+= \
  644. http://mirrors.ibiblio.org/mozdev.org/%SUBDIR%/
  645. .endif
  646. .if !defined(IGNORE_MASTER_SITE_MOZILLA)
  647. MASTER_SITE_MOZILLA+= \
  648. https://download.cdn.mozilla.net/pub/%SUBDIR%/ \
  649. https://archive.mozilla.org/pub/%SUBDIR%/
  650. .endif
  651. .if !defined(IGNORE_MASTER_SITE_MOZILLA_ADDONS)
  652. MASTER_SITE_MOZILLA_ADDONS+= \
  653. http://kyoto-mz-dl.sinet.ad.jp/pub/mozilla.org/%SUBDIR%/
  654. .endif
  655. .if !defined(IGNORE_MASTER_SITE_MYSQL)
  656. MASTER_SITE_MYSQL+= \
  657. ftp://ftp.fi.muni.cz/pub/mysql/Downloads/%SUBDIR%/ \
  658. ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/%SUBDIR%/ \
  659. https://dev.mysql.com/get/Downloads/%SUBDIR%/
  660. .endif
  661. .if !defined(IGNORE_MASTER_SITE_NETBSD)
  662. MASTER_SITE_NETBSD+= \
  663. https://ftp.netbsd.org/pub/pkgsrc/distfiles/%SUBDIR%/ \
  664. http://ftp.fr.netbsd.org/pub/pkgsrc/%SUBDIR%/ \
  665. ftp://ftp2.fr.netbsd.org/pub/pkgsrc/%SUBDIR%/ \
  666. ftp://ftp3.de.netbsd.org/pub/pkgsrc/%SUBDIR%/ \
  667. ftp://ftp2.jp.netbsd.org/pub/pkgsrc/%SUBDIR%/ \
  668. ftp://ftp7.jp.netbsd.org/pub/pkgsrc/%SUBDIR%/
  669. .endif
  670. .if !defined(IGNORE_MASTER_SITE_NETLIB)
  671. MASTER_SITE_NETLIB+= \
  672. http://www.netlib.org/%SUBDIR%/ \
  673. ftp://ftp.irisa.fr/pub/netlib/%SUBDIR%/ \
  674. http://netlib.sandia.gov/%SUBDIR%/
  675. .endif
  676. .if !defined(IGNORE_MASTER_SITE_NVIDIA)
  677. MASTER_SITE_NVIDIA+= \
  678. https://jp.download.nvidia.com/%SUBDIR%/ \
  679. http://us.download.nvidia.com/%SUBDIR%/ \
  680. https://tw.download.nvidia.com/%SUBDIR%/ \
  681. http://download.nvidia.com/%SUBDIR%/ \
  682. https://http.download.nvidia.com/%SUBDIR%/ \
  683. ftp://download.nvidia.com/%SUBDIR%/ \
  684. ftp://download1.nvidia.com/%SUBDIR%/
  685. .endif
  686. .if !defined(IGNORE_MASTER_SITE_OPENBSD)
  687. MASTER_SITE_OPENBSD+= \
  688. https://cdn.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
  689. https://cloudflare.cdn.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
  690. https://ftp.OpenBSD.org/pub/OpenBSD/%SUBDIR%/ \
  691. https://ftp.eu.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
  692. https://ftp.usa.openbsd.org/pub/OpenBSD/%SUBDIR%/ \
  693. https://mirror.leaseweb.com/pub/OpenBSD/%SUBDIR%/ \
  694. https://mirror.aarnet.edu.au/pub/OpenBSD/%SUBDIR%/
  695. .endif
  696. # Reference: https://osdn.net/docs/FileRelease_Guide#h2-Release.20File.20URL.20Formats
  697. .if !defined(IGNORE_MASTER_SITE_OSDN)
  698. MASTER_SITE_OSDN+= \
  699. https://osdn.net/dl/%SUBDIR%/
  700. .endif
  701. .if !defined(IGNORE_MASTER_SITE_OSDN_CHAMBER)
  702. MASTER_SITE_OSDN_CHAMBER+= \
  703. https://osdn.net/downloads/users/%SUBDIR%/
  704. .endif
  705. # From https://osdn.net/docs/FileRelease_Guide#h2-Direct.20Download
  706. # "Currently, when a release-file URL is accessed from wget, curl,
  707. # libwww-perl, PowerShell, apt, dnf, or other package management
  708. # tools, downloading of the file will begin right away without
  709. # having to go via html page."
  710. # Unfortunately fetch(1) isn't included in such user agents. Therefore
  711. # add --user-agent option to FETCH_ARGS so access is considered as
  712. # that of ftp/curl.
  713. .if !empty(MASTER_SITES:M*OSDN*) || !empty(PATCH_SITES:M*OSDN*)
  714. FETCH_ARGS+= --user-agent=curl/7.68.0
  715. .endif
  716. .if !defined(IGNORE_MASTER_SITE_OSSP)
  717. MASTER_SITE_OSSP+= \
  718. http://ftp.ntua.gr/pub/utils/ossp/%SUBDIR%/ \
  719. ftp://ftp.ntua.gr/pub/utils/ossp/%SUBDIR%/
  720. .endif
  721. .if !defined(IGNORE_MASTER_SITE_PACKETSTORM)
  722. MASTER_SITE_PACKETSTORM+= \
  723. https://dl.packetstormsecurity.net/%SUBDIR%/
  724. .endif
  725. .if !defined(IGNORE_MASTER_SITE_PERL_CPAN)
  726. _PERL_CPAN_SORT?= modules/by-module
  727. # Please add URI to MASTER_SITE_PERL_CPAN_BY instead of this one.
  728. MASTER_SITE_PERL_CPAN?=
  729. MASTER_SITE_PERL_CPAN_BY+= \
  730. https://cpan.metacpan.org/%CPANSORT%/%SUBDIR%/ \
  731. https://cpan.metacpan.org/modules/by-module/%SUBDIRPLUS%/ \
  732. https://www.cpan.org/%CPANSORT%/%SUBDIR%/ \
  733. ftp://ftp.cpan.org/pub/CPAN/%CPANSORT%/%SUBDIR%/ \
  734. ftp://ftp.kddlabs.co.jp/lang/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
  735. http://ftp.jaist.ac.jp/pub/CPAN/%CPANSORT%/%SUBDIR%/ \
  736. ftp://ftp.mirrorservice.org/sites/cpan.perl.org/CPAN/%CPANSORT%/%SUBDIR%/ \
  737. ftp://ftp.auckland.ac.nz/pub/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
  738. http://backpan.perl.org/%CPANSORT%/%SUBDIR%/ \
  739. ftp://ftp.funet.fi/pub/languages/perl/CPAN/%CPANSORT%/%SUBDIR%/ \
  740. http://ftp.twaren.net/Unix/Lang/CPAN/%CPANSORT%/%SUBDIR%/ \
  741. ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%SUBDIRPLUS%/
  742. _PERL_CPAN_FLAG=${MASTER_SITE_SUBDIR:C/(CPAN):.*$/\1/}
  743. _PERL_CPAN_ID= ${MASTER_SITE_SUBDIR:C/^CPAN:(.)(.)(.*)$/\1\/\1\2\/\1\2\3/}
  744. . if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan"
  745. _PERL_CPAN_SORT=authors/id/${_PERL_CPAN_ID}
  746. MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIR%\///:S/%SUBDIRPLUS%\//${PORTNAME:C/-.*//}\//}
  747. . else
  748. MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIRPLUS%\///}
  749. . endif
  750. .endif
  751. #
  752. # PostgreSQL master site
  753. #
  754. .if !defined(IGNORE_MASTER_SITE_PGSQL)
  755. MASTER_SITE_PGSQL+= \
  756. https://ftp.postgresql.org/pub/%SUBDIR%/
  757. .endif
  758. # Currently MyraCloud is blocking fetch. Hence add php Github distributions
  759. # untill it is fixed.
  760. .if !defined(IGNORE_MASTER_SITE_PHP)
  761. MASTER_SITE_PHP+= \
  762. https://www.php.net/distributions/ \
  763. https://raw.githubusercontent.com/php/web-php-distributions/master/
  764. .endif
  765. .if !defined(IGNORE_MASTER_SITE_PYPI)
  766. MASTER_SITE_PYPI+= \
  767. https://files.pythonhosted.org/packages/%SUBDIR%/ \
  768. https://pypi.org/packages/%SUBDIR%/
  769. .endif
  770. .if !defined(IGNORE_MASTER_SITE_PYTHON)
  771. MASTER_SITE_PYTHON+= \
  772. https://www.python.org/%SUBDIR%/
  773. .endif
  774. .if !defined(IGNORE_MASTER_SITE_QMAIL)
  775. MASTER_SITE_QMAIL+= \
  776. http://qmail.glasswings.com.au/%SUBDIR%/ \
  777. http://qmail.psshee.com/%SUBDIR%/ \
  778. http://www.agria.hu/qmail/%SUBDIR%/ \
  779. http://qmail.omnis.ch/%SUBDIR%/ \
  780. http://www.qmail.org/%SUBDIR%/
  781. .endif
  782. .if !defined(IGNORE_MASTER_SITE_QT)
  783. MASTER_SITE_QT+= \
  784. https://download.qt.io/%SUBDIR%/ \
  785. http://master.qt.io/%SUBDIR%/ \
  786. https://www.mirrorservice.org/sites/download.qt-project.org/%SUBDIR%/ \
  787. http://www.nic.funet.fi/pub/mirrors/download.qt-project.org/%SUBDIR%/ \
  788. https://ftp.jaist.ac.jp/pub/qtproject/%SUBDIR%/
  789. .endif
  790. .if !defined(IGNORE_MASTER_SITE_RUBY)
  791. MASTER_SITE_RUBY+= \
  792. https://cache.ruby-lang.org/pub/ruby/%SUBDIR%/ \
  793. ftp://ftp.fu-berlin.de/unix/languages/ruby/%SUBDIR%/ \
  794. ftp://ftp.kr.FreeBSD.org/pub/ruby/%SUBDIR%/ \
  795. ftp://ftp.iDaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/%SUBDIR%/
  796. .endif
  797. # See http://rubygems.org/pages/about
  798. .if !defined(IGNORE_MASTER_SITE_RUBYGEMS)
  799. MASTER_SITE_RUBYGEMS+= \
  800. https://rubygems.org/downloads/
  801. .endif
  802. .if !defined(IGNORE_MASTER_SITE_SAMBA)
  803. MASTER_SITE_SAMBA+= \
  804. https://ftp.samba.org/pub/%SUBDIR%/
  805. .endif
  806. # List: https://download-mirror.savannah.gnu.org/releases/00_MIRRORS.html
  807. .if !defined(IGNORE_MASTER_SITE_SAVANNAH)
  808. MASTER_SITE_SAVANNAH+= \
  809. https://download.savannah.gnu.org/releases/%SUBDIR%/ \
  810. https://nongnu.uib.no/%SUBDIR%/ \
  811. https://mirror.kumi.systems/nongnu/%SUBDIR%/ \
  812. https://mirrors.up.pt/pub/nongnu/%SUBDIR%/ \
  813. http://nongnu.askapache.com/%SUBDIR%/ \
  814. http://mirror.netcologne.de/savannah/%SUBDIR%/ \
  815. http://mirror.csclub.uwaterloo.ca/nongnu/%SUBDIR%/ \
  816. http://mirror.easyname.at/nongnu/%SUBDIR%/ \
  817. https://download-mirror.savannah.gnu.org/releases/%SUBDIR%/
  818. .endif
  819. # List: https://sourceforge.net/p/forge/documentation/Mirrors/
  820. # Updated: 2022-11-26
  821. .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE)
  822. . for p in https http
  823. MASTER_SITE_SOURCEFORGE+= ${p}://downloads.sourceforge.net/project/%SUBDIR%/
  824. . for m in cfhcable cytranet deac-ams deac-fra deac-riga excellmedia \
  825. freefr gigenet ixpeering jaist kumisystems liquidtelecom \
  826. nchc netactuate netcologne netix onboardcloud phoenixnap \
  827. razaoinfo sinalbr sitsa tenet udomain ufpr versaweb
  828. MASTER_SITE_SOURCEFORGE+= ${p}://${m}.dl.sourceforge.net/project/%SUBDIR%/
  829. . endfor
  830. . endfor
  831. .endif
  832. .if !defined(IGNORE_MASTER_SITE_SOURCEWARE)
  833. MASTER_SITE_SOURCEWARE+= \
  834. https://mirrors.kernel.org/sourceware/%SUBDIR%/ \
  835. https://ftp-stud.hs-esslingen.de/pub/Mirrors/sourceware.org/%SUBDIR%/ \
  836. https://ftp.funet.fi/pub/mirrors/sourceware.org/pub/%SUBDIR%/ \
  837. https://mirrorservice.org/sites/sourceware.org/pub/%SUBDIR%/
  838. .endif
  839. .if !defined(IGNORE_MASTER_SITE_SUDO)
  840. MASTER_SITE_SUDO+= \
  841. https://www.sudo.ws/sudo/dist/ \
  842. http://ftp.arcane-networks.fr/pub/mirrors/sudo/ \
  843. http://sudo.p8ra.de/sudo/dist/ \
  844. http://sudo.cybermirror.org/ \
  845. http://sudo-ftp.basemirror.de/ \
  846. http://ftp.twaren.net/Unix/Security/Sudo/ \
  847. ftp://ftp.sudo.ws/pub/sudo/ \
  848. ftp://plier.ucar.edu/pub/sudo/ \
  849. ftp://obsd.isc.org/pub/sudo/ \
  850. ftp://ftp.uwsg.indiana.edu/pub/security/sudo/ \
  851. ftp://ftp.tuwien.ac.at/utils/admin-tools/sudo/ \
  852. ftp://sunsite.ualberta.ca/pub/Mirror/sudo/ \
  853. ftp://zoot.tele.dk/pub/sudo/ \
  854. ftp://ftp.in2p3.fr/pub/sudo/ \
  855. ftp://ftp.arcane-networks.fr/pub/mirrors/sudo/ \
  856. ftp://ftp.usbm.de/pub/sudo/ \
  857. ftp://ftp.cs.tu-berlin.de/pub/misc/sudo/ \
  858. ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/sudo/ \
  859. ftp://ftp.st.ryukoku.ac.jp/pub/security/tool/sudo/ \
  860. ftp://ftp.cin.nihon-u.ac.jp/pub/misc/sudo/ \
  861. ftp://sunsite.icm.edu.pl/packages/sudo/ \
  862. ftp://mirror.cdmon.com/pub/sudo/ \
  863. ftp://ftp.twaren.net/Unix/Security/Sudo/
  864. .endif
  865. .if !defined(IGNORE_MASTER_SITE_SUNSITE)
  866. MASTER_SITE_SUNSITE+= \
  867. https://www.ibiblio.org/pub/Linux/%SUBDIR%/ \
  868. http://www.gtlib.gatech.edu/pub/Linux/%SUBDIR%/ \
  869. ftp://ftp.icm.edu.pl/pub/Linux/sunsite/%SUBDIR%/ \
  870. ftp://ftp.sun.ac.za/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/
  871. .endif
  872. .if !defined(IGNORE_MASTER_SITE_TCLTK)
  873. MASTER_SITE_TCLTK+= \
  874. ftp://ftp.tcl.tk/pub/tcl/%SUBDIR%/ \
  875. ftp://ftp.kddlabs.co.jp/lang/tcl/ftp.scriptics.com/%SUBDIR%/ \
  876. ftp://ftp.mirrorservice.org/sites/ftp.tcl.tk/pub/tcl/%SUBDIR%/ \
  877. ftp://ftp.funet.fi/pub/languages/tcl/tcl/%SUBDIR%/
  878. .endif
  879. .if !defined(IGNORE_MASTER_SITE_TEX)
  880. MASTER_SITE_TEX+= \
  881. https://mirror.ctan.org/%SUBDIR%/
  882. .endif
  883. .if !defined(IGNORE_MASTER_SITE_TEX_CTAN)
  884. MASTER_SITE_TEX_CTAN+= \
  885. https://ftp.tu-chemnitz.de/pub/tug/historic/%SUBDIR%/ \
  886. https://pi.kwarc.info/historic/%SUBDIR%/ \
  887. https://mirrors.tuna.tsinghua.edu.cn/tex-historic-archive/%SUBDIR%/ \
  888. https://mirror.nju.edu.cn/tex-historic/%SUBDIR%/ \
  889. https://ftp.math.utah.edu/pub/tex/historic/%SUBDIR%/
  890. .endif
  891. # Derived from: https://www.torproject.org/getinvolved/mirrors.html.en
  892. # Please do not blindly follow and add URLs from the above list
  893. .if !defined(IGNORE_MASTER_SITE_TOR)
  894. MASTER_SITE_TOR+= \
  895. https://dist.torproject.org/%SUBDIR%/ \
  896. https://archive.torproject.org/tor-package-archive/%SUBDIR%/ \
  897. ftp://ftp.bit.nl/mirror/tor/%SUBDIR%/ \
  898. https://cyberside.net.ee/sibul/dist/%SUBDIR%/ \
  899. https://ftp.bit.nl/mirror/tor/%SUBDIR%/ \
  900. http://mirror.hessmo.com/tor/dist/%SUBDIR%/ \
  901. http://mirror.host4site.co.il/torproject.org/dist/%SUBDIR%/ \
  902. http://mirror.open-networx.org/torproject.org/dist/%SUBDIR%/ \
  903. http://mirror.tor.hu/dist/%SUBDIR%/ \
  904. http://mirrors.chaos-darmstadt.de/tor-mirror/dist/%SUBDIR%/ \
  905. http://theonionrouter.com/dist/%SUBDIR%/ \
  906. http://tor.amorphis.eu/dist/%SUBDIR%/ \
  907. http://tor.askapache.com/dist/%SUBDIR%/ \
  908. http://tor.beme-it.de/dist/%SUBDIR%/ \
  909. http://tor.borgmann.tv/dist/%SUBDIR%/ \
  910. http://tor.cyberarmy.at/dist/%SUBDIR%/ \
  911. http://tor.dont-know-me.at/dist/%SUBDIR%/ \
  912. http://tor.factor.cc/dist/%SUBDIR%/ \
  913. http://tor.idnr.ws/dist/%SUBDIR%/ \
  914. http://tor.kamagurka.org/dist/%SUBDIR%/ \
  915. http://tor.spline.de/dist/%SUBDIR%/ \
  916. http://tor.vesta.nu/dist/%SUBDIR%/ \
  917. http://torproj.xpdm.us/dist/%SUBDIR%/ \
  918. http://torproject.nwlinux.us/dist/%SUBDIR%/ \
  919. https://torproject.ph3x.at/dist/%SUBDIR%/ \
  920. http://www.oignon.net/dist/%SUBDIR%/ \
  921. http://www.torproject.org.nyud.net/dist/%SUBDIR%/ \
  922. http://www.torproject.us/dist/%SUBDIR%/
  923. .endif
  924. .if !defined(IGNORE_MASTER_SITE_WINDOWMAKER)
  925. MASTER_SITE_WINDOWMAKER+= \
  926. ftp://ftp.windowmaker.info/pub/%SUBDIR%/ \
  927. ftp://ftp.uvsq.fr/pub/X11/window-managers/windowmaker/%SUBDIR%/
  928. .endif
  929. .if !defined(IGNORE_MASTER_SITE_XCONTRIB)
  930. MASTER_SITE_XCONTRIB+= \
  931. ftp://ftp.gwdg.de/pub/x11/x.org/contrib/%SUBDIR%/
  932. .endif
  933. .if !defined(IGNORE_MASTER_SITE_XFCE)
  934. _XFCE_PATH= ${DISTNAME:S/-${DISTVERSIONFULL}//:tl}/${DISTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
  935. MASTER_SITE_XFCE+= \
  936. https://archive.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ \
  937. https://mirror.netcologne.de/xfce/src/%SUBDIR%/${_XFCE_PATH}/ \
  938. https://ftp.cixug.es/xfce/src/%SUBDIR%/${_XFCE_PATH}/ \
  939. https://archive.be.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ \
  940. https://archive.al-us.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/
  941. .endif
  942. .if !defined(IGNORE_MASTER_SITE_XORG)
  943. MASTER_SITE_XORG+= \
  944. https://xorg.freedesktop.org/releases/%SUBDIR%/ \
  945. https://mirror.csclub.uwaterloo.ca/x.org/%SUBDIR%/ \
  946. https://artfiles.org/x.org/pub/%SUBDIR%/ \
  947. https://ftp.gwdg.de/pub/x11/x.org/pub/%SUBDIR%/ \
  948. https://mirrors.ircam.fr/pub/x.org/%SUBDIR%/ \
  949. https://www.mirrorservice.org/sites/ftp.x.org/pub/%SUBDIR%/ \
  950. https://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/%SUBDIR%/ \
  951. http://piotrkosoft.net/pub/mirrors/ftp.x.org/pub/%SUBDIR%/ \
  952. http://ftp.kaist.ac.kr/x.org/%SUBDIR%/
  953. .endif
  954. .if !defined(IGNORE_MASTER_SITE_KERNEL_ORG)
  955. MASTER_SITE_KERNEL_ORG+= \
  956. https://cdn.kernel.org/pub/%SUBDIR%/ \
  957. https://www.kernel.org/pub/%SUBDIR%/ \
  958. https://mirrors.mit.edu/kernel/%SUBDIR%/ \
  959. http://ftp.nara.wide.ad.jp/pub/kernel.org/%SUBDIR%/ \
  960. http://ftp.yandex.ru/pub/%SUBDIR%/ \
  961. http://ftp.heanet.ie/pub/kernel.org/pub/%SUBDIR%/ \
  962. ftp://ftp.ntu.edu.tw/%SUBDIR%/ \
  963. ftp://ftp.riken.jp/Linux/kernel.org/%SUBDIR%/
  964. .endif
  965. .if !defined(IGNORE_MASTER_SITE_ZI)
  966. MASTER_SITE_ZI+= \
  967. https://ftpmirror.your.org/pub/zi/%SUBDIR%/ \
  968. https://mirrors.rit.edu/zi/%SUBDIR%/ \
  969. https://www.zi0r.com/mirrors/%SUBDIR%/ \
  970. ${MASTER_SITE_LOCAL:S/%SUBDIR%/zi/}
  971. .endif
  972. # Macro magic
  973. MASTER_SITES_ABBREVS= CPAN:PERL_CPAN \
  974. GH:GITHUB \
  975. GHC:GITHUB_CLOUD \
  976. LODEV:LIBREOFFICE_DEV \
  977. NL:NETLIB \
  978. RG:RUBYGEMS \
  979. SF:SOURCEFORGE
  980. MASTER_SITES_SUBDIRS= APACHE_COMMONS_BINARIES:${PORTNAME:S,commons-,,} \
  981. APACHE_COMMONS_SOURCE:${PORTNAME:S,commons-,,} \
  982. APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \
  983. BERLIOS:${PORTNAME:tl}.berlios \
  984. CRATESIO:${PORTNAME}/${DISTVERSIONFULL} \
  985. DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \
  986. FARSIGHT:${PORTNAME} \
  987. FESTIVAL:${PORTVERSION} \
  988. GCC:releases/${DISTNAME} \
  989. GENTOO:distfiles \
  990. GIMP:${PORTNAME}/${PORTVERSION:R}/ \
  991. GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/ \
  992. GITHUB_CLOUD:${GH_ACCOUNT}/${GH_PROJECT}/ \
  993. GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
  994. GNU:${PORTNAME} \
  995. GNUPG:${PORTNAME} \
  996. GNU_ALPHA:${PORTNAME} \
  997. LIBREOFFICE_DEV:${PORTNAME} \
  998. MATE:${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
  999. MOZDEV:${PORTNAME:tl} \
  1000. NETLIB:${PORTNAME} \
  1001. PERL_CPAN:${PORTNAME:C/-.*//} \
  1002. PYPI:source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:S/-${DISTVERSIONFULL}$//} \
  1003. QT:archive/qt/${PORTVERSION:R} \
  1004. SAMBA:${PORTNAME} \
  1005. SAVANNAH:${PORTNAME:tl} \
  1006. SOURCEFORGE:${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION} \
  1007. XFCE:xfce
  1008. .if defined(MASTER_SITES) && ${MASTER_SITES:N*\:/*}
  1009. . for _site__ in ${MASTER_SITES}
  1010. _site_=${_site__}
  1011. . if ${_site_:M*\:/*}
  1012. MASTER_SITES_EXP+= ${_site_}
  1013. MASTER_SITES_EXP:= ${MASTER_SITES_EXP}
  1014. . else
  1015. _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@}
  1016. . if ${_site_urlpath_:M*/*}
  1017. _site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@}
  1018. _site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!}
  1019. . else
  1020. _site_url_= ${_site_urlpath_}
  1021. .undef _site_subdir_
  1022. . endif
  1023. _site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://}
  1024. . for _abbrev_ in ${MASTER_SITES_ABBREVS}
  1025. . if ${_site_url_} == ${_abbrev_:C/:.*//}
  1026. _site_url_= ${_abbrev_:C/.*://}
  1027. . endif
  1028. . endfor
  1029. . if !defined(MASTER_SITE_SUBDIR)
  1030. . for _subdir_ in ${MASTER_SITES_SUBDIRS}
  1031. . if ${_site_url_} == ${_subdir_:C/:.*//}
  1032. _site_subdir_?= ${_subdir_:C/.*://}
  1033. . endif
  1034. . endfor
  1035. . endif
  1036. . ifdef MASTER_SITE_${_site_url_}
  1037. . ifdef _site_subdir_
  1038. MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//}
  1039. . else
  1040. MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//}
  1041. . endif
  1042. MASTER_SITES_EXP:= ${MASTER_SITES_EXP}
  1043. . endif
  1044. . endif
  1045. . endfor
  1046. MASTER_SITES= ${MASTER_SITES_EXP}
  1047. .endif
  1048. .if defined(PATCH_SITES) && ${PATCH_SITES:N*\:/*}
  1049. . for _site__ in ${PATCH_SITES}
  1050. _site_=${_site__}
  1051. . if ${_site_:M*\:/*}
  1052. PATCH_SITES_EXP+= ${_site_}
  1053. PATCH_SITES_EXP:= ${PATCH_SITES_EXP}
  1054. . else
  1055. _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@}
  1056. . if ${_site_urlpath_:M*/*}
  1057. _site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@}
  1058. _site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!}
  1059. . else
  1060. _site_url_= ${_site_urlpath_}
  1061. .undef _site_subdir_
  1062. . endif
  1063. _site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://}
  1064. . for _abbrev_ in ${MASTER_SITES_ABBREVS}
  1065. . if ${_site_url_} == ${_abbrev_:C/:.*//}
  1066. _site_url_= ${_abbrev_:C/.*://}
  1067. . endif
  1068. . endfor
  1069. . if !defined(MASTER_SITE_SUBDIR)
  1070. . for _subdir_ in ${MASTER_SITES_SUBDIRS}
  1071. . if ${_site_url_} == ${_subdir_:C/:.*//}
  1072. _site_subdir_?= ${_subdir_:C/.*://}
  1073. . endif
  1074. . endfor
  1075. . endif
  1076. . ifdef MASTER_SITE_${_site_url_}
  1077. . ifdef _site_subdir_
  1078. PATCH_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//}
  1079. . else
  1080. PATCH_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//}
  1081. . endif
  1082. PATCH_SITES_EXP:= ${PATCH_SITES_EXP}
  1083. . endif
  1084. . endif
  1085. . endfor
  1086. PATCH_SITES= ${PATCH_SITES_EXP}
  1087. .endif