latex-mk: use requirement

This commit is contained in:
Adam Vandenberg committed 2012-11-11 12:57:29 -08:00
1 parent 4a68f0ba2e
commit c8eb8e1ffb
1 file changed
+17 -5
+17 -5
View File
@@ -1,19 +1,31 @@
require 'formula'
class TexInstalled < Requirement
def message; <<-EOS.undent
A TeX/LaTeX installation is required to install.
You can obtain the TeX distribution for Mac OS X from:
http://www.tug.org/mactex/
EOS
end
def satisfied?
which 'latex'
end
def fatal?
true
end
end
class LatexMk < Formula
homepage 'http://latex-mk.sourceforge.net/index.html'
url 'http://sourceforge.net/projects/latex-mk/files/latex-mk/latex-mk-2.1/latex-mk-2.1.tar.gz'
sha1 '8460fd1f3c716e5759828c2a5af76eeafbce8d10'
env :userpaths
depends_on TexInstalled.new
env :userpaths # To find TeX
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
def caveats
"latex-mk requires a version of TeX, such as TeX Live or MacTeX."
end
end