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-06-23 01:52:43 +00:00
|
|
|
url "http://hackage.haskell.org/package/pandoc-1.12.4.2/pandoc-1.12.4.2.tar.gz"
|
|
|
|
sha1 "29e035a2707ff5ce534de92cf75a17acf75dea19"
|
2014-07-29 08:03:27 +00:00
|
|
|
revision 1
|
2014-03-30 19:41:11 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
2014-07-29 11:24:12 +00:00
|
|
|
sha1 "fb93514850f6bb8dfb1c5d0eab8a911dc741fc07" => :mavericks
|
|
|
|
sha1 "2db6d096a37d2f06909669a5be38d0b8e3eae035" => :mountain_lion
|
|
|
|
sha1 "c1c385ad031503c1540ec515f3a1552e51783569" => :lion
|
2014-05-06 22:52:15 +00:00
|
|
|
end
|
|
|
|
|
2014-03-30 19:41:11 +00:00
|
|
|
resource "completion" do
|
|
|
|
url "https://github.com/dsanson/pandoc-completion.git", :branch => "master"
|
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "gmp"
|
|
|
|
|
2014-06-23 01:52:43 +00:00
|
|
|
patch do
|
|
|
|
# The following patch has been committed upstream and is expected
|
|
|
|
# to be released with Pandoc 0.13.
|
|
|
|
url "https://github.com/jgm/pandoc/commit/fd11a5a5.diff"
|
|
|
|
sha1 "1676caa8440982af93e1ccdcfd444371dde81f34"
|
|
|
|
end
|
|
|
|
|
2014-03-30 19:41:11 +00:00
|
|
|
def install
|
|
|
|
resource("completion").stage do
|
|
|
|
bash_completion.install "pandoc-completion.bash"
|
|
|
|
end
|
|
|
|
cabal_sandbox do
|
|
|
|
cabal_install_tools "alex", "happy"
|
|
|
|
cabal_install "--only-dependencies", "--constraint=temporary==1.2.0.1"
|
|
|
|
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
|