summaryrefslogtreecommitdiffstats
path: root/sysutils/gnome-power-manager/files
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2011-03-07 19:52:41 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2011-03-07 19:52:41 +0800
commit7adcde1d2de34101d03a9eddae70e9e0dc8276df (patch)
tree06dd666383e891a8fa3cdc934355a21d8b82e11f /sysutils/gnome-power-manager/files
parent165b77616fd0b1c8ac650f3fd5a7d40760320aab (diff)
downloadmarcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.tar
marcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.tar.gz
marcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.tar.bz2
marcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.tar.lz
marcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.tar.xz
marcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.tar.zst
marcuscom-ports-7adcde1d2de34101d03a9eddae70e9e0dc8276df.zip
Fix build with libnotify.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@15382 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/gnome-power-manager/files')
-rw-r--r--sysutils/gnome-power-manager/files/patch-applets_brightness_Makefile.in10
-rw-r--r--sysutils/gnome-power-manager/files/patch-applets_inhibit_Makefile.in10
-rw-r--r--sysutils/gnome-power-manager/files/patch-configure25
-rw-r--r--sysutils/gnome-power-manager/files/patch-src_Makefile.in34
-rw-r--r--sysutils/gnome-power-manager/files/patch-src_gpm-load.c55
-rw-r--r--sysutils/gnome-power-manager/files/patch-src_gpm-manager.c15
6 files changed, 149 insertions, 0 deletions
diff --git a/sysutils/gnome-power-manager/files/patch-applets_brightness_Makefile.in b/sysutils/gnome-power-manager/files/patch-applets_brightness_Makefile.in
new file mode 100644
index 000000000..9a5d2c5a5
--- /dev/null
+++ b/sysutils/gnome-power-manager/files/patch-applets_brightness_Makefile.in
@@ -0,0 +1,10 @@
+--- applets/brightness/Makefile.in.orig 2010-01-01 20:51:42.000000000 +0800
++++ applets/brightness/Makefile.in 2010-01-01 20:51:42.000000000 +0800
+@@ -344,6 +344,7 @@
+ gnome_brightness_applet_LDADD = \
+ $(DBUS_LIBS) \
+ $(GNOME_LIBS) \
++ -lexecinfo \
+ $(PANEL_LIBS)
+
+ serverdir = $(prefix)/libdata/bonobo/servers
diff --git a/sysutils/gnome-power-manager/files/patch-applets_inhibit_Makefile.in b/sysutils/gnome-power-manager/files/patch-applets_inhibit_Makefile.in
new file mode 100644
index 000000000..4965221fe
--- /dev/null
+++ b/sysutils/gnome-power-manager/files/patch-applets_inhibit_Makefile.in
@@ -0,0 +1,10 @@
+--- applets/inhibit/Makefile.in.orig 2010-01-01 20:53:23.000000000 +0800
++++ applets/inhibit/Makefile.in 2010-01-01 20:53:36.000000000 +0800
+@@ -343,6 +343,7 @@
+ gnome_inhibit_applet_LDADD = \
+ $(DBUS_LIBS) \
+ $(GNOME_LIBS) \
++ -lexecinfo \
+ $(PANEL_LIBS)
+
+ serverdir = $(prefix)/libdata/bonobo/servers
diff --git a/sysutils/gnome-power-manager/files/patch-configure b/sysutils/gnome-power-manager/files/patch-configure
new file mode 100644
index 000000000..69d50145e
--- /dev/null
+++ b/sysutils/gnome-power-manager/files/patch-configure
@@ -0,0 +1,25 @@
+--- configure.orig 2010-01-30 18:17:55.000000000 -0500
++++ configure 2010-01-30 18:18:23.000000000 -0500
+@@ -12822,21 +12822,15 @@ if test "$GCC" = "yes"; then
+ WARNINGFLAGS="$WARNINGFLAGS -Wreturn-type"
+ WARNINGFLAGS="$WARNINGFLAGS -Wformat-nonliteral"
+ WARNINGFLAGS="$WARNINGFLAGS -Wformat-security"
+- WARNINGFLAGS="$WARNINGFLAGS -Wmissing-include-dirs"
+ WARNINGFLAGS="$WARNINGFLAGS -Wmissing-format-attribute"
+- WARNINGFLAGS="$WARNINGFLAGS -Wclobbered"
+- WARNINGFLAGS="$WARNINGFLAGS -Wempty-body"
+- WARNINGFLAGS="$WARNINGFLAGS -Wignored-qualifiers"
+ # WARNINGFLAGS="$WARNINGFLAGS -Wsign-compare"
+- WARNINGFLAGS="$WARNINGFLAGS -Wtype-limits"
+ # WARNINGFLAGS="$WARNINGFLAGS -Wuninitialized"
+ # WARNINGFLAGS="$WARNINGFLAGS -Waggregate-return"
+ WARNINGFLAGS="$WARNINGFLAGS -Wdeclaration-after-statement"
+ WARNINGFLAGS="$WARNINGFLAGS -Wshadow"
+ WARNINGFLAGS="$WARNINGFLAGS -Winline"
+ # WARNINGFLAGS="$WARNINGFLAGS -Wswitch-enum"
+- WARNINGFLAGS="$WARNINGFLAGS -Wmissing-parameter-type"
+- WARNINGFLAGS="$WARNINGFLAGS -Woverride-init"
++# WARNINGFLAGS="$WARNINGFLAGS -Woverride-init"
+ WARNINGFLAGS="$WARNINGFLAGS -Wno-strict-aliasing"
+ else
+ WARNINGFLAGS=""
diff --git a/sysutils/gnome-power-manager/files/patch-src_Makefile.in b/sysutils/gnome-power-manager/files/patch-src_Makefile.in
new file mode 100644
index 000000000..0f4da29db
--- /dev/null
+++ b/sysutils/gnome-power-manager/files/patch-src_Makefile.in
@@ -0,0 +1,34 @@
+--- src/Makefile.in.orig 2010-06-06 12:19:04.000000000 +0200
++++ src/Makefile.in 2010-06-06 12:21:46.000000000 +0200
+@@ -499,6 +499,7 @@
+ $(GNOME_LIBS) \
+ $(UNIQUE_LIBS) \
+ $(DBUS_LIBS) \
++ -lexecinfo \
+ -lm
+
+ gnome_power_statistics_CFLAGS = \
+@@ -520,6 +521,7 @@
+ $(UNIQUE_LIBS) \
+ $(GPM_EXTRA_LIBS) \
+ $(UPOWER_LIBS) \
++ -lexecinfo \
+ -lm
+
+ gnome_power_preferences_CFLAGS = \
+@@ -573,6 +575,7 @@
+ $(LIBNOTIFY_LIBS) \
+ $(GPM_EXTRA_LIBS) \
+ $(UPOWER_LIBS) \
++ -lexecinfo \
+ -lm
+
+ gnome_power_manager_CFLAGS = \
+@@ -639,6 +642,7 @@
+ $(X11_LIBS) \
+ $(LIBNOTIFY_LIBS) \
+ $(GPM_EXTRA_LIBS) \
++ -lexecinfo \
+ -lm
+
+ gnome_power_self_test_CFLAGS = -DEGG_TEST $(AM_CFLAGS) $(WARNINGFLAGS)
diff --git a/sysutils/gnome-power-manager/files/patch-src_gpm-load.c b/sysutils/gnome-power-manager/files/patch-src_gpm-load.c
new file mode 100644
index 000000000..eaa8df1b2
--- /dev/null
+++ b/sysutils/gnome-power-manager/files/patch-src_gpm-load.c
@@ -0,0 +1,55 @@
+--- src/gpm-load.c.orig 2010-01-01 23:29:11.000000000 -0500
++++ src/gpm-load.c 2010-01-01 23:46:31.000000000 -0500
+@@ -33,6 +33,10 @@
+ #include <kstat.h>
+ #include <sys/sysinfo.h>
+ #endif
++#if defined(__FreeBSD__)
++#include <sys/resource.h>
++#include <sys/sysctl.h>
++#endif
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+@@ -151,6 +155,32 @@ out:
+ return FALSE;
+ }
+
++#elif defined(__FreeBSD__)
++
++/**
++ * gpm_load_get_cpu_values:
++ * @cpu_idle: The idle time reported by the CPU
++ * @cpu_total: The total time reported by the CPU
++ * Return value: Success of reading of the kern.cp_time sysctl.
++ **/
++static gboolean
++gpm_load_get_cpu_values (long unsigned *cpu_idle, long unsigned *cpu_total)
++{
++ long cpts[CPUSTATES];
++ size_t length;
++
++ length = sizeof (cpts);
++ if (sysctlbyname ("kern.cp_time", cpts, &length, NULL, 0)) {
++ return FALSE;
++ }
++
++ *cpu_idle = (unsigned long) cpts[CP_IDLE];
++ *cpu_total = (unsigned long) (cpts[CP_USER] + cpts[CP_NICE] + \
++ cpts[CP_SYS] + cpts[CP_IDLE] + cpts[CP_INTR]);
++
++ return TRUE;
++}
++
+ #else
+
+ /**
+@@ -192,7 +222,7 @@ gpm_load_get_cpu_values (long unsigned *
+ *cpu_total = cpu_user + cpu_nice + cpu_system + *cpu_idle;
+ ret = TRUE;
+ out:
+- if (!fd)
++ if (fd)
+ fclose (fd);
+ return ret;
+ }
diff --git a/sysutils/gnome-power-manager/files/patch-src_gpm-manager.c b/sysutils/gnome-power-manager/files/patch-src_gpm-manager.c
new file mode 100644
index 000000000..a71c447da
--- /dev/null
+++ b/sysutils/gnome-power-manager/files/patch-src_gpm-manager.c
@@ -0,0 +1,15 @@
+--- src/gpm-manager.c.orig 2011-03-07 12:49:54.000000000 +0100
++++ src/gpm-manager.c 2011-03-07 12:51:08.000000000 +0100
+@@ -481,11 +481,7 @@ gpm_manager_notify (GpmManager *manager,
+ gpm_manager_notify_close (manager, *notification_class);
+
+ /* if the status icon is hidden, don't point at it */
+- if (manager->priv->status_icon != NULL &&
+- gtk_status_icon_is_embedded (manager->priv->status_icon))
+- notification = notify_notification_new_with_status_icon (title, message, icon, manager->priv->status_icon);
+- else
+- notification = notify_notification_new (title, message, icon, NULL);
++ notification = notify_notification_new (title, message, icon);
+ notify_notification_set_timeout (notification, timeout);
+ notify_notification_set_urgency (notification, urgency);
+ g_signal_connect (notification, "closed", G_CALLBACK (gpm_manager_notification_closed_cb), notification_class);