aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-11-11 12:42:55 -0800
committerAdam Vandenberg2012-11-11 12:57:29 -0800
commitba2ffb9349d7ea1ced5431626f4633e433ecb7e7 (patch)
tree1b9443b75ef085486c99dc00acd78fa7de288f79
parentc8eb8e1ffb2be69e108fc3175ec0a152bc0bd747 (diff)
downloadhomebrew-ba2ffb9349d7ea1ced5431626f4633e433ecb7e7.tar.bz2
chktex: use requirement
-rw-r--r--Library/Formula/chktex.rb22
1 files changed, 17 insertions, 5 deletions
diff --git a/Library/Formula/chktex.rb b/Library/Formula/chktex.rb
index c35b2a141..55bf669c8 100644
--- a/Library/Formula/chktex.rb
+++ b/Library/Formula/chktex.rb
@@ -1,18 +1,30 @@
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 Chktex < Formula
homepage 'http://www.nongnu.org/chktex/'
url 'http://download.savannah.gnu.org/releases/chktex/chktex-1.7.1.tar.gz'
sha1 'ed94b96ed8ce65fb1cef1b5fc019045c5b2dd8a8'
- env :userpaths
+ depends_on TexInstalled.new
+ env :userpaths # To find TeX
def install
system "./configure", "--prefix=#{prefix}"
system "make install"
end
-
- def caveats
- "chktex requires a version of TeX, such as TeX Live or MacTeX."
- end
end