From cf8ebd4ae286f84f0baad44d46adef6ed98c727a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 9 Aug 2016 12:03:23 -0700 Subject: [PATCH] pkg: rename, clean up oldtime flag --- hledger-lib/hledger-lib.cabal | 10 +++++----- hledger-lib/package.yaml | 10 ++++------ hledger-ui/hledger-ui.cabal | 9 ++++----- hledger-ui/package.yaml | 9 +++------ hledger-web/hledger-web.cabal | 12 ++++++------ hledger-web/package.yaml | 12 +++++------- hledger/hledger.cabal | 20 ++++++++++---------- hledger/package.yaml | 20 +++++++++----------- 8 files changed, 46 insertions(+), 56 deletions(-) diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index 1e5d31d1a..9a857f31f 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -52,10 +52,10 @@ flag double default: False description: Use old Double number representation (instead of Decimal), for testing/benchmarking. -flag old-locale - default: False - description: A compatibility flag, set automatically by cabal. If false then depend on time >= 1.5, if true then depend on time < 1.5 together with old-locale. +flag oldtime + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: False + default: False library ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans @@ -90,7 +90,7 @@ library if impl(ghc >=7.4) build-depends: pretty-show >=1.6.4 - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 , old-locale @@ -216,7 +216,7 @@ test-suite hunittests if impl(ghc >=7.4) build-depends: pretty-show >=1.6.4 - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 , old-locale diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 8dd693469..989de3e8a 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -38,10 +38,8 @@ flags: description: Use old Double number representation (instead of Decimal), for testing/benchmarking. manual: true default: false - old-locale: - description: ! 'A compatibility flag, set automatically by cabal. - If false then depend on time >= 1.5, - if true then depend on time < 1.5 together with old-locale.' + oldtime: + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: false default: false dependencies: @@ -126,7 +124,7 @@ library: - condition: impl(ghc >=7.4) dependencies: - pretty-show >=1.6.4 - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 @@ -152,7 +150,7 @@ tests: - condition: impl(ghc >=7.4) dependencies: - pretty-show >=1.6.4 - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 diff --git a/hledger-ui/hledger-ui.cabal b/hledger-ui/hledger-ui.cabal index 9255c2ba6..0c05a502f 100644 --- a/hledger-ui/hledger-ui.cabal +++ b/hledger-ui/hledger-ui.cabal @@ -40,11 +40,10 @@ source-repository head type: git location: https://github.com/simonmichael/hledger -flag old-locale - default: False - description: A compatibility flag, set automatically by cabal. If false then depend on time >= 1.5, if true then depend on time < 1.5 together with old-locale. - +flag oldtime + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: False + default: False flag threaded default: True @@ -86,7 +85,7 @@ executable hledger-ui , vty >= 5.5 && < 5.8 if flag(threaded) ghc-options: -threaded - if flag(old-locale) + if flag(oldtime) build-depends: time < 1.5 , old-locale diff --git a/hledger-ui/package.yaml b/hledger-ui/package.yaml index 022e0d673..8471a20da 100644 --- a/hledger-ui/package.yaml +++ b/hledger-ui/package.yaml @@ -31,11 +31,8 @@ flags: description: Build with support for multithreaded execution manual: false default: true - old-locale: - description: > - A compatibility flag, set automatically by cabal. - If false then depend on time >= 1.5, - if true then depend on time < 1.5 together with old-locale. + oldtime: + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: false default: false # curses is required to build terminfo for vty for hledger-ui. @@ -91,7 +88,7 @@ executables: - vty >= 5.5 && < 5.8 - condition: flag(threaded) ghc-options: -threaded - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time < 1.5 diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index 5a07b5bf2..8b40910a5 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -113,10 +113,10 @@ flag library-only description: Build for use with "yesod devel" manual: False -flag old-locale - default: False - description: A compatibility flag, set automatically by cabal. If false then depend on time >= 1.5, if true then depend on time < 1.5 together with old-locale. +flag oldtime + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: False + default: False flag threaded default: True @@ -163,7 +163,7 @@ library , mtl if (flag(dev)) || (flag(library-only)) cpp-options: -DDEVELOPMENT - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 , old-locale @@ -240,7 +240,7 @@ executable hledger-web ghc-options: -O0 if flag(dev) cpp-options: -DDEVELOPMENT - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 , old-locale @@ -295,7 +295,7 @@ test-suite test , hledger-web , hspec , yesod-test - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 , old-locale diff --git a/hledger-web/package.yaml b/hledger-web/package.yaml index dae2c1d4f..d80223918 100644 --- a/hledger-web/package.yaml +++ b/hledger-web/package.yaml @@ -55,10 +55,8 @@ flags: description: Build with support for multithreaded execution. manual: false default: true - old-locale: - description: ! 'A compatibility flag, set automatically by cabal. - If false then depend on time >= 1.5, - if true then depend on time < 1.5 together with old-locale.' + oldtime: + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: false default: false dependencies: @@ -126,7 +124,7 @@ library: when: - condition: (flag(dev)) || (flag(library-only)) cpp-options: -DDEVELOPMENT - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 @@ -151,7 +149,7 @@ executables: ghc-options: -O0 - condition: flag(dev) cpp-options: -DDEVELOPMENT - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 @@ -169,7 +167,7 @@ tests: - hspec - yesod-test when: - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index e62553630..c755c2497 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -68,10 +68,10 @@ flag curses description: On POSIX systems, enable curses support for auto-detecting terminal width. manual: False -flag old-locale - default: False - description: A compatibility flag, set automatically by cabal. If false then depend on time >= 1.5, if true then depend on time < 1.5 together with old-locale. +flag oldtime + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: False + default: False flag threaded default: True @@ -117,7 +117,7 @@ library build-depends: shakespeare >=1.0 && <2.1 , shakespeare-text >=1.0 && <1.2 - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 , old-locale @@ -200,10 +200,10 @@ executable hledger build-depends: shakespeare >=1.0 && <2.1 , shakespeare-text >=1.0 && <1.2 - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 - , old-locale + , oldtime else build-depends: time >=1.5 @@ -263,10 +263,10 @@ test-suite test if impl(ghc >=7.4) build-depends: pretty-show >=1.6.4 - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 - , old-locale + , oldtime else build-depends: time >=1.5 @@ -298,10 +298,10 @@ benchmark bench , criterion , html , timeit - if flag(old-locale) + if flag(oldtime) build-depends: time <1.5 - , old-locale + , oldtime else build-depends: time >=1.5 diff --git a/hledger/package.yaml b/hledger/package.yaml index 52eaeeac3..e2ae383ce 100644 --- a/hledger/package.yaml +++ b/hledger/package.yaml @@ -59,10 +59,8 @@ flags: description: Build with support for multithreaded execution manual: false default: true - old-locale: - description: ! 'A compatibility flag, set automatically by cabal. - If false then depend on time >= 1.5, - if true then depend on time < 1.5 together with old-locale.' + oldtime: + description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. manual: false default: false dependencies: @@ -135,7 +133,7 @@ library: dependencies: - shakespeare >=1.0 && <2.1 - shakespeare-text >=1.0 && <1.2 - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 @@ -186,11 +184,11 @@ executables: dependencies: - shakespeare >=1.0 && <2.1 - shakespeare-text >=1.0 && <1.2 - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 - - old-locale + - oldtime else: dependencies: - time >=1.5 @@ -240,11 +238,11 @@ tests: - condition: impl(ghc >=7.4) dependencies: - pretty-show >=1.6.4 - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 - - old-locale + - oldtime else: dependencies: - time >=1.5 @@ -262,11 +260,11 @@ benchmarks: - html - timeit when: - - condition: flag(old-locale) + - condition: flag(oldtime) then: dependencies: - time <1.5 - - old-locale + - oldtime else: dependencies: - time >=1.5