public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/5] Ziglang eclasses for 0.13+
@ 2024-10-24  1:46 Eric Joldasov
  2024-10-24  1:46 ` [gentoo-dev] [PATCH 1/5] zig-toolchain.eclass: new eclass Eric Joldasov
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Eric Joldasov @ 2024-10-24  1:46 UTC (permalink / raw
  To: gentoo-dev

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



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-12-13 20:10 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox