summaryrefslogtreecommitdiff
path: root/dev-lang/zig/zig-9999.ebuild
AgeCommit message (Collapse)Author
10 daysdev-lang/zig: update HOMEPAGEEric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/44792 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2025-10-23dev-lang/zig: fix build error for 9999Eric Joldasov
Upstream changed behavior so that the "max_rss" field in one line of their build.zig is now required: https://www.github.com/ziglang/zig/pull/25402 Drop the command removing it, as it is no longer needed. "max_rss" errors were downgraded to warnings in: https://www.github.com/ziglang/zig/pull/23525 Upstream suggestion: https://www.github.com/ziglang/zig/issues/25659 Closes: https://bugs.gentoo.org/964953 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/44298 Closes: https://github.com/gentoo/gentoo/pull/44298 Signed-off-by: Sam James <sam@gentoo.org>
2025-09-01dev-lang/zig: update to LLVM 21 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/43618 Closes: https://github.com/gentoo/gentoo/pull/43618 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-31dev-lang/zig: sync 9999 with 0.14.1Eric Joldasov
See previous commit for details. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/42374 Closes: https://github.com/gentoo/gentoo/pull/42374 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-21dev-lang/zig: fix installing in Gentoo PrefixEric Joldasov
Closes: https://bugs.gentoo.org/954126 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/41651 Closes: https://github.com/gentoo/gentoo/pull/41651 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-21dev-lang/zig: skip linker script checks for zig executableEric Joldasov
Closes: https://bugs.gentoo.org/951143 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/41651 Signed-off-by: Sam James <sam@gentoo.org>
2025-04-11dev-lang/zig: update to LLVM 20 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/41463 Signed-off-by: Sam James <sam@gentoo.org>
2025-03-04dev-lang/zig: run tests with LLVM enabled and in Debug mode on 9999Eric Joldasov
Upstream uses release mode only for behavior tests, full suite is run primarily with Debug, so other modes tend to fail with strange errors. Seems like no other distro runs them in different modes, so align it with upstream and everyone else. Also restore `RESTRICT=test` for LLVM-disabled builds; it was removed by mistake in some previous commit. Bug: https://bugs.gentoo.org/949878 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/40891 Signed-off-by: Sam James <sam@gentoo.org>
2025-03-03zig.eclass: always use absolute path for `--prefix` argumentsin-ack
Needed for correctness when `build.zig` uses them to manipulate default pathes in compiled artifact. Without `DESTDIR` it would try to install to root directly, so to fix this we set `DESTDIR` where appliable. Co-authored-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/40197 Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: do not die on `eselect` in `pkg_postrm`Eric Joldasov
Per PMS: > Ebuilds are allowed to call them in pkg_preinst and pkg_postinst. > Ebuilds may also call them in pkg_prerm and pkg_postrm but must not > rely on them being available. Bug: https://bugs.gentoo.org/949225 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: use `llvm-r2.eclass`, add cross-compilation support for `USE=llvm`Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/39765 Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: guard `stage3` calls when cross-compilingsin-ack
They can't be run when cross-compiling unless user has qemu static-usr enabled and used, which we can't check in ebuild. Therefore, we need to also disallow docs building when cross-compiling for the time being. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: add `debug` USE-flagEric Joldasov
Controls debug extensions such as `zig dump-zir` or `zig build-exe --debug-compile-errors` and can change default when building Zig itself from `ReleaseFast` to `ReleaseSafe`. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: warn user about `binfmt_misc` when running testssin-ack
If binfmt_misc hooks are installed for QEMU, then running Zig tests will fail because Zig attempts to run executables during tests that may be from foreign architectures. Normally this would raise an "exec format error" failure which Zig handles but binfmt_misc hooks turn it into a "missing interpreter" error instead which is not handled. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: do not pass `--libc` when running testssin-ack
When `--libc` is passed to `zig build test`, tests that cross-compile to other OSes and architectures fail because the internal include paths automatically configured by Zig are overridden by the libc installation file. Upstream issue: https://www.github.com/ziglang/zig/issues/22383 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-12-15dev-lang/zig: sync 9999 with 0.13.0-r2Eric Joldasov
* Update to use zig-utils and zig eclasses instead of local get_zig_mcpu etc. functions. * "stage3" compilation is unified by combining build.zig options, now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2" target, after that we use zig.eclass with common options. * Before migrating to the zig.eclass, test steps in src_test have been ran sequentially in for-loop, which allowed logic inside each step to ran parallelly but not several steps at a time. Now we use upstream "test" step instead of separately calling all dependant steps, so that build system can now ran all of them paralelly. This means time spent in `src_test` is now significantly shorter. * "zig2" in both scenarios now has explicit target which is set by using zig-utils.eclass functions on a CBUILD/CHOST. This allows us to skip convertion logic in CMake and bootstrap.c, so that instead of patching them we can just update converter in zig-utils.eclass and unify target behaviour. * Disable autodocs generation for "std" module, since it can now be generated on-fly with `zig std` command. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/llvmMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/lldMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/clangMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-09-21dev-lang/zig: update to LLVM 19 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/38704 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-08-05dev-lang/zig: fix building with `doc` USE-flag enabled on 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/37703 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2024-05-20dev-lang/zig: update LLVM to 18, fix build without LLVM on 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/35997 Signed-off-by: Sam James <sam@gentoo.org>
2024-05-20dev-lang/zig: add verify-sig supportEric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-02-28dev-lang/zig: add "test-c-import" step in 9999Eric Joldasov
Extracted from "test-behaviour" in https://www.github.com/ziglang/zig/pull/19016 . Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/35457 Signed-off-by: Florian Schmaus <flow@gentoo.org>
2024-02-11dev-lang/zig: Migrate to llvm-r1 in 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/35273 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2023-12-13dev-lang/zig: remove ".max_rss" fields initializers from build.zig in 9999Eric Joldasov
They are too high and cause errors like below: * https://www.github.com/ziglang/zig/issues/18263 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/34252 Signed-off-by: Florian Schmaus <flow@gentoo.org>
2023-11-22dev-lang/zig: add `llvm` USE-flag for 9999Eric Joldasov
See upstream PR https://www.github.com/ziglang/zig/pull/17994 and https://www.github.com/ziglang/zig/commit/f8b38a174f0c4a843688fe8adac09dc4f66cd585 . LLVM-less build cannot build `sys-fs/ncdu` yet (no @cImport support), but we are close. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/33868 Signed-off-by: Sam James <sam@gentoo.org>
2023-10-27dev-lang/zig: explicitly set locations for build cacheEric Joldasov
Useful for debugging and a little bit more deterministic than before. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/33272 Signed-off-by: Sam James <sam@gentoo.org>
2023-10-27dev-lang/zig: add simple `zig env` invocation to check if compiler built ↵Eric Joldasov
itself properly Will make bugs similar to following easier to spot in future because they will fall earlier and with better error message [than "`zig build std-docs` not found"]. In case "doc" USE-flag and tests are disabled, miscompilation could have been unnoticed by user at all until Zig usage, since the only calls to Zig binary in ebuild would have been skipped. Now, it will always check during "src_compile" phase and can reveal potentially hidden bug. Bug: https://bugs.gentoo.org/914101 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Sam James <sam@gentoo.org>
2023-09-26dev-lang/zig: update to LLVM 17 for 9999Eric Joldasov
See also https://www.github.com/ziglang/zig/pull/17202 . Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/32935 Signed-off-by: Sam James <sam@gentoo.org>
2023-07-27dev-lang/zig: make doc generation for 9999 more reliableEric Joldasov
Use build system steps for automatically following latest changes in doc-generation. This means less frequent breakage, which is good. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/32052 Signed-off-by: Sam James <sam@gentoo.org>
2023-07-26dev-lang/zig: fix building on 9999 with "doc" USE-flag enabledEric Joldasov
ZIG_NO_LANGREF variable was disabled in https://github.com/ziglang/zig/commit/32a175740c8750a7db550011795a4c22c0d0bc93. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/32035 Signed-off-by: Sam James <sam@gentoo.org>
2023-05-13dev-lang/zig: update testing process for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/30616 Signed-off-by: Sam James <sam@gentoo.org>
2023-05-13dev-lang/zig: update LICENSEEric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Sam James <sam@gentoo.org>
2023-04-07dev-lang/zig: update to LLVM 16 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/30508 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2023-03-10dev-lang/zig: adjust QA_FLAGS_IGNORED for new placementsEric Joldasov
Closes: https://bugs.gentoo.org/900543 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Florian Schmaus <flow@gentoo.org>
2023-03-09dev-lang/zig: sync liveFlorian Schmaus
Signed-off-by: Florian Schmaus <flow@gentoo.org>
2023-03-09dev-lang/zig: ensure 'zig' symlink is valid if possibleFlorian Schmaus
Signed-off-by: Florian Schmaus <flow@gentoo.org>
2023-03-09dev-lang/zig: slotting, initial support for setting ZIG_{MCPU,TARGET}Eric Joldasov
* Install Zig to "/usr/$(get_libdir)/zig/${PV}", handle /usr/bin/zig via eselect-zig * Add functions for getting ZIG_TARGET and ZIG_MCPU (user-provided or defaults) and use them for building/testing * Add "doc" USE flag for installing language reference and stdlib documentation Closes: https://bugs.gentoo.org/885861 Bug: https://bugs.gentoo.org/890234 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Florian Schmaus <flow@gentoo.org>
2022-12-14dev-lang/zig: relax memory requirements for 9999Eric Joldasov
https://www.github.com/ziglang/zig/commit/e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 was merged recently, so memory usage (when building) drops from ~10GB to ~4GB Bug: https://bugs.gentoo.org/823086 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/28581 Signed-off-by: Sam James <sam@gentoo.org>
2022-11-08dev-lang/zig: drop "threads" and "test" USE flags for 9999Eric Joldasov
See commit f28480799d348da161f8d121df2fb99c73250ab3. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/28177 Signed-off-by: Sam James <sam@gentoo.org>
2022-11-07dev-lang/zig: style tweaksSam James
Have all functions be together. Signed-off-by: Sam James <sam@gentoo.org>
2022-11-07dev-lang/zig: add 0.10.0Eric Joldasov
Drop "threads" USE flag, since this is default and well-tested configuration by upstream. Drop "test" USE flag, since it doesn't require special dependencies (or preparations) necessary to run tests. Bug: https://bugs.gentoo.org/876181 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Sam James <sam@gentoo.org>
2022-10-30dev-lang/zig: requires zstd support in LLVMEric Joldasov
Starting with https://github.com/ziglang/zig/commit/d42a719e8f7ba31a9e18d6be9d58691b0b38c69a Zig requires zstd compression support. Zig requires zstd and zlib compression support in LLVM, if using LLVM backend (non-LLVM backends don't require these). They are not required "on their own", so please don't add them to dependencies. You can check https://github.com/ziglang/zig-bootstrap in future, to see options that are passed to LLVM CMake building (excluding "static" ofc). Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/27964 Signed-off-by: Sam James <sam@gentoo.org>
2022-10-21dev-lang/zig: use standard CMake procedure for building/installingEric Joldasov
Upstream PR https://github.com/ziglang/zig/pull/13036 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/27849 Signed-off-by: Sam James <sam@gentoo.org>
2022-10-15dev-lang/zig: fix MissingSlotDep on LLDSam James
LLD is slotted now. Signed-off-by: Sam James <sam@gentoo.org>
2022-09-19dev-lang/zig: update to LLVM 15 for 9999Eric Joldasov
Closes: https://bugs.gentoo.org/871462 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/27221 Signed-off-by: Sam James <sam@gentoo.org>
2022-09-19dev-lang/zig: drop unnecessary patch for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Sam James <sam@gentoo.org>
2022-09-05dev-lang/zig: always install self-hosted compiler, workaround upstream cmake ↵Eric Joldasov
bugs Closes: https://bugs.gentoo.org/867592 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/27112 Signed-off-by: Sam James <sam@gentoo.org>
2022-08-22dev-lang/zig: block dev-lang/zig-bin and some fixes for 9999Eric Joldasov
cmake_src_install already installs lib/, so we should skip this in stage2 -DZIG_PREFER_CLANG_CPP_DYLIB has been renamed to -DZIG_SHARED_LLVM, see https://github.com/ziglang/zig/pull/12136 Closes: https://bugs.gentoo.org/864247 Closes: https://github.com/gentoo/gentoo/pull/26779 Co-authored-by: Rahim Usubov <the.guard@mail.ru> Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>