Bug 171690 - [MAINTAINER] update sysutil/tty-clock fix on FreeBSD 9
Summary: [MAINTAINER] update sysutil/tty-clock fix on FreeBSD 9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-16 20:20 UTC by Eric Freeman
Modified: 2012-09-19 21:10 UTC (History)
0 users

See Also:


Attachments
file.diff (2.28 KB, patch)
2012-09-16 20:20 UTC, Eric Freeman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Freeman 2012-09-16 20:20:08 UTC
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
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2012-09-19 14:36:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->madpilot

I'll take it.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2012-09-19 21:00:41 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-09-19 21:00:48 UTC
Author: madpilot
Date: Wed Sep 19 20:00:34 2012
New Revision: 304544
URL: http://svn.freebsd.org/changeset/ports/304544

Log:
  Fix on 9.x and newer.
  
  PR:		ports/171690
  Submitted by:	Eric Freeman <freebsdports@chillibear.com>
  Approved by:	crees, tabthorpe (mentors, implicit)

Added:
  head/sysutils/tty-clock/files/
  head/sysutils/tty-clock/files/patch-ttyclock.c   (contents, props changed)
Modified:
  head/sysutils/tty-clock/Makefile   (contents, props changed)

Modified: head/sysutils/tty-clock/Makefile
==============================================================================
--- head/sysutils/tty-clock/Makefile	Wed Sep 19 19:58:38 2012	(r304543)
+++ head/sysutils/tty-clock/Makefile	Wed Sep 19 20:00:34 2012	(r304544)
@@ -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-build:
 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>

Added: head/sysutils/tty-clock/files/patch-ttyclock.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/tty-clock/files/patch-ttyclock.c	Wed Sep 19 20:00:34 2012	(r304544)
@@ -0,0 +1,52 @@
+--- 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;
+ }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"