diff options
author | D Anzorge <d.anzorge@gmail.com> | 2022-08-14 00:00:04 +0200 |
---|---|---|
committer | D Anzorge <d.anzorge@gmail.com> | 2022-08-17 01:10:37 +0200 |
commit | b9b7c80f7a76ffdc3e20e5208d3acfff0904227a (patch) | |
tree | ec7a4a3b45505dc3b2a0d892abf16118560f8c2e /pkgs/games/cataclysm-dda | |
parent | 76aa29d2ed813754dd102cbd3934532090710398 (diff) |
cataclysm-dda: update locale path patch
Diffstat (limited to 'pkgs/games/cataclysm-dda')
-rw-r--r-- | pkgs/games/cataclysm-dda/common.nix | 7 | ||||
-rw-r--r-- | pkgs/games/cataclysm-dda/locale-path-stable.patch | 20 | ||||
-rw-r--r-- | pkgs/games/cataclysm-dda/stable.nix | 5 |
3 files changed, 26 insertions, 6 deletions
diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index af20169a6e08..4e39a64c4001 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -40,12 +40,7 @@ stdenv.mkDerivation { buildInputs = cursesDeps ++ optionals tiles tilesDeps; postPatch = '' - patchShebangs . - - # Locale patch required for Darwin builds, see: - # https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970 - sed -i src/translations.cpp \ - -e 's@#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))@#elif 1@' + patchShebangs lang/compile_mo.sh ''; makeFlags = [ diff --git a/pkgs/games/cataclysm-dda/locale-path-stable.patch b/pkgs/games/cataclysm-dda/locale-path-stable.patch new file mode 100644 index 000000000000..db8592646f0d --- /dev/null +++ b/pkgs/games/cataclysm-dda/locale-path-stable.patch @@ -0,0 +1,20 @@ +diff --git a/src/translations.cpp b/src/translations.cpp +index fa0ee479b2..0e470098dc 100644 +--- a/src/translations.cpp ++++ b/src/translations.cpp +@@ -141,15 +141,11 @@ void select_language() + std::string locale_dir() + { + std::string loc_dir; +-#if !defined(__ANDROID__) && ((defined(__linux__) || defined(BSD) || (defined(MACOSX) && !defined(TILES)))) + if( !PATH_INFO::base_path().empty() ) { + loc_dir = PATH_INFO::base_path() + "share/locale"; + } else { + loc_dir = PATH_INFO::langdir(); + } +-#else +- loc_dir = PATH_INFO::langdir(); +-#endif + return loc_dir; + } + diff --git a/pkgs/games/cataclysm-dda/stable.nix b/pkgs/games/cataclysm-dda/stable.nix index 453f5ceacae1..52f3ca41f480 100644 --- a/pkgs/games/cataclysm-dda/stable.nix +++ b/pkgs/games/cataclysm-dda/stable.nix @@ -19,6 +19,11 @@ let sha256 = "sha256-2su1uQaWl9WG41207dRvOTdVKcQsEz/y0uTi9JX52uI="; }; + patches = [ + # Unconditionally look for translation files in $out/share/locale + ./locale-path-stable.patch + ]; + makeFlags = common.makeFlags ++ [ # Makefile declares version as 0.F, with no minor release number "VERSION=${version}" |