From fc74215e15a5b7499b4d52b569b28e6f6ad78693 Mon Sep 17 00:00:00 2001 From: David Griffith Date: Fri, 13 Sep 2019 03:52:52 +0000 Subject: [PATCH] Keep NetBSD from mistakenly using curses.h in /usr/pkg/include/ncurses?. If /usr/pkg/include/ncurses and/or /usr/pkg/include/ncursesw are passed as arguments to the -I flag, the build process gets confused and will abort with complaints about acs_map being undefined. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a208962..be608bf 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,9 @@ ifneq ($(OS),Windows_NT) MACOS = yes endif ifeq ($(UNAME_S),NetBSD) + NETBSD = yes CFLAGS += -D_NETBSD_SOURCE -I/usr/pkg/include LDFLAGS += -Wl,-R/usr/pkg/lib -L/usr/pkg/lib - CURSES_CFLAGS += -I/usr/pkg/include/ncurses -I/usr/pkg/include/ncursesw SDL_LDFLAGS += -lexecinfo endif ifeq ($(UNAME_S),FreeBSD) @@ -178,6 +178,9 @@ else ifneq ($(findstring ncurses,$(CURSES)),) CURSES_LDFLAGS += $(or $(shell $(PKG_CONFIG) $(CURSES) --libs 2>/dev/null),-l$(CURSES)) CURSES_CFLAGS += $(or $(shell $(PKG_CONFIG) $(CURSES) --cflags 2>/dev/null),-D_XOPEN_SOURCE_EXTENDED) CURSES_DEFINE = USE_NCURSES_H +ifdef NETBSD + CURSES_CFLAGS += -I/usr/pkg/include/ncurses -I/usr/pkg/include/ncursesw +endif endif ifeq ($(SOUND), ao) -- 2.34.1