gmu: pull pending upstream inclusion fix for ncurses-6.3

Without the fix build on ncurses-6.3 fails as:

src/tools/ui.c: In function 'ui_draw_footer_button':
src/tools/ui.c:329:9: error: format not a string literal and no format arguments [-Werror=format-security]
329 | wprintw(ui->win_footer->win, key);
| ^~~~~~~

While at it pulled fix for upstream gcc-10 and clang-12 which
default to -fno-common. Otherwise build would fail as:

$ nix build --impure --expr 'with import ./. {}; gmu.override { stdenv = clang12Stdenv; }' -L
...
gmu> ld: feloader.o:(.bss+0x8): multiple definition of `dlsymunion';
decloader.o:(.bss+0x8): first defined here

+19 -1
+19 -1
pkgs/applications/audio/gmu/default.nix
··· 1 - {lib, stdenv, fetchurl, SDL, SDL_gfx, SDL_image, tremor, flac, mpg123, libmikmod 1 + {lib, stdenv, fetchurl, fetchpatch, SDL, SDL_gfx, SDL_image, tremor, flac, mpg123, libmikmod 2 2 , speex, ncurses 3 3 , keymap ? "default" 4 4 , conf ? "unknown" ··· 12 12 url = "https://wej.k.vu/files/${pname}-${version}.tar.gz"; 13 13 sha256 = "03x0mc0xw2if0bpf0a15yprcyx1xccki039zvl2099dagwk6xskv"; 14 14 }; 15 + 16 + patches = [ 17 + # pull pending upstream inclusion fix for ncurses-6.3: 18 + # https://github.com/jhe2/gmu/pull/7 19 + (fetchpatch { 20 + name = "ncurses-6.3.patch"; 21 + url = "https://github.com/jhe2/gmu/commit/c8b3a10afee136feb333754ef6ec26383b11072f.patch"; 22 + sha256 = "0xp2j3jp8pkmv6yvnzi378m2dylbfsaqrsrkw7hbxw6kglzj399r"; 23 + }) 24 + 25 + # pull upstream fix for -fno-common toolchains like 26 + # upstream gcc-10 of clang-13. 27 + (fetchpatch { 28 + name = "fno-common.patch"; 29 + url = "https://github.com/jhe2/gmu/commit/b705209f08ddfda141ad358ccd0c3d2d099be5e6.patch"; 30 + sha256 = "1ci2b8kz3r58rzmivlfhqjmcgqwlkwlzzhnyxlk36vmk240a3gqq"; 31 + }) 32 + ]; 15 33 16 34 buildInputs = [ SDL SDL_gfx SDL_image tremor flac mpg123 libmikmod speex ncurses ]; 17 35