# 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++" install="" 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 mkdir -p build cd build export LLVM_CONFIG=/usr/bin/llvm-config cmake \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DZIG_FORCE_EXTERNAL_LLD=ON \ -DZIG_SKIP_INSTALL_LIB_FILES=ON \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -stdlib=libstdc++" \ .. make #-DCMAKE_CXX_COMPILER="clang++ `llvm-config --ldflags`"\ } check() { make check } package() { make DESTDIR="$pkgdir" install } sha512sums="1ce479077d2501c160bcac318b3d59e66921207855f56d900b9a59c44b14116639de10c5b578663b4963ccc8d49bb0d5aa75afb8987f5df1950037248561d1e2 zig-0.5.0.tar.xz"