From 80522257ca30f5187f677c932c78c3013e56b38b Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sat, 6 Jun 2020 14:31:47 +0200 Subject: [PATCH] moria: update to 5.7.12 --- packages/moria/CMakeLists.txt.patch | 2 +- packages/moria/build.sh | 5 ++--- packages/moria/config.cpp.patch | 10 +++++----- packages/moria/ui_io.cpp.patch | 31 ++++++++++++++++++++++++++--- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/packages/moria/CMakeLists.txt.patch b/packages/moria/CMakeLists.txt.patch index e53d32ea6..646172e03 100644 --- a/packages/moria/CMakeLists.txt.patch +++ b/packages/moria/CMakeLists.txt.patch @@ -31,5 +31,5 @@ diff -uNr umoria-5.7.11/CMakeLists.txt umoria-5.7.11.mod/CMakeLists.txt +target_link_libraries(moria ${CURSES_LIBRARIES}) + +install(TARGETS moria DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -+install(FILES docs/manual.md docs/faq.md LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/moria/) ++install(FILES historical/manual.md historical/faq.md LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/moria/) +INSTALL(DIRECTORY ${build_dir}/data DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/games/moria/ FILES_MATCHING PATTERN "*.txt") diff --git a/packages/moria/build.sh b/packages/moria/build.sh index a99618d3a..8b76cffcf 100644 --- a/packages/moria/build.sh +++ b/packages/moria/build.sh @@ -1,10 +1,9 @@ TERMUX_PKG_HOMEPAGE=https://umoria.org TERMUX_PKG_DESCRIPTION="Rogue-like game with an infinite dungeon" TERMUX_PKG_LICENSE="GPL-2.0" -TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli" -TERMUX_PKG_VERSION=5.7.11 +TERMUX_PKG_VERSION=5.7.12 TERMUX_PKG_SRCURL=https://github.com/dungeons-of-moria/umoria/archive/v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=435ad91038a6ba9bc760803d032d8a4ec5e9a14f5139c31c357cd8162c7b6bfc +TERMUX_PKG_SHA256=7be03361ac21a850e7be8f1a53e3ab68bd57637543ccb1296eb40d9d4a7b32a6 TERMUX_PKG_DEPENDS="libc++, ncurses" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dbuild_dir=$TERMUX_PKG_BUILDDIR" diff --git a/packages/moria/config.cpp.patch b/packages/moria/config.cpp.patch index f3d95d571..6b15fb86e 100644 --- a/packages/moria/config.cpp.patch +++ b/packages/moria/config.cpp.patch @@ -1,6 +1,6 @@ ---- ../config.cpp.orig 2019-04-28 08:39:02.561466895 +0200 -+++ ./src/config.cpp 2019-04-28 08:47:23.468112922 +0200 -@@ -12,18 +12,18 @@ +--- ../config.cpp.orig 2020-06-06 14:29:46.809335434 +0200 ++++ ./src/config.cpp 2020-06-06 09:57:26.580039189 +0200 +@@ -13,18 +13,18 @@ // Data files used by Umoria // NOTE: use relative paths to the executable binary. namespace files { @@ -27,7 +27,7 @@ + const std::string death_tomb = "@TERMUX_PREFIX@/lib/games/moria/death_tomb.txt"; + const std::string death_royal = "@TERMUX_PREFIX@/lib/games/moria/death_royal.txt"; + const std::string scores = "@TERMUX_PREFIX@/lib/games/moria/scores.dat"; -+ std::string save_game = "@TERMUX_PREFIX@/lib/games/game.sav"; - } ++ std::string save_game = "@TERMUX_PREFIX@/lib/games/moria/game.sav"; + } // namespace files // Game options as set on startup and with `=` set options command -CJS- diff --git a/packages/moria/ui_io.cpp.patch b/packages/moria/ui_io.cpp.patch index 4f598f6ef..a62554814 100644 --- a/packages/moria/ui_io.cpp.patch +++ b/packages/moria/ui_io.cpp.patch @@ -1,6 +1,31 @@ ---- ../ui_io.cpp.orig 2019-04-28 08:53:57.528096717 +0200 -+++ ./src/ui_io.cpp 2019-04-28 08:54:36.631428426 +0200 -@@ -633,7 +633,7 @@ +Fix error +``` +/storage/termux-build/moria/src/src/ui_io.cpp:524:19: error: cast from 'int *' to 'fd_set *' increases required alignment from 4 to 8 [-Werror,-Wcast-align] + if (select(1, (fd_set *) &smask, (fd_set *) nullptr, (fd_set *) nullptr, &tbuf) == 1) { + ^~~~~~~~~~~~~~~~~ +``` +--- ../ui_io.cpp.orig 2020-06-06 09:51:45.583712965 +0200 ++++ ./src/ui_io.cpp 2020-06-06 09:50:23.113801315 +0200 +@@ -514,14 +514,15 @@ + #else + struct timeval tbuf {}; + int ch; +- int smask; ++ fd_set readfds; ++ ++ FD_SET(1, &readfds); + + // Return true if a read on descriptor 1 will not block. + tbuf.tv_sec = 0; + tbuf.tv_usec = microseconds; + +- smask = 1; // i.e. (1 << 0) +- if (select(1, (fd_set *) &smask, (fd_set *) nullptr, (fd_set *) nullptr, &tbuf) == 1) { ++ if (select(1, &readfds, (fd_set *) nullptr, (fd_set *) nullptr, &tbuf) == 1) { + ch = getch(); + // check for EOF errors here, select sometimes works even when EOF + if (ch == -1) { +@@ -636,7 +637,7 @@ // Check user permissions on Unix based systems, // or if on Windows just return. -MRC- bool checkFilePermissions() {