Package Details: dclock 2.2.2-5

Git Clone URL: https://aur.archlinux.org/dclock.git (read-only, click to copy)
Package Base: dclock
Description: Digital clock for X
Upstream URL: http://opencircuitdesign.com/~tim/programs/
Licenses: GPL
Submitter: jpkotta
Maintainer: jpkotta
Last Packager: jpkotta
Votes: 5
Popularity: 0.004188
First Submitted: 2015-08-28 20:09 (UTC)
Last Updated: 2015-08-28 20:10 (UTC)

Latest Comments

mpento commented on 2025-04-12 03:54 (UTC)

@jpkotta,

This package fails to compile because of some "old-style" c issues that no longer work with the current version of gcc (14+). Providing a patch for the effected source files below (dclock.c, Dclock.c):


diff -ruN '--exclude=Makefile' dclock-2.2.2/dclock.c dclock-2.2.2-diff/dclock.c
--- dclock-2.2.2/dclock.c   2008-07-07 23:35:18.000000000 -0400
+++ dclock-2.2.2-diff/dclock.c  2025-04-11 23:23:24.227853227 -0400
@@ -10,6 +10,7 @@
 #include <locale.h>
 #include <X11/Intrinsic.h>
 #include "Dclock.h"
+#include <stdlib.h>

 static XrmOptionDescRec options[] = {
     {"-date",     "*Dclock.date",    XrmoptionSepArg, NULL    },
@@ -114,8 +115,7 @@
     { "quit",  quit },
 };

-main(argc, argv)
-char *argv[];
+int main(int argc, char *argv[])
 {
     XtAppContext app;
     Widget toplevel, clock_w;
diff -ruN '--exclude=Makefile' dclock-2.2.2/Dclock.c dclock-2.2.2-diff/Dclock.c
--- dclock-2.2.2/Dclock.c   2008-07-08 00:00:35.000000000 -0400
+++ dclock-2.2.2-diff/Dclock.c  2025-04-11 23:17:46.254756293 -0400
@@ -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;

@@ -2159,7 +2159,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)) {

Paste the above into a file and push to the repo along with the following change to the PKGBUILD file:

Add prepare() with the following:

patch -p1 dclock.patch

This worked for me, hopefully it will help.

Harri commented on 2024-07-27 11:14 (UTC)

Doesn't build anymore.