4e4d57b77b
Closes Homebrew/homebrew#21438. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
30 lines
892 B
Ruby
30 lines
892 B
Ruby
require 'formula'
|
|
|
|
class Gnupg < Formula
|
|
homepage 'http://www.gnupg.org/'
|
|
url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.14.tar.bz2'
|
|
sha1 '6202181ba2871fb3448c751a573b4ae0c4770806'
|
|
|
|
option '8192', 'Build with support for private keys of up to 8192 bits'
|
|
|
|
def cflags
|
|
cflags = ENV.cflags.to_s
|
|
cflags += ' -std=gnu89 -fheinous-gnu-extensions' if ENV.compiler == :clang
|
|
cflags
|
|
end
|
|
|
|
def install
|
|
inreplace 'g10/keygen.c', 'max=4096', 'max=8192' if build.include? '8192'
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--disable-asm"
|
|
system "make", "CFLAGS=#{cflags}"
|
|
system "make check"
|
|
|
|
# we need to create these directories because the install target has the
|
|
# dependency order wrong
|
|
[bin, libexec/'gnupg'].each(&:mkpath)
|
|
system "make install"
|
|
end
|
|
end
|