Dear Luarocks developers,
I would like to distribute a few Lua modules for numeric computing
using luarocks, which expose HDF5, OpenCL and MPI to Lua using
LuaJIT's FFI. I started by composing a rockspec for HDF5 for Lua [1].
[1] http://colberg.org/lua-hdf5/
The module is installed using a plugin for GCC that generates matching
FFI C bindings for the installed version of the HDF5 library. Without
a rockspec, a user would install HDF5 for Lua follows:
git clone http://git.colberg.org/gcc-lua
(cd gcc-lua && make)
(cd gcc-lua && make test)
git clone http://git.colberg.org/gcc-lua-cdecl
(cd gcc-lua-cdecl && make test)
git clone http://git.colberg.org/lua-hdf5
(cd lua-hdf5 && make)
(cd lua-hdf5 && make test)
(cd lua-hdf5 && make install PREFIX=/tmp/lua-hdf5_install)
Please find attached the results of a first experiment.
These are the issues I am currently stumbling over:
* How do I pass the path for Lua modules to the Makefile?
If I pass install_variables.PREFIX = "$(PREFIX)" the Lua modules
are installed to the prefix of the rock, but not to the common Lua
modules path that is returned by "luarocks path".
* For a dependency installed as a rock, how do I pass its rock
prefix in build_variables? The build_variables of lua-hdf5
need to point to the rock prefixes of gcc-lua (plugin) and
gcc-lua-cdecl (header file).
* How do I express the dependency on luajit >= 2.0?
* How do I run the test suite of a module before installation?
Thanks,
Peter
package = "lua-hdf5"
version = "0.1-1"
source = {
url = "git://git.colberg.org/lua-hdf5",
}
description = {
summary = "HDF5 for Lua",
homepage = "http://colberg.org/lua-hdf5/",
license = "MIT/X11",
}
supported_platforms = {"unix"}
dependencies = {
"lua ~> 5.1",
"gcc-lua-cdecl >= 1.2, < 2.0",
}
build = {
type = "make",
build_variables = {
GCCLUA = "/home/peter/projects/gcc-lua/gcc/gcclua.so",
FFI_CDECL_DIR = "/home/peter/projects/gcc-lua-cdecl/ffi-cdecl",
},
install_variables = {
LUA_LIBDIR = "$(LIBDIR)",
LUA_DIR = "$(LUADIR)",
BIN_DIR = "$(BINDIR)",
PREFIX = "$(PREFIX)",
}
}
package = "gcc-lua-cdecl"
version = "1.2.0-1"
source = {
url = "git://git.colberg.org/gcc-lua-cdecl",
tag = "1.2.0",
}
description = {
summary = "C declaration composer for the GCC Lua plugin",
homepage = "http://colberg.org/gcc-lua-cdecl/",
license = "MIT/X11",
}
supported_platforms = {"unix"}
dependencies = {
"lua ~> 5.1"
}
build = {
type = "builtin",
modules = {
["gcc.cdecl"] = "gcc/cdecl.lua",
},
}
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers