# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= cwm VERSION= 7.4 REVISION= 1 KEYWORDS= x11_wm VARIANTS= std SDESC[std]= Minimalistic window manager for X11 HOMEPAGE= https://github.com/leahneukirchen/cwm CONTACT= Michael_Neumann[mneumann@ntecs.de] DOWNLOAD_GROUPS= main SITES[main]= GITHUB/leahneukirchen:cwm:v7.4 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[std]= set primary man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none B_DEPS[linux]= libbsd:dev:std BR_DEPS[linux]= libbsd:primary:std USES= fontconfig:fc fonts gmake pkgconfig:build solaris-funcs zlib:build XORG_COMPONENTS= x11 xft xinerama xrandr LICENSE= BSD2CLAUSE:primary LICENSE_FILE= BSD2CLAUSE:{{WRKDIR}}/LICENSE LICENSE_AWK= BSD2CLAUSE:"^$$" LICENSE_SOURCE= BSD2CLAUSE:{{WRKSRC}}/util.c LICENSE_SCHEME= solo FPC_EQUIVALENT= x11-wm/cwm SOL_FUNCTIONS= err.h:err.h asprintf:xmalloc.c asprintf:menu.c asprintf:util.c strsep:util.c strsep:kbfunc.c getline:kbfunc.c SINGLE_JOB= yes VAR_OPSYS[linux]= CFLAGS=-DLIBBSD_OVERLAY CFLAGS=-I{{LOCALBASE}}/include/bsd CFLAGS=-D_GNU_SOURCE LDFLAGS=-lbsd do-install: ${INSTALL_PROGRAM} ${WRKSRC}/cwm ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/cwm.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/cwmrc.5 ${STAGEDIR}${MAN5PREFIX}/man/man5 [FILE:299:descriptions/desc.primary] cwm is a window manager for X11 initially inspired by evilwm. cwm has several novel features, including the ability to search for windows. it features a very simple and attractive aesthetic. This port is based on OpenBSD's continued work on cwm, as development on the project seems to have halted. [FILE:108:distinfo] b4f275143c8c716d7df1cfbb230f888c72aa861708e144d1749858f1cc6fcac0 53781 leahneukirchen-cwm-7.4.tar.gz [FILE:8:manifests/plist.primary] bin/cwm [FILE:44:manifests/plist.man] share/man/man1/cwm.1 share/man/man5/cwmrc.5 [FILE:400:patches/patch-Makefile] --- Makefile.orig 2023-07-20 14:39:34 UTC +++ Makefile @@ -11,9 +11,8 @@ SRCS= calmwm.c screen.c xmalloc.c clien OBJS= calmwm.o screen.o xmalloc.o client.o menu.o \ search.o util.o xutil.o conf.o xevents.o group.o \ - kbfunc.o strlcpy.o strlcat.o parse.o \ - strtonum.o reallocarray.o - + kbfunc.o parse.o + PKG_CONFIG?= pkg-config CPPFLAGS+= `${PKG_CONFIG} --cflags x11 xft xrandr` [FILE:346:patches/patch-calmwm.c] --- calmwm.c.orig 2023-07-20 14:39:34 UTC +++ calmwm.c @@ -231,9 +231,13 @@ sighdlr(int sig) void usage(void) { +#ifdef __sun__ + (void)fprintf(stderr, "usage: cwm [-nv] [-c file] [-d display]\n"); +#else extern char *__progname; (void)fprintf(stderr, "usage: %s [-nv] [-c file] [-d display]\n", __progname); +#endif exit(1); } [FILE:1029:patches/patch-kbfunc.c] --- kbfunc.c.orig 2023-07-20 14:39:34 UTC +++ kbfunc.c @@ -29,7 +29,11 @@ #include #include #include +#ifdef __sun__ +#define _PATH_DEFPATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/raven/bin:/usr/raven/sbin" +#else #include +#endif #include #include #include @@ -654,6 +658,9 @@ kbfunc_menu_exec(void *ctx, struct cargs struct menu_q menuq; int l, i; int mflags = (CWM_MENU_DUMMY | CWM_MENU_FILE); +#ifdef __sun__ + struct stat s; +#endif TAILQ_INIT(&menuq); @@ -678,7 +685,12 @@ kbfunc_menu_exec(void *ctx, struct cargs if (l == -1 || l >= sizeof(tpath)) continue; /* Skip everything but regular files and symlinks. */ +#ifdef __sun__ + stat(dp->d_name, &s); + if (s.st_mode != S_IFDIR && s.st_mode != S_IFLNK) { +#else if (dp->d_type != DT_REG && dp->d_type != DT_LNK) { +#endif /* lstat(2) in case d_type isn't supported. */ if (lstat(tpath, &sb) == -1) continue; [FILE:1531:sunos/patch-parse.y] This needs to be regenerated -- will not apply --- parse.y.orig 2020-01-04 20:45:17 UTC +++ parse.y @@ -22,10 +22,8 @@ %{ #include -#include #include -#include #include #include #include @@ -33,6 +31,49 @@ #include #include +#ifdef __sun__ +#include + +static int +vasprintf(char **strp, const char *fmt, va_list args) +{ + va_list args_copy; + int status, needed; + + va_copy(args_copy, args); + needed = vsnprintf(NULL, 0, fmt, args_copy); + va_end(args_copy); + if (needed < 0) { + *strp = NULL; + return (needed); + } + *strp = (char *)malloc(needed + 1); + if (*strp == NULL) + return (-1); + status = vsnprintf(*strp, needed + 1, fmt, args); + if (status >= 0) + return (status); + else { + free(*strp); + *strp = NULL; + return (status); + } +} + +static int +asprintf(char **strp, const char *fmt, ...) +{ + va_list args; + int status; + + va_start(args, fmt); + status = vasprintf(strp, fmt, args); + va_end(args); + return (status); +} +#endif + +#include "queue.h" #include "calmwm.h" #define YYSTYPE_IS_DECLARED @@ -600,7 +641,7 @@ parse_config(const char *filename, struc if (stream == NULL) { if (errno == ENOENT) return (0); - warn("%s", filename); + fprintf(stderr, "%s: %s\n", filename, strerror(errno)); return (-1); } file = pushfile(filename, stream);