Am 13.11.2016 um 19:07 schröbte Doug Currie:
I'm looking for help to construct an appropriate rockspec for an updated
lsqlite3.
lsqlite3-0.9.4-1.rockspec is uploaded to luarocks.org, and works on OS X
and Debian Linux. It fails on Windows.
Since 0.9.3, I've added a second module to lsqlite3 called
lsqlite3complete, which statically links sqlite3. The original module
lsqlite3 continues to dynamically link sqlite3. On Windows, building
lsqlite3complete fails due to linker issues (libdl cannot be found, and I
suspect libpthreads will also fail on some systems).
It seems to me there are two options:
1. Use a platform override to prevent building the lsqlite3complete module
on Windows; this is backward compatible to 0.9.3.
2. Use platform overrides to fix the linker issues on Windows.
I'm not sure how to do either one. Can someone help?
I've attached a modified rockspec that builds on Ubuntu Linux and on
Windows (MinGW and MSVC).
But it only contains the statically linked module (I don't have sqlite3
installed as a shared library on Windows). You should pick one of the
two options anyway, because as-is building of the module (including the
statically linked part) will fail if the shared sqlite3 library isn't
available, and if it *is* available, the statically linked version is
kinda superfluous ...
Some other issues I've found:
* test.lua doesn't work for Lua 5.1 due to use of `table.unpack`.
* After fixing that, the test.db created with Lua 5.1 and 5.2 is 2.6 Mb
big, but only 1.9 Mb with Lua 5.3. I haven't investigated further ...
* You should pick either the MIT *or* the MIT/X11 license. Currently the
rockspec says MIT/X11, but the documentation/wiki shows the MIT (/Expat)
license.
Thanks!
e
HTH,
Philipp
package = "lsqlite3"
version = "0.9.4-1"
source = {
url = "http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09x.zip?uuid=fsl_9x",
file = "lsqlite3_fsl09x.zip"
}
description = {
summary = "A binding for Lua to the SQLite3 database library",
detailed = [[
lsqlite3 is a thin wrapper around the public domain SQLite3 database
engine.
The lsqlite3 module supports the creation and manipulation of SQLite3
databases.
After a require('lsqlite3') the exported functions are called with
prefix sqlite3.
However, most sqlite3 functions are called via an object-oriented
interface to
either database or SQL statement objects.
]],
license = "MIT/X11",
homepage = "http://lua.sqlite.org/"
}
dependencies = {
"lua >= 5.1, < 5.4"
}
build = {
type = "builtin",
modules = {
lsqlite3 = {
sources = { "lsqlite3.c", "sqlite3.c" },
defines = {'LSQLITE_VERSION="0.9.4"'},
},
},
platforms = {
unix = {
modules = {
lsqlite3 = {
libraries = { "pthread", "m", "dl" }
}
}
}
},
copy_directories = { 'doc', 'examples' }
}
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers