blob: 83941dc756e8ce9cdd393dbc7dc57caec02a5562 (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
_rockname=tl
pkgbase=teal
pkgname=(teal "lua-$_rockname" "lua53-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
pkgver=0.24.1
pkgrel=1
pkgdesc='The compiler for Teal, a typed dialect of Lua'
arch=(any)
url=https://github.com/teal-language/$_rockname
license=(MIT)
_luadeps=(argparse
filesystem)
makedepends=(lua
lua51
lua52
lua53
luarocks)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('a9e4a5b9fb2bfd3bce55b9e5389d5d0df1d2c568db58c83fdc2128d1cb8803a6')
_package() {
cd "$_rockname-$pkgver"
depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
luarocks --lua-version $1 --tree "$pkgdir/usr/" \
make --deps-mode none --no-manifest -- "$_rockname-dev-1.rockspec"
find "$pkgdir/usr/bin" -type f -execdir sed -i -e "s#$pkgdir##" {} \;
[[ -v 2 ]] &&
rm -rf "$pkgdir/usr/"{lib,share} ||
rm -rf "$pkgdir/usr/bin"
}
package_teal() {
optdepends+=('cyan: The Teal build system and project manager')
provides+=($_rockname)
_package 5.4 bin
depends=(lua lua-tl)
}
package_lua-tl() {
_package 5.4
}
package_lua53-tl() {
_package 5.3
}
package_lua52-tl() {
_luadeps+=(compat53)
_package 5.2
}
package_lua51-tl() {
_luadeps+=(compat53)
_package 5.1
}
|