Ravenports generated: 10 Feb 2024 22:55
[ravenports.git] / bucket_DE / cwm
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               cwm
4 VERSION=                7.4
5 KEYWORDS=               x11_wm
6 VARIANTS=               standard
7 SDESC[standard]=        Minimalistic window manager for X11
8 HOMEPAGE=               https://github.com/leahneukirchen/cwm
9 CONTACT=                Michael_Neumann[mneumann@ntecs.de]
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            GITHUB/leahneukirchen:cwm:v7.4
13 DISTFILE[1]=            generated:main
14 DF_INDEX=               1
15 SPKGS[standard]=        single
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 B_DEPS[linux]=          libbsd:dev:standard
21 BR_DEPS[linux]=         libbsd:primary:standard
22
23 USES=                   fontconfig:fc fonts gmake pkgconfig:build
24                         solaris-funcs zlib:build
25 XORG_COMPONENTS=        x11 xft xinerama xrandr
26
27 LICENSE=                BSD2CLAUSE:single
28 LICENSE_FILE=           BSD2CLAUSE:{{WRKDIR}}/LICENSE
29 LICENSE_AWK=            BSD2CLAUSE:"^$$"
30 LICENSE_SOURCE=         BSD2CLAUSE:{{WRKSRC}}/util.c
31 LICENSE_SCHEME=         solo
32
33 FPC_EQUIVALENT=         x11-wm/cwm
34 SOL_FUNCTIONS=          err.h:err.h
35                         asprintf:xmalloc.c
36                         asprintf:menu.c
37                         asprintf:util.c
38                         strsep:util.c
39                         strsep:kbfunc.c
40                         getline:kbfunc.c
41
42 SINGLE_JOB=             yes
43
44 VAR_OPSYS[linux]=       CFLAGS=-DLIBBSD_OVERLAY
45                         CFLAGS=-I{{LOCALBASE}}/include/bsd
46                         LDFLAGS=-lbsd
47
48 do-install:
49         ${INSTALL_PROGRAM} ${WRKSRC}/cwm ${STAGEDIR}${PREFIX}/bin
50         ${INSTALL_MAN} ${WRKSRC}/cwm.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
51         ${INSTALL_MAN} ${WRKSRC}/cwmrc.5 ${STAGEDIR}${MAN5PREFIX}/man/man5
52
53 [FILE:299:descriptions/desc.single]
54 cwm is a window manager for X11 initially inspired by evilwm. cwm has
55 several novel features, including the ability to search for windows. it
56 features a very simple and attractive aesthetic.
57
58 This port is based on OpenBSD's continued work on cwm, as development on
59 the project seems to have halted.
60
61
62 [FILE:108:distinfo]
63 b4f275143c8c716d7df1cfbb230f888c72aa861708e144d1749858f1cc6fcac0        53781 leahneukirchen-cwm-7.4.tar.gz
64
65
66 [FILE:58:manifests/plist.single]
67 bin/cwm
68 share/man/man1/cwm.1.gz
69 share/man/man5/cwmrc.5.gz
70
71
72 [FILE:400:patches/patch-Makefile]
73 --- Makefile.orig       2023-07-20 14:39:34 UTC
74 +++ Makefile
75 @@ -11,9 +11,8 @@ SRCS=         calmwm.c screen.c xmalloc.c clien
76  
77  OBJS=          calmwm.o screen.o xmalloc.o client.o menu.o \
78                 search.o util.o xutil.o conf.o xevents.o group.o \
79 -               kbfunc.o strlcpy.o strlcat.o parse.o \
80 -               strtonum.o reallocarray.o
81 -               
82 +               kbfunc.o parse.o
83 +
84  PKG_CONFIG?=   pkg-config
85  
86  CPPFLAGS+=     `${PKG_CONFIG} --cflags x11 xft xrandr`
87
88
89 [FILE:346:patches/patch-calmwm.c]
90 --- calmwm.c.orig       2023-07-20 14:39:34 UTC
91 +++ calmwm.c
92 @@ -231,9 +231,13 @@ sighdlr(int sig)
93  void
94  usage(void)
95  {
96 +#ifdef __sun__
97 +       (void)fprintf(stderr, "usage: cwm [-nv] [-c file] [-d display]\n");
98 +#else
99         extern char     *__progname;
100  
101         (void)fprintf(stderr, "usage: %s [-nv] [-c file] [-d display]\n",
102             __progname);
103 +#endif
104         exit(1);
105  }
106
107
108 [FILE:1029:patches/patch-kbfunc.c]
109 --- kbfunc.c.orig       2023-07-20 14:39:34 UTC
110 +++ kbfunc.c
111 @@ -29,7 +29,11 @@
112  #include <err.h>
113  #include <errno.h>
114  #include <limits.h>
115 +#ifdef __sun__
116 +#define _PATH_DEFPATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/raven/bin:/usr/raven/sbin"
117 +#else
118  #include <paths.h>
119 +#endif
120  #include <signal.h>
121  #include <stdio.h>
122  #include <stdlib.h>
123 @@ -654,6 +658,9 @@ kbfunc_menu_exec(void *ctx, struct cargs
124         struct menu_q            menuq;
125         int                      l, i;
126         int                      mflags = (CWM_MENU_DUMMY | CWM_MENU_FILE);
127 +#ifdef __sun__
128 +       struct stat             s;
129 +#endif
130  
131         TAILQ_INIT(&menuq);
132  
133 @@ -678,7 +685,12 @@ kbfunc_menu_exec(void *ctx, struct cargs
134                         if (l == -1 || l >= sizeof(tpath))
135                                 continue;
136                         /* Skip everything but regular files and symlinks. */
137 +#ifdef __sun__
138 +                       stat(dp->d_name, &s);
139 +                       if (s.st_mode != S_IFDIR && s.st_mode != S_IFLNK) {
140 +#else
141                         if (dp->d_type != DT_REG && dp->d_type != DT_LNK) {
142 +#endif
143                                 /* lstat(2) in case d_type isn't supported. */
144                                 if (lstat(tpath, &sb) == -1)
145                                         continue;
146
147
148 [FILE:1531:sunos/patch-parse.y]
149 This needs to be regenerated -- will not apply
150
151 --- parse.y.orig        2020-01-04 20:45:17 UTC
152 +++ parse.y
153 @@ -22,10 +22,8 @@
154  %{
155  
156  #include <sys/types.h>
157 -#include <sys/queue.h>
158  
159  #include <ctype.h>
160 -#include <err.h>
161  #include <errno.h>
162  #include <limits.h>
163  #include <stdarg.h>
164 @@ -33,6 +31,49 @@
165  #include <stdlib.h>
166  #include <string.h>
167  
168 +#ifdef __sun__
169 +#include <sys/varargs.h>
170 +
171 +static int
172 +vasprintf(char **strp, const char *fmt, va_list args)
173 +{
174 +    va_list args_copy;
175 +    int status, needed;
176 +
177 +    va_copy(args_copy, args);
178 +    needed = vsnprintf(NULL, 0, fmt, args_copy);
179 +    va_end(args_copy);
180 +    if (needed < 0) {
181 +        *strp = NULL;
182 +        return (needed);
183 +    }
184 +    *strp = (char *)malloc(needed + 1);
185 +    if (*strp == NULL)
186 +        return (-1);
187 +    status = vsnprintf(*strp, needed + 1, fmt, args);
188 +    if (status >= 0)
189 +        return (status);
190 +    else {
191 +        free(*strp);
192 +        *strp = NULL;
193 +        return (status);
194 +    }
195 +}
196 +
197 +static int
198 +asprintf(char **strp, const char *fmt, ...)
199 +{
200 +    va_list args;
201 +    int status;
202 +
203 +    va_start(args, fmt);
204 +    status = vasprintf(strp, fmt, args);
205 +    va_end(args);
206 +    return (status);
207 +}
208 +#endif
209 +
210 +#include "queue.h"
211  #include "calmwm.h"
212  
213  #define YYSTYPE_IS_DECLARED
214 @@ -600,7 +641,7 @@ parse_config(const char *filename, struc
215         if (stream == NULL) {
216                 if (errno == ENOENT)
217                         return (0);
218 -               warn("%s", filename);
219 +               fprintf(stderr, "%s: %s\n", filename, strerror(errno));
220                 return (-1);
221         }
222         file = pushfile(filename, stream);
223