Date: Sun, 16 Sep 2012 19:12:08 GMT From: Eric Freeman <freebsdports@chillibear.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/171690: [MAINTAINER] update sysutil/tty-clock fix on FreeBSD 9 Message-ID: <201209161912.q8GJC8g1077391@red.freebsd.org> Resent-Message-ID: <201209161920.q8GJK8Zd037772@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171690 >Category: ports >Synopsis: [MAINTAINER] update sysutil/tty-clock fix on FreeBSD 9 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Sep 16 19:20:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Eric Freeman >Release: 9.0 >Organization: Sundive Networks >Environment: >Description: Currently my port of sysutil/tty-clock is marked as broken on 9+, this patch fixes that by adding a patch to the source. My thanks to Sergey Kronshtadtov for assistance with this. >How-To-Repeat: n/a >Fix: diff -ruN tty-clock.old/Makefile tty-clock/Makefile --- tty-clock.old/Makefile 2011-01-10 02:17:16.000000000 +0000 +++ tty-clock/Makefile 2012-09-16 18:23:05.000000000 +0100 @@ -7,6 +7,7 @@ PORTNAME= tty-clock PORTVERSION= 2.0.0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://github.com/xorg62/${PORTNAME}/tarball/ DISTNAME= a82fd71 @@ -30,10 +31,4 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/tty-clock ${PREFIX}/bin -.include <bsd.port.pre.mk> - -.if ${OSVERSION} > 900007 -BROKEN= Core dumps on FreeBSD 9+ -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff -ruN tty-clock.old/files/patch-ttyclock.c tty-clock/files/patch-ttyclock.c --- tty-clock.old/files/patch-ttyclock.c 1970-01-01 01:00:00.000000000 +0100 +++ tty-clock/files/patch-ttyclock.c 2012-09-16 18:20:28.000000000 +0100 @@ -0,0 +1,53 @@ +--- ttyclock.c.orig 2009-06-17 19:07:38.000000000 +0100 ++++ ttyclock.c 2012-09-16 18:16:24.000000000 +0100 +@@ -174,19 +174,19 @@ + } + + void +-draw_number(int n, int x, int y) ++draw_number(int n, int y, int x) + { +- int i, sy = y; ++ int i, sx = x; + +- for(i = 0; i < 30; ++i, ++sy) ++ for(i = 0; i < 30; ++i, ++sx) + { +- if(sy == y + 6) ++ if(sx == x + 6) + { +- sy = y; +- ++x; ++ sx = x; ++ ++y; + } + wbkgdset(ttyclock->framewin, COLOR_PAIR(number[n][i/2])); +- mvwaddch(ttyclock->framewin, x, sy, ' '); ++ mvwaddch(ttyclock->framewin, y, sx, ' '); + } + wrefresh(ttyclock->framewin); + +@@ -209,11 +209,6 @@ + draw_number(ttyclock->date.minute[0], 1, 20); + draw_number(ttyclock->date.minute[1], 1, 27); + +- /* Draw the date */ +- wbkgdset(ttyclock->datewin, (COLOR_PAIR(2))); +- mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr); +- wrefresh(ttyclock->datewin); +- + /* Draw second if the option is enable */ + if(ttyclock->option.second) + { +@@ -227,6 +222,11 @@ + draw_number(ttyclock->date.second[1], 1, 46); + } + ++ /* Draw the date */ ++ wbkgdset(ttyclock->datewin, (COLOR_PAIR(2))); ++ mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr); ++ wrefresh(ttyclock->datewin); ++ + return; + } + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209161912.q8GJC8g1077391>