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

(-)b/x11-wm/mutter/Makefile (-5 / +11 lines)
Lines 1-6 Link Here
1
PORTNAME=	mutter
1
PORTNAME=	mutter
2
PORTVERSION=	42.4
2
PORTVERSION=	42.4
3
PORTREVISION=	5
3
PORTREVISION=	6
4
CATEGORIES=	x11-wm
4
CATEGORIES=	x11-wm
5
MASTER_SITES=	GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+)\..*/\1/}
5
MASTER_SITES=	GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+)\..*/\1/}
6
DIST_SUBDIR=	gnome
6
DIST_SUBDIR=	gnome
Lines 39-54 RUN_DEPENDS= gnome-settings-daemon>0:sysutils/gnome-settings-daemon \ Link Here
39
PORTSCOUT=	limitw:1,even
39
PORTSCOUT=	limitw:1,even
40
40
41
USES=		compiler:c++0x gettext gl gnome localbase meson pkgconfig \
41
USES=		compiler:c++0x gettext gl gnome localbase meson pkgconfig \
42
		tar:xz xorg
42
		python:build shebangfix tar:xz xorg
43
USE_GL=		egl gbm
43
USE_GL=		egl gbm
44
USE_GNOME=	cairo gdkpixbuf2 gnomedesktop3 introspection
44
USE_GNOME=	cairo gdkpixbuf2 gnomedesktop3 introspection
45
USE_XORG=	ice sm x11 xcb xcomposite xcursor xdamage xext xfixes xi \
45
USE_XORG=	ice sm x11 xcb xcomposite xcursor xdamage xext xfixes xi \
46
		xinerama xrandr xrender xtst
46
		xinerama xrandr xrender xtst
47
USE_LDCONFIG=	yes
47
USE_LDCONFIG=	yes
48
SHEBANG_FILES=	src/backends/native/gen-default-modes.py
48
CFLAGS+=	-Wno-unknown-warning-option -Wno-format-nonliteral
49
CFLAGS+=	-Wno-unknown-warning-option -Wno-format-nonliteral
49
CPPFLAGS+=	-fno-omit-frame-pointer
50
CPPFLAGS+=	-fno-omit-frame-pointer
50
MESON_ARGS=	-Dlibwacom=false \
51
MESON_ARGS=	-Dlibwacom=false \
51
		-Dnative_backend=false \
52
		-Dprofiler=false \
52
		-Dprofiler=false \
53
		-Dsm=true \
53
		-Dsm=true \
54
		-Dsystemd=false \
54
		-Dsystemd=false \
Lines 64-73 MESON_ARGS+= -Dremote_desktop=false Link Here
64
GLIB_SCHEMAS=	org.gnome.mutter.gschema.xml \
64
GLIB_SCHEMAS=	org.gnome.mutter.gschema.xml \
65
		org.gnome.mutter.wayland.gschema.xml
65
		org.gnome.mutter.wayland.gschema.xml
66
66
67
OPTIONS_DEFINE=	WAYLAND
67
OPTIONS_DEFINE=	DRM WAYLAND
68
OPTIONS_DEFAULT=WAYLAND
68
OPTIONS_DEFAULT=DRM WAYLAND
69
OPTIONS_SUB=	yes
69
OPTIONS_SUB=	yes
70
70
71
DRM_DESC=		KMS console support
72
DRM_LIB_DEPENDS=	libudev.so:devel/libudev-devd \
73
			libconsolekit.so:sysutils/consolekit2 \
74
			libinput.so:x11/libinput
75
DRM_MESON_TRUE=		native_backend
76
71
WAYLAND_BUILD_DEPENDS=	wayland-protocols>=1.25:graphics/wayland-protocols \
77
WAYLAND_BUILD_DEPENDS=	wayland-protocols>=1.25:graphics/wayland-protocols \
72
			xwayland-devel>0:x11-servers/xwayland-devel
78
			xwayland-devel>0:x11-servers/xwayland-devel
73
WAYLAND_LIB_DEPENDS=	libwayland-server.so:graphics/wayland
79
WAYLAND_LIB_DEPENDS=	libwayland-server.so:graphics/wayland
(-)b/x11-wm/mutter/files/patch-meson.build (+9 lines)
Lines 25-27 Link Here
25
   endif
