Thanks for the diff, Comments below. On Thu Oct 26, 2017 at 09:04:34PM +0200, Markus Hennecke wrote: > Update ctwm to latest release. > The build is switched to cmake and I think we can get rid of all the > patches. This is a huge improvement compared to the ancient version > currently in ports. > > Regards > Markus
> Index: Makefile > =================================================================== > RCS file: /cvs/ports/x11/ctwm/Makefile,v > retrieving revision 1.25 > diff -u -p -u -r1.25 Makefile > --- Makefile 17 Aug 2017 17:05:03 -0000 1.25 > +++ Makefile 26 Oct 2017 18:49:24 -0000 > @@ -2,8 +2,7 @@ > > COMMENT= twm, plus support for multiple virtual screens, etc > > -DISTNAME= ctwm-3.6 > -REVISION= 2 > +DISTNAME= ctwm-4.0.1 > > CATEGORIES= x11 > > @@ -12,11 +11,20 @@ HOMEPAGE= https://www.ctwm.org/ > # BSD-like/badly worded > PERMIT_PACKAGE_CDROM= Yes > > -WANTLIB= ICE SM X11 Xau Xdmcp Xext Xmu Xpm Xt c > +WANTLIB= ICE SM X11 Xext Xmu Xpm Xt c jpeg > > MASTER_SITES= ${HOMEPAGE}dist/ Please use https://www.ctwm.org/ instead of HOMEPAGE. > > -CONFIGURE_STYLE= imake > +MODULES= devel/cmake > + > +BUILD_DEPENDS= devel/bison \ > + textproc/asciidoc \ > + textproc/xmlto > + > +LIB_DEPENDS= graphics/jpeg This requires a WANTLIB update. `make port-lib-depends-check` > + > +CONFIGURE_ARGS+= -DETCDIR=${SYSCONFDIR} \ > + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE > > NO_TEST= Yes > > Index: distinfo > =================================================================== > RCS file: /cvs/ports/x11/ctwm/distinfo,v > retrieving revision 1.5 > diff -u -p -u -r1.5 distinfo > --- distinfo 18 Jan 2015 03:15:52 -0000 1.5 > +++ distinfo 26 Oct 2017 18:49:24 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (ctwm-3.6.tar.gz) = 2r4rF5ZD3bEAscc68gOME+3qcCFLS4RP0Sl+8nb/uzE= > -SIZE (ctwm-3.6.tar.gz) = 370563 > +SHA256 (ctwm-4.0.1.tar.gz) = ONLbvHc+PcnTGYP0zkzB5F5dnDWjh+F+kWRNNOKEgvw= > +SIZE (ctwm-4.0.1.tar.gz) = 897148 > Index: patches/patch-Imakefile > =================================================================== > RCS file: patches/patch-Imakefile > diff -N patches/patch-Imakefile > --- patches/patch-Imakefile 17 Sep 2012 10:25:11 -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,26 +0,0 @@ > ---- Imakefile.orig Tue Dec 11 16:38:52 2001 > -+++ Imakefile Sun Sep 2 19:01:07 2012 > -@@ -11,7 +11,7 @@ XCOMM > - #undef USE_SOUND > - #define XPM > - #define USEM4 > --#undef X11R6 > -+#define X11R6 > - #undef I18N > - > - YFLAGS = -d > -@@ -145,14 +145,6 @@ depend:: lex.c gram.c deftwmrc.c > - NormalLibraryTarget(ctwm, libctwm.o) > - ComplexProgramTarget(ctwm) > - InstallNonExecFile(system.ctwmrc,$(TWMDIR)) > --#ifdef XPM > --install:: xpm > -- MakeDir($(DESTDIR)$(TWMDIR)/images) > -- @case '${MFLAGS}' in *[i]*) set +e;; esac; \ > -- for i in xpm/?* ; do \ > -- (set -x; $(INSTALL) -c $(INSTLIBFLAGS) $$i > $(DESTDIR)$(TWMDIR)/images); \ > -- done > --#endif > - > - gram.h gram.c: gram.y > - $(YACC) $(YFLAGS) gram.y > Index: patches/patch-gram.y > =================================================================== > RCS file: patches/patch-gram.y > diff -N patches/patch-gram.y > --- patches/patch-gram.y 17 Sep 2012 10:25:49 -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,56 +0,0 @@ > ---- gram.y.orig Tue Dec 11 16:38:52 2001 > -+++ gram.y Sun Sep 2 18:59:56 2012 > -@@ -419,7 +419,6 @@ stmt : error > - | WINDOW_RING { list = &Scr->WindowRingL; } > - win_list > - | WINDOW_RING { Scr->WindowRingAll = TRUE; } > -- ; > - | WINDOW_RING_EXCLUDE { if (!Scr->WindowRingL) > - Scr->WindowRingAll = TRUE; > - list = &Scr->WindowRingExcludeL; } > -@@ -427,6 +426,7 @@ stmt : error > - > - | WINDOW_GEOMETRIES { } > - wingeom_list > -+ ; > - > - noarg : KEYWORD { if (!do_single_keyword ($1)) { > - twmrc_error_prefix(); > -@@ -683,10 +683,10 @@ wingeom_entries : /* Empty */ > - | wingeom_entries wingeom_entry > - ; > - > --wingeom_entry : string string { AddToList (&Scr->WindowGeometries, > $1, $2) } > -+wingeom_entry : string string { AddToList (&Scr->WindowGeometries, > $1, $2); } > -+ ; > - > - > -- > - squeeze : SQUEEZE_TITLE { > - if (HasShape) Scr->SqueezeTitle = TRUE; > - } > -@@ -834,6 +834,7 @@ occupy_workspc_entries : /* Empty */ > - occupy_workspc_entry : string { > - AddToClientsList ($1, client); > - } > -+ ; > - > - occupy_window_list : LB occupy_window_entries RB {} > - ; > -@@ -845,6 +846,7 @@ occupy_window_entries : /* Empty */ > - occupy_window_entry : string { > - AddToClientsList (workspace, $1); > - } > -+ ; > - > - icon_list : LB icon_entries RB {} > - ; > -@@ -962,6 +964,8 @@ string : STRING { ptr = (char > *)malloc(strlen((char* > - RemoveDQuote(ptr); > - $$ = (unsigned char*)ptr; > - } > -+ ; > -+ > - number : NUMBER { $$ = $1; } > - ; > - > Index: patches/patch-session.c > =================================================================== > RCS file: patches/patch-session.c > diff -N patches/patch-session.c > --- patches/patch-session.c 17 Sep 2012 10:25:49 -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,51 +0,0 @@ > ---- session.c.orig Tue Dec 11 16:38:52 2001 > -+++ session.c Sun Sep 2 18:59:56 2012 > -@@ -892,6 +892,7 @@ int *occupation; /* <== [ Matthew McNeill Feb 1997 ] = > - return found; > - } > - > -+#ifndef __OpenBSD__ > - /*===[ Unique Filename Generator > ]===========================================*/ > - > - static char * > -@@ -922,6 +923,7 @@ char *prefix; > - #endif > - } > - > -+#endif /* ! __OpenBSD__ */ > - /*===[ SAVE WINDOW INFORMATION > ]=============================================*/ > - > - #ifndef PATH_MAX > -@@ -951,6 +953,10 @@ SmPointer clientData; > - char discardCommand[PATH_MAX + 4]; > - int numVals, i; > - char yes = 1; > -+#ifdef __OpenBSD__ > -+ int tmphandle; > -+ char tmpprefix[256]; > -+#endif > - static int first_time = 1; > - > - if (first_time) > -@@ -1003,12 +1009,20 @@ SmPointer clientData; > - * no longer the same since the new format supports > - * virtaul workspaces. > - *========================================================*/ > -+#ifdef __OpenBSD__ > -+ strncpy(tmpprefix, path, 256); > -+ strncat(tmpprefix, "/.ctwmXXXXXX", (sizeof(path) - 12)); > -+ if ((tmphandle = mkstemp(tmpprefix)) == -1) > -+ goto bad; > -+ if ((configFile = fdopen(tmphandle, "wb")) == NULL) > -+ goto bad; > -+#else > - if ((filename = unique_filename (path, ".ctwm")) == NULL) > - goto bad; > - > - if (!(configFile = fopen (filename, "wb"))) /* wb = write bytes ? */ > - goto bad; > -- > -+#endif /* __OpenBSD__ */ > - if (!write_ushort (configFile, SAVEFILE_VERSION)) > - goto bad; > - > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/x11/ctwm/pkg/PLIST,v > retrieving revision 1.5 > diff -u -p -u -r1.5 PLIST > --- pkg/PLIST 11 Oct 2013 20:39:49 -0000 1.5 > +++ pkg/PLIST 26 Oct 2017 18:49:24 -0000 > @@ -1,5 +1,91 @@ > -@comment $OpenBSD: PLIST,v 1.5 2013/10/11 20:39:49 naddy Exp $ > +@comment $OpenBSD$ > @bin bin/ctwm > -lib/X11/twm/ > -lib/X11/twm/system.ctwmrc > -@man man/man1/ctwm.1 > +@man man/man1/ctwm.1.gz Extracts the manpage.