From 8278c1326882a7498400d1edfaba3ec0130e0c91 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 19 Jan 2015 13:29:41 -0800 Subject: [PATCH] cli: on POSIX systems, use terminfo (and curses) When building hledger on a non-windows system, and the new "curses" cabal flag is true (as it is by default), include the terminfo package. This will be useful for detecting terminal width and perhaps other things. Installation on posix is slightly harder now, since it will need the C curses dev libraries. The curses flag lets posix users skip that requirement by adding -f-curses (or cabal might even do that automatically). --- hledger/hledger.cabal | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index 0804d2d67..a15595d73 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -41,6 +41,10 @@ flag threaded Description: Build with support for multithreaded execution Default: True +flag curses + Description: On POSIX systems, enable curses support for auto-detecting terminal width. + Default: True + library cpp-options: -DVERSION="0.24.98" @@ -102,7 +106,8 @@ library ,wizards == 1.0.* if impl(ghc >= 7.4) build-depends: pretty-show >= 1.6.4 - + if !os(windows) && flag(curses) + build-depends: terminfo executable hledger main-is: hledger-cli.hs