aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2012-11-11 12:42:34 -0800
committerAdam Vandenberg2012-11-11 12:57:29 -0800
commitc8eb8e1ffb2be69e108fc3175ec0a152bc0bd747 (patch)
tree258c1345d881122d96d45d046d28e6f9329c8f3c /Library/Formula
parent4a68f0ba2e3ed329664bfeda92fa7bc9c056d102 (diff)
downloadhomebrew-c8eb8e1ffb2be69e108fc3175ec0a152bc0bd747.tar.bz2
latex-mk: use requirement
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/latex-mk.rb22
1 files changed, 17 insertions, 5 deletions
diff --git a/Library/Formula/latex-mk.rb b/Library/Formula/latex-mk.rb
index e6ffaf060..b91c7b62d 100644
--- a/Library/Formula/latex-mk.rb
+++ b/Library/Formula/latex-mk.rb
@@ -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