homebrew-core/Formula/dub.rb

37 lines
953 B
Ruby
Raw Normal View History

2014-05-08 16:40:15 +00:00
require "formula"
# dub generates version information from git, when building.
# To not break this, we provide a custom download strategy.
class DubHeadDownloadStrategy < GitDownloadStrategy
def stage
@clone.cd {reset}
2014-05-08 16:40:15 +00:00
safe_system "git", "clone", @clone, "."
end
end
class Dub < Formula
2014-05-08 16:40:15 +00:00
homepage "http://code.dlang.org/about"
2014-09-23 05:53:08 +00:00
url "https://github.com/D-Programming-Language/dub/archive/v0.9.22.tar.gz"
sha1 "9a7b7c838f1241de209473c09a194d355279457b"
head "https://github.com/D-Programming-Language/dub.git", :using => DubHeadDownloadStrategy, :shallow => false
devel do
url "https://github.com/D-Programming-Language/dub/archive/v0.9.22-rc.1.tar.gz"
sha1 "8ca2ac66675ce869cbf4930e989bb6fa41dc61b8"
version "0.9.22-rc.1"
end
2014-05-08 16:40:15 +00:00
depends_on "pkg-config" => :build
depends_on "dmd" => :build
def install
system "./build.sh"
2014-05-08 16:40:15 +00:00
bin.install "bin/dub"
end
test do
system "#{bin}/dub; true"
end
end