Writing portfiels: How to avoid hardcoded paths?

Ryan Schmidt ryandesign at macports.org
Mon Mar 17 01:54:31 PDT 2008


On Mar 17, 2008, at 01:55, Giorgio Valoti wrote:

> On 16/mar/08, at 05:57, Ryan Schmidt wrote:
>
>> On Mar 13, 2008, at 14:15, Giorgio Valoti wrote:
>>
>>> Hi all, with the help of William Siegrist I wrote a portfile for  
>>> pgpool-II (ticket #14647). I’ve added the following environment  
>>> setting:
>>> configure.env           PATH=$env(PATH):${prefix}/lib/ 
>>> postgresql83/bin
>>>
>>> In order to make pg_config available at configure time. Is there  
>>> a way to avoid hard coding the path?
>>
>> Is there an option in the configure script for pgpool-II to tell  
>> it where postgresql is located? Take a look at its "./configure -- 
>> help"
>
> I guess we could use --with-pgsql, however the problem is that we  
> have to hard code the version of the postgres port. Of course,  
> since you can have, say, both 8.2 and 8.3 versions installed and  
> activated you have explicitly choose which one pgpool should use. I  
> was hoping to be able to use the port dependency mechanism but we  
> can the configure option.

The usual solution would be to offer variants. So offer a  
postgresql83 variant, a postgresql82 variant, etc. Each one adds the  
right configure argument and depends on the right version of postgres.



More information about the macports-users mailing list