diff options
author | Aliaksei Urbanski <aliaksei.urbanski@gmail.com> | 2024-06-28 03:33:32 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-08-07 04:15:20 +0100 |
commit | 2cd85ecfc76344ae70181a0e2aabd5534098202e (patch) | |
tree | 732921d114a04ea4221609cc227a106e7f50a270 /dev-lang/zig/files | |
parent | rust-toolchain.eclass: add powerpc*musl support (diff) | |
download | gentoo-2cd85ecfc76344ae70181a0e2aabd5534098202e.tar.gz gentoo-2cd85ecfc76344ae70181a0e2aabd5534098202e.tar.bz2 gentoo-2cd85ecfc76344ae70181a0e2aabd5534098202e.zip |
dev-lang/zig: add 0.13.0
Release:
- https://ziglang.org/download/0.13.0/release-notes.html
- https://github.com/ziglang/zig/releases/tag/0.13.0
Closes: https://bugs.gentoo.org/933854
Co-authored-by: Jean-Baptiste "Jiboo" Lepesme <lepesme.jb@gmail.com>
Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/zig/files')
-rw-r--r-- | dev-lang/zig/files/zig-0.13.0-test-fmt-no-doc.patch | 17 | ||||
-rw-r--r-- | dev-lang/zig/files/zig-0.13.0-test-std-kernel-version.patch | 28 |
2 files changed, 45 insertions, 0 deletions
diff --git a/dev-lang/zig/files/zig-0.13.0-test-fmt-no-doc.patch b/dev-lang/zig/files/zig-0.13.0-test-fmt-no-doc.patch new file mode 100644 index 000000000000..7bbda741dc6f --- /dev/null +++ b/dev-lang/zig/files/zig-0.13.0-test-fmt-no-doc.patch @@ -0,0 +1,17 @@ +# Docs contain examples of badly formatted code, +# so they should be excluded for test-fmt to pass. +# In the upstream, the "doc" directory +# was removed from fmt_include_paths in +# https://github.com/ziglang/zig/commit/cb1d1bdf + +--- a/build.zig ++++ b/build.zig +@@ -428,7 +428,7 @@ + } + const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index]; + +- const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" }; ++ const fmt_include_paths = &.{ "lib", "src", "test", "tools", "build.zig" }; + const fmt_exclude_paths = &.{"test/cases"}; + const do_fmt = b.addFmt(.{ + .paths = fmt_include_paths, diff --git a/dev-lang/zig/files/zig-0.13.0-test-std-kernel-version.patch b/dev-lang/zig/files/zig-0.13.0-test-std-kernel-version.patch new file mode 100644 index 000000000000..2d2dc22a375a --- /dev/null +++ b/dev-lang/zig/files/zig-0.13.0-test-std-kernel-version.patch @@ -0,0 +1,28 @@ +# https://github.com/ziglang/zig/pull/20001 +# https://github.com/Jiboo/zig/commit/856fe4af + +Author: Jean-Baptiste "Jiboo" Lepesme <lepesme.jb@gmail.com> +Date: Sun, 19 May 2024 15:02:42 +0200 + +IoUring: fix an issue in tests where InvalidVersion might get thrown by +skipKernelLessThan, due to some kernel versions not being SemVer compliant. + +diff --git a/lib/std/os/linux/IoUring.zig b/lib/std/os/linux/IoUring.zig +index 3bf3c077fc3b..b2a4da486907 100644 +--- a/lib/std/os/linux/IoUring.zig ++++ b/lib/std/os/linux/IoUring.zig +@@ -3883,7 +3883,13 @@ inline fn skipKernelLessThan(required: std.SemanticVersion) !void { + } + + const release = mem.sliceTo(&uts.release, 0); +- var current = try std.SemanticVersion.parse(release); ++ // Strips potential extra, as kernel version might not be semver compliant, example "6.8.9-300.fc40.x86_64" ++ const extra_index = std.mem.indexOfAny(u8, release, "-+"); ++ const stripped = release[0..(extra_index orelse release.len)]; ++ // Make sure the input don't rely on the extra we just stripped ++ try testing.expect(required.pre == null and required.build == null); ++ ++ var current = try std.SemanticVersion.parse(stripped); + current.pre = null; // don't check pre field + if (required.order(current) == .gt) return error.SkipZigTest; + } |