new package: nethack
This commit is contained in:
parent
eb8750196d
commit
bb3aadd402
34
packages/nethack/build.sh
Normal file
34
packages/nethack/build.sh
Normal file
@ -0,0 +1,34 @@
|
||||
# TODO: move to game-packages repo
|
||||
TERMUX_PKG_HOMEPAGE=http://www.nethack.org/
|
||||
TERMUX_PKG_DESCRIPTION="Dungeon crawl game"
|
||||
TERMUX_PKG_LICENSE="Nethack"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
||||
TERMUX_PKG_VERSION=3.6.1
|
||||
TERMUX_PKG_SRCURL=http://www.nethack.org/download/3.6.1/nethack-361-src.tgz
|
||||
TERMUX_PKG_SHA256=4b8cbf1cc3ad9f6b9bae892d44a9c63106d44782a210906162a7c3be65040ab6
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
||||
termux_step_make_install() {
|
||||
cd $TERMUX_PKG_SRCDIR/sys/unix
|
||||
sh setup.sh hints/linux
|
||||
CFLAGS="$CPPFLAGS $CFLAGS $LDFLAGS"
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
cd util
|
||||
CFLAGS="" CC="gcc" LD="ld" make makedefs
|
||||
cp makedefs makedefs.host
|
||||
CFLAGS="" CC="gcc" LD="ld" make lev_comp
|
||||
cp lev_comp lev_comp.host
|
||||
CFLAGS="" CC="gcc" LD="ld" make dgn_comp dlb recover
|
||||
cp dgn_comp dgn_comp.host
|
||||
cp dlb dlb.host
|
||||
cd ../
|
||||
make clean
|
||||
make WINTTYLIB="$LDFLAGS -lcurses" -j $TERMUX_MAKE_PROCESSES
|
||||
make install
|
||||
#mkdir -p $TERMUX_PREFIX/share/man/man6
|
||||
cd doc # zsh
|
||||
mkdir -p $TERMUX_PREFIX/share/man/man6
|
||||
cp nethack.6 $TERMUX_PREFIX/share/man/man6/
|
||||
ln -sf $TERMUX_PREFIX/games/nethack $TERMUX_PREFIX/bin/
|
||||
}
|
23
packages/nethack/sys-unix-hints-linux.patch
Normal file
23
packages/nethack/sys-unix-hints-linux.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- ../cache/nethack-3.6.1/sys/unix/hints/linux 2018-04-01 10:10:21.000000000 +0000
|
||||
+++ ./sys/unix/hints/linux 2018-07-13 01:03:12.297078180 +0000
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
|
||||
#PREFIX=/usr
|
||||
-PREFIX=$(wildcard ~)/nh/install
|
||||
+#PREFIX=$(wildcard ~)/nh/install
|
||||
+PREFIX=@TERMUX_PREFIX@
|
||||
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
||||
SHELLDIR = $(PREFIX)/games
|
||||
INSTDIR=$(HACKDIR)
|
||||
@@ -20,8 +21,8 @@
|
||||
|
||||
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 -DDLB
|
||||
-CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
+CFLAGS+= -g -O -I../include -DNOTPARMDECL -DDLB
|
||||
+CFLAGS+=-DCOMPRESS=\"@TERMUX_PREFIX@/bin/applets/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
CFLAGS+=-DTIMED_DELAY
|
||||
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
106
packages/nethack/sys-unix-makefile.dat.patch
Normal file
106
packages/nethack/sys-unix-makefile.dat.patch
Normal file
@ -0,0 +1,106 @@
|
||||
--- ../cache/nethack-3.6.1/sys/unix/Makefile.dat 2018-04-27 12:07:22.000000000 +0000
|
||||
+++ ./sys/unix/Makefile.dat 2018-07-13 00:08:30.165089686 +0000
|
||||
@@ -101,69 +101,69 @@
|
||||
|
||||
|
||||
data: data.base ../util/makedefs
|
||||
- ../util/makedefs -d
|
||||
+ ../util/makedefs.host -d
|
||||
|
||||
rumors: rumors.tru rumors.fal ../util/makedefs
|
||||
- ../util/makedefs -r
|
||||
+ ../util/makedefs.host -r
|
||||
|
||||
quest.dat: quest.txt ../util/makedefs
|
||||
- ../util/makedefs -q
|
||||
+ ../util/makedefs.host -q
|
||||
|
||||
oracles: oracles.txt ../util/makedefs
|
||||
- ../util/makedefs -h
|
||||
+ ../util/makedefs.host -h
|
||||
|
||||
engrave: engrave.txt ../util/makedefs
|
||||
- ../util/makedefs -s
|
||||
+ ../util/makedefs.host -s
|
||||
|
||||
epitaph: epitaph.txt ../util/makedefs
|
||||
- ../util/makedefs -s
|
||||
+ ../util/makedefs.host -s
|
||||
|
||||
bogusmon: bogusmon.txt ../util/makedefs
|
||||
- ../util/makedefs -s
|
||||
+ ../util/makedefs.host -s
|
||||
|
||||
# note: 'options' should have already been made when include/date.h was created
|
||||
options: ../util/makedefs
|
||||
- ../util/makedefs -v
|
||||
+ ../util/makedefs.host -v
|
||||
|
||||
|
||||
spec_levs: ../util/lev_comp \
|
||||
bigroom.des castle.des endgame.des gehennom.des knox.des medusa.des \
|
||||
mines.des oracle.des sokoban.des tower.des yendor.des
|
||||
- ../util/lev_comp bigroom.des
|
||||
- ../util/lev_comp castle.des
|
||||
- ../util/lev_comp endgame.des
|
||||
- ../util/lev_comp gehennom.des
|
||||
- ../util/lev_comp knox.des
|
||||
- ../util/lev_comp medusa.des
|
||||
- ../util/lev_comp mines.des
|
||||
- ../util/lev_comp oracle.des
|
||||
- ../util/lev_comp sokoban.des
|
||||
- ../util/lev_comp tower.des
|
||||
- ../util/lev_comp yendor.des
|
||||
+ ../util/lev_comp.host bigroom.des
|
||||
+ ../util/lev_comp.host castle.des
|
||||
+ ../util/lev_comp.host endgame.des
|
||||
+ ../util/lev_comp.host gehennom.des
|
||||
+ ../util/lev_comp.host knox.des
|
||||
+ ../util/lev_comp.host medusa.des
|
||||
+ ../util/lev_comp.host mines.des
|
||||
+ ../util/lev_comp.host oracle.des
|
||||
+ ../util/lev_comp.host sokoban.des
|
||||
+ ../util/lev_comp.host tower.des
|
||||
+ ../util/lev_comp.host yendor.des
|
||||
touch spec_levs
|
||||
|
||||
quest_levs: ../util/lev_comp \
|
||||
Arch.des Barb.des Caveman.des Healer.des Knight.des Monk.des \
|
||||
Priest.des Ranger.des Rogue.des Samurai.des Tourist.des Valkyrie.des \
|
||||
Wizard.des
|
||||
- ../util/lev_comp Arch.des
|
||||
- ../util/lev_comp Barb.des
|
||||
- ../util/lev_comp Caveman.des
|
||||
- ../util/lev_comp Healer.des
|
||||
- ../util/lev_comp Knight.des
|
||||
- ../util/lev_comp Monk.des
|
||||
- ../util/lev_comp Priest.des
|
||||
- ../util/lev_comp Ranger.des
|
||||
- ../util/lev_comp Rogue.des
|
||||
- ../util/lev_comp Samurai.des
|
||||
- ../util/lev_comp Tourist.des
|
||||
- ../util/lev_comp Valkyrie.des
|
||||
- ../util/lev_comp Wizard.des
|
||||
+ ../util/lev_comp.host Arch.des
|
||||
+ ../util/lev_comp.host Barb.des
|
||||
+ ../util/lev_comp.host Caveman.des
|
||||
+ ../util/lev_comp.host Healer.des
|
||||
+ ../util/lev_comp.host Knight.des
|
||||
+ ../util/lev_comp.host Monk.des
|
||||
+ ../util/lev_comp.host Priest.des
|
||||
+ ../util/lev_comp.host Ranger.des
|
||||
+ ../util/lev_comp.host Rogue.des
|
||||
+ ../util/lev_comp.host Samurai.des
|
||||
+ ../util/lev_comp.host Tourist.des
|
||||
+ ../util/lev_comp.host Valkyrie.des
|
||||
+ ../util/lev_comp.host Wizard.des
|
||||
touch quest_levs
|
||||
|
||||
dungeon: dungeon.def ../util/makedefs ../util/dgn_comp
|
||||
- ../util/makedefs -e
|
||||
- ../util/dgn_comp dungeon.pdf
|
||||
+ ../util/makedefs.host -e
|
||||
+ ../util/dgn_comp.host dungeon.pdf
|
||||
|
||||
spotless:
|
||||
-rm -f spec_levs quest_levs *.lev $(VARDAT) dungeon dungeon.pdf
|
11
packages/nethack/sys-unix-makefile.doc.patch
Normal file
11
packages/nethack/sys-unix-makefile.doc.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../cache/nethack-3.6.1/sys/unix/Makefile.doc 2018-04-27 12:07:22.000000000 +0000
|
||||
+++ ./sys/unix/Makefile.doc 2018-07-13 00:54:14.687704597 +0000
|
||||
@@ -9,7 +9,7 @@
|
||||
# for Atari
|
||||
# SHELL=E:/GEMINI2/MUPFEL.TTP
|
||||
|
||||
-MAKEDEFS = ../util/makedefs
|
||||
+MAKEDEFS = ../util/makedefs.host
|
||||
|
||||
# Which version do we want to build? (XXX These are not used anywhere.)
|
||||
GUIDEBOOK = Guidebook # regular ASCII file
|
11
packages/nethack/sys-unix-makefile.top.patch
Normal file
11
packages/nethack/sys-unix-makefile.top.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../cache/nethack-3.6.1/sys/unix/Makefile.top 2018-04-27 12:07:22.000000000 +0000
|
||||
+++ ./sys/unix/Makefile.top 2018-07-13 00:33:08.389609949 +0000
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
dlb:
|
||||
( cd util ; $(MAKE) dlb )
|
||||
- ( cd dat ; LC_ALL=C ; ../util/dlb cf nhdat $(DATDLB) )
|
||||
+ ( cd dat ; LC_ALL=C ; ../util/dlb.host cf nhdat $(DATDLB) )
|
||||
|
||||
# recover can be used when INSURANCE is defined in include/config.h
|
||||
# and the checkpoint option is true
|
20
packages/nethack/sys-unix-makefile.utl.patch
Normal file
20
packages/nethack/sys-unix-makefile.utl.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- ../cache/nethack-3.6.1/sys/unix/Makefile.utl 2018-04-27 12:07:22.000000000 +0000
|
||||
+++ ./sys/unix/Makefile.utl 2018-07-13 00:27:10.023279049 +0000
|
||||
@@ -223,13 +223,13 @@
|
||||
perl mdgrep.pl
|
||||
|
||||
../include/onames.h: makedefs
|
||||
- ./makedefs -o
|
||||
+ ./makedefs.host -o
|
||||
../include/pm.h: makedefs
|
||||
- ./makedefs -p
|
||||
+ ./makedefs.host -p
|
||||
../src/monstr.c: makedefs
|
||||
- ./makedefs -m
|
||||
+ ./makedefs.host -m
|
||||
../include/vis_tab.h: makedefs
|
||||
- ./makedefs -z
|
||||
+ ./makedefs.host -z
|
||||
# makedefs -z makes both vis_tab.h and vis_tab.c, but writes the .h first
|
||||
../src/vis_tab.c: ../include/vis_tab.h
|
||||
|
11
packages/nethack/sys-unix-mnakefile.src.patch
Normal file
11
packages/nethack/sys-unix-mnakefile.src.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../cache/nethack-3.6.1/sys/unix/Makefile.src 2018-04-27 12:07:22.000000000 +0000
|
||||
+++ ./sys/unix/Makefile.src 2018-07-13 00:19:45.994451653 +0000
|
||||
@@ -623,7 +623,7 @@
|
||||
# up to date before being executed
|
||||
../include/date.h: $(VERSOURCES) $(HACK_H)
|
||||
-$(SHELL) ../sys/unix/gitinfo.sh $(GITINFO) #before 'makedefs -v'
|
||||
- ../util/makedefs -v
|
||||
+ ../util/makedefs.host -v
|
||||
|
||||
|
||||
lint:
|
Loading…
x
Reference in New Issue
Block a user