# Contributor: Milan P. Stanić # Maintainer: Milan P. Stanić pkgname="zig" pkgver="0.5.0" pkgrel=0 pkgdesc="general-purpose programming language designed for robustness, optimality, and maintainability" url="https://ziglang.org/" arch="all" license="MIT" makedepends="cmake clang-dev clang-libs llvm9-libs llvm-dev lld-dev libstdc++ zlib-static libxml2-dev llvm9-static clang-static lld-static" subpackages="$pkgname-dev $pkgname-doc" source="https://ziglang.org/download/$pkgver/zig-$pkgver.tar.xz" builddir="$srcdir"/$pkgname-$pkgver build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DZIG_FORCE_EXTERNAL_LLD=ON \ -DZIG_SKIP_INSTALL_LIB_FILES=ON \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ ${CMAKE_CROSSOPTS} . make } check() { make check } package() { make DESTDIR="$pkgdir" install } sha512sums="1ce479077d2501c160bcac318b3d59e66921207855f56d900b9a59c44b14116639de10c5b578663b4963ccc8d49bb0d5aa75afb8987f5df1950037248561d1e2 zig-0.5.0.tar.xz"