libmtp: fix build in the presence of libgcrypt
This commit is contained in:
parent
7c0160f767
commit
cb2a9b4ef2
1 changed files with 2 additions and 15 deletions
|
@ -1,30 +1,17 @@
|
|||
require 'formula'
|
||||
|
||||
class NoGcrypt < Requirement
|
||||
satisfy(:build_env => false) { !Formula["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 'https://downloads.sourceforge.net/project/libmtp/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}"
|
||||
"--prefix=#{prefix}",
|
||||
"--disable-mtpz"
|
||||
system "make install"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue