summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorpooka <pooka>2007-10-27 18:26:34 +0000
committerpooka <pooka>2007-10-27 18:26:34 +0000
commit085091848308b99a8c2521f615b09c875b31c9f7 (patch)
tree46603bddb7f463227e4284a7ae79a5a6bb641052 /games
parent3201cec0217f41bb3b9eee51d9ec8b161f4b04f7 (diff)
downloadpkgsrc-085091848308b99a8c2521f615b09c875b31c9f7.tar.gz
Further improve the nethack launch script to autodetect which UIs
are installed and run an installed one instead of insisting that nethack-tty must always be installed. nethack-tty is still naturally preferred as the default instead of cheap plastic imitations such as nethack-x11.
Diffstat (limited to 'games')
-rw-r--r--games/nethack-lib/distinfo4
-rw-r--r--games/nethack-lib/patches/patch-ad26
2 files changed, 23 insertions, 7 deletions
diff --git a/games/nethack-lib/distinfo b/games/nethack-lib/distinfo
index cdb33fca762..0b4a14be88f 100644
--- a/games/nethack-lib/distinfo
+++ b/games/nethack-lib/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2007/10/27 18:07:54 pooka Exp $
+$NetBSD: distinfo,v 1.15 2007/10/27 18:26:34 pooka Exp $
SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd
RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95
@@ -6,7 +6,7 @@ Size (nethack-343-src.tgz) = 3497458 bytes
SHA1 (patch-aa) = ed5c55651acf81c459867c99026e13a6c5ed34a0
SHA1 (patch-ab) = 73a1ac287ded70f371bb38c82cdbcd36182ce3a5
SHA1 (patch-ac) = e447b4c60ef7db7cfcd35a9be8b8d2f86fc0c27b
-SHA1 (patch-ad) = bee0bd8263bac8cffa0bed84e199d0d2c2a80e9a
+SHA1 (patch-ad) = 05bb391eb0e4382c906251bc8b8627124873a7a0
SHA1 (patch-ae) = a72da6e6bd1af3a8eaed97ecc1fdd1ed4198a5db
SHA1 (patch-af) = e4723716f326df242279953b6091e528eb7e0007
SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674
diff --git a/games/nethack-lib/patches/patch-ad b/games/nethack-lib/patches/patch-ad
index 0822be83ce6..fcbca1083dd 100644
--- a/games/nethack-lib/patches/patch-ad
+++ b/games/nethack-lib/patches/patch-ad
@@ -1,18 +1,34 @@
-$NetBSD: patch-ad,v 1.6 2007/10/27 18:07:54 pooka Exp $
+$NetBSD: patch-ad,v 1.7 2007/10/27 18:26:34 pooka Exp $
---- sys/unix/nethack.sh.orig 2003-08-30 03:08:04.000000000 +0300
-+++ sys/unix/nethack.sh 2003-09-02 02:52:31.000000000 +0300
-@@ -1,9 +1,15 @@
+--- sys/unix/nethack.sh.orig 2003-12-08 00:39:13.000000000 +0100
++++ sys/unix/nethack.sh 2007-10-27 20:18:37.000000000 +0200
+@@ -1,9 +1,31 @@
#!/bin/sh
# SCCS Id: @(#)nethack.sh 3.4 1990/02/26
-HACKDIR=/usr/games/lib/nethackdir
++UILIST="tty x11 qt"
++findbin ()
++{
++ for x in $UILIST; do
++ if [ -x XXXPREFIXXXX/bin/nethack-$x ]; then
++ echo $x
++ return
++ fi
++ done
++}
++
+if [ -z "$1" -o -z "${1%%-*}" ]; then
-+ TTY=tty
++ TTY=`findbin`
+else
+ TTY=$1
+fi
+
++if [ -z "$TTY" ]; then
++ echo "No UI ($UILIST) found"
++ exit 1
++fi
++
+HACKDIR=XXXPREFIXXXX/share/nethackdir340
export HACKDIR
-HACK=$HACKDIR/nethack