diff --git a/sys/unix/hints/macosx.sh b/sys/unix/hints/macosx.sh old mode 100755 new mode 100644 index df71033b8..2bf2360d9 --- a/sys/unix/hints/macosx.sh +++ b/sys/unix/hints/macosx.sh @@ -1,5 +1,5 @@ #!/bin/sh -# NetHack 3.6 macosx.sh $NHDT-Date: 1455930387 2016/02/20 01:06:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.16 $ +# NetHack 3.6 macosx.sh $NHDT-Date: 1515549543 2018/01/10 01:59:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.18 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # @@ -94,16 +94,23 @@ xgroup2) xeditsysconf) src=$2 dest=$3 - # we should traverse the elements of $PATH instead - if [ -f /usr/bin/gdb ]; then + ptg=1 + # We don't need an LLDB module because any MacOSX new enough to + # have no Apple supported gdb is also new enough to get good + # stack traces through libc. + # NB: xcrun will check $PATH + if [[ -x /usr/bin/xcrun && `/usr/bin/xcrun -f gdb 2>/dev/null` ]] ; then + gdbpath="GDBPATH="`/usr/bin/xcrun -f gdb` + elif [ -f /usr/bin/gdb ]; then gdbpath='GDBPATH=/usr/bin/gdb' #traditional location elif [ -f /opt/local/bin/ggdb ]; then gdbpath='GDBPATH=/opt/local/bin/ggdb' #macports gdb elif [ -f /Developer/usr/bin/gdb ]; then # this one seems to be broken with Xcode 5.1.1 on Mountain Lion - gdbpath='GDBPATH=/Developer/usr/bin/gdb' #recent Xcode tools + gdbpath='GDBPATH=/Developer/usr/bin/gdb' #older Xcode tools else gdbpath='#GDBPATH' #none of the above + ptg=0 fi if [ -f /bin/grep ]; then greppath='GREPPATH=/bin/grep' @@ -116,7 +123,7 @@ xeditsysconf) if ! [ -e $dest ]; then sed -e "s:^GDBPATH=.*:$gdbpath:" \ -e "s:^GREPPATH=.*:$greppath:" \ - -e 's/^PANICTRACE_GDB=[12]/PANICTRACE_GDB=0/' \ + -e "s/^PANICTRACE_GDB=./PANICTRACE_GDB=$ptg/" \ -e 's/^#OPTIONS=.*/&\ OPTIONS=!use_darkgray/' \ $src > $dest diff --git a/sys/unix/hints/macosx10.10 b/sys/unix/hints/macosx10.10 index 19737f0c1..f320e25fb 100644 --- a/sys/unix/hints/macosx10.10 +++ b/sys/unix/hints/macosx10.10 @@ -1,5 +1,5 @@ # -# NetHack 3.6 macosx10.11 $NHDT-Date: 1445622451 2015/10/23 17:47:31 $ $NHDT-Branch: master $:$NHDT-Revision: 1.0 $ +# NetHack 3.6 macosx10.11 $NHDT-Date: 1515549543 2018/01/10 01:59:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.48 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. # NetHack may be freely redistributed. See license for details. # @@ -172,6 +172,7 @@ CHGRP=/usr/bin/true GAMEPERM = 0700 VARFILEPERM = 0600 VARDIRPERM = 0700 +POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf; # We can use "make all" to build the whole thing - but it misses some things: MOREALL=$(MAKE) install CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE