Browse Source

Add nethack stub to disabled-packages

android-5
Fredrik Fornwall 9 years ago
parent
commit
f2344eab0f
  1. 15
      disabled-packages/nethack/build.sh
  2. 25
      disabled-packages/nethack/sys-unix-hints-linux.patch

15
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
}

25
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)\"
Loading…
Cancel
Save