From 5732bf5886703742309f220cb8e838c09278736e Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 26 Jul 2021 09:22:55 +0200 Subject: [PATCH 1/2] wine{Unstable,Staging}: 6.12 -> 6.13 --- pkgs/misc/emulators/wine/sources.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index f2e61d18ee2a..6accb486d57c 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -44,9 +44,9 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "6.12"; + version = "6.13"; url = "https://dl.winehq.org/wine/source/6.x/wine-${version}.tar.xz"; - sha256 = "1a6fnxb4rci310m0wjcs9cnmpj88775q70qk7xi3k06z1qqbx4pv"; + sha256 = "sha256-4DohoBHUXSrp8iIED7dpC5cVY3bnQx+GHyAHPq8k8oo="; inherit (stable) gecko32 gecko64; ## see http://wiki.winehq.org/Mono @@ -65,11 +65,10 @@ in rec { staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "1mg5yrw5jk2nbdp9mcqc3iar01lr76lmm1py95wify9p2bqzavpp"; + sha256 = "sha256-3IpO+eQ/+DiQZH6en5Q/p+j441LDvjn4i9Ex7PY8KCk="; owner = "wine-staging"; repo = "wine-staging"; - # Replace back on next release: rev = "v${version}"; - rev = "v6.12.1"; + rev = "v${version}"; disabledPatchsets = [ ]; }; From cf9c9cae38d7a27fdc46f1decce7a1f281fdf862 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 26 Jul 2021 12:44:38 +0200 Subject: [PATCH 2/2] pipelight: Add patch for wine 6.13 compatibility Wine 6.13 introduces a function argument named 'new' to a header file. This confuses the C++ compiler. --- pkgs/tools/misc/pipelight/default.nix | 5 ++- .../misc/pipelight/wine-6.13-new-args.patch | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/misc/pipelight/wine-6.13-new-args.patch diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix index 96027677fa86..a5a5b727a8de 100644 --- a/pkgs/tools/misc/pipelight/default.nix +++ b/pkgs/tools/misc/pipelight/default.nix @@ -21,7 +21,10 @@ in stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; - patches = [ ./pipelight.patch ]; + patches = [ + ./pipelight.patch + ./wine-6.13-new-args.patch + ]; configurePhase = '' patchShebangs . diff --git a/pkgs/tools/misc/pipelight/wine-6.13-new-args.patch b/pkgs/tools/misc/pipelight/wine-6.13-new-args.patch new file mode 100644 index 000000000000..b67af621f64f --- /dev/null +++ b/pkgs/tools/misc/pipelight/wine-6.13-new-args.patch @@ -0,0 +1,42 @@ +diff --git a/src/windows/pluginloader/apihook.c b/src/windows/pluginloader/apihook.c +index 80bf726..6b80f70 100644 +--- a/src/windows/pluginloader/apihook.c ++++ b/src/windows/pluginloader/apihook.c +@@ -42,7 +42,9 @@ + #include "common/common.h" + #include "pluginloader.h" + ++#define new cnew + #include // for PVOID and other types ++#undef new + #include // for memset + + void* patchDLLExport(PVOID ModuleBase, const char* functionName, void* newFunctionPtr){ +diff --git a/src/windows/pluginloader/npnfunctions.c b/src/windows/pluginloader/npnfunctions.c +index e4e38aa..19f29d5 100644 +--- a/src/windows/pluginloader/npnfunctions.c ++++ b/src/windows/pluginloader/npnfunctions.c +@@ -41,7 +41,9 @@ + #include "common/common.h" + #include "pluginloader.h" + ++#define new cnew + #include ++#undef new + + /* Shockwave sometimes calls the function with a wrong instance? Is this a wine bug? */ + NPP shockwaveInstanceBug = NULL; +diff --git a/src/windows/pluginloader/pluginloader.c b/src/windows/pluginloader/pluginloader.c +index 8f1170a..99dbceb 100644 +--- a/src/windows/pluginloader/pluginloader.c ++++ b/src/windows/pluginloader/pluginloader.c +@@ -50,7 +50,9 @@ + #include "pluginloader.h" + #include "apihook.h" + ++#define new cnew + #include ++#undef new + #include // for CoInitializeEx + #include +