blob: 749bd3d430fe24fbb0a75d1588191add1d314325 (
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.607
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=(
'519409d7dbb43da13390131a90c831cb0f2ab9c25e337acf15508313a339bf36'
'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"
_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
_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
_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 "$srcdir/Luau.pc" "$pkgdir/usr/lib/pkgconfig/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"
}
|