From 2eabcd1360e1b28e5edbd70b8fcc5f886888755f Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 19 Apr 2013 12:40:29 -0700 Subject: [PATCH] reverse and rename the blaze_html_0_5 flag to blaze_html_0_4 --- Makefile | 2 +- NEWS.md | 9 +++++---- hledger-web/Handler/Common.hs | 6 +++--- hledger-web/Handler/Utils.hs | 6 +++--- hledger-web/hledger-web.cabal | 26 +++++++++++++------------- 5 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index ac2d83d76..fc144f6cb 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ WEBLANGEXTS:=\ PREFERMACUSRLIBFLAGS=-L/usr/lib GHCMEMFLAGS= #+RTS -M200m -RTS CABALMACROSFLAGS=-optP-include -optPhledger/dist/build/autogen/cabal_macros.h -BUILDFLAGS1:=-rtsopts $(WARNINGS) $(INCLUDEPATHS) $(PREFERMACUSRLIBFLAGS) $(GHCMEMFLAGS) $(CABALMACROSFLAGS) -DPATCHLEVEL=$(PATCHLEVEL) -DBLAZE_HTML_0_5 -DDEVELOPMENT +BUILDFLAGS1:=-rtsopts $(WARNINGS) $(INCLUDEPATHS) $(PREFERMACUSRLIBFLAGS) $(GHCMEMFLAGS) $(CABALMACROSFLAGS) -DPATCHLEVEL=$(PATCHLEVEL) -DDEVELOPMENT BUILDFLAGS:=$(BUILDFLAGS1) -DVERSION='"$(VERSION)dev"' PROFBUILDFLAGS:=-prof -fprof-auto -osuf hs_p # sp needs different quoting: diff --git a/NEWS.md b/NEWS.md index f0c6c85bf..4338230ea 100644 --- a/NEWS.md +++ b/NEWS.md @@ -66,18 +66,19 @@ title: hledger news - The search field is wider - yesod devel is now supported; it uses `$LEDGER_FILE` or `~/.hledger.journal` +**Misc:** + + * the `blaze_html_0_5` build flag has been reversed and renamed to `blaze_html_0_4` + **Add-ons:** - The hledger-interest and hledger-irr commands have been released/updated. - hledger-chart and hledger-vty remain unmaintained and deprecated. -**Documentation:** +**Documentation and infrastructure:** - The hledger docs and website have been reorganised and updated - Manuals for past releases are provided as well as the latest dev version - -**Other notes:** - - hledger has moved from darcs and darcs hub to git and github (!) - the bug tracker has moved from google code to github - feature requests and project planning are now managed on trello diff --git a/hledger-web/Handler/Common.hs b/hledger-web/Handler/Common.hs index 3f853f2e1..43533a200 100644 --- a/hledger-web/Handler/Common.hs +++ b/hledger-web/Handler/Common.hs @@ -10,10 +10,10 @@ import Data.Maybe import Data.Text(pack) import Data.Time.Calendar import System.FilePath (takeFileName) -#if BLAZE_HTML_0_5 -import Text.Blaze.Internal (preEscapedString) -#else +#if BLAZE_HTML_0_4 import Text.Blaze (preEscapedString) +#else +import Text.Blaze.Internal (preEscapedString) #endif import Text.Printf diff --git a/hledger-web/Handler/Utils.hs b/hledger-web/Handler/Utils.hs index fbe6da03f..f957cf01a 100644 --- a/hledger-web/Handler/Utils.hs +++ b/hledger-web/Handler/Utils.hs @@ -12,10 +12,10 @@ import Data.Time.Calendar import Data.Time.Clock import Data.Time.Format import System.Locale (defaultTimeLocale) -#if BLAZE_HTML_0_5 -import Text.Blaze.Html (toHtml) -#else +#if BLAZE_HTML_0_4 import Text.Blaze (toHtml) +#else +import Text.Blaze.Html (toHtml) #endif import Text.Hamlet import Yesod.Core diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index d8c436234..e2d57b3cc 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -57,9 +57,9 @@ flag threaded Description: Build with support for multithreaded execution. Default: True -flag blaze_html_0_5 - description: Use the newer 0.5 version of blaze-html and blaze-markup. - default: True +flag blaze_html_0_4 + description: Use the older 0.4 version of blaze-html. + default: False flag dev @@ -159,14 +159,14 @@ library , warp , yaml - if flag(blaze_html_0_5) - cpp-options: -DBLAZE_HTML_0_5 + if flag(blaze_html_0_4) + cpp-options: -DBLAZE_HTML_0_4 + build-depends: + blaze-html >= 0.4 && < 0.5 + else build-depends: blaze-html >= 0.5 && < 0.7 , blaze-markup >= 0.5.1 && < 0.7 - else - build-depends: - blaze-html >= 0.4 && < 0.5 executable hledger-web @@ -251,14 +251,14 @@ executable hledger-web , http-conduit >= 1.8 && < 1.10 , data-default - if flag(blaze_html_0_5) - cpp-options: -DBLAZE_HTML_0_5 + if flag(blaze_html_0_4) + cpp-options: -DBLAZE_HTML_0_4 + build-depends: + blaze-html >= 0.4 && < 0.5 + else build-depends: blaze-html >= 0.5 && < 0.7 , blaze-markup >= 0.5.1 && < 0.7 - else - build-depends: - blaze-html >= 0.4 && < 0.5 test-suite test