<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/42f80f76e2e6a13660db2a52893dd486790299fb">https://github.com/macports/macports-ports/commit/42f80f76e2e6a13660db2a52893dd486790299fb</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 42f80f76e2e6a13660db2a52893dd486790299fb
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Sun Sep 3 05:28:14 2023 -0500
<span style='display:block; white-space:pre;color:#404040;'> unclutter: Fix code; fix compiler/flags; install doc
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Modernize code to avoid implicit function declarations and other errors
</span><span style='display:block; white-space:pre;color:#404040;'> with modern compilers.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Use the right compiler and flags and enable the universal variant.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Install the README.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fix typos in messages.
</span>---
x11/unclutter/Portfile | 19 ++++++-
x11/unclutter/files/fix-typos.patch | 14 +++++
x11/unclutter/files/modernize-code.patch | 92 ++++++++++++++++++++++++++++++++
3 files changed, 123 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/x11/unclutter/Portfile b/x11/unclutter/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a00411ce5f8..cde49e288ee 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/x11/unclutter/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/x11/unclutter/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,7 +2,7 @@ PortSystem 1.0
</span>
name unclutter
version 8
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> checksums rmd160 9e9747b6e1fa610d02ac50976cf80a49db38faf5 \
sha256 33a78949a7dedf2e8669ae7b5b2c72067896497820292c96afaa60bb71d1f2a6 \
size 9002
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -24,8 +24,23 @@ depends_lib \
</span>
worksrcdir ${name}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles fix-typos.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ modernize-code.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> use_configure no
<span style='display:block; white-space:pre;background:#ffe0e0;'>-build.args-append CCOPTIONS='-I${prefix}/include' LDOPTIONS='-L${prefix}/lib'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant universal {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.args-append CC="${configure.cc}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CCOPTIONS="${configure.cflags} [get_canonical_archflags cc]" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CDEBUGFLAGS= \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INCROOT="${prefix}/include" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LDOPTIONS="${configure.ldflags} [get_canonical_archflags ld]"
</span>
destroot.args BINDIR=${destroot}${prefix}/bin MANDIR=${destroot}${prefix}/share/man/man1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set docdir ${prefix}/share/doc/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 644 -W ${worksrcpath} README ${destroot}${docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/x11/unclutter/files/fix-typos.patch b/x11/unclutter/files/fix-typos.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..818e07186b2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/x11/unclutter/files/fix-typos.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix typos in messages.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- unclutter.c.orig 1994-04-11 10:40:47.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ unclutter.c 2023-09-03 05:17:48.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,8 +43,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -root apply to cursor on root window too\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -onescreen apply only to given screen of display\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -visible ignore visibility events\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- -noevents dont send pseudo events\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- -not names... dont apply to windows whose wm-name begins.\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ -noevents don't send pseudo events\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ -not names... don't apply to windows whose wm-name begins\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (must be last argument)");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/x11/unclutter/files/modernize-code.patch b/x11/unclutter/files/modernize-code.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..527c84f7a82
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/x11/unclutter/files/modernize-code.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,92 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: call to undeclared function 'atoi'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: call to undeclared library function 'abs' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: parameter 'argc' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: parameter 'screen' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+warning: non-void function does not return a value [-Wreturn-type]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- unclutter.c.orig 1994-04-11 10:40:47.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ unclutter.c 2023-09-03 05:05:57.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -24,14 +24,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <X11/Xutil.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <X11/Xproto.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "vroot.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char *progname;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-pexit(str)char *str;{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void pexit(char *str) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(stderr,"%s: %s\n",progname,str);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-usage(){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void usage(void) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pexit("usage:\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -display <display>\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -idle <seconds> time between polls to detect idleness.\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -57,13 +58,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * window can disappear while we are trying to create the child. Trap and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ignore these errors.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int (*defaulthandler)();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int errorhandler(display,error)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Display *display;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-XErrorEvent *error;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int (*defaulthandler)(Display *, XErrorEvent *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int errorhandler(Display *display, XErrorEvent *error)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(error->error_code!=BadWindow)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (*defaulthandler)(display,error);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char **names; /* -> argv list of names to avoid */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -72,9 +72,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * return true if window has a wm_name and the start of it matches
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * one of the given names to avoid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-nameinlist(display,window)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Display *display;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Window window;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int nameinlist(Display *display, Window window)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char **cpp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char *name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -93,9 +91,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * create a small 1x1 curssor with all pixels masked out on the given screen.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-createnullcursor(display,root)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Display *display;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Window root;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Cursor createnullcursor(Display *display, Window root)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Pixmap cursormask;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ XGCValues xgc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -117,7 +113,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return cursor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-main(argc,argv)char **argv;{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int main(int argc, char **argv) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Display *display;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int screen,oldx = -99,oldy = -99,numscreens;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int doroot = 0, jitter = 0, idletime = 5, usegrabmethod = 0, waitagain = 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- vroot.h.orig 1991-08-02 11:13:54.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ vroot.h 2023-09-03 05:05:57.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -38,8 +38,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <X11/Xatom.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static Window
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-VirtualRootWindow(dpy, screen)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Display *dpy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++VirtualRootWindow(Display *dpy, int screen)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static Display *save_dpy = (Display *)0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int save_screen = -1;
</span></pre><pre style='margin:0'>
</pre>