tex: migrate formulae to Homebrew/tex

Migrate the mandatory Tex dependants to Homebrew/tex.

Part 1 of Homebrew/homebrew#38819.
This commit is contained in:
Dominyk Tiller 2015-04-20 14:45:24 +01:00 committed by Mike McQuaid
parent e8fd7b6795
commit 362d45028f
5 changed files with 0 additions and 139 deletions

View file

@ -1,68 +0,0 @@
class Auctex < Formula
homepage "https://www.gnu.org/software/auctex/"
url "http://ftpmirror.gnu.org/auctex/auctex-11.88.tar.gz"
mirror "https://ftp.gnu.org/gnu/auctex/auctex-11.88.tar.gz"
sha1 "098a9751c4e00812e61d62a0184a07d9753904df"
head do
url "git://git.savannah.gnu.org/auctex.git"
depends_on "autoconf" => :build
end
depends_on :tex
option "with-emacs=", "Path to an emacs binary"
def which_emacs
emacs = ARGV.value("with-emacs") || which("emacs").to_s
fail "#{emacs} not found" unless File.exist? emacs
emacs
end
def install
# configure fails if the texmf dir is not there yet
brew_texmf = share/"texmf"
brew_texmf.mkpath
system "./autogen.sh" if build.head?
system "./configure", "--prefix=#{prefix}",
"--with-texmf-dir=#{brew_texmf}",
"--with-emacs=#{which_emacs}",
"--with-lispdir=#{share}/emacs/site-lisp"
system "make"
ENV.deparallelize # Needs a serialized install
system "make", "install"
end
def caveats
# check if the used emacs is in HOMEBREW_PREFIX/bin
# for which case HOMEBREW_PREFIX/share/emacs/site-lisp should already
# be by default in the load-path
if which_emacs.index("#{HOMEBREW_PREFIX}/bin")
dot_emacs = <<-EOS
(require 'tex-site)
EOS
else
dot_emacs = <<-EOS
(add-to-list 'load-path "#{HOMEBREW_PREFIX}/share/emacs/site-lisp")
(require 'tex-site)
EOS
end
<<-EOS.undent
texmf files installed into:
#{HOMEBREW_PREFIX}/share/texmf/
You can add it to your TEXMFHOME using:
sudo tlmgr conf texmf TEXMFHOME "~/Library/texmf:#{HOMEBREW_PREFIX}/share/texmf"
Emacs package installed into:
#{HOMEBREW_PREFIX}/share/emacs/site-lisp
To activate, add the following to your .emacs:
#{dot_emacs}
EOS
end
end

View file

@ -1,21 +0,0 @@
class Chktex < Formula
homepage "http://www.nongnu.org/chktex/"
url "http://download.savannah.gnu.org/releases/chktex/chktex-1.7.2.tar.gz"
sha256 "d7f37985e3a122990f2a29fe7cac5d1f31acb1e50035457ef7ceb07c30550158"
depends_on :tex
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.tex").write <<-EOS.undent
\begin{document}
Hello world
\end{document}
EOS
system bin/"chktex", "test.tex"
end
end

View file

@ -1,15 +0,0 @@
require 'formula'
class LatexMk < Formula
homepage 'http://latex-mk.sourceforge.net/index.html'
url 'https://downloads.sourceforge.net/project/latex-mk/latex-mk/latex-mk-2.1/latex-mk-2.1.tar.gz'
sha1 '8460fd1f3c716e5759828c2a5af76eeafbce8d10'
depends_on :tex
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end

View file

@ -1,17 +0,0 @@
class Pdfjam < Formula
homepage "https://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam"
url "https://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam/pdfjam_208.tgz"
sha256 "c731c598cfad076c985526ff89cbf34423a216101aa5e2d753a71de119ecc0f3"
version "2.08"
depends_on :tex
def install
bin.install Dir["bin/*"]
man.install "man1"
end
test do
system "#{bin}/pdfjam", "-h"
end
end

View file

@ -1,18 +0,0 @@
class Pplatex < Formula
homepage "http://www.stefant.org/web/projects/software/pplatex.html"
url "https://dl.dropbox.com/u/12697903/pplatex/pplatex-1.0-rc1-src.tar.gz"
sha1 "d437c64a8263eeb45ded4f57df8cce29080a92d0"
depends_on "scons" => :build
depends_on "pcre"
depends_on :tex
def install
scons "PCREPATH=#{Formula["pcre"].opt_prefix}"
bin.install "bin/pplatex", "bin/ppdflatex"
end
test do
system "#{bin}/pplatex", "-h"
end
end