git.iko.soy/typeable/nixpkgs
on master help sign in
icewm: 1.4.2 -> 1.6.0 (#66949)
commitadf55b78b908af48927277936aad25f1c4901fcb authorvolth <volth@volth.com> dateTue 3 Sep 2019, 21:51 (7 years ago) parent8f57bab
3 files changed+24−279
pkgs/applications/window-managers/icewm/default.nix+24−20 pkgs/applications/window-managers/icewm/fix-strlcat_strlcpy.patch−236 pkgs/applications/window-managers/icewm/musl.patch−23
pkgs/applications/window-managers/icewm/default.nix+24−20
@@ -1,36 +1,40 @@
1−{ stdenv, fetchurl, cmake, gettext
1+{ stdenv, fetchFromGitHub, cmake, gettext, perl, asciidoc
22, libjpeg, libtiff, libungif, libpng, imlib, expat
33, freetype, fontconfig, pkgconfig, gdk-pixbuf
44, mkfontdir, libX11, libXft, libXext, libXinerama
55, libXrandr, libICE, libSM, libXpm, libXdmcp, libxcb
6−, libpthreadstubs, pcre }:
6+, libpthreadstubs, pcre, libXdamage, libXcomposite, libXfixes
7+, libsndfile, fribidi }:
78
8−with stdenv.lib;
99stdenv.mkDerivation rec {
1010 pname = "icewm";
11− version = "1.4.2";
11+ version = "1.6.0";
1212
13− buildInputs =
14− [ cmake gettext libjpeg libtiff libungif libpng imlib expat
15− freetype fontconfig pkgconfig gdk-pixbuf mkfontdir libX11
16− libXft libXext libXinerama libXrandr libICE libSM libXpm
17− libXdmcp libxcb libpthreadstubs pcre ];
18−
19− src = fetchurl {
20− url = "https://github.com/bbidulock/icewm/archive/${version}.tar.gz";
21− sha256 = "05chzjjnb4n4j05ld2gmhhr07c887qb4j9inwg9izhvml51af1bw";
13+ src = fetchFromGitHub {
14+ owner = "bbidulock";
15+ repo = "icewm";
16+ rev = version;
17+ sha256 = "1l8hjmb19d7ds7z21cx207h86wkjcmmmamcnalgkwh4alvbawc2p";
2218 };
2319
24− preConfigure = ''
25− export cmakeFlags="-DPREFIX=$out -DCFGDIR=/etc/icewm"
26− '';
20+ nativeBuildInputs = [ cmake pkgconfig perl asciidoc ];
2721
28− patches = [ ./fix-strlcat_strlcpy.patch ] ++
29− stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl.patch;
22+ buildInputs = [
23+ gettext libjpeg libtiff libungif libpng imlib expat
24+ freetype fontconfig gdk-pixbuf mkfontdir libX11
25+ libXft libXext libXinerama libXrandr libICE libSM libXpm
26+ libXdmcp libxcb libpthreadstubs pcre libsndfile fribidi
27+ libXdamage libXcomposite libXfixes
28+ ];
29+
30+ cmakeFlags = [ "-DPREFIX=$out" "-DCFGDIR=/etc/icewm" ];
3031
31− patchFlags = [ "-p0" ];
32+ # install legacy themes
33+ postInstall = ''
34+ cp -r ../lib/themes/{gtk2,Natural,nice,nice2,warp3,warp4,yellowmotif} $out/share/icewm/themes/
35+ '';
3236
33− meta = {
37+ meta = with stdenv.lib; {
3438 description = "A simple, lightweight X window manager";
3539 longDescription = ''
3640 IceWM is a window manager for the X Window System. The goal of
pkgs/applications/window-managers/icewm/fix-strlcat_strlcpy.patchdeleted−236
@@ -1,236 +0,0 @@
1−--- src/apppstatus.cc 2017-07-30 10:59:06.000000000 +0200
2−+++ src/apppstatus.cc 2017-08-09 09:12:54.332052762 +0200
3−@@ -366,7 +366,7 @@
4− sscanf(p, "%s %s %s %s %s", val[0], val[1], val[2], val[3], val[4]);
5− for (i = 0; i < 4; i++) {
6− if (strncmp(val[i+1], "?", 1) != 0)
7−- strlcpy(phoneNumber, val[i+1], sizeof phoneNumber);
8−+ my_strlcpy(phoneNumber, val[i+1], sizeof phoneNumber);
9− }
10− }
11−
12−--- src/base.h 2017-07-30 10:59:06.000000000 +0200
13−+++ src/base.h 2017-08-09 09:11:13.082025484 +0200
14−@@ -44,9 +44,9 @@
15− /*** String Functions *********************************************************/
16−
17− /* Prefer this as a safer alternative over strcpy. Return strlen(from). */
18−-size_t strlcpy(char *dest, const char *from, size_t dest_size);
19−+size_t my_strlcpy(char *dest, const char *from, size_t dest_size);
20− /* Prefer this over strcat. Return strlen(dest) + strlen(from). */
21−-size_t strlcat(char *dest, const char *from, size_t dest_size);
22−+size_t my_strlcat(char *dest, const char *from, size_t dest_size);
23−
24− char *newstr(char const *str);
25− char *newstr(char const *str, int len);
26−--- src/gnome2.cc 2017-07-30 10:59:06.000000000 +0200
27−+++ src/gnome2.cc 2017-08-09 09:11:21.819027846 +0200
28−@@ -158,8 +158,8 @@
29− const int plen = strlen(fPath);
30−
31− char tmp[256];
32−- strlcpy(tmp, fPath, sizeof tmp);
33−- strlcat(tmp, "/.directory", sizeof tmp);
34−+ my_strlcpy(tmp, fPath, sizeof tmp);
35−+ my_strlcat(tmp, "/.directory", sizeof tmp);
36−
37− if (isDir && !stat(tmp, &sb)) { // looks like kde/gnome1 style
38−
39−@@ -279,8 +279,8 @@
40−
41− while ((file = readdir(dir)) != NULL) {
42− char fullpath[256];
43−- strlcpy(fullpath, dirname, sizeof fullpath);
44−- strlcat(fullpath, file->d_name, sizeof fullpath);
45−+ my_strlcpy(fullpath, dirname, sizeof fullpath);
46−+ my_strlcat(fullpath, file->d_name, sizeof fullpath);
47− GnomeDesktopItem *ditem =
48− gnome_desktop_item_new_from_file(fullpath,
49− (GnomeDesktopItemLoadFlags)0,
50−--- src/icehelp.cc 2017-07-30 10:59:06.000000000 +0200
51−+++ src/icehelp.cc 2017-08-09 09:11:31.490030459 +0200
52−@@ -1790,8 +1790,8 @@
53− const size_t size = 9 + strlen(cfmt) + strlen(cstr) + strlen(crea);
54− char *cbuf = (char *)malloc(size);
55− snprintf(cbuf, size, cfmt, cstr);
56−- strlcat(cbuf, ":\n ", size);
57−- strlcat(cbuf, crea, size);
58−+ my_strlcat(cbuf, ":\n ", size);
59−+ my_strlcat(cbuf, crea, size);
60−
61− node *root = new node(node::div);
62− flist<node> nodes(root);
63−--- src/icesm.cc 2017-07-30 10:59:06.000000000 +0200
64−+++ src/icesm.cc 2017-08-09 09:13:12.946057758 +0200
65−@@ -28,10 +28,10 @@
66− wordexp_t w;
67− if (wordexp(trim(buf), &w, 0) != 0 || w.we_wordc == 0)
68− return false;
69−- size_t len = strlcpy(buf, trim(w.we_wordv[0]), bufsiz);
70−+ size_t len = my_strlcpy(buf, trim(w.we_wordv[0]), bufsiz);
71− for (size_t k = 1; k < w.we_wordc && len < bufsiz; ++k) {
72−- strlcat(buf, " ", bufsiz);
73−- len = strlcat(buf, trim(w.we_wordv[k]), bufsiz);
74−+ my_strlcat(buf, " ", bufsiz);
75−+ len = my_strlcat(buf, trim(w.we_wordv[k]), bufsiz);
76− }
77− wordfree(&w);
78− if (len >= bufsiz)
79−@@ -39,7 +39,7 @@
80− #else
81− char *str = trim(buf);
82− if (str > buf)
83−- strlcpy(buf, str, bufsiz);
84−+ my_strlcpy(buf, str, bufsiz);
85− #endif
86− if (buf[0] == '#' || buf[0] == '=')
87− buf[0] = 0;
88−--- src/icesound.cc 2017-07-30 10:59:06.000000000 +0200
89−+++ src/icesound.cc 2017-08-09 09:11:26.686029161 +0200
90−@@ -145,8 +145,8 @@
91− char * findSample(int sid) {
92− char basefname[1024];
93−
94−- strlcpy(basefname, gui_events[sid].name, sizeof basefname);
95−- strlcat(basefname, ".wav", sizeof basefname);
96−+ my_strlcpy(basefname, gui_events[sid].name, sizeof basefname);
97−+ my_strlcat(basefname, ".wav", sizeof basefname);
98−
99− return findSample(basefname);
100− }
101−--- src/misc.cc 2017-07-30 10:59:06.000000000 +0200
102−+++ src/misc.cc 2017-08-09 09:13:39.372064834 +0200
103−@@ -448,7 +448,7 @@
104− #endif
105−
106− /* Prefer this as a safer alternative over strcpy. Return strlen(from). */
107−-size_t strlcpy(char *dest, const char *from, size_t dest_size)
108−+size_t my_strlcpy(char *dest, const char *from, size_t dest_size)
109− {
110− const char *in = from;
111− if (dest_size > 0) {
112−@@ -463,12 +463,12 @@
113− }
114−
115− /* Prefer this over strcat. Return strlen(dest) + strlen(from). */
116−-size_t strlcat(char *dest, const char *from, size_t dest_size)
117−+size_t my_strlcat(char *dest, const char *from, size_t dest_size)
118− {
119− char *to = dest;
120− char *const stop = to + dest_size - 1;
121− while (to < stop && *to) ++to;
122−- return to - dest + strlcpy(to, from, dest_size - (to - dest));
123−+ return to - dest + my_strlcpy(to, from, dest_size - (to - dest));
124− }
125−
126− char *newstr(char const *str) {
127−--- src/strtest.cc 2017-07-30 10:59:06.000000000 +0200
128−+++ src/strtest.cc 2017-08-09 09:13:24.395060823 +0200
129−@@ -286,63 +286,63 @@
130− strtest tester("strlc");
131− char d[10] = "@";
132− size_t n;
133−- n = strlcpy(d, "", 0);
134−+ n = my_strlcpy(d, "", 0);
135− sequal(d, "@");
136− assert(d, n == 0);
137−
138−- n = strlcpy(d, "a", 0);
139−+ n = my_strlcpy(d, "a", 0);
140− sequal(d, "@");
141− assert(d, n == 1);
142−
143−- n = strlcpy(d, "", 1);
144−+ n = my_strlcpy(d, "", 1);
145− sequal(d, "");
146− assert(d, n == 0);
147−
148−- n = strlcpy(d, "a", 1);
149−+ n = my_strlcpy(d, "a", 1);
150− sequal(d, "");
151− assert(d, n == 1);
152−
153−- n = strlcpy(d, "a", 2);
154−+ n = my_strlcpy(d, "a", 2);
155− sequal(d, "a");
156− assert(d, n == 1);
157−
158−- n = strlcpy(d, "ab", 2);
159−+ n = my_strlcpy(d, "ab", 2);
160− sequal(d, "a");
161− assert(d, n == 2);
162−
163−- n = strlcpy(d, "ab", 3);
164−+ n = my_strlcpy(d, "ab", 3);
165− sequal(d, "ab");
166− assert(d, n == 2);
167−
168−- n = strlcpy(d, "abc", sizeof d);
169−+ n = my_strlcpy(d, "abc", sizeof d);
170− sequal(d, "abc");
171− assert(d, n == 3);
172−
173−- n = strlcat(d, "def", 4);
174−+ n = my_strlcat(d, "def", 4);
175− sequal(d, "abc");
176− assert(d, n == 6);
177−
178−- n = strlcat(d, "def", sizeof d);
179−+ n = my_strlcat(d, "def", sizeof d);
180− sequal(d, "abcdef");
181− assert(d, n == 6);
182−
183−- n = strlcat(d, "ghijkl", sizeof d);
184−+ n = my_strlcat(d, "ghijkl", sizeof d);
185− sequal(d, "abcdefghi");
186− assert(d, n == 12);
187−
188−- n = strlcpy(d, "123", sizeof d);
189−+ n = my_strlcpy(d, "123", sizeof d);
190− sequal(d, "123");
191− assert(d, n == 3);
192−
193−- n = strlcpy(d, d + 1, sizeof d);
194−+ n = my_strlcpy(d, d + 1, sizeof d);
195− sequal(d, "23");
196− assert(d, n == 2);
197−
198−- n = strlcpy(d, d + 1, sizeof d);
199−+ n = my_strlcpy(d, d + 1, sizeof d);
200− sequal(d, "3");
201− assert(d, n == 1);
202−
203−- n = strlcpy(d, d + 1, sizeof d);
204−+ n = my_strlcpy(d, d + 1, sizeof d);
205− sequal(d, "");
206− assert(d, n == 0);
207− }
208−@@ -418,7 +418,7 @@
209− while (a.next()) {
210− const char *e = a.entry();
211− assert(e, strcoll(buf, e) < 0);
212−- strlcpy(buf, e, sizeof buf);
213−+ my_strlcpy(buf, e, sizeof buf);
214− }
215− assert(buf, strcoll(buf, "~~~~~~~~~") < 0);
216− }
217−@@ -437,7 +437,7 @@
218− cstring c(s.entry());
219− const char *e = c.c_str();
220− assert(e, strcoll(buf, e) < 0);
221−- strlcpy(buf, e, sizeof buf);
222−+ my_strlcpy(buf, e, sizeof buf);
223− }
224− assert(buf, strcoll(buf, "~~~~~~~~~") < 0);
225− }
226−--- src/udir.cc 2017-07-30 10:59:06.000000000 +0200
227−+++ src/udir.cc 2017-08-09 09:13:28.346061883 +0200
228−@@ -66,7 +66,7 @@
229− if (impl) {
230− DirPtr dirp(impl);
231− if (dirp.next()) {
232−- strlcpy(fEntry, dirp.name(), sizeof fEntry);
233−+ my_strlcpy(fEntry, dirp.name(), sizeof fEntry);
234− return true;
235− }
236− }
pkgs/applications/window-managers/icewm/musl.patchdeleted−23
@@ -1,23 +0,0 @@
1−--- src/ylocale.cc 2017-07-30 10:59:06.000000000 +0200
2−+++ src/ylocale.cc 2017-08-09 08:15:50.938841549 +0200
3−@@ -55,6 +55,8 @@
4− int const codesetItems[] = {
5− #ifdef CONFIG_NL_CODESETS
6− CONFIG_NL_CODESETS
7−+#elif !defined(__GLIBC__)
8−+ CODESET, 0
9− #else
10− CODESET, _NL_CTYPE_CODESET_NAME, 0
11− #endif
12−--- src/globit.c 2017-07-30 10:59:06.000000000 +0200
13−+++ src/globit.c 2017-08-09 08:17:18.691824584 +0200
14−@@ -143,7 +143,9 @@
15− } else if (*pattern == '~') {
16− /* yes, tilde */
17− is_absolute = 2;
18−+#if defined(__GLIBC__)
19− glob_flags |= GLOB_TILDE;
20−+#endif
21− /* any slash in the pattern? */
22− while (*cp && *cp != '/')
23− ++cp;