Automatic homepage for sourceforge, googlecode, etc.

Ryan Schmidt ryandesign at macports.org
Sat Aug 22 13:09:44 PDT 2009


On Aug 22, 2009, at 14:29, Scott Haneda wrote:

> Simplify the base code, or simplify the port files?

Both.


> The port files list a url, which I find highly readable, and also  
> nice, because I can easily know what that url is, and ping, curl,  
> or http request it.

Portfiles already do not list a download URL or a livecheck URL when  
they use a master_sites group like sourceforge and googlecode. And it  
would be silly for every portfile to have to list the URL to a  
SourceForge or Google Code page because they all have the same  
format. If SourceForge or Google Code were to ever change that  
format, we would have to update tons of portfiles, instead of update  
only a single reference in MacPorts base, as it is currently.


> It seems to me the base MacPors code would only become more complex  
> (trivially), as now you have to maintain a mapping of master_sites  
> to names/url's.  Yes, it is a trivial mapping.

The mapping already exists in MacPorts base. The "master_sites  
googlecode" and "master_sites sourceforge" examples I showed in my  
previous mails are valid portfile syntax. They are documented in the  
guide [1]. What is not yet valid syntax is "homepage googlecode" or  
"homepage sourceforge". My proposition was to extend the mapping  
feature to the homepage variable, and after writing that up, it  
occurred to me that it might be better to move the mapping out of  
MacPorts base and into portgroups, thus simplifying MacPorts base.

[1] http://guide.macports.org/#reference.phases.fetch


> I would think it could not hurt, and may be useful to some, and  
> there is always the option of simply hard coding the url in if you  
> are so inclined.  However, from a port maker perspective, I am  
> somewhat partial to using real url's, as they are easier for me to  
> debug and know at a glance, what is going on.




More information about the macports-dev mailing list