aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/xfce4-battery-plugin/files
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2003-08-01 22:32:00 +0800
committeroliver <oliver@FreeBSD.org>2003-08-01 22:32:00 +0800
commit683ae547194a114026ee5ed09d9fa3ff0a67b7bf (patch)
tree629b6cfa0ef9daf29ead4f1beb53178b6013e8f4 /sysutils/xfce4-battery-plugin/files
parent9a38f30299dc3c5a9f7187e0db75253633ed0688 (diff)
downloadfreebsd-ports-gnome-683ae547194a114026ee5ed09d9fa3ff0a67b7bf.tar.gz
freebsd-ports-gnome-683ae547194a114026ee5ed09d9fa3ff0a67b7bf.tar.zst
freebsd-ports-gnome-683ae547194a114026ee5ed09d9fa3ff0a67b7bf.zip
Add xfce4-battery-plugin 0.1.2,
battery monitor panel plugin for XFce4. PR: 55132 Submitted by: Thorsten Greiner <thorsten.greiner@web.de>
Diffstat (limited to 'sysutils/xfce4-battery-plugin/files')
-rw-r--r--sysutils/xfce4-battery-plugin/files/patch-configure21
-rw-r--r--sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c18
-rw-r--r--sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c53
3 files changed, 92 insertions, 0 deletions
diff --git a/sysutils/xfce4-battery-plugin/files/patch-configure b/sysutils/xfce4-battery-plugin/files/patch-configure
new file mode 100644
index 000000000000..a1d6a0e2fed0
--- /dev/null
+++ b/sysutils/xfce4-battery-plugin/files/patch-configure
@@ -0,0 +1,21 @@
+--- configure.orig Wed Jul 23 22:20:56 2003
++++ configure Fri Aug 1 12:56:48 2003
+@@ -19273,7 +19273,8 @@
+
+
+ # This can be used to rebuild libtool when needed
+-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool13/ltmain.sh"
++$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+@@ -19567,7 +19568,7 @@
+
+ echo "$as_me:$LINENO: checking where to install panel plugins" >&5
+ echo $ECHO_N "checking where to install panel plugins... $ECHO_C" >&6
+- XFCE4_PANEL_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir xfce4-panel-1.0`
++ XFCE4_PANEL_PLUGINSDIR=${prefix}/lib/xfce4/panel-plugins
+
+ echo "$as_me:$LINENO: result: $XFCE4_PANEL_PLUGINSDIR" >&5
+ echo "${ECHO_T}$XFCE4_PANEL_PLUGINSDIR" >&6
diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c
new file mode 100644
index 000000000000..43870a2a3c35
--- /dev/null
+++ b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c
@@ -0,0 +1,18 @@
+--- panel-plugin/apmlib.c.orig Thu Jul 31 09:34:47 2003
++++ panel-plugin/apmlib.c Thu Jul 31 09:18:25 2003
+@@ -18,6 +18,9 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
++
++#if defined(__linux__)
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -463,3 +466,5 @@
+
+ return buffer;
+ }
++
++#endif
diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c
new file mode 100644
index 000000000000..036526de39cf
--- /dev/null
+++ b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c
@@ -0,0 +1,53 @@
+--- panel-plugin/battmon.c.orig Fri Jul 18 15:15:29 2003
++++ panel-plugin/battmon.c Fri Aug 1 12:14:50 2003
+@@ -32,6 +32,10 @@
+
+ #ifdef __FreeBSD__
+ #include <machine/apm_bios.h>
++#include <fcntl.h>
++#ifndef APMDEVICE
++#define APMDEVICE "/dev/apm"
++#endif
+ #elif __OpenBSD__
+ #include <sys/param.h>
+ #include <machine/apmvar.h>
+@@ -187,6 +191,9 @@
+ #else
+ struct apm_info apm;
+ #endif
++#if defined(__FreeBSD__) || defined(__OpenBSD__)
++ int fd;
++#endif
+ int charge;
+ int time_remaining;
+ gboolean acline;
+@@ -217,8 +224,6 @@
+ FreeBSD. Each time this functions is called (once every second)
+ the APM device is opened, read from and then closed.
+ */
+- int fd;
+-
+ battmon->method = BM_BROKEN;
+ fd = open(APMDEVICE, O_RDONLY);
+ if (fd == -1) return TRUE;
+@@ -232,12 +237,18 @@
+ time_remaining = apm.ai_batt_time;
+ time_remaining = time_remaining / 60; /* convert from seconds to minutes */
+ charge = apm.ai_batt_life;
++
++ /*
++ * Work around a bug in the FreeBSD ACPI APM emulation layer which will
++ * sometimes return funny values for the battery life.
++ */
++ if(charge > 100) {
++ charge = 100;
++ }
+ #elif __OpenBSD__
+ /* Code for OpenBSD by Joe Ammond <jra@twinight.org>. Using the same
+ procedure as for FreeBSD.
+ */
+- int fd;
+-
+ battmon->method = BM_BROKEN;
+ fd = open(APMDEVICE, O_RDONLY);
+ if (fd == -1) return TRUE;