2011-03-10 05:11:03 +00:00
|
|
|
class Bibtex2html < Formula
|
2015-01-16 08:03:27 +00:00
|
|
|
homepage "http://www.lri.fr/~filliatr/bibtex2html/"
|
|
|
|
url "http://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.98.tar.gz"
|
|
|
|
sha1 "daaa082885a30dae38263614565298d4862b8331"
|
2009-10-27 23:21:57 +00:00
|
|
|
|
2014-11-14 04:50:57 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "e82686abe5a9c548d88345d7f42ec21aeb5dd8f6" => :yosemite
|
|
|
|
sha1 "6ed6b299de0ef530d868c2b1c73ec7c428fc35d0" => :mavericks
|
|
|
|
sha1 "32377bea1f584fedf5d2abb604a1d46e5e92ac5c" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-01-16 08:03:27 +00:00
|
|
|
depends_on "objective-caml"
|
|
|
|
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
|