FreeBSD Bugzilla – Attachment 128663 Details for
Bug 172513
x11-clocks/dclock: Update to version 2.2.2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 20.35 KB, created by
tkato432
on 2012-10-08 19:10:19 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
tkato432
Created:
2012-10-08 19:10:19 UTC
Size:
20.35 KB
patch
obsolete
>diff -urN /usr/ports/x11-clocks/dclock/Makefile x11-clocks/dclock/Makefile >--- /usr/ports/x11-clocks/dclock/Makefile 2012-09-07 15:52:56.000000000 +0900 >+++ x11-clocks/dclock/Makefile 2012-10-08 00:46:54.000000000 +0900 >@@ -1,61 +1,72 @@ >-# New ports collection makefile for: dclock >-# Date created: 15 Aug 1996 >-# Whom: David Leonard <leonard@dstc.edu.au> >-# >+# Created by: David Leonard <leonard@dstc.edu.au> > # $FreeBSD: ports/x11-clocks/dclock/Makefile,v 1.26 2012/09/07 06:52:56 jgh Exp $ >-# > > PORTNAME= dclock >-PORTVERSION= 2.1.2.8 >-PORTREVISION= 5 >+PORTVERSION= 2.2.2 > CATEGORIES= x11-clocks >-MASTER_SITES= ${MASTER_SITE_DEBIAN} >-MASTER_SITE_SUBDIR= pool/main/d/dclock >-DISTNAME= dclock_2.1.2.orig >- >-PATCH_SITES= ${MASTER_SITE_DEBIAN:S,%SUBDIR%,pool/main/d/dclock,} >-PATCHFILES= dclock_2.1.2-8.diff.gz >-PATCH_DIST_STRIP= -p1 >+MASTER_SITES= http://opencircuitdesign.com/~tim/programs/dclock/archive/ >+EXTRACT_SUFX= .tgz > > MAINTAINER= ports@FreeBSD.org > COMMENT= A 7-segment digital clock with some optional features > >-USE_IMAKE= yes >-USE_XORG= ice sm x11 xext xt >+OPTIONS_DEFINE= SOX XFT DOCS >+OPTIONS_DEFAULT=SOX XFT >+SOX_DESC= Install SOX to play audio > >-WRKSRC= ${WRKDIR}/dclock >-MAN1= dclock.1 >+WRKSRC= ${WRKDIR}/${PORTNAME} > >-OPTIONS_DEFINE= SOX >-SOX_DESC= Install SOX to play audio >-OPTIONS_DEFAULT= SOX >+USE_XORG= x11 xt >+USE_PKGCONFIG= build > >-.include <bsd.port.pre.mk> >+CPPFLAGS+= -I${LOCALBASE}/include >+LDFLAGS+= -L${LOCALBASE}/lib -lX11 -lXt -lm >+ >+MAN1= dclock.1 >+PORTDOCS= README TODO >+PLIST_FILES= bin/dclock \ >+ lib/X11/app-defaults/DClock \ >+ %%DATADIR%%/sounds/bell.wav \ >+ %%DATADIR%%/sounds/digital.wav >+PLIST_DIRS= %%DATADIR%%/sounds \ >+ %%DATADIR%% >+ >+.include <bsd.port.options.mk> > > .if ${PORT_OPTIONS:MSOX} > RUN_DEPENDS+= play:${PORTSDIR}/audio/sox > .endif > >+.if ${PORT_OPTIONS:MXFT} >+USE_XORG+= xft >+CPPFLAGS+= $$(freetype-config --cflags) -DXFT_SUPPORT >+LDFLAGS+= $$(freetype-config --libs) -lXft >+.endif >+ > post-patch: >- @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \ >- -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ >- ${WRKSRC}/Dclock.c \ >- ${WRKSRC}/Dclock.ad \ >- ${WRKSRC}/dclock.1 >- @${MV} ${WRKSRC}/dclock.1 ${WRKSRC}/dclock.man >- >-post-install: >- ${INSTALL_DATA} ${WRKSRC}/Dclock.ad ${PREFIX}/lib/X11/app-defaults/DClock >- ${MKDIR} ${DATADIR}/sounds >-.for f in bell.wav digital.wav >- ${INSTALL_DATA} ${WRKSRC}/sounds/${f} ${DATADIR}/sounds >+.for i in Dclock.c Dclock.ad dclock.1 >+ @${REINPLACE_CMD} -e \ >+ 's|%%DATADIR%%|${DATADIR}| ; \ >+ s|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/${i} > .endfor >+ >+do-build: >+ (cd ${WRKSRC} \ >+ && ${CC} ${CFLAGS} ${CPPFLAGS} *.c -o ${PORTNAME} ${LDFLAGS}) >+ >+do-install: >+ (cd ${WRKSRC} \ >+ && ${INSTALL_PROGRAM} dclock ${PREFIX}/bin \ >+ && ${INSTALL_MAN} dclock.1 ${MANPREFIX}/man/man1 \ >+ && ${INSTALL_DATA} Dclock.ad \ >+ ${PREFIX}/lib/X11/app-defaults/DClock) >+ @${MKDIR} ${DATADIR}/sounds >+ (cd ${WRKSRC}/sounds && ${INSTALL_DATA} *.wav ${DATADIR}/sounds) > .if ${PORT_OPTIONS:MDOCS} >- ${MKDIR} ${DOCSDIR} >-.for f in README TODO >- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} >+ @${MKDIR} ${DOCSDIR} >+.for f in ${PORTDOCS} >+ (cd ${WRKSRC} && ${INSTALL_DATA} ${f} ${DOCSDIR}) > .endfor >- ${INSTALL_DATA} ${WRKSRC}/debian/changelog ${DOCSDIR}/changelog.Debian > .endif > >-.include <bsd.port.post.mk> >+.include <bsd.port.mk> >diff -urN /usr/ports/x11-clocks/dclock/distinfo x11-clocks/dclock/distinfo >--- /usr/ports/x11-clocks/dclock/distinfo 2011-03-19 21:38:30.000000000 +0900 >+++ x11-clocks/dclock/distinfo 2012-09-27 18:59:07.000000000 +0900 >@@ -1,4 +1,2 @@ >-SHA256 (dclock_2.1.2.orig.tar.gz) = e613b2ea01e7bc41c1ae76b2ae7a5ad81805e2aba29c0e843fa2f9b28518136e >-SIZE (dclock_2.1.2.orig.tar.gz) = 51418 >-SHA256 (dclock_2.1.2-8.diff.gz) = 52fb10719e998ace55676c665f5b6eba348f3d8f6083c636942a145edfb0334b >-SIZE (dclock_2.1.2-8.diff.gz) = 5247 >+SHA256 (dclock-2.2.2.tgz) = af329ecf8e1a27defc8f060b94219bd054e79a7dc53e508b79265bcfbc380021 >+SIZE (dclock-2.2.2.tgz) = 65429 >diff -urN /usr/ports/x11-clocks/dclock/files/patch-Dclock.ad x11-clocks/dclock/files/patch-Dclock.ad >--- /usr/ports/x11-clocks/dclock/files/patch-Dclock.ad 2005-12-18 23:54:18.000000000 +0900 >+++ x11-clocks/dclock/files/patch-Dclock.ad 2012-09-27 19:01:44.000000000 +0900 >@@ -1,6 +1,6 @@ >---- Dclock.ad.orig Sun Dec 18 00:18:10 2005 >-+++ Dclock.ad Sun Dec 18 00:20:00 2005 >-@@ -1,14 +1,14 @@ >+--- Dclock.ad.orig 2008-07-03 14:39:21.000000000 +0900 >++++ Dclock.ad 2012-09-27 19:01:16.000000000 +0900 >+@@ -1,13 +1,13 @@ > ! sample dclock defaults > -dclock*geometry: 240x87+271+5 > -dclock*foreground: chartreuse >@@ -10,21 +10,19 @@ > -dclock*borderWidth: 2 > -dclock*widthFactor: 0.143 > -dclock*spaceFactor: 0.062 >--dclock*bellFile: /usr/share/sounds/bell.wav >--dclock*alarmFile: /usr/share/sounds/digital.wav >+-dclock*bellFile: /usr/share/sound/bell.wav >+-dclock*alarmFile: /usr/share/sound/digital.wav > -dclock*font: *helvetica-medium-r-normal--14* > -dclock*audioPlay: /usr/bin/play >--dclock.input: true >-+*geometry: 240x87+271+5 >-+*foreground: chartreuse >-+*background: DarkSlateGray >-+*led_off: DarkGreen >-+*borderColor: white >-+*borderWidth: 2 >-+*widthFactor: 0.143 >-+*spaceFactor: 0.062 >-+*bellFile: %%DATADIR%%/sounds/bell.wav >-+*alarmFile: %%DATADIR%%/sounds/digital.wav >-+*font: *helvetica-medium-r-normal--14* >-+*audioPlay: %%LOCALBASE%%/bin/play >-+.input: true >++*geometry: 240x87+271+5 >++*foreground: chartreuse >++*background: DarkSlateGray >++*led_off: DarkGreen >++*borderColor: white >++*borderWidth: 2 >++*widthFactor: 0.143 >++*spaceFactor: 0.062 >++*bellFile: %%DATADIR%%/sound/bell.wav >++*alarmFile: %%DATADIR%%/sound/digital.wav >++*font: *helvetica-medium-r-normal--14* >++*audioPlay: %%LOCALBASE%%/bin/play >diff -urN /usr/ports/x11-clocks/dclock/files/patch-Dclock.c x11-clocks/dclock/files/patch-Dclock.c >--- /usr/ports/x11-clocks/dclock/files/patch-Dclock.c 2005-12-18 23:54:18.000000000 +0900 >+++ x11-clocks/dclock/files/patch-Dclock.c 2012-10-08 00:49:24.000000000 +0900 >@@ -1,18 +1,37 @@ >---- Dclock.c.orig Sat Dec 17 23:46:28 2005 >-+++ Dclock.c Sat Dec 17 23:47:28 2005 >-@@ -9,9 +9,9 @@ >- #include <stdio.h> >+--- Dclock.c.orig 2008-07-08 13:00:35.000000000 +0900 >++++ Dclock.c 2012-10-08 00:49:08.000000000 +0900 >+@@ -8,10 +8,10 @@ >+ #include <stdlib.h> > #include <unistd.h> > #include <string.h> > -#include <values.h> > +#include <limits.h> >+ #include <math.h> > #include <time.h> > -#include <wait.h> > +#include <sys/wait.h> > #include <errno.h> > #include <X11/IntrinsicP.h> > #include <X11/Xos.h> >-@@ -171,7 +171,7 @@ >+@@ -66,7 +66,7 @@ >+ static int old_digs[4]; >+ static struct tm before; >+ static char *saved_date; >+-static cur_position; /* outline current digit for setting alarm */ >++static int cur_position; /* outline current digit for setting alarm */ >+ static struct { int hrs, mins; } Alarm; >+ static int TopOffset = 0; >+ >+@@ -165,7 +165,7 @@ >+ 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}, >+@@ -182,7 +182,7 @@ > { XtNbellFile, "bellFile", XtRString, sizeof(String), > XtOffset(DclockWidget,dclock.bellfile), XtRString, (String)NULL}, > { XtNaudioPlay, "audioPlay", XtRString, sizeof(String), >@@ -21,3 +40,356 @@ > }; > > /* Define the Dclock widget */ >+@@ -235,7 +235,7 @@ >+ * These stipples give different densities for the >+ * different stages of fading. >+ */ >+-static unsigned char stpl_1_8th[] = >++static char stpl_1_8th[] = >+ { >+ 0x80, 0x80, 0x08, 0x08, 0x80, 0x80, 0x08, 0x08, >+ 0x80, 0x80, 0x08, 0x08, 0x80, 0x80, 0x08, 0x08, >+@@ -243,7 +243,7 @@ >+ 0x80, 0x80, 0x08, 0x08, 0x80, 0x80, 0x08, 0x08 >+ }; >+ >+-static unsigned char stpl_1_4th[] = >++static char stpl_1_4th[] = >+ { >+ 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22, >+ 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22, >+@@ -251,7 +251,7 @@ >+ 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22 >+ }; >+ >+-static unsigned char stpl_3_8ths[] = >++static char stpl_3_8ths[] = >+ { >+ 0xA2, 0xA2, 0x15, 0x15, 0xA8, 0xA8, 0x45, 0x45, >+ 0x2A, 0x2A, 0x51, 0x51, 0x8A, 0x8A, 0x54, 0x54, >+@@ -259,7 +259,7 @@ >+ 0x2A, 0x2A, 0x51, 0x51, 0x8A, 0x8A, 0x54, 0x54 >+ }; >+ >+-static unsigned char stpl_one_half[] = >++static char stpl_one_half[] = >+ { >+ 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, >+ 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, >+@@ -344,6 +344,12 @@ >+ 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 @@ >+ 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 @@ >+ 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; >+@@ -493,7 +501,7 @@ >+ >+ static void >+ invert_bitmap(bm, h, w) >+-unsigned char *bm; >++char *bm; >+ int h, w; >+ { >+ int i, *wp; >+@@ -519,7 +527,7 @@ >+ 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 @@ >+ 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 @@ >+ 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 @@ >+ 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 >+@@ -1351,7 +1364,7 @@ >+ XtAppContext app; >+ Boolean save_scroll = w->dclock.scroll; >+ Boolean save_fade = w->dclock.fade; >+- long t; >++ time_t t; >+ >+ if (!XtIsRealized((Widget)w)) >+ return; >+@@ -1421,7 +1434,7 @@ >+ { >+ char buf[11]; >+ Boolean alarm_went_off = False; >+- long t = time(0); >++ time_t t = time(0); >+ register struct tm *l_time = localtime(&t); >+ float digit_w = w->dclock.digit_w; >+ float digit_h = w->dclock.digit_h; >+@@ -1522,7 +1535,7 @@ >+ Pixmap new_pix[4]; >+ int new_digs[4], digitxpos, digitypos; >+ int cur_sec = 0; >+- long t; >++ time_t t; >+ register struct tm *now; >+ >+ /* definitions for the window x and y positions of each of the large digits. */ >+@@ -1585,7 +1598,7 @@ >+ unsigned long fade_rate = w->dclock.fade_rate * 1000; >+ >+ for (i = 0; i < 4; i++) /* if pixmaps don't match, fade it */ >+- if (chgd[i] = (new_pix[i] != old_pix[i])) >++ if ((chgd[i] = (new_pix[i] != old_pix[i]))) >+ { >+ tmp_pix[i] = XCreatePixmap(dpy, win, (int)(digit_w + slope_add), >+ (int)digit_h, DefaultDepthOfScreen(XtScreen(w))); >+@@ -1669,51 +1682,60 @@ >+ 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, (FcChar8*)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, >+- (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); >++ 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, (FcChar8*)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, >+- 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); >++ XftDrawString8(w->dclock.xftdraw, &w->dclock.xftfg, w->dclock.xftfont, x, >++ winheight - BORDER - 2, (FcChar8*)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 @@ >+ 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 @@ >+ 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); >+@@ -2038,7 +2060,7 @@ >+ toggle_bell(w) >+ DclockWidget w; >+ { >+- if (w->dclock.bell = !w->dclock.bell) { >++ if ((w->dclock.bell = !w->dclock.bell)) { >+ playbell(w, 1); >+ } >+ ResizeNow(w); >+@@ -2159,7 +2181,7 @@ >+ DclockWidget w; >+ XButtonEvent *event; >+ { >+- static saved_secs, saved_miltime, saved_fade, saved_blink; >++ static int saved_secs, saved_miltime, saved_fade, saved_blink; >+ >+ if (event->button == 3) { >+ if (!(w->dclock.display_time = !w->dclock.display_time)) { >+@@ -2184,20 +2206,20 @@ >+ */ >+ 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 -urN /usr/ports/x11-clocks/dclock/files/patch-DclockP.h x11-clocks/dclock/files/patch-DclockP.h >--- /usr/ports/x11-clocks/dclock/files/patch-DclockP.h 1970-01-01 09:00:00.000000000 +0900 >+++ x11-clocks/dclock/files/patch-DclockP.h 2012-10-08 00:06:14.000000000 +0900 >@@ -0,0 +1,12 @@ >+--- DclockP.h.orig 2008-07-08 12:56:09.000000000 +0900 >++++ DclockP.h 2012-10-07 23:57:24.000000000 +0900 >+@@ -9,7 +9,9 @@ >+ #include "Dclock.h" >+ >+ /* Add -DXFT_SUPPORT in the Imakefile for freefont support */ >++#ifdef XFT_SUPPORT >+ #include <X11/Xft/Xft.h> >++#endif >+ >+ >+ typedef struct { >diff -urN /usr/ports/x11-clocks/dclock/files/patch-dclock.c x11-clocks/dclock/files/patch-dclock.c >--- /usr/ports/x11-clocks/dclock/files/patch-dclock.c 1970-01-01 09:00:00.000000000 +0900 >+++ x11-clocks/dclock/files/patch-dclock.c 2012-10-08 00:29:21.000000000 +0900 >@@ -0,0 +1,32 @@ >+--- dclock.c.orig 2008-07-08 12:35:18.000000000 +0900 >++++ dclock.c 2012-10-08 00:28:47.000000000 +0900 >+@@ -7,6 +7,7 @@ >+ * manager: *Dclock.seconds: on >+ */ >+ #include <stdio.h> >++#include <stdlib.h> >+ #include <locale.h> >+ #include <X11/Intrinsic.h> >+ #include "Dclock.h" >+@@ -114,6 +115,7 @@ >+ { "quit", quit }, >+ }; >+ >++int >+ main(argc, argv) >+ char *argv[]; >+ { >+@@ -122,10 +124,11 @@ >+ char *name, *rindex(); >+ XWMHints *wmhints; /* for proper input focus */ >+ >+- if (name = rindex(argv[0], '/')) >++ if ((name = rindex(argv[0], '/'))) { >+ name++; >+- else >++ } else { >+ name = argv[0]; >++ } >+ >+ setlocale(LC_TIME, ""); >+ >diff -urN /usr/ports/x11-clocks/dclock/pkg-descr x11-clocks/dclock/pkg-descr >--- /usr/ports/x11-clocks/dclock/pkg-descr 2005-12-18 23:54:18.000000000 +0900 >+++ x11-clocks/dclock/pkg-descr 2012-09-27 18:55:47.000000000 +0900 >@@ -4,5 +4,4 @@ > version 2.0. This port uses Debian porting as upstream, which is based > on Tim's version and also includes some additional features and fixes. > >-WWW: http://opencircuitdesign.com/~tim/ >-WWW: http://packages.qa.debian.org/d/dclock.html >+WWW: http://opencircuitdesign.com/~tim/programs/dclock/ >diff -urN /usr/ports/x11-clocks/dclock/pkg-plist x11-clocks/dclock/pkg-plist >--- /usr/ports/x11-clocks/dclock/pkg-plist 2005-12-18 23:54:18.000000000 +0900 >+++ x11-clocks/dclock/pkg-plist 1970-01-01 09:00:00.000000000 +0900 >@@ -1,11 +0,0 @@ >-@comment $FreeBSD: ports/x11-clocks/dclock/pkg-plist,v 1.4 2005/12/18 14:54:18 pav Exp $ >-bin/dclock >-lib/X11/app-defaults/DClock >-%%DATADIR%%/sounds/bell.wav >-%%DATADIR%%/sounds/digital.wav >-@dirrm %%DATADIR%%/sounds >-@dirrm %%DATADIR%% >-%%PORTDOCS%%%%DOCSDIR%%/README >-%%PORTDOCS%%%%DOCSDIR%%/TODO >-%%PORTDOCS%%%%DOCSDIR%%/changelog.Debian >-%%PORTDOCS%%@dirrm %%DOCSDIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 172513
: 128663