2014-05-08 16:40:15 +00:00
|
|
|
require "formula"
|
2013-06-20 22:09:37 +00:00
|
|
|
|
2014-05-02 15:52:34 +00:00
|
|
|
# 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, "."
|
2014-05-02 15:52:34 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-06-20 22:09:37 +00:00
|
|
|
class Dub < Formula
|
2014-05-08 16:40:15 +00:00
|
|
|
homepage "http://code.dlang.org/about"
|
2014-08-07 05:40:20 +00:00
|
|
|
url "https://github.com/D-Programming-Language/dub/archive/v0.9.21.tar.gz"
|
2014-05-08 16:40:15 +00:00
|
|
|
sha1 "7752e14f3f5add50b1c7d9138739d72b276e6abe"
|
2013-06-20 22:09:37 +00:00
|
|
|
|
2014-08-07 05:40:20 +00:00
|
|
|
head "https://github.com/D-Programming-Language/dub.git", :using => DubHeadDownloadStrategy, :shallow => false
|
2014-05-02 15:52:34 +00:00
|
|
|
|
|
|
|
devel do
|
2014-08-07 05:40:20 +00:00
|
|
|
url "https://github.com/D-Programming-Language/dub/archive/v0.9.22-rc.1.tar.gz"
|
|
|
|
sha1 "8ca2ac66675ce869cbf4930e989bb6fa41dc61b8"
|
|
|
|
version "0.9.22-rc.1"
|
2014-05-02 15:52:34 +00:00
|
|
|
end
|
2013-06-20 22:09:37 +00:00
|
|
|
|
2014-05-08 16:40:15 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "dmd" => :build
|
2013-06-20 22:09:37 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "./build.sh"
|
2014-05-08 16:40:15 +00:00
|
|
|
bin.install "bin/dub"
|
2013-06-20 22:09:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/dub; true"
|
|
|
|
end
|
|
|
|
end
|