aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libmtp.rb
blob: 95bf7c03c9a287f34b67b8e3f038335250a5a81d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'formula'

class NoGcrypt < Requirement
  satisfy(:build_env => false) { !Formula.factory("libgcrypt").installed? }

  def message; <<-EOS.undent
    This software can fail to compile when libgcrypt is installed.
    You may need to try:
      brew unlink libgcrypt
      brew install libmtp
      brew link libgcrypt
    EOS
  end
end

class Libmtp < Formula
  homepage 'http://libmtp.sourceforge.net/'
  url 'http://sourceforge.net/projects/libmtp/files/libmtp/1.1.6/libmtp-1.1.6.tar.gz'
  sha1 'f9e55c75399fc5f4deabcdfa58e1b01b2e6e3283'

  depends_on NoGcrypt
  depends_on "pkg-config" => :build
  depends_on "libusb-compat"

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end
end