aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJunegunn Choi2015-01-14 00:47:27 +0900
committerMike McQuaid2015-01-14 12:36:55 +0000
commitdd7ae2a651cb56b7c8da5edc7a3a4b15008cdc45 (patch)
treee82b85f4cf7a9fea2bdea37762416b3bda686c4f /Library
parentab1e79b78f96ea2d41e6ca453ba98095a478304d (diff)
downloadhomebrew-dd7ae2a651cb56b7c8da5edc7a3a4b15008cdc45.tar.bz2
fzf 0.9.0
Closes #35828. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/fzf.rb30
1 files changed, 26 insertions, 4 deletions
diff --git a/Library/Formula/fzf.rb b/Library/Formula/fzf.rb
index a221b81b0..2916992c0 100644
--- a/Library/Formula/fzf.rb
+++ b/Library/Formula/fzf.rb
@@ -1,13 +1,35 @@
require "formula"
+require "language/go"
class Fzf < Formula
homepage "https://github.com/junegunn/fzf"
- url "https://github.com/junegunn/fzf/archive/0.8.9.tar.gz"
- sha1 "efbe5955aa09e9d94f304c6177e55060b1926e28"
+ url "https://github.com/junegunn/fzf/archive/0.9.0.tar.gz"
+ sha1 "ccf8315fa092f59bd859eaeafd72bc86afdc91cc"
+
+ depends_on "go" => :build
+
+ go_resource "github.com/junegunn/go-shellwords" do
+ url "https://github.com/junegunn/go-shellwords.git",
+ :revision => "35d512af75e283aae4ca1fc3d44b159ed66189a4"
+ end
+
+ go_resource "github.com/junegunn/go-runewidth" do
+ url "https://github.com/junegunn/go-runewidth.git",
+ :revision => "63c378b851290989b19ca955468386485f118c65"
+ end
def install
- prefix.install "install", "uninstall", "fzf", "fzf-completion.bash", "fzf-completion.zsh"
- bin.install_symlink prefix/"fzf"
+ ENV["GOPATH"] = buildpath
+ mkdir_p buildpath/"src/github.com/junegunn"
+ ln_s buildpath, buildpath/"src/github.com/junegunn/fzf"
+ Language::Go.stage_deps resources, buildpath/"src"
+
+ cd buildpath/"src/fzf" do
+ system "go", "build"
+ bin.install "fzf"
+ end
+
+ prefix.install %w[install uninstall fzf-completion.bash fzf-completion.zsh LICENSE]
(prefix/"plugin").install "plugin/fzf.vim"
end