Last active
October 22, 2018 01:17
-
-
Save cstrahan/5391338 to your computer and use it in GitHub Desktop.
Formula for ZyX's zsh fork. Includes his zsh/zpython module (which might be included in upstream at some point).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Zsh < Formula | |
head "https://bitbucket.org/ZyX_I/zsh.git", :revision => 'abcf1a0ba666119b5aba48f0efd6a2f60acfc3c4' | |
homepage 'http://www.zsh.org/' | |
version '5.0.2' | |
depends_on 'gdbm' | |
depends_on 'pcre' | |
depends_on :python | |
option 'disable-etcdir', 'Disable the reading of Zsh rc files in /etc' | |
def install | |
args = %W[ | |
--prefix=#{prefix} | |
--enable-fndir=#{share}/zsh/functions | |
--enable-scriptdir=#{share}/zsh/scripts | |
--enable-site-fndir=#{HOMEBREW_PREFIX}/share/zsh/site-functions | |
--enable-site-scriptdir=#{HOMEBREW_PREFIX}/share/zsh/site-scripts | |
--enable-cap | |
--enable-maildir-support | |
--enable-multibyte | |
--enable-pcre | |
--enable-zsh-secure-free | |
--with-tcsetpgrp | |
] | |
args << '--disable-etcdir' if build.include? 'disable-etcdir' | |
system "PATH=/usr/local/bin:$PATH ./Util/preconfig" | |
system "./configure", *args | |
# Do not version installation directories. | |
inreplace ["Makefile", "Src/Makefile"], | |
"$(libdir)/$(tzsh)/$(VERSION)", "$(libdir)" | |
system "make install" | |
end | |
def test | |
system "#{bin}/zsh", "--version" | |
end | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment