diff options
author | B. Watson <yalhcru@gmail.com> | 2010-05-12 23:28:25 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:28:25 +0200 |
commit | 877ec9bfd1adfc1306fe343b3cac43424a995421 (patch) | |
tree | 452846ac9fbf152c23016991812a1ea9b1d12a39 /desktop/wmclock | |
parent | 8122ac328cfc88f63ddee5724e61e077f4c9052d (diff) | |
download | slackbuilds-877ec9bfd1adfc1306fe343b3cac43424a995421.tar.gz |
desktop/wmclock: Added to 12.2 repository
Diffstat (limited to 'desktop/wmclock')
-rw-r--r-- | desktop/wmclock/README | 21 | ||||
-rw-r--r-- | desktop/wmclock/slack-desc | 19 | ||||
-rw-r--r-- | desktop/wmclock/wmclock.SlackBuild | 69 | ||||
-rw-r--r-- | desktop/wmclock/wmclock.info | 8 | ||||
-rw-r--r-- | desktop/wmclock/wmclock_nopolling.patch | 77 |
5 files changed, 194 insertions, 0 deletions
diff --git a/desktop/wmclock/README b/desktop/wmclock/README new file mode 100644 index 0000000000..8cbc6514a7 --- /dev/null +++ b/desktop/wmclock/README @@ -0,0 +1,21 @@ +wmclock is an applet which displays the date and time in a dockable +tile in the same style as the clock from the NEXTSTEP(tm) operating +system. wmclock is specially designed for the Window Maker window +manager, by Alfredo Kojima, and features multiple language support, +twenty-four-hour and twelve-hour (am/pm) time display, and, optionally, +can run a user-specified program on a mouse click. + +wmclock can display the month and weekday abbreviations in any of these +languages: + +breton czech danish dutch english french french2 german hungarian indonesian +italian norwegian portuguese russian slovene spanish swedish ukrainian + +To set the default language, set LANGUAGE to one of the above in the +environment before running wmclock.SlackBuild, e.g. + +# LANGUAGE=french ./wmclock.SlackBuild + +This only sets the default; the other languages can still be used via +the -monthxpm and -weekdayxpm command line options (see the wmclock man +page for details). diff --git a/desktop/wmclock/slack-desc b/desktop/wmclock/slack-desc new file mode 100644 index 0000000000..40e7f62cf2 --- /dev/null +++ b/desktop/wmclock/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +wmclock: wmclock (simple windowmaker clock/calendar dockapp) +wmclock: +wmclock: wmclock is an applet which displays the date and time in a dockable +wmclock: tile in the same style as the clock from the NEXTSTEP(tm) operating +wmclock: system. wmclock is specially designed for the Window Maker window +wmclock: manager, by Alfredo Kojima, and features multiple language support, +wmclock: twenty-four-hour and twelve-hour (am/pm) time display, and, optionally, +wmclock: can run a user-specified program on a mouse click. +wmclock: +wmclock: +wmclock: diff --git a/desktop/wmclock/wmclock.SlackBuild b/desktop/wmclock/wmclock.SlackBuild new file mode 100644 index 0000000000..49b45a56de --- /dev/null +++ b/desktop/wmclock/wmclock.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh + +# Slackware build script for wmclock + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=wmclock +VERSION=${VERSION:-1.0.12.2} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +# Patch to reduce CPU usage (from the author's website) +# Note: -p0, not the usual -p1! +patch -p0 < $CWD/wmclock_nopolling.patch + +# Set the default language with LANGUAGE=<language> in the environment +# Default is english. It's still possible to display in other +# languages using the -monthxpm and -weekdayxpm options. + +# Language choices: +# breton czech danish dutch english french french2 german hungarian indonesian +# italian norwegian portuguese russian slovene spanish swedish ukrainian + +LANGUAGE=${LANGUAGE:-english} +./configure --lang $LANGUAGE + +make CDEBUGFLAGS="$SLKCFLAGS" +mkdir -p $PKG/usr/bin +strip $PRGNAM +install -m0755 -o root -g root $PRGNAM $PKG/usr/bin +make install.share DESTDIR=$PKG + +mkdir -p $PKG/usr/man/man1 +gzip -9c $PRGNAM.man > $PKG/usr/man/man1/$PRGNAM.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp README COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/desktop/wmclock/wmclock.info b/desktop/wmclock/wmclock.info new file mode 100644 index 0000000000..9bbf1b6af7 --- /dev/null +++ b/desktop/wmclock/wmclock.info @@ -0,0 +1,8 @@ +PRGNAM="wmclock" +VERSION="1.0.12.2" +HOMEPAGE="http://liquidmeme.org/WindowMaker/wmclock/" +DOWNLOAD="http://liquidmeme.org/WindowMaker/wmclock/wmclock-1.0.12.2.tar.gz" +MD5SUM="97f6e82f55f216ba724859d4652586b4" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" +APPROVED="rworkman" diff --git a/desktop/wmclock/wmclock_nopolling.patch b/desktop/wmclock/wmclock_nopolling.patch new file mode 100644 index 0000000000..a5a338f784 --- /dev/null +++ b/desktop/wmclock/wmclock_nopolling.patch @@ -0,0 +1,77 @@ +--- wmclock.c.orig 2008-09-28 17:41:49.000000000 +0200 ++++ wmclock.c 2008-09-28 20:33:59.000000000 +0200 +@@ -20,6 +20,7 @@ + * with the software or the use or other dealings in the software. + */ + ++#include <sys/select.h> + #include <sys/types.h> + #include <sys/wait.h> + #include <sys/time.h> +@@ -141,7 +142,8 @@ + Display *dpy; + Window rootWindow; + int screen; +-/* int xFd; */ ++int xFd; ++fd_set xFdSet; + int displayDepth; + XSizeHints sizeHints; + XWMHints wmHints; +@@ -801,6 +803,7 @@ + XTextProperty wmName; + XClassHint classHint; + Pixmap shapeMask; ++ struct timeval nextEvent; + + /* Parse command line options */ + progName = extractProgName(argv[0]); +@@ -849,7 +852,7 @@ + screen = DefaultScreen(dpy); + rootWindow = RootWindow(dpy, screen); + displayDepth = DefaultDepth(dpy, screen); +- /* xFd = XConnectionNumber(dpy); */ ++ xFd = XConnectionNumber(dpy); + + /* Icon Daten nach XImage konvertieren */ + GetXpms(); +@@ -1049,14 +1052,32 @@ + poll((struct poll *) 0, (size_t) 0, 50); /* 5/100 sec */ + } + #else +- if (enableYearDisplay) +- { +- usleep(200000L); /* 1/5 sec */ +- } ++ //We compute the date of next event, in order to avoid polling ++ if (enableBlinking) ++ { ++ gettimeofday(&nextEvent,NULL); ++ nextEvent.tv_sec = 0; ++ nextEvent.tv_usec = 1000000-nextEvent.tv_usec; ++ } + else +- { +- usleep(50000L); /* 5/100 sec */ +- } ++ { ++ if (enableYearDisplay) ++ { ++ nextEvent.tv_sec = 86400-actualTime%86400; ++ nextEvent.tv_usec = 0; ++ } ++ else ++ { ++ nextEvent.tv_sec = 60-actualTime%60; ++ nextEvent.tv_usec = 0; ++ } ++ } ++ printf("xFd %d\n", xFd); ++ FD_ZERO(&xFdSet); ++ FD_SET(xFd,&xFdSet); ++ printf("debut select %d\n", nextEvent.tv_sec); ++ select(FD_SETSIZE,&xFdSet,NULL,NULL,&nextEvent); ++ printf("fin select\n"); + #endif + } + return(0); |