52 lines
1.7 KiB
Ruby
52 lines
1.7 KiB
Ruby
require "language/go"
|
|
|
|
class Jvgrep < Formula
|
|
desc "Grep for Japanese users of Vim"
|
|
homepage "https://github.com/mattn/jvgrep"
|
|
url "https://github.com/mattn/jvgrep/archive/v5.6.0.tar.gz"
|
|
sha256 "9d74f885c70bad15034cafb7210a5b2e1be299a5e41387bb9550471e5c52e0ea"
|
|
head "https://github.com/mattn/jvgrep.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "407b0911147336a3c3ea23c7d45b1380d3aa1bae20e86ab34bb84d1ef8ffaea0" => :mojave
|
|
sha256 "209459f0c498623c7349a57890f23fd5607a05d724a898b603a758cf0149c6c4" => :high_sierra
|
|
sha256 "52331b106d3bdcc174a2373c38e2ff0ec7c2eb2cdd35f6ccb89b46b49f25a2ab" => :sierra
|
|
sha256 "1f29a4b104991321423593f016c7d8afb554888a8358f917fce6277a457babe1" => :el_capitan
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
go_resource "github.com/mattn/go-colorable" do
|
|
url "https://github.com/mattn/go-colorable.git",
|
|
:revision => "efa589957cd060542a26d2dd7832fd6a6c6c3ade"
|
|
end
|
|
|
|
go_resource "github.com/mattn/go-isatty" do
|
|
url "https://github.com/mattn/go-isatty.git",
|
|
:revision => "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"
|
|
end
|
|
|
|
go_resource "golang.org/x/net" do
|
|
url "https://go.googlesource.com/net.git",
|
|
:revision => "5f9ae10d9af5b1c89ae6904293b14b064d4ada23"
|
|
end
|
|
|
|
go_resource "golang.org/x/text" do
|
|
url "https://go.googlesource.com/text.git",
|
|
:revision => "7922cc490dd5a7dbaa7fd5d6196b49db59ac042f"
|
|
end
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
mkdir_p buildpath/"src/github.com/mattn"
|
|
ln_s buildpath, buildpath/"src/github.com/mattn/jvgrep"
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
system "go", "build", "-o", bin/"jvgrep"
|
|
end
|
|
|
|
test do
|
|
(testpath/"Hello.txt").write("Hello World!")
|
|
system bin/"jvgrep", "Hello World!", testpath
|
|
end
|
|
end
|