diff options
| author | Gaƫtan Lehmann | 2014-03-30 21:41:11 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-05-07 08:06:15 +0100 |
| commit | ee1c2df5e5a75fbc8f46ce4bb73b7735ecfe19c8 (patch) | |
| tree | d7170e4503a0a1fc0b66c263ba774dd0e403ab15 /Library | |
| parent | 99d092fcd877151650811b441edcccd1071617c8 (diff) | |
| download | homebrew-ee1c2df5e5a75fbc8f46ce4bb73b7735ecfe19c8.tar.bz2 | |
pandoc: 1.12.3
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pandoc.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/pandoc.rb b/Library/Formula/pandoc.rb new file mode 100644 index 000000000..4e3c4e371 --- /dev/null +++ b/Library/Formula/pandoc.rb @@ -0,0 +1,35 @@ +require "formula" +require "language/haskell" + +class Pandoc < Formula + include Language::Haskell::Cabal + + homepage "http://johnmacfarlane.net/pandoc/" + url "https://pandoc.googlecode.com/files/pandoc-1.12.3.tar.gz" + sha1 "f519b5fb8c88ff4374432477dc12f68bbe238510" + + 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" + + 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 |
