2014-03-28 00:59:50 +00:00
|
|
|
require "formula"
|
|
|
|
require "language/haskell"
|
|
|
|
|
|
|
|
class GitAnnex < Formula
|
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
|
|
|
homepage "https://git-annex.branchable.com/"
|
2014-11-06 06:06:15 +00:00
|
|
|
url "https://hackage.haskell.org/package/git-annex-5.20141125/git-annex-5.20141125.tar.gz"
|
|
|
|
sha1 "45445bfef32f380624cbf415813a1a69010ecb13"
|
2014-03-28 00:59:50 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-11-07 16:03:06 +00:00
|
|
|
sha1 "dc9c4df9d7eb9f33cacc1e26e4df4d63f2d3c105" => :yosemite
|
|
|
|
sha1 "18bc46d6db31fc6e55816272d4b9bb392a182ebf" => :mavericks
|
|
|
|
sha1 "e0bba76cda3e7940a3645c68290dd54782e4cef4" => :mountain_lion
|
2014-05-06 22:52:15 +00:00
|
|
|
end
|
|
|
|
|
2014-03-28 00:59:50 +00:00
|
|
|
depends_on "gcc" => :build
|
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "gsasl"
|
|
|
|
depends_on "libidn"
|
|
|
|
depends_on "gnutls"
|
|
|
|
depends_on "gmp"
|
|
|
|
|
2014-10-16 02:36:41 +00:00
|
|
|
fails_with(:clang) { build 425 } # clang segfaults on Lion
|
|
|
|
|
2014-03-28 00:59:50 +00:00
|
|
|
def install
|
|
|
|
cabal_sandbox do
|
|
|
|
cabal_install_tools "alex", "happy", "c2hs"
|
|
|
|
# gcc required to build gnuidn
|
2014-07-24 07:44:44 +00:00
|
|
|
gcc = Formula["gcc"]
|
|
|
|
cabal_install "--with-gcc=#{gcc.bin}/gcc-#{gcc.version_suffix}",
|
|
|
|
"--only-dependencies"
|
2014-03-28 00:59:50 +00:00
|
|
|
cabal_install "--prefix=#{prefix}"
|
|
|
|
end
|
2014-06-15 20:58:10 +00:00
|
|
|
bin.install_symlink "git-annex" => "git-annex-shell"
|
|
|
|
system "make", "git-annex.1", "git-annex-shell.1", "git-union-merge.1"
|
|
|
|
man1.install "git-annex.1", "git-annex-shell.1", "git-union-merge.1"
|
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
|