Patch from bug 165989 to fix temperature and fan status.
authorSamuli Suominen <ssuominen@gentoo.org>
Fri, 9 Feb 2007 14:45:05 +0000 (14:45 +0000)
committerSamuli Suominen <ssuominen@gentoo.org>
Fri, 9 Feb 2007 14:45:05 +0000 (14:45 +0000)
Package-Manager: portage-2.1.2-r9

xfce-extra/xfce4-battery/ChangeLog
xfce-extra/xfce4-battery/Manifest
xfce-extra/xfce4-battery/files/digest-xfce4-battery-0.5.0-r1 [new file with mode: 0644]
xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-libacpi.patch [new file with mode: 0644]
xfce-extra/xfce4-battery/xfce4-battery-0.5.0-r1.ebuild [new file with mode: 0644]

index b779e485e7a7b0bb14bb206293207b36ba48e624..d54c642cd1e9c45f0af914fc6006bee41a7b438d 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for xfce-extra/xfce4-battery
 # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/ChangeLog,v 1.41 2007/02/05 17:38:58 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/ChangeLog,v 1.42 2007/02/09 14:45:05 drac Exp $
+
+*xfce4-battery-0.5.0-r1 (09 Feb 2007)
+
+  09 Feb 2007; Samuli Suominen <drac@gentoo.org>
+  +files/xfce4-battery-0.5.0-libacpi.patch, +xfce4-battery-0.5.0-r1.ebuild:
+  Patch from bug 165989 to fix temperature and fan status.
 
   05 Feb 2007; Christian Faulhammer <opfer@gentoo.org>
   xfce4-battery-0.3.0-r2.ebuild:
index 8ae345150d2c38d50ff8b902db627ae1289ce35b..4ecbf5a844ffd6fd24553e2c5badf2ec8741e06a 100644 (file)
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX ac_adapter.patch 844 RMD160 f45412afe6fd641f6ca0ed2c4ea8e16e19a62652 SHA1 0868dd50e9738f4a0ca906de7c86f4795a20c1c5 SHA256 c95c971fdef386dd71efad82963a2dab74fb9295d6bc323565488c16c5301b9d
 MD5 7e83c3e57eb87b819dec88cdfeb289df files/ac_adapter.patch 844
 RMD160 f45412afe6fd641f6ca0ed2c4ea8e16e19a62652 files/ac_adapter.patch 844
@@ -9,6 +6,10 @@ AUX xfce4-battery-0.5.0-freebsd.patch 675 RMD160 f670161edade82ecf78aee3ef9da0e2
 MD5 09af8d61b1894f6799ddcb1dbe30afb9 files/xfce4-battery-0.5.0-freebsd.patch 675
 RMD160 f670161edade82ecf78aee3ef9da0e230a667cd6 files/xfce4-battery-0.5.0-freebsd.patch 675
 SHA256 7dee4e6556334cd985e69e70992719f7fca21dce3bed75b8780153fddda1a175 files/xfce4-battery-0.5.0-freebsd.patch 675
+AUX xfce4-battery-0.5.0-libacpi.patch 1505 RMD160 709bd01ddbbfb2bf117d0e87d0642c463676c167 SHA1 e14de88cab52ed6e6146122f9997b8b93b3a301e SHA256 1f49924a10c5e53f88912db3e63dc382052e68fdd4c1ea439771a504f5f08566
+MD5 993c7daead43f7b115f7cb27f4f2dfc7 files/xfce4-battery-0.5.0-libacpi.patch 1505
+RMD160 709bd01ddbbfb2bf117d0e87d0642c463676c167 files/xfce4-battery-0.5.0-libacpi.patch 1505
+SHA256 1f49924a10c5e53f88912db3e63dc382052e68fdd4c1ea439771a504f5f08566 files/xfce4-battery-0.5.0-libacpi.patch 1505
 DIST xfce4-battery-plugin-0.3.0.tar.gz 322286 RMD160 3fbf0f1cf8851b59967105a95b43c8d1adf5417e SHA1 3a6ca86d29050707eb579f215475cc3689c5f24f SHA256 8044995f61f12fcd8ec2a44739293ed0adbe7adf04587aee3a31630fb5bb93b4
 DIST xfce4-battery-plugin-0.5.0.tar.bz2 222269 RMD160 bbf64994c7686b11b6a51bd7728569cd2a5d9777 SHA1 63439d32bfe8411458d41c38824cb393bc31d6e0 SHA256 4428f2fe1f5f28e6cc711278fd9c5c90f325cf0c5298f98a5d60940116cbcef8
 EBUILD xfce4-battery-0.3.0-r1.ebuild 378 RMD160 6d3fd097cbab9a3b9aa29460af05017320e46b16 SHA1 d7233f05eea07396bf2440ed3ea557e173f3e576 SHA256 88be13516863375d6525a12511c04f084a614c03a317088bf9e5281d35f799ae
