Index: sysutils/consolekit2/Makefile =================================================================== --- sysutils/consolekit2/Makefile +++ sysutils/consolekit2/Makefile @@ -15,10 +15,13 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libdbus-1.so:devel/dbus \ - libpolkit-gobject-1.so:sysutils/polkit + libpolkit-gobject-1.so:sysutils/polkit \ + libdrm.so:graphics/libdrm \ + libevdev.so:devel/libevdev \ + libudev.so:devel/libudev-devd WRKSRC= ${WRKDIR}/ConsoleKit2-${PORTVERSION} -USES= gettext gmake libtool localbase pathfix pkgconfig tar:bzip2 +USES= gettext gnome gmake libtool localbase pathfix pkgconfig tar:bzip2 USE_CSTD= gnu99 USE_XORG= x11 USE_GNOME= glib20 libxslt introspection:build @@ -30,12 +33,12 @@ --localstatedir=/var \ --enable-polkit \ --enable-introspection \ + --enable-libdrm \ + --enable-libevdev \ + --enable-libudev \ --without-html-dir \ --disable-udev-acl \ --disable-libcgmanager \ - --disable-libdrm \ - --disable-libevdev \ - --disable-libudev \ --without-systemdsystemunitdir INSTALL_TARGET= install-strip Index: sysutils/consolekit2/files/patch-src_ck-device-udev.c =================================================================== --- /dev/null +++ sysutils/consolekit2/files/patch-src_ck-device-udev.c @@ -0,0 +1,30 @@ +How CK sees our drm devices: +major 1 minor 104 subsystem # sysname 0 devnode /dev/drm/0 active ? TRUE + +(seems like symlinks get resolved) + +--- src/ck-device-udev.c.orig 2017-06-02 01:31:44 UTC ++++ src/ck-device-udev.c +@@ -391,13 +391,16 @@ ck_device_new (guint major, + /* Start with other device as a default, we have special things + * we do with DRM and EVDEV devices so find and tag them */ + device->category = DEVICE_OTHER; +- if (g_strcmp0 (subsystem, "drm") == 0) ++ if ((g_strcmp0 (subsystem, "drm") == 0 && g_str_has_prefix (sysname, "card")) ++#ifndef __linux__ ++ /* on BSD, the dri/card0 -> drm/0 symlink gets resolved, ++ * and subsystem is not emulated by libudev-devd */ ++ || strstr (device->devnode, "drm") != NULL ++#endif ++ ) + { +- if (g_str_has_prefix (sysname, "card")) +- { +- g_debug ("DEVICE_DRM"); +- device->category = DEVICE_DRM; +- } ++ g_debug ("DEVICE_DRM"); ++ device->category = DEVICE_DRM; + } + else if (g_strcmp0 (subsystem, "input") == 0) + { Index: sysutils/consolekit2/files/patch-src_ck-session.c =================================================================== --- /dev/null +++ sysutils/consolekit2/files/patch-src_ck-session.c @@ -0,0 +1,18 @@ +--- src/ck-session.c.orig 2019-01-05 14:24:34 UTC ++++ src/ck-session.c +@@ -1701,6 +1701,15 @@ ck_session_get_device (CkSession *session, + for (iter = session->priv->devices; iter != NULL; iter = g_list_next (iter)) { + if (ck_device_compare (iter->data, major, minor)) { + g_debug ("found device"); ++ CkDevice *device = CK_DEVICE (iter->data); ++ if (ck_device_get_category(device) == DEVICE_EVDEV) { ++ struct stat st; ++ if (fstat(ck_device_get_fd(device), &st) == -1 && errno == EBADF) { ++ g_debug ("but it was a dead input device, removing"); ++ session->priv->devices = g_list_remove (session->priv->devices, device); ++ return NULL; ++ } ++ } + return iter->data; + } + }