View | Details | Raw Unified | Return to bug 258042 | Differences between
and this patch

Collapse All | Expand All

(-)b/x11-wm/mutter/Makefile (-2 / +11 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	mutter
3
PORTNAME=	mutter
4
PORTVERSION=	3.36.6
4
PORTVERSION=	3.36.6
5
PORTREVISION=	1
5
PORTREVISION=	2
6
CATEGORIES=	x11-wm
6
CATEGORIES=	x11-wm
7
MASTER_SITES=	GNOME
7
MASTER_SITES=	GNOME
8
DIST_SUBDIR=	gnome
8
DIST_SUBDIR=	gnome
Lines 49-55 CFLAGS+= -Wno-unknown-warning-option \ Link Here
49
		-Wno-format-nonliteral
49
		-Wno-format-nonliteral
50
CPPFLAGS+=	-fno-omit-frame-pointer
50
CPPFLAGS+=	-fno-omit-frame-pointer
51
MESON_ARGS=	-Dlibwacom=false \
51
MESON_ARGS=	-Dlibwacom=false \
52
		-Dwayland=false \
53
		-Dudev=false \
52
		-Dudev=false \
54
		-Dnative_backend=false \
53
		-Dnative_backend=false \
55
		-Dprofiler=false \
54
		-Dprofiler=false \
Lines 66-69 MESON_ARGS+= -Dremote_desktop=false Link Here
66
GLIB_SCHEMAS=	org.gnome.mutter.gschema.xml \
65
GLIB_SCHEMAS=	org.gnome.mutter.gschema.xml \
67
		org.gnome.mutter.wayland.gschema.xml
66
		org.gnome.mutter.wayland.gschema.xml
68
67
68
OPTIONS_DEFINE=	WAYLAND
69
OPTIONS_DEFAULT=WAYLAND
70
OPTIONS_SUB=	yes
71
72
WAYLAND_BUILD_DEPENDS=	xwayland-devel>0:x11-servers/xwayland-devel
73
WAYLAND_LIB_DEPENDS=	libwayland-server.so:graphics/wayland
74
WAYLAND_RUN_DEPENDS=	xwayland-devel>0:x11-servers/xwayland-devel
75
WAYLAND_USE=		XORG=xau
76
WAYLAND_MESON_TRUE=	wayland
77
69
.include <bsd.port.mk>
78
.include <bsd.port.mk>
(-)b/x11-wm/mutter/files/patch-meson.build (-2 / +10 lines)
Lines 1-6 Link Here
1
--- meson.build.orig	2020-09-28 15:41:47 UTC
1
--- meson.build.orig	2020-09-07 19:18:23 UTC
2
+++ meson.build
2
+++ meson.build
3
@@ -320,22 +320,6 @@ if buildtype != 'plain'
3
@@ -167,6 +167,7 @@ endif
4
 
5
 have_wayland = get_option('wayland')
6
 if have_wayland
7
+  libdrm_dep = dependency('libdrm')
8
   wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
9
   wayland_client_dep = dependency('wayland-client', version: wayland_server_req)
10
   wayland_protocols_dep = dependency('wayland-protocols',
11
@@ -320,22 +321,6 @@ if buildtype != 'plain'
4
     '-Wmissing-include-dirs',
12
     '-Wmissing-include-dirs',
5
     '-Wlogical-op',
13
     '-Wlogical-op',
6
     '-Wignored-qualifiers',
14
     '-Wignored-qualifiers',
(-)b/x11-wm/mutter/files/patch-no-abstract (+153 lines)
Added Link Here
1
https://gitlab.gnome.org/GNOME/mutter/-/commit/e2123768f635
2
3
mutter-WARNING **: failed to bind to @/tmp/.X11-unix/X0: No such file or directory
4
5
--- src/wayland/meta-wayland-private.h.orig	2020-09-07 19:18:23 UTC
6
+++ src/wayland/meta-wayland-private.h
7
@@ -46,7 +46,6 @@ typedef struct
8
 {
9
   int display_index;
10
   char *lock_file;
11
-  int abstract_fd;
12
   int unix_fd;
13
   char *name;
14
 } MetaXWaylandConnection;
15
--- src/wayland/meta-xwayland.c.orig	2020-09-07 19:18:23 UTC
16
+++ src/wayland/meta-xwayland.c
17
@@ -236,46 +236,6 @@ create_lock_file (int display, int *display_out)
18
 }
19
 
20
 static int
21
-bind_to_abstract_socket (int       display,
22
-                         gboolean *fatal)
23
-{
24
-  struct sockaddr_un addr;
25
-  socklen_t size, name_size;
26
-  int fd;
27
-
28
-  fd = socket (PF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0);
29
-  if (fd < 0)
30
-    {
31
-      *fatal = TRUE;
32
-      g_warning ("Failed to create socket: %m");
33
-      return -1;
34
-    }
35
-
36
-  addr.sun_family = AF_LOCAL;
37
-  name_size = snprintf (addr.sun_path, sizeof addr.sun_path,
38
-                        "%c/tmp/.X11-unix/X%d", 0, display);
39
-  size = offsetof (struct sockaddr_un, sun_path) + name_size;
40
-  if (bind (fd, (struct sockaddr *) &addr, size) < 0)
41
-    {
42
-      *fatal = errno != EADDRINUSE;
43
-      g_warning ("failed to bind to @%s: %m", addr.sun_path + 1);
44
-      close (fd);
45
-      return -1;
46
-    }
47
-
48
-  if (listen (fd, 1) < 0)
49
-    {
50
-      *fatal = errno != EADDRINUSE;
51
-      g_warning ("Failed to listen on abstract socket @%s: %m",
52
-                 addr.sun_path + 1);
53
-      close (fd);
54
-      return -1;
55
-    }
56
-
57
-  return fd;
58
-}
59
-
60
-static int
61
 bind_to_unix_socket (int display)
62
 {
63
   struct sockaddr_un addr;
64
@@ -381,26 +341,18 @@ meta_xwayland_override_display_number (int number)
65
 static gboolean
66
 open_display_sockets (MetaXWaylandManager *manager,
67
                       int                  display_index,
68
-                      int                 *abstract_fd_out,
69
                       int                 *unix_fd_out,
70
                       gboolean            *fatal)
71
 {
72
-  int abstract_fd, unix_fd;
73
+  int unix_fd;
74
 
75
-  abstract_fd = bind_to_abstract_socket (display_index,
76
-                                         fatal);
77
-  if (abstract_fd < 0)
78
-    return FALSE;
79
-
80
   unix_fd = bind_to_unix_socket (display_index);
81
   if (unix_fd < 0)
82
     {
83
       *fatal = FALSE;
84
-      close (abstract_fd);
85
       return FALSE;
86
     }
87
 
88
-  *abstract_fd_out = abstract_fd;
89
   *unix_fd_out = unix_fd;
90
 
91
   return TRUE;
92
@@ -429,7 +381,6 @@ choose_xdisplay (MetaXWaylandManager    *manager,
93
         }
94
 
95
       if (!open_display_sockets (manager, display,
96
-                                 &connection->abstract_fd,
97
                                  &connection->unix_fd,
98
                                  &fatal))
99
         {
100
@@ -617,10 +568,9 @@ meta_xwayland_start_xserver (MetaXWaylandManager *mana
101
   launcher = g_subprocess_launcher_new (flags);
102
 
103
   g_subprocess_launcher_take_fd (launcher, xwayland_client_fd[1], 3);
104
-  g_subprocess_launcher_take_fd (launcher, manager->public_connection.abstract_fd, 4);
105
-  g_subprocess_launcher_take_fd (launcher, manager->public_connection.unix_fd, 5);
106
-  g_subprocess_launcher_take_fd (launcher, displayfd[1], 6);
107
-  g_subprocess_launcher_take_fd (launcher, manager->private_connection.abstract_fd, 7);
108
+  g_subprocess_launcher_take_fd (launcher, manager->public_connection.unix_fd, 4);
109
+  g_subprocess_launcher_take_fd (launcher, displayfd[1], 5);
110
+  g_subprocess_launcher_take_fd (launcher, manager->private_connection.unix_fd, 6);
111
 
112
   g_subprocess_launcher_setenv (launcher, "WAYLAND_SOCKET", "3", TRUE);
113
 
114
@@ -633,12 +583,11 @@ meta_xwayland_start_xserver (MetaXWaylandManager *mana
115
                                                "-core",
116
                                                "-auth", manager->auth_file,
117
                                                "-listen", "4",
118
-                                               "-listen", "5",
119
-                                               "-displayfd", "6",
120
+                                               "-displayfd", "5",
121
 #ifdef HAVE_XWAYLAND_INITFD
122
-                                               "-initfd", "7",
123
+                                               "-initfd", "6",
124
 #else
125
-                                               "-listen", "7",
126
+                                               "-listen", "6",
127
 #endif
128
                                                NULL);
129
 
130
@@ -756,14 +705,12 @@ meta_xwayland_init (MetaXWaylandManager *manager,
131
     {
132
       if (!open_display_sockets (manager,
133
                                  manager->public_connection.display_index,
134
-                                 &manager->public_connection.abstract_fd,
135
                                  &manager->public_connection.unix_fd,
136
                                  &fatal))
137
         return FALSE;
138
 
139
       if (!open_display_sockets (manager,
140
                                  manager->private_connection.display_index,
141
-                                 &manager->private_connection.abstract_fd,
142
                                  &manager->private_connection.unix_fd,
143
                                  &fatal))
144
         return FALSE;
145
@@ -774,7 +721,7 @@ meta_xwayland_init (MetaXWaylandManager *manager,
146
 
147
   if (policy == META_DISPLAY_POLICY_ON_DEMAND)
148
     {
149
-      g_unix_fd_add (manager->public_connection.abstract_fd, G_IO_IN,
150
+      g_unix_fd_add (manager->public_connection.unix_fd, G_IO_IN,
151
                      xdisplay_connection_activity_cb, manager);
152
     }
153
 
(-)a/x11-wm/mutter/files/patch-src_backends_meta-egl.c (-81 lines)
Removed Link Here
1
$OpenBSD: patch-src_backends_meta-egl_c,v 1.2 2018/04/26 09:19:27 jasper Exp $
2
3
Revert non-portable portion of:
4
From b7b5fb293d1de3af9e533f2063749fde7a790945 Mon Sep 17 00:00:00 2001
5
From: Daniel Stone <daniels@collabora.com>
6
Date: Tue, 11 Jul 2017 16:03:26 +0100
7
Subject: [PATCH] wayland: Add zwp_linux_dmabuf_v1 support
8
9
Index: src/backends/meta-egl.c
10
--- src/backends/meta-egl.c.orig	2020-09-07 19:18:23 UTC
11
+++ src/backends/meta-egl.c
12
@@ -69,8 +69,6 @@ struct _MetaEgl
13
   PFNEGLSTREAMCONSUMERACQUIREKHRPROC eglStreamConsumerAcquireKHR;
14
   PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC eglStreamConsumerAcquireAttribNV;
15
 
16
-  PFNEGLQUERYDMABUFFORMATSEXTPROC eglQueryDmaBufFormatsEXT;
17
-  PFNEGLQUERYDMABUFMODIFIERSEXTPROC eglQueryDmaBufModifiersEXT;
18
 };
19
 
20
 G_DEFINE_TYPE (MetaEgl, meta_egl, G_TYPE_OBJECT)
21
@@ -1019,51 +1017,6 @@ meta_egl_stream_consumer_acquire (MetaEgl     *egl,
22
   return TRUE;
23
 }
24
 
25
-gboolean
26
-meta_egl_query_dma_buf_formats (MetaEgl   *egl,
27
-                                EGLDisplay display,
28
-                                EGLint     max_formats,
29
-                                EGLint    *formats,
30
-                                EGLint    *num_formats,
31
-                                GError   **error)
32
-{
33
-  if (!is_egl_proc_valid (egl->eglQueryDmaBufFormatsEXT, error))
34
-    return FALSE;
35
-
36
-  if (!egl->eglQueryDmaBufFormatsEXT (display, max_formats, formats,
37
-                                      num_formats))
38
-    {
39
-      set_egl_error (error);
40
-      return FALSE;
41
-    }
42
-
43
-    return TRUE;
44
-}
45
-
46
-gboolean
47
-meta_egl_query_dma_buf_modifiers (MetaEgl      *egl,
48
-                                  EGLDisplay    display,
49
-                                  EGLint        format,
50
-                                  EGLint        max_modifiers,
51
-                                  EGLuint64KHR *modifiers,
52
-                                  EGLBoolean   *external_only,
53
-                                  EGLint       *num_modifiers,
54
-                                  GError      **error)
55
-{
56
-  if (!is_egl_proc_valid (egl->eglQueryDmaBufModifiersEXT, error))
57
-    return FALSE;
58
-
59
-  if (!egl->eglQueryDmaBufModifiersEXT (display, format, max_modifiers,
60
-                                        modifiers, external_only,
61
-                                        num_modifiers))
62
-    {
63
-      set_egl_error (error);
64
-      return FALSE;
65
-    }
66
-
67
-    return TRUE;
68
-}
69
-
70
 #define GET_EGL_PROC_ADDR(proc) \
71
   egl->proc = (void *) eglGetProcAddress (#proc);
72
 
73
@@ -1100,8 +1053,6 @@ meta_egl_constructed (GObject *object)
74
   GET_EGL_PROC_ADDR (eglStreamConsumerAcquireKHR);
75
   GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribNV);
76
 
77
-  GET_EGL_PROC_ADDR (eglQueryDmaBufFormatsEXT);
78
-  GET_EGL_PROC_ADDR (eglQueryDmaBufModifiersEXT);
79
 }
80
 
81
 #undef GET_EGL_PROC_ADDR
(-)b/x11-wm/mutter/files/patch-src_meson.build (+16 lines)
Added Link Here
1
../src/wayland/meta-wayland-buffer.c:53:10: fatal error: 'drm_fourcc.h' file not found
2
#include <drm_fourcc.h>
3
         ^~~~~~~~~~~~~~
4
5
--- src/meson.build.orig	2020-09-07 19:18:23 UTC
6
+++ src/meson.build
7
@@ -113,6 +113,9 @@ if have_x11
8
 endif
9
 
10
 if have_wayland
11
+  mutter_lib_deps += [
12
+    libdrm_dep, # drm_fourcc.h on non-Linux
13
+  ]
14
   mutter_pkg_deps += [
15
     wayland_server_dep,
16
   ]
(-)b/x11-wm/mutter/pkg-plist (+2 lines)
Lines 164-169 include/mutter-6/cogl/cogl/cogl-texture.h Link Here
164
include/mutter-6/cogl/cogl/cogl-trace.h
164
include/mutter-6/cogl/cogl/cogl-trace.h
165
include/mutter-6/cogl/cogl/cogl-types.h
165
include/mutter-6/cogl/cogl/cogl-types.h
166
include/mutter-6/cogl/cogl/cogl-version.h
166
include/mutter-6/cogl/cogl/cogl-version.h
167
%%WAYLAND%%include/mutter-6/cogl/cogl/cogl-wayland-server.h
167
include/mutter-6/cogl/cogl/cogl-xlib-renderer.h
168
include/mutter-6/cogl/cogl/cogl-xlib-renderer.h
168
include/mutter-6/cogl/cogl/cogl-xlib.h
169
include/mutter-6/cogl/cogl/cogl-xlib.h
169
include/mutter-6/cogl/cogl/cogl.h
170
include/mutter-6/cogl/cogl/cogl.h
Lines 264-269 share/GConf/gsettings/mutter-schemas.convert Link Here
264
share/applications/mutter.desktop
265
share/applications/mutter.desktop
265
share/gnome-control-center/keybindings/50-mutter-navigation.xml
266
share/gnome-control-center/keybindings/50-mutter-navigation.xml
266
share/gnome-control-center/keybindings/50-mutter-system.xml
267
share/gnome-control-center/keybindings/50-mutter-system.xml
268
%%WAYLAND%%share/gnome-control-center/keybindings/50-mutter-wayland.xml
267
share/gnome-control-center/keybindings/50-mutter-windows.xml
269
share/gnome-control-center/keybindings/50-mutter-windows.xml
268
share/locale/am/LC_MESSAGES/mutter.mo
270
share/locale/am/LC_MESSAGES/mutter.mo
269
share/locale/ar/LC_MESSAGES/mutter.mo
271
share/locale/ar/LC_MESSAGES/mutter.mo

Return to bug 258042