summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-03-15 14:56:52 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-03-15 14:56:52 +0200
commitca7452e44a30b194bf6028effd3e1dc63dae5396 (patch)
treeb55ff364f2887c5a86d75687082e100c8d771a4a
parenta700871fefdab64d8fad92a2cfbb0729e724d063 (diff)
downloadnixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.tar
nixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.tar.gz
nixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.tar.bz2
nixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.tar.lz
nixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.tar.xz
nixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.tar.zst
nixpkgs-ca7452e44a30b194bf6028effd3e1dc63dae5396.zip
megaglest: migrate to wxGTK32
-rw-r--r--pkgs/games/megaglest/default.nix27
1 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/games/megaglest/default.nix b/pkgs/games/megaglest/default.nix
index e8558af0732..83954c1b246 100644
--- a/pkgs/games/megaglest/default.nix
+++ b/pkgs/games/megaglest/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, cmake, pkg-config, git, curl, SDL2, xercesc, openal, lua, libvlc
-, libjpeg, wxGTK30, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
+, libjpeg, wxGTK32, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
 , fontconfig, freetype, xorg, makeWrapper, bash, which, gnome, libGLU, glib
 , fetchFromGitHub, fetchpatch
 }:
@@ -9,7 +9,7 @@ let
     name = "megaglest-lib-env";
     paths = [ SDL2 xorg.libSM xorg.libICE xorg.libX11 xorg.libXext
       xercesc openal libvorbis lua libjpeg libpng curl fontconfig ftgl freetype
-      stdenv.cc.cc glew libGLU wxGTK30 ];
+      stdenv.cc.cc glew libGLU wxGTK32 ];
   };
   path-env = buildEnv {
     name = "megaglest-path-env";
@@ -35,10 +35,31 @@ stdenv.mkDerivation {
       url = "https://github.com/MegaGlest/megaglest-source/commit/5a3520540276a6fd06f7c88e571b6462978e3eab.patch";
       sha256 = "0y554kjw56dikq87vs709pmq97hdx9hvqsk27f81v4g90m3b3qhi";
     })
+    # Pull upstream and Debian fixes for wxWidgets 3.2
+    (fetchpatch {
+      name = "get-rid-of-manual-wxPaintEvent-creation-1.patch";
+      url = "https://github.com/MegaGlest/megaglest-source/commit/e09ba53c436279588f769d6ce8852e74d58f8391.patch";
+      hash = "sha256-1ZG6AjnLXW18wwad05kjH7W5rTaP1SDpZ5zLH4nRQt4=";
+    })
+    (fetchpatch {
+      name = "get-rid-of-manual-wxPaintEvent-creation-2.patch";
+      url = "https://sources.debian.org/data/main/m/megaglest/3.13.0-9/debian/patches/fbd0cfb17ed759d24aeb577a602b0d97f7895cc2.patch";
+      hash = "sha256-aMDDboNdH22r7YOiZCEApwz+FpM60anBp82tLwiIH6g=";
+    })
+    (fetchpatch {
+      name = "get-rid-of-manual-wxPaintEvent-creation-3.patch";
+      url = "https://github.com/MegaGlest/megaglest-source/commit/5801b1fafff8ad9618248d4d5d5c751fdf52be2f.patch";
+      hash = "sha256-/RpBoT1JsSFtOrAXphHrPp9DnTbaEN/2h8EZmQ9PIPU=";
+    })
+    (fetchpatch {
+      name = "fix-editor-and-g3dviewer-for-wx-3.1.x.patch";
+      url = "https://github.com/MegaGlest/megaglest-source/commit/789e1cdf371137b729e832e28a5feb6e97a3a243.patch";
+      hash = "sha256-fK7vkHCu6bqVB6I7vMsWMGiczSdxVgo1KqqBNMkEbfM=";
+    })
   ];
 
   nativeBuildInputs = [ cmake pkg-config makeWrapper git ];
-  buildInputs = [ curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK30
+  buildInputs = [ curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK32
     glib cppunit fontconfig freetype ftgl glew libogg libvorbis libGLU ];
 
   cmakeFlags = [