tes3mp: fix working (#88061)

This commit is contained in:
gnidorah 2020-05-20 20:25:36 +03:00 committed by GitHub
parent 48f0d8b3c8
commit 6405edf2dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 7 deletions

View file

@ -50,6 +50,12 @@ in openmw.overrideAttrs (oldAttrs: rec {
"-DRakNet_LIBRARY_DEBUG=${rakNetLibrary}/lib/libRakNetLibStatic.a"
];
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95175
patches = [
./tes3mp.patch
];
NIX_CFLAGS_COMPILE = "-fpermissive";
preConfigure = ''
substituteInPlace files/version.in \
--subst-var-by OPENMW_VERSION_COMMITHASH ${compatHash}

View file

@ -0,0 +1,13 @@
diff --git a/apps/openmw-mp/Script/Types.hpp b/apps/openmw-mp/Script/Types.hpp
index be365cfb8..204dcdc7b 100644
--- a/apps/openmw-mp/Script/Types.hpp
+++ b/apps/openmw-mp/Script/Types.hpp
@@ -105,7 +105,7 @@ struct ScriptFunctionPointer : public ScriptIdentity
void *addr;
#if (!defined(__clang__) && defined(__GNUC__))
template<typename R, typename... Types>
- constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr((void*)(addr)) {}
+ constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}
#else
template<typename R, typename... Types>
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}

View file

@ -23764,13 +23764,7 @@ in
openmw = libsForQt5.callPackage ../games/openmw { };
openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix {
openmw = openmw.override {
stdenv = gcc8Stdenv;
openscenegraph = openscenegraph.override { stdenv = gcc8Stdenv; };
mygui = mygui.override { stdenv = gcc8Stdenv; };
};
};
openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix { };
openraPackages = import ../games/openra pkgs;