moria: update to 5.7.12

This commit is contained in:
Henrik Grimler 2020-06-06 14:31:47 +02:00
parent 958cf170a2
commit 80522257ca
4 changed files with 36 additions and 12 deletions

View File

@ -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")

View File

@ -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"

View File

@ -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-

View File

@ -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() {