From fb285f215301e7856ad5cfc4e4370932cf5c4cd1 Mon Sep 17 00:00:00 2001 From: Roman Plášil Date: Tue, 22 Oct 2019 15:48:02 +0800 Subject: minetest: update to 5.1.0 and build on Darwin --- pkgs/games/minetest/default.nix | 8 ++++++-- pkgs/games/minetest/disable_fixup.patch | 10 ++++++++++ pkgs/games/minetest/fix_wordsize_confusion.patch | 10 ++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 pkgs/games/minetest/disable_fixup.patch create mode 100644 pkgs/games/minetest/fix_wordsize_confusion.patch (limited to 'pkgs/games/minetest') diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index 02a53d065067..77a88a2319f2 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 000000000000..1c378d7f83fc --- /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 000000000000..9540a434dafe --- /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 + #include "irrlicht.h" // createDevice + #include "irrlichttypes_extrabloated.h" + #include "chat_interface.h" -- cgit 1.4.1