On Feb 9, 2009, at 22:34, Bradley Giesbrecht wrote:

On Feb 9, 2009, at 4:18 PM, Ryan Schmidt wrote:

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

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.

I had a more complex Portfile which I trimmed down before posting to make it simple to try.

I guess I'm old school that way.

The patch Portfile attached to your email removed the patch file. I like it but it didn't work. If I add the patch and remove the $LDFLAGS in the patch "mysql_config --libs $LDFLAGS" to "mysql_config --libs" it works.


But... the Portfile I attached said

patchfiles                  patch-configure

And I attached my revised patch-configure which said

-       LDFLAGS=`mysql_config --libs $LDFLAGS`
-       CPPFLAGS=`mysql_config --include $CPPFLAGS`
+       LDFLAGS="`mysql_config --libs` $LDFLAGS"
+       CPPFLAGS="`mysql_config --include` $CPPFLAGS"

to fix the problem with calling mysql_config. My Portfile also fixed the PATH in the configure phase with

configure.env-append        PATH=${prefix}/lib/mysql5/bin:$env(PATH)

so that mysql_config could be found. I tested this before attaching it to the email and it worked for me as sent.


_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to