homebrew-core/Formula/bibtex2html.rb

46 lines
1.4 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Bibtex2html < Formula
desc "BibTeX to HTML converter"
2015-10-13 23:35:00 +00:00
homepage "https://www.lri.fr/~filliatr/bibtex2html/"
2015-10-12 21:38:28 +00:00
url "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.98.tar.gz"
sha256 "e925a0b97bf87a14bcbda95cac269835cd5ae0173504261f2c60e3c46a8706d6"
2014-11-14 04:50:57 +00:00
bottle do
2015-10-14 04:28:08 +00:00
cellar :any_skip_relocation
revision 1
sha256 "47096fa76ad63ac58cd9afd80d2a5589b70d178080dd48ed9c51639f4ff19e52" => :el_capitan
sha256 "e3caa99e7bd5a6c00163642869e684680ee6e696b1ac3dc65425204c4b7be6b2" => :yosemite
sha256 "77ece7804ba79ff217244fc52bf5a91fe3fbb65972da4edbcb8a5c5ce2d13e0b" => :mavericks
2014-11-14 04:50:57 +00:00
end
depends_on "ocaml"
depends_on "hevea"
depends_on :tex => :optional
def install
2011-08-14 17:10:43 +00:00
# See: https://trac.macports.org/ticket/26724
inreplace "Makefile.in" do |s|
s.remove_make_var! "STRLIB"
2011-08-14 17:10:43 +00:00
end
system "./configure", "--prefix=#{prefix}"
system "make"
system "make", "install"
end
test do
(testpath/"test.bib").write <<-EOS.undent
@article{Homebrew,
title = {Something},
author = {Someone},
journal = {Something},
volume = {1},
number = {2},
pages = {3--4}
}
EOS
system "#{bin}/bib2bib", "test.bib", "--remove", "pages", "-ob", "out.bib"
assert /pages\s*=\s*{3--4}/ !~ File.read("out.bib")
assert_match /pages\s*=\s*{3--4}/, File.read("test.bib")
end
end