2022-07-03 15:02:53 +02:00
|
|
|
# Maintainer: Jef Roosens
|
|
|
|
# Contributor: Logan Magee <mageelog@gmail.com>
|
|
|
|
|
2022-11-02 19:19:49 +01:00
|
|
|
# Commit hashes for the latest release in the v & vc repositories
|
|
|
|
# Using the direct downloads for the commits greatly reduces the time needed to
|
|
|
|
# pull down the sources, as the vlang repository is >100MB.
|
|
|
|
_v_commit_sha=135b1ccb14699a458575f1d63aa8d1cd4afa3b7a
|
|
|
|
_vc_commit_sha=f96a25aee506a6025d716c8520c0a492374081c6
|
2022-07-03 15:02:53 +02:00
|
|
|
|
|
|
|
pkgname=vlang
|
2022-11-02 19:19:49 +01:00
|
|
|
pkgver=0.3.2
|
2022-07-03 15:02:53 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='Simple, fast, safe, compiled language for developing maintainable software'
|
|
|
|
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')
|
2022-11-02 19:19:49 +01:00
|
|
|
conflicts=('v')
|
|
|
|
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")
|
|
|
|
sha256sums=('8f89d92798ca2b8e6f95da107c9db3ce583540672f019056ca97affe9b38e2ff'
|
|
|
|
'4dc9fe1a09295f2534c5e884aa4d2fc5fd80c2a1792f4247f414ba2e0ecf8d0f')
|
|
|
|
sha512sums=('69bb66446a71abed2f47bb4790a62e700f39f8bc3adf7f8ae0fbf00b70857d4147cbaeaef50843cb708dfeedffc34392d347675b165c70508956ae9c2f5eacef'
|
|
|
|
'1037f9f23b84b6c9028a6d1ddb5c200d8a665d5ee5912bb6e8fbf73887fb3792227c5451aec633bfc1b44f7e670cf0fca1a24c173b7c2c3faccd27f6dbb8b40f')
|
2022-07-03 15:02:53 +02:00
|
|
|
|
|
|
|
prepare() {
|
2022-11-02 19:19:49 +01:00
|
|
|
# In case the previous directory still exists
|
|
|
|
rm -rf "v-${_v_commit_sha}/vc"
|
|
|
|
|
2022-07-03 15:02:53 +02:00
|
|
|
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
|