On Tue, Nov 1, 2011 at 4:47 PM, Peter Odding <[email protected]> wrote:
> Hi Hisham,
>
>> Ideally, this should include an entry for APR in the external
>> dependencies, but I understand the current limitations for
>> implementing that. Pkgconfig support in LuaRocks is definitely in my
>> to-do list. I uploaded this version of the rockspec to the package
>> repository.
>
> Thanks for uploading the rockspec! About the external dependencies: if I
> understood our exchange about the previously included Lua/APR rockspec
> correctly I would be breaking either Debian/Ubuntu builds or Mac OS X*
> builds, right? Because that is the only reason I removed the external
> dependencies from the rockspec.
Right, and understood. The current situation is still not ideal, but
it's workable.
> Right now the makefile (and thus the rockspec) should work on any UNIX
> which has a pkg-config file for Lua, APR and APR-util, no matter the
> location of the headers and libraries. It's very unfortunate that even
> the pkg-config names differ between systems, but I guess this is a
> reality we have to live with.
>
> Regarding native pkg-config support in LuaRocks, I was wondering: Is
> this such a big change that it will have to wait for LuaRocks 2? Given
> that different platforms have different pkg-config names I guess the
> only sane way to support pkg-config would be to include these names in
> the rockspecs and I guess that means the rockspec format will need some
> additional information. This makes me suspect that this will have to
> wait for LuaRocks 2. Anyway I'm just curious, certainly not trying to
> pressure you or anything.
The feature does break compatibility (and I already notice that
"rockspec format 2" and "Luarocks 3" will cause confusion, so I'll
probably just skip a number in the "rockspec format" version number ;)
) but from LuaRocks 3 onward I want to have compatibility versioning
information in every rockspec so adding future enhancements won't be
so traumatic.
> One more thing. Given that I already have this Lua code that can provide
> hints about system packages, if I manage to integrate it in LuaRocks and
> introduce a new rockspec variable so that rockspecs can provide hints as
> to the required system packages, something like:
>
> system_packages = {
> debian = {
> 'lua5.1', 'liblua5.1-0', 'liblua5.1-0-dev', 'libapr1',
> 'libapr1-dev', 'libaprutil1', 'libaprutil1-dev',
> 'libaprutil1-dbd-sqlite3', 'libapreq2', 'libapreq2-dev' },
> redhat = {
> 'lua', 'lua-devel', 'apr', 'apr-devel', 'apr-util',
> 'apr-util-devel', 'libapreq2', 'libapreq2-devel' },
> arch = { 'lua', 'apr', 'apr-util', 'perl-libapreq2' },
> }
>
> Would you consider including this functionality in LuaRocks?
The code per se would be fine, but maintaining this information would
be hassle for most rockspec maintainers and having this available in
some rocks and not others would be negative for users (either
confusing them or looking "unpolished"), so I'd rather not have this
feature.
One thing I think will be necessary, though, will be to add support
for alternatives to try as pkgconfig names, such as:
external_dependencies = {
APR = { pkgconfig = { "apr-1", "apr" } }
}
Yes, it's apalling how some distros feel the urge to change names and paths
defined by upstream in all sorts of places, even in things like
pkgconfig (as you said above), which were created specifically to handle distro
differences... :(
-- Hisham
http://hisham.hm/ - http://www.colorbleed.com.br/
------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers