From d52b54703ce1eb937f11eab13f7f843a87be8bbc Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Thu, 21 Oct 2021 22:58:05 +0200 Subject: [PATCH] update dev-lang/zig dependencies --- dev-lang/zig/zig-9999-r1.ebuild | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev-lang/zig/zig-9999-r1.ebuild b/dev-lang/zig/zig-9999-r1.ebuild index 0b2357d..799feec 100644 --- a/dev-lang/zig/zig-9999-r1.ebuild +++ b/dev-lang/zig/zig-9999-r1.ebuild @@ -9,7 +9,8 @@ DESCRIPTION="A robust, optimal, and maintainable programming language" HOMEPAGE="https://ziglang.org/" LICENSE="MIT" SLOT="0" -IUSE="+experimental" +IUSE="+experimental test" +RESTRICT="!test? ( test )" if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ziglang/zig.git" @@ -19,6 +20,8 @@ else KEYWORDS="~amd64" fi +BUILD_DIR="${S}/build" + # According to zig's author, zig builds that do not support all targets are not # supported by the upstream project. ALL_LLVM_TARGETS=( @@ -28,7 +31,7 @@ ALL_LLVM_TARGETS=( ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS="${ALL_LLVM_TARGETS[@]}" -LLVM_MAX_SLOT=12 +LLVM_MAX_SLOT=13 RDEPEND=" sys-devel/clang:${LLVM_MAX_SLOT} @@ -49,3 +52,8 @@ src_configure() { ) cmake_src_configure } + +src_test() { + cd "${BUILD_DIR}" || die + ./zig build test || die +}