Switched to prod build

main
Jef Roosens 2022-04-26 20:53:58 +02:00
parent 96dc30ed46
commit 98e4b8e79b
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 8 additions and 6 deletions

View File

@ -9,8 +9,8 @@ arch=("x86_64" "aarch64")
url="https://github.com/vlang/vls" url="https://github.com/vlang/vls"
license=("MIT") license=("MIT")
depends=("glibc" "vieter-v" "gc") depends=("glibc" "vieter-v")
makedepends=("git" "gcc") makedepends=("git")
source=("$pkgname::git+https://github.com/vlang/vls") source=("$pkgname::git+https://github.com/vlang/vls")
md5sums=("SKIP") md5sums=("SKIP")
@ -22,20 +22,22 @@ pkgver() {
build() { build() {
cd "$pkgname" cd "$pkgname"
msg "Building vls..." msg "Building VLS..."
v run build.vsh gcc # I would use -d dynamic_boehm here, but vls seems to segfault when I do
# this, strange.
v -cc gcc -gc boehm -prod cmd/vls
msg "Building treesitter grammar..." msg "Building treesitter grammar..."
# Building with -prod is required because otherwise, the binary contains # Building with -prod is required because otherwise, the binary contains
# tcc symbols which isn't usually installed on the user's system. # tcc symbols which isn't usually installed on the user's system.
v -shared -prod tree_sitter_v v -cc gcc -shared -prod tree_sitter_v
} }
package() { package() {
# Install vls # Install vls
install -dm755 "$pkgdir/usr/bin" install -dm755 "$pkgdir/usr/bin"
install -Dm755 "$pkgname/bin/vls" "$pkgdir/usr/bin/vls" install -Dm755 "$pkgname/cmd/vls/vls" "$pkgdir/usr/bin/vls"
install -Dm644 "$pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname" install -Dm644 "$pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
# Install treesitter grammar # Install treesitter grammar