M testing/vlang/APKBUILD => testing/vlang/APKBUILD +29 -25
@@ 1,11 1,10 @@
# Contributor: Jakob Meier <comcloudway@ccw.icu>
# Maintainer: Jakob Meier <comcloudway@ccw.icu>
-_v_commit_sha=d1f57ead713c8e5254d8cef22991e6409dc1f06b
-_vc_commit_sha=1f7f0244f352d41122bb306446d98ae3de4e6b02
+_vc_commit_sha=63e76fdbcc57a16ff7af10274ad916b4c4141220
pkgname=vlang
-pkgver=0.3.3
+pkgver=0.4
pkgrel=0
pkgdesc="Simple, fast, safe, compiled language for developing maintainable software."
url="https://vlang.io"
@@ 15,10 14,17 @@ depends=""
makedepends="gcc gc-dev"
checkdepends=""
subpackages=""
+_arch=""
+case "$CARCH" in
+ aarch64) _arch="arm64" ;;
+ x86_64) _arch="amd64" ;;
+esac
source="
-v-$pkgver.zip::https://github.com/vlang/v/archive/$_v_commit_sha.zip
-vc-$pkgver.zip::https://github.com/vlang/vc/archive/$_vc_commit_sha.zip"
-builddir="$srcdir/v-$_v_commit_sha"
+v-$pkgver.tar.gz::https://github.com/vlang/v/archive/refs/tags/$pkgver.tar.gz
+vc-$pkgver.zip::https://github.com/vlang/vc/archive/$_vc_commit_sha.zip
+fix-tools.patch
+"
+builddir="$srcdir/v-$pkgver"
build() {
mv "../vc-$_vc_commit_sha" ./vc
@@ 27,20 33,17 @@ build() {
# needs gc-dev
mkdir -p thirdparty/tcc/lib
ln -s /usr/lib/libgc.a thirdparty/tcc/lib/libgc.a
-
#ln -s /usr/bin/tcc thirdparty/tcc/tcc.exe
- echo building v from c
- cc -std=gnu11 -w -o v1 vc/v.c -lm -lpthread
- echo building stage 2
+ #./thirdparty/tcc/tcc.exe -std=gnu11 -w -o v1 vc/v.c -lm -lexecinfo -lpthread
+ gcc -std=gnu11 -w -o v1 vc/v.c -lm -lpthread #-lexecinfo
./v1 -no-parallel -o v2 -prod cmd/v
- echo building staging version
./v2 -o v -prod cmd/v
rm -rf v1 v2
+
./v run ./cmd/tools/detect_tcc.v
- echo building tools
- ./v build-tools
+ VEXE=$builddir/v ./v build-tools
}
check() {
@@ 48,23 51,24 @@ check() {
# also some of them seem quite useless
# and others fail
# make check
- :
+ ./v self
}
package() {
install -d $pkgdir/usr/lib/vlang $pkgdir/usr/share/vlang $pkgdir/usr/bin
- install -Dm644 LICENSE pkgdir/usr/share/licenses/$pkgname/LICENSE
- install -Dm755 v $pkgdir/usr/lib/vlang
- cp -a cmd $pkgdir/usr/lib/vlang/
- cp -a examples $pkgdir/usr/share/vlang/
- cp -a thirdparty $pkgdir/usr/lib/vlang/
- cp -a vlib $pkgdir/usr/lib/vlang/
- cp v.mod $pkgdir/usr/lib/vlang/
- ln -s usr/lib/vlang/v $pkgdir/usr/bin/v
+ install -Dm644 LICENSE pkgdir/usr/share/licenses/$pkgname/LICENSE
+ install -Dm755 v $pkgdir/usr/lib/vlang
+ cp -a cmd $pkgdir/usr/lib/vlang/
+ cp -a examples $pkgdir/usr/share/vlang/
+ cp -a thirdparty $pkgdir/usr/lib/vlang/
+ cp -a vlib $pkgdir/usr/lib/vlang/
+ cp v.mod $pkgdir/usr/lib/vlang/
+ ln -s /usr/lib/vlang/v $pkgdir/usr/bin/v
- touch $pkgdir/usr/lib/vlang/cmd/tools/.disable_autorecompilation
+ touch $pkgdir/usr/lib/vlang/cmd/tools/.disable_autorecompilation
}
sha512sums="
-81481854928f31c2cfc3c49acaa9b579712bbfa66cf2a31c5a2df2af47511b9fb62576844cdf1bcf1512b8cea58d4d637ad44110d2a73a0b55b6f41efa984b25 v-0.3.3.zip
-8eab18f5d01a417c0cdbfd995fdd570ca92fd2ce245eda08762de0021487fff1c6084c91fcc7fcdfd37aa618d2f71c0222df6f434b014fe3b71d284795762b0b vc-0.3.3.zip
+668ec724620b1c8f31668d51eee41d44a75e02a86656ecf42ac7deff544b3fc7426284b522d25925e2a503a1041f7c1ad197abe6160b86133f667a585fb10a47 v-0.4.tar.gz
+190fa1d276096d298a80d37b6cffae643a10102a40138309ea5b99f424ec40fba998c130c2bd2ec200ddfd31322e605131b92b7761ee4a6ff37bfa2fbc25bfa5 vc-0.4.zip
+4145172913432edc26a0e36a992b1aebaa1925395d4bc8fb2c44a27df1e097946c4f6d32dfd5e20a94c7511da4ccdcb5e03515938268b0d20ccee31e69bdabe8 fix-tools.patch
"
A testing/vlang/fix-tools.patch => testing/vlang/fix-tools.patch +11 -0
@@ 0,0 1,11 @@
+--- a/cmd/tools/vbuild-tools.v
++++ b/cmd/tools/vbuild-tools.v
+@@ -16,7 +16,7 @@
+ // non_packaged_tools are tools that should not be packaged with
+ // prebuild versions of V, to keep the size smaller.
+ // They are mainly usefull for the V project itself, not to end users.
+-const non_packaged_tools = ['gen1m', 'gen_vc', 'fast', 'wyhash']
++const non_packaged_tools = ['gen1m', 'gen_vc', 'fast', 'wyhash', 'v']
+
+ fn main() {
+ util.ensure_modules_for_all_tools_are_installed('-v' in os.args)