On 12 September 2011 22:28, Hisham <hisham...@gmail.com> wrote:
> On Mon, Sep 12, 2011 at 5:21 PM, Reuben Thomas <r...@sc3d.org> 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.

> I suggest adding LDFLAGS=-avoid-version to
> upstream's Makefile.am, since the Lua module loader doesn't make use
> of the versioned symlinks anyway).

That's a good idea, thanks.

> 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?)

> 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.

-- 
http://rrt.sc3d.org

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to