2014-03-28 00:59:50 +00:00
|
|
|
require "language/haskell"
|
|
|
|
|
|
|
|
class GitAnnex < Formula
|
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
|
|
|
homepage "https://git-annex.branchable.com/"
|
2015-04-03 03:34:36 +00:00
|
|
|
url "https://hackage.haskell.org/package/git-annex-5.20150522/git-annex-5.20150522.tar.gz"
|
|
|
|
sha256 "77208899616ed973dca26137534533f03636af6314cbdbfdc3e4e51c5efeec6a"
|
2014-03-28 00:59:50 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-02-06 22:46:44 +00:00
|
|
|
sha1 "fa9fa816e728479b6d4b3e058a6ea3544db4acc2" => :yosemite
|
|
|
|
sha1 "be634c33bc9f4aa337404e0f5cf78ec989b45e3b" => :mavericks
|
|
|
|
sha1 "bf687c017b26ac5694e466afd8fe996c7ea2c22b" => :mountain_lion
|
2014-05-06 22:52:15 +00:00
|
|
|
end
|
|
|
|
|
2015-04-03 03:34:36 +00:00
|
|
|
option "with-git-union-merge", "Build the git-union-merge tool"
|
|
|
|
|
2014-03-28 00:59:50 +00:00
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "gsasl"
|
|
|
|
depends_on "libidn"
|
|
|
|
depends_on "gnutls"
|
2015-02-06 20:45:17 +00:00
|
|
|
depends_on "quvi"
|
2014-03-28 00:59:50 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
cabal_sandbox do
|
|
|
|
cabal_install_tools "alex", "happy", "c2hs"
|
2015-04-03 03:34:36 +00:00
|
|
|
cabal_install "--only-dependencies"
|
2014-03-28 00:59:50 +00:00
|
|
|
cabal_install "--prefix=#{prefix}"
|
2015-04-03 03:34:36 +00:00
|
|
|
|
|
|
|
# this can be made the default behavior again once git-union-merge builds properly when bottling
|
|
|
|
if build.with? "git-union-merge"
|
|
|
|
system "make", "git-union-merge", "PREFIX=#{prefix}"
|
|
|
|
bin.install "git-union-merge"
|
|
|
|
system "make", "git-union-merge.1", "PREFIX=#{prefix}"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "make", "install-docs", "PREFIX=#{prefix}"
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
2015-04-03 03:34:36 +00:00
|
|
|
cabal_clean_lib
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
# make sure git can find git-annex
|
2014-07-29 08:04:59 +00:00
|
|
|
ENV.prepend_path "PATH", bin
|
2014-10-25 19:07:52 +00:00
|
|
|
system "git", "annex", "test"
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
|
|
|
end
|