aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorGaƫtan Lehmann2014-03-31 09:24:49 +0200
committerMike McQuaid2014-05-07 08:06:15 +0100
commitd34cece7cc40717e7683739dfdb5185cf917d36b (patch)
tree8949ae3a0509766287a449e5820f4d51c7b72988 /Library/Formula
parentee1c2df5e5a75fbc8f46ce4bb73b7735ecfe19c8 (diff)
downloadhomebrew-d34cece7cc40717e7683739dfdb5185cf917d36b.tar.bz2
pandoc-citeproc: 0.3.0.1
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pandoc-citeproc.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/Library/Formula/pandoc-citeproc.rb b/Library/Formula/pandoc-citeproc.rb
new file mode 100644
index 000000000..3489b1d56
--- /dev/null
+++ b/Library/Formula/pandoc-citeproc.rb
@@ -0,0 +1,37 @@
+require "formula"
+require "language/haskell"
+
+class PandocCiteproc < Formula
+ include Language::Haskell::Cabal
+
+ homepage "https://github.com/jgm/pandoc-citeproc"
+ url "http://hackage.haskell.org/package/pandoc-citeproc-0.3.0.1/pandoc-citeproc-0.3.0.1.tar.gz"
+ sha1 "958309f9996d563ffba0bd4870bb7f201aac08e8"
+
+ depends_on "ghc" => :build
+ depends_on "cabal-install" => :build
+ depends_on "gmp"
+
+ def install
+ 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
+ bib = testpath/"test.bib"
+ bib.write <<-EOS.undent
+ @Book{item1,
+ author="John Doe",
+ title="First Book",
+ year="2005",
+ address="Cambridge",
+ publisher="Cambridge University Press"
+ }
+ EOS
+ assert `pandoc-citeproc --bib2yaml #{bib}`.include? "- publisher-place: Cambridge"
+ end
+end