pup: depend on gox at build time
Closes #22020. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
28a3efcf6f
commit
11d4eaf80a
1 changed files with 1 additions and 16 deletions
|
@ -1,5 +1,3 @@
|
||||||
require "language/go"
|
|
||||||
|
|
||||||
class Pup < Formula
|
class Pup < Formula
|
||||||
desc "Parse HTML at the command-line"
|
desc "Parse HTML at the command-line"
|
||||||
homepage "https://github.com/EricChiang/pup"
|
homepage "https://github.com/EricChiang/pup"
|
||||||
|
@ -17,26 +15,13 @@ class Pup < Formula
|
||||||
end
|
end
|
||||||
|
|
||||||
depends_on "go" => :build
|
depends_on "go" => :build
|
||||||
|
depends_on "gox" => :build
|
||||||
go_resource "github.com/mitchellh/iochan" do
|
|
||||||
url "https://github.com/mitchellh/iochan.git",
|
|
||||||
:revision => "87b45ffd0e9581375c491fef3d32130bb15c5bd7"
|
|
||||||
end
|
|
||||||
|
|
||||||
go_resource "github.com/mitchellh/gox" do
|
|
||||||
url "https://github.com/mitchellh/gox.git",
|
|
||||||
:revision => "6e9ee79eab7bb1b84155379b3f94ff9a87b344e4"
|
|
||||||
end
|
|
||||||
|
|
||||||
def install
|
def install
|
||||||
ENV["GOPATH"] = buildpath
|
ENV["GOPATH"] = buildpath
|
||||||
dir = buildpath/"src/github.com/ericchiang/pup"
|
dir = buildpath/"src/github.com/ericchiang/pup"
|
||||||
dir.install buildpath.children
|
dir.install buildpath.children
|
||||||
|
|
||||||
Language::Go.stage_deps resources, buildpath/"src"
|
|
||||||
ENV.prepend_create_path "PATH", buildpath/"bin"
|
|
||||||
cd("src/github.com/mitchellh/gox") { system "go", "install" }
|
|
||||||
|
|
||||||
cd dir do
|
cd dir do
|
||||||
arch = MacOS.prefer_64_bit? ? "amd64" : "386"
|
arch = MacOS.prefer_64_bit? ? "amd64" : "386"
|
||||||
system "gox", "-arch", arch, "-os", "darwin", "./..."
|
system "gox", "-arch", arch, "-os", "darwin", "./..."
|
||||||
|
|
Loading…
Reference in a new issue