blob: 637b175836d63cc4a8109e21c095dd2965212a67 (
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
|
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=yaegi
pkgver=0.15.1
pkgrel=3
pkgdesc="Elegant Go interpreter"
url="https://github.com/traefik/yaegi"
# 32bit: TestEvalBuiltin test fails
arch="all !x86 !armhf !armv7"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/traefik/yaegi/archive/refs/tags/v$pkgver.tar.gz"
# Required to pass tests.
# Ref: https://github.com/traefik/yaegi/issues/1523#issuecomment-1465730351
builddir="$srcdir/src/github.com/traefik/$pkgname"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
prepare() {
export GOPATH="$srcdir"
mkdir -p "$(dirname $builddir)"
mv "$srcdir/$pkgname-$pkgver" "$builddir"/
default_prepare
}
build() {
go build -v -ldflags "-X main.version=v$pkgver" ./cmd/yaegi/
}
check() {
# extract_test.go:157: cannot find package "math"
GOFLAGS="${GOFLAGS/-trimpath/}" go test ./...
}
package() {
install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
}
sha512sums="
e827b370b1f1a7453de02ffa54768372a64730cbde7b09d505e44bdd9d8290de5550e56fcacfdce022a1d4103d26f0cab5104c032d95145036cf09079de20d10 yaegi-0.15.1.tar.gz
"
|