2011-03-10 05:11:03 +00:00
|
|
|
class Bibtex2html < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
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"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "e925a0b97bf87a14bcbda95cac269835cd5ae0173504261f2c60e3c46a8706d6"
|
2009-10-27 23:21:57 +00:00
|
|
|
|
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
|
|
|
|
|
2015-09-02 23:43:23 +00:00
|
|
|
depends_on "ocaml"
|
2015-01-16 08:03:27 +00:00
|
|
|
depends_on "hevea"
|
|
|
|
depends_on :tex => :optional
|
2009-10-27 23:21:57 +00:00
|
|
|
|
|
|
|
def install
|
2011-08-14 17:10:43 +00:00
|
|
|
# See: https://trac.macports.org/ticket/26724
|
2015-01-16 08:03:27 +00:00
|
|
|
inreplace "Makefile.in" do |s|
|
|
|
|
s.remove_make_var! "STRLIB"
|
2011-08-14 17:10:43 +00:00
|
|
|
end
|
|
|
|
|
2012-10-07 02:42:03 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
2009-10-27 23:21:57 +00:00
|
|
|
system "make"
|
2015-01-16 08:03:27 +00:00
|
|
|
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"
|
2015-02-03 08:51:12 +00:00
|
|
|
assert /pages\s*=\s*{3--4}/ !~ File.read("out.bib")
|
2015-01-16 08:03:27 +00:00
|
|
|
assert_match /pages\s*=\s*{3--4}/, File.read("test.bib")
|
2009-10-27 23:21:57 +00:00
|
|
|
end
|
|
|
|
end
|