25
   endif
26
 endif
26
 endif
27
 
27
 
28
@@ -219,7 +224,7 @@ if have_native_backend
29
   if libsystemd_dep.found()
30
     logind_provider_dep = libsystemd_dep
31
   else
32
-    logind_provider_dep = dependency('libelogind')
33
+    logind_provider_dep = dependency(['libelogind', 'libconsolekit'])
34
   endif
35
 
36
   if not have_egl
(-)b/x11-wm/mutter/files/patch-src_backends_native_meta-backend-native.c (+35 lines)
Added Link Here
1
../src/backends/native/meta-backend-native.c:234:67: error: implicit declaration of function 'gettid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2
                                                                  gettid (),
3
                                                                  ^
4
5
--- src/backends/native/meta-backend-native.c.orig	2022-08-11 15:46:26 UTC
6
+++ src/backends/native/meta-backend-native.c
7
@@ -68,6 +68,28 @@
8
 
9
 #include "meta-private-enum-types.h"
10
 
11
+#if defined(__DragonFly__) || defined(__FreeBSD__)
12
+#include <pthread_np.h>
13
+#elif defined(__NetBSD__)
14
+#include <lwp.h>
15
+#endif
16
+
17
+#if !defined(__linux__)
18
+static pid_t
19
+gettid(void)
20
+{
21
+#if defined(__DragonFly__) || defined(__FreeBSD__)
22
+  return pthread_getthreadid_np();
23
+#elif defined(__NetBSD__)
24
+  return _lwp_self();
25
+#elif defined(__OpenBSD__)
26
+  return getthrid();
27
+#else
28
+  return (pid_t)pthread_self();
29
+#endif
30
+}
31
+#endif /* !defined(__linux__) */
32
+
33
 enum
