cataclysm-dda: 0.D -> 0.E

This commit is contained in:
Spencer Baugh 2020-04-04 13:45:45 -04:00
parent 045384ac98
commit 4cfc499e1b
2 changed files with 8 additions and 22 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, callPackage, lua, CoreFoundation
{ stdenv, callPackage, CoreFoundation
, tiles ? true, Cocoa
, debug ? false
}:
@ -9,28 +9,16 @@ let
in
stdenv.mkDerivation (common // rec {
version = "0.D";
version = "0.E";
name = "cataclysm-dda-${version}";
src = fetchFromCleverRaven {
rev = version;
sha256 = "00zzhx1mh1qjq668cga5nbrxp2qk6b82j5ak65skhgnlr6ii4ysc";
sha256 = "0pbi0fw37zimzdklfj58s1ql0wlqq7dy6idkcsib3hn910ajaxan";
};
buildInputs = common.buildInputs ++ [ lua ];
patches = [ ./patches/fix_locale_dir.patch ];
postPatch = common.postPatch + ''
substituteInPlace lua/autoexec.lua --replace "/usr/share" "$out/share"
'';
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=deprecated-copy";
makeFlags = common.makeFlags ++ [
"LUA=1"
];
meta = with stdenv.lib.maintainers; common.meta // {
maintainers = common.meta.maintainers ++ [ skeidel ];
};

View File

@ -1,15 +1,13 @@
diff --git a/src/translations.cpp b/src/translations.cpp
index 2585b7ec56..7bb005823c 100644
--- a/src/translations.cpp
+++ b/src/translations.cpp
@@ -195,14 +195,12 @@ void set_language()
@@ -212,14 +212,12 @@ void set_language()
auto env = getenv( "LANGUAGE" );
locale_dir = std::string( FILENAMES["base_path"] + "lang/mo/" + ( env ? env : "none" ) +
locale_dir = std::string( PATH_INFO::base_path() + "lang/mo/" + ( env ? env : "none" ) +
"/LC_MESSAGES/cataclysm-dda.mo" );
-#elif (defined __linux__ || (defined MACOSX && !defined TILES))
-#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))
+#else
if( !FILENAMES["base_path"].empty() ) {
locale_dir = FILENAMES["base_path"] + "share/locale";
if( !PATH_INFO::base_path().empty() ) {
locale_dir = PATH_INFO::base_path() + "share/locale";
} else {
locale_dir = "lang/mo";
}