Hello everyone, This patch series adds new eclasses for packages that use Zig toolchain with varying level of integration. Since some projects or ebuilds use only Zig compiler directly, without touching Zig Build System, I have decided to split eclasses into 2:
* zig-toolchain.eclass: handles dependency on Zig toolchain and finds appropriate versions/slots, converts C-style target tuples/triples to Zig format and sets environment variables to be used in other eclasses and ebuilds. This eclass is more low-level and intended to be used by programs and libraries that call "zig" commands directly, without having build.zig file and using "zig build" command. For example, authors could use "zig build-exe" and "zig test" directly in Makefile, or add "zig cc" and compile both C and Zig version of library etc. In this patchset it is also used by dev-lang/zig to convert targets during bootstrapping, and other logic is suppressed. * zig-build.eclass: handles working with "zig build" sub-command and build.zig files. This eclass is more high-level and for most ebuilds it's the only one which needs to be inherited. It sets default functions for ebuild phases, deals with dependencies in package manager, allows ebuilds and end users to configure used flags, respects multi-threading and verboseness preferences, has some small support for cross-compilation and so on. Github PR and discussion here: https://github.com/gentoo/gentoo/pull/37283 . I have also wrote small generator for Zig ebuild skeletons here: https://github.com/BratishkaErik/zig-ebuild . Example output in that PR. It requires dev-lang/zig:9999 to compile, but at runtime it works with any version supported by eclass (currently 0.13 and 9999). P.S.: I have not used "git format-patch" and "git send-email" for a long time, please forgive me and direct if I did something wrong with mail. Eric Joldasov (5): zig-toolchain.eclass: new eclass zig-build.eclass: new eclass dev-lang/zig: add 0.13.0-r1 dev-lang/zig: sync 9999 with 0.13.0-r1 sys-fs/ncdu: add 2.6-r1 .../zig-0.13.0-skip-test-stack_iterator.patch | 32 + dev-lang/zig/zig-0.13.0-r1.ebuild | 242 ++++++++ dev-lang/zig/zig-9999.ebuild | 239 ++++---- eclass/zig-build.eclass | 572 ++++++++++++++++++ eclass/zig-toolchain.eclass | 325 ++++++++++ sys-fs/ncdu/ncdu-2.6-r1.ebuild | 50 ++ 6 files changed, 1342 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-r1.ebuild create mode 100644 eclass/zig-build.eclass create mode 100644 eclass/zig-toolchain.eclass create mode 100644 sys-fs/ncdu/ncdu-2.6-r1.ebuild -- 2.47.0