From 1ee6e1851b908023ed56f190046398c01781e096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= Date: Sun, 30 Mar 2014 21:41:11 +0200 Subject: [PATCH] pandoc: 1.12.3 --- Formula/pandoc.rb | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Formula/pandoc.rb diff --git a/Formula/pandoc.rb b/Formula/pandoc.rb new file mode 100644 index 0000000000..4e3c4e3714 --- /dev/null +++ b/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? '

Synopsis

' + end +end