Hi,
I just upgraded from luarocks 2.1.0 to 2.1.1. I see it supports multiarch
in some way. I searched a bit and found something about
external_deps_subdirs and runtime_external_deps_subdirs on the page
http://luarocks.org/en/Config_file_format
But it doesn't really explain how to use it.
I set up the following config.unix, mostly by copying the one I had from
2.1.0:
# This file was automatically generated by the configure script.
# Run "./configure --help" for details.
LUA_VERSION=5.2
PREFIX=/home/rrt/local
SYSCONFDIR=/home/rrt/local/etc/luarocks
ROCKS_TREE=/home/rrt/local
LUA_SUFFIX=5.2
LUA_DIR=/home/rrt/local
LUA_DIR_SET=yes
LUA_INCDIR=/home/rrt/local/include/lua5.2
LUA_LIBDIR=/home/rrt/local/lib
LUA_BINDIR=/home/rrt/local/bin/x86_64-linux-gnu
FORCE_CONFIG=
LUAROCKS_UNAME_M=x86_64
LUAROCKS_UNAME_S=Linux
LUAROCKS_DOWNLOADER=wget
LUAROCKS_MD5CHECKER=md5sum
LUAROCKS_ROCKS_SUBDIR=lib/luarocks/5.2
MULTIARCH_SUBDIR=lib/x86_64-linux-gnu
I have the following (unused) ~/local/etc/luarocks/config-5.2.lua (I
deleted it and let make install regenerate it to check it was up-to-date):
rocks_trees = {
home..[[/.luarocks]],
[[/home/rrt/local]]
}
Currently, I compute LUAROCKS_CONFIG according to my architecture when I
log in, for example:
LUAROCKS_CONFIG=/home/rrt/local/etc/luarocks/config_x86_64-linux-gnu.lua
where this file contains:
local arch = "x86_64-linux-gnu"
external_deps_patterns = {
bin = {"?.exe", "?.bat"},
lib = {"lib?.a", "lib?.so", arch.."/lib?.a", arch.."/lib?.so"},
include = {"?.h"},
}
rocks_trees = {
{
root = home.."/local",
rocks_dir = home.."/local/lib/luarocks/"..lua_version.."/rocks",
lib_dir = home.."/local/lib/"..arch.."/lua/"..lua_version,
bin_dir = home.."/local/bin/"..arch,
}
}
I presume that with the new multiarch support I can get rid of this
mechanism and just have a single config-5.2.lua, but can someone explain
how I achieve this? If you can tell me, I'll happily add anything I learn
that seems to be generally useful to the wiki. In particular, it would be
nice to know how to set up LuaRocks to work with the multi-arch directory
layout implied in my config_x86_64-linux-gnu.lua file, which is the closest
I can get to a sensible and standard per-user multiarch layout (the only
unusual bit is the subdirectories of ~/local/bin, which seems to confuse
LuaRock's configure; the rest looks like the multiarch layout on my Debian
system).
Thanks very much to those who added multiarch support, and also thanks for
the fact that until I work out how to use it my current setup seems to work
fine with 2.1.1!
--
http://rrt.sc3d.org
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers