diff options
Diffstat (limited to 'extra/icewm')
-rw-r--r-- | extra/icewm/PKGBUILD | 11 | ||||
-rw-r--r-- | extra/icewm/icewm-cpustatus.patch | 45 |
2 files changed, 52 insertions, 4 deletions
diff --git a/extra/icewm/PKGBUILD b/extra/icewm/PKGBUILD index 1a0b1fc72..4bd344e42 100644 --- a/extra/icewm/PKGBUILD +++ b/extra/icewm/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 160012 2012-05-28 00:49:21Z eric $ +# $Id: PKGBUILD 160075 2012-05-29 22:01:31Z eric $ # Maintainer: Eric BĂ©langer <eric@archlinux.org> pkgname=icewm pkgver=1.3.7 -pkgrel=2 +pkgrel=3 pkgdesc="A Window Manager designed for speed, usability, and consistency" arch=('i686' 'x86_64') url="http://www.icewm.org/" @@ -11,12 +11,14 @@ license=('LGPL') depends=('libxrandr' 'libxft' 'libsm' 'libxinerama' 'gdk-pixbuf2') makedepends=('xorg-mkfontdir') source=(http://downloads.sourceforge.net/sourceforge/icewm/${pkgname}-${pkgver}.tar.gz - use_ICEWM_deprecated.patch ignore_workarea_hints.patch no_proc_acpi.patch wmclient.patch) + use_ICEWM_deprecated.patch ignore_workarea_hints.patch no_proc_acpi.patch + wmclient.patch icewm-cpustatus.patch) sha1sums=('ce8d86190e275dc7db2d8c28472a579264120803' 'ac8f352ba5ee33e19ce75fdeed890361550e125a' '49ca37ae41290f17a71a177b1f774235f91d79f1' 'a47fb4191f30b8f42a6bd90ca5d7941bb3d65338' - 'd16b4b3ab269a657e735e343833973d000c0b35b') + 'd16b4b3ab269a657e735e343833973d000c0b35b' + '0f4a02153496dadd26742f6bd3bdc166d7eafaed') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -24,6 +26,7 @@ build() { patch -p1 -i "${srcdir}/ignore_workarea_hints.patch" patch -p1 -i "${srcdir}/no_proc_acpi.patch" patch -p1 -i "${srcdir}/wmclient.patch" + patch -p2 -i "${srcdir}/icewm-cpustatus.patch" LIBS+="-lfontconfig" ./configure --prefix=/usr --sysconfdir=/etc \ --enable-shaped-decorations --enable-gradients make diff --git a/extra/icewm/icewm-cpustatus.patch b/extra/icewm/icewm-cpustatus.patch new file mode 100644 index 000000000..9bb9241f0 --- /dev/null +++ b/extra/icewm/icewm-cpustatus.patch @@ -0,0 +1,45 @@ + icewm/src/acpustatus.cc | 31 +++++++++++++++++++++++++++++++ + 1 files changed, 31 insertions(+), 0 deletions(-) + +diff --git a/icewm/src/acpustatus.cc b/icewm/src/acpustatus.cc +index 5e959d6..b9e5450 100644 +--- a/icewm/src/acpustatus.cc ++++ b/icewm/src/acpustatus.cc +@@ -315,6 +315,37 @@ int CPUStatus::getAcpiTemp(char *tempbuf, int buflen) { + } + closedir(dir); + } ++ else if ((dir = opendir("/sys/class/thermal")) != NULL) { ++ struct dirent *de; ++ ++ while ((de = readdir(dir)) != NULL) { ++ ++ int fd, seglen; ++ ++ if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) ++ continue; ++ ++ sprintf(namebuf, "/sys/class/thermal/%s/temp", de->d_name); ++ fd = open(namebuf, O_RDONLY); ++ if (fd != -1) { ++ int len = read(fd, buf, sizeof(buf) - 1); ++ buf[len - 4] = '\0'; ++ seglen = strlen(buf) + 4; ++ if (retbuflen + seglen >= buflen) { ++ retbuflen = -retbuflen; ++ close(fd); ++ closedir(dir); ++ break; ++ } ++ retbuflen += seglen; ++ strcat(tempbuf, " "); ++ strncat(tempbuf, buf, seglen); ++ strcat(tempbuf, " C"); ++ close(fd); ++ } ++ } ++ closedir(dir); ++ } + return retbuflen; + } + |