diff options
Diffstat (limited to 'main/xfce4-battery-plugin')
-rw-r--r-- | main/xfce4-battery-plugin/APKBUILD | 12 | ||||
-rw-r--r-- | main/xfce4-battery-plugin/sysfs-temp.patch | 66 |
2 files changed, 6 insertions, 72 deletions
diff --git a/main/xfce4-battery-plugin/APKBUILD b/main/xfce4-battery-plugin/APKBUILD index 9e58dd7b92..00055fa2f4 100644 --- a/main/xfce4-battery-plugin/APKBUILD +++ b/main/xfce4-battery-plugin/APKBUILD @@ -1,15 +1,15 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=xfce4-battery-plugin -pkgver=1.0.0 -pkgrel=2 +pkgver=1.0.1 +pkgrel=0 pkgdesc="A battery monitor plugin for the Xfce panel" url="http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin" arch="all" license="GPL-2" -makedepends="xfce4-panel-dev libxfcegui4-dev perl-xml-parser intltool" +makedepends="xfce4-panel-dev libxfce4ui-dev perl-xml-parser intltool" install= +subpackages="$pkgname-lang" source="http://archive.xfce.org/src/panel-plugins/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2 - sysfs-temp.patch " prepare() { @@ -34,6 +34,6 @@ build() { package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR="$pkgdir" install + rm "$pkgdir"/usr/lib/xfce4/panel/plugins/*.la } -md5sums="2696307f34f6b9630fcaaea102004e78 xfce4-battery-plugin-1.0.0.tar.bz2 -8c797bdd29b431284377a7f08ddcd50e sysfs-temp.patch" +md5sums="ad2a1f12ae3e2ea66948c89a1c8a287d xfce4-battery-plugin-1.0.1.tar.bz2" diff --git a/main/xfce4-battery-plugin/sysfs-temp.patch b/main/xfce4-battery-plugin/sysfs-temp.patch deleted file mode 100644 index d20680ed8d..0000000000 --- a/main/xfce4-battery-plugin/sysfs-temp.patch +++ /dev/null @@ -1,66 +0,0 @@ -From e33899de3205edfc0b2c330f43da6a4bc8141b85 Mon Sep 17 00:00:00 2001 -From: Florian Rivoal <frivoal@xfce.org> -Date: Sat, 26 Feb 2011 13:53:09 +0000 -Subject: Add support for getting the temperature from sysfs - -Up to the linux kernel version 2.6.37, this information was available in -the proc file system, but after that, it is only available from the sys -file system. - -This fixes bug #7339. ---- -diff --git a/panel-plugin/libacpi.c b/panel-plugin/libacpi.c -index 838a760..0e368f4 100644 ---- a/panel-plugin/libacpi.c -+++ b/panel-plugin/libacpi.c -@@ -1002,18 +1002,36 @@ const char *get_temperature(void) - #ifdef __linux__ - FILE *fp; - char *proc_temperature="/proc/acpi/thermal_zone/*/temperature"; -- static char *p,line[256]; -- -- if ( (fp=fopen_glob(proc_temperature, "r")) == NULL) return NULL; -- fgets(line,255,fp); -- fclose(fp); -- p=strtok(line," "); -- if (!p) return NULL; -- p=p+strlen(p)+1; -- while (p && *p ==' ') p++; -- if (*p==0) return NULL; -- if (strchr(p,'\n')) p=strtok(p,"\n"); -- return (const char *)p; -+ char *sys_temperature="/sys/class/thermal/thermal_zone*/temp"; -+ static char *p,*p2,line[256]; -+ -+ if ( (fp=fopen_glob(proc_temperature, "r")) != NULL ) -+ { -+ fgets(line,255,fp); -+ fclose(fp); -+ p=strtok(line," "); -+ if (!p) return NULL; -+ p=p+strlen(p)+1; -+ while (p && *p ==' ') p++; -+ if (*p==0) return NULL; -+ if (strchr(p,'\n')) p=strtok(p,"\n"); -+ return (const char *)p; -+ } -+ else if ( (fp=fopen_glob(sys_temperature, "r")) != NULL ) -+ { -+ fgets(line,255,fp); -+ fclose(fp); -+ p = line; -+ if (strchr(p,'\n')) *strchr(p,'\n') = 0; -+ if (strlen(p) <= 3) return NULL; -+ p2 = p + strlen(p) - 3; -+ strcpy(p2, " C"); -+ return (const char *)p; -+ } -+ else -+ { -+ return NULL; -+ } - #else - #ifdef HAVE_SYSCTL - static char buf[BUFSIZ]; --- -cgit v0.8.3.4 |