2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-01 00:33:33 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gnupg < Formula
|
2010-07-01 05:02:09 +00:00
|
|
|
homepage 'http://www.gnupg.org/'
|
2013-10-05 18:12:53 +00:00
|
|
|
url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.15.tar.bz2'
|
|
|
|
sha1 '63ebf0ab375150903c65738070e4105200197fd4'
|
2010-11-01 18:26:00 +00:00
|
|
|
|
2012-08-13 00:02:34 +00:00
|
|
|
option '8192', 'Build with support for private keys of up to 8192 bits'
|
2009-09-01 00:33:33 +00:00
|
|
|
|
2012-10-23 21:32:53 +00:00
|
|
|
def cflags
|
|
|
|
cflags = ENV.cflags.to_s
|
|
|
|
cflags += ' -std=gnu89 -fheinous-gnu-extensions' if ENV.compiler == :clang
|
|
|
|
cflags
|
|
|
|
end
|
2012-02-19 07:05:25 +00:00
|
|
|
|
2012-10-23 21:32:53 +00:00
|
|
|
def install
|
2012-08-13 00:02:34 +00:00
|
|
|
inreplace 'g10/keygen.c', 'max=4096', 'max=8192' if build.include? '8192'
|
2011-02-10 19:11:09 +00:00
|
|
|
|
2010-10-18 17:40:01 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2010-07-01 05:02:09 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-asm"
|
2012-10-23 21:32:53 +00:00
|
|
|
system "make", "CFLAGS=#{cflags}"
|
2009-09-01 00:33:33 +00:00
|
|
|
system "make check"
|
|
|
|
|
2010-07-01 05:02:09 +00:00
|
|
|
# we need to create these directories because the install target has the
|
2009-09-09 14:11:58 +00:00
|
|
|
# dependency order wrong
|
2013-02-17 07:01:46 +00:00
|
|
|
[bin, libexec/'gnupg'].each(&:mkpath)
|
2009-09-01 00:33:33 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|