>> pkg-config support.
> 
> Sorry, Ildar, I was answering another question;)
> 
> It would be useful, e.g something like
> 
> external_dependencies = {
>    foo = {pkgconfig = 'foo-1.2'  ...}
> }
> 
> where ... indicates that other fields are possible (e.g. the package
> manager hints)
> 
> There is a slight impedance match because pkgconfig provides the full
> C flags and the full link flags, whereas the LR variables would be
> foo_INCDIR, foo_LIBDIR, etc.

There's one complicating factor here: pkg-config names are not always
the same on all platforms, e.g. I've had to change the Lua/APR binding
makefile because on Debian/Ubuntu the Lua pkg-config file is called
`lua5.1' while on Arch Linux it's just `lua'. In a makefile this can be
dealt with using a command such as:

pkg-config --cflags lua5.1 --silence-errors || pkg-config --cflags lua

Maybe in rockspecs a table of options could be provided and the first
valid one would be used, like pkgconfig = {'lua5.1', 'lua'}.

 - Peter

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to