Adding configure options when installing a port

Bradley Giesbrecht brad at pixilla.com
Wed Jun 16 13:13:18 PDT 2010


On Jun 16, 2010, at 11:53 AM, Stephen Langer wrote:

>
> On Jun 16, 2010, at 2:29 PM, Scott Webster wrote:
>
>>>>> I want to build a port with an extra configure option.   
>>>>> Specifically,
>>>>> I want to build squid3 with the --enable-useragent-log option.
>>>
>>>> Edit the portfile. configure.args-append is a procedure, not a  
>>>> variable.
>>>> You can set variables on the command line but you can't call  
>>>> procedures.
>>>
>>> Thanks.
>>>
>>> It does seem rather a sledgehammer to crack a nut, though.
>>>
>>
>> It seems that it would be fairly straightforward to add an empty
>> default keyword, eg. configure.extraargs, that would enable this sort
>> of thing, but changing the Portfile isn't so hard either.
>
> Allowing changes via keywords would be a lot simpler to explain to  
> third party users.    If a portfile is modified, will the  
> modification be lost when that port is upgraded?  Could the  
> extraargs value be saved and automatically applied to future builds?
>
> We distribute a program (not via macports or fink) that relies on  
> external libraries that can be installed by macports or fink.   
> Currently, one of the libraries won't work with our code unless it's  
> built with an argument not provided by the default macports or fink  
> installation.  For my local copy, I placed a modified portfile a  
> local portfile repository, but I'm sure that many of our users will  
> have trouble doing that.  Being able to tell them to run a one-line  
> script (sudo port install thislib --extraargs=--dotherightthing)  
> would be great.
>
> (If there's a simpler way to do what I'm doing, please let me know.  
> I'm fairly new to macports.)

Have you requested the MacPorts ports be configured differently?

What port are you talking about and what changes need to be made?

Adding a variant to suit your needs would probably be easier and take  
less time.
port install somelib +someconfig

// Brad


More information about the macports-users mailing list