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-07-23 11:21:19 +00:00
|
|
|
url 'http://www.zsh.org/pub/zsh-5.0.0.tar.bz2'
|
|
|
|
sha1 '692669243433c55384a54b397a1cc926e582e9f2'
|
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"
|
|
|
|
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
|
2011-06-25 18:58:56 +00:00
|
|
|
EOS
|
|
|
|
end
|
2009-09-06 12:54:29 +00:00
|
|
|
end
|