Repository navigation
Expand file tree
/
Copy pathtdlua-scm-1.rockspec
More file actions
54 lines (49 loc) · 1.84 KB
/
Copy pathtdlua-scm-1.rockspec
File metadata and controls
54 lines (49 loc) · 1.84 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
rockspec_format = "3.0"
package = "tdlua"
version = "scm-1"
source = {
url = "git+https://github.com/giuseppeM99/tdlua.git",
branch = "master"
}
description = {
summary = "Lua binding for TDLib with JSON and native backends",
detailed = [[
TDLua exposes TDLib to Lua through the raw send/receive API and the v0.4
managed Future/Task API, including callbacks, event handlers, and
cooperative poll/loop drivers. Stock Lua 5.1.5 uses Managed Explicit;
Lua 5.2-5.5 use Full Managed. Stock support was verified with the
unmodified Lua 5.1.5 reference VM on Linux x64. The dependency range
permits the 5.1 ABI; older patch releases and modified VMs are unverified.
]],
homepage = "https://github.com/giuseppeM99/tdlua",
license = "BSD-3-Clause"
}
dependencies = {
"lua >= 5.1, < 5.6"
}
build = {
type = "command",
build_command = [[
cmake -S . -B build.luarocks \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$(PREFIX)" \
-DLUA_INCLUDE_DIR="$(LUA_INCDIR)" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:-}" \
-DTDLUA_BUNDLED_TDLIB="${TDLUA_BUNDLED_TDLIB:-ON}" \
-DTDLUA_BACKEND="${TDLUA_BACKEND:-json}" \
-DTDLUA_JSON_STATIC="${TDLUA_JSON_STATIC:-${TDLUA_TD_STATIC:-OFF}}" \
-U LUA_LIBRARY \
-DTDLUA_LUA_MODULE_DIR=lib \
-DTDLUA_BUILD_TESTS=OFF \
&& cmake --build build.luarocks --target tdlua --parallel 1
]],
install_command = [[
cmake --install build.luarocks \
&& for tdjson_library in "$(PREFIX)/lib/libtdjson.so" "$(PREFIX)/lib/libtdjson.dylib"; do \
if [ -L "$tdjson_library" ]; then \
cp -L "$tdjson_library" "$tdjson_library.tdlua-copy" \
&& mv -f "$tdjson_library.tdlua-copy" "$tdjson_library" || exit 1; \
fi; \
done
]]
}