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-01-20 19:24:25 +00:00
|
|
|
url 'http://sourceforge.net/projects/zsh/files/zsh-dev/4.3.17/zsh-4.3.17.tar.gz'
|
|
|
|
md5 '9074077945550d6684ebe18b3b167d52'
|
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
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
skip_clean :all
|
|
|
|
|
2012-03-19 15:29:54 +00:00
|
|
|
def options
|
|
|
|
[['--disable-etcdir', 'Disable the reading of Zsh rc files in /etc']]
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
]
|
|
|
|
|
|
|
|
args << '--disable-etcdir' if ARGV.include? '--disable-etcdir'
|
|
|
|
|
|
|
|
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
|