diff options
author | Roman Plášil <me@rplasil.name> | 2019-10-22 15:48:02 +0800 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-02-28 18:50:12 +0100 |
commit | fb285f215301e7856ad5cfc4e4370932cf5c4cd1 (patch) | |
tree | 6aa7c2b8687fa7e481823417686f651fd16606d8 /pkgs/games/minetest | |
parent | 24720dd250cb26025d6dd5dbaf089d48f2493cb5 (diff) |
minetest: update to 5.1.0 and build on Darwin
Diffstat (limited to 'pkgs/games/minetest')
-rw-r--r-- | pkgs/games/minetest/default.nix | 8 | ||||
-rw-r--r-- | pkgs/games/minetest/disable_fixup.patch | 10 | ||||
-rw-r--r-- | pkgs/games/minetest/fix_wordsize_confusion.patch | 10 |
3 files changed, 26 insertions, 2 deletions
diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index 02a53d0650674..77a88a2319f24 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, cmake, irrlicht, libpng, bzip2, curl, libogg, jsoncpp , libjpeg, libXxf86vm, libGLU, libGL, openal, libvorbis, sqlite, luajit , freetype, gettext, doxygen, ncurses, graphviz, xorg, gmp, libspatialindex -, leveldb, postgresql, hiredis +, leveldb, postgresql, hiredis, libiconv, OpenGL, OpenAL ? openal, Carbon, Cocoa }: with stdenv.lib; @@ -39,6 +39,8 @@ let ] ++ optionals buildClient [ "-DOpenGL_GL_PREFERENCE=GLVND" ]; + + patches = [ ./fix_wordsize_confusion.patch ]; NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 @@ -47,6 +49,8 @@ let buildInputs = [ irrlicht luajit jsoncpp gettext freetype sqlite curl bzip2 ncurses gmp libspatialindex + ] ++ optionals stdenv.isDarwin [ + libiconv OpenGL OpenAL Carbon Cocoa ] ++ optionals buildClient [ libpng libjpeg libGLU libGL openal libogg libvorbis xorg.libX11 libXxf86vm ] ++ optionals buildServer [ @@ -62,7 +66,7 @@ let homepage = http://minetest.net/; description = "Infinite-world block sandbox game"; license = licenses.lgpl21Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ pyrolagus fpletz ]; }; }; diff --git a/pkgs/games/minetest/disable_fixup.patch b/pkgs/games/minetest/disable_fixup.patch new file mode 100644 index 0000000000000..1c378d7f83fcb --- /dev/null +++ b/pkgs/games/minetest/disable_fixup.patch @@ -0,0 +1,10 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -802,7 +802,6 @@ + install(CODE " + set(BU_CHMOD_BUNDLE_ITEMS ON) + include(BundleUtilities) +- fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${BUNDLE_PATH}\" \"\" \"\${CMAKE_INSTALL_PREFIX}/${BINDIR}\") + " COMPONENT Runtime) + endif() + diff --git a/pkgs/games/minetest/fix_wordsize_confusion.patch b/pkgs/games/minetest/fix_wordsize_confusion.patch new file mode 100644 index 0000000000000..9540a434dafe3 --- /dev/null +++ b/pkgs/games/minetest/fix_wordsize_confusion.patch @@ -0,0 +1,10 @@ +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -17,6 +17,7 @@ + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + ++#include <cstdint> + #include "irrlicht.h" // createDevice + #include "irrlichttypes_extrabloated.h" + #include "chat_interface.h" |