Antoine Jacoutot <[email protected]> writes:
> On Mon, 2025-09-08 at 18:06 -0600, Brandon Mercer wrote:
>> CVSROOT: /cvs
>> Module name: ports
>> Changes by: [email protected] 2025/09/08 18:06:16
>>
>> Modified files:
>> lang/zig : Makefile distinfo
>> lang/zig/pkg : PLIST
>> Added files:
>> lang/zig/patches: patch-lib_std_c_zig patch-src_link_Lld_zig
>> Removed files:
>> lang/zig/patches: patch-src_link_Elf_zig
>>
>> Log message:
>> Update zig to version 0.15.1. Take maintainership at semarie@ request and
>> also OK semarie@
>
> Hi.
>
> This did not build for me.
>
> FAILED: stage3/bin/zig /exopi-obj/pobj/zig-0.15.1/build-amd64/stage3/bin/zig
> cd /exopi-obj/pobj/zig-0.15.1/zig-3db960767d12b6214bcf43f1966a037c7a586a12 &&
> /exopi-obj/pobj/zig-0.15.1/build-
> amd64/zig2 build --prefix /exopi-obj/pobj/zig-0.15.1/build-amd64/stage3
> --zig-lib-dir /exopi-obj/pobj/zig-0.15.1/zig-
> 3db960767d
> 12b6214bcf43f1966a037c7a586a12/lib -Dversion-string=0.15.1+3db960767
> -Dtarget=native -Dcpu=baseline -Denable-llvm -
> Dconfig_h=/exopi-obj/pobj/zig-0.15.1/build-amd64/config.h -Dno-langref
> -Doptimize=ReleaseFast -Dstrip
> lib/std/net.zig:2296:40: error: type 'void' has no members
> const flags = posix.MSG.NOSIGNAL;
> ~~~~~~~~~^~~~~~~~~
The commited patch file patches/patch-lib_std_c_zig is wrong. It isn't
patching lib/std/c.zig file, but it is creating a
b/lang/zig/patches/patch-lib_std_c_zig file in WRKSRC :)
the following diff should fixes that.
--
Sebastien Marie
diff --git a/lang/zig/patches/patch-lib_std_c_zig
b/lang/zig/patches/patch-lib_std_c_zig
index 7ccccbcb7d..f53a97a413 100644
--- a/lang/zig/patches/patch-lib_std_c_zig
+++ b/lang/zig/patches/patch-lib_std_c_zig
@@ -1,31 +1,26 @@
-new file mode 100644
-index 000000000..3fb69a629
---- /dev/null
-+++ b/lang/zig/patches/patch-lib_std_c_zig
-@@ -0,0 +1,26 @@
-+Index: lib/std/c.zig
-+--- lib/std/c.zig.orig
-++++ lib/std/c.zig
-+@@ -5685,6 +5685,22 @@ pub const MSG = switch (native_os) {
-+ pub const WAITFORONE = 0x2000;
-+ pub const NOTIFICATION = 0x4000;
-+ },
-++ .openbsd => struct {
-++ pub const OOB = 0x1;
-++ pub const PEEK = 0x2;
-++ pub const DONTROUTE = 0x4;
-++ pub const EOR = 0x8;
-++ pub const TRUNC = 0x10;
-++ pub const CTRUNC = 0x20;
-++ pub const WAITALL = 0x40;
-++ pub const DONTWAIT = 0x80;
-++ pub const BCAST = 0x100;
-++ pub const MCAST = 0x200;
-++ pub const NOSIGNAL = 0x400;
-++ pub const CMSG_CLOEXEC = 0x800;
-++ pub const WAITFORONE = 0x1000;
-++ pub const CMSG_CLOFORK = 0x2000;
-++ },
-+ else => void,
-+ };
-+ pub const SOCK = switch (native_os) {
+Index: lib/std/c.zig
+--- lib/std/c.zig.orig
++++ lib/std/c.zig
+@@ -5685,6 +5685,22 @@ pub const MSG = switch (native_os) {
+ pub const WAITFORONE = 0x2000;
+ pub const NOTIFICATION = 0x4000;
+ },
++ .openbsd => struct {
++ pub const OOB = 0x1;
++ pub const PEEK = 0x2;
++ pub const DONTROUTE = 0x4;
++ pub const EOR = 0x8;
++ pub const TRUNC = 0x10;
++ pub const CTRUNC = 0x20;
++ pub const WAITALL = 0x40;
++ pub const DONTWAIT = 0x80;
++ pub const BCAST = 0x100;
++ pub const MCAST = 0x200;
++ pub const NOSIGNAL = 0x400;
++ pub const CMSG_CLOEXEC = 0x800;
++ pub const WAITFORONE = 0x1000;
++ pub const CMSG_CLOFORK = 0x2000;
++ },
+ else => void,
+ };
+ pub const SOCK = switch (native_os) {