From ceb17b233beeaf2059a13368db1d99f3b40128ba Mon Sep 17 00:00:00 2001 From: Mikhail Kolesnik Date: Sat, 22 Mar 2008 23:19:54 +0200 Subject: [PATCH] wmint: updated to 0.9, added trivial patch to save laptop battery --- wmint/.md5sum | 3 ++- wmint/Pkgfile | 15 ++++++++----- wmint/wmint-sleep.diff | 50 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 wmint/wmint-sleep.diff diff --git a/wmint/.md5sum b/wmint/.md5sum index e41962bc2..6edfde168 100644 --- a/wmint/.md5sum +++ b/wmint/.md5sum @@ -1 +1,2 @@ -5c5fb16a32a7ad529fb44da2e051424a wmint-0.8.tar.gz +ba8ee8e741b1a1bb89fc8de13d6e74bb wmint-0.9.tar.bz2 +3059f569be017eb4982ea7fc41ee62e7 wmint-sleep.diff diff --git a/wmint/Pkgfile b/wmint/Pkgfile index 982e0a8ed..81c1bdd4d 100644 --- a/wmint/Pkgfile +++ b/wmint/Pkgfile @@ -1,15 +1,20 @@ # Description: A dockable app that displays flashing lights for IRQ's # URL: http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/sys.html # Maintainer: Mikhail Kolesnik, mike at openbunker dot org -# Depends on: x11 +# Depends on: xorg-libxpm name=wmint -version=0.8 -release=2 -source=(http://web.cs.mun.ca/~gstarkes/wmaker/dockapps/files/$name-$version.tar.gz) +version=0.9 +release=1 +source=(http://ftp.sh.cvut.cz/MIRRORS/rock/ROCK-2.1/w/$name-$version.tar.bz2 \ + wmint-sleep.diff) build() { - cd $name.app/wmint + cd $name-$version/$name + + # adds -s switch to prevent frequent wakeups + patch -p2 -i $SRC/wmint-sleep.diff + make /usr/bin/install -D -m 755 wmint $PKG/usr/bin/wmint } diff --git a/wmint/wmint-sleep.diff b/wmint/wmint-sleep.diff new file mode 100644 index 000000000..d5479bb35 --- /dev/null +++ b/wmint/wmint-sleep.diff @@ -0,0 +1,50 @@ +diff -Nru wmint-0.9-orig/wmint/wmint.c wmint-0.9/wmint/wmint.c +--- wmint-0.9-orig/wmint/wmint.c 2008-03-22 22:57:17.771804010 +0200 ++++ wmint-0.9/wmint/wmint.c 2008-03-22 23:08:51.358802106 +0200 +@@ -36,6 +36,7 @@ + #define WMINT_VERSION "0.9" + + char *ProgName; ++unsigned int usecs = 10000; + + typedef struct { + unsigned short bit; +@@ -110,6 +111,19 @@ + exit(1); + }; + break; ++ case 's' : ++ if (++i == argc) ++ { ++ usage(); ++ exit(1); ++ }; ++ usecs = (unsigned int) strtol(argv[i], &endp, 10); ++ if (*endp || usecs<0 || usecs>1000000) ++ { ++ usage(); ++ exit(1); ++ }; ++ break; + case 'v' : + printVersion(); + exit(0); +@@ -269,7 +283,7 @@ + break; + } + } +- usleep(10000L); ++ usleep(usecs); + } + + } +@@ -526,7 +540,8 @@ + fprintf(stderr, "\nwmint - Sébastien Liénard <%s>, GCU (%s)\n\n",MY_EMAIL,GCU_HOME); + fprintf(stderr, "usage:\n"); + fprintf(stderr, "\t-d \n"); +- fprintf(stderr, "\t-i \n"); ++ fprintf(stderr, "\t-i \n"); ++ fprintf(stderr, "\t-s \n", usecs); + fprintf(stderr, "\t-h\tthis help screen\n"); + fprintf(stderr, "\t-v\tprint the version number\n"); + fprintf(stderr, "\n");