[Pkg-xfce-commits] r1544 - goodies/xfce4-battery-plugin/debian/patches

corsac at alioth.debian.org corsac at alioth.debian.org
Thu Jan 24 18:40:22 UTC 2008


Author: corsac
Date: 2008-01-24 18:40:22 +0000 (Thu, 24 Jan 2008)
New Revision: 1544

Modified:
   goodies/xfce4-battery-plugin/debian/patches/05_fix-apm-kfreebsd-amd64.patch
Log:
add correct patch


Modified: goodies/xfce4-battery-plugin/debian/patches/05_fix-apm-kfreebsd-amd64.patch
===================================================================
--- goodies/xfce4-battery-plugin/debian/patches/05_fix-apm-kfreebsd-amd64.patch	2008-01-21 15:11:59 UTC (rev 1543)
+++ goodies/xfce4-battery-plugin/debian/patches/05_fix-apm-kfreebsd-amd64.patch	2008-01-24 18:40:22 UTC (rev 1544)
@@ -1,31 +1,33 @@
---- panel-plugin/battery.c.orig	Wed Jan 24 20:42:09 2007
-+++ panel-plugin/battery.c	Wed Jan 24 20:46:51 2007
-@@ -378,6 +378,7 @@
-           rate = last_rate;
-         }
-         
-+#ifdef __linux__	
-         charge = (((float)ccapacity)/((float)lcapacity))*100;
+Index: xfce4-battery-plugin-0.5.0/panel-plugin/battery.c
+===================================================================
+--- xfce4-battery-plugin-0.5.0.orig/panel-plugin/battery.c	2008-01-24 19:34:30.000000000 +0100
++++ xfce4-battery-plugin-0.5.0/panel-plugin/battery.c	2008-01-24 19:34:34.000000000 +0100
+@@ -25,7 +25,7 @@
+ #include <config.h>
+ #endif
  
-         if ( last_acline )
-@@ -389,6 +390,20 @@
-             time_remaining = 0;
-         
-         last_acline = acline;
-+
-+#elif __FreeBSD__
-+	charge = acpistate->percentage;
-+
-+	if ( last_acline )
-+	    time_remaining = acpistate->rtime;
-+	else
-+	    time_remaining = acpistate->rtime;
-+
-+	if ( time_remaining < 0 )
-+	    time_remaining = 0;
-+
-+	last_acline = acline;
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__))
+ #include <machine/apm_bios.h>
+ #elif __OpenBSD__
+ #include <sys/param.h>
+@@ -163,7 +163,9 @@
+      except that is does not work on FreeBSD
+ 
+   */
++#ifdef APMDEVICE
+     struct apm_info apm;
 +#endif
+       int fd;
  
-     }    
- #ifdef __linux__
+     /* First check to see if ACPI is available */
+@@ -310,7 +312,9 @@
+       acline = apm.ac_state ? TRUE : FALSE;
+ 
+ #else
++#ifdef APMDEVICE
+     struct apm_info apm;
++#endif
+     DBG ("Updating battery status...");
+ 
+     if(battmon->method == BM_BROKEN) {




More information about the Pkg-xfce-commits mailing list