pandoc.cabal: use common stanza to reduce duplication (#7086)
This commit is contained in:
parent
bab5d10ea7
commit
f7be8d0964
1 changed files with 45 additions and 124 deletions
169
pandoc.cabal
169
pandoc.cabal
|
@ -396,9 +396,43 @@ flag trypandoc
|
|||
Description: Build trypandoc cgi executable.
|
||||
Default: False
|
||||
|
||||
library
|
||||
common common-options
|
||||
default-language: Haskell2010
|
||||
build-depends: base >= 4.9 && < 5,
|
||||
Glob >= 0.7 && < 0.11,
|
||||
text >= 1.1.1.0 && < 1.3
|
||||
other-extensions: NoImplicitPrelude
|
||||
ghc-options: -Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
|
||||
if os(windows)
|
||||
cpp-options: -D_WINDOWS
|
||||
|
||||
-- Later:
|
||||
-- -Wpartial-fields (currently used in Powerpoint writer)
|
||||
-- -Wmissing-export-lists (currently some Odt modules violate this)
|
||||
-- -Wredundant-constraints (problematic if we want to support older base)
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
||||
common common-executable
|
||||
import: common-options
|
||||
build-depends: pandoc
|
||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||
|
||||
|
||||
library
|
||||
import: common-options
|
||||
build-depends: Glob >= 0.7 && < 0.11,
|
||||
HTTP >= 4000.0.5 && < 4000.4,
|
||||
HsYAML >= 0.2 && < 0.3,
|
||||
JuicyPixels >= 3.1.6.1 && < 3.4,
|
||||
|
@ -465,35 +499,11 @@ library
|
|||
build-depends: basement >= 0.0.10,
|
||||
foundation >= 0.0.23
|
||||
-- basement 0.0.9 won't build on 32-bit windows.
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
if os(windows)
|
||||
cpp-options: -D_WINDOWS
|
||||
else
|
||||
if !os(windows)
|
||||
build-depends: unix >= 2.4 && < 2.8
|
||||
if flag(embed_data_files)
|
||||
cpp-options: -DEMBED_DATA_FILES
|
||||
other-modules: Text.Pandoc.Data
|
||||
if os(windows)
|
||||
cpp-options: -D_WINDOWS
|
||||
ghc-options: -Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
-- Later:
|
||||
-- -Wpartial-fields (currently used in Powerpoint writer)
|
||||
-- -Wmissing-export-lists (currently some Odt modules violate this)
|
||||
-- -Wredundant-constraints (problematic if we want to support older base)
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
hs-source-dirs: src
|
||||
|
||||
exposed-modules: Text.Pandoc,
|
||||
|
@ -694,87 +704,36 @@ library
|
|||
buildable: True
|
||||
|
||||
executable pandoc
|
||||
build-depends: pandoc, base >= 4.8 && < 5
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
import: common-executable
|
||||
hs-source-dirs: app
|
||||
main-is: pandoc.hs
|
||||
buildable: True
|
||||
other-modules: Paths_pandoc
|
||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||
-Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
||||
executable trypandoc
|
||||
import: common-executable
|
||||
main-is: trypandoc.hs
|
||||
hs-source-dirs: trypandoc
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
if flag(trypandoc)
|
||||
build-depends: base, aeson, pandoc,
|
||||
text, wai-extra, wai >= 0.3, http-types
|
||||
build-depends: aeson, http-types, wai >= 0.3, wai-extra
|
||||
buildable: True
|
||||
else
|
||||
buildable: False
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||
-Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
||||
benchmark weigh-pandoc
|
||||
import: common-executable
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: weigh-pandoc.hs
|
||||
hs-source-dirs: benchmark
|
||||
build-depends: pandoc,
|
||||
base >= 4.8 && < 5,
|
||||
mtl >= 2.2 && < 2.3,
|
||||
text,
|
||||
build-depends: mtl >= 2.2 && < 2.3,
|
||||
weigh >= 0.0 && < 0.1,
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||
-Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
||||
|
||||
test-suite test-pandoc
|
||||
import: common-executable
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: test-pandoc.hs
|
||||
hs-source-dirs: test
|
||||
build-depends: pandoc,
|
||||
base >= 4.8 && < 5,
|
||||
Diff >= 0.2 && < 0.5,
|
||||
Glob >= 0.7 && < 0.11,
|
||||
QuickCheck >= 2.4 && < 2.15,
|
||||
|
@ -796,14 +755,9 @@ test-suite test-pandoc
|
|||
tasty-lua >= 0.2 && < 0.3,
|
||||
tasty-quickcheck >= 0.8 && < 0.11,
|
||||
temporary >= 1.1 && < 1.4,
|
||||
text >= 1.1.1.0 && < 1.3,
|
||||
time >= 1.5 && < 1.10,
|
||||
xml >= 1.3.12 && < 1.4,
|
||||
zip-archive >= 0.2.3.4 && < 0.5
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
other-modules: Tests.Old
|
||||
Tests.Command
|
||||
Tests.Helpers
|
||||
|
@ -859,48 +813,15 @@ test-suite test-pandoc
|
|||
Tests.Writers.OOXML
|
||||
Tests.Writers.Ms
|
||||
Tests.Writers.AnnotatedTable
|
||||
if os(windows)
|
||||
cpp-options: -D_WINDOWS
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||
-Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
||||
|
||||
benchmark benchmark-pandoc
|
||||
import: common-executable
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: benchmark-pandoc.hs
|
||||
hs-source-dirs: benchmark
|
||||
build-depends: pandoc,
|
||||
base >= 4.8 && < 5,
|
||||
bytestring,
|
||||
build-depends: bytestring,
|
||||
containers,
|
||||
tasty,
|
||||
tasty-bench >= 0.1 && <= 0.2,
|
||||
mtl >= 2.2 && < 2.3,
|
||||
text >= 1.1.1.0 && < 1.3,
|
||||
time
|
||||
if impl(ghc < 8.4)
|
||||
hs-source-dirs: prelude
|
||||
other-modules: Prelude
|
||||
build-depends: base-compat >= 0.9
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||
-Wall -fno-warn-unused-do-bind
|
||||
-Wincomplete-record-updates
|
||||
-Wnoncanonical-monad-instances
|
||||
if impl(ghc >= 8.2)
|
||||
ghc-options: -Wcpp-undef
|
||||
if impl(ghc >= 8.4)
|
||||
ghc-options: -Wincomplete-uni-patterns
|
||||
-Widentities
|
||||
-fhide-source-paths
|
||||
|
|
Loading…
Reference in a new issue