aboutsummaryrefslogtreecommitdiff
path: root/x11-clocks
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2020-09-02 10:05:06 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2020-09-02 10:05:06 +0000
commit4db449c8a1777284798e314518f29c65d046f3c0 (patch)
treea359e58b7f7b5cab334ccfca3fb97cc78997fbc1 /x11-clocks
parent989662acdb697a621d6cc3dd864628485f8d2892 (diff)
downloadports-4db449c8a1777284798e314518f29c65d046f3c0.tar.gz
ports-4db449c8a1777284798e314518f29c65d046f3c0.zip
x11-clocks/wmbinclock: fix build in current
Another case of -fno-common issue. While here, add a couple of missing xorg modules and remove a noop REINPLACE_CMD PR: 249048 Submitted by: logix@foobar.franken.de MFH: 2020Q3 (build fix, -fno-common)
Notes
Notes: svn path=/head/; revision=547351
Diffstat (limited to 'x11-clocks')
-rw-r--r--x11-clocks/wmbinclock/Makefile3
-rw-r--r--x11-clocks/wmbinclock/files/patch-wmBinClock.c76
-rw-r--r--x11-clocks/wmbinclock/files/patch-xutils.c15
-rw-r--r--x11-clocks/wmbinclock/files/patch-xutils.h18
4 files changed, 110 insertions, 2 deletions
diff --git a/x11-clocks/wmbinclock/Makefile b/x11-clocks/wmbinclock/Makefile
index 0033b34efea8..f5cf6a81479c 100644
--- a/x11-clocks/wmbinclock/Makefile
+++ b/x11-clocks/wmbinclock/Makefile
@@ -16,10 +16,9 @@ GH_ACCOUNT= engerim42
PLIST_FILES= bin/wmBinClock
USES= gmake xorg
-USE_XORG= xpm
+USE_XORG= x11 xext xpm
post-patch:
- @${REINPLACE_CMD} -e 's|#include <values.h>||' ${WRKSRC}/wmBinClock.c
@${REINPLACE_CMD} -e 's|^CC.*=|CC ?=|' -e 's|^CFLAGS.*=|CFLAGS +=|' \
-e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/Makefile
diff --git a/x11-clocks/wmbinclock/files/patch-wmBinClock.c b/x11-clocks/wmbinclock/files/patch-wmBinClock.c
new file mode 100644
index 000000000000..583e427b64e3
--- /dev/null
+++ b/x11-clocks/wmbinclock/files/patch-wmBinClock.c
@@ -0,0 +1,76 @@
+--- wmBinClock.c.orig 2015-12-06 01:59:53 UTC
++++ wmBinClock.c
+@@ -58,8 +58,9 @@ int GotFirstClick1, GotDoubleClick1;
+ int GotFirstClick2, GotDoubleClick2;
+ int GotFirstClick3, GotDoubleClick3;
+ int DblClkDelay;
++extern Display *display;
+
+-void IntToBinary(int x, int *str[]);
++void IntToBinary(int x, int *str);
+ void PrintHelp(char err[]);
+
+ int main(int argc, char *argv[])
+@@ -660,7 +661,7 @@ int main(int argc, char *argv[])
+ }
+
+ tmp_hour = tmworld->tm_hour;
+- IntToBinary(tmp_hour, &tmp_str);
++ IntToBinary(tmp_hour, tmp_str);
+
+ for (s = 0; s < 6; s++)
+ {
+@@ -671,7 +672,7 @@ int main(int argc, char *argv[])
+ }
+
+ tmp_minute = tmworld->tm_min;
+- IntToBinary(tmp_minute, &tmp_str);
++ IntToBinary(tmp_minute, tmp_str);
+ for (s = 0; s < 6; s++)
+ {
+ if (tmp_str[s] == 1)
+@@ -681,7 +682,7 @@ int main(int argc, char *argv[])
+ }
+
+ tmp_second = tmworld->tm_sec;
+- IntToBinary(tmp_second, &tmp_str);
++ IntToBinary(tmp_second, tmp_str);
+
+ for (s = 0; s < 6; s++)
+ {
+@@ -692,7 +693,7 @@ int main(int argc, char *argv[])
+ }
+
+ tmp_day = tmworld->tm_mday;
+- IntToBinary(tmp_day, &tmp_str);
++ IntToBinary(tmp_day, tmp_str);
+
+ for (s = 0; s < 6; s++)
+ {
+@@ -703,7 +704,7 @@ int main(int argc, char *argv[])
+ }
+
+ tmp_month = tmworld->tm_mon + 1;
+- IntToBinary(tmp_month, &tmp_str);
++ IntToBinary(tmp_month, tmp_str);
+
+ for (s = 0; s < 6; s++)
+ {
+@@ -773,7 +774,7 @@ int main(int argc, char *argv[])
+ usleep(DELAY);
+ }
+ }
+-void IntToBinary(int x, int *str[])
++void IntToBinary(int x, int *str)
+ {
+ int i = 0;
+ int counter = 0;
+@@ -884,7 +885,7 @@ void PrintHelp(char err[])
+ strcpy(str,"Error in ");
+ strcat(str,err);
+ strcat(str,".\n\n");
+- printf(str);
++ printf("%s", str);
+ }
+
+ printf("Usage: wmBinClock [OPTIONS]\n\n");
diff --git a/x11-clocks/wmbinclock/files/patch-xutils.c b/x11-clocks/wmbinclock/files/patch-xutils.c
new file mode 100644
index 000000000000..ed6de96c68a8
--- /dev/null
+++ b/x11-clocks/wmbinclock/files/patch-xutils.c
@@ -0,0 +1,15 @@
+--- xutils.c.orig 2015-12-06 01:59:53 UTC
++++ xutils.c
+@@ -52,6 +52,12 @@ char *Geometry = "";
+ XpmIcon wmgen;
+ Pixmap pixmask;
+
++Display *display;
++Window Root;
++Window iconwin, win;
++int screen;
++int DisplayDepth;
++GC NormalGC;
+
+
+
diff --git a/x11-clocks/wmbinclock/files/patch-xutils.h b/x11-clocks/wmbinclock/files/patch-xutils.h
new file mode 100644
index 000000000000..71d2124b3bb9
--- /dev/null
+++ b/x11-clocks/wmbinclock/files/patch-xutils.h
@@ -0,0 +1,18 @@
+--- xutils.h.orig 2015-12-06 01:59:53 UTC
++++ xutils.h
+@@ -15,15 +15,6 @@ typedef struct {
+
+
+
+-/*
+- * Global variable
+- */
+-Display *display;
+-Window Root;
+-Window iconwin, win;
+-int screen;
+-int DisplayDepth;
+-GC NormalGC;
+
+
+