• [gentoo-dev] [PATCH 4/5] dev-lang/zig: sync 9999 with 0.13.0-r1

    From Eric Joldasov@21:1/5 to All on Thu Oct 24 03:50:01 2024
    From: Eric Joldasov <bratishkaerik@getgoogleoff.me>

    * Update to use zig-build and zig-toolchain functions instead of
    local get_zig_mcpu etc. functions.
    * Port "sys-apps/sandbox-2.39" test dependency requirement from
    0.13.0 ebuild.
    * Stage3 compilation is unified by combining build.zig options,
    now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2"
    target, after that we use zig-build.eclass with common options.
    * Before migrating to the zig-build.eclass, test steps in src_test
    have been ran sequentially in for-loop, which allowed logic inside
    each step to ran parallelly but not several steps at a time. Now we use
    upstream "test" step instead of separately calling all dependant
    steps, so that build system can now ran all of them paralelly.
    This means time spent in src_test is now significantly shorter.
    * "zig2" in both scenarios now has explicit target which is set by
    using zig-toolchain functions on a CBUILD/CHOST. This allows us
    to skip convertion logic in CMake and bootstrap.c, so that instead
    of patching them we can just update converter in zig-toolchain.eclass
    and unify target behaviour.
    * Disable autodocs generation for "std" module, since it can now
    be generated on-fly with "zig std" command.

    Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
    ---
    dev-lang/zig/zig-9999.ebuild | 239 ++++++++++++++++++-----------------
    1 file changed, 121 insertions(+), 118 deletions(-)

    diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild
    index 335ac0eab28c..380bb83a3dac 100644
    --- a/dev-lang/zig/zig-9999.ebuild
    +++ b/dev-lang/zig/zig-9999.ebuild
    @@ -1,234 +1,237 @@
    # Copyright 2019-2024 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    EAPI=8

    -LLVM_COMPAT=( 19 )
    +LLVM_COMPAT=(19)
    LLVM_OPTIONAL=1

    -inherit check-reqs cmake edo llvm-r1 toolchain-funcs
    +ZIG_SLOT="$(ver_cut 1-2)"
    +ZIG_OPTIONAL=1
    +
    +inherit check-reqs cmake flag-o-matic edo llvm-r1 toolchain-funcs zig-build

    DESCRIPTION="A robust, optimal, and maintainable programming language" -HOMEPAGE="https://ziglang.org/"
    +HOMEPAGE="https://ziglang.org/ https://github.com/ziglang/zig/"
    if [[ ${PV} == 9999 ]]; then
    EGIT_REPO_URI="https://github.com/ziglang/zig.git"
    inherit git-r3
    else
    VERIFY_SIG_METHOD=minisig
    VERI
  • From Eric Joldasov@21:1/5 to All on Fri Oct 25 23:30:01 2024
    From: Eric Joldasov <bratishkaerik@getgoogleoff.me>

    * Update to use zig-build and zig-toolchain functions instead of
    local get_zig_mcpu etc. functions.
    * Port "sys-apps/sandbox-2.39" test dependency requirement from
    0.13.0 ebuild.
    * Stage3 compilation is unified by combining build.zig options,
    now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2"
    target, after that we use zig-build.eclass with common options.
    * Before migrating to the zig-build.eclass, test steps in src_test
    have been ran sequentially in for-loop, which allowed logic inside
    each step to ran parallelly but not several steps at a time. Now we use
    upstream "test" step instead of separately calling all dependant
    steps, so that build system can now ran all of them paralelly.
    This means time spent in src_test is now significantly shorter.
    * "zig2" in both scenarios now has explicit target which is set by
    using zig-toolchain functions on a CBUILD/CHOST. This allows us
    to skip convertion logic in CMake and bootstrap.c, so that instead
    of patching them we can just update converter in zig-toolchain.eclass
    and unify target behaviour.
    * Disable autodocs generation for "std" module, since it can now
    be generated on-fly with "zig std" command.

    Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
    ---
    dev-lang/zig/zig-9999.ebuild | 244 ++++++++++++++++++-----------------
    1 file changed, 125 insertions(+), 119 deletions(-)

    diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild
    index 335ac0eab28c..65650ac5c781 100644
    --- a/dev-lang/zig/zig-9999.ebuild
    +++ b/dev-lang/zig/zig-9999.ebuild
    @@ -1,234 +1,240 @@
    # Copyright 2019-2024 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    EAPI=8

    LLVM_COMPAT=( 19 )
    LLVM_OPTIONAL=1

    -inherit check-reqs cmake edo llvm-r1 toolchain-funcs
    +ZIG_SLOT="$(ver_cut 1-2)"
    +ZIG_OPTIONAL=1
    +
    +inherit check-reqs cmake flag-o-matic edo llvm-r1 toolchain-funcs zig-build

    DESCRIPTION="A robust, optimal, and maintainable programming language" -HOMEPAGE="https://ziglang.org/"
    +HOMEPAGE="https://ziglang.org/ https://github.com/ziglang/zig/"
    if [[ ${PV} == 9999 ]]; then
    EGIT_REPO_URI="https://github.com/ziglang/zig.git"
    inherit git-r3
    else
    VERIFY_SIG_METHOD=minisig
    VERIFY_SIG_OPENPGP_KEY_