tcl or portfile keyword for alias

Ryan Schmidt ryandesign at macports.org
Mon Feb 9 16:18:07 PST 2009


On Feb 9, 2009, at 17:53, Ryan Schmidt wrote:

> On Feb 9, 2009, at 14:21, Bradley Giesbrecht wrote:
>
>> Does anyone know a simple way to env alias a command like  
>> mysql_config=/opt/local/bin/mysql_config5?
>>
>> I have a lib I'm porting "libzdb" that uses "mysql_config --libs  
>> $LDFLAGS".
>>
>> I'm trying to find a way to make this build without patching.
>
> You could prepend ${prefix}/lib/mysql5/bin to the PATH. That's  
> where the program "mysql_config" lives.
>
>
> configure.env-append    PATH=${prefix}/lib/mysql5/bin:$env(PATH)

The reason it then still doesn't work is because libzdb is calling  
mysql_config incorrectly. As you note, it uses "mysql_config --libs  
$LDFLAGS". It is not correct to put "$LDFLAGS" at the end of that  
command invocation. The correct way to call it is just "mysql_config  
--libs". It works for you on the command line because LDFLAGS is  
empty by default, but MacPorts fills it with a value, so when run  
within MacPorts, it fails. If you look in the config.log, you see  
that mysql_config is printing its usage message, showing that the way  
it is being used is not correct. Attached is a Portfile and patch  
that work for me. You should send the patchfile to the author of libzdb.

In the Portfile, I also added a dependency on mysql5, and added  
configure arguments to disable postgresql and sqlite. If you want to  
enable postgresql or sqlite, remove the corresponding configure  
argument and add the required dependency.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 1655 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090209/3872efff/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-configure
Type: application/octet-stream
Size: 392 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090209/3872efff/attachment-0001.obj>


More information about the macports-dev mailing list