Forcing a variant to a variant

Bradley Giesbrecht brad at pixilla.com
Thu Jun 4 16:54:18 PDT 2009


On Jun 4, 2009, at 4:18 PM, Ryan Schmidt wrote:

> On Jun 4, 2009, at 18:08, Scott Haneda wrote:
>
>> On Jun 4, 2009, at 4:01 PM, Ryan Schmidt wrote:
>>
>>> On Jun 4, 2009, at 17:49, Scott Haneda wrote:
>>>
>>>> I want to do this:
>>>> variant clamav description {Enable virus scanning} {
>>>>   depends_lib-append port:clamav +server
>>>> }
>>>>
>>>> This errors on me, I assume as a result of the +server, which is  
>>>> clamav just installs a startup item.
>>>>
>>>> Within my port, I will want to be able to do:
>>>> port install assp +clamav and have the +server forced.
>>>
>>> It is not possible. This is issue #126.
>>>
>>> Consider requesting that the +server variant be removed from the  
>>> clamav port, and a new port clamav-server be created instead. See  
>>> the postgresql ports and (in a moment) the mysql5 port for  
>>> examples of this strategy.
>>
>> Thanks.  So to get this straight, the desired goal is port  
>> duplication outside of a few lines for a variant?
>>
>> clamav port
>> code....
>> code...
>> more code....
>> code....
>> code...
>> more code....
>>
>> clamav server port
>> code....
>> code...
>> more code....
>> ( startup item )
>> code....
>> code...
>> more code....
>>
>> I think I understand why, and I think I understand the long term  
>> goal here, but the above has me wondering a little.
>>
>> Is it a terrible idea to pop in a second startup item in which will  
>> just instal the clamav startup item?  This seems messy to me, but  
>> it also will get the job done.

There is:
/opt/local/etc/macports/variants.conf

where you could put:
+server

and I believe you will get the +server add to all ports that port  
builds, no?

I mentioned recently gentoo's package.mask for masking packages or  
packages above a version. Personally I'd like something like that in  
ports.

Wouldn't it be useful and simple to add the capability to /opt/local/ 
macports/variants.conf to specify a port:variant combo?
clamav+server
mysql+server

or
port:clamav +server

or
clamav mysql5 +server
guncash +nox11

//Brad


More information about the macports-dev mailing list