File pandoc-citeproc.cabal of Package ghc-pandoc-citeproc

name:               pandoc-citeproc
version:            0.10.5.1
x-revision: 1
cabal-version:      >= 1.12
synopsis:           Supports using pandoc with citeproc

description:        The pandoc-citeproc library exports functions for
                    using the citeproc system with pandoc.  It relies on
                    citeproc-hs, a library for rendering
                    bibliographic reference citations into a variety
                    of styles using a macro language called Citation
                    Style Language (CSL). More details on CSL can be
                    found here: <http://citationstyles.org/>.
                    .
                    Currently this package includes a heavily revised
                    copy of the citeproc-hs code. When citeproc-hs is
                    updated to be compatible, this package will simply
                    depend on citeproc-hs.
                    .
                    This package also contains an executable: pandoc-citeproc,
                    which works as a pandoc filter, and
                    also has a mode for converting bibliographic databases
                    a YAML format suitable for inclusion in pandoc YAML
                    metadata.

homepage:           https://github.com/jgm/pandoc-citeproc
category:           Text
tested-with:        GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
license:            BSD3
license-file:       LICENSE
author:             John MacFarlane, Andrea Rossato
maintainer:         jgm@berkeley.edu
build-type:         Custom
data-files:         chicago-author-date.csl
                    locales/*.xml
                    -- documentation
                    README.md
                    LICENSE
                    man/man1/pandoc-citeproc.1
                    changelog
extra-source-files: stack.yaml
                    -- tests
                    tests/*.in.native
                    tests/*.expected.native
                    tests/*.csl
                    tests/biblio.bib
                    tests/biblio2yaml/*.bibtex
                    tests/biblio2yaml/*.biblatex
                    tests/biblio2yaml/pandoc-2/*.biblatex

source-repository head
  type:          git
  location:      git://github.com/jgm/pandoc-citeproc.git

flag bibutils
  description: Use Chris Putnam's Bibutils.
  default:     True

flag embed_data_files
  description: Embed locale files into the library (needed for windows packaging)
  default:     False

flag unicode_collation
  description: Use Haskell bindings to the International Components for Unicode (ICU) libraries
  default:     False

flag test_citeproc
  description: Build the test-citeproc program
  default:     False

flag debug
  description: Turn on debug tracing.
  default:     False

-- stanza is ignored by cabal-install < 1.24
custom-setup
  -- lib:Cabal prior to 1.24 runs into haskell/Cabal#1725
  setup-depends: Cabal >= 1.24 && < 1.25
               , base < 5

library
    hs-source-dirs:   src, prelude, compat
    exposed-modules:  Text.CSL.Pandoc
                      Text.CSL
                      Text.CSL.Reference
                      Text.CSL.Style
                      Text.CSL.Eval
                      Text.CSL.Eval.Common
                      Text.CSL.Eval.Date
                      Text.CSL.Eval.Names
                      Text.CSL.Eval.Output
                      Text.CSL.Parser
                      Text.CSL.Proc
                      Text.CSL.Proc.Collapse
                      Text.CSL.Proc.Disamb
                      Text.CSL.Input.Bibutils
                      Text.CSL.Input.Bibtex
                      Text.CSL.Output.Pandoc
                      Text.CSL.Output.Plain
                      Text.CSL.Data
    other-modules:    Text.CSL.Util
                      Prelude
                      Paths_pandoc_citeproc
                      Text.CSL.Compat.Pandoc
    ghc-options:      -funbox-strict-fields -Wall -fno-warn-unused-do-bind
    ghc-prof-options: -fprof-auto-exported
    build-depends:    containers, directory, mtl,
                      bytestring, filepath,
                      pandoc-types >= 1.16 && < 1.18,
                      pandoc >= 1.16 && < 2.1,
                      tagsoup,
                      aeson >= 0.7 && < 1.3,
                      text,
                      vector,
                      xml-conduit >= 1.2 && < 1.6,
                      unordered-containers >= 0.2 && < 0.3,
                      data-default,
                      setenv >= 0.1 && < 0.2,
                      split, yaml >= 0.8.8.7
    default-language: Haskell2010
    default-extensions: CPP

    if impl(ghc < 7.6)
       build-depends: ghc-prim

    if flag(debug)
       build-depends:   pretty-show
       cpp-options:     -DTRACE

    if flag(bibutils)
       build-depends:   hs-bibutils >= 0.3
       cpp-options:     -DUSE_BIBUTILS

    if flag(embed_data_files)
       build-depends: file-embed >= 0.0 && < 0.1
       cpp-options:   -DEMBED_DATA_FILES
       other-modules: Text.CSL.Data.Embedded

    if flag(unicode_collation)
       build-depends: text, text-icu
       cpp-options:   -DUNICODE_COLLATION
    else
       build-depends: rfc5051

    if impl(ghc >= 6.10)
       build-depends: base >= 4, syb, parsec, old-locale, time
    else
       build-depends: base >= 3 && < 4

executable pandoc-citeproc
    main-is:          pandoc-citeproc.hs
    hs-source-dirs:   ., prelude
    ghc-options:      -funbox-strict-fields -Wall
    ghc-prof-options: -fprof-auto-exported -rtsopts
    build-depends:    base >= 4, pandoc-citeproc,
                      pandoc-types >= 1.16 && < 1.18,
                      pandoc >= 1.16 && < 2.1,
                      aeson,
                      aeson-pretty >= 0.8, yaml, bytestring, syb, attoparsec, text,
                      filepath
    other-modules:    Paths_pandoc_citeproc
                      Prelude
    default-language: Haskell2010
    ghc-options:      -funbox-strict-fields -Wall -fno-warn-unused-do-bind
    if flag(bibutils)
       default-extensions: CPP
       cpp-options:     -DUSE_BIBUTILS

executable test-citeproc
  Main-Is:        test-citeproc.hs
  Other-Modules:  JSON
                  Prelude
  Hs-Source-Dirs: tests, prelude, compat
  if flag(test_citeproc)
    Buildable:    True
  else
    Buildable:    False
  build-depends:  base >= 4, aeson, directory, text, mtl,
                  pandoc-types >= 1.16 && < 1.18,
                  pandoc >= 1.16 && < 2.1,
                  filepath,
                  bytestring, pandoc-citeproc, process, temporary >= 1.1,
                  yaml >= 0.8.8.7, containers >= 0.4, vector >= 0.10
  ghc-options:    -funbox-strict-fields -Wall -fno-warn-unused-do-bind
  default-language: Haskell2010
  other-modules:  Text.CSL.Compat.Pandoc

test-suite test-pandoc-citeproc
  Type:           exitcode-stdio-1.0
  Main-Is:        test-pandoc-citeproc.hs
  Other-Modules:  JSON
                  Prelude
  Hs-Source-Dirs: tests, prelude, compat
  build-depends:  base >= 4, aeson, directory, text,
                  pandoc-types >= 1.16 && < 1.18, mtl,
                  pandoc >= 1.16 && < 2.1, filepath,
                  bytestring, pandoc-citeproc, process, temporary >= 1.1,
                  yaml >= 0.8.8.7
  ghc-options:    -funbox-strict-fields -Wall -fno-warn-unused-do-bind
  default-language: Haskell2010
  other-modules:  Text.CSL.Compat.Pandoc
openSUSE Build Service is sponsored by