From dce8765c0439fd39d8834eec54cc415cebbbc046 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 4 Apr 2026 14:13:52 +0200 Subject: [PATCH] meritous: fix build with GCC 15 Part of: https://github.com/NixOS/nixpkgs/issues/475479 Signed-off-by: Marcin Serwin --- pkgs/by-name/me/meritous/gcc15-fix.patch | 34 ++++++++++++++++++++++++ pkgs/by-name/me/meritous/package.nix | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/by-name/me/meritous/gcc15-fix.patch diff --git a/pkgs/by-name/me/meritous/gcc15-fix.patch b/pkgs/by-name/me/meritous/gcc15-fix.patch new file mode 100644 index 000000000000..1291cf11adf7 --- /dev/null +++ b/pkgs/by-name/me/meritous/gcc15-fix.patch @@ -0,0 +1,34 @@ +diff --git a/src/levelblit.c b/src/levelblit.c +index 5a04a8e..f530aa8 100644 +--- a/src/levelblit.c ++++ b/src/levelblit.c +@@ -2575,7 +2575,7 @@ void SpecialTile(int x, int y) + break; + case 42: + if (rooms[player_room].room_type == 5) { +- if (CanGetArtifact(rooms[player_room].room_param)) { ++ if (CanGetArtifact()) { + + } else { + sprintf(message, _("The artifact is tainted with shadow. You must slay more of the shadow first.") ); +diff --git a/src/save.h b/src/save.h +index dd67443..bcf0471 100644 +--- a/src/save.h ++++ b/src/save.h +@@ -24,7 +24,7 @@ + #ifndef SAVE_H + #define SAVE_H + +-void DoSaveGame(); ++void DoSaveGame(char *); + + void FWInt(int val); + void FWChar(unsigned char i); +@@ -39,6 +39,6 @@ void SaveGame(char *); + void LoadGame(char *); + void CloseFile(); + +-int IsSaveFile(); ++int IsSaveFile(char *); + + #endif diff --git a/pkgs/by-name/me/meritous/package.nix b/pkgs/by-name/me/meritous/package.nix index 5bf5b2830816..6498864d5a0f 100644 --- a/pkgs/by-name/me/meritous/package.nix +++ b/pkgs/by-name/me/meritous/package.nix @@ -28,6 +28,9 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.com/meritous/meritous/-/commit/68029f02ccaea86fb96d6dd01edb269ac3e6eff0.patch"; hash = "sha256-YRV0cEcn6nEJUdHF/cheezNbsgZmjy0rSUw0tuhUYf0="; }) + + # https://gitlab.com/meritous/meritous/-/merge_requests/6 + ./gcc15-fix.patch ]; prePatch = ''