build fixes for MacOSX:
- fix generation of sysconf when WANT_SOURCE_INSTALL=1 - use xcrun as main search for gdb - turn gdb off in most cases
This commit is contained in:
Executable → Regular
+12
-5
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
@@ -94,16 +94,23 @@ xgroup2)
|
|||||||
xeditsysconf)
|
xeditsysconf)
|
||||||
src=$2
|
src=$2
|
||||||
dest=$3
|
dest=$3
|
||||||
# we should traverse the elements of $PATH instead
|
ptg=1
|
||||||
if [ -f /usr/bin/gdb ]; then
|
# 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
|
gdbpath='GDBPATH=/usr/bin/gdb' #traditional location
|
||||||
elif [ -f /opt/local/bin/ggdb ]; then
|
elif [ -f /opt/local/bin/ggdb ]; then
|
||||||
gdbpath='GDBPATH=/opt/local/bin/ggdb' #macports gdb
|
gdbpath='GDBPATH=/opt/local/bin/ggdb' #macports gdb
|
||||||
elif [ -f /Developer/usr/bin/gdb ]; then
|
elif [ -f /Developer/usr/bin/gdb ]; then
|
||||||
# this one seems to be broken with Xcode 5.1.1 on Mountain Lion
|
# 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
|
else
|
||||||
gdbpath='#GDBPATH' #none of the above
|
gdbpath='#GDBPATH' #none of the above
|
||||||
|
ptg=0
|
||||||
fi
|
fi
|
||||||
if [ -f /bin/grep ]; then
|
if [ -f /bin/grep ]; then
|
||||||
greppath='GREPPATH=/bin/grep'
|
greppath='GREPPATH=/bin/grep'
|
||||||
@@ -116,7 +123,7 @@ xeditsysconf)
|
|||||||
if ! [ -e $dest ]; then
|
if ! [ -e $dest ]; then
|
||||||
sed -e "s:^GDBPATH=.*:$gdbpath:" \
|
sed -e "s:^GDBPATH=.*:$gdbpath:" \
|
||||||
-e "s:^GREPPATH=.*:$greppath:" \
|
-e "s:^GREPPATH=.*:$greppath:" \
|
||||||
-e 's/^PANICTRACE_GDB=[12]/PANICTRACE_GDB=0/' \
|
-e "s/^PANICTRACE_GDB=./PANICTRACE_GDB=$ptg/" \
|
||||||
-e 's/^#OPTIONS=.*/&\
|
-e 's/^#OPTIONS=.*/&\
|
||||||
OPTIONS=!use_darkgray/' \
|
OPTIONS=!use_darkgray/' \
|
||||||
$src > $dest
|
$src > $dest
|
||||||
|
|||||||
@@ -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.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
@@ -172,6 +172,7 @@ CHGRP=/usr/bin/true
|
|||||||
GAMEPERM = 0700
|
GAMEPERM = 0700
|
||||||
VARFILEPERM = 0600
|
VARFILEPERM = 0600
|
||||||
VARDIRPERM = 0700
|
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:
|
# We can use "make all" to build the whole thing - but it misses some things:
|
||||||
MOREALL=$(MAKE) install
|
MOREALL=$(MAKE) install
|
||||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||||
|
|||||||
Reference in New Issue
Block a user