Ravenports generated: 05 Jan 2020 23:53
[ravenports.git] / bucket_DE / cwm
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               cwm
4 VERSION=                6.6
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:v6.6
13 DISTFILE[1]=            generated:main
14 DF_INDEX=               1
15 SPKGS[standard]=        single
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 USES=                   pkgconfig:build fonts solaris-funcs
21 XORG_COMPONENTS=        x11 xft xinerama xrandr
22
23 LICENSE=                BSD2CLAUSE:single
24 LICENSE_FILE=           BSD2CLAUSE:{{WRKSRC}}/BSD2CLAUSE
25 LICENSE_SCHEME=         solo
26
27 SOL_FUNCTIONS=          err.h:err.h
28                         asprintf:xmalloc.c
29                         asprintf:menu.c
30                         asprintf:util.c
31                         strsep:util.c
32                         strsep:kbfunc.c
33                         getline:kbfunc.c
34
35 CFLAGS=                 -I.
36
37 do-install:
38         ${INSTALL_PROGRAM} ${WRKSRC}/cwm ${STAGEDIR}${PREFIX}/bin
39         ${INSTALL_MAN} ${WRKSRC}/cwm.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
40         ${INSTALL_MAN} ${WRKSRC}/cwmrc.5 ${STAGEDIR}${MAN5PREFIX}/man/man5
41
42 [FILE:299:descriptions/desc.single]
43 cwm is a window manager for X11 initially inspired by evilwm. cwm has
44 several novel features, including the ability to search for windows. it
45 features a very simple and attractive aesthetic.
46
47 This port is based on OpenBSD's continued work on cwm, as development on
48 the project seems to have halted.
49
50
51 [FILE:108:distinfo]
52 223d086dbebfb2f35f05af0c72c3d1b04fdd341123121c65105524ebd605655c        53062 leahneukirchen-cwm-6.6.tar.gz
53
54
55 [FILE:58:manifests/plist.single]
56 bin/cwm
57 share/man/man1/cwm.1.gz
58 share/man/man5/cwmrc.5.gz
59
60
61 [FILE:346:patches/patch-calmwm.c]
62 --- calmwm.c.orig       2020-01-04 20:45:17 UTC
63 +++ calmwm.c
64 @@ -225,9 +225,13 @@ sighdlr(int sig)
65  void
66  usage(void)
67  {
68 +#ifdef __sun__
69 +       (void)fprintf(stderr, "usage: cwm [-nv] [-c file] [-d display]\n");
70 +#else
71         extern char     *__progname;
72  
73         (void)fprintf(stderr, "usage: %s [-nv] [-c file] [-d display]\n",
74             __progname);
75 +#endif
76         exit(1);
77  }
78
79
80 [FILE:1029:patches/patch-kbfunc.c]
81 --- kbfunc.c.orig       2020-01-04 20:45:17 UTC
82 +++ kbfunc.c
83 @@ -29,7 +29,11 @@
84  #include <err.h>
85  #include <errno.h>
86  #include <limits.h>
87 +#ifdef __sun__
88 +#define _PATH_DEFPATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/raven/bin:/usr/raven/sbin"
89 +#else
90  #include <paths.h>
91 +#endif
92  #include <signal.h>
93  #include <stdio.h>
94  #include <stdlib.h>
95 @@ -597,6 +601,9 @@ kbfunc_menu_exec(void *ctx, struct cargs
96         struct menu_q            menuq;
97         int                      l, i;
98         int                      mflags = (CWM_MENU_DUMMY | CWM_MENU_FILE);
99 +#ifdef __sun__
100 +       struct stat             s;
101 +#endif
102  
103         TAILQ_INIT(&menuq);
104  
105 @@ -621,7 +628,12 @@ kbfunc_menu_exec(void *ctx, struct cargs
106                         if (l == -1 || l >= sizeof(tpath))
107                                 continue;
108                         /* Skip everything but regular files and symlinks. */
109 +#ifdef __sun__
110 +                       stat(dp->d_name, &s);
111 +                       if (s.st_mode != S_IFDIR && s.st_mode != S_IFLNK) {
112 +#else
113                         if (dp->d_type != DT_REG && dp->d_type != DT_LNK) {
114 +#endif
115                                 /* lstat(2) in case d_type isn't supported. */
116                                 if (lstat(tpath, &sb) == -1)
117                                         continue;
118
119
120 [FILE:1483:patches/patch-parse.y]
121 --- parse.y.orig        2020-01-04 20:45:17 UTC
122 +++ parse.y
123 @@ -22,10 +22,8 @@
124  %{
125  
126  #include <sys/types.h>
127 -#include <sys/queue.h>
128  
129  #include <ctype.h>
130 -#include <err.h>
131  #include <errno.h>
132  #include <limits.h>
133  #include <stdarg.h>
134 @@ -33,6 +31,49 @@
135  #include <stdlib.h>
136  #include <string.h>
137  
138 +#ifdef __sun__
139 +#include <sys/varargs.h>
140 +
141 +static int
142 +vasprintf(char **strp, const char *fmt, va_list args)
143 +{
144 +    va_list args_copy;
145 +    int status, needed;
146 +
147 +    va_copy(args_copy, args);
148 +    needed = vsnprintf(NULL, 0, fmt, args_copy);
149 +    va_end(args_copy);
150 +    if (needed < 0) {
151 +        *strp = NULL;
152 +        return (needed);
153 +    }
154 +    *strp = (char *)malloc(needed + 1);
155 +    if (*strp == NULL)
156 +        return (-1);
157 +    status = vsnprintf(*strp, needed + 1, fmt, args);
158 +    if (status >= 0)
159 +        return (status);
160 +    else {
161 +        free(*strp);
162 +        *strp = NULL;
163 +        return (status);
164 +    }
165 +}
166 +
167 +static int
168 +asprintf(char **strp, const char *fmt, ...)
169 +{
170 +    va_list args;
171 +    int status;
172 +
173 +    va_start(args, fmt);
174 +    status = vasprintf(strp, fmt, args);
175 +    va_end(args);
176 +    return (status);
177 +}
178 +#endif
179 +
180 +#include "queue.h"
181  #include "calmwm.h"
182  
183  #define YYSTYPE_IS_DECLARED
184 @@ -600,7 +641,7 @@ parse_config(const char *filename, struc
185         if (stream == NULL) {
186                 if (errno == ENOENT)
187                         return (0);
188 -               warn("%s", filename);
189 +               fprintf(stderr, "%s: %s\n", filename, strerror(errno));
190                 return (-1);
191         }
192         file = pushfile(filename, stream);
193