aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2022-08-17 23:43:24 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2022-08-18 08:23:58 +0000
commitfc9d9b0c38a1296a7d6cc7675412128a224659ae (patch)
tree27a94435ccfab4122cde45f09099ade5e626f828
parentc5ff9a301c343f237caf5db2889cd9a58050c5eb (diff)
downloadports-fc9d9b0c38a1296a7d6cc7675412128a224659ae.tar.gz
ports-fc9d9b0c38a1296a7d6cc7675412128a224659ae.zip
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
-rw-r--r--graphics/qt5-wayland/Makefile1
-rw-r--r--graphics/qt5-wayland/files/patch-qtwayland.pro4
-rw-r--r--graphics/qt5-wayland/files/patch-src_client_qwaylandshmbackingstore.cpp11
-rw-r--r--graphics/qt5-wayland/files/patch-src_hardwareintegration_compositor_linux-dmabuf-unstable-v1_linuxdmabuf.h4
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>