From 9cad1fcb711f75185da7fdbd40136883a0f8ff27 Mon Sep 17 00:00:00 2001 From: Perry Fraser Date: Wed, 19 Jan 2022 11:25:54 -0500 Subject: [PATCH] Add option to link to Homebrew ncurses for macOS hints file It's probably possible to conditionally check if the directory where Homebrew curses lives exists, but that feels a bit iffy for me, and also isn't very easy to do in a Makefile. This solution is simpler, albeit a bit harder to find. --- sys/unix/hints/macOS.370 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/unix/hints/macOS.370 b/sys/unix/hints/macOS.370 index f34a2f3b3..2a2d2116c 100755 --- a/sys/unix/hints/macOS.370 +++ b/sys/unix/hints/macOS.370 @@ -117,6 +117,10 @@ CURSESLIB = -lncurses endif ifdef CURSESLIB +# Newer versions of ncurses are commonly installed via homebrew, but intentionally unlinked. +# Uncommenting the following two lines will compile nethack with it. +# LFLAGS += -L$(shell brew --prefix)/opt/ncurses/lib +# WINLIB += -I$(shell brew --prefix)/opt/ncurses/include WINLIB += $(CURSESLIB) endif @@ -136,7 +140,7 @@ WINX11LIB += -lXpm VARDATND0 += rip.xpm endif WINLIB += $(WINX11LIB) -LFLAGS=-L/opt/X11/lib +LFLAGS += -L/opt/X11/lib endif # WANT_WIN_X11 ifdef WANT_WIN_QT