blob: 95842d7a2fbbbd55f93770b2923c19d1cf7237b5 (
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 Gnupg < Formula
homepage 'http://www.gnupg.org/'
url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.13.tar.bz2'
sha1 '17a75c54d292bd0923f0a1817a1b02ded37d1de1'
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
|