-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
Signed-off-by: Adam Vandenberg <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,44 @@ | ||
require 'formula' | ||
|
||
class Zsh < Formula | ||
url 'http://sourceforge.net/projects/zsh/files/zsh-dev/4.3.15/zsh-4.3.15.tar.gz' | ||
homepage 'http://www.zsh.org/' | ||
md5 'b2e2d0a431935b408ed8ea48226f9962' | ||
url 'http://sourceforge.net/projects/zsh/files/zsh-dev/4.3.16/zsh-4.3.16.tar.gz' | ||
md5 '95fc26c6f163178484860d31de98ac13' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
depends_on 'gdbm' => :optional | ||
depends_on 'gdbm' | ||
depends_on 'libiconv' | ||
depends_on 'pcre' | ||
|
||
skip_clean :all | ||
|
||
def install | ||
system "./configure", "--prefix=#{prefix}", | ||
# don't version stuff in Homebrew, we already do that! | ||
"--disable-etcdir", | ||
"--enable-fndir=#{share}/zsh/functions", | ||
"--enable-scriptdir=#{share}/zsh/scripts" | ||
"--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" | ||
|
||
# Again, don't version installation directories | ||
# Do not version installation directories. | ||
inreplace ["Makefile", "Src/Makefile"], | ||
"$(libdir)/$(tzsh)/$(VERSION)", "$(libdir)" | ||
|
||
system "make install" | ||
end | ||
|
||
def test | ||
system "HOME=\"#{prefix}\" make check" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
end | ||
|
||
def caveats; <<-EOS.undent | ||
In order to use this build of zsh as your login shell, | ||
it must be added to /etc/shells. | ||
To use this build of Zsh as your login shell, add it to /etc/shells. | ||
EOS | ||
end | ||
end |
13 comments
on commit 73ee43f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The md5 doesn't seem to be consistent. It changes each time it is downloaded. Is sourceforge the only download url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to me like the tarball is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ curl -sO http://sourceforge.net/projects/zsh/files/zsh-dev/4.3.16/zsh-4.3.16.tar.gz
$ md5 zsh-4.3.16.tar.gz
MD5 (zsh-4.3.16.tar.gz) = 4335dfe1c5e54e489f55ae1860ee2209
$ brew upgrade
==> Upgrading zsh
==> Downloading http://sourceforge.net/projects/zsh/files/zsh-dev/4.3.16/zsh-4.3.16.tar.gz
################################################################## 100,0%
Error: MD5 mismatch
Expected: 95fc26c6f163178484860d31de98ac13
Got: c5413636ec585de1e1e89f22f3786b8f
Archive: /Users/kare/Library/Caches/Homebrew/zsh-4.3.16.tar.gz
(To retry an incomplete download, remove the file above.)
$ md5 /Users/kare/Library/Caches/Homebrew/zsh-4.3.16.tar.gz
MD5 (/Users/kare/Library/Caches/Homebrew/zsh-4.3.16.tar.gz) = c5413636ec585de1e1e89f22f3786b8f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MD5 issues here too :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kare Look at what curl gets; it's not the archive. The MD5 is fine. Maybe, they haven't pushed it to SourceForge yet. It is on the Zsh FTP server. You can get it from ftp://ftp.zsh.org and put it in the Homebrew cache directory if you can't wait. I didn't think @jacknagel was going to merge it so quick. I'll wait next time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't me ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged it, admittedly without a test compile. Shame on me. But shame on other people for submitting a not-ready pull request! ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shame on me for now waiting for the mirrors to update. :p ftp://ftp.zsh.org//pub/zsh-4.3.16.tar.gz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a possibility that --disable-etcdir
is reconsidered? Or, maybe, at least a narration is added in caveats
section about the change.
Otherwise, this update actually breaks the existing setups which rely on /etc/zshenv
, /etc/zprofile
. Most (but not all) can get away with a variant of OMZ or some local config that curated $path etc. but then again these aren't necessarily system wide config. Not relying on /etc
(apart from being the non-obvious) breaks multi-user Mac installations as well.
Ideally, I would consider having these exposed via options
(default being enabled etcdir) with:
a. an option exposed as --disable-etcdir
b. adding a note in caveat stating why /etc/zshenv
is broken (and should be moved to /etc/zprofile
etc.) or using the customary brew options
– @sorin-ionescu would know the best about the note :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why --disable-etcdir
is there is because /etc/zshenv
on Mac OS X is broken.
The idea behind /usr/libexec/path_helper
is good, but it has been implemented poorly. That utility rearranges the PATH array, which is not good when you try to override files in /bin/
, /usr/bin/
.
Homebrew is not designed for multi-users Macs. You should use another package manager tool like rudix, MacPorts, pkgsrc, and lately, the awesome Pacman.
That said, --disable-etcdir
should probably be exposed via an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree behind the rationale :) Just that, having this mentioned in the caveats
and having it exposed via options
would deal with 'element of least surprise' factor.
Homebrew might not be meant for multi-user scenario, but it kind of works reasonably for us. But that's OT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's done.
I consistently get
70f4d92d5afe67a03e6bb1fb52a8a0d3
as the md5 hash.