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-12-18 23:13:46 +00:00
|
|
|
url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.16.tar.bz2'
|
2013-12-29 21:15:42 +00:00
|
|
|
mirror 'http://mirror.switch.ch/ftp/mirror/gnupg/gnupg/gnupg-1.4.16.tar.bz2'
|
2013-12-18 23:13:46 +00:00
|
|
|
sha1 '0bf5e475f3eb6f33d5474d017fe5bf66070e43f4'
|
2010-11-01 18:26:00 +00:00
|
|
|
|
2014-02-22 22:42:59 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "eb0eb56c77ee61a43ec63393cf63493f0a04c4aa" => :mavericks
|
|
|
|
sha1 "3f2e2ebd287d57d5c89565d087cfbaa1e2586f54" => :mountain_lion
|
|
|
|
sha1 "a077b3a698ef320d82a05d5a538ec4860504251c" => :lion
|
|
|
|
end
|
|
|
|
|
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
|