Enable support for upower.
This commit is contained in:
parent
692d97142f
commit
f11f4e0883
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.152 2011/05/18 21:26:56 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.153 2011/05/23 21:31:56 ajacoutot Exp $
|
||||
|
||||
COMMENT= GNOME session
|
||||
|
||||
GNOME_PROJECT= gnome-session
|
||||
GNOME_VERSION= 2.32.1
|
||||
|
||||
REVISION= 14
|
||||
REVISION= 15
|
||||
|
||||
CATEGORIES= x11
|
||||
|
||||
@ -15,13 +15,14 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB += ICE ORBit-2 SM X11 Xau Xcomposite Xcursor Xdamage Xdmcp
|
||||
WANTLIB += Xext Xfixes Xi Xinerama Xrandr Xrender Xtst atk-1.0
|
||||
WANTLIB += c cairo dbus-1 dbus-glib-1 expat fontconfig freetype
|
||||
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0
|
||||
WANTLIB += gobject-2.0 gthread-2.0 gtk-x11-2.0 m pango-1.0 pangocairo-1.0
|
||||
WANTLIB += pangoft2-1.0 pcre pixman-1 png pthread pthread-stubs
|
||||
WANTLIB += z xcb-render execinfo xcb GL Xxf86vm drm xcb-shm
|
||||
WANTLIB += GL ICE ORBit-2 SM X11 Xau Xcomposite Xcursor Xdamage
|
||||
WANTLIB += Xdmcp Xext Xfixes Xi Xinerama Xrandr Xrender Xtst Xxf86vm
|
||||
WANTLIB += atk-1.0 c cairo dbus-1 dbus-glib-1 drm execinfo expat
|
||||
WANTLIB += fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0
|
||||
WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 gtk-x11-2.0
|
||||
WANTLIB += m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre pixman-1
|
||||
WANTLIB += png pthread pthread-stubs upower-glib xcb xcb-render
|
||||
WANTLIB += xcb-shm z
|
||||
|
||||
MODULES= devel/gettext \
|
||||
x11/gnome \
|
||||
@ -31,7 +32,8 @@ BUILD_DEPENDS= textproc/xmlto \
|
||||
x11/gnome/settings-daemon \
|
||||
STEM-*-gtk2:devel/gconf2,gtk2,-gtk
|
||||
LIB_DEPENDS= devel/libexecinfo \
|
||||
x11/gtk+2
|
||||
x11/gtk+2 \
|
||||
sysutils/upower
|
||||
RUN_DEPENDS= x11/gnome/settings-daemon \
|
||||
sysutils/consolekit \
|
||||
x11/xdg-user-dirs-gtk>=0.8p6 \
|
||||
|
@ -1,70 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.4 2010/09/30 07:37:05 ajacoutot Exp $
|
||||
--- configure.orig Tue Sep 28 13:39:47 2010
|
||||
+++ configure Tue Sep 28 13:40:02 2010
|
||||
@@ -12292,13 +12292,11 @@ if test -n "$GNOME_SESSION_CFLAGS"; then
|
||||
gio-2.0 >= \$GLIB_REQUIRED
|
||||
gtk+-\$GTK_API_VERSION >= \$GTK_REQUIRED
|
||||
dbus-glib-1 >= \$DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= \$UPOWER_REQUIRED
|
||||
\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
@@ -12307,7 +12305,6 @@ if test -n "$GNOME_SESSION_CFLAGS"; then
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
" 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -12323,13 +12320,11 @@ if test -n "$GNOME_SESSION_LIBS"; then
|
||||
gio-2.0 >= \$GLIB_REQUIRED
|
||||
gtk+-\$GTK_API_VERSION >= \$GTK_REQUIRED
|
||||
dbus-glib-1 >= \$DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= \$UPOWER_REQUIRED
|
||||
\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
@@ -12338,7 +12333,6 @@ if test -n "$GNOME_SESSION_LIBS"; then
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
" 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -12363,14 +12357,12 @@ fi
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
" 2>&1`
|
||||
else
|
||||
GNOME_SESSION_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
@@ -12380,7 +12372,6 @@ fi
|
||||
gio-2.0 >= $GLIB_REQUIRED
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
|
||||
- upower-glib >= $UPOWER_REQUIRED
|
||||
) were not met:
|
||||
|
||||
$GNOME_SESSION_PKG_ERRORS
|
@ -1,71 +0,0 @@
|
||||
$OpenBSD: patch-gnome-session_gsm-logout-dialog_c,v 1.4 2010/09/30 07:37:05 ajacoutot Exp $
|
||||
|
||||
OpenBSD does not support uPower.
|
||||
|
||||
--- gnome-session/gsm-logout-dialog.c.orig Thu Jul 15 14:53:08 2010
|
||||
+++ gnome-session/gsm-logout-dialog.c Tue Sep 28 13:50:55 2010
|
||||
@@ -27,7 +27,9 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
#include <upower.h>
|
||||
+#endif
|
||||
|
||||
#include "gsm-logout-dialog.h"
|
||||
#include "gsm-consolekit.h"
|
||||
@@ -50,7 +52,9 @@ struct _GsmLogoutDialogPrivate
|
||||
{
|
||||
GsmDialogLogoutType type;
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
UpClient *up_client;
|
||||
+#endif
|
||||
GsmConsolekit *consolekit;
|
||||
|
||||
int timeout;
|
||||
@@ -142,7 +146,9 @@ gsm_logout_dialog_init (GsmLogoutDialog *logout_dialog
|
||||
gtk_window_set_keep_above (GTK_WINDOW (logout_dialog), TRUE);
|
||||
gtk_window_stick (GTK_WINDOW (logout_dialog));
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
logout_dialog->priv->up_client = up_client_new ();
|
||||
+#endif
|
||||
|
||||
logout_dialog->priv->consolekit = gsm_get_consolekit ();
|
||||
|
||||
@@ -166,10 +172,12 @@ gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dia
|
||||
logout_dialog->priv->timeout_id = 0;
|
||||
}
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
if (logout_dialog->priv->up_client) {
|
||||
g_object_unref (logout_dialog->priv->up_client);
|
||||
logout_dialog->priv->up_client = NULL;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (logout_dialog->priv->consolekit) {
|
||||
g_object_unref (logout_dialog->priv->consolekit);
|
||||
@@ -182,13 +190,21 @@ gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dia
|
||||
static gboolean
|
||||
gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
|
||||
{
|
||||
+#ifndef __OpenBSD__
|
||||
return up_client_get_can_suspend (logout_dialog->priv->up_client);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
|
||||
{
|
||||
+#ifndef __OpenBSD__
|
||||
return up_client_get_can_hibernate (logout_dialog->priv->up_client);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static gboolean
|
@ -1,92 +0,0 @@
|
||||
$OpenBSD: patch-gnome-session_gsm-manager_c,v 1.9 2011/04/06 18:33:03 ajacoutot Exp $
|
||||
|
||||
OpenBSD does not support uPower.
|
||||
|
||||
--- gnome-session/gsm-manager.c.orig Wed Nov 17 12:17:04 2010
|
||||
+++ gnome-session/gsm-manager.c Wed Apr 6 20:28:51 2011
|
||||
@@ -38,7 +38,9 @@
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
#include <upower.h>
|
||||
+#endif
|
||||
|
||||
#include <gtk/gtk.h> /* for logout dialog */
|
||||
#include <gconf/gconf-client.h>
|
||||
@@ -135,7 +137,9 @@ struct GsmManagerPrivate
|
||||
DBusGConnection *connection;
|
||||
|
||||
/* Interface with other parts of the system */
|
||||
+#ifndef __OpenBSD__
|
||||
UpClient *up_client;
|
||||
+#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -983,6 +987,7 @@ manager_perhaps_lock (GsmManager *manager)
|
||||
static void
|
||||
manager_attempt_hibernate (GsmManager *manager)
|
||||
{
|
||||
+#ifndef __OpenBSD__
|
||||
gboolean can_hibernate;
|
||||
GError *error;
|
||||
gboolean ret;
|
||||
@@ -1001,11 +1006,13 @@ manager_attempt_hibernate (GsmManager *manager)
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
manager_attempt_suspend (GsmManager *manager)
|
||||
{
|
||||
+#ifndef __OpenBSD__
|
||||
gboolean can_suspend;
|
||||
GError *error;
|
||||
gboolean ret;
|
||||
@@ -1024,6 +1031,7 @@ manager_attempt_suspend (GsmManager *manager)
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2196,10 +2204,12 @@ gsm_manager_dispose (GObject *object)
|
||||
manager->priv->gconf_client = NULL;
|
||||
}
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
if (manager->priv->up_client != NULL) {
|
||||
g_object_unref (manager->priv->up_client);
|
||||
manager->priv->up_client = NULL;
|
||||
}
|
||||
+#endif
|
||||
|
||||
G_OBJECT_CLASS (gsm_manager_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -2429,7 +2439,9 @@ gsm_manager_init (GsmManager *manager)
|
||||
G_CALLBACK (on_presence_status_changed),
|
||||
manager);
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
manager->priv->up_client = up_client_new ();
|
||||
+#endif
|
||||
|
||||
/* GConf setup */
|
||||
gconf_client_add_dir (manager->priv->gconf_client,
|
||||
@@ -2953,10 +2965,12 @@ gsm_manager_can_shutdown (GsmManager *manager,
|
||||
gboolean can_suspend;
|
||||
gboolean can_hibernate;
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
g_object_get (manager->priv->up_client,
|
||||
"can-suspend", &can_suspend,
|
||||
"can-hibernate", &can_hibernate,
|
||||
NULL);
|
||||
+#endif
|
||||
|
||||
g_debug ("GsmManager: CanShutdown called");
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.32 2011/05/05 09:59:45 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.33 2011/05/23 21:31:56 ajacoutot Exp $
|
||||
@bin bin/gnome-session
|
||||
@bin bin/gnome-session-properties
|
||||
@bin bin/gnome-session-save
|
||||
@ -15,24 +15,11 @@ share/doc/pkg-readmes/${FULLPKGNAME}
|
||||
share/gnome-session/
|
||||
share/gnome-session/gsm-inhibit-dialog.ui
|
||||
share/gnome-session/session-properties.ui
|
||||
share/icons/hicolor/
|
||||
share/icons/hicolor/16x16/
|
||||
share/icons/hicolor/16x16/apps/
|
||||
share/icons/hicolor/16x16/apps/session-properties.png
|
||||
share/icons/hicolor/22x22/
|
||||
share/icons/hicolor/22x22/apps/
|
||||
share/icons/hicolor/22x22/apps/session-properties.png
|
||||
share/icons/hicolor/24x24/
|
||||
share/icons/hicolor/24x24/apps/
|
||||
share/icons/hicolor/24x24/apps/session-properties.png
|
||||
share/icons/hicolor/32x32/
|
||||
share/icons/hicolor/32x32/apps/
|
||||
share/icons/hicolor/32x32/apps/session-properties.png
|
||||
share/icons/hicolor/48x48/
|
||||
share/icons/hicolor/48x48/apps/
|
||||
share/icons/hicolor/48x48/apps/session-properties.png
|
||||
share/icons/hicolor/scalable/
|
||||
share/icons/hicolor/scalable/apps/
|
||||
share/icons/hicolor/scalable/apps/session-properties.svg
|
||||
share/locale/af/LC_MESSAGES/gnome-session-2.0.mo
|
||||
share/locale/am/LC_MESSAGES/gnome-session-2.0.mo
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: README,v 1.9 2011/05/07 12:07:10 ajacoutot Exp $
|
||||
$OpenBSD: README,v 1.10 2011/05/23 21:31:56 ajacoutot Exp $
|
||||
|
||||
Running GNOME on OpenBSD
|
||||
========================
|
||||
@ -19,6 +19,7 @@ install at least the following packages:
|
||||
gnome-keyring \
|
||||
gnome-media \
|
||||
gnome-panel \
|
||||
gnome-power-manager \
|
||||
gnome-screensaver \
|
||||
gnome-terminal \
|
||||
gnome-themes \
|
||||
|
Loading…
Reference in New Issue
Block a user