blob: 48cd0873db4d6482416a08ae512802153936264c (
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
|
# Maintainer: Marc Tiehuis <marctiehuis at gmail.com>
pkgname=zig-git
pkgver=0.11.0.r3596.gfbb38a7682
pkgrel=1
pkgdesc="a programming language prioritizing robustness, optimality, and clarity"
arch=('i686' 'x86_64' 'aarch64')
url='https://ziglang.org'
license=('MIT')
depends=('clang' 'llvm' 'lld')
makedepends=('cmake' 'git')
provides=(zig)
conflicts=(zig)
source=("git+https://github.com/ziglang/zig.git")
md5sums=('SKIP')
pkgver() {
git -C zig describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cmake -B build -S zig \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DZIG_SHARED_LLVM=ON
cmake --build build
}
# No `check()` because zig currently doesn't have a test target. See:
# https://github.com/ziglang/zig/issues/14240
# NOTE: In the future, a check step will be provided, but will likely be slow. Use `makepkg --nocheck` to skip it.
package() {
install -Dm644 zig/LICENSE "$pkgdir/usr/share/licenses/$provides/LICENSE"
DESTDIR="$pkgdir" cmake --install build
}
|