From 52dd839d3a45d5ec0c13f6ede6929bc02b29571b Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Mon, 11 Mar 2019 12:03:32 +0100 Subject: [PATCH] moria: update to 5.7.10 and update homepage and url --- packages/moria/CMakeLists.txt.patch | 11 ++++ packages/moria/build.sh | 20 ++----- packages/moria/source-config.h.patch | 45 -------------- packages/moria/source-death.c.patch | 16 ----- packages/moria/source-signals.c.patch | 22 ------- packages/moria/unix-Makefile.patch | 85 --------------------------- packages/moria/unix-unix.c.patch | 24 -------- 7 files changed, 17 insertions(+), 206 deletions(-) create mode 100644 packages/moria/CMakeLists.txt.patch delete mode 100644 packages/moria/source-config.h.patch delete mode 100644 packages/moria/source-death.c.patch delete mode 100644 packages/moria/source-signals.c.patch delete mode 100644 packages/moria/unix-Makefile.patch delete mode 100644 packages/moria/unix-unix.c.patch diff --git a/packages/moria/CMakeLists.txt.patch b/packages/moria/CMakeLists.txt.patch new file mode 100644 index 000000000..3f7136de6 --- /dev/null +++ b/packages/moria/CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- ../CMakeLists.txt.orig 2019-04-20 20:35:53.547906398 +0000 ++++ ./CMakeLists.txt 2019-04-20 21:28:56.287810505 +0000 +@@ -162,7 +162,7 @@ + file(MAKE_DIRECTORY ${build_dir}) + file(MAKE_DIRECTORY ${data_dir}) + +-set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}) ++# set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}) + set(EXECUTABLE_OUTPUT_PATH ${build_dir}) + set(RUNTIME_OUTPUT_DIRECTORY ${build_dir}) + diff --git a/packages/moria/build.sh b/packages/moria/build.sh index f100a8ab1..63347c141 100644 --- a/packages/moria/build.sh +++ b/packages/moria/build.sh @@ -1,24 +1,16 @@ -TERMUX_PKG_HOMEPAGE=http://remarque.org/~grabiner/moria.html +TERMUX_PKG_HOMEPAGE=https://umoria.org TERMUX_PKG_DESCRIPTION="Rogue-like game with an infinite dungeon" -TERMUX_PKG_LICENSE="GPL-3.0" -TERMUX_PKG_VERSION=5.6 +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_VERSION=5.7.10 TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli" -# This seems to be a pretty good mirror -TERMUX_PKG_SRCURL=https://github.com/HunterZ/umoria/archive/${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=1ee52ec001539945139b2960e8441f490d2b7f5fe6dce5a070686a178515d182 +TERMUX_PKG_SRCURL=https://github.com/dungeons-of-moria/umoria/archive/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=a43b695d42692245208e9fca4c89976c24947ea7931caa80f79e7f051305b512 TERMUX_PKG_DEPENDS="ncurses" TERMUX_PKG_BUILD_IN_SRC=yes -termux_step_pre_configure() { - ln -s $TERMUX_PKG_SRCDIR/source/* $TERMUX_PKG_SRCDIR/ - ln -s $TERMUX_PKG_SRCDIR/unix/* $TERMUX_PKG_SRCDIR/ - mkdir -p $TERMUX_PREFIX/share/man/man6/ - cp $TERMUX_PKG_SRCDIR/doc/moria.man $TERMUX_PREFIX/share/man/man6/moria.6 -} -termux_step_create_debscripts () { +termux_step_create_debscripts() { # Create scores file in a debscript, so an update to the package wouldn't erease any scores echo "mkdir -p $TERMUX_PREFIX/var/games/moria/" > postinst echo "touch $TERMUX_PREFIX/var/games/moria/scores" >> postinst chmod 0755 postinst - } diff --git a/packages/moria/source-config.h.patch b/packages/moria/source-config.h.patch deleted file mode 100644 index e7a2889ca..000000000 --- a/packages/moria/source-config.h.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/source/config.h b/source/config.h -index bd64c8f..b0b7911 100644 ---- a/source/config.h -+++ b/source/config.h -@@ -41,7 +41,7 @@ some of the system defines set up here. - - /* If compiling on Debian (also works on other versions of Linux), - define this. */ --#define DEBIAN_LINUX -+//#define DEBIAN_LINUX - - /* If you are compiling on an ultrix/4.2BSD/Dynix/etc. version of UNIX, - define this. It is not needed for SUNs. */ -@@ -221,20 +221,20 @@ some of the system defines set up here. - - #else - --#if 0 -+#if 1 - /* Debian standards for file location */ - /* This must be unix; change file names as appropriate. */ - #define MORIA_SAV ".moria-save" --#define MORIA_HOU "/etc/moria-hours" --#define MORIA_MOR "/usr/lib/games/moria/news" --#define MORIA_GPL "/usr/lib/games/moria/COPYING" --#define MORIA_TOP "/var/games/moria/scores" --#define MORIA_HELP "/usr/lib/games/moria/roglcmds.hlp" --#define MORIA_ORIG_HELP "/usr/lib/games/moria/origcmds.hlp" --#define MORIA_WIZ_HELP "/usr/lib/games/moria/rwizcmds.hlp" --#define MORIA_OWIZ_HELP "/usr/lib/games/moria/owizcmds.hlp" --#define MORIA_WELCOME "/usr/lib/games/moria/welcome.hlp" --#define MORIA_VER "/usr/lib/games/moria/version.hlp" -+#define MORIA_HOU "@TERMUX_PREFIX@/etc/moria-hours" -+#define MORIA_MOR "@TERMUX_PREFIX@/lib/games/moria/news" -+#define MORIA_GPL "@TERMUX_PREFIX@lib/games/moria/COPYING" -+#define MORIA_TOP "@TERMUX_PREFIX@/var/games/moria/scores" -+#define MORIA_HELP "@TERMUX_PREFIX@/lib/games/moria/roglcmds.hlp" -+#define MORIA_ORIG_HELP "@TERMUX_PREFIX@/lib/games/moria/origcmds.hlp" -+#define MORIA_WIZ_HELP "@TERMUX_PREFIX@/lib/games/moria/rwizcmds.hlp" -+#define MORIA_OWIZ_HELP "@TERMUX_PREFIX@/lib/games/moria/owizcmds.hlp" -+#define MORIA_WELCOME "@TERMUX_PREFIX@/lib/games/moria/welcome.hlp" -+#define MORIA_VER "@TERMUX_PREFIX@/lib/games/moria/version.hlp" - - #else - diff --git a/packages/moria/source-death.c.patch b/packages/moria/source-death.c.patch deleted file mode 100644 index ee2d9f0b5..000000000 --- a/packages/moria/source-death.c.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/source/death.c b/source/death.c -index 87102eb..e5c951b 100644 ---- a/source/death.c -+++ b/source/death.c -@@ -214,9 +214,9 @@ int f, l; - sbuf.st_ino); - #else - #ifdef __linux__ -- (void) sprintf (lockname, "/tmp/moria.%ld", sbuf.st_ino); -+ (void) sprintf (lockname, "@TERMUX_PREFIX@/tmp/moria.%ld", sbuf.st_ino); - #else -- (void) sprintf (lockname, "/tmp/moria.%d", sbuf.st_ino); -+ (void) sprintf (lockname, "@TERMUX_PREFIX@/tmp/moria.%d", sbuf.st_ino); - #endif - #endif - if (l & LOCK_UN) diff --git a/packages/moria/source-signals.c.patch b/packages/moria/source-signals.c.patch deleted file mode 100644 index 41b351d85..000000000 --- a/packages/moria/source-signals.c.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/source/signals.c b/source/signals.c -index 0deddde..4124b2e 100644 ---- a/source/signals.c -+++ b/source/signals.c -@@ -136,7 +136,7 @@ int sig; - { - if(++signal_count > 10) /* Be safe. We will die if persistent enough. */ - (void) MSIGNAL(sig, SIG_DFL); -- return; -+ return 0; - } - error_sig = sig; - -@@ -167,7 +167,7 @@ int sig; - if (wait_for_more) - put_buffer(" -more-", MSG_LINE, 0); - put_qio(); -- return; /* OK. We don't quit. */ -+ return 0; /* OK. We don't quit. */ - } - (void) strcpy(died_from, "Interrupting"); - } diff --git a/packages/moria/unix-Makefile.patch b/packages/moria/unix-Makefile.patch deleted file mode 100644 index abfa1c23f..000000000 --- a/packages/moria/unix-Makefile.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/unix/Makefile b/unix/Makefile -index e65338f..e169edf 100644 ---- a/unix/Makefile -+++ b/unix/Makefile -@@ -1,5 +1,5 @@ - # Edited for Debian GNU/Linux. --DESTDIR = -+DESTDIR = @TERMUX_PREFIX@ - - # DEBIAN NOTE: This file diverges significantly from the original Makefile - # for obvious reasons. The original Makefile is Makefile.unix and should -@@ -16,9 +16,9 @@ DESTDIR = - # Edited for Debian GNU/Linux: LIBVARDIR is where the score file is kept - # OWNER is who you want the game to be chown to. - # GROUP is who you wnat the game to be chgrp to. --BINDIR = $(DESTDIR)/usr/games -+BINDIR = $(DESTDIR)/bin - ETCDIR = $(DESTDIR)/etc --LIBSTATICDIR = $(DESTDIR)/usr/lib/games/moria -+LIBSTATICDIR = $(DESTDIR)/lib/games/moria - LIBVARDIR = $(DESTDIR)/var/games/moria - OWNER = root - GROUP = games -@@ -26,7 +26,7 @@ GROUP = games - # For testing and debugging the program, it is best to use this line. - # CFLAGS = -g - # For playing the game, you may want to use this line --CFLAGS = -O2 -+CFLAGS += -O2 - - # Debian GNU/Linux addition - ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) -@@ -36,7 +36,7 @@ endif - # For BSD Systems - # CURSES = -lcurses -ltermcap - # For SYS V Systems --CURSES = -lcurses -+CURSES = -lncurses - # For XENIX, some XENIX systems may need -ltinfo - # CURSES = -ltcap -ltermcap -lx - -@@ -44,9 +44,9 @@ CURSES = -lcurses - # config.h if you use this. - #LFLAGS = -lbsd - # Normal systems don't require anything here. --LFLAGS = -+LFLAGS ?= - --CC = cc -+CC ?= cc - - SRCS = main.c misc1.c misc2.c misc3.c misc4.c store1.c files.c io.c \ - create.c desc.c generate.c sets.c dungeon.c creature.c death.c \ -@@ -66,7 +66,7 @@ LIBSTATICFILES = news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \ - version.hlp welcome.hlp - - moria : $(OBJS) -- $(CC) -o moria $(CFLAGS) $(OBJS) $(CURSES) $(LFLAGS) -+ $(CC) -o moria $(CFLAGS) $(LDFLAGS) $(OBJS) $(CURSES) $(LFLAGS) - - lintout : $(SRCS) - lint $(SRCS) $(CURSES) > lintout -@@ -80,21 +80,16 @@ TAGS : $(SRCS) - # you must define BINDIR and LIBDIR before installing - # assumes that BINDIR and LIBDIR exist - install: -- chmod 755 $(BINDIR) - cp moria $(BINDIR) -- chown $(OWNER) $(BINDIR)/moria -- chgrp $(GROUP) $(BINDIR)/moria - chmod 2755 $(BINDIR)/moria -+ mkdir -p $(LIBSTATICDIR) - chmod 755 $(LIBSTATICDIR) - # No longer chmod 755 $(LIBVARDIR) - (cd files; cp $(LIBSTATICFILES) $(LIBSTATICDIR)) -- (cd $(LIBSTATICDIR); chmod 444 $(LIBSTATICFILES)) - # No longer (cd $(LIBVARDIR); touch scores; chmod 664 scores) - # No longer (cd $(LIBVARDIR); chown $(OWNER) . scores; chgrp $(GROUP) . scores) - (cd files; cp hours $(ETCDIR)/moria-hours) - chmod 644 $(ETCDIR)/moria-hours -- (cd $(LIBSTATICDIR); chown $(OWNER) $(LIBSTATICFILES)) -- (cd $(LIBSTATICDIR); chgrp $(GROUP) $(LIBSTATICFILES)) - # If you are short on disk space, or aren't interested in debugging moria. - # This is handled by dh_strip, so let's not override its' decision. - # strip $(BINDIR)/moria diff --git a/packages/moria/unix-unix.c.patch b/packages/moria/unix-unix.c.patch deleted file mode 100644 index 7ad92302f..000000000 --- a/packages/moria/unix-unix.c.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/unix/unix.c b/unix/unix.c -index 81d543c..af4a672 100644 ---- a/unix/unix.c -+++ b/unix/unix.c -@@ -271,19 +271,6 @@ char *p; - } - #endif - --#ifndef DEBIAN_LINUX --#ifdef USG --unsigned short getuid(); --#else --#ifndef SECURE --#ifdef BSD4_3 --uid_t getuid(); --#else /* other BSD versions */ --int getuid(); --#endif --#endif --#endif --#endif - - /* Find a default user name from the system. */ - void user_name(buf)