blob: ac6a80840e4c3a689c1bf6dc36e83675bc77f5fe (
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
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
87
88
89
90
91
92
93
94
95
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Contributor: BrinkerVII <brinkervii@gmail.com>
pkgname=luau
pkgver=0.613
pkgrel=1
pkgdesc="A fast, small, safe, gradually typed embeddable scripting language derived from Lua"
arch=(x86_64)
url="https://github.com/luau-lang/luau"
license=(MIT)
depends=(
gcc-libs
glibc
)
makedepends=(cmake)
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz"
"Luau.pc"
)
sha256sums=(
'f6d6811ad03f49d46f57d700ea182839e7971b515400c332635a7d1cc62ddc6b'
'f65bc28fd66aac60cc8c7a33c7e64bec7ed296a69628dce57d2dfa57ba7ebab4'
)
_archive="$pkgname-$pkgver"
build() {
cd "$_archive"
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-Wno-dev \
-DLUAU_BUILD_TESTS=ON \
-DCMAKE_CXX_FLAGS="-Wstringop-overread"
cmake --build build
}
check() {
cd "$_archive"
./build/Luau.Conformance
./build/Luau.UnitTest
}
package() {
cd "$_archive"
local executables=(
luau
luau-analyze
luau-ast
luau-bytecode
luau-compile
luau-reduce
)
for executable in "${executables[@]}"; do
install -Dm755 -t "$pkgdir/usr/bin" "build/$executable"
done
local libraries=(
libLuau.Analysis.a
libLuau.Ast.a
libLuau.CodeGen.a
libLuau.Compiler.a
libLuau.Config.a
libLuau.VM.a
libisocline.a
)
for library in "${libraries[@]}"; do
install -Dm644 -t "$pkgdir/usr/lib/Luau" "build/$library"
done
local headers=(
./Analysis/include/Luau/*.h
./Ast/include/Luau/*.h
./CodeGen/include/*.h
./CodeGen/include/Luau/*.h
./Common/include/Luau/*.h
./Compiler/include/*.h
./Compiler/include/Luau/*.h
./Config/include/Luau/*.h
./VM/include/*.h
./extern/isocline/include/*.h
)
for header in "${headers[@]}"; do
install -Dm644 -t "$pkgdir/usr/include/Luau" "$header"
done
install -Dm644 -t "$pkgdir/usr/lib/pkgconfig" "$srcdir/Luau.pc"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
install -Dm644 \
extern/isocline/LICENSE \
"$pkgdir/usr/share/licenses/$pkgname/isocline-LICENSE.txt"
}
|