1 # Maintainer: Daurnimator <daurnimator@archlinux.org>
2 # Contributor: Marc Tiehuis <marctiehuis@gmail.com>
7 pkgdesc='a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software'
9 url='https://ziglang.org/'
12 depends=('clang' 'lld' 'llvm-libs')
13 makedepends=('cmake' 'llvm')
14 checkdepends=('lib32-glibc')
15 source=("https://ziglang.org/download/$pkgver/zig-$pkgver.tar.xz")
16 sha256sums=('69459bc804333df077d441ef052ffa143d53012b655a51f04cfef1414c04168c')
22 CMAKE_INSTALL_PREFIX=/usr
24 # The zig CMakeLists uses build type Debug if not set
25 # override it back to None so makepkg env vars are respected
30 ZIG_TARGET_MCPU=baseline
32 cmake -B build "${cmake_vars[@]/#/-D}" .
38 # ugly workaround until test target is provided
39 # https://github.com/ziglang/zig/issues/14240
40 DESTDIR="./testinstall" cmake --install build
41 ./testinstall/usr/bin/zig build test -Dconfig_h=build/config.h \
44 -Dskip-non-native=true
50 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
52 DESTDIR="$pkgdir" cmake --install build