From 4c53ab419bea1bb53e83769a36377f0a0e8f5749 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 1 May 2024 13:44:10 -1000 Subject: [PATCH] cabal: update cabal files --- hledger-ui/hledger-ui.cabal | 14 ++++++++++++++ hledger-web/hledger-web.cabal | 18 ++++++++++++++++++ hledger/hledger.cabal | 23 ++++++++++++++++++++++- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/hledger-ui/hledger-ui.cabal b/hledger-ui/hledger-ui.cabal index 8d2d78774..dd3722070 100644 --- a/hledger-ui/hledger-ui.cabal +++ b/hledger-ui/hledger-ui.cabal @@ -39,6 +39,11 @@ source-repository head type: git location: https://github.com/simonmichael/hledger +flag ghcdebug + description: Build with support for attaching a ghc-debug client + manual: True + default: False + flag threaded description: Build with support for multithreaded execution manual: False @@ -82,6 +87,7 @@ library , extra >=1.6.3 , filepath , fsnotify ==0.4.* + , githash >=0.1.6.2 , hledger >=1.33.99 && <1.34 , hledger-lib >=1.33.99 && <1.34 , megaparsec >=7.0.0 && <9.7 @@ -99,6 +105,10 @@ library , vty >=6.1 && <6.3 , vty-crossplatform >=0.4.0.0 && <0.5.0.0 default-language: Haskell2010 + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 if os(windows) build-depends: vty-windows >=0.2.0.1 && <0.3.0.0 @@ -118,5 +128,9 @@ executable hledger-ui base >=4.14 && <4.20 , hledger-ui default-language: Haskell2010 + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 if flag(threaded) ghc-options: -threaded -with-rtsopts=-T diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index 7aac768e5..9b47ac3c8 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -117,6 +117,11 @@ flag dev manual: False default: False +flag ghcdebug + description: Build with support for attaching a ghc-debug client + manual: True + default: False + flag library-only description: Build for use with "yesod devel" manual: False @@ -170,6 +175,7 @@ library , directory >=1.2.3.0 , extra >=1.6.3 , filepath + , githash >=0.1.6.2 , hjsmin , hledger >=1.33.99 && <1.34 , hledger-lib >=1.33.99 && <1.34 @@ -205,6 +211,10 @@ library cpp-options: -DDEVELOPMENT if flag(dev) ghc-options: -O0 + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 executable hledger-web main-is: main.hs @@ -222,6 +232,10 @@ executable hledger-web cpp-options: -DDEVELOPMENT if flag(dev) ghc-options: -O0 + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 if flag(library-only) buildable: False if flag(threaded) @@ -242,3 +256,7 @@ test-suite test cpp-options: -DDEVELOPMENT if flag(dev) ghc-options: -O0 + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index 391b81ed5..a868d7884 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -84,8 +84,13 @@ source-repository head type: git location: https://github.com/simonmichael/hledger +flag ghcdebug + description: Build with support for attaching a ghc-debug client + manual: True + default: False + flag terminfo - description: On POSIX systems, build with the terminfo lib for detecting terminal width. + description: On POSIX systems, build with the terminfo lib for detecting terminal width manual: False default: True @@ -180,6 +185,10 @@ library if (!(os(windows))) && (flag(terminfo)) build-depends: terminfo + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 executable hledger main-is: hledger-cli.hs @@ -230,6 +239,10 @@ executable hledger if (!(os(windows))) && (flag(terminfo)) build-depends: terminfo + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 if flag(threaded) ghc-options: -threaded -with-rtsopts=-T @@ -281,6 +294,10 @@ test-suite unittest if (!(os(windows))) && (flag(terminfo)) build-depends: terminfo + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7 benchmark bench type: exitcode-stdio-1.0 @@ -332,3 +349,7 @@ benchmark bench if (!(os(windows))) && (flag(terminfo)) build-depends: terminfo + if (flag(ghcdebug)) + cpp-options: -DGHCDEBUG + build-depends: + ghc-debug-stub >=0.6.0.0 && <0.7