Skip to content

Commit

Permalink
cataclysm-dda: 0.G -> 0.H
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeUnderscore committed Nov 23, 2024
1 parent bd5ffc1 commit 5aa2d34
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 83 deletions.
2 changes: 1 addition & 1 deletion pkgs/games/cataclysm-dda/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let

patches = [
# Unconditionally look for translation files in $out/share/locale
./locale-path-git.patch
./locale-path.patch
];

makeFlags = common.makeFlags ++ [
Expand Down
28 changes: 0 additions & 28 deletions pkgs/games/cataclysm-dda/glibc-2.39.diff

This file was deleted.

17 changes: 0 additions & 17 deletions pkgs/games/cataclysm-dda/locale-path-git.patch

This file was deleted.

9 changes: 4 additions & 5 deletions pkgs/games/cataclysm-dda/locale-path.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
diff --git a/src/translations.cpp b/src/translations.cpp
index 76bdfd0..6dd6109 100644
--- a/src/translations.cpp
+++ b/src/translations.cpp
@@ -61,13 +61,11 @@ std::string locale_dir()
#define BSD
@@ -52,13 +52,11 @@ std::string locale_dir()
#define CATA_IS_ON_BSD
#endif
-#if !defined(__ANDROID__) && ((defined(__linux__) || defined(BSD) || (defined(MACOSX) && !defined(TILES))))

-#if !defined(__ANDROID__) && ((defined(__linux__) || defined(CATA_IS_ON_BSD) || (defined(MACOSX) && !defined(TILES))))
if( !PATH_INFO::base_path().empty() ) {
loc_dir = PATH_INFO::base_path() + "share/locale";
} else {
Expand Down
35 changes: 3 additions & 32 deletions pkgs/games/cataclysm-dda/stable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, callPackage
, CoreFoundation
, fetchFromGitHub
, fetchpatch
, pkgs
, wrapCDDA
, attachPkgs
Expand All @@ -18,49 +17,21 @@ let
};

self = common.overrideAttrs (common: rec {
version = "0.G";
version = "0.H";

src = fetchFromGitHub {
owner = "CleverRaven";
repo = "Cataclysm-DDA";
rev = version;
sha256 = "sha256-Hda0dVVHNeZ8MV5CaCbSpdOCG2iqQEEmXdh16vwIBXk=";
rev = "${version}-RELEASE";
sha256 = "sha256-ZCD5qgqYSX7sS+Tc1oNYq9soYwNUUuWamY2uXfLjGoY=";
};

patches = [
# Unconditionally look for translation files in $out/share/locale
./locale-path.patch
# Fixes for failing build with GCC 13, remove on updating next release after 0.G
(fetchpatch {
url = "https://sources.debian.org/data/main/c/cataclysm-dda/0.G-4/debian/patches/gcc13-dangling-reference-warning.patch";
hash = "sha256-9nPbyz49IYBOVHqr7jzCIyS8z/SQgpK4EjEz1fruIPE=";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/c/cataclysm-dda/0.G-4/debian/patches/gcc13-cstdint.patch";
hash = "sha256-8IBW2OzAHVgEJZoViQ490n37sl31hA55ePuqDL/lil0=";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/c/cataclysm-dda/0.G-4/debian/patches/gcc13-keyword-requires.patch";
hash = "sha256-8yvHh0YKC7AC/qzia7AZAfMewMC0RiSepMXpOkMXRd8=";
})
# Fix build w/ glibc-2.39
# From https://github.com/BrettDong/Cataclysm-DDA/commit/9b206e2dc969ad79345596e03c3980bd155d2f48
./glibc-2.39.diff
];

makeFlags = common.makeFlags ++ [
# Makefile declares version as 0.F, with no minor release number
"VERSION=${version}"
];

env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=array-bounds"
];

meta = common.meta // {
maintainers = with lib.maintainers;
common.meta.maintainers;
changelog = "https://github.com/CleverRaven/Cataclysm-DDA/blob/${version}/data/changelog.txt";
};
});
Expand Down

0 comments on commit 5aa2d34

Please sign in to comment.