diff options
author | volth <volth@volth.com> | 2019-09-03 21:51:52 +0000 |
---|---|---|
committer | Aristid Breitkreuz <aristidb@gmail.com> | 2019-09-03 23:51:52 +0200 |
commit | adf55b78b908af48927277936aad25f1c4901fcb (patch) | |
tree | a0a4f368fe4c962fa1d574b151e3320fe03283f4 /pkgs/applications/window-managers/icewm | |
parent | 8f57babd526c31953de62d2988d3b8cd1c6fc781 (diff) |
icewm: 1.4.2 -> 1.6.0 (#66949)
Diffstat (limited to 'pkgs/applications/window-managers/icewm')
3 files changed, 24 insertions, 279 deletions
diff --git a/pkgs/applications/window-managers/icewm/default.nix b/pkgs/applications/window-managers/icewm/default.nix index 71a4ec3549a7..f388c2d99db2 100644 --- a/pkgs/applications/window-managers/icewm/default.nix +++ b/pkgs/applications/window-managers/icewm/default.nix @@ -1,36 +1,40 @@ -{ stdenv, fetchurl, cmake, gettext +{ stdenv, fetchFromGitHub, cmake, gettext, perl, asciidoc , libjpeg, libtiff, libungif, libpng, imlib, expat , freetype, fontconfig, pkgconfig, gdk-pixbuf , mkfontdir, libX11, libXft, libXext, libXinerama , libXrandr, libICE, libSM, libXpm, libXdmcp, libxcb -, libpthreadstubs, pcre }: +, libpthreadstubs, pcre, libXdamage, libXcomposite, libXfixes +, libsndfile, fribidi }: -with stdenv.lib; stdenv.mkDerivation rec { pname = "icewm"; - version = "1.4.2"; + version = "1.6.0"; - buildInputs = - [ cmake gettext libjpeg libtiff libungif libpng imlib expat - freetype fontconfig pkgconfig gdk-pixbuf mkfontdir libX11 - libXft libXext libXinerama libXrandr libICE libSM libXpm - libXdmcp libxcb libpthreadstubs pcre ]; - - src = fetchurl { - url = "https://github.com/bbidulock/icewm/archive/${version}.tar.gz"; - sha256 = "05chzjjnb4n4j05ld2gmhhr07c887qb4j9inwg9izhvml51af1bw"; + src = fetchFromGitHub { + owner = "bbidulock"; + repo = "icewm"; + rev = version; + sha256 = "1l8hjmb19d7ds7z21cx207h86wkjcmmmamcnalgkwh4alvbawc2p"; }; - preConfigure = '' - export cmakeFlags="-DPREFIX=$out -DCFGDIR=/etc/icewm" - ''; + nativeBuildInputs = [ cmake pkgconfig perl asciidoc ]; - patches = [ ./fix-strlcat_strlcpy.patch ] ++ - stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl.patch; + buildInputs = [ + gettext libjpeg libtiff libungif libpng imlib expat + freetype fontconfig gdk-pixbuf mkfontdir libX11 + libXft libXext libXinerama libXrandr libICE libSM libXpm + libXdmcp libxcb libpthreadstubs pcre libsndfile fribidi + libXdamage libXcomposite libXfixes + ]; + + cmakeFlags = [ "-DPREFIX=$out" "-DCFGDIR=/etc/icewm" ]; - patchFlags = [ "-p0" ]; + # install legacy themes + postInstall = '' + cp -r ../lib/themes/{gtk2,Natural,nice,nice2,warp3,warp4,yellowmotif} $out/share/icewm/themes/ + ''; - meta = { + meta = with stdenv.lib; { description = "A simple, lightweight X window manager"; longDescription = '' IceWM is a window manager for the X Window System. The goal of diff --git a/pkgs/applications/window-managers/icewm/fix-strlcat_strlcpy.patch b/pkgs/applications/window-managers/icewm/fix-strlcat_strlcpy.patch deleted file mode 100644 index 9721e125b051..000000000000 --- a/pkgs/applications/window-managers/icewm/fix-strlcat_strlcpy.patch +++ /dev/null @@ -1,236 +0,0 @@ ---- src/apppstatus.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/apppstatus.cc 2017-08-09 09:12:54.332052762 +0200 -@@ -366,7 +366,7 @@ - sscanf(p, "%s %s %s %s %s", val[0], val[1], val[2], val[3], val[4]); - for (i = 0; i < 4; i++) { - if (strncmp(val[i+1], "?", 1) != 0) -- strlcpy(phoneNumber, val[i+1], sizeof phoneNumber); -+ my_strlcpy(phoneNumber, val[i+1], sizeof phoneNumber); - } - } - ---- src/base.h 2017-07-30 10:59:06.000000000 +0200 -+++ src/base.h 2017-08-09 09:11:13.082025484 +0200 -@@ -44,9 +44,9 @@ - /*** String Functions *********************************************************/ - - /* Prefer this as a safer alternative over strcpy. Return strlen(from). */ --size_t strlcpy(char *dest, const char *from, size_t dest_size); -+size_t my_strlcpy(char *dest, const char *from, size_t dest_size); - /* Prefer this over strcat. Return strlen(dest) + strlen(from). */ --size_t strlcat(char *dest, const char *from, size_t dest_size); -+size_t my_strlcat(char *dest, const char *from, size_t dest_size); - - char *newstr(char const *str); - char *newstr(char const *str, int len); ---- src/gnome2.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/gnome2.cc 2017-08-09 09:11:21.819027846 +0200 -@@ -158,8 +158,8 @@ - const int plen = strlen(fPath); - - char tmp[256]; -- strlcpy(tmp, fPath, sizeof tmp); -- strlcat(tmp, "/.directory", sizeof tmp); -+ my_strlcpy(tmp, fPath, sizeof tmp); -+ my_strlcat(tmp, "/.directory", sizeof tmp); - - if (isDir && !stat(tmp, &sb)) { // looks like kde/gnome1 style - -@@ -279,8 +279,8 @@ - - while ((file = readdir(dir)) != NULL) { - char fullpath[256]; -- strlcpy(fullpath, dirname, sizeof fullpath); -- strlcat(fullpath, file->d_name, sizeof fullpath); -+ my_strlcpy(fullpath, dirname, sizeof fullpath); -+ my_strlcat(fullpath, file->d_name, sizeof fullpath); - GnomeDesktopItem *ditem = - gnome_desktop_item_new_from_file(fullpath, - (GnomeDesktopItemLoadFlags)0, ---- src/icehelp.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/icehelp.cc 2017-08-09 09:11:31.490030459 +0200 -@@ -1790,8 +1790,8 @@ - const size_t size = 9 + strlen(cfmt) + strlen(cstr) + strlen(crea); - char *cbuf = (char *)malloc(size); - snprintf(cbuf, size, cfmt, cstr); -- strlcat(cbuf, ":\n ", size); -- strlcat(cbuf, crea, size); -+ my_strlcat(cbuf, ":\n ", size); -+ my_strlcat(cbuf, crea, size); - - node *root = new node(node::div); - flist<node> nodes(root); ---- src/icesm.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/icesm.cc 2017-08-09 09:13:12.946057758 +0200 -@@ -28,10 +28,10 @@ - wordexp_t w; - if (wordexp(trim(buf), &w, 0) != 0 || w.we_wordc == 0) - return false; -- size_t len = strlcpy(buf, trim(w.we_wordv[0]), bufsiz); -+ size_t len = my_strlcpy(buf, trim(w.we_wordv[0]), bufsiz); - for (size_t k = 1; k < w.we_wordc && len < bufsiz; ++k) { -- strlcat(buf, " ", bufsiz); -- len = strlcat(buf, trim(w.we_wordv[k]), bufsiz); -+ my_strlcat(buf, " ", bufsiz); -+ len = my_strlcat(buf, trim(w.we_wordv[k]), bufsiz); - } - wordfree(&w); - if (len >= bufsiz) -@@ -39,7 +39,7 @@ - #else - char *str = trim(buf); - if (str > buf) -- strlcpy(buf, str, bufsiz); -+ my_strlcpy(buf, str, bufsiz); - #endif - if (buf[0] == '#' || buf[0] == '=') - buf[0] = 0; ---- src/icesound.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/icesound.cc 2017-08-09 09:11:26.686029161 +0200 -@@ -145,8 +145,8 @@ - char * findSample(int sid) { - char basefname[1024]; - -- strlcpy(basefname, gui_events[sid].name, sizeof basefname); -- strlcat(basefname, ".wav", sizeof basefname); -+ my_strlcpy(basefname, gui_events[sid].name, sizeof basefname); -+ my_strlcat(basefname, ".wav", sizeof basefname); - - return findSample(basefname); - } ---- src/misc.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/misc.cc 2017-08-09 09:13:39.372064834 +0200 -@@ -448,7 +448,7 @@ - #endif - - /* Prefer this as a safer alternative over strcpy. Return strlen(from). */ --size_t strlcpy(char *dest, const char *from, size_t dest_size) -+size_t my_strlcpy(char *dest, const char *from, size_t dest_size) - { - const char *in = from; - if (dest_size > 0) { -@@ -463,12 +463,12 @@ - } - - /* Prefer this over strcat. Return strlen(dest) + strlen(from). */ --size_t strlcat(char *dest, const char *from, size_t dest_size) -+size_t my_strlcat(char *dest, const char *from, size_t dest_size) - { - char *to = dest; - char *const stop = to + dest_size - 1; - while (to < stop && *to) ++to; -- return to - dest + strlcpy(to, from, dest_size - (to - dest)); -+ return to - dest + my_strlcpy(to, from, dest_size - (to - dest)); - } - - char *newstr(char const *str) { ---- src/strtest.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/strtest.cc 2017-08-09 09:13:24.395060823 +0200 -@@ -286,63 +286,63 @@ - strtest tester("strlc"); - char d[10] = "@"; - size_t n; -- n = strlcpy(d, "", 0); -+ n = my_strlcpy(d, "", 0); - sequal(d, "@"); - assert(d, n == 0); - -- n = strlcpy(d, "a", 0); -+ n = my_strlcpy(d, "a", 0); - sequal(d, "@"); - assert(d, n == 1); - -- n = strlcpy(d, "", 1); -+ n = my_strlcpy(d, "", 1); - sequal(d, ""); - assert(d, n == 0); - -- n = strlcpy(d, "a", 1); -+ n = my_strlcpy(d, "a", 1); - sequal(d, ""); - assert(d, n == 1); - -- n = strlcpy(d, "a", 2); -+ n = my_strlcpy(d, "a", 2); - sequal(d, "a"); - assert(d, n == 1); - -- n = strlcpy(d, "ab", 2); -+ n = my_strlcpy(d, "ab", 2); - sequal(d, "a"); - assert(d, n == 2); - -- n = strlcpy(d, "ab", 3); -+ n = my_strlcpy(d, "ab", 3); - sequal(d, "ab"); - assert(d, n == 2); - -- n = strlcpy(d, "abc", sizeof d); -+ n = my_strlcpy(d, "abc", sizeof d); - sequal(d, "abc"); - assert(d, n == 3); - -- n = strlcat(d, "def", 4); -+ n = my_strlcat(d, "def", 4); - sequal(d, "abc"); - assert(d, n == 6); - -- n = strlcat(d, "def", sizeof d); -+ n = my_strlcat(d, "def", sizeof d); - sequal(d, "abcdef"); - assert(d, n == 6); - -- n = strlcat(d, "ghijkl", sizeof d); -+ n = my_strlcat(d, "ghijkl", sizeof d); - sequal(d, "abcdefghi"); - assert(d, n == 12); - -- n = strlcpy(d, "123", sizeof d); -+ n = my_strlcpy(d, "123", sizeof d); - sequal(d, "123"); - assert(d, n == 3); - -- n = strlcpy(d, d + 1, sizeof d); -+ n = my_strlcpy(d, d + 1, sizeof d); - sequal(d, "23"); - assert(d, n == 2); - -- n = strlcpy(d, d + 1, sizeof d); -+ n = my_strlcpy(d, d + 1, sizeof d); - sequal(d, "3"); - assert(d, n == 1); - -- n = strlcpy(d, d + 1, sizeof d); -+ n = my_strlcpy(d, d + 1, sizeof d); - sequal(d, ""); - assert(d, n == 0); - } -@@ -418,7 +418,7 @@ - while (a.next()) { - const char *e = a.entry(); - assert(e, strcoll(buf, e) < 0); -- strlcpy(buf, e, sizeof buf); -+ my_strlcpy(buf, e, sizeof buf); - } - assert(buf, strcoll(buf, "~~~~~~~~~") < 0); - } -@@ -437,7 +437,7 @@ - cstring c(s.entry()); - const char *e = c.c_str(); - assert(e, strcoll(buf, e) < 0); -- strlcpy(buf, e, sizeof buf); -+ my_strlcpy(buf, e, sizeof buf); - } - assert(buf, strcoll(buf, "~~~~~~~~~") < 0); - } ---- src/udir.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/udir.cc 2017-08-09 09:13:28.346061883 +0200 -@@ -66,7 +66,7 @@ - if (impl) { - DirPtr dirp(impl); - if (dirp.next()) { -- strlcpy(fEntry, dirp.name(), sizeof fEntry); -+ my_strlcpy(fEntry, dirp.name(), sizeof fEntry); - return true; - } - } diff --git a/pkgs/applications/window-managers/icewm/musl.patch b/pkgs/applications/window-managers/icewm/musl.patch deleted file mode 100644 index e7d18e312874..000000000000 --- a/pkgs/applications/window-managers/icewm/musl.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- src/ylocale.cc 2017-07-30 10:59:06.000000000 +0200 -+++ src/ylocale.cc 2017-08-09 08:15:50.938841549 +0200 -@@ -55,6 +55,8 @@ - int const codesetItems[] = { - #ifdef CONFIG_NL_CODESETS - CONFIG_NL_CODESETS -+#elif !defined(__GLIBC__) -+ CODESET, 0 - #else - CODESET, _NL_CTYPE_CODESET_NAME, 0 - #endif ---- src/globit.c 2017-07-30 10:59:06.000000000 +0200 -+++ src/globit.c 2017-08-09 08:17:18.691824584 +0200 -@@ -143,7 +143,9 @@ - } else if (*pattern == '~') { - /* yes, tilde */ - is_absolute = 2; -+#if defined(__GLIBC__) - glob_flags |= GLOB_TILDE; -+#endif - /* any slash in the pattern? */ - while (*cp && *cp != '/') - ++cp; |