aboutsummaryrefslogtreecommitdiff
path: root/x11-clocks/tclock
diff options
context:
space:
mode:
authorSatoshi Taoka <taoka@FreeBSD.org>1999-04-01 03:05:05 +0000
committerSatoshi Taoka <taoka@FreeBSD.org>1999-04-01 03:05:05 +0000
commite3deacd2af41c9c3b5f6f7f1868abac2600cd820 (patch)
tree0cfa1dfdbe216132cd1e2497014441fcecc895ce /x11-clocks/tclock
parent0b46de581680710094aa0e39114220f7ddda54b9 (diff)
downloadports-e3deacd2af41c9c3b5f6f7f1868abac2600cd820.tar.gz
ports-e3deacd2af41c9c3b5f6f7f1868abac2600cd820.zip
Notes
Diffstat (limited to 'x11-clocks/tclock')
-rw-r--r--x11-clocks/tclock/Makefile22
-rw-r--r--x11-clocks/tclock/distinfo1
-rw-r--r--x11-clocks/tclock/files/patch-aa132
-rw-r--r--x11-clocks/tclock/pkg-comment1
-rw-r--r--x11-clocks/tclock/pkg-descr2
-rw-r--r--x11-clocks/tclock/pkg-plist1
6 files changed, 159 insertions, 0 deletions
diff --git a/x11-clocks/tclock/Makefile b/x11-clocks/tclock/Makefile
new file mode 100644
index 000000000000..5b1fdfc32d6e
--- /dev/null
+++ b/x11-clocks/tclock/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: tclock
+# Version required: 1.0.1
+# Date created: So 7 Feb 1999 20:50:43 MET
+# Whom: Lars Koeller <lkoeller@cc.fh-lippe.de>
+#
+# $Id$
+#
+
+DISTNAME= tclock-1.0.1
+CATEGORIES= x11-clocks
+MASTER_SITES= ftp://ftp.uni-potsdam.de/pub/X11/tools/clocks/ \
+ ftp://ftp.fh-anhalt.de/pub/soft/Xwindow/tools/clocks/ \
+ ftp://ftp.uni-bielefeld.de/pub/systems/FreeBSD/lkoeller/
+EXTRACT_SUFX= .tar.Z
+
+MAINTAINER= Lars.Koeller@Uni-Bielefeled.DE
+
+NO_WRKSUBDIR= yes
+USE_IMAKE= yes
+MAN1= tclock.1
+
+.include <bsd.port.mk>
diff --git a/x11-clocks/tclock/distinfo b/x11-clocks/tclock/distinfo
new file mode 100644
index 000000000000..9cc20ef16738
--- /dev/null
+++ b/x11-clocks/tclock/distinfo
@@ -0,0 +1 @@
+MD5 (tclock-1.0.1.tar.Z) = 3eca9837135a69af6fe7214fb0bc6533
diff --git a/x11-clocks/tclock/files/patch-aa b/x11-clocks/tclock/files/patch-aa
new file mode 100644
index 000000000000..c5b69a5e1118
--- /dev/null
+++ b/x11-clocks/tclock/files/patch-aa
@@ -0,0 +1,132 @@
+*** tclock.c Sun Feb 7 20:24:51 1999
+--- work/tclock.c Sun Feb 7 20:34:52 1999
+***************
+*** 22,28 ****
+--- 22,31 ----
+ */
+
+ #include <stdio.h>
++ #include <stdlib.h>
++ #include <unistd.h>
+ #include <math.h>
++ #include <time.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xos.h>
+***************
+*** 51,57 ****
+ int screen_number;
+ Window rootWindow, mainWindow;
+ int ShapeEventNumber, ShapeErrorNumber;
+! long clock;
+ struct tm lastTimes, times;
+ Pixmap border, clip;
+ GC clearGC, drawGC;
+--- 54,60 ----
+ int screen_number;
+ Window rootWindow, mainWindow;
+ int ShapeEventNumber, ShapeErrorNumber;
+! time_t lclock;
+ struct tm lastTimes, times;
+ Pixmap border, clip;
+ GC clearGC, drawGC;
+***************
+*** 212,218 ****
+ XShapeCombineMask(display, mainWindow, ShapeBounding, 0, 0, border, ShapeSet);
+ XShapeCombineMask(display, mainWindow, ShapeClip, 0, 0, clip, ShapeSet);
+
+! XFlush(display, 1);
+
+ /* This call to XPending ensures that if the window gets closed, we die */
+ XPending(display);
+--- 215,221 ----
+ XShapeCombineMask(display, mainWindow, ShapeBounding, 0, 0, border, ShapeSet);
+ XShapeCombineMask(display, mainWindow, ShapeClip, 0, 0, clip, ShapeSet);
+
+! XFlush(display);
+
+ /* This call to XPending ensures that if the window gets closed, we die */
+ XPending(display);
+***************
+*** 233,243 ****
+ int
+ sigalrm()
+ {
+! clock = time(0);
+! times = *localtime(&clock);
+ times.tm_hour = times.tm_hour * 5 + times.tm_min / 12;
+ reshape();
+! signal(SIGALRM, sigalrm); /* For SysV lusers */
+ }
+
+ unsigned long
+--- 236,246 ----
+ int
+ sigalrm()
+ {
+! lclock = time(0);
+! times = *localtime(&lclock);
+ times.tm_hour = times.tm_hour * 5 + times.tm_min / 12;
+ reshape();
+! signal(SIGALRM, (void *)sigalrm); /* For SysV lusers */
+ }
+
+ unsigned long
+***************
+*** 330,336 ****
+ display = XOpenDisplay(displayName);
+ if(display == 0)
+ {
+! fprintf("Couldn't open display %s\n", displayName);
+ exit(-1);
+ }
+
+--- 333,339 ----
+ display = XOpenDisplay(displayName);
+ if(display == 0)
+ {
+! fprintf(stderr, "Couldn't open display %s\n", displayName);
+ exit(-1);
+ }
+
+***************
+*** 347,353 ****
+ if(access(fn, R_OK) == 0)
+ XrmMergeDatabases(XrmGetFileDatabase(fn), &db);
+
+! if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT")) == 0)
+ XrmMergeDatabases(XrmGetFileDatabase(getenv("XENVIRONMENT")), &db);
+
+ XrmMergeDatabases(cmdDB, &db);
+--- 350,356 ----
+ if(access(fn, R_OK) == 0)
+ XrmMergeDatabases(XrmGetFileDatabase(fn), &db);
+
+! if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT"), R_OK) == 0)
+ XrmMergeDatabases(XrmGetFileDatabase(getenv("XENVIRONMENT")), &db);
+
+ XrmMergeDatabases(cmdDB, &db);
+***************
+*** 410,416 ****
+ XMapRaised(display, mainWindow);
+ XFlush(display);
+
+! signal(SIGALRM, sigalrm);
+ new.it_interval.tv_sec = 1;
+ new.it_value.tv_sec = 1;
+ new.it_interval.tv_usec = 0;
+--- 413,419 ----
+ XMapRaised(display, mainWindow);
+ XFlush(display);
+
+! signal(SIGALRM, (void *)sigalrm);
+ new.it_interval.tv_sec = 1;
+ new.it_value.tv_sec = 1;
+ new.it_interval.tv_usec = 0;
+***************
+*** 420,423 ****
+ for(;;)
+ sigpause(0);
+ }
+-
+--- 423,425 ----
diff --git a/x11-clocks/tclock/pkg-comment b/x11-clocks/tclock/pkg-comment
new file mode 100644
index 000000000000..c696fd6b2f85
--- /dev/null
+++ b/x11-clocks/tclock/pkg-comment
@@ -0,0 +1 @@
+transparent analog clock for x11
diff --git a/x11-clocks/tclock/pkg-descr b/x11-clocks/tclock/pkg-descr
new file mode 100644
index 000000000000..ba0eb387ace8
--- /dev/null
+++ b/x11-clocks/tclock/pkg-descr
@@ -0,0 +1,2 @@
+
+ Tclock displays an analog clock with a transparent face.
diff --git a/x11-clocks/tclock/pkg-plist b/x11-clocks/tclock/pkg-plist
new file mode 100644
index 000000000000..c13d4180b885
--- /dev/null
+++ b/x11-clocks/tclock/pkg-plist
@@ -0,0 +1 @@
+bin/tclock