From: Eric Joldasov <bratishkaerik@landless-city.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH v3 0/5] Zig: new eclasses, rewrite existing ebuilds to use them
Date: Sat, 14 Dec 2024 01:07:37 +0500 [thread overview]
Message-ID: <20241213200750.75574-1-bratishkaerik@landless-city.net> (raw)
In-Reply-To: <20241024014626.31175-1-bratishkaerik@landless-city.net>
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
next prev parent reply other threads:[~2024-12-13 20:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 1:46 [gentoo-dev] [PATCH 0/5] Ziglang eclasses for 0.13+ Eric Joldasov
2024-10-24 1:46 ` [gentoo-dev] [PATCH 1/5] zig-toolchain.eclass: new eclass Eric Joldasov
2024-10-24 7:32 ` Ulrich Müller
2024-10-24 7:38 ` Matt Jolly
2024-10-24 8:50 ` Florian Schmaus
2024-10-24 13:00 ` Michael Orlitzky
2024-10-24 1:46 ` [gentoo-dev] [PATCH 2/5] zig-build.eclass: " Eric Joldasov
2024-10-24 9:16 ` Maciej Barć
2024-10-24 1:46 ` [gentoo-dev] [PATCH 3/5] dev-lang/zig: add 0.13.0-r1 Eric Joldasov
2024-10-24 1:46 ` [gentoo-dev] [PATCH 4/5] dev-lang/zig: sync 9999 with 0.13.0-r1 Eric Joldasov
2024-10-24 1:46 ` [gentoo-dev] [PATCH 5/5] sys-fs/ncdu: add 2.6-r1 Eric Joldasov
2024-10-25 21:20 ` [gentoo-dev] [PATCH 0/5] Ziglang eclasses for 0.13+ Eric Joldasov
2024-10-25 21:20 ` [gentoo-dev] [PATCH 1/5] zig-toolchain.eclass: new eclass Eric Joldasov
2024-10-25 21:20 ` [gentoo-dev] [PATCH 2/5] zig-build.eclass: " Eric Joldasov
2024-10-25 21:20 ` [gentoo-dev] [PATCH 3/5] dev-lang/zig: add 0.13.0-r1 Eric Joldasov
2024-10-25 21:20 ` [gentoo-dev] [PATCH 4/5] dev-lang/zig: sync 9999 with 0.13.0-r1 Eric Joldasov
2024-10-25 21:20 ` [gentoo-dev] [PATCH 5/5] sys-fs/ncdu: add 2.6-r1 Eric Joldasov
2024-10-25 21:33 ` [gentoo-dev] [PATCH v2 0/5] Ziglang eclasses for 0.13+ Eric Joldasov
2024-10-25 21:33 ` [gentoo-dev] [PATCH v2 1/5] zig-toolchain.eclass: new eclass Eric Joldasov
2024-10-25 21:33 ` [gentoo-dev] [PATCH v2 2/5] zig-build.eclass: " Eric Joldasov
2024-10-25 21:33 ` [gentoo-dev] [PATCH v2 3/5] dev-lang/zig: add 0.13.0-r1 Eric Joldasov
2024-10-25 21:33 ` [gentoo-dev] [PATCH v2 4/5] dev-lang/zig: sync 9999 with 0.13.0-r1 Eric Joldasov
2024-10-25 21:33 ` [gentoo-dev] [PATCH v2 5/5] sys-fs/ncdu: add 2.6-r1 Eric Joldasov
2024-12-13 20:07 ` Eric Joldasov [this message]
2024-12-13 20:07 ` [gentoo-dev] [PATCH v3 1/5] zig-utils.eclass: new eclass Eric Joldasov
2024-12-13 20:07 ` [gentoo-dev] [PATCH v3 2/5] zig.eclass: " Eric Joldasov
2024-12-13 20:07 ` [gentoo-dev] [PATCH v3 3/5] dev-lang/zig: add 0.13.0-r2 Eric Joldasov
2024-12-13 20:07 ` [gentoo-dev] [PATCH v3 4/5] dev-lang/zig: sync 9999 with 0.13.0-r2 Eric Joldasov
2024-12-13 20:07 ` [gentoo-dev] [PATCH v3 5/5] sys-fs/ncdu: add 2.7-r1 Eric Joldasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241213200750.75574-1-bratishkaerik@landless-city.net \
--to=bratishkaerik@landless-city.net \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox