diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-04-07 06:53:43 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-04-07 06:53:43 +0800 |
commit | 20b7e1c7bbe6b8e086f44029dfb467984e645274 (patch) | |
tree | 4eab43815746279b230fe111c1923cc577fd4896 | |
parent | 90cda221316c54c018fd590c50f4755a26855d5d (diff) | |
download | marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.tar marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.tar.gz marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.tar.bz2 marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.tar.lz marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.tar.xz marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.tar.zst marcuscom-ports-20b7e1c7bbe6b8e086f44029dfb467984e645274.zip |
Update to 0.9.2.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@14025 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | sysutils/upower/Makefile | 6 | ||||
-rw-r--r-- | sysutils/upower/distinfo | 6 | ||||
-rw-r--r-- | sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info | 129 |
3 files changed, 6 insertions, 135 deletions
diff --git a/sysutils/upower/Makefile b/sysutils/upower/Makefile index 69d59eddb..df1280583 100644 --- a/sysutils/upower/Makefile +++ b/sysutils/upower/Makefile @@ -3,11 +3,11 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/upower/Makefile,v 1.10 2010/03/13 10:48:14 kwm Exp $ +# $MCom: ports/sysutils/upower/Makefile,v 1.11 2010/03/23 16:02:47 kwm Exp $ # -PORTNAME= UPower -DISTVERSION= 0.9.1 +PORTNAME= upower +DISTVERSION= 0.9.2 CATEGORIES= sysutils MASTER_SITES= http://upower.freedesktop.org/releases/ diff --git a/sysutils/upower/distinfo b/sysutils/upower/distinfo index c3961d045..1eb445c4a 100644 --- a/sysutils/upower/distinfo +++ b/sysutils/upower/distinfo @@ -1,3 +1,3 @@ -MD5 (UPower-0.9.1.tar.bz2) = 822d7d495781c6bbed36981a7a78dd30 -SHA256 (UPower-0.9.1.tar.bz2) = 5ad14e85fdda536ec0ac7f2848065f46a1056f5cf80d583ef7dceaf05dae29d5 -SIZE (UPower-0.9.1.tar.bz2) = 452523 +MD5 (upower-0.9.2.tar.bz2) = 2175c37a393425ee26bdb728768bd21c +SHA256 (upower-0.9.2.tar.bz2) = 4a0532fbda7afee29984f7b96b3b3114c68b0525278beb10c98ef287ca5a8377 +SIZE (upower-0.9.2.tar.bz2) = 467544 diff --git a/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info b/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info deleted file mode 100644 index b09f01b7c..000000000 --- a/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info +++ /dev/null @@ -1,129 +0,0 @@ -From 83a4bda6bfc4da2b454a4916f262dc025503b47a Mon Sep 17 00:00:00 2001 -From: Joe Marcus Clarke <marcus@FreeBSD.org> -Date: Sat, 2 Jan 2010 14:04:57 -0500 -Subject: [PATCH 3/3] add backend support for obtaining kernel info - -Add FreeBSD-only support for pulling information about supported -suspend states, commands, swap, etc. from the backend. ---- - src/up-backend.h | 14 +++++++ - src/up-daemon.c | 99 ++++++++++++++++++++++++++++++++++++----------------- - 2 files changed, 81 insertions(+), 32 deletions(-) - -diff --git a/src/up-backend.h b/src/up-backend.h -index c03bac9..f4e488f 100644 ---- src/up-backend.h -+++ src/up-backend.h -@@ -68,6 +68,20 @@ void up_backend_test (gpointer user_data); - gboolean up_backend_coldplug (UpBackend *backend, - UpDaemon *daemon); - -+gboolean up_backend_can_suspend (UpBackend *backend); -+ -+gboolean up_backend_can_hibernate (UpBackend *backend); -+ -+gboolean up_backend_has_encrypted_swap (UpBackend *backend); -+ -+gfloat up_backend_get_used_swap (UpBackend *backend); -+ -+gchar *up_backend_get_powersave_command (UpBackend *backend, gboolean powersave); -+ -+gchar *up_backend_get_suspend_command (UpBackend *backend); -+ -+gchar *up_backend_get_hibernate_command (UpBackend *backend); -+ - G_END_DECLS - - #endif /* __UP_BACKEND_H */ -diff --git a/src/up-daemon.c b/src/up-daemon.c -index 47d84d5..4085fb3 100644 ---- src/up-daemon.c -+++ src/up-daemon.c -@@ -109,6 +109,7 @@ G_DEFINE_TYPE (UpDaemon, up_daemon, G_TYPE_OBJECT) - static gboolean - up_daemon_check_sleep_states (UpDaemon *daemon) - { -+#ifndef __FreeBSD__ - gchar *contents = NULL; - GError *error = NULL; - gboolean ret; -@@ -128,6 +129,12 @@ up_daemon_check_sleep_states (UpDaemon *daemon) - out: - g_free (contents); - return ret; -+#else -+ daemon->priv->kernel_can_suspend = up_backend_can_suspend (daemon->priv->backend); -+ daemon->priv->kernel_can_hibernate = up_backend_can_hibernate (daemon->priv->backend); -+ -+ return TRUE; -+#endif - } - - /** -@@ -146,6 +153,7 @@ out: - static gboolean - up_daemon_check_encrypted_swap (UpDaemon *daemon) - { -+#ifndef __FreeBSD__ - gchar *contents_swaps = NULL; - gchar *contents_crypttab = NULL; - gchar **lines_swaps = NULL; -@@ -235,6 +243,9 @@ out: - g_strfreev (lines_swaps); - g_strfreev (lines_crypttab); - return encrypted_swap; -+#else -+ return up_backend_has_encrypted_swap (daemon->priv->backend); -+#endif - } - - /** -@@ -243,6 +254,7 @@ out: - static gfloat - up_daemon_check_swap_space (UpDaemon *daemon) - { -+#ifndef __FreeBSD__ - gchar *contents = NULL; - gchar **lines = NULL; - GError *error = NULL; -@@ -295,6 +297,9 @@ out: - g_free (contents); - g_strfreev (lines); - return percentage; -+#else -+ return up_backend_get_used_swap (daemon->priv->backend); -+#endif - } - - /** -@@ -423,13 +428,21 @@ up_daemon_set_pmutils_powersave (UpDaemon *daemon, gboolean powersave) - GError *error = NULL; - - /* run script from pm-utils */ -+#ifndef __FreeBSD__ - command = g_strdup_printf ("/usr/sbin/pm-powersave %s", powersave ? "true" : "false"); -- egg_debug ("excuting command: %s", command); -- ret = g_spawn_command_line_async (command, &error); -- if (!ret) { -- egg_warning ("failed to run script: %s", error->message); -- g_error_free (error); -- goto out; -+#else -+ command = up_backend_get_powersave_command (daemon->priv->backend, powersave); -+#endif -+ if (command != NULL) { -+ egg_debug ("excuting command: %s", command); -+ ret = g_spawn_command_line_async (command, &error); -+ if (!ret) { -+ egg_warning ("failed to run script: %s", error->message); -+ g_error_free (error); -+ goto out; -+ } -+ } else { -+ return TRUE; - } - out: - g_free (command); --- -1.6.5.7 - |