-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlua.lua
More file actions
86 lines (83 loc) · 3.24 KB
/
lua.lua
File metadata and controls
86 lines (83 loc) · 3.24 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
-- M6.x glob-aware Form B descriptor for Lua 5.4.
--
-- Pure-C library; relies on mcpp 0.0.2's C-language compile rule (`.c`
-- routed to `c_object` via the gcc/clang sibling driver). Builds the
-- 32 library translation units (CORE_O + LIB_O from upstream's
-- src/Makefile) into a single static archive `liblua.a`. The two
-- binary entry points (`src/lua.c` for the interpreter and
-- `src/luac.c` for the bytecode compiler) are intentionally excluded —
-- both define `int main()` and aren't part of the embeddable library.
-- Consumers `#include <lua.h>` and link against liblua.a.
package = {
spec = "1",
name = "lua",
description = "A powerful, efficient, lightweight, embeddable scripting language",
licenses = {"MIT"},
repo = "https://www.lua.org",
type = "package",
xpm = {
linux = {
["5.4.7"] = {
url = "https://www.lua.org/ftp/lua-5.4.7.tar.gz",
sha256 = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30",
},
},
macosx = {
["5.4.7"] = {
url = "https://www.lua.org/ftp/lua-5.4.7.tar.gz",
sha256 = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30",
},
},
windows = {
["5.4.7"] = {
url = "https://www.lua.org/ftp/lua-5.4.7.tar.gz",
sha256 = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30",
},
},
},
-- Form B `mcpp` segment: paths are globs relative to the verdir
-- (~/.mcpp/registry/data/xpkgs/<idx>-x-lua/<ver>/). The leading
-- `*/` absorbs the upstream tarball's `lua-5.4.7/` wrap layer.
mcpp = {
language = "c++23", -- top-level [package].standard knob; mcpp drives a c++23 toolchain even for pure-C deps.
import_std = false, -- pure C — no `import std;`.
c_standard = "c99", -- Lua's reference build is c99-clean; matches upstream src/Makefile.
include_dirs = { "*/src" }, -- public headers (lua.h, lualib.h, lauxlib.h, luaconf.h) live next to .c files.
sources = {
"*/src/lapi.c",
"*/src/lauxlib.c",
"*/src/lbaselib.c",
"*/src/lcode.c",
"*/src/lcorolib.c",
"*/src/lctype.c",
"*/src/ldblib.c",
"*/src/ldebug.c",
"*/src/ldo.c",
"*/src/ldump.c",
"*/src/lfunc.c",
"*/src/lgc.c",
"*/src/linit.c",
"*/src/liolib.c",
"*/src/llex.c",
"*/src/lmathlib.c",
"*/src/lmem.c",
"*/src/loadlib.c",
"*/src/lobject.c",
"*/src/lopcodes.c",
"*/src/loslib.c",
"*/src/lparser.c",
"*/src/lstate.c",
"*/src/lstring.c",
"*/src/lstrlib.c",
"*/src/ltable.c",
"*/src/ltablib.c",
"*/src/ltm.c",
"*/src/lundump.c",
"*/src/lutf8lib.c",
"*/src/lvm.c",
"*/src/lzio.c",
},
targets = { ["lua"] = { kind = "lib" } },
deps = { },
},
}