2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-06 12:54:29 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Zsh < Formula
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://www.zsh.org/'
|
2012-12-22 14:45:16 +00:00
|
|
|
url 'http://www.zsh.org/pub/zsh-5.0.2.tar.bz2'
|
2013-06-20 23:08:35 +00:00
|
|
|
mirror 'http://downloads.sourceforge.net/project/zsh/zsh/5.0.2/zsh-5.0.2.tar.bz2'
|
2012-12-22 14:45:16 +00:00
|
|
|
sha1 '9f55ecaaae7cdc1495f91237ba2ec087777a4ad9'
|
2009-09-06 12:54:29 +00:00
|
|
|
|
2012-01-20 19:24:25 +00:00
|
|
|
depends_on 'gdbm'
|
|
|
|
depends_on 'pcre'
|
2010-04-21 03:47:36 +00:00
|
|
|
|
2012-07-30 19:47:27 +00:00
|
|
|
option 'disable-etcdir', 'Disable the reading of Zsh rc files in /etc'
|
2012-03-19 15:29:54 +00:00
|
|
|
|
2009-09-06 12:54:29 +00:00
|
|
|
def install
|
2012-03-19 15:29:54 +00:00
|
|
|
args = %W[
|
2012-04-25 20:30:00 +00:00
|
|
|
--prefix=#{prefix}
|
2012-03-19 15:29:54 +00:00
|
|
|
--enable-fndir=#{share}/zsh/functions
|
|
|
|
--enable-scriptdir=#{share}/zsh/scripts
|
2012-04-29 06:12:26 +00:00
|
|
|
--enable-site-fndir=#{HOMEBREW_PREFIX}/share/zsh/site-functions
|
|
|
|
--enable-site-scriptdir=#{HOMEBREW_PREFIX}/share/zsh/site-scripts
|
2012-03-19 15:29:54 +00:00
|
|
|
--enable-cap
|
|
|
|
--enable-maildir-support
|
|
|
|
--enable-multibyte
|
|
|
|
--enable-pcre
|
|
|
|
--enable-zsh-secure-free
|
|
|
|
--with-tcsetpgrp
|
|
|
|
]
|
|
|
|
|
2012-07-30 19:47:27 +00:00
|
|
|
args << '--disable-etcdir' if build.include? 'disable-etcdir'
|
2012-03-19 15:29:54 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-09-06 12:54:29 +00:00
|
|
|
|
2012-01-20 19:24:25 +00:00
|
|
|
# Do not version installation directories.
|
2010-02-19 19:19:01 +00:00
|
|
|
inreplace ["Makefile", "Src/Makefile"],
|
|
|
|
"$(libdir)/$(tzsh)/$(VERSION)", "$(libdir)"
|
2009-09-06 12:54:29 +00:00
|
|
|
|
|
|
|
system "make install"
|
2013-06-18 19:50:25 +00:00
|
|
|
|
|
|
|
# See http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Accessing-On_002dLine-Help
|
|
|
|
mkdir "helpfiles" do
|
|
|
|
system "man zshall | colcrt - | perl ../Util/helpfiles"
|
|
|
|
(share+"zsh/helpfiles").install Dir["*"]
|
|
|
|
end
|
2009-09-06 12:54:29 +00:00
|
|
|
end
|
2011-06-25 18:58:56 +00:00
|
|
|
|
2012-01-20 19:24:25 +00:00
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/zsh", "--version"
|
2012-01-20 19:24:25 +00:00
|
|
|
end
|
|
|
|
|
2011-06-25 18:58:56 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2012-01-20 19:24:25 +00:00
|
|
|
To use this build of Zsh as your login shell, add it to /etc/shells.
|
2012-03-19 15:29:54 +00:00
|
|
|
|
|
|
|
If you have administrator privileges, you must fix an Apple miss
|
|
|
|
configuration in Mac OS X 10.7 Lion by renaming /etc/zshenv to
|
|
|
|
/etc/zprofile, or Zsh will have the wrong PATH when executed
|
|
|
|
non-interactively by scripts.
|
|
|
|
|
|
|
|
Alternatively, install Zsh with /etc disabled:
|
|
|
|
brew install --disable-etcdir zsh
|
2013-06-18 19:50:25 +00:00
|
|
|
|
|
|
|
Add the following to your zshrc to access the online help:
|
|
|
|
unalias run-help
|
|
|
|
autoload run-help
|
|
|
|
HELPDIR=#{HOMEBREW_PREFIX}/share/zsh/helpfiles
|
2011-06-25 18:58:56 +00:00
|
|
|
EOS
|
|
|
|
end
|
2009-09-06 12:54:29 +00:00
|
|
|
end
|