34
 {
35
   PROP_0,
(-)b/x11-wm/mutter/files/patch-src_backends_native_meta-device-pool.c (+16 lines)
Added Link Here
1
../src/backends/native/meta-device-pool.c:27:10: fatal error: 'sys/sysmacros.h' file not found
2
#include <sys/sysmacros.h>
3
         ^~~~~~~~~~~~~~~~~
4
5
--- src/backends/native/meta-device-pool.c.orig	2022-08-11 15:46:26 UTC
6
+++ src/backends/native/meta-device-pool.c
7
@@ -24,7 +24,9 @@
8
 #include <fcntl.h>
9
 #include <gio/gunixfdlist.h>
10
 #include <sys/stat.h>
11
+#ifdef __linux__
12
 #include <sys/sysmacros.h>
13
+#endif
14
 #include <sys/types.h>
15
 
16
 #include "backends/native/meta-launcher.h"
(-)b/x11-wm/mutter/files/patch-src_backends_native_meta-launcher.c (+81 lines)
Added Link Here
1
../src/backends/native/meta-launcher.c:27:10: fatal error: 'sys/sysmacros.h' file not found
2
#include <sys/sysmacros.h>
3
         ^~~~~~~~~~~~~~~~~
4
5
../src/backends/native/meta-launcher.c:34:10: fatal error: 'systemd/sd-login.h' file not found
6
#include <systemd/sd-login.h>
7
         ^~~~~~~~~~~~~~~~~~~~
8
9
../src/backends/native/meta-launcher.c:83:21: error: implicit declaration of function 'sd_session_is_active' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
10
      saved_errno = sd_session_is_active (xdg_session_id);
11
                    ^
12
../src/backends/native/meta-launcher.c:104:27: error: use of undeclared identifier 'ENODATA'
13
      if (saved_errno != -ENODATA)
14
                          ^
15
../src/backends/native/meta-launcher.c:121:17: error: implicit declaration of function 'sd_uid_get_display' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
16
  saved_errno = sd_uid_get_display (getuid (), &local_session_id);
17
                ^
18
../src/backends/native/meta-launcher.c:125:27: error: use of undeclared identifier 'ENODATA'
19
      if (saved_errno == -ENODATA)
20
                          ^
21
22
--- src/backends/native/meta-launcher.c.orig	2022-08-11 15:46:26 UTC
23
+++ src/backends/native/meta-launcher.c
24
@@ -24,14 +24,57 @@
25
 #include <gio/gunixfdlist.h>
26
 #include <sys/types.h>
27
 #include <sys/stat.h>
28
+#ifdef __linux__
29
 #include <sys/sysmacros.h>
30
+#endif
31
 #include <malloc.h>
32
 #include <fcntl.h>
33
 #include <errno.h>
34
 #include <stdlib.h>
35
 #include <string.h>
36
 #include <unistd.h>
37
+#ifdef HAVE_LIBSYSTEMD
38
 #include <systemd/sd-login.h>
39
+#else
40
+#include <ConsoleKit/sd-login.h>
41
+
42
+#ifndef ENODATA
43
+#define ENODATA ENXIO
44
+#endif
45
+
46
+/* Extend libsystemd compatibility */
47
+#include <ConsoleKit/libconsolekit.h>
48
+
49
+static int
50
+sd_session_is_active(const char *session)
51
+{
52
+	LibConsoleKit *ck = NULL;
53
+	GError *error = NULL;
54
+	int ret = 0;
55
+
56
+	ck = lib_consolekit_new ();
57
+
58
+	ret = lib_consolekit_session_is_active (ck, session, &error);
59
+	if (error)  {
60
+		g_warning ("Unable to determine if session is active: %s",
61
+				error ? error->message : "");
62
+		g_error_free (error);
63
+		g_object_unref (ck);
64
+		return -ENXIO;
65
+	}
66
+
67
+	g_object_unref (ck);
68
+
69
+	return ret;
70
+}
71
+
72
+static int
73
+sd_uid_get_display(uid_t uid, char **session)
74
+{
75
+  // XXX
76
+  return -ENODATA;
77
+}
78
+#endif
79
 
80
 #include "backends/meta-backend-private.h"
81
 #include "backends/native/dbus-utils.h"
(-)b/x11-wm/mutter/files/patch-src_core_meta-context-main.c (-1 / +17 lines)
Lines 1-10 Link Here
1
../src/core/meta-context-main.c:31:10: fatal error: 'systemd/sd-login.h' file not found
2
#include <systemd/sd-login.h>
3
         ^~~~~~~~~~~~~~~~~~~~
4
1
ld: error: undefined symbol: sd_pid_get_user_unit
5
ld: error: undefined symbol: sd_pid_get_user_unit
2
>>> referenced by meta-context-main.c
6
>>> referenced by meta-context-main.c
3
>>>               src/libmutter-9.so.0.0.0.p/core_meta-context-main.c.o:(meta_context_main_get_x11_display_policy)
7
>>>               src/libmutter-9.so.0.0.0.p/core_meta-context-main.c.o:(meta_context_main_get_x11_display_policy)
4
8
5
--- src/core/meta-context-main.c.orig	2021-09-19 13:37:45 UTC
9
--- src/core/meta-context-main.c.orig	2021-09-19 13:37:45 UTC
6
+++ src/core/meta-context-main.c
10
+++ src/core/meta-context-main.c
7
@@ -318,8 +318,10 @@ meta_context_main_get_x11_display_policy (MetaContext 
11
@@ -28,7 +28,11 @@
12
 #include <gio/gio.h>
13
 
14
 #if defined(HAVE_NATIVE_BACKEND) && defined(HAVE_WAYLAND)
15
+# ifdef HAVE_LIBSYSTEMD
16
 #include <systemd/sd-login.h>
17
+# else
18
+#include <ConsoleKit/sd-login.h>
19
+# endif
20
 #endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */
21
 
22
 #include "backends/meta-monitor-manager-private.h"
23
@@ -318,8 +322,10 @@ meta_context_main_get_x11_display_policy (MetaContext 
8
 #ifdef HAVE_WAYLAND
24
 #ifdef HAVE_WAYLAND
9
       if (context_main->options.no_x11)
25
       if (context_main->options.no_x11)
10
         return META_X11_DISPLAY_POLICY_DISABLED;
26
         return META_X11_DISPLAY_POLICY_DISABLED;

Return to bug 271836