forked from hasufell/hasufell-repository
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
|
From 7927399449c4e10a91329fc11239f7979cdf0496 Mon Sep 17 00:00:00 2001
|
||
|
From: Julian Ospald <hasufell@posteo.de>
|
||
|
Date: Fri, 19 Feb 2016 12:30:24 +0100
|
||
|
Subject: [PATCH 1/3] MAKE: use PKGCONFIG to get ncurses flags, if available
|
||
|
|
||
|
This fixes build failures on some distributions:
|
||
|
https://bugs.gentoo.org/show_bug.cgi?id=527034
|
||
|
|
||
|
Upstream pull-request:
|
||
|
https://github.com/crawl/crawl/pull/237
|
||
|
---
|
||
|
crawl-ref/source/Makefile | 12 ++++++------
|
||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
|
||
|
index e9c54db..3702c4c 100644
|
||
|
--- a/crawl-ref/source/Makefile
|
||
|
+++ b/crawl-ref/source/Makefile
|
||
|
@@ -1013,17 +1013,17 @@ endif
|
||
|
# Your ncurses library may include Unicode support, and you may not have a
|
||
|
# separate libncursesw; this is the case on Mac OS/Darwin.
|
||
|
ifdef LIBNCURSES_IS_UNICODE
|
||
|
-NC_LIB = ncurses
|
||
|
-NC_INCLUDE = $(NC_PREFIX)/include/ncurses
|
||
|
+NC_LIBS = $(shell $(PKGCONFIG) --libs ncurses 2>/dev/null || echo "-L$(NC_PREFIX)/lib -lncurses")
|
||
|
+NC_CFLAGS = $(shell $(PKGCONFIG) --cflags ncurses 2>/dev/null || echo "-isystem $(NC_PREFIX)/include/ncurses")
|
||
|
else
|
||
|
-NC_LIB = ncursesw
|
||
|
-NC_INCLUDE = $(NC_PREFIX)/include/ncursesw
|
||
|
+NC_LIBS = $(shell $(PKGCONFIG) --libs ncursesw || echo "-L$(NC_PREFIX)/lib -lncursesw")
|
||
|
+NC_CFLAGS = $(shell $(PKGCONFIG) --cflags ncursesw 2>/dev/null || echo "-isystem $(NC_PREFIX)/include/ncursesw")
|
||
|
endif
|
||
|
|
||
|
-INCLUDES_L += -isystem $(NC_INCLUDE)
|
||
|
+CFOTHERS_L += $(NC_CFLAGS)
|
||
|
|
||
|
ifndef TILES
|
||
|
-LIBS += -L$(NC_PREFIX)/lib -l$(NC_LIB)
|
||
|
+LIBS += $(NC_LIBS)
|
||
|
endif
|
||
|
|
||
|
endif
|
||
|
--
|
||
|
2.7.1
|
||
|
|