looking-glass-client: B3 -> B4

Babbaj aabf5dd5 00cfd7ec

+33 -64
-45
pkgs/applications/virtualization/looking-glass-client/0001-client-all-fix-more-maybe-uninitialized-when-O3-is-i.patch
··· 1 - From 95a7293b30ff7b89d615daea00269ed32f4b70a2 Mon Sep 17 00:00:00 2001 2 - From: Geoffrey McRae <geoff@hostfission.com> 3 - Date: Tue, 23 Feb 2021 20:25:30 +1100 4 - Subject: [PATCH] [client] all: fix more `maybe-uninitialized` when `-O3` is in 5 - use 6 - 7 - Closes #475 8 - --- 9 - client/renderers/EGL/egl.c | 3 ++- 10 - client/src/main.c | 5 +++-- 11 - 2 files changed, 5 insertions(+), 3 deletions(-) 12 - 13 - diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c 14 - index b7a5644..72ce50d 100644 15 - --- a/client/renderers/EGL/egl.c 16 - +++ b/client/renderers/EGL/egl.c 17 - @@ -271,7 +271,8 @@ static void egl_calc_mouse_size(struct Inst * this) 18 - if (!this->formatValid) 19 - return; 20 - 21 - - int w, h; 22 - + int w = 0, h = 0; 23 - + 24 - switch(this->format.rotate) 25 - { 26 - case LG_ROTATE_0: 27 - diff --git a/client/src/main.c b/client/src/main.c 28 - index f05e929..f5d6fad 100644 29 - --- a/client/src/main.c 30 - +++ b/client/src/main.c 31 - @@ -186,8 +186,9 @@ static void updatePositionInfo(void) 32 - if (!g_state.haveSrcSize) 33 - goto done; 34 - 35 - - float srcW; 36 - - float srcH; 37 - + float srcW = 0.0f; 38 - + float srcH = 0.0f; 39 - + 40 - switch(params.winRotate) 41 - { 42 - case LG_ROTATE_0: 43 - -- 44 - 2.30.1 45 -
···
+33 -19
pkgs/applications/virtualization/looking-glass-client/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config, SDL2, SDL2_ttf, spice-protocol 2 - , fontconfig, libX11, freefont_ttf, nettle, libpthreadstubs, libXau, libXdmcp 3 - , libXi, libXext, wayland, wayland-protocols, libffi, libGLU, libXScrnSaver 4 - , expat, libbfd 5 }: 6 7 stdenv.mkDerivation rec { 8 pname = "looking-glass-client"; 9 - version = "B3"; 10 11 src = fetchFromGitHub { 12 owner = "gnif"; 13 repo = "LookingGlass"; 14 rev = version; 15 - sha256 = "1vmabjzn85p0brdian9lbpjq39agzn8k0limn8zjm713lh3n3c0f"; 16 fetchSubmodules = true; 17 }; 18 19 nativeBuildInputs = [ cmake pkg-config ]; 20 21 buildInputs = [ 22 - SDL2 SDL2_ttf spice-protocol fontconfig libX11 freefont_ttf nettle 23 - libpthreadstubs libXau libXdmcp libXi libXext wayland wayland-protocols 24 - libffi libGLU libXScrnSaver expat libbfd 25 ]; 26 27 - patches = [ 28 - # error: ‘h’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 29 - # Fixed upstream in master in 8771103abbfd04da9787dea760405364af0d82de, but not in B3. 30 - # Including our own patch here since upstream commit patch doesnt apply cleanly on B3 31 - ./0001-client-all-fix-more-maybe-uninitialized-when-O3-is-i.patch 32 - ]; 33 - patchFlags = "-p2"; 34 - 35 - sourceRoot = "source/client"; 36 NIX_CFLAGS_COMPILE = "-mavx"; # Fix some sort of AVX compiler problem. 37 38 meta = with lib; { 39 description = "A KVM Frame Relay (KVMFR) implementation"; 40 longDescription = '' ··· 46 ''; 47 homepage = "https://looking-glass.io/"; 48 license = licenses.gpl2Plus; 49 - maintainers = with maintainers; [ alexbakker ]; 50 platforms = [ "x86_64-linux" ]; 51 }; 52 }
··· 1 + 2 + { stdenv, lib, fetchFromGitHub, fetchpatch, makeDesktopItem, cmake, pkg-config 3 + , SDL, SDL2_ttf, freefont_ttf, spice-protocol, nettle, libbfd, fontconfig 4 + , libXi, libXScrnSaver, libXinerama 5 + , wayland, wayland-protocols 6 }: 7 8 + let 9 + desktopItem = makeDesktopItem { 10 + name = "looking-glass-client"; 11 + desktopName = "Looking Glass Client"; 12 + type = "Application"; 13 + exec = "looking-glass-client"; 14 + icon = "lg-logo"; 15 + terminal = true; 16 + }; 17 + in 18 stdenv.mkDerivation rec { 19 pname = "looking-glass-client"; 20 + version = "B4"; 21 22 src = fetchFromGitHub { 23 owner = "gnif"; 24 repo = "LookingGlass"; 25 rev = version; 26 + sha256 = "0fwmz0l1dcfwklgvxmv0galgj2q3nss90kc3jwgf6n80x27rsnhf"; 27 fetchSubmodules = true; 28 }; 29 30 nativeBuildInputs = [ cmake pkg-config ]; 31 32 buildInputs = [ 33 + SDL SDL2_ttf freefont_ttf spice-protocol 34 + libbfd nettle fontconfig 35 + libXi libXScrnSaver libXinerama 36 + wayland wayland-protocols 37 ]; 38 39 NIX_CFLAGS_COMPILE = "-mavx"; # Fix some sort of AVX compiler problem. 40 41 + postUnpack = '' 42 + echo $version > source/VERSION 43 + export sourceRoot="source/client" 44 + ''; 45 + 46 + postInstall = '' 47 + mkdir -p $out/share/pixmaps 48 + ln -s ${desktopItem}/share/applications $out/share/ 49 + cp $src/resources/lg-logo.png $out/share/pixmaps 50 + ''; 51 + 52 meta = with lib; { 53 description = "A KVM Frame Relay (KVMFR) implementation"; 54 longDescription = '' ··· 60 ''; 61 homepage = "https://looking-glass.io/"; 62 license = licenses.gpl2Plus; 63 + maintainers = with maintainers; [ alexbakker babbaj ]; 64 platforms = [ "x86_64-linux" ]; 65 }; 66 }