66 lines
2.3 KiB
Bash
66 lines
2.3 KiB
Bash
|
# Maintainer: Jef Roosens
|
||
|
# Contributor: Logan Magee <mageelog@gmail.com>
|
||
|
|
||
|
_v_commit_sha=d1f57ead713c8e5254d8cef22991e6409dc1f06b
|
||
|
_vc_commit_sha=1f7f0244f352d41122bb306446d98ae3de4e6b02
|
||
|
|
||
|
pkgname=vieter-vlang
|
||
|
pkgver="$(echo "${_v_commit_sha}" | cut -c -8)"
|
||
|
pkgrel=1
|
||
|
epoch=1
|
||
|
pkgdesc='Locked Vlang version used to develop Vieter'
|
||
|
arch=('x86_64' 'aarch64')
|
||
|
url='https://vlang.io'
|
||
|
license=('MIT')
|
||
|
depends=('glibc')
|
||
|
optdepends=('glfw: Needed for graphics support'
|
||
|
'freetype2: Needed for graphics support'
|
||
|
'openssl: Needed for http support')
|
||
|
makedepends=('git')
|
||
|
conflicts=('v' 'vlang')
|
||
|
source=("${pkgname}.zip::https://github.com/vlang/v/archive/${_v_commit_sha}.zip"
|
||
|
"${pkgname}-vc.zip::https://github.com/vlang/vc/archive/${_vc_commit_sha}.zip")
|
||
|
sha256sums=('6886469efe21463276d682e658f415ea1167a9efb41bf2a8fd6577abb753f2e4'
|
||
|
'91b6b4b576659f222e8aa3569124e95e17feb5c0b436ecc0f30db04ff24f6e39')
|
||
|
sha512sums=('81481854928f31c2cfc3c49acaa9b579712bbfa66cf2a31c5a2df2af47511b9fb62576844cdf1bcf1512b8cea58d4d637ad44110d2a73a0b55b6f41efa984b25'
|
||
|
'8eab18f5d01a417c0cdbfd995fdd570ca92fd2ce245eda08762de0021487fff1c6084c91fcc7fcdfd37aa618d2f71c0222df6f434b014fe3b71d284795762b0b')
|
||
|
|
||
|
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
|