zpython: Comments, version number & minor stuff

master
Samuel John 2013-08-08 16:01:07 +02:00
parent 7ec4aee761
commit ff3187ddd6
1 changed files with 13 additions and 4 deletions

View File

@ -9,14 +9,21 @@ class Zsh5Installed < Requirement
end
def message
"Zsh 5.x is required to install."
"Zsh 5.x is required to install. Consider `brew install zsh`."
end
end
class Zpython < Formula
homepage 'https://bitbucket.org/ZyX_I/zsh'
url 'http://www.zsh.org/pub/zsh-5.0.2.tar.bz2'
mirror 'http://sourceforge.net/projects/zsh/files/zsh/5.0.2/zsh-5.0.2.tar.bz2'
url 'http://downloads.sourceforge.net/project/zsh/zsh/5.0.2/zsh-5.0.2.tar.bz2'
# We prepend `00-` for the first version of the zpython module, which is
# itself a patch on top of zsh and does not have own version number yes.
# Hoping that upstream will provide tags that we could download properly.
# Starting here with `00-`, so that once we get tags for the upstream
# repository at https://bitbucket.org/ZyX_I/zsh.git, brew outdated will
# be able to tell us to upgrade zpython.
version '00-5.0.2'
sha1 '9f55ecaaae7cdc1495f91237ba2ec087777a4ad9'
head 'https://bitbucket.org/ZyX_I/zsh.git', :branch => 'zpython'
@ -26,6 +33,8 @@ class Zpython < Formula
depends_on :autoconf => :build
def patches
# Note, non-head version is completly implemented in this lengthy patch
# later on, we hope to use https://bitbucket.org/ZyX_I/zsh.git to download a tagged release.
{:p1 => "https://gist.github.com/felixbuenemann/5790777/raw/cb5ea3b34617174e50fd3972792ec0944959de3c/zpython.patch"}
end unless build.head?
@ -45,7 +54,7 @@ class Zpython < Formula
(lib/"zpython/zsh").install "Src/Modules/zpython.so"
end
def test
test do
system "zsh -c 'MODULE_PATH=#{HOMEBREW_PREFIX}/lib/zpython zmodload zsh/zpython && zpython print'"
end
@ -53,7 +62,7 @@ class Zpython < Formula
To use the zpython module in zsh you need to
add the following line to your .zshrc:
module_path=($module_path #{HOMEBREW_PREFIX}/lib/zpython)
module_path=($module_path #{HOMEBREW_PREFIX}/lib/zpython)
If you want to use this with powerline, make sure you set
it early in .zshrc, before your prompt gets initialized.