Hello everyone, This patch series adds 2 new eclasses for better integration with the Zig toolchain and rewrites ebuilds in `::gentoo` repository to use them.
The `zig-utils.eclass` is designed for other eclasses and ebuilds that directly call `zig` command (like `zig.eclass` which runs `zig build`, or some packages in wild that have `zig build-exe` in their Makefiles or something similar). It is fairly low-level compared to `zig.eclass`, so for most Zig projects ebuild authors shoud use latter instead. The `zig.eclass` works with `build.zig` system, called ZBS here to highlight distinction between it and `zig build-exe` command or other build systems with Zig support. It manages dependencies integration for official package manager and options configuration system (some basic options with sane defaults that can be combined with additional options from ebuild authors and users) and makes packaging more convenient by automatically exporting required dependencies and phase functions. This is 3-rd version, with changes requested on GitHub PR. Big thanks to Michał Górny and Sam James for their review comments there. I won't attach interdiff here (it's unreadable IMHO, mostly because of renamings), so instead I wrote small overview: * Eclasses renamed: `zig-toolchain` to `zig-utils`, `zig-build` to `zig`. Some functions are also renamed, for example `init_base_args` to `setup`. * Target and CPU convertion functions now accept 2-nd required argument with `CFLAGS`-like value, for more precise convertion and needed by new `ZIG_CPU` logic. CPU convertion logic was added for more arches. Both functions are now also covered by tests (can optionally compile and run Zig code with resulting target and CPU). * `ZIG_CPU` now defaults to "value converted from CHOST and CFLAGS rather" than `native`, to be more consistent with existing policies and other ecosystems. * `src_install` does not change CWD when using `einstalldocs` anymore. * Other functions were rewritten for simplicity or readability without significant changes in behaviour (maybe I forgot some changes). Eric Joldasov (5): zig-utils.eclass: new eclass zig.eclass: new eclass dev-lang/zig: add 0.13.0-r2 dev-lang/zig: sync 9999 with 0.13.0-r2 sys-fs/ncdu: add 2.7-r1 ....13.0-skip-test-stack_iterator.patch (new) | 32 + dev-lang/zig/zig-0.13.0-r2.ebuild (new) | 248 ++++++++ dev-lang/zig/zig-9999.ebuild | 243 ++++---- eclass/tests/zig-utils.sh (new +x) | 320 ++++++++++ eclass/zig-utils.eclass (new) | 538 +++++++++++++++++ eclass/zig.eclass (new) | 558 ++++++++++++++++++ sys-fs/ncdu/ncdu-2.7-r1.ebuild (new) | 52 ++ 7 files changed, 1873 insertions(+), 118 deletions(-) create mode 100644 dev-lang/zig/files/zig-0.13.0-skip-test-stack_iterator.patch create mode 100644 dev-lang/zig/zig-0.13.0-r2.ebuild create mode 100755 eclass/tests/zig-utils.sh create mode 100644 eclass/zig-utils.eclass create mode 100644 eclass/zig.eclass create mode 100644 sys-fs/ncdu/ncdu-2.7-r1.ebuild -- 2.47.0