aboutsummaryrefslogtreecommitdiff
path: root/x11-clocks
diff options
context:
space:
mode:
authorPierre Pronchery <khorben@defora.org>2023-04-26 15:29:37 +0000
committerJoseph Mingrone <jrm@FreeBSD.org>2023-04-26 15:46:31 +0000
commit7a247c8525a453f25a1d771e79fafdde09978776 (patch)
treebf393106ec3f6942c818cfe80f41a8e95d770624 /x11-clocks
parent817b54032c92ab93627811d0029d69584322864a (diff)
downloadports-7a247c8525a453f25a1d771e79fafdde09978776.tar.gz
ports-7a247c8525a453f25a1d771e79fafdde09978776.zip
x11-clocks/wmitime: Revive port
WMitime is yet another clock dock app which shows standard time, date, as well as the new Internet time. WWW: https://www.dockapps.net/wmitime Reviewed by: jrm Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39833
Diffstat (limited to 'x11-clocks')
-rw-r--r--x11-clocks/Makefile1
-rw-r--r--x11-clocks/wmitime/Makefile24
-rw-r--r--x11-clocks/wmitime/distinfo3
-rw-r--r--x11-clocks/wmitime/files/patch-wmitime.c69
-rw-r--r--x11-clocks/wmitime/pkg-descr2
-rw-r--r--x11-clocks/wmitime/pkg-plist3
6 files changed, 102 insertions, 0 deletions
diff --git a/x11-clocks/Makefile b/x11-clocks/Makefile
index 95991bc42623..f3c02109318b 100644
--- a/x11-clocks/Makefile
+++ b/x11-clocks/Makefile
@@ -36,6 +36,7 @@
SUBDIR += wmclock
SUBDIR += wmclockmon
SUBDIR += wmfishtime
+ SUBDIR += wmitime
SUBDIR += wmtime
SUBDIR += wmtimer
SUBDIR += xalarm
diff --git a/x11-clocks/wmitime/Makefile b/x11-clocks/wmitime/Makefile
new file mode 100644
index 000000000000..0dd6465c7b48
--- /dev/null
+++ b/x11-clocks/wmitime/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= wmitime
+PORTVERSION= 0.5
+CATEGORIES= x11-clocks windowmaker
+MASTER_SITES= https://www.dockapps.net/download/
+
+MAINTAINER= khorben@defora.org
+COMMENT= Docking clock app also showing the new Internet time
+WWW= https://www.dockapps.net/wmitime
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libdockapp.so:x11-wm/libdockapp
+
+USES= gmake iconv localbase:ldflags xorg
+USE_XORG= x11 xext xpm
+
+MAKE_ARGS= CFLAGS="-O2 -Wall ${CFLAGS}" \
+ MANDIR="${PREFIX}/man/man1"
+ALL_TARGET= wmitime
+
+WRKSRC= ${WRKDIR}/dockapps-26db447
+
+.include <bsd.port.mk>
diff --git a/x11-clocks/wmitime/distinfo b/x11-clocks/wmitime/distinfo
new file mode 100644
index 000000000000..5c5f348abeb7
--- /dev/null
+++ b/x11-clocks/wmitime/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1682443844
+SHA256 (wmitime-0.5.tar.gz) = a183e208d8babf97e8a40e37e7a5a8b1e1371ca547d7896f314f808516f45e6d
+SIZE (wmitime-0.5.tar.gz) = 15099
diff --git a/x11-clocks/wmitime/files/patch-wmitime.c b/x11-clocks/wmitime/files/patch-wmitime.c
new file mode 100644
index 000000000000..dc4beb240c28
--- /dev/null
+++ b/x11-clocks/wmitime/files/patch-wmitime.c
@@ -0,0 +1,69 @@
+--- wmitime.c.orig 2015-08-22 01:42:17 UTC
++++ wmitime.c
+@@ -248,7 +248,7 @@ void DrawInetTime(void)
+
+ /* Compute Inet Time */
+ iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec);
+- iTime=iTime+((timezone-1)+3600);
++ iTime=iTime+((1-clk->tm_gmtoff)+3600);
+ if (clk->tm_isdst)
+ iTime-=3600;
+ iTime=(iTime*1000)/86400;
+@@ -283,11 +283,11 @@ void DrawStdTime(void)
+ if (i==0)
+ i=12;
+
+- sprintf(blitstr, "%2i:%02i:%02i", i, clk->tm_min, clk->tm_sec);
++ snprintf(blitstr, sizeof(blitstr), "%2i:%02i:%02i", i, clk->tm_min, clk->tm_sec);
+ }
+ else
+ {
+- sprintf(blitstr, "%02i:%02i:%02i", i, clk->tm_min, clk->tm_sec);
++ snprintf(blitstr, sizeof(blitstr), "%02i:%02i:%02i", i, clk->tm_min, clk->tm_sec);
+ }
+
+
+@@ -344,7 +344,7 @@ void DrawDate(void)
+ inbytesleft = sizeof OrigBlitStr;
+ outbytesleft = sizeof BlitStr;
+
+- sprintf(OrigBlitStr, "%s", nl_langinfo(ABDAY_1 + clk->tm_wday));
++ snprintf(OrigBlitStr, sizeof(OrigBlitStr), "%s", nl_langinfo(ABDAY_1 + clk->tm_wday));
+ iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+ BlitStr[2] = 0;
+ BlitString( BlitStr, 6, 50);
+@@ -354,14 +354,14 @@ void DrawDate(void)
+ inbytesleft = sizeof OrigBlitStr;
+ outbytesleft = sizeof BlitStr;
+
+- sprintf(OrigBlitStr, "%s", nl_langinfo(ABMON_1 + clk->tm_mon));
++ snprintf(OrigBlitStr, sizeof(OrigBlitStr), "%s", nl_langinfo(ABMON_1 + clk->tm_mon));
+ iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+ BlitStr[3] = 0;
+ BlitString( BlitStr, 40, 50);
+
+ iconv_close(cd);
+
+- sprintf(BlitStr, "%02i", clk->tm_mday);
++ snprintf(BlitStr, sizeof(BlitStr), "%02i", clk->tm_mday);
+ BlitString( BlitStr, 25, 50);
+ }
+
+@@ -374,7 +374,7 @@ void DrawInetWheel(void)
+
+ /* Calculate Wheel Position... */
+ iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec);
+- iTime=iTime+((timezone-1)+3600);
++ iTime=iTime+((1-clk->tm_gmtoff)+3600);
+ if (clk->tm_isdst)
+ iTime-=3600;
+ iTime=(iTime*1000)/8640;
+@@ -566,7 +566,7 @@ void BlitNum(int num, int x, int y)
+ char buf[1024];
+ int newx=x;
+
+- sprintf(buf, "%03i", num);
++ snprintf(buf, sizeof(buf), "%03i", num);
+
+ BlitString(buf, newx, y);
+ }
diff --git a/x11-clocks/wmitime/pkg-descr b/x11-clocks/wmitime/pkg-descr
new file mode 100644
index 000000000000..f4f496cdb577
--- /dev/null
+++ b/x11-clocks/wmitime/pkg-descr
@@ -0,0 +1,2 @@
+WMitime is yet another clock dock app which shows standard time, date, as well
+as the new Internet time.
diff --git a/x11-clocks/wmitime/pkg-plist b/x11-clocks/wmitime/pkg-plist
new file mode 100644
index 000000000000..cca30973f4f9
--- /dev/null
+++ b/x11-clocks/wmitime/pkg-plist
@@ -0,0 +1,3 @@
+bin/wmitime
+man/man1/wmitime.1.gz
+share/applications/wmitime.desktop