mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-15 19:56:59 +08:00
Add tex requirement
* Detect `latex' and `bibtex' commands. * Recommend installing MacTeX when no LaTeX installation is found. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
8f88850cdb
commit
2d445d54b5
@ -78,6 +78,8 @@ private
|
||||
MysqlInstalled.new(tag)
|
||||
when :postgresql
|
||||
PostgresqlInstalled.new(tag)
|
||||
when :tex
|
||||
TeXInstalled.new(tag)
|
||||
else
|
||||
raise "Unsupported special dependency #{spec}"
|
||||
end
|
||||
|
@ -271,3 +271,27 @@ class PostgresqlInstalled < Requirement
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
class TeXInstalled < Requirement
|
||||
fatal true
|
||||
env :userpaths
|
||||
|
||||
def satisfied?
|
||||
tex = which 'tex'
|
||||
latex = which 'latex'
|
||||
not tex.nil? and not latex.nil?
|
||||
end
|
||||
|
||||
def message; <<-EOS.undent
|
||||
A LaTeX distribution is required to install.
|
||||
|
||||
You can install MacTeX distribution from:
|
||||
http://www.tug.org/mactex/
|
||||
|
||||
Make sure that its bin directory is in your PATH before proceed.
|
||||
|
||||
You may also need to restore the ownership of Homebrew install:
|
||||
sudo chown -R $USER `brew --prefix`
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user