View | Details | Raw Unified | Return to bug 281107
Collapse All | Expand All

(-)b/x11-toolkits/gtk40/Makefile (-1 / +4 lines)
Lines 1-5 Link Here
1
PORTNAME=	gtk
1
PORTNAME=	gtk
2
PORTVERSION=	4.14.4
2
PORTVERSION=	4.14.4
3
PORTREVISION=	1
3
CATEGORIES=	x11-toolkits
4
CATEGORIES=	x11-toolkits
4
MASTER_SITES=	GNOME
5
MASTER_SITES=	GNOME
5
PKGNAMESUFFIX=	4
6
PKGNAMESUFFIX=	4
Lines 13-19 LICENSE= LGPL20 Link Here
13
14
14
PORTSCOUT=	limit:1,even
15
PORTSCOUT=	limit:1,even
15
16
16
BUILD_DEPENDS=	sassc>0:textproc/sassc
17
# libdrm is only for its headers
18
BUILD_DEPENDS=	sassc>0:textproc/sassc \
19
		libdrm>0:graphics/libdrm
17
LIB_DEPENDS=	libepoxy.so:graphics/libepoxy \
20
LIB_DEPENDS=	libepoxy.so:graphics/libepoxy \
18
		libpng.so:graphics/png \
21
		libpng.so:graphics/png \
19
		libtiff.so:graphics/tiff \
22
		libtiff.so:graphics/tiff \
(-)b/x11-toolkits/gtk40/files/patch-dma-buf-compat.h (+25 lines)
Added Link Here
1
--- dma-buf-compat.h.orig	2024-08-27 18:15:44 UTC
2
+++ dma-buf-compat.h
3
@@ -0,0 +1,22 @@
4
+#ifdef __linux__
5
+#include <linux/dma-buf.h>
6
+#else
7
+typedef uint64_t __u64;
8
+
9
+// From https://github.com/evadot/drm-subtree or https://reviews.freebsd.org/D23085
10
+struct dma_buf_sync
11
+{
12
+  __u64 flags;
13
+};
14
+
15
+#define DMA_BUF_SYNC_READ  (1 << 0)
16
+#define DMA_BUF_SYNC_WRITE (2 << 0)
17
+#define DMA_BUF_SYNC_RW    (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
18
+#define DMA_BUF_SYNC_START (0 << 2)
19
+#define DMA_BUF_SYNC_END   (1 << 2)
20
+#define DMA_BUF_SYNC_VALID_FLAGS_MASK \
21
+    (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END)
22
+
23
+#define DMA_BUF_BASE       'b'
24
+#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
25
+#endif
(-)b/x11-toolkits/gtk40/files/patch-gdk_gdkdmabuf.c (+12 lines)
Added Link Here
1
--- gdk/gdkdmabuf.c.orig	2024-08-27 18:17:03 UTC
2
+++ gdk/gdkdmabuf.c
3
@@ -28,8 +28,8 @@
4
 #ifdef HAVE_DMABUF
5
 #include <sys/mman.h>
6
 #include <sys/ioctl.h>
7
-#include <linux/dma-buf.h>
8
 #include <epoxy/egl.h>
9
+#include "../dma-buf-compat.h"
10
 
11
 typedef struct _GdkDrmFormatInfo GdkDrmFormatInfo;
12
 
(-)b/x11-toolkits/gtk40/files/patch-gsk_gpu_gskgpudownloadop.c (+11 lines)
Added Link Here
1
--- gsk/gpu/gskgpudownloadop.c.orig	2024-08-27 18:18:39 UTC
2
+++ gsk/gpu/gskgpudownloadop.c
3
@@ -16,7 +16,7 @@
4
 #include "gdk/gdkglcontextprivate.h"
5
 
6
 #ifdef HAVE_DMABUF
7
-#include <linux/dma-buf.h>
8
+#include "../../dma-buf-compat.h"
9
 #endif
10
 
11
 typedef struct _GskGpuDownloadOp GskGpuDownloadOp;
(-)b/x11-toolkits/gtk40/files/patch-gsk_gpu_gskvulkanimage.c (+11 lines)
Added Link Here
1
--- gsk/gpu/gskvulkanimage.c.orig	2024-08-27 18:18:26 UTC
2
+++ gsk/gpu/gskvulkanimage.c
3
@@ -15,7 +15,7 @@
4
 #include <fcntl.h>
5
 #include <string.h>
6
 #ifdef HAVE_DMABUF
7
-#include <linux/dma-buf.h>
8
+#include <../../dma-buf-compat.h>
9
 #endif
10
 
11
 struct _GskVulkanImage
(-)b/x11-toolkits/gtk40/files/patch-meson.build (-1 / +11 lines)
Added Link Here
0
- 
1
--- meson.build.orig	2024-08-27 18:19:59 UTC
2
+++ meson.build
3
@@ -636,7 +636,7 @@ cdata.set('HAVE_DRM_FOURCC_H', libdrm_dep.found())
4
 libdrm_dep = libdrm_dep.partial_dependency(includes: true, compile_args: true)
5
 cdata.set('HAVE_DRM_FOURCC_H', libdrm_dep.found())
6
 
7
-cdata.set('HAVE_DMABUF', cc.has_header('linux/dma-buf.h'))
8
+cdata.set('HAVE_DMABUF', true)
9
 
10
 cloudproviders_dep = dependency('cloudproviders',
11
   required: get_option('cloudproviders'),

Return to bug 281107