2014-03-30 19:41:11 +00:00
|
|
|
require "formula"
|
|
|
|
require "language/haskell"
|
|
|
|
|
|
|
|
class Pandoc < Formula
|
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
|
|
|
homepage "http://johnmacfarlane.net/pandoc/"
|
2014-09-21 19:37:31 +00:00
|
|
|
url "https://hackage.haskell.org/package/pandoc-1.13.1/pandoc-1.13.1.tar.gz"
|
|
|
|
sha1 "8f3df1977cf9daa848640754515b733c13fd934a"
|
2014-03-30 19:41:11 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
2014-09-23 06:21:00 +00:00
|
|
|
sha1 "cb797a12020892b2eee7131d448692309b184d99" => :mavericks
|
|
|
|
sha1 "0795ad1fdea3a1d47219753ebce5d34f7311ad5b" => :mountain_lion
|
|
|
|
sha1 "c9c2e4e7e74b4850bcbba148d8efc6af7da47605" => :lion
|
2014-05-06 22:52:15 +00:00
|
|
|
end
|
|
|
|
|
2014-03-30 19:41:11 +00:00
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "gmp"
|
|
|
|
|
2014-09-23 17:52:37 +00:00
|
|
|
fails_with(:clang) { build 425 } # clang segfaults on Lion
|
2014-09-23 17:04:10 +00:00
|
|
|
|
2014-03-30 19:41:11 +00:00
|
|
|
def install
|
|
|
|
cabal_sandbox do
|
2014-08-17 06:56:58 +00:00
|
|
|
cabal_install "--only-dependencies"
|
2014-03-30 19:41:11 +00:00
|
|
|
cabal_install "--prefix=#{prefix}"
|
|
|
|
end
|
|
|
|
cabal_clean_lib
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "pandoc", "-o", "output.html", prefix/"README"
|
|
|
|
assert (Pathname.pwd/"output.html").read.include? '<h1 id="synopsis">Synopsis</h1>'
|
|
|
|
end
|
|
|
|
end
|