From f2344eab0f6a1a19f9d4be8a58252fedeea1cb2d Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 27 May 2016 01:54:46 -0400 Subject: [PATCH] Add nethack stub to disabled-packages --- disabled-packages/nethack/build.sh | 15 +++++++++++ .../nethack/sys-unix-hints-linux.patch | 25 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 disabled-packages/nethack/build.sh create mode 100644 disabled-packages/nethack/sys-unix-hints-linux.patch diff --git a/disabled-packages/nethack/build.sh b/disabled-packages/nethack/build.sh new file mode 100644 index 000000000..fdfd910b6 --- /dev/null +++ b/disabled-packages/nethack/build.sh @@ -0,0 +1,15 @@ +TERMUX_PKG_HOMEPAGE=http://www.nethack.org/ +TERMUX_PKG_DESCRIPTION="Dungeon crawl game" +TERMUX_PKG_VERSION=3.6.0 +TERMUX_PKG_SRCURL=https://s3.amazonaws.com/altorg/nethack/nethack-360-src.tgz +TERMUX_PKG_FOLDERNAME=nethack-3.6.0 +TERMUX_PKG_BUILD_IN_SRC=yes +TERMUX_PKG_DEPENDS="ncurses" + +termux_step_make_install () { + cd $TERMUX_PKG_SRCDIR/sys/unix + sh setup.sh hints/linux + + cd $TERMUX_PKG_SRCDIR + make install +} diff --git a/disabled-packages/nethack/sys-unix-hints-linux.patch b/disabled-packages/nethack/sys-unix-hints-linux.patch new file mode 100644 index 000000000..9b5492538 --- /dev/null +++ b/disabled-packages/nethack/sys-unix-hints-linux.patch @@ -0,0 +1,25 @@ +diff -u -r ../nethack-3.6.0/sys/unix/hints/linux ./sys/unix/hints/linux +--- ../nethack-3.6.0/sys/unix/hints/linux 2015-11-16 07:47:05.000000000 -0500 ++++ ./sys/unix/hints/linux 2016-05-21 20:41:10.277016227 -0400 +@@ -10,9 +10,9 @@ + + + #PREFIX=/usr +-PREFIX=$(wildcard ~)/nh/install +-HACKDIR=$(PREFIX)/games/lib/$(GAME)dir +-SHELLDIR = $(PREFIX)/games ++PREFIX=@TERMUX_PREFIX@ ++HACKDIR=$(PREFIX)/share/$(GAME) ++#SHELLDIR = $(PREFIX)/games + INSTDIR=$(HACKDIR) + VARDIR = $(HACKDIR) + +@@ -21,7 +21,7 @@ + POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf; + + CFLAGS=-g -O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB +-CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" ++CFLAGS1=-DCOMPRESS=\"@TERMUX_PREFIX@/bin/applets/gzip\" -DCOMPRESS_EXTENSION=\".gz\" + CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE + CFLAGS+=-DHACKDIR=\"$(HACKDIR)\" +