# Maintainer: Jef Roosens # Contributor: Logan Magee #https://github.com/vlang/v/commit/5d4c9dc9fc11bf8648541c934adb64f27cb94e37 _v_commit_sha=5d4c9dc9fc11bf8648541c934adb64f27cb94e37 # https://github.com/vlang/vc/commit/7919b47d852650ca09e51a1f44cab0faa3a973eb _vc_commit_sha=7919b47d852650ca09e51a1f44cab0faa3a973eb pkgname=vieter-vlang pkgver=5d4c9dc9 pkgrel=1 epoch=2 pkgdesc='Locked Vlang version used to develop Vieter' arch=('x86_64' 'aarch64') url='https://vlang.io' license=('MIT') depends=('glibc' 'libx11') optdepends=('glfw: Needed for graphics support' 'freetype2: Needed for graphics support' 'openssl: Needed for http support') makedepends=('git') conflicts=('v' 'vlang') source=("${pkgname}-${_v_commit_sha}.zip::https://github.com/vlang/v/archive/${_v_commit_sha}.zip" "${pkgname}-vc-${_vc_commit_sha}.zip::https://github.com/vlang/vc/archive/${_vc_commit_sha}.zip") sha256sums=('49f28a49e7749f07760b3700b8ef52ef0d194a35041b503a7337a4cc1bb2288b' '343b476edb9886078dd59ed5d0e3c8d08b2d613e4382ea415f87f02e3390fb9f') sha512sums=('886c5eabb7a56c668431f1f4445bb757c4eae90680176508e6d4c733d4186f81660d12376f61e9d4ecf281fc332afb32c072c8f0172735c1ce2870987a7c69db' '3d8aa7fd51c021a3eaaa63df53a1765cd6971e53a31008f5b184683ac29fbfb68f24dd27ef317713de9c16db898fe850f34555bc2739e9272aa17623b53482da') pkgver() { echo "${_v_commit_sha}" | cut -c -8 } prepare() { # In case the previous directory still exists rm -rf "v-${_v_commit_sha}/vc" mv "vc-${_vc_commit_sha}" "v-${_v_commit_sha}/vc" # We have to set local=1 because we manually download a specific vc # version. This flag also disables downloading tcc, so we do that # beforehand. make -C "v-${_v_commit_sha}" fresh_tcc } build() { cd "v-${_v_commit_sha}" CFLAGS="" LDFLAGS="" make prod=1 local=1 # Compile all tools LDFLAGS='' ./v build-tools } package() { cd "v-${_v_commit_sha}" 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" touch "${pkgdir}/usr/lib/vlang/cmd/tools/.disable_autorecompilation" } # vim: ft=bash