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-08-18 03:30:30 +00:00
|
|
|
url "https://hackage.haskell.org/package/pandoc-1.13.0.1/pandoc-1.13.0.1.tar.gz"
|
|
|
|
sha1 "b038b965d3027ca84939292ec2a94cd7389e1e7d"
|
2014-03-30 19:41:11 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
2014-08-18 03:43:07 +00:00
|
|
|
sha1 "14516b086a7728dad03ff9b5a84c336da1947ee8" => :mavericks
|
|
|
|
sha1 "bde68b3e353899706868f82f20907b57e4582576" => :mountain_lion
|
|
|
|
sha1 "ff8d605afbe6eb914986a9fab729f569dcb35b8e" => :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"
|
|
|
|
|
|
|
|
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
|