blob: 59146b122bc0e5d0f42d9cc7fa2be5337e187f97 (
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
|
#!/bin/sh
NAME="zig"
DESC="general-purpose programming language designed for robustness, optimality, and maintainability"
MAKEDEPS=" cmake clang llvm lld libstdc++ zlib libxml2"
PKG_VER=0.9.1
SOURCE="https://github.com/ziglang/zig/archive/$PKG_VER.tar.gz"
ADDITIONAL="
llvm-include.patch
"
prepare () {
apply_patches
}
build() {
mkdir -p build
cd build
cmake \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DZIG_VERSION="$PKG_VER" \
..
make
}
#check() {
# ./zig build test \
# -Dskip-release \
# -Dskip-release-small \
# -Dskip-release-fast \
# -Dskip-non-native \
# -Dskip-libc
#}
package() {
cd ..
make -C build DESTDIR="$PKG_DEST" 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`.
### it is not built now ###
#install -Dm644 zig-cache/langref.html \
# "$PKG_DEST"/usr/share/doc/zig/langref.html
}
|