git: 3275bb193202 - 2025Q4 - www/{*chromium,iridium}: avoid flickering with wayland

From: Robert Nagy <rnagy_at_FreeBSD.org>
Date: Mon, 15 Dec 2025 07:51:22 UTC
The branch 2025Q4 has been updated by rnagy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3275bb193202356879110cebe6519d6d0b0d2428

commit 3275bb193202356879110cebe6519d6d0b0d2428
Author:     Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2025-12-15 07:49:19 +0000
Commit:     Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2025-12-15 07:51:12 +0000

    www/{*chromium,iridium}: avoid flickering with wayland
    
    do not rely on the linux kernel version strings (not really useful for us)
    for checking DMA_BUF_IOCTL_{IMPORT,EXPORT}_SYNC_FILE support
    
    PR:     291555
    (cherry picked from commit 2a77cdee4e544e9e43913d0cac4297d1bf813558)
---
 www/chromium/Makefile                                    |  1 +
 ...atform_wayland_host_wayland__buffer__manager__host.cc | 16 ++++++++++++++++
 www/iridium/Makefile                                     |  1 +
 ...atform_wayland_host_wayland__buffer__manager__host.cc | 16 ++++++++++++++++
 www/ungoogled-chromium/Makefile                          |  1 +
 ...atform_wayland_host_wayland__buffer__manager__host.cc | 16 ++++++++++++++++
 6 files changed, 51 insertions(+)

diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index 6a88962e3ad1..45123c9b0e34 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	chromium
 PORTVERSION=	143.0.7499.109
+PORTREVISION=	1
 PULSEMV=	16
 PULSEV=		${PULSEMV}.1
 CATEGORIES=	www wayland
diff --git a/www/chromium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc b/www/chromium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc
new file mode 100644
index 000000000000..8c6f1acc0387
--- /dev/null
+++ b/www/chromium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc
@@ -0,0 +1,16 @@
+--- ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc.orig	2025-12-15 07:48:20 UTC
++++ ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
+@@ -45,9 +45,13 @@ std::string NumberToString(uint32_t number) {
+ }
+ 
+ bool CheckImportExportFence() {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // DMA_BUF_IOCTL_{IMPORT,EXPORT}_SYNC_FILE was added in 6.0
+   return base::SysInfo::KernelVersionNumber::Current() >=
+          base::SysInfo::KernelVersionNumber(6, 0);
++#endif
+ }
+ 
+ }  // namespace
diff --git a/www/iridium/Makefile b/www/iridium/Makefile
index 1dce38bbb542..7f7e9528b2fd 100644
--- a/www/iridium/Makefile
+++ b/www/iridium/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	iridium
 PORTVERSION=	2025.12.143.1
+PORTREVISION=	1
 PULSEMV=	16
 PULSEV=		${PULSEMV}.1
 CATEGORIES=	www wayland
diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc
new file mode 100644
index 000000000000..8c6f1acc0387
--- /dev/null
+++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc
@@ -0,0 +1,16 @@
+--- ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc.orig	2025-12-15 07:48:20 UTC
++++ ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
+@@ -45,9 +45,13 @@ std::string NumberToString(uint32_t number) {
+ }
+ 
+ bool CheckImportExportFence() {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // DMA_BUF_IOCTL_{IMPORT,EXPORT}_SYNC_FILE was added in 6.0
+   return base::SysInfo::KernelVersionNumber::Current() >=
+          base::SysInfo::KernelVersionNumber(6, 0);
++#endif
+ }
+ 
+ }  // namespace
diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile
index 6ba9078b6ff7..684d0b46faa7 100644
--- a/www/ungoogled-chromium/Makefile
+++ b/www/ungoogled-chromium/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	ungoogled-chromium
 PORTVERSION=	143.0.7499.109
+PORTREVISION=	1
 PULSEMV=	16
 PULSEV=		${PULSEMV}.1
 UGVERSION=	${DISTVERSION}-1
diff --git a/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc b/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc
new file mode 100644
index 000000000000..8c6f1acc0387
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_wayland__buffer__manager__host.cc
@@ -0,0 +1,16 @@
+--- ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc.orig	2025-12-15 07:48:20 UTC
++++ ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
+@@ -45,9 +45,13 @@ std::string NumberToString(uint32_t number) {
+ }
+ 
+ bool CheckImportExportFence() {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // DMA_BUF_IOCTL_{IMPORT,EXPORT}_SYNC_FILE was added in 6.0
+   return base::SysInfo::KernelVersionNumber::Current() >=
+          base::SysInfo::KernelVersionNumber(6, 0);
++#endif
+ }
+ 
+ }  // namespace