Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jan 2023 09:49:26 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3c669015beec - main - lang/zig: unbreak Sigaction.handler_fn on aarch64
Message-ID:  <202301180949.30I9nQTN067971@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3c669015beec34e40194d872d8898351af18f3e8

commit 3c669015beec34e40194d872d8898351af18f3e8
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-01-18 09:21:21 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-01-18 09:48:57 +0000

    lang/zig: unbreak Sigaction.handler_fn on aarch64
    
    $ cat test.zig
    const std = @import("std");
    const os = std.os;
    
    pub fn main() anyerror!void {
        // From https://github.com/riverwm/river/blob/v0.2.2/river/main.zig#L97-L104
        const sig_ign = os.Sigaction{
            .handler = .{ .handler = os.SIG.IGN },
            .mask = os.empty_sigset,
            .flags = 0,
        };
        try os.sigaction(os.SIG.PIPE, &sig_ign, null);
    }
    
    $ zig build-exe -target aarch64-freebsd test.zig
    /usr/local/lib/zig/std/c/freebsd.zig:702:54: error: pointer type '?*const fn(c_int) callconv(.C) void' requires aligned address
        pub const IGN = @intToPtr(?Sigaction.handler_fn, 1);
                                                         ^
    referenced by:
        main: test.zig:7:40
        comptime_0: /usr/local/lib/zig/std/start.zig:59:50
        remaining reference traces hidden; use '-freference-trace' to see all reference traces
    
    Reported by:    pkg-fallout (x11-wm/river)
    Inspired by:    Alpine Linux
---
 lang/zig/Makefile | 7 ++++++-
 lang/zig/distinfo | 6 ++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/lang/zig/Makefile b/lang/zig/Makefile
index 7d9109fd1b52..7c5c7232cb09 100644
--- a/lang/zig/Makefile
+++ b/lang/zig/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	zig
 DISTVERSION=	0.10.0
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	lang
 MASTER_SITES=	https://ziglang.org/download/${DISTVERSION}/ \
 		https://ziglang.org/builds/
@@ -8,6 +8,11 @@ MASTER_SITES=	https://ziglang.org/download/${DISTVERSION}/ \
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
 		zig-freebsd-x86_64-${DISTVERSION}${EXTRACT_SUFX}
 
+PATCH_SITES=	https://github.com/ziglang/${PORTNAME}/commit/
+PATCHFILES+=	64b3ffd8ffb9.patch:-p1 # https://github.com/ziglang/zig/pull/13418
+PATCHFILES+=	7f1f2e653d6f.patch:-p1 # https://github.com/ziglang/zig/pull/13418
+PATCHFILES+=	a68b27c25266.patch:-p1 # https://github.com/ziglang/zig/pull/13418
+
 MAINTAINER=	dch@FreeBSD.org
 COMMENT=	Language designed for robustness, optimality, and maintainability
 WWW=		https://ziglang.org/
diff --git a/lang/zig/distinfo b/lang/zig/distinfo
index 94e44d577f59..54b0ddd17f9a 100644
--- a/lang/zig/distinfo
+++ b/lang/zig/distinfo
@@ -3,3 +3,9 @@ SHA256 (zig-0.10.0.tar.xz) = d8409f7aafc624770dcd050c8fa7e62578be8e6a10956bca3c8
 SIZE (zig-0.10.0.tar.xz) = 14530912
 SHA256 (zig-freebsd-x86_64-0.10.0.tar.xz) = dd77afa2a8676afbf39f7d6068eda81b0723afd728642adaac43cb2106253d65
 SIZE (zig-freebsd-x86_64-0.10.0.tar.xz) = 44056504
+SHA256 (64b3ffd8ffb9.patch) = 82fc22bbd76e5668302d3b207770ecabb225a3faa9f121bc67203532710cdf04
+SIZE (64b3ffd8ffb9.patch) = 2260
+SHA256 (7f1f2e653d6f.patch) = bdfc8a0d7d205a14b10e004d50f6773fc4ff1c89e92936cdd5ef84791036e8e7
+SIZE (7f1f2e653d6f.patch) = 5870
+SHA256 (a68b27c25266.patch) = 0c278d33f6cfeaca0bf9229d4cf8fc43846c0f1d9cb07740f14a6fa35ed24f29
+SIZE (a68b27c25266.patch) = 3387



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301180949.30I9nQTN067971>