shithub: orca

Download patch

ref: a12cf4f8c2f10bd65579f9380ad93d964c64ce43
parent: 285e27b236e63724bcc04f16648d740e78de4f77
author: cancel <cancel@cancel.fm>
date: Sun Dec 2 05:42:00 EST 2018

Add detection of homebrew ncurses on mac

--- a/tool
+++ b/tool
@@ -230,6 +230,12 @@
       add cc_flags -D_XOPEN_SOURCE_EXTENDED=1
       out_exe=tui
       if [[ $os = mac ]]; then
+        # prefer homebrew version of ncurses if installed. Will give us better
+        # terminfo, so we can use A_DIM in Terminal.app, etc.
+        if [[ -d /usr/local/opt/ncurses ]]; then
+          add libraries -L/usr/local/opt/ncurses/lib
+          add cc_flags -I/usr/local/opt/ncurses/include
+        fi
         add libraries -lncurses
       else
         add libraries -lncursesw