fsg: migrate to wxGTK32

+75 -9
+6 -4
pkgs/games/fsg/default.nix
··· 1 - { lib, stdenv, fetchurl, gtk2, glib, pkg-config, libGLU, libGL, wxGTK, libX11, xorgproto 2 - , runtimeShell }: 3 4 stdenv.mkDerivation rec { 5 pname = "fsg"; ··· 10 url = "https://github.com/ctrlcctrlv/wxsand/blob/master/fsg-src-${version}-ORIGINAL.tar.gz?raw=true"; 11 sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c"; 12 }; 13 14 hardeningDisable = [ "format" ]; 15 16 nativeBuildInputs = [ pkg-config ]; 17 - buildInputs = [ gtk2 glib libGLU libGL wxGTK libX11 xorgproto ]; 18 19 preBuild = '' 20 sed -e ' ··· 32 33 meta = { 34 description = "Cellular automata engine tuned towards the likes of Falling Sand"; 35 - maintainers = [lib.maintainers.raskin]; 36 platforms = lib.platforms.linux; 37 }; 38 }
··· 1 + { lib, stdenv, fetchurl, gtk2, glib, pkg-config, libGLU, libGL, wxGTK32, libX11, xorgproto, runtimeShell }: 2 3 stdenv.mkDerivation rec { 4 pname = "fsg"; ··· 9 url = "https://github.com/ctrlcctrlv/wxsand/blob/master/fsg-src-${version}-ORIGINAL.tar.gz?raw=true"; 10 sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c"; 11 }; 12 + 13 + patches = [ ./wxgtk-3.2.patch ]; 14 15 hardeningDisable = [ "format" ]; 16 17 nativeBuildInputs = [ pkg-config ]; 18 + 19 + buildInputs = [ glib libGLU libGL wxGTK32 libX11 xorgproto ]; 20 21 preBuild = '' 22 sed -e ' ··· 34 35 meta = { 36 description = "Cellular automata engine tuned towards the likes of Falling Sand"; 37 + maintainers = [ lib.maintainers.raskin ]; 38 platforms = lib.platforms.linux; 39 }; 40 }
+68
pkgs/games/fsg/wxgtk-3.2.patch
···
··· 1 + diff --git a/Canvas.cpp b/Canvas.cpp 2 + index 8c00727..5ee7756 100644 3 + --- a/Canvas.cpp 4 + +++ b/Canvas.cpp 5 + @@ -889,7 +889,6 @@ void Canvas::Refresh(){ 6 + if (doDraw){ 7 + wxClientDC dc(this); 8 + 9 + - dc.BeginDrawing(); 10 + 11 + wxMemoryDC memdc; 12 + wxImage image(g_width, g_height, bitmapdata, true); 13 + @@ -899,7 +898,6 @@ void Canvas::Refresh(){ 14 + dc.Blit(0,0,g_width, g_height, &memdc, 0, 0); 15 + 16 + if (!drawAll){ 17 + - dc.EndDrawing(); 18 + return; 19 + } 20 + else{ 21 + @@ -912,7 +910,6 @@ void Canvas::Refresh(){ 22 + } 23 + 24 + 25 + - dc.EndDrawing(); 26 + 27 + } 28 + } 29 + diff --git a/MainFrame.cpp b/MainFrame.cpp 30 + index c45107b..d93f9e1 100644 31 + --- a/MainFrame.cpp 32 + +++ b/MainFrame.cpp 33 + @@ -178,7 +178,7 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si 34 + RHSizer->Add(RH4, 0, wxEXPAND | wxALL, 5); 35 + } 36 + 37 + - sizer->Add(g_canvas, 0, wxADJUST_MINSIZE | wxALL, 10); 38 + + sizer->Add(g_canvas, 0, wxALL, 10); 39 + sizer->Add(RHSizer, 1, wxEXPAND); 40 + } 41 + this->SetSizer(sizer); 42 + @@ -1165,7 +1165,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){ 43 + } 44 + else if(event.GetId() == 1051){ 45 + //Load 46 + - wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Any Image Files (*.*)|*.*"), wxOPEN); 47 + + wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Any Image Files (*.*)|*.*"), wxFD_OPEN); 48 + 49 + if (dialog.ShowModal() == wxID_OK){ 50 + sandboxFilename = dialog.GetPath(); 51 + @@ -1174,7 +1174,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){ 52 + } 53 + else if(event.GetId() == 1052){ 54 + //Save 55 + - wxFileDialog dialog(this, _("Save to a file"), _(""), _(""), _("PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp"), wxSAVE); 56 + + wxFileDialog dialog(this, _("Save to a file"), _(""), _(""), _("PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp"), wxFD_SAVE); 57 + 58 + if (dialog.ShowModal() == wxID_OK){ 59 + wxString filename = dialog.GetPath(); 60 + @@ -1216,7 +1216,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){ 61 + else if(event.GetId() == 1055){ 62 + //Load physics 63 + 64 + - wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Physics Files (*.txt)|*.txt"), wxOPEN); 65 + + wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Physics Files (*.txt)|*.txt"), wxFD_OPEN); 66 + if (dialog.ShowModal() == wxID_OK){ 67 + physicsFilename = dialog.GetPath(); 68 + loadPhysics(physicsFilename);
+1 -5
pkgs/top-level/all-packages.nix
··· 33780 33781 frozen-bubble = callPackage ../games/frozen-bubble { }; 33782 33783 - fsg = callPackage ../games/fsg { 33784 - wxGTK = wxGTK28.override { 33785 - unicode = false; 33786 - }; 33787 - }; 33788 33789 galaxis = callPackage ../games/galaxis { }; 33790
··· 33780 33781 frozen-bubble = callPackage ../games/frozen-bubble { }; 33782 33783 + fsg = callPackage ../games/fsg { }; 33784 33785 galaxis = callPackage ../games/galaxis { }; 33786