Automatic homepage for sourceforge, googlecode, etc.

Rainer Müller raimue at macports.org
Sun Aug 23 01:51:46 PDT 2009


On 2009-08-22 22:32 , Ryan Schmidt wrote:
> That syntax looks nice. But all the existing use_ options are in  
> MacPorts base code. Part of the motivation for my suggestion is to  
> move this out of MacPorts base and into something inside the dports/ 
> _resources directory, e.g. a portgroup.

Well, then a PortGroup would be the better option.

> I wonder if maybe just renaming the "PortGroup" command would provide  
> satisfaction. Instead of
> 
> PortGroup sourceforge 1.0
> 
> it could be
> 
> include sourceforge 1.0
> 
> or
> 
> use sourceforge 1.0

PortGroup is the keyword which matches best with PortSystem. Do we
really need to change this? The meaning of "PortGroup sourceforge 1.0"
should still be pretty clear.

>> The problem with PortGroups are that they are usually included at the
>> top, even before the name of the port is set. That means that you  
>> cannot
>> set homepage/master_sites/etc. at the time of inclusion and thus need
>> another command in the Portfile.
> 
> Not so! We have a delayed expansion mechanism via the default /  
> options infrastructure. e.g.
> [...]

You are right, I forgot that default values can be overwritten and use
late expansion. Please forget my concerns :-)

Using this approach individual options can still be overwritten with
different values in the Portfile, which is good in my opinion as it
allows us to be very flexible.

Rainer


More information about the macports-dev mailing list