1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

Update to 2.3

- Take maintainership
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2017-06-14 16:10:51 +00:00
parent 3c436e05fc
commit 46ef03a478
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=443588
3 changed files with 18 additions and 75 deletions

View File

@ -2,35 +2,30 @@
# $FreeBSD$
PORTNAME= tty-clock
PORTVERSION= 2.0.0
PORTREVISION= 1
PORTVERSION= 2.3
DISTVERSIONPREFIX= v
CATEGORIES= sysutils
MAINTAINER= ports@FreeBSD.org
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Terminal based clock
LICENSE= BSD3CLAUSE
USE_GITHUB= yes
GH_ACCOUNT= xorg62
GH_TAGNAME= a82fd71
USES= ncurses
ALL_TARGET= tty-clock
LDFLAGS+= -lncursesw
USES= gmake ncurses pkgconfig
PLIST_FILES= bin/tty-clock
PLIST_FILES= bin/tty-clock \
man/man1/tty-clock.1.gz
GH_ACCOUNT= xorg62
USE_GITHUB= yes
post-patch:
@${REINPLACE_CMD} -e \
'/^CC/s| =| ?=| ; \
s|/usr/local|$${PREFIX}| ; \
/^CFLAGS/s| =| +=| ; \
s|-Wall -g|-Wall| ; \
/^LDFLAGS/s| =| +=| ; \
/@echo /s|^|#| ; \
s|@$${CC} |$${CC} | ; \
s|@cp |$${BSD_INSTALL_PROGRAM} | ; \
s| $${INSTALLPATH}| $${DESTDIR}$${INSTALLPATH}| ; \
/@chmod /s|^|#|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|share/man|man|; s| -g||; /@echo /d; /@chmod/d' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tty-clock ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/tty-clock.1 ${STAGEDIR}${PREFIX}/man/man1/
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (xorg62-tty-clock-2.0.0-a82fd71_GH0.tar.gz) = 6123eff580a0f5f6e61d0ab8e4c74a4c97d9bb31fe9cd5c66c01c721da87eacc
SIZE (xorg62-tty-clock-2.0.0-a82fd71_GH0.tar.gz) = 5028
TIMESTAMP = 1497207906
SHA256 (xorg62-tty-clock-v2.3_GH0.tar.gz) = 343e119858db7d5622a545e15a3bbfde65c107440700b62f9df0926db8f57984
SIZE (xorg62-tty-clock-v2.3_GH0.tar.gz) = 7764

View File

@ -1,53 +0,0 @@
--- ttyclock.c.orig 2009-06-17 18:07:38 UTC
+++ ttyclock.c
@@ -174,19 +174,19 @@ update_hour(void)
}
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_clock(void)
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_clock(void)
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;
}