Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2022 08:24:00 GMT
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fc9d9b0c38a1 - main - graphics/qt5-wayland: use memfd_create() on 13+
Message-ID:  <202208180824.27I8O0hx057107@gitrepo.freebsd.org>

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

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

commit fc9d9b0c38a1296a7d6cc7675412128a224659ae
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2022-08-17 23:43:24 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2022-08-18 08:23:58 +0000

    graphics/qt5-wayland: use memfd_create() on 13+
    
    On 13+, the memfd_create() syscall can create anonymous shared-
    memory areas that behaves like a file. This is used upstream
    (not in Qt, but in KDE) when possible. Use it when relevant,
    since it avoids creating temporary files.
    
    While here, freshen-up the other patches.
    
    PR:             259035
---
 graphics/qt5-wayland/Makefile                                 |  1 +
 graphics/qt5-wayland/files/patch-qtwayland.pro                |  4 ++--
 .../files/patch-src_client_qwaylandshmbackingstore.cpp        | 11 +++++++++++
 ...egration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h |  4 ++--
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/graphics/qt5-wayland/Makefile b/graphics/qt5-wayland/Makefile
index 3159908f0b67..93ffcacbfa27 100644
--- a/graphics/qt5-wayland/Makefile
+++ b/graphics/qt5-wayland/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	wayland
 PORTVERSION=	${QT5_VERSION}${QT5_KDE_PATCH}
+PORTREVISION=	1
 CATEGORIES=	graphics wayland
 PKGNAMEPREFIX=	qt5-
 
diff --git a/graphics/qt5-wayland/files/patch-qtwayland.pro b/graphics/qt5-wayland/files/patch-qtwayland.pro
index e321fa2fd586..01c983412049 100644
--- a/graphics/qt5-wayland/files/patch-qtwayland.pro
+++ b/graphics/qt5-wayland/files/patch-qtwayland.pro
@@ -1,7 +1,7 @@
---- qtwayland.pro.orig  2017-06-23 10:50:50 UTC
+--- qtwayland.pro.orig	2022-06-20 20:17:21 UTC
 +++ qtwayland.pro
 @@ -1,3 +1,4 @@
--requires(linux:!android)
+-requires(linux:!android|macos|qnx)
 +requires(!android)
 +requires(linux|freebsd)
  requires(qtHaveModule(gui))
diff --git a/graphics/qt5-wayland/files/patch-src_client_qwaylandshmbackingstore.cpp b/graphics/qt5-wayland/files/patch-src_client_qwaylandshmbackingstore.cpp
new file mode 100644
index 000000000000..2980795536e9
--- /dev/null
+++ b/graphics/qt5-wayland/files/patch-src_client_qwaylandshmbackingstore.cpp
@@ -0,0 +1,11 @@
+--- src/client/qwaylandshmbackingstore.cpp.orig	2022-06-20 20:17:21 UTC
++++ src/client/qwaylandshmbackingstore.cpp
+@@ -76,6 +76,8 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *
+ 
+ #ifdef SYS_memfd_create
+     fd = syscall(SYS_memfd_create, "wayland-shm", MFD_CLOEXEC);
++#elif defined(__FreeBSD__) && __FreeBSD_version >= 1300048
++    fd = memfd_create("wayland-shm", MFD_CLOEXEC);
+ #endif
+ 
+     QScopedPointer<QFile> filePointer;
diff --git a/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h b/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h
index eae8123a0da4..a33cb765c388 100644
--- a/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h
+++ b/graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h
@@ -1,6 +1,6 @@
---- src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h.orig	2020-10-27 08:02:11 UTC
+--- src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h.orig	2022-06-20 20:17:21 UTC
 +++ src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.h
-@@ -44,6 +44,8 @@
+@@ -46,6 +46,8 @@
  #include <EGL/egl.h>
  #include <EGL/eglext.h>
  



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