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).
This commit is contained in:
		
							parent
							
								
									3d5b269b3d
								
							
						
					
					
						commit
						8278c13268
					
				| @ -41,6 +41,10 @@ flag threaded | |||||||
|     Description:   Build with support for multithreaded execution |     Description:   Build with support for multithreaded execution | ||||||
|     Default:       True |     Default:       True | ||||||
| 
 | 
 | ||||||
|  | flag curses | ||||||
|  |     Description:   On POSIX systems, enable curses support for auto-detecting terminal width. | ||||||
|  |     Default:       True | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| library | library | ||||||
|   cpp-options: -DVERSION="0.24.98" |   cpp-options: -DVERSION="0.24.98" | ||||||
| @ -102,7 +106,8 @@ library | |||||||
|                  ,wizards == 1.0.* |                  ,wizards == 1.0.* | ||||||
|   if impl(ghc >= 7.4) |   if impl(ghc >= 7.4) | ||||||
|     build-depends: pretty-show >= 1.6.4 |     build-depends: pretty-show >= 1.6.4 | ||||||
| 
 |   if !os(windows) && flag(curses) | ||||||
|  |     build-depends: terminfo | ||||||
| 
 | 
 | ||||||
| executable hledger | executable hledger | ||||||
|   main-is:        hledger-cli.hs |   main-is:        hledger-cli.hs | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user