keplerproject/luarocks — pull request #194 by rtsisyk (2013-12-01 09:29:07+00:00)
Title: Add a configuration option to specify manually installed rocks (#177)

The patch adds a new configuration option - cfg.rocks_provided.
This option contains a list of packages that are either builtin or
manually installed outside of LuaRocks package management system:

rocks_provided = {
[module_name] = module_version.."-"..rockspec_version,
-- ...
}

These settings are taken into account during dependency resolution
and when search and install commands are used. An attempt to install
a rock from the list causes an error.

LuaRocks automatically adds following modules to the list:

rocks_provided = {
lua = lua_version.."-1",

-- For Lua 5.2 or later:
bit32 = lua_version.."-1",

-- For LuaJIT:
luajit = lj_version.."-1",
jit = lj_version.."-1",
ffi = lj_version.."-1",
bit = lj_version.."-1",
luabitop = lj_version.."-1"
}

where lua_version extracted from _VERSION (e.g. 5.2),
lj_version extracted from jit.version (e.g. 2.0.2).

Built-in values can be overridden by configuration options.

Closes #177.