Adding configure options when installing a port

Stephen Langer stephen.langer at nist.gov
Wed Jun 16 13:28:28 PDT 2010


On Jun 16, 2010, at 4:13 PM, Bradley Giesbrecht wrote:

> 
> 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

Yes, it's been requested: http://trac.macports.org/ticket/24944

The problem is that the ImageMagick port is configured to use OpenMP, which is incompatible with posix threads.  Our program uses both threads and the Magick++ library, and crashes when it makes any ImageMagick call
on a subthread.  ImageMagick can be configured with --disable-openmp, and then it works.

 -- Steve


--
-- stephen.langer at nist.gov                    Tel: (301) 975-5423 --
-- http://math.nist.gov/mcsd/Staff/SLanger/   Fax: (301) 975-3553 --
-- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --

-- "I don't think this will work.  That's why it's science."      --
--                     Naomi Langer (age 6),  17 Feb 2003         --







More information about the macports-users mailing list