commit: 94822957f2fe46cb4415def712dfe238306bdf71 Author: Eric Joldasov <bratishkaerik <AT> landless-city <DOT> net> AuthorDate: Sat May 31 13:52:13 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 31 21:09:08 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94822957
dev-lang/zig: sync 9999 with 0.14.1 See previous commit for details. Signed-off-by: Eric Joldasov <bratishkaerik <AT> landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/42374 Closes: https://github.com/gentoo/gentoo/pull/42374 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-lang/zig/zig-9999.ebuild | 49 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index 3bd66f06a627..69ecca15fe9c 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -302,21 +302,35 @@ src_test() { # the test will fail. There's no way to disable --libc once passed, # so we need to strip it from ZBS_ARGS. # See: https://github.com/ziglang/zig/issues/22383 - local args_backup=("${ZBS_ARGS[@]}") - for ((i = 0; i < ${#ZBS_ARGS[@]}; i++)); do - if [[ "${ZBS_ARGS[i]}" == "--libc" ]]; then - unset ZBS_ARGS[i] - unset ZBS_ARGS[i+1] - break - fi - done - - # Run tests with Debug mode by default, like upstream does in CI, - # full test suite with other modes is in a sad state right now... - ZIG_EXE="./stage3/bin/zig" zig_src_test -Dskip-non-native --release=debug - - ZBS_ARGS=("${args_backup[@]}") + # XXX: Also strip --release=* flags to run tests with Debug mode, + # like upstream runs in CI. Full test suite with other modes is + # in a sad state right now... + ( + local -a filtered_args=() + local i=0 + + local arg + while (( i < ${#ZBS_ARGS[@]} )); do + arg="${ZBS_ARGS[i]}" + case "$arg" in + --libc) + (( i += 2 )) + ;; + --release=*) + (( i += 1 )) + ;; + *) + filtered_args+=("$arg") + (( i += 1 )) + ;; + esac + done + + ZBS_ARGS=("${filtered_args[@]}") + + ZIG_EXE="./stage3/bin/zig" zig_src_test -Dskip-non-native + ) } src_install() { @@ -334,13 +348,6 @@ src_install() { pkg_postinst() { eselect zig update ifunset || die - elog "Starting from 0.12.0, Zig no longer installs" - elog "precompiled standard library documentation." - elog "Instead, you can call \`zig std\` to compile it on-the-fly." - elog "It reflects all edits in standard library automatically." - elog "See \`zig std --help\` for more information." - elog "More details here: https://ziglang.org/download/0.12.0/release-notes.html#Redesign-How-Autodoc-Works" - if ! use llvm; then elog "Currently, Zig built without LLVM support lacks some" elog "important features such as most optimizations, @cImport, etc."
