git: 7a3215f73258 - main - x11-wm/picom: fix compilation on 32-bit systems

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Fri, 04 Oct 2024 21:03:34 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7a3215f732589cafae2c92735de60c7c98aace68

commit 7a3215f732589cafae2c92735de60c7c98aace68
Author:     José Maldonado <yukiteruamano@volfread.xyz>
AuthorDate: 2024-10-04 21:02:12 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2024-10-04 21:02:12 +0000

    x11-wm/picom: fix compilation on 32-bit systems
    
    - Bump PORTREVISION
    
    PR:             281830
    Reported by:    maintainer
---
 x11-wm/picom/Makefile                            |  1 +
 x11-wm/picom/files/patch-src_transition_script.h | 12 ++++++++++++
 x11-wm/picom/files/patch-src_vblank.c            | 12 ++++++++++++
 x11-wm/picom/files/patch-src_wm_wm.h             | 12 ++++++++++++
 4 files changed, 37 insertions(+)

diff --git a/x11-wm/picom/Makefile b/x11-wm/picom/Makefile
index 7fb80301e60f..ddea986b420c 100644
--- a/x11-wm/picom/Makefile
+++ b/x11-wm/picom/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	picom
 DISTVERSIONPREFIX=	v
 DISTVERSION=	12.1
+PORTREVISION=	1
 CATEGORIES=	x11-wm
 
 MAINTAINER=	yukiteruamano@volfread.xyz
diff --git a/x11-wm/picom/files/patch-src_transition_script.h b/x11-wm/picom/files/patch-src_transition_script.h
new file mode 100644
index 000000000000..0c74aa74a935
--- /dev/null
+++ b/x11-wm/picom/files/patch-src_transition_script.h
@@ -0,0 +1,12 @@
+# Official fixes for 32-bit compilation
+--- src/transition/script.h.orig	2024-09-28 23:22:13 UTC
++++ src/transition/script.h
+@@ -45,8 +45,6 @@ typedef struct config_setting_t config_setting_t;
+ 	SCRIPT_EVAL_OK,
+ };
+ typedef struct config_setting_t config_setting_t;
+-static_assert(alignof(double) > alignof(unsigned), "double/unsigned has unexpected "
+-                                                   "alignment");
+ 
+ #define SCRIPT_CTX_PLACEHOLDER_BASE (0x40000000)
+ 
diff --git a/x11-wm/picom/files/patch-src_vblank.c b/x11-wm/picom/files/patch-src_vblank.c
new file mode 100644
index 000000000000..b6f42d3023ef
--- /dev/null
+++ b/x11-wm/picom/files/patch-src_vblank.c
@@ -0,0 +1,12 @@
+# Official fixes for 32-bit compilation
+--- src/vblank.c.orig	2024-09-28 23:22:13 UTC
++++ src/vblank.c
+@@ -409,7 +409,7 @@ static void handle_present_complete_notify(struct pres
+ 
+ 	struct timespec now;
+ 	clock_gettime(CLOCK_MONOTONIC, &now);
+-	auto now_us = (unsigned long)(now.tv_sec * 1000000L + now.tv_nsec / 1000);
++	auto now_us = (uint64_t)now.tv_sec * 1000000UL + (uint64_t)now.tv_nsec / 1000;
+ 
+ 	// X sometimes sends duplicate/bogus MSC events, when screen has just been turned
+ 	// off. Don't use the msc value in these events. We treat this as not receiving a
diff --git a/x11-wm/picom/files/patch-src_wm_wm.h b/x11-wm/picom/files/patch-src_wm_wm.h
new file mode 100644
index 000000000000..7e84979d2cb8
--- /dev/null
+++ b/x11-wm/picom/files/patch-src_wm_wm.h
@@ -0,0 +1,12 @@
+# Official fixes for 32-bit compilation
+--- src/wm/wm.h.orig	2024-09-28 23:22:13 UTC
++++ src/wm/wm.h
+@@ -63,7 +63,7 @@ typedef struct wm_treeid {
+ typedef struct wm_treeid {
+ 	/// The generation of the window ID. This is used to detect if the window ID is
+ 	/// reused. Inherited from the wm_tree at cr
+-	uint64_t gen;
++	alignas(8) uint64_t gen;
+ 	/// The X window ID.
+ 	xcb_window_t x;
+