aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorLuís Marques2014-05-02 16:52:34 +0100
committerAdam Vandenberg2014-05-08 09:39:08 -0700
commit4815f883d356c1b19a19b71403b64f82148f7ae7 (patch)
treeb63146024201020d7bcd8ef702a1e30b940637ac /Library/Formula
parent6c140ac7a22539551ca49ecb6b475db6984ffa9d (diff)
downloadhomebrew-4815f883d356c1b19a19b71403b64f82148f7ae7.tar.bz2
dub: add head and devel
Also fix version info by maintaining git history. Closes #28920. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/dub.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/Library/Formula/dub.rb b/Library/Formula/dub.rb
index 0f1eebda1..efb8d389d 100644
--- a/Library/Formula/dub.rb
+++ b/Library/Formula/dub.rb
@@ -1,11 +1,25 @@
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}
+ safe_system 'git', 'clone', @clone, '.'
+ end
+end
+
class Dub < Formula
- homepage 'http://registry.vibed.org/'
+ homepage 'http://code.dlang.org/about'
url 'https://github.com/rejectedsoftware/dub/archive/v0.9.21.tar.gz'
sha1 '7752e14f3f5add50b1c7d9138739d72b276e6abe'
- head 'https://github.com/rejectedsoftware/dub.git'
+ head 'https://github.com/rejectedsoftware/dub.git', :using => DubHeadDownloadStrategy
+
+ devel do
+ url "https://github.com/rejectedsoftware/dub/archive/v0.9.22-beta.2.tar.gz"
+ sha1 "031b525e6d10515a11c227229a47027281142e6d"
+ end
depends_on 'pkg-config' => :build
depends_on 'dmd' => :build