@@ -19,14 +20,18 @@ EBUILD xfce4-battery-0.3.0-r2.ebuild 520 RMD160 9648b7a70fb801e2166df0efdf44d4eb
 MD5 b0bd2b1cea689dd1e0bd6752f1599af0 xfce4-battery-0.3.0-r2.ebuild 520
 RMD160 9648b7a70fb801e2166df0efdf44d4eb31d0df11 xfce4-battery-0.3.0-r2.ebuild 520
 SHA256 b304f77dd86cf8b67bde64af7fc8398baa7e587fd8924e6698b42e605dfc064b xfce4-battery-0.3.0-r2.ebuild 520
+EBUILD xfce4-battery-0.5.0-r1.ebuild 632 RMD160 d1e822b0d1d1c87a763193f80de998511c1df367 SHA1 ea2d5c6dccc18131f2053d6275caecd12ad5921c SHA256 04d1ef7e61e3909643985fe91d107c24981e379153a92cabb7a89d73e41faf70
+MD5 36604906d55327ee4736dd6dc5e9faec xfce4-battery-0.5.0-r1.ebuild 632
+RMD160 d1e822b0d1d1c87a763193f80de998511c1df367 xfce4-battery-0.5.0-r1.ebuild 632
+SHA256 04d1ef7e61e3909643985fe91d107c24981e379153a92cabb7a89d73e41faf70 xfce4-battery-0.5.0-r1.ebuild 632
 EBUILD xfce4-battery-0.5.0.ebuild 532 RMD160 46197c077aa0359d47e53c88cd659eb6500f7825 SHA1 990429b545471bcfed6abc3dbcdf4ef863896237 SHA256 b5fe23129a24c6797a50ce4d342ba2c24530c078b0ee0ac3aa172192debcfad0
 MD5 b561162e6000e0d076eda4077f4c47df xfce4-battery-0.5.0.ebuild 532
 RMD160 46197c077aa0359d47e53c88cd659eb6500f7825 xfce4-battery-0.5.0.ebuild 532
 SHA256 b5fe23129a24c6797a50ce4d342ba2c24530c078b0ee0ac3aa172192debcfad0 xfce4-battery-0.5.0.ebuild 532
-MISC ChangeLog 5697 RMD160 3fd54ba683b3b8c46b8fa6ab73a5bd516191941f SHA1 de8f2606b05b32a3a9880aca00f0bf9a1b28c128 SHA256 ae4df236e2aea461e3bf0fbd78526f9f6092a9d5bc103c9b73b2cb7039ca2d30
-MD5 2a422f4b327e2293828f4ba877a9f2bf ChangeLog 5697
-RMD160 3fd54ba683b3b8c46b8fa6ab73a5bd516191941f ChangeLog 5697
-SHA256 ae4df236e2aea461e3bf0fbd78526f9f6092a9d5bc103c9b73b2cb7039ca2d30 ChangeLog 5697
+MISC ChangeLog 5920 RMD160 a6920ac065248ffabc96b214dde0245165dd604f SHA1 9762fcf4c2d90cb3580a4d2acf59ff9badce605b SHA256 f2b88936b62896a14faa478b58d2aef2c5d97950843cf425e49f3c7534dfc660
+MD5 98267b0abdc1ef754460837958af4dfd ChangeLog 5920
+RMD160 a6920ac065248ffabc96b214dde0245165dd604f ChangeLog 5920
+SHA256 f2b88936b62896a14faa478b58d2aef2c5d97950843cf425e49f3c7534dfc660 ChangeLog 5920
 MISC metadata.xml 157 RMD160 d7470fe88d1b96f3a7f1ef26fb7dc646b4a1b907 SHA1 7eae91f2588bdae8667d37a98fb3090d539eeca1 SHA256 44350daa7594842894d676413708d8ea77ccb0017bed24711af5b256281f5e61
 MD5 c390804e060ffd11a5bbb143434b2b2d metadata.xml 157
 RMD160 d7470fe88d1b96f3a7f1ef26fb7dc646b4a1b907 metadata.xml 157
