summaryrefslogtreecommitdiff
path: root/sysutils/mate-power-manager/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/mate-power-manager/files')
-rw-r--r--sysutils/mate-power-manager/files/patch-applets_brightness_Makefile.am10
-rw-r--r--sysutils/mate-power-manager/files/patch-applets_inhibit_Makefile.am10
-rw-r--r--sysutils/mate-power-manager/files/patch-autogen.sh27
-rw-r--r--sysutils/mate-power-manager/files/patch-configure.ac43
-rw-r--r--sysutils/mate-power-manager/files/patch-src_Makefile.am42
-rw-r--r--sysutils/mate-power-manager/files/patch-src_gpm-load.c46
6 files changed, 178 insertions, 0 deletions
diff --git a/sysutils/mate-power-manager/files/patch-applets_brightness_Makefile.am b/sysutils/mate-power-manager/files/patch-applets_brightness_Makefile.am
new file mode 100644
index 000000000000..dc13514c93b1
--- /dev/null
+++ b/sysutils/mate-power-manager/files/patch-applets_brightness_Makefile.am
@@ -0,0 +1,10 @@
+--- applets/brightness/Makefile.am.orig 2013-10-19 12:04:49.000000000 +0200
++++ applets/brightness/Makefile.am 2013-10-19 12:05:17.000000000 +0200
+@@ -34,6 +34,7 @@
+ gpm-common.h
+
+ mate_brightness_applet_LDADD = \
++ $(EXECINFO_LIBS) \
+ $(DBUS_LIBS) \
+ $(MATE_LIBS) \
+ $(PANEL_LIBS)
diff --git a/sysutils/mate-power-manager/files/patch-applets_inhibit_Makefile.am b/sysutils/mate-power-manager/files/patch-applets_inhibit_Makefile.am
new file mode 100644
index 000000000000..43617f92a7e4
--- /dev/null
+++ b/sysutils/mate-power-manager/files/patch-applets_inhibit_Makefile.am
@@ -0,0 +1,10 @@
+--- applets/inhibit/Makefile.am.orig 2013-10-19 12:05:52.000000000 +0200
++++ applets/inhibit/Makefile.am 2013-10-19 12:06:06.000000000 +0200
+@@ -34,6 +34,7 @@
+ gpm-common.h
+
+ mate_inhibit_applet_LDADD = \
++ $(EXECINFO_LIBS) \
+ $(DBUS_LIBS) \
+ $(MATE_LIBS) \
+ $(PANEL_LIBS)
diff --git a/sysutils/mate-power-manager/files/patch-autogen.sh b/sysutils/mate-power-manager/files/patch-autogen.sh
new file mode 100644
index 000000000000..f9c08c5db86b
--- /dev/null
+++ b/sysutils/mate-power-manager/files/patch-autogen.sh
@@ -0,0 +1,27 @@
+--- autogen.sh.orig 2013-10-19 11:55:08.000000000 +0200
++++ autogen.sh 2013-10-19 11:55:03.000000000 +0200
+@@ -0,0 +1,24 @@
++#!/bin/sh
++# Run this to generate all the initial makefiles, etc.
++
++srcdir=`dirname $0`
++test -z "$srcdir" && srcdir=.
++
++PKG_NAME="mate-power-manager"
++
++(test -f $srcdir/configure.ac) || {
++ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
++ echo " top-level $PKG_NAME directory"
++ exit 1
++}
++
++which mate-autogen || {
++ echo "You need to install mate-common from the MATE Git"
++ exit 1
++}
++
++REQUIRED_AUTOMAKE_VERSION=1.9
++MATE_DATADIR="$mate_datadir"
++
++. mate-autogen
++
diff --git a/sysutils/mate-power-manager/files/patch-configure.ac b/sysutils/mate-power-manager/files/patch-configure.ac
new file mode 100644
index 000000000000..7b9571b09c3e
--- /dev/null
+++ b/sysutils/mate-power-manager/files/patch-configure.ac
@@ -0,0 +1,43 @@
+--- configure.ac.orig 2012-07-12 13:47:37.000000000 -0500
++++ configure.ac 2012-07-28 23:08:29.000000000 -0500
+@@ -58,21 +58,14 @@
+ 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 -Wno-strict-aliasing"
+ else
+ WARNINGFLAGS=""
+@@ -340,6 +333,18 @@
+ fi
+ AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])
+
++dnl ====================================================================
++dnl check for backtrace support
++dnl ====================================================================
++
++AC_CHECK_HEADERS(execinfo.h)
++AC_CHECK_LIB(execinfo, backtrace, [have_backtrace="yes"], [have_backtrace="no"])
++EXECINFO_LIBS=""
++if test "x$have_backtrace" = "xyes"; then
++ EXECINFO_LIBS="-lexecinfo"
++fi
++AC_SUBST(EXECINFO_LIBS)
++
+ dnl ---------------------------------------------------------------------------
+ dnl - Makefiles, etc.
+ dnl ---------------------------------------------------------------------------
diff --git a/sysutils/mate-power-manager/files/patch-src_Makefile.am b/sysutils/mate-power-manager/files/patch-src_Makefile.am
new file mode 100644
index 000000000000..ae3c50f05440
--- /dev/null
+++ b/sysutils/mate-power-manager/files/patch-src_Makefile.am
@@ -0,0 +1,42 @@
+--- src/Makefile.am.orig 2013-10-19 12:02:39.000000000 +0200
++++ src/Makefile.am 2013-10-19 12:03:48.000000000 +0200
+@@ -95,6 +95,7 @@
+ mate_power_backlight_helper_LDADD = \
+ libgpmshared.a \
+ $(GLIB_LIBS) \
++ $(EXECINFO_LIBS) \
+ -lm
+
+ mate_power_backlight_helper_CFLAGS = \
+@@ -117,6 +118,7 @@
+ $(MATE_LIBS) \
+ $(UNIQUE_LIBS) \
+ $(DBUS_LIBS) \
++ $(EXECINFO_LIBS) \
+ -lm
+
+ mate_power_statistics_CFLAGS = \
+@@ -138,6 +140,7 @@
+ $(UNIQUE_LIBS) \
+ $(GPM_EXTRA_LIBS) \
+ $(UPOWER_LIBS) \
++ $(EXECINFO_LIBS) \
+ -lm
+
+ mate_power_preferences_CFLAGS = \
+@@ -194,6 +197,7 @@
+ $(LIBNOTIFY_LIBS) \
+ $(GPM_EXTRA_LIBS) \
+ $(UPOWER_LIBS) \
++ $(EXECINFO_LIBS) \
+ -lm
+
+ mate_power_manager_CFLAGS = \
+@@ -262,6 +266,7 @@
+ $(X11_LIBS) \
+ $(LIBNOTIFY_LIBS) \
+ $(GPM_EXTRA_LIBS) \
++ $(EXECINFO_LIBS) \
+ -lm
+
+ mate_power_self_test_CFLAGS = -DEGG_TEST $(AM_CFLAGS) $(WARNINGFLAGS)
diff --git a/sysutils/mate-power-manager/files/patch-src_gpm-load.c b/sysutils/mate-power-manager/files/patch-src_gpm-load.c
new file mode 100644
index 000000000000..bd915e986605
--- /dev/null
+++ b/sysutils/mate-power-manager/files/patch-src_gpm-load.c
@@ -0,0 +1,46 @@
+--- src/gpm-load.c.orig 2012-07-28 22:37:47.000000000 -0500
++++ src/gpm-load.c 2012-07-28 22:39:40.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 @@
+ 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
+
+ /**