On Wed, Oct 6, 2010 at 12:38 PM, Jerome Vuarand <[email protected]> wrote: > One of my modules has optional dependencies, that is, it can use some > other modules (struct and luabitop), but it works perfectly (with some > features unavailable) if those dependencies are missing.
One solution is to have two packages; say we have 'frodo', but then there's also 'frodo-extra' which depends on frodo and ensures that the optional dependencies are also met. > How can I tell LuaRocks that if C module > compilation is available it should build it, and otherwise just ignore > the C module? AFAIK no support for that. It's hard to do such a check in a cross-platform way. You can't use makefiles to do the check because maybe there isn't make! A rock can execute an arbitrary command as a post-install hook, which could conditiionally invoke LuaRocks itself. The post-install hook could run an installed Lua program, so in principle it could be done. (That is, the rock installs a bin script, which then gets invoked afterwards.) LuaRocks dependency checking is very pass/fail. apt-get and friends have the concept of 'recommended' packages. Not a disaster if you don't need them, or if they fail to install. It's perhaps something we should think about. steve d. _______________________________________________ Luarocks-developers mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers
