summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <drac@gentoo.org>2007-02-09 14:45:05 +0000
committerSamuli Suominen <drac@gentoo.org>2007-02-09 14:45:05 +0000
commit76acbeb4909bd7b3585b801aaa9c6eb62aa687ea (patch)
treeed07fcd36a1e1e2e5cbc3fbb6d53ef8954204014 /xfce-extra
parentnow finally ppc stable (diff)
downloadgentoo-2-76acbeb4909bd7b3585b801aaa9c6eb62aa687ea.tar.gz
gentoo-2-76acbeb4909bd7b3585b801aaa9c6eb62aa687ea.tar.bz2
gentoo-2-76acbeb4909bd7b3585b801aaa9c6eb62aa687ea.zip
Patch from bug 165989 to fix temperature and fan status.
(Portage version: 2.1.2-r9)
Diffstat (limited to 'xfce-extra')
-rw-r--r--xfce-extra/xfce4-battery/ChangeLog8
-rw-r--r--xfce-extra/xfce4-battery/files/digest-xfce4-battery-0.5.0-r13
-rw-r--r--xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-libacpi.patch56
-rw-r--r--xfce-extra/xfce4-battery/xfce4-battery-0.5.0-r1.ebuild25
4 files changed, 91 insertions, 1 deletions
diff --git a/xfce-extra/xfce4-battery/ChangeLog b/xfce-extra/xfce4-battery/ChangeLog
index b779e485e7a7..d54c642cd1e9 100644
--- a/xfce-extra/xfce4-battery/ChangeLog
+++ b/xfce-extra/xfce4-battery/ChangeLog
@@ -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:
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
index 000000000000..6ccdc2f2dd92
--- /dev/null
+++ b/xfce-extra/xfce4-battery/files/digest-xfce4-battery-0.5.0-r1
@@ -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
index 000000000000..c683b3e002f8
--- /dev/null
+++ b/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-libacpi.patch
@@ -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
index 000000000000..951a0cdd5d2a
--- /dev/null
+++ b/xfce-extra/xfce4-battery/xfce4-battery-0.5.0-r1.ebuild
@@ -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"