debian/0000755000000000000000000000000012216160340007161 5ustar debian/examples0000644000000000000000000000000712216160340010717 0ustar README debian/control0000644000000000000000000000156012216160340010566 0ustar Source: dclock Section: x11 Priority: optional Maintainer: Ricardo Mones Build-depends: debhelper (>= 9), xutils-dev, libxt-dev, libxft-dev, libfreetype6-dev, libxext-dev, hardening-wrapper Standards-Version: 3.9.4 Homepage: http://opencircuitdesign.com/~tim/programs/ Vcs-Git: git://anonscm.debian.org/users/mones/dclock.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/mones/dclock.git Package: dclock Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: sox Description: Digital clock for the X Window System with flexible display Dclock main feature is its great flexibility in how it can draw. You can even display the output from "date" in it such as "Wednesday, 3rd Jan". Dclock also supports setting an alarm. . You need the package sox if you want to enable sound for alarm and hourly bells (rather than beeps). debian/watch0000644000000000000000000000012312216160340010206 0ustar version=3 http://opencircuitdesign.com/~tim/programs/archive/dclock-([\d.]+)\.tgz debian/install0000644000000000000000000000011712216160340010551 0ustar dclock usr/bin sounds/* usr/share/sounds/dclock Dclock.ad etc/X11/app-defaults debian/source/0000755000000000000000000000000012216160340010461 5ustar debian/source/format0000644000000000000000000000001412216160340011667 0ustar 3.0 (quilt) debian/clean0000644000000000000000000000001412216160340010161 0ustar dclock._man debian/copyright0000644000000000000000000000102312216160340011110 0ustar Packaged by Adrian Bridgett from sources obtained at http://bach.ece.jhu.edu/~tim/programs/archive/dclock.tar.gz Sources for 2.2.2 were obtained from: http://opencircuitdesign.com/~tim/programs/archive/ The tarball was repacked to remove the upstream debian/ dir only. Barry deFreese Copyright: Copyright (C) 1988 Dan Heller Copyright (C) 1993, 1999 Tim Edwards License: released under the GPL (see /usr/share/common-licenses/GPL-2). debian/rules0000755000000000000000000000037412216160340010245 0ustar #!/usr/bin/make -f export DEB_BUILD_HARDENING=1 %: dh $@ override_dh_auto_build: xmkmf $(MAKE) override_dh_install: dh_install mv $(CURDIR)/debian/dclock/etc/X11/app-defaults/Dclock.ad \ $(CURDIR)/debian/dclock/etc/X11/app-defaults/Dclock debian/patches/0000755000000000000000000000000012216160340010610 5ustar debian/patches/series0000644000000000000000000000010312216160340012017 0ustar 01_sound_paths.diff 02_manpage_fixes.diff 03_font_setting_fix.diff debian/patches/03_font_setting_fix.diff0000644000000000000000000002032512216160340015317 0ustar Subject: fix setting font via toolkit options Author: "Robert J. Macomber" Bug-Debian: http://bugs.debian.org/514277 --- a/Dclock.c +++ b/Dclock.c @@ -165,7 +165,7 @@ static XtResource resources[] = { XtOffset(DclockWidget,dclock.font), XtRString, "fixed"}, #ifdef XFT_SUPPORT { XftNfontName, "fontName", XtRString, sizeof(String), - XtOffset(DclockWidget,dclock.xftfontname), XtRString, "charter"}, + XtOffset(DclockWidget,dclock.xftfontname), XtRString, NULL}, #endif { XtNangle, "Slope", XtRFloat, sizeof(float), XtOffset(DclockWidget,dclock.angle), XtRFloat, (caddr_t)&sslope}, @@ -344,6 +344,12 @@ typedef XfPoint segment_pts[NUM_SEGS][MAX_PTS]; segment_pts tiny_segment_pts; segment_pts norm_segment_pts; +#ifdef XFT_SUPPORT +#define XFT_COND(dclock) ((dclock).xftfontname) +#else +#define XFT_COND(dclock) (0) +#endif + /* ARGSUSED */ static void Initialize (request, new) @@ -386,11 +392,13 @@ DclockWidget new; if (new->dclock.sec_gap < 0.0) new->dclock.sec_gap = 0.0; #ifdef XFT_SUPPORT - new->dclock.xftfont = XftFontOpen(dpy, DefaultScreen(dpy), + if (XFT_COND(new->dclock)) { + new->dclock.xftfont = XftFontOpen(dpy, DefaultScreen(dpy), XFT_FAMILY, XftTypeString, new->dclock.xftfontname, XFT_SIZE, XftTypeDouble, ((float)new->core.height / 6.0) - 4.0, NULL); - new->dclock.xftdraw = NULL; + new->dclock.xftdraw = NULL; + } #endif GetGC(new); @@ -447,11 +455,11 @@ DclockWidget new; if (new->dclock.date_fmt && !*new->dclock.date_fmt) new->dclock.date_fmt = NULL; if (new->dclock.dateup && new->dclock.date_fmt) -#ifdef XFT_SUPPORT + if (XFT_COND(new->dclock)) { TopOffset = new->core.height / 6; -#else + } else { TopOffset = new->dclock.font->ascent + new->dclock.font->descent; -#endif + } else TopOffset = 0; @@ -519,7 +527,7 @@ XSetWindowAttributes *attrs; XtCreateWindow(w, InputOutput, (Visual *)CopyFromParent, *valueMask, attrs); #ifdef XFT_SUPPORT - if (dw->dclock.xftdraw == NULL) { + if (XFT_COND(dw->dclock) && dw->dclock.xftdraw == NULL) { XColor color; Colormap cm = DefaultColormap(dp, sc); @@ -574,7 +582,8 @@ DclockWidget w; XDestroyRegion(clip_colon); #ifdef XFT_SUPPORT - XftFontClose(XtDisplay(w), w->dclock.xftfont); + if (XFT_COND(w->dclock)) + XftFontClose(XtDisplay(w), w->dclock.xftfont); #endif } @@ -596,11 +605,13 @@ DclockWidget w; winheight = w->core.height; #ifdef XFT_SUPPORT - XftFontClose(dpy, w->dclock.xftfont); - w->dclock.xftfont = XftFontOpen(dpy, DefaultScreen(dpy), + if(XFT_COND(w->dclock)) { + XftFontClose(dpy, w->dclock.xftfont); + w->dclock.xftfont = XftFontOpen(dpy, DefaultScreen(dpy), XFT_FAMILY, XftTypeString, w->dclock.xftfontname, XFT_SIZE, XftTypeDouble, ((float)winheight / 6.0) - 4.0, NULL); + } #endif y_ratio = (float)winheight / CLOCK_HEIGHT; @@ -608,11 +619,13 @@ DclockWidget w; if (w->dclock.date_fmt || !w->dclock.display_time || w->dclock.alarm || w->dclock.bell) /* make win temporarily shorter so digits will fit on top of date */ -#ifdef XFT_SUPPORT - winheight -= w->core.height / 6; -#else - winheight -= w->dclock.font->ascent + w->dclock.font->descent; -#endif + { + if(XFT_COND(w->dclock)) { + winheight -= w->core.height / 6; + } else { + winheight -= w->dclock.font->ascent + w->dclock.font->descent; + } + } /* * if the width of all segments are equal, then the width in x is the @@ -1669,51 +1682,60 @@ struct tm *now; char datestr[128]; register char *p; int x, datep; + int tsize; #ifdef XFT_SUPPORT - int tsize = w->core.height / 6; XGlyphInfo xftextents; -#else - int tsize = w->dclock.font->ascent + w->dclock.font->descent; #endif + if (XFT_COND(w->dclock)) { + tsize = w->core.height / 6; + } else { + tsize = w->dclock.font->ascent + w->dclock.font->descent; + } + if (!w->dclock.display_time) datep = strlen(strcpy(datestr, "Push HERE to Set/Unset Alarm")); else datep = strftime(datestr, 128, w->dclock.date_fmt, now); + if (XFT_COND(w->dclock)) { #ifdef XFT_SUPPORT - XftTextExtents8(dpy, w->dclock.xftfont, datestr, datep, &xftextents); - x = (w->core.width - xftextents.width) / 2; -#else - x = (w->core.width - XTextWidth(w->dclock.font, datestr, datep)) / 2; + XftTextExtents8(dpy, w->dclock.xftfont, datestr, datep, &xftextents); + x = (w->core.width - xftextents.width) / 2; #endif + } else { + x = (w->core.width - XTextWidth(w->dclock.font, datestr, datep)) / 2; + } + if (x < 2) x = 2; if (TopOffset) { - + if (XFT_COND(w->dclock)) { #ifdef XFT_SUPPORT - XftDrawRect(w->dclock.xftdraw, &w->dclock.xftbg, 0, 0, winwidth, tsize); - XftDrawString8(w->dclock.xftdraw, &w->dclock.xftfg, w->dclock.xftfont, x, + XftDrawRect(w->dclock.xftdraw, &w->dclock.xftbg, 0, 0, winwidth, tsize); + XftDrawString8(w->dclock.xftdraw, &w->dclock.xftfg, w->dclock.xftfont, x, (BORDER/2) + tsize - 2, datestr, datep); -#else - XFillRectangle(dpy, win, w->dclock.backGC, - 0, 0, winwidth, tsize); - XDrawString(dpy, win, w->dclock.foreGC, - x, ((BORDER/2)+w->dclock.xftfont->height), datestr, datep); #endif + } else { + XFillRectangle(dpy, win, w->dclock.backGC, + 0, 0, winwidth, tsize); + XDrawString(dpy, win, w->dclock.foreGC, + x, ((BORDER/2)+tsize), datestr, datep); + } } else { - + if (XFT_COND(w->dclock)) { #ifdef XFT_SUPPORT - XftDrawRect(w->dclock.xftdraw, &w->dclock.xftbg, 0, winheight - tsize, + XftDrawRect(w->dclock.xftdraw, &w->dclock.xftbg, 0, winheight - tsize, winwidth, tsize); - XftDrawString8(w->dclock.xftdraw, &w->dclock.xftfg, w->dclock.xftfont, x, + XftDrawString8(w->dclock.xftdraw, &w->dclock.xftfg, w->dclock.xftfont, x, winheight - BORDER - 2, datestr, datep); -#else - XFillRectangle(dpy, win, w->dclock.backGC, - 0, winheight - tsize, winwidth, tsize); - XDrawString(dpy, win, w->dclock.foreGC, - x, winheight - BORDER, datestr, datep); #endif + } else { + XFillRectangle(dpy, win, w->dclock.backGC, + 0, winheight - tsize, winwidth, tsize); + XDrawString(dpy, win, w->dclock.foreGC, + x, winheight - BORDER, datestr, datep); + } } } @@ -1992,13 +2014,13 @@ DclockWidget w; w->dclock.date_fmt = saved_date; saved_date = tmp; - if (w->dclock.dateup && w->dclock.date_fmt) -#ifdef XFT_SUPPORT - TopOffset = w->core.height / 6; -#else - TopOffset = w->dclock.font->ascent + w->dclock.font->descent; -#endif - else + if (w->dclock.dateup && w->dclock.date_fmt) { + if (XFT_COND(w->dclock)) { + TopOffset = w->core.height / 6; + } else { + TopOffset = w->dclock.font->ascent + w->dclock.font->descent; + } + } else TopOffset = 0; before.tm_wday = -1; @@ -2021,13 +2043,13 @@ DclockWidget w; XtSetArg(arg, XtNdateUp, !w->dclock.dateup); XtSetValues((Widget)w, &arg, 1); - if (w->dclock.dateup && w->dclock.date_fmt) -#ifdef XFT_SUPPORT - TopOffset = w->core.height / 6; -#else - TopOffset = w->dclock.font->ascent + w->dclock.font->descent; -#endif - else + if (w->dclock.dateup && w->dclock.date_fmt) { + if (XFT_COND(w->dclock)) { + TopOffset = w->core.height / 6; + } else { + TopOffset = w->dclock.font->ascent + w->dclock.font->descent; + } + } else TopOffset = 0; ResizeNow(w); @@ -2184,20 +2206,20 @@ XButtonEvent *event; */ int i, x, y = (int)((BORDER/2)*y_ratio) + TopOffset; /* first check to see if user toggles the alarm */ -#ifdef XFT_SUPPORT - if (TopOffset) + if (XFT_COND(w->dclock)) { + if (TopOffset) i = (BORDER + (w->core.height / 6)) - event->y; - else + else i = event->y - (winheight - (w->core.height / 6)); -#else - if (TopOffset) + } else { + if (TopOffset) i = (BORDER + (w->dclock.font->ascent + w->dclock.font->descent)) - event->y; - else + else i = event->y - (winheight - (w->dclock.font->ascent + w->dclock.font->descent)); -#endif + } if (i >= 0) toggle_alarm(w); else for (i = 0; i < 4; i++) { diff --git a/DclockP.h b/DclockP.h index bb2c29e..ded7802 100644 --- a/DclockP.h +++ b/DclockP.h @@ -9,8 +9,9 @@ #include "Dclock.h" /* Add -DXFT_SUPPORT in the Imakefile for freefont support */ +#ifdef XFT_SUPPORT #include - +#endif typedef struct { Pixel foreground; debian/patches/01_sound_paths.diff0000644000000000000000000000115612216160340014274 0ustar Subject: Change path of where sound files are Author: Barry deFreese --- dclock-2.2.2.orig/Dclock.ad 2009-02-04 19:30:32.000000000 -0500 +++ dclock-2.2.2/Dclock.ad 2009-02-04 19:31:01.000000000 -0500 @@ -7,7 +7,7 @@ dclock*borderWidth: 2 dclock*widthFactor: 0.143 dclock*spaceFactor: 0.062 -dclock*bellFile: /usr/share/sound/bell.wav -dclock*alarmFile: /usr/share/sound/digital.wav +dclock*bellFile: /usr/share/sounds/dclock/bell.wav +dclock*alarmFile: /usr/share/sounds/dclock/digital.wav dclock*font: *helvetica-medium-r-normal--14* dclock*audioPlay: /usr/bin/play debian/patches/02_manpage_fixes.diff0000644000000000000000000000253412216160340014555 0ustar Subject: fix manpage for lintian cleanliness Author: Ricardo Mones --- dclock-2.2.2.orig/dclock.1 2010-05-18 09:58:47.000000000 +0200 +++ dclock-2.2.2/dclock.1 2010-05-18 10:47:21.000000000 +0200 @@ -3,7 +3,7 @@ dclock - digital clock for X .SH SYNOPSIS .B dclock -[-\fItoolkitoption\fP ...] [-option ...] +[\-\fItoolkitoption\fP ...] [\-option ...] .SH DESCRIPTION The .I dclock @@ -92,14 +92,14 @@ .B \-noscroll .br When the time changes, the digits scroll from the previous digit to the -next digit. The -noscroll option turns the behavior off. +next digit. The \-noscroll option turns the behavior off. .TP 8 .B \-blink .TP 8 .B \-noblink .br The colon separating hours from minutes blinks on and off once per second. -With the -noblink option, it remains on permanently. +With the \-noblink option, it remains on permanently. .TP 8 .B \-persist .TP 8 @@ -134,7 +134,7 @@ .br .sp .ti +2 -dclock -date "Today is %A" +dclock \-date "Today is %A" .sp Useful examples of strftime() formatting: .in +2 @@ -216,7 +216,7 @@ default is ``Fixed.'' .TP 8 .B \-geometry \fIgeometry\fP -This option specifies the prefered size and position of the clock window. +This option specifies the preferred size and position of the clock window. .TP 8 .B \-display \fIhost\fP:\fIdisplay\fP This option specifies the X server to contact. debian/manpages0000644000000000000000000000001112216160340010667 0ustar dclock.1 debian/docs0000644000000000000000000000000512216160340010027 0ustar TODO debian/compat0000644000000000000000000000000212216160340010357 0ustar 9 debian/menu0000644000000000000000000000015412216160340010050 0ustar ?package(dclock):command="/usr/bin/dclock" needs="X11" \ section="Games/Toys" title="dclock" debian/changelog0000644000000000000000000001463312216160340011042 0ustar dclock (2.2.2-7) unstable; urgency=low * debian/control, debian/compat, debian/rules - Enable hardening through hardening-wrapper - Bump debhelper compat level to 9 * debian/control - Update Vcs-* headers to use the canonical hostname - Bump Standards-Version to 3.9.4 (no other changes) -- Ricardo Mones Wed, 18 Sep 2013 01:06:17 +0200 dclock (2.2.2-6) unstable; urgency=low * debian/control - Bump Standards-Version to 3.9.2 (no other changes) - Development moved to git.debian.org: added Vcs-* headers -- Ricardo Mones Sun, 21 Aug 2011 19:21:23 +0200 dclock (2.2.2-5) unstable; urgency=low * patches/01_sound_paths.diff - Fix default alarm file path (Closes: #605956) * debian/control - Bump Standards-Version to 3.9.1 (no other changes) -- Ricardo Mones Sat, 11 Dec 2010 13:00:54 +0100 dclock (2.2.2-4) unstable; urgency=low * debian/compat - Really update compat level to match debhelper version * debian/rules, debian/install - Fix install of X11 defaults (Closes: #514275) * debian/patches/02_manpage_fixes.diff - Add patch to fix manpage and make it lintian clean * debian/patches/03_font_setting_fix.diff - Patch by Robert J. Macomber to fix font setting (Closes: #514277) * debian/control - Added homepage field, fix description punctuation a bit -- Ricardo Mones Tue, 18 May 2010 12:04:36 +0200 dclock (2.2.2-3) unstable; urgency=low * New maintainer (Closes: #486757) * debian/control - Bump Standards-Version to 3.8.4 (no other changes) * debian/{docs,manpages,examples} - Added from files on rules, put README into new examples as it contains several ones. * debian/rules, debian/control, debian/compat, debian/clean - Switched to debhelper sequencer, updated required version - Removed unnecessary quilt build depend -- Ricardo Mones Tue, 18 May 2010 01:53:24 +0200 dclock (2.2.2-2) unstable; urgency=low * QA upload. * Switch to format 3.0 (quilt). Closes: #538679 -- Raphaƫl Hertzog Thu, 05 Nov 2009 23:41:42 +0100 dclock (2.2.2-1) unstable; urgency=low * QA upload. + Set maintainer to Debian QA Group * New upstream release. (Closes: #485367). * Add comment about repacking tarball in copyright. * Fix up debian/copyright format. * Add watch file. * Add quilt patch system. * 01_sound_paths.diff - Move sound files to more sensible path. * Replace deprecated xutils build-dep with xutils-dev. * Bump debhelper build-dep version to >= 5. * Move DH_COMPAT from rules to compat and set to 5. * Bump Standards Version to 3.8.0. + Menu policy transition. -- Barry deFreese Wed, 04 Feb 2009 17:28:22 -0500 dclock (2.1.2-8) unstable; urgency=low * fix FTBFS (X11's imake build procedure is gone). Thanks to Harri Dunkel for the patch (closes: #363055) -- Adrian Bridgett Sun, 9 Jul 2006 09:50:08 +0100 dclock (2.1.2-7) unstable; urgency=low * allow overriding of bellFile sound and alarmFile sounds. Based on a patch by Nadim Shaikli (closes: #289780) * upgrade DH_COMPAT to v4 -- Adrian Bridgett Mon, 29 Aug 2005 14:06:08 +0100 dclock (2.1.2-6) unstable; urgency=low * ACK of NMU * disable external sounds if we have problems using them (closes: #266359) * only ring the alarm bell once, not as many times as we can in 5seconds -- Adrian Bridgett Tue, 7 Sep 2004 10:46:11 +0100 dclock (2.1.2-5.1) unstable; urgency=low * Non-maintainer upload * Dclock.c, playbell(): print error and exit if audio player can not be execv'ed (closes: #253704) * recommend package 'sox' to enable sound and explain it in the package description (closes: #234258) * build-depend on debhelper >= 2 (closes: #259729) -- Martin Pitt Fri, 16 Jul 2004 14:26:56 +0200 dclock (2.1.2-5) unstable; urgency=low * manpage didn't mention -noblink option (closes: #227068) thanks to Sven Rudolph for spotting this and providing a patch. -- Adrian Bridgett Sun, 18 Jan 2004 13:44:46 +0000 dclock (2.1.2-4) unstable; urgency=low * s/miltime/militaryTime/ for X resource in manpage (closes: #198669) -- Adrian Bridgett Tue, 24 Jun 2003 21:37:37 +0100 dclock (2.1.2-3) unstable; urgency=low * lintian fixes * darn typo in last changelog - let's close it here (closes: #185864) -- Adrian Bridgett Sat, 31 May 2003 22:01:50 +0100 dclock (2.1.2-2) unstable; urgency=low * patch from Robert Macomber to stop dclock missing some updates. I've actually only added 1 onto next_intr, as I can explain that, but not 100 (close: #185864) -- Adrian Bridgett Mon, 21 Apr 2003 19:02:40 +0100 dclock (2.1.2-1) unstable; urgency=low * slightly newer code at upstream location (I've named it 2.1.2) * build-depends were right, mark bug as fixed (closes: #122166) * app-defaults file was wrongly named. Set dclock.input:true to fix a WM interaction(closes: #98840) -- Adrian Bridgett Sat, 2 Feb 2002 21:26:38 +0000 dclock (2.1.1-6) unstable; urgency=low * add some build-depends for #122166 -- Adrian Bridgett Mon, 3 Dec 2001 18:53:36 +0000 dclock (2.1.1-5) unstable; urgency=low * refer to the X Window System properly (close: #119841) -- Adrian Bridgett Sun, 2 Dec 2001 14:32:00 +0000 dclock (2.1.1-4) unstable; urgency=low * app-defaults files must be marked conffiles -- Adrian Bridgett Sun, 4 Mar 2001 18:55:21 +0000 dclock (2.1.1-3) unstable; urgency=low * use time.h not sys/time.h (closes: #86957) -- Adrian Bridgett Sat, 3 Mar 2001 15:33:23 +0000 dclock (2.1.1-2) unstable; urgency=low * use new app-defaults location (closes: #86265) -- Adrian Bridgett Sun, 18 Feb 2001 20:31:10 +0000 dclock (2.1.1-1) unstable; urgency=low * new upstream (thanks to Harald Dunkel) NB: The version number _hadn't_ changed upstream * use /usr/share/sounds like other programs (closes: #79159) -- Adrian Bridgett Tue, 26 Dec 2000 18:50:50 +0000 dclock (2.1-1) unstable; urgency=low * initial release. -- Adrian Bridgett Mon, 3 Jan 2000 14:47:11 +0000