On Fri, Sep 16, 2011 at 5:09 PM, Reuben Thomas <r...@sc3d.org> wrote:
> On 16 September 2011 21:05, Hisham <hisham...@gmail.com> wrote:
>>
>> You should be able to configure your luarocks/config.lua file with
>> something like:
>>
>> rocks_trees = {
>>   {
>>      root = home.."/local",
>>      bin_dir = home.."/local/arch/bin",
>>      lib_dir = home.."/local/arch/lib",
>>      lua_dir = home.."/local/share",
>>   }
>> }
>
> Thanks. Where is this documented? The page I quoted showed LUADIR as a
> part of the variables table, and as I said, that seems to be
> incorrect.

Indeed, documentation was outdated, sorry. I just fixed this.

Also, my example above was slightly incorrect. As you can override the
paths entirely, you need to add /lua/5.1 explicitly:

rocks_trees = {
  {
     root = home.."/local",
     bin_dir = home.."/local/arch/bin",
     lib_dir = home.."/local/arch/lib/lua/5.1",
     lua_dir = home.."/local/share/lua/5.1",
  }
}

>> Unfortunately, LuaRocks does not export its arch variable to
>> config.lua. In any case, I don't know if its own syntax for arch (e.g.
>> "linux-x86") would be the same as the one you're using.
>
> I'm using the output of "uname -m", but then I only use Linux. I guess
> that `uname -s`-`uname -m` would be a more general solution, which
> would give Linux-i686 for your linux-x86, and would give Linux-x86_64
> for my machine.

I'm using uname, but I'm "normalizing" the received values a bit, as
some platforms tend to provide different results (for example, I spot
`elseif proc:match("amd64") or proc:match("x86_64") then proc =
"x86_64"` in the code).

-- 
-- Hisham
http://hisham.hm/ - http://colorbleed.com.br/

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to