diff options
author | wiz <wiz@pkgsrc.org> | 2000-12-17 23:32:09 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2000-12-17 23:32:09 +0000 |
commit | df7948804e18401baeb9f3f2ca9b7ded3f4f66c7 (patch) | |
tree | 73288b5bb97270ccddd92731e20bbfff8858d306 /time/dclock | |
parent | 389033175de2a6d1922929cf5b7598f2da56932a (diff) | |
download | pkgsrc-df7948804e18401baeb9f3f2ca9b7ded3f4f66c7.tar.gz |
New category: time. Move many packages here:
misc/cal, misc/cardboard-schedule, misc/ical, misc/plan, misc/py-mxDateTime,
misc/remind, sysutils/logtime, and 19 more from x11.
Diffstat (limited to 'time/dclock')
-rw-r--r-- | time/dclock/Makefile | 18 | ||||
-rw-r--r-- | time/dclock/files/md5 | 3 | ||||
-rw-r--r-- | time/dclock/files/patch-sum | 5 | ||||
-rw-r--r-- | time/dclock/patches/patch-aa | 33 | ||||
-rw-r--r-- | time/dclock/patches/patch-ab | 226 | ||||
-rw-r--r-- | time/dclock/patches/patch-ac | 19 | ||||
-rw-r--r-- | time/dclock/pkg/COMMENT | 1 | ||||
-rw-r--r-- | time/dclock/pkg/DESCR | 2 | ||||
-rw-r--r-- | time/dclock/pkg/PLIST | 3 |
9 files changed, 310 insertions, 0 deletions
diff --git a/time/dclock/Makefile b/time/dclock/Makefile new file mode 100644 index 00000000000..facf2efd7e1 --- /dev/null +++ b/time/dclock/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/12/17 23:32:16 wiz Exp $ +# + +DISTNAME= dclock +PKGNAME= dclock-4 +CATEGORIES= x11 time +MASTER_SITES= ${MASTER_SITE_XCONTRIB:S/contrib/R5contrib/} +EXTRACT_SUFX= .shar.Z + +MAINTAINER= packages@netbsd.org + +USE_X11BASE= yes +EXTRACT_CMD= ${GZCAT} ${DOWNLOADED_DISTFILE} | ${SH} - +WRKSRC= ${WRKDIR} + +MAKE_ENV+= CC="${CC}" + +.include "../../mk/bsd.pkg.mk" diff --git a/time/dclock/files/md5 b/time/dclock/files/md5 new file mode 100644 index 00000000000..6bab0198855 --- /dev/null +++ b/time/dclock/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/12/17 23:32:16 wiz Exp $ + +MD5 (dclock.shar.Z) = c02279a04e7ca617b327bc4963920593 diff --git a/time/dclock/files/patch-sum b/time/dclock/files/patch-sum new file mode 100644 index 00000000000..ee77efd9177 --- /dev/null +++ b/time/dclock/files/patch-sum @@ -0,0 +1,5 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/12/17 23:32:16 wiz Exp $ + +MD5 (patch-aa) = b0a7daf0ae06bbf8f85f07b36f5aea35 +MD5 (patch-ab) = 0600cf1bb1fe710c2fb22b85fd566e13 +MD5 (patch-ac) = e334cb6a3f14ac3d893c258063dce668 diff --git a/time/dclock/patches/patch-aa b/time/dclock/patches/patch-aa new file mode 100644 index 00000000000..20975a64931 --- /dev/null +++ b/time/dclock/patches/patch-aa @@ -0,0 +1,33 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/12/17 23:32:16 wiz Exp $ + +--- Makefile.orig Wed Oct 20 11:40:45 1999 ++++ Makefile Wed Oct 20 11:43:33 1999 +@@ -3,12 +3,25 @@ + OBJS= Dclock.o dclock.o + HFILES= Dclock.h DclockP.h patchlevel.h + +-CFLAGS= -O +-LDFLAGS= ++CFLAGS= -O -I$(X11BASE)/include ++LDFLAGS= -L$(X11BASE)/lib -Wl,-R$(X11BASE)/lib + LIBS= -lXt -lX11 + ++# Make this link properly on Solaris ++OPSYS!= uname -s ++ ++.if ${OPSYS} == "SunOS" ++LIBS+= -lSM -lICE -lsocket -lnsl ++.endif ++ ++all: dclock ++ + dclock: ${OBJS} +- cc ${LDFLAGS} ${OBJS} ${LIBS} -o dclock ++ ${CC} ${LDFLAGS} ${OBJS} ${LIBS} -o dclock ++ ++install: dclock ++ ${BSD_INSTALL_PROGRAM} dclock $(X11BASE)/bin ++ ${BSD_INSTALL_MAN} dclock.man $(X11BASE)/man/man1/dclock.1 + + clean: ; rm -f ${OBJS} core dclock + diff --git a/time/dclock/patches/patch-ab b/time/dclock/patches/patch-ab new file mode 100644 index 00000000000..4dee1d05e0a --- /dev/null +++ b/time/dclock/patches/patch-ab @@ -0,0 +1,226 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/12/17 23:32:17 wiz Exp $ + +Patch from Robert Elz to make the clock behave as a clock, +rather than a sundial. +itojun's y2k patch + +--- Dclock.c 2000/01/01 04:40:38 1.1 ++++ Dclock.c 2000/01/01 04:40:53 +@@ -21,8 +21,6 @@ + #define CLOCK_WIDTH 256 + #define CLOCK_HEIGHT 80 + #define DATE_FMT "%W, %M %d" +-#define when break;case +-#define otherwise break;default + + + static Boolean SetValues(), show_time(); +@@ -367,8 +365,8 @@ + + if (w->dclock.interval_id != (XtIntervalId)NULL) + XtRemoveTimeOut(w->dclock.interval_id); +- XtReleaseGC (w, w->dclock.foreGC); +- XtReleaseGC (w, w->dclock.backGC); ++ XtReleaseGC ((Widget) w, w->dclock.foreGC); ++ XtReleaseGC ((Widget) w, w->dclock.backGC); + for (n = 0; n < 10; n++) { + XFreePixmap(XtDisplay(w), w->dclock.digits[n]); + XFreePixmap(XtDisplay(w), w->dclock.tiny_digits[n]); +@@ -388,7 +386,7 @@ + Pixmap pix; + GC gc = w->dclock.foreGC; + +- if (!XtIsRealized(w)) ++ if (!XtIsRealized((Widget) w)) + return; + + winwidth = w->core.width; +@@ -450,7 +448,7 @@ + make_number(w, w->dclock.tiny_digits[i], gc, i, tiny_segment_pts); + } + else +- w->dclock.tiny_digits[i] = NULL; ++ (Widget) w->dclock.tiny_digits[i] = (Pixmap) NULL; + } + /* The colon[0] area is blank */ + if (w->dclock.colon[0]) +@@ -629,7 +627,7 @@ + Boolean save_fade = w->dclock.fade; + long t; + +- if (!XtIsRealized(w)) ++ if (!XtIsRealized((Widget) w)) + return; + + if (w->dclock.interval_id != (XtIntervalId)NULL) { +@@ -802,7 +800,7 @@ + turn_off[i] = oldmask & ~newmask; + } + else +- tmp_pix[i] = NULL; ++ tmp_pix[i] = (Pixmap) NULL; + + for (j = 1; j != FADE_ITER; ++j) + { +@@ -875,27 +873,36 @@ + if (*p != '%') + *datep++ = *p; + else switch (*++p) { +- when 'M': ++ case 'M': + datep += strlen(strcpy(datep, Months[now->tm_mon])); +- when 'm': ++ break; ++ case 'm': + datep += strlen(strcpy(datep, months[now->tm_mon])); +- when 'W': ++ break; ++ case 'W': + datep += strlen(strcpy(datep, Days[now->tm_wday])); +- when 'w': ++ break; ++ case 'w': + datep += strlen(strcpy(datep, days[now->tm_wday])); +- when 'd': ++ break; ++ case 'd': + if (now->tm_mday >= 10) + *datep++ = (now->tm_mday / 10 + '0'); + *datep++ = now->tm_mday % 10 + '0'; +- when 'Y': +- *datep++ = '1', *datep++ = '9'; +- /* fall thru */ ++ break; ++ case 'Y': ++ *datep++ = (now->tm_year + 1900) / 1000 + '0'; ++ *datep++ = (now->tm_year + 1900) % 1000 / 100 + '0'; ++ /* FALLTHROUGH */ + case 'y': +- *datep++ = now->tm_year / 10 + '0'; +- *datep++ = now->tm_year % 10 + '0'; +- when '%': ++ *datep++ = now->tm_year % 100 / 10 + '0'; ++ *datep++ = now->tm_year % 10 + '0'; ++ break; ++ case '%': + *datep++ = *p; +- otherwise: ; /* nothing */ ++ break; ++ default: ++ break; /* nothing */ + } + } + *datep = 0; +@@ -906,7 +913,7 @@ + + /* remove what was there in case the whole thing isn't overwritten */ + XFillRectangle(XtDisplay(w), XtWindow(w), w->dclock.backGC, +- 0, winheight - (w->dclock.font->ascent + w->dclock.font->descent), ++ 0, winheight - (w->dclock.font->ascent + BORDER), + winwidth, w->dclock.font->ascent + w->dclock.font->descent); + + XDrawString(XtDisplay(w), XtWindow(w), w->dclock.foreGC, +@@ -924,7 +931,8 @@ + { + Boolean alarm_went_off = show_time(w); + w->dclock.interval_id = +- XtAddTimeOut((unsigned long)((alarm_went_off || w->dclock.seconds)? 1000 : 60000), ++ XtAddTimeOut((unsigned long)((alarm_went_off || w->dclock.seconds) ? ++ 1000 : 60000 - ((time(0L) % 60) * 1000)), + timeout, (XtPointer)w); + } + +@@ -960,8 +968,8 @@ + || new->dclock.tails != current->dclock.tails + || new->dclock.fade != current->dclock.fade + || new->dclock.miltime != current->dclock.miltime) { +- XtReleaseGC (current, current->dclock.foreGC); +- XtReleaseGC (current, current->dclock.backGC); ++ XtReleaseGC ((Widget) current, current->dclock.foreGC); ++ XtReleaseGC ((Widget) current, current->dclock.backGC); + GetGC(new); + Resize(new); /* pixmaps need to be redrawn */ + do_redraw = True; +@@ -1024,7 +1032,7 @@ + Arg arg; + + XtSetArg(arg, XtNreverseVideo, !w->dclock.reverse); +- XtSetValues(w, &arg, 1); ++ XtSetValues((Widget) w, &arg, 1); + } + + static void +@@ -1038,7 +1046,7 @@ + return; + } + XtSetArg(arg, XtNmilitaryTime, !w->dclock.miltime); +- XtSetValues(w, &arg, 1); ++ XtSetValues((Widget) w, &arg, 1); + } + + static void +@@ -1052,7 +1060,7 @@ + return; + } + XtSetArg(arg, XtNseconds, !w->dclock.seconds); +- XtSetValues(w, &arg, 1); ++ XtSetValues((Widget) w, &arg, 1); + } + + static void +@@ -1062,7 +1070,7 @@ + Arg arg; + + XtSetArg(arg, XtNfade, !w->dclock.fade); +- XtSetValues(w, &arg, 1); ++ XtSetValues((Widget) w, &arg, 1); + if (w->dclock.fade && w->dclock.scroll) + toggle_scroll(w); + } +@@ -1074,7 +1082,7 @@ + Arg arg; + + XtSetArg(arg, XtNtails, !w->dclock.tails); +- XtSetValues(w, &arg, 1); ++ XtSetValues((Widget) w, &arg, 1); + } + + static void +@@ -1084,7 +1092,7 @@ + Arg arg; + + XtSetArg(arg, XtNalarm, !w->dclock.alarm); +- XtSetValues(w, &arg, 1); ++ XtSetValues((Widget) w, &arg, 1); + } + + static void +@@ -1124,20 +1132,24 @@ + int digit = w->dclock.alarm_time[i>1?i+1:i] - '0'; + int mod; + switch (i) { +- when 0: ++ case 0: + if (Alarm.hrs > 13 && digit == 1) + digit++; + mod = 3; + before.tm_hour = -1; +- when 1 : ++ break; ++ case 1 : + mod = (Alarm.hrs < 20)? 10 : 4; + before.tm_hour = -1; +- when 2: ++ break; ++ case 2: + mod = 6; + before.tm_min = -1; +- when 3 : ++ break; ++ case 3 : + mod = 10; + before.tm_min = -1; ++ break; + } + if (event->button == 1) + digit = (digit + 1) % mod; diff --git a/time/dclock/patches/patch-ac b/time/dclock/patches/patch-ac new file mode 100644 index 00000000000..cb107c7c4b7 --- /dev/null +++ b/time/dclock/patches/patch-ac @@ -0,0 +1,19 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/12/17 23:32:17 wiz Exp $ + +As pointed out by Robert Elz, the resource name is wrong, and despite +the concerns expressed by Robert that "military time" is an +incorrectly-used term, it's outwith the scope of pkgsrc to modify +arguments to the program such as -m to comply. Modify the +documentation to show the correct resource name. + +--- dclock.man 1999/10/20 10:52:06 1.1 ++++ dclock.man 1999/10/20 10:52:33 +@@ -168,7 +168,7 @@ + .B font (\fPclass\fB Font) + Specifies the font to be used for the date. + .TP 8 +-.B miltime (\fPclass\fB Boolean) ++.B militaryTime (\fPclass\fB Boolean) + Specifies whether the military (24hr) time format should be used. + .TP 8 + .B reverseVideo (\fPclass\fB ReverseVideo) diff --git a/time/dclock/pkg/COMMENT b/time/dclock/pkg/COMMENT new file mode 100644 index 00000000000..8b64b1bf5ee --- /dev/null +++ b/time/dclock/pkg/COMMENT @@ -0,0 +1 @@ +Digital clock for X diff --git a/time/dclock/pkg/DESCR b/time/dclock/pkg/DESCR new file mode 100644 index 00000000000..483090076b4 --- /dev/null +++ b/time/dclock/pkg/DESCR @@ -0,0 +1,2 @@ +Dclock is a digital clock for X. It has support for one alarm. Other than +that, it's a pretty bare-bones clock. diff --git a/time/dclock/pkg/PLIST b/time/dclock/pkg/PLIST new file mode 100644 index 00000000000..24ea25fb7e0 --- /dev/null +++ b/time/dclock/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/17 23:32:17 wiz Exp $ +bin/dclock +man/man1/dclock.1.gz |