@@ -40,10 +45,6 @@ SHA256 0c7e1b4ff261588c586e56316f9ebd579d627d56dd2e13256b5949c093fe8a3e files/di
 MD5 e2eec6e047896be338d150e33d940ace files/digest-xfce4-battery-0.5.0 283
 RMD160 9e29a0847e5a193a1ac5d9808f367b45d39f9817 files/digest-xfce4-battery-0.5.0 283
 SHA256 45a858bae490c0a8e69b0891d7d8c1ccf7274476e0b27d34e33130d1a3720272 files/digest-xfce4-battery-0.5.0 283
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
-
-iD8DBQFFx2uKNQqtfCuFneMRAl0LAJ9Cn4wdnhwUX8xO/XdJrd1NyQjYPQCdH6Ny
-ZoKvmxGIc4t7VwtcV09SSd8=
-=lam9
------END PGP SIGNATURE-----
+MD5 e2eec6e047896be338d150e33d940ace files/digest-xfce4-battery-0.5.0-r1 283
+RMD160 9e29a0847e5a193a1ac5d9808f367b45d39f9817 files/digest-xfce4-battery-0.5.0-r1 283
+SHA256 45a858bae490c0a8e69b0891d7d8c1ccf7274476e0b27d34e33130d1a3720272 files/digest-xfce4-battery-0.5.0-r1 283
diff --git a/xfce-extra/xfce4-battery/files/digest-xfce4-battery-0.5.0-r1 b/xfce-extra/xfce4-battery/files/digest-xfce4-battery-0.5.0-r1
new file mode 100644 (file)
index 0000000..6ccdc2f
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 c1d923bb90b79087ca7044bcc24bab5a xfce4-battery-plugin-0.5.0.tar.bz2 222269
+RMD160 bbf64994c7686b11b6a51bd7728569cd2a5d9777 xfce4-battery-plugin-0.5.0.tar.bz2 222269
+SHA256 4428f2fe1f5f28e6cc711278fd9c5c90f325cf0c5298f98a5d60940116cbcef8 xfce4-battery-plugin-0.5.0.tar.bz2 222269
diff --git a/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-libacpi.patch b/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-libacpi.patch
new file mode 100644 (file)
index 0000000..c683b3e
--- /dev/null
@@ -0,0 +1,56 @@
+diff -ur xfce4-battery-plugin-0.5.0.orig/panel-plugin/libacpi.c xfce4-battery-plugin-0.5.0/panel-plugin/libacpi.c
+--- xfce4-battery-plugin-0.5.0.orig/panel-plugin/libacpi.c     2007-01-17 19:56:51.000000000 +0200
++++ xfce4-battery-plugin-0.5.0/panel-plugin/libacpi.c  2007-02-09 16:34:40.000000000 +0200
+@@ -30,6 +30,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <glob.h>
+ #if HAVE_SYSCTL
+@@ -181,6 +182,22 @@
+ #endif
+ #endif
++/* expand file name and fopen first match */
++static FILE *
++fopen_glob(const char *name, const char *mode)
++{
++  glob_t globbuf;
++  FILE *fd;
++
++  if (glob(name, 0, NULL, &globbuf) != 0)
++    return NULL;
++
++  fd = fopen(globbuf.gl_pathv[0], mode);
++  globfree(&globbuf);
++
++  return fd;
++}
++
+ /* see if we have ACPI support */
+ int check_acpi(void)
+ {
+@@ -693,7 +710,7 @@
+         else return 0;
+     }
+     proc_fan_status="/proc/acpi/fan/*/state";
+-    if ( (fp=fopen(proc_fan_status, "r")) == NULL ) return 0;
++    if ( (fp=fopen_glob(proc_fan_status, "r")) == NULL ) return 0;
+     fgets(line,255,fp);
+     fclose(fp);
+@@ -706,10 +723,10 @@
+ {
+ #ifdef __linux__
+   FILE *fp;
+-  char *proc_temperature="/proc/acpi/thermal_zone/*0/temperature";
++  char *proc_temperature="/proc/acpi/thermal_zone/*/temperature";
+   static char *p,line[256];
+-  if ( (fp=fopen(proc_temperature, "r")) == NULL) return NULL;
++  if ( (fp=fopen_glob(proc_temperature, "r")) == NULL) return NULL;
+   fgets(line,255,fp);
+   fclose(fp);
+   p=strtok(line," ");
diff --git a/xfce-extra/xfce4-battery/xfce4-battery-0.5.0-r1.ebuild b/xfce-extra/xfce4-battery/xfce4-battery-0.5.0-r1.ebuild
new file mode 100644 (file)
index 0000000..951a0cd
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/xfce4-battery-0.5.0-r1.ebuild,v 1.1 2007/02/09 14:45:05 drac Exp $
+
+inherit eutils xfce44
+
+xfce44
+xfce44_goodies_panel_plugin
+
+DESCRIPTION="Battery status panel plugin"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug"
+
+DEPEND="dev-util/pkgconfig
+       dev-util/intltool"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       epatch "${FILESDIR}"/${P}-freebsd.patch
+       epatch "${FILESDIR}"/${P}-libacpi.patch
+}
+
+DOCS="AUTHORS ChangeLog NEWS README"