On Mon, Sep 12, 2011 at 10:09 PM, Reuben Thomas <[email protected]> wrote:
> On 12 September 2011 22:28, Hisham <[email protected]> wrote:
>> On Mon, Sep 12, 2011 at 5:21 PM, Reuben Thomas <[email protected]> wrote:
>>> Can I just use e.g. luarocks.path.bin_dir() in my rockspec to get this
>>> information? How? I don't see any examples...
>>
>> Take a look at this one:
>>
>> http://luarocks.org/repositories/rocks/lcurses-6-2.rockspec
>
> D'oh, I should've realised that existed.
>
> So, its commands are:
>
> build_command = "CPPFLAGS='-I$(LUA_INCDIR)' ./configure
> --prefix=$(PREFIX) && make lualibdir=$(LIBDIR) LDFLAGS=-avoid-version"
> install_command = "make install lualibdir=$(LIBDIR) LDFLAGS=-avoid-version"
>
> So does that mean that LUA_INCDIR, LUA and PREFIX are all provided by
> LuaRocks? This looks like what I need for luaposix. I'll try it and
> report back.
Yes, those variables are provided.
>> For the interpreter name, at least, it is available in rockspecs as
>> $(LUA), expanding to a string such as "lua" or "lua5.1". Currently,
>> there is no specific variable for the suffix only. Doesn't the macro
>> detect this automatically?
>
> I'm not quite sure I understand your question: doesn't what macro
> detect what automatically? Do you mean, does the macro not detect the
> version suffix to the interpreter & library names? No, it doesn't.
> (For example, how would it know which suffix to try, without knowing
> which version of Lua was desired?)
I was thinking something along the lines of AX_LUA_LIBS("5.1") causing
it to test for "lua", "lua5.1" and "lua51" at the appropriate places
(I do something like that in the handwritten configure script for
LuaRocks). I'm looking at lua.m4 now and I see that it supports ranges
of Lua versions. I appreciate how general this is, but in practice I
don't think modules are designed to be compatible with too many Lua
versions at once... perhaps passing a list of supported versions would
suffice, and then one could go through each possible suffix variation?
Just a thought.
>> Sure, let me know if this is sufficient. Let's use this experience to
>> improve documention and the tool.
>
> Mostly, I think something like this example would be handy in the
> documentation as a short example of how to deal with autotoolized
> packages. Later maybe we can standardize how GNU autotoolized packages
> should be built as rocks, and add an "autotools" build type.
>
> I'll be happy to write a short documentation section when I've
> finished packaging luaposix as a rock.
The luarocks.org webpage is an open wiki -- feel free to contribute
there as much as you like.
Thanks!
--
-- Hisham
http://hisham.hm/ - http://colorbleed.com.br/
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers