From: Eric Joldasov <bratishkaerik@landless-city.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH 0/5] Ziglang eclasses for 0.13+
Date: Thu, 24 Oct 2024 06:46:13 +0500 [thread overview]
Message-ID: <20241024014626.31175-1-bratishkaerik@landless-city.net> (raw)
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
next reply other threads:[~2024-10-24 1:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 1:46 Eric Joldasov [this message]
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 ` [gentoo-dev] [PATCH v3 0/5] Zig: new eclasses, rewrite existing ebuilds to use them Eric Joldasov
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=20241024014626.31175-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