summaryrefslogtreecommitdiff
path: root/luasystem-0.1.1-0.rockspec
blob: 40c8b74a79a7692eda31708700d5d18fcfcf2b52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package = 'luasystem'
version = '0.1.1-0'
source = {
  url = "https://github.com/o-lim/luasystem/archive/v0.1.1.tar.gz",
  dir = "luasystem-0.1.1"
}
description = {
  summary = 'Platform independent system calls for Lua.',
  detailed = [[
    Adds a Lua API for making platform independent system calls.
  ]],
  homepage = 'http://olivinelabs.com/luasystem/',
  license = 'MIT <http://opensource.org/licenses/MIT>'
}
dependencies = {
  'lua >= 5.1',
}

local function make_platform(plat)
  local defines = {
    unix = { },
    macosx = { },
    win32 = { },
    mingw32 = { "WINVER=0x0501" },
  }
  return {
    modules = {
      ['system.core'] = {
        sources = { 'src/core.c', 'src/compat.c', 'src/time.c', },
        defines = defines[plat],
      },
    },
  }
end

build = {
  type = 'builtin',
  platforms = {
    unix = make_platform('unix'),
    macosx = make_platform('macosx'),
    win32 = make_platform('win32'),
    mingw32 = make_platform('mingw32'),
  },
  modules = {
    ['system.init'] = 'system/init.lua',
  },
}