aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorRui Pereira2011-08-12 12:10:04 +0200
committerCharlie Sharpsteen2011-08-25 17:00:18 -0700
commit32dfc2dfd7a2dcf1c2c1552cfe383af655592682 (patch)
treef02edc158335b7a9625b4cb62f13325417fb706f /Library/Formula
parentb00e4712654416257562a2431b79ebc44374f23c (diff)
downloadhomebrew-32dfc2dfd7a2dcf1c2c1552cfe383af655592682.tar.bz2
New formula for auctex 11.86
An extensible package for writing and formatting TEX files in GNU Emacs and XEmacs Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/auctex.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/Library/Formula/auctex.rb b/Library/Formula/auctex.rb
new file mode 100644
index 000000000..23640aa6e
--- /dev/null
+++ b/Library/Formula/auctex.rb
@@ -0,0 +1,39 @@
+require 'formula'
+
+class Auctex < Formula
+ url 'http://ftp.gnu.org/pub/gnu/auctex/auctex-11.86.tar.gz'
+ homepage 'http://ftp.gnu.org/pub/gnu/auctex'
+ md5 '6bc33a67b6ac59db1aa238f3693b36d2'
+
+ def install
+ # based on the asymtote formula LaTeX check
+ if `which latex`.strip == ''
+ onoe <<-EOS.undent
+ AUCTeX requires a TeX/LaTeX installation; aborting now.
+ You can obtain the TeX distribution for Mac OS X from
+ http://www.tug.org/mactex/
+ EOS
+ Process.exit
+ end
+ texmf = `kpsewhich -var-value=TEXMFHOME`.strip
+ emacs = `which emacs`.strip
+ lispdir = File.join ENV['HOME'], '.emacs.d', 'auctex'
+ system "./configure", "--prefix=#{prefix}", "--with-texmf-dir=#{texmf}",
+ "--with-emacs=#{emacs}", "--with-lispdir=#{lispdir}"
+ system "make"
+ system "make install"
+ end
+
+ def caveats; <<-EOS.undent
+ * texmf files installed into
+ ~/Library/texmf/tex/preview
+
+ * Emacs package installed into
+ ~/.emacs.d/auctex
+
+ * to activate add the following to your .emacs
+ (add-to-list 'load-path "~/.emacs.d/auctex")
+ (require 'tex-site)
+ EOS
+ end
+end