1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
9 pkgdesc='Conversion between markup formats'
10 url='https://pandoc.org'
13 depends=('ghc-libs' 'haskell-glob' 'haskell-juicypixels' 'haskell-sha' 'haskell-aeson'
14 'haskell-aeson-pretty' 'haskell-attoparsec' 'haskell-base64' 'haskell-blaze-html'
15 'haskell-blaze-markup' 'haskell-case-insensitive' 'haskell-citeproc' 'haskell-commonmark'
16 'haskell-commonmark-extensions' 'haskell-commonmark-pandoc' 'haskell-connection'
17 'haskell-data-default' 'haskell-doclayout' 'haskell-doctemplates' 'haskell-emojis'
18 'haskell-file-embed' 'haskell-gridtables' 'haskell-haddock-library' 'haskell-http-client'
19 'haskell-http-client-tls' 'haskell-http-types' 'haskell-ipynb' 'haskell-jira-wiki-markup'
20 'haskell-mime-types' 'haskell-network' 'haskell-network-uri' 'haskell-pandoc-types'
21 'haskell-pretty-show' 'haskell-random' 'haskell-safe' 'haskell-scientific'
22 'haskell-skylighting' 'haskell-skylighting-core' 'haskell-split' 'haskell-syb'
23 'haskell-tagsoup' 'haskell-temporary' 'haskell-texmath' 'haskell-text-conversions'
24 'haskell-unicode-collation' 'haskell-unicode-transforms' 'haskell-xml'
25 'haskell-xml-conduit' 'haskell-xml-types' 'haskell-yaml' 'haskell-zip-archive'
27 optdepends=('pandoc-crossref: for numbering figures, equations, tables and cross-references to them with pandoc-crossref filter'
28 'texlive-core: for pdf output')
29 makedepends=('ghc' 'uusi' 'haskell-diff' 'haskell-tasty' 'haskell-tasty-golden'
30 'haskell-tasty-hunit' 'haskell-tasty-quickcheck')
31 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
32 sha512sums=('15ed831b2333f4bddca2bcd1ae491b81271d457c9f83863b8a8a7c0c12d1d2c36f4a113b27e5cea0e48c4051650ae2ecf8115eff93e7ef5f39342a176d6d47f7')
37 # TODO: find a better solution
38 sed -i "s|let env' = dynlibEnv ++ |let env' = dynlibEnv ++ [(\"LD_LIBRARY_PATH\", \"$PWD/dist/build\")] ++ |" test/Tests/Command.hs
44 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
45 --prefix=/usr --docdir="/usr/share/doc/$pkgname" --datasubdir=$pkgname --enable-tests \
46 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
48 runhaskell Setup build $MAKEFLAGS
49 runhaskell Setup register --gen-script
50 runhaskell Setup unregister --gen-script
51 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
52 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
57 LC_CTYPE=en_US.UTF-8 runhaskell Setup test --show-details=direct
62 install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${_hkgname}.sh"
63 install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${_hkgname}.sh"
64 runhaskell Setup copy --destdir="${pkgdir}"
65 rm "${pkgdir}/usr/share/doc/${pkgname}/COPYING.md"
67 # Should be in pandoc-cli, I think.
68 install -Dm644 man/pandoc.1 -t "${pkgdir}"/usr/share/man/man1/