distfiles in URL in mirror_sites.tcl

Ryan Schmidt ryandesign at macports.org
Sat Feb 23 06:19:40 PST 2013

Can I have ${distfiles} within a URL defined in a fetch group?

I have been informed [1] by the PHP people that instead of downloading from e.g.:


they want us to download from:


But when I try to use URLs like this in mirror_sites.tcl:


I get this error:

$ port distfiles php54
--->  Distfiles for php54
Error: org.macports.distfiles for port php54 returned: can't read "distfiles": no such variable

I assume this means distfiles is not declared as a global at the point that the fetch group is being evaluated. Anyone know where that point is? Or whether there's another way to refer to distfiles (some kind of internal name for the variable) that would work?

[1] https://bugs.php.net/bug.php?id=64273

More information about the macports-dev mailing list