2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-09 14:11:58 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libgcrypt < Formula
|
2012-02-20 23:25:42 +00:00
|
|
|
homepage 'http://gnupg.org/'
|
2011-07-01 23:22:00 +00:00
|
|
|
url 'ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2'
|
|
|
|
sha1 '3e776d44375dc1a710560b98ae8437d5da6e32cf'
|
2009-09-09 14:11:58 +00:00
|
|
|
|
2009-09-21 18:00:13 +00:00
|
|
|
depends_on 'libgpg-error'
|
2009-09-09 14:11:58 +00:00
|
|
|
|
2011-10-12 01:55:30 +00:00
|
|
|
def patches
|
|
|
|
if ENV.compiler == :clang
|
2012-03-11 20:36:37 +00:00
|
|
|
{:p0 =>
|
|
|
|
"https://trac.macports.org/export/85232/trunk/dports/devel/libgcrypt/files/clang-asm.patch"}
|
2011-10-12 01:55:30 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2009-09-09 14:11:58 +00:00
|
|
|
def install
|
2012-03-11 20:36:37 +00:00
|
|
|
ENV.universal_binary # build fat so wine can use it
|
2010-12-29 04:52:32 +00:00
|
|
|
|
2012-02-20 23:28:01 +00:00
|
|
|
if ENV.compiler == :clang
|
|
|
|
ENV.append 'CFLAGS', '-std=gnu89'
|
|
|
|
ENV.append 'CFLAGS', '-fheinous-gnu-extensions'
|
|
|
|
end
|
2011-10-12 01:55:30 +00:00
|
|
|
|
2009-12-21 00:04:42 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2010-02-13 11:54:21 +00:00
|
|
|
"--disable-asm",
|
|
|
|
"--with-gpg-error-prefix=#{HOMEBREW_PREFIX}"
|
2012-03-11 20:36:37 +00:00
|
|
|
# Parallel builds work, but only when run as separate steps
|
2009-12-21 00:04:42 +00:00
|
|
|
system "make"
|
2011-10-12 01:46:28 +00:00
|
|
|
system "make check"
|
2009-09-09 14:11:58 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|