First, let me say up-front that I wrote the instructions for using
LuaRocks with GNU autotools:

http://www.luarocks.org/en/Creating_LuaRocks_with_GNU_autotools

Therefore, I don't think the answer to the following question is found there.

Those instructions work up to a point, but they fall down when a
package needs to use a path at run-time. I have just created such a
package, which refers, indirectly, to LuaRocks's LIBDIR and LUADIR.
The problem is that of course when the package is run, the files are
no longer located there, but have been moved into the relevant system
locations.

In fact, I need to be able to pass the rock tree root, lib_dir and
lua_dir instead, i.e. the locations where the files will end up, to
the build system.

The Autotools build system will install the package in the real
install location, not in LuaRocks's rock directory. I presume this
isn't a problem, as LuaRocks will simply find nothing to copy, and
won't copy anything. The only slight problem I see is that the files
that are normally left over in the rocks tree, such as documentation
and examples, will instead be installed in the standard GNU locations,
but that seems tolerable.

More problematically, I can't see how to reference any of these
locations in the LuaRock: rocks_dir is exposed as ROCKS_TREE, and
deploy_bin_dir is exposed as SCRIPTS_DIR, but I need deploy_lib_dir,
deploy_lua_dir and deploy_dir, which don't seem to be accessible in
LuaRocks.

I'd be happy to make a patch to expose these variables in rockspecs,
preferably under uppercase variants of the above names (suggesting
that deploy_bin_dir ought also to be available as DEPLOY_BIN_DIR as
well as SCRIPTS_DIR), but first I'd like to know that my analysis is
correct, and that there's no way currently to get hold of those
variables in a rockspec.

-- 
http://rrt.sc3d.org

------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to