Theo Buehler <t...@theobuehler.org> writes: > On Thu, Feb 25, 2021 at 07:53:36PM -0800, Greg Steuck wrote: >> Theo Buehler <t...@theobuehler.org> writes: >> >> > The diff below fixes the build of this port. >> > >> > However, it only partly works for me. It draws a nice albeit minuscule >> > Mandelbrot set. As soon as I hover with the mouse over the window, it >> > exits with this error: >> > >> > X Error of failed request: BadMatch (invalid parameter attributes) >> > Major opcode of failed request: 42 (X_SetInputFocus) >> > Serial number of failed request: 384 >> > Current serial number in output stream: 384 >> >> If you want to go to sourceforge for an upgrade/fix, there's a teenage >> version from 14 years ago: https://sourceforge.net/p/wmmand/news/ > > Thanks. This version has that bug fixed and works perfectly fine for me. > It now uses ImageMagick's display command instead of xv.
OK gnezdo > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/misc/wmmand/Makefile,v > retrieving revision 1.19 > diff -u -p -r1.19 Makefile > --- Makefile 12 Jul 2019 20:47:55 -0000 1.19 > +++ Makefile 26 Feb 2021 06:04:53 -0000 > @@ -2,27 +2,29 @@ > > COMMENT= wm-dockapp; mandelbrot explorer > > -DISTNAME= wmMand-1.0 > +DISTNAME= wmMand-1.3.2 > PKGNAME= ${DISTNAME:L} > -REVISION= 2 > CATEGORIES= misc x11 x11/windowmaker > > -HOMEPAGE= http://nis-www.lanl.gov/~mgh/WindowMaker/DockApps.shtml > +HOMEPAGE= https://sourceforge.net/p/wmmand/news/ > > # GPL > PERMIT_PACKAGE= Yes > > -WANTLIB= X11 Xext Xpm c xcb > +WANTLIB= X11 Xext Xpm c > > -MASTER_SITES= http://nis-www.lanl.gov/~mgh/WindowMaker/ > - > -RUN_DEPENDS= graphics/xv > +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=wmmand/} > +EXTRACT_SUFX= .tar.bz2 > > +RUN_DEPENDS= graphics/ImageMagick > > NO_TEST= Yes > > WRKSRC= ${WRKDIST}/wmMand > > ALL_TARGET= clean all > + > +post-extract: > + @cd ${WRKSRC} && gunzip wmMand.6.gz > > .include <bsd.port.mk> > Index: distinfo > =================================================================== > RCS file: /cvs/ports/misc/wmmand/distinfo,v > retrieving revision 1.4 > diff -u -p -r1.4 distinfo > --- distinfo 18 Jan 2015 03:14:33 -0000 1.4 > +++ distinfo 26 Feb 2021 05:25:32 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (wmMand-1.0.tar.gz) = SiPMZvEZCA0dYkDpn4eCLYLTd38bDvCoG05aBlsAeis= > -SIZE (wmMand-1.0.tar.gz) = 66466 > +SHA256 (wmMand-1.3.2.tar.bz2) = wSEn6LwLDXDD+6q68dbiMixnOp4AGrREiATnoNObz+o= > +SIZE (wmMand-1.3.2.tar.bz2) = 41268 > Index: patches/patch-wmMand_Makefile > =================================================================== > RCS file: /cvs/ports/misc/wmmand/patches/patch-wmMand_Makefile,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 patch-wmMand_Makefile > --- patches/patch-wmMand_Makefile 30 Mar 2001 15:17:51 -0000 1.1.1.1 > +++ patches/patch-wmMand_Makefile 26 Feb 2021 05:54:06 -0000 > @@ -1,21 +1,22 @@ > $OpenBSD: patch-wmMand_Makefile,v 1.1.1.1 2001/03/30 15:17:51 wilfried Exp $ > ---- wmMand/Makefile.orig Mon Feb 15 17:43:51 1999 > -+++ wmMand/Makefile Fri Mar 30 16:17:59 2001 > +Index: wmMand/Makefile > +--- wmMand/Makefile.orig > ++++ wmMand/Makefile > @@ -1,8 +1,8 @@ > -CC = gcc > -CFLAGS = -O2 -Wall > -INCDIR = -I/usr/X11R6/include/X11 > --DESTDIR= /usr/X11R6 > +-DESTDIR= /usr/local > -LIBDIR = -L/usr/X11R6/lib > +#CC = gcc > +#CFLAGS = -O2 -Wall > +INCDIR = -I${X11BASE}/include > -+#DESTDIR= /usr/X11R6 > ++#DESTDIR= /usr/local > +LIBDIR = -L${X11BASE}/lib > # for linux > LIBS = -lXpm -lX11 -lXext > # for Solaris > -@@ -12,14 +12,14 @@ OBJS = wmMand.o \ > +@@ -12,7 +12,7 @@ OBJS = wmMand.o \ > > > .c.o: > @@ -24,20 +25,15 @@ $OpenBSD: patch-wmMand_Makefile,v 1.1.1. > > > all: wmMand.o wmMand > - > - wmMand.o: wmMand_master.xpm wmMand_mask.xbm > - wmMand: $(OBJS) > -- $(CC) $(CFLAGS) $(SYSTEM) -o wmMand $^ $(INCDIR) $(LIBDIR) $(LIBS) > -+ $(CC) $(CFLAGS) $(SYSTEM) -o wmMand $(OBJS) $(LIBDIR) $(LIBS) > - > - clean: > - for i in $(OBJS) ; do \ > -@@ -28,6 +28,6 @@ clean: > +@@ -28,9 +28,5 @@ clean: > rm -f wmMand > > install:: wmMand > +- install -d $(DESTDIR) > +- install -d $(DESTDIR)/man/man6 > +- install -d $(DESTDIR)/share/pixmaps > - install -s -m 0755 wmMand $(DESTDIR)/bin > -- install -m 0644 wmMand.1 $(DESTDIR)/man/man1 > +- install -m 0644 wmMand.6.gz $(DESTDIR)/man/man6 > +- install -m 0644 wmMand.png $(DESTDIR)/share/pixmaps > + ${BSD_INSTALL_PROGRAM} wmMand $(PREFIX)/bin > -+ ${BSD_INSTALL_MAN} wmMand.1 $(PREFIX)/man/man1 > - > ++ ${BSD_INSTALL_MAN} wmMand.6 $(PREFIX)/man/man6 > Index: patches/patch-wmMand_wmMand_c > =================================================================== > RCS file: /cvs/ports/misc/wmmand/patches/patch-wmMand_wmMand_c,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 patch-wmMand_wmMand_c > --- patches/patch-wmMand_wmMand_c 30 Mar 2001 15:17:51 -0000 1.1.1.1 > +++ patches/patch-wmMand_wmMand_c 26 Feb 2021 05:38:54 -0000 > @@ -1,24 +1,14 @@ > -$OpenBSD: patch-wmMand_wmMand_c,v 1.1.1.1 2001/03/30 15:17:51 wilfried Exp $ > ---- wmMand/wmMand.c.orig Mon Feb 15 17:30:27 1999 > -+++ wmMand/wmMand.c Fri Mar 30 16:38:00 2001 > -@@ -504,11 +504,16 @@ void ButtonPressEvent(XButtonEvent *xev, > +$OpenBSD$ > + > +Index: wmMand/wmMand.c > +--- wmMand/wmMand.c.orig > ++++ wmMand/wmMand.c > +@@ -55,8 +55,6 @@ > + #include <X11/X.h> > + #include <err.h> > > - } else if ((xev->x >= 50)&&(xev->x <= 58)){ > +-#define XK_LATIN1 1 > +-#define XK_MISCELLANY 1 > + #include <X11/keysymdef.h> > > -+ char name[FILENAME_MAX]; > -+ snprintf(name, sizeof(name), "%s/.wmMand.gif", getenv("HOME")); > - ComputeImage(Center_x, Center_y, 540, 540, Range, BigImage); > -- fp_gif = fopen("/tmp/wmMand.gif", "w"); > -- WriteGIF(fp_gif, BigImage, 0, 540, 540, Info->RRR, Info->GGG, > Info->BBB, 256, 0, ""); > -- fclose(fp_gif); > -- system("xv /tmp/wmMand.gif &"); > -+ if ((fp_gif = fopen(name, "w"))) { > -+ char cmd[FILENAME_MAX]; > -+ WriteGIF(fp_gif, BigImage, 0, 540, 540, Info->RRR, > Info->GGG, Info->BBB, 256, 0, ""); > -+ fclose(fp_gif); > -+ snprintf(cmd, sizeof(cmd), "xv %s &", name); > -+ system(cmd); > -+ } > - > - > - } > + #include <X11/xpm.h> > Index: patches/patch-wmMand_xvgifwr_c > =================================================================== > RCS file: patches/patch-wmMand_xvgifwr_c > diff -N patches/patch-wmMand_xvgifwr_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-wmMand_xvgifwr_c 26 Feb 2021 05:30:10 -0000 > @@ -0,0 +1,13 @@ > +$OpenBSD$ > + > +Index: wmMand/xvgifwr.c > +--- wmMand/xvgifwr.c.orig > ++++ wmMand/xvgifwr.c > +@@ -38,6 +38,7 @@ > + > + #include <stdio.h> > + #include <stdlib.h> > ++#include <string.h> > + #include <ctype.h> > + #include <stddef.h> > + #include <string.h> > Index: patches/patch-wmgeneral_wmgeneral_c > =================================================================== > RCS file: patches/patch-wmgeneral_wmgeneral_c > diff -N patches/patch-wmgeneral_wmgeneral_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-wmgeneral_wmgeneral_c 25 Feb 2021 22:14:15 -0000 > @@ -0,0 +1,23 @@ > +$OpenBSD$ > + > +Index: wmgeneral/wmgeneral.c > +--- wmgeneral/wmgeneral.c.orig > ++++ wmgeneral/wmgeneral.c > +@@ -34,6 +34,17 @@ > + > + #include "wmgeneral.h" > + > ++ /********************/ > ++ /* Global Variables */ > ++/********************/ > ++ > ++Display *display; > ++Window Root; > ++int d_depth; > ++GC NormalGC; > ++XpmIcon wmgen; > ++Window iconwin, win; > ++ > + /*****************/ > + /* X11 Variables */ > + /*****************/ > Index: patches/patch-wmgeneral_wmgeneral_h > =================================================================== > RCS file: patches/patch-wmgeneral_wmgeneral_h > diff -N patches/patch-wmgeneral_wmgeneral_h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-wmgeneral_wmgeneral_h 25 Feb 2021 22:14:15 -0000 > @@ -0,0 +1,24 @@ > +$OpenBSD$ > + > +Index: wmgeneral/wmgeneral.h > +--- wmgeneral/wmgeneral.h.orig > ++++ wmgeneral/wmgeneral.h > +@@ -28,12 +28,12 @@ typedef struct { > + /* Global variable */ > + /*******************/ > + > +-Display *display; > +-Window Root; > +-int d_depth; > +-GC NormalGC; > +-XpmIcon wmgen; > +-Window iconwin, win; > ++extern Display *display; > ++extern Window Root; > ++extern int d_depth; > ++extern GC NormalGC; > ++extern XpmIcon wmgen; > ++extern Window iconwin, win; > + > + > + /***********************/ > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/misc/wmmand/pkg/PLIST,v > retrieving revision 1.2 > diff -u -p -r1.2 PLIST > --- pkg/PLIST 15 Sep 2004 17:54:17 -0000 1.2 > +++ pkg/PLIST 26 Feb 2021 05:54:33 -0000 > @@ -1,3 +1,3 @@ > @comment $OpenBSD: PLIST,v 1.2 2004/09/15 17:54:17 espie Exp $ > -bin/wmMand > -@man man/man1/wmMand.1 > +@bin bin/wmMand > +@man man/man6/wmMand.6