From 13ee8b82dad599a76fd384a7d2d278b56587fefe Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 26 Sep 2022 09:25:54 -0700 Subject: Add server flag to pandoc-cli. This allows the executable to be built without support for "server mode." --- pandoc-cli/pandoc-cli.cabal | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'pandoc-cli/pandoc-cli.cabal') diff --git a/pandoc-cli/pandoc-cli.cabal b/pandoc-cli/pandoc-cli.cabal index ab4484946..5e0cf4fed 100644 --- a/pandoc-cli/pandoc-cli.cabal +++ b/pandoc-cli/pandoc-cli.cabal @@ -21,6 +21,10 @@ source-repository head type: git location: git://github.com/jgm/pandoc.git +flag server + Description: Include support for running pandoc as an HTTP server. + Default: True + common common-options default-language: Haskell2010 build-depends: base >= 4.12 && < 5 @@ -33,7 +37,6 @@ common common-options -Wpartial-fields -Wmissing-signatures -fhide-source-paths - -- -Wmissing-export-lists if impl(ghc >= 8.10) ghc-options: -Wunused-packages @@ -54,9 +57,11 @@ executable pandoc hs-source-dirs: src main-is: pandoc.hs buildable: True - build-depends: pandoc == 2.19.2, - pandoc-server >= 0.1 && < 0.2, - hslua-cli >= 1.0 && < 1.1, - wai-extra >= 3.0.24, - warp, - safe + build-depends: pandoc, + hslua-cli >= 1.0 && < 1.1 + if flag(server) + build-depends: pandoc-server >= 0.1 && < 0.2, + wai-extra >= 3.0.24, + warp, + safe + cpp-options: -D_SERVER -- cgit v1.2.3