summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2024-02-14 20:31:40 +0100
committerGitHub <noreply@github.com>2024-02-14 20:31:40 +0100
commit7cef1cf1a74c8e10d9cc61b6f5b748f4f7a26abd (patch)
tree3984be5a1b9043c96f19dafd11982763f59b732f
parent6c53f44c9a8860a9b7bb25f1c54ddbf8890d9e01 (diff)
downloadluasystem-7cef1cf1a74c8e10d9cc61b6f5b748f4f7a26abd.zip
chore(rockspec): new rockspec revision (#18)
-rw-r--r--rockspecs/luasystem-0.3.0-2.rockspec83
1 files changed, 83 insertions, 0 deletions
diff --git a/rockspecs/luasystem-0.3.0-2.rockspec b/rockspecs/luasystem-0.3.0-2.rockspec
new file mode 100644
index 0000000..7ee8762
--- /dev/null
+++ b/rockspecs/luasystem-0.3.0-2.rockspec
@@ -0,0 +1,83 @@
+local package_name = "luasystem"
+local package_version = "0.3.0"
+local rockspec_revision = "2"
+local github_account_name = "lunarmodules"
+local github_repo_name = "luasystem"
+
+
+package = package_name
+version = package_version.."-"..rockspec_revision
+
+source = {
+ url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git",
+ branch = (package_version == "scm") and "master" or nil,
+ tag = (package_version ~= "scm") and "v"..package_version or nil,
+}
+
+description = {
+ summary = 'Platform independent system calls for Lua.',
+ detailed = [[
+ Adds a Lua API for making platform independent system calls.
+ ]],
+ license = 'MIT <http://opensource.org/licenses/MIT>',
+ homepage = "https://github.com/"..github_account_name.."/"..github_repo_name,
+}
+
+dependencies = {
+ 'lua >= 5.1',
+}
+
+local function make_platform(plat)
+ local defines = {
+ linux = { },
+ unix = { },
+ macosx = { },
+ win32 = { "WINVER=0x0600", "_WIN32_WINNT=0x0600" },
+ mingw32 = { "WINVER=0x0600", "_WIN32_WINNT=0x0600" },
+ }
+ local libraries = {
+ linux = { "rt" },
+ unix = { },
+ macosx = { },
+ win32 = { "advapi32", "winmm" },
+ mingw32 = { },
+ }
+ local libdirs = {
+ linux = nil,
+ unix = nil,
+ macosx = nil,
+ win32 = nil,
+ mingw32 = { },
+ }
+ return {
+ modules = {
+ ['system.core'] = {
+ sources = {
+ 'src/core.c',
+ 'src/compat.c',
+ 'src/time.c',
+ 'src/environment.c',
+ 'src/random.c',
+ 'src/term.c',
+ },
+ defines = defines[plat],
+ libraries = libraries[plat],
+ libdirs = libdirs[plat],
+ },
+ },
+ }
+end
+
+build = {
+ type = 'builtin',
+ platforms = {
+ linux = make_platform('linux'),
+ unix = make_platform('unix'),
+ macosx = make_platform('macosx'),
+ win32 = make_platform('win32'),
+ mingw32 = make_platform('mingw32'),
+ },
+ modules = {
+ ['system.init'] = 'system/init.lua',
+ },
+}