aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorSorin Ionescu2012-03-19 11:29:54 -0400
committerJack Nagel2012-04-24 23:52:34 -0500
commitfdd721ff23f8dae401f96973390388b32d84af9e (patch)
tree09c53b71c1f8d8b3f4261ad406f1ebb1328e3309 /Library/Formula
parentd9feece16ec73a1cad2f552d00db3e6c0427ba91 (diff)
downloadhomebrew-fdd721ff23f8dae401f96973390388b32d84af9e.tar.bz2
zsh: make the disabling of /etc optional
Closes #11056. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/zsh.rb44
1 files changed, 31 insertions, 13 deletions
diff --git a/Library/Formula/zsh.rb b/Library/Formula/zsh.rb
index 60294a443..fc1ada31f 100644
--- a/Library/Formula/zsh.rb
+++ b/Library/Formula/zsh.rb
@@ -10,20 +10,29 @@ class Zsh < Formula
skip_clean :all
+ def options
+ [['--disable-etcdir', 'Disable the reading of Zsh rc files in /etc']]
+ end
+
def install
- system "./configure", "--prefix=#{prefix}",
- "--disable-etcdir",
- "--enable-fndir=#{share}/zsh/functions",
- "--enable-site-fndir=#{share}/zsh/site-functions",
- "--enable-scriptdir=#{share}/zsh/scripts",
- "--enable-site-scriptdir=#{share}/zsh/site-scripts",
- "--enable-cap",
- "--enable-function-subdirs",
- "--enable-maildir-support",
- "--enable-multibyte",
- "--enable-pcre",
- "--enable-zsh-secure-free",
- "--with-tcsetpgrp"
+ args = %W[
+ -prefix=#{prefix}
+ --enable-fndir=#{share}/zsh/functions
+ --enable-site-fndir=#{share}/zsh/site-functions
+ --enable-scriptdir=#{share}/zsh/scripts
+ --enable-site-scriptdir=#{share}/zsh/site-scripts
+ --enable-cap
+ --enable-function-subdirs
+ --enable-maildir-support
+ --enable-multibyte
+ --enable-pcre
+ --enable-zsh-secure-free
+ --with-tcsetpgrp
+ ]
+
+ args << '--disable-etcdir' if ARGV.include? '--disable-etcdir'
+
+ system "./configure", *args
# Do not version installation directories.
inreplace ["Makefile", "Src/Makefile"],
@@ -38,6 +47,15 @@ class Zsh < Formula
def caveats; <<-EOS.undent
To use this build of Zsh as your login shell, add it to /etc/shells.
+
+ 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
EOS
end
end