blob: e9aa7abc60af022282ebfa7b466f145dac9ad3cb (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=zig
pkgver=0.6.0
pkgrel=1
pkgdesc="general-purpose programming language designed for robustness, optimality, and maintainability"
url="https://ziglang.org/"
arch="x86_64 aarch64"
license="MIT"
provides="zig-dev=$pkgver-r$pkgrel"
subpackages="$pkgname-doc"
makedepends="cmake clang-dev clang-libs llvm10-libs llvm-dev lld-dev libstdc++
zlib-static libxml2-dev llvm10-static clang-static lld-static"
source="$pkgname-$pkgver.tar.gz::https://github.com/ziglang/zig/archive/$pkgver.tar.gz"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
mkdir -p build
cd build
cmake \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
${CMAKE_CROSSOPTS} \
..
make
}
check() {
cd build
./zig build test \
-Dskip-release \
-Dskip-release-small \
-Dskip-release-fast \
-Dskip-non-native \
-Dskip-libc \
-Dskip-self-hosted
}
package() {
make -C build DESTDIR="$pkgdir" install
# Documentation is generated as part of `./zig build test` in check().
# If this is no longer the case at some point it can be
# generated explicitly using `./zig build docs`.
install -Dm644 zig-cache/langref.html \
"$pkgdir"/usr/share/doc/$pkgname/langref.html
}
sha512sums="062f3437a080c1d823558c834dd143222e3f0537cc4256c4fa687ed94078a4312be60e402b0effa916ce8305a3482e1736a93c3ec4275fc5a526a0d78a3b1a47 zig-0.6.0.tar.gz"
|