2011-12-17 20:50:50 +00:00
|
|
|
class Gnupg2 < Formula
|
2014-06-04 02:03:03 +00:00
|
|
|
homepage "https://www.gnupg.org/"
|
2014-08-13 08:10:59 +00:00
|
|
|
url "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-2.0.26.tar.bz2"
|
|
|
|
mirror "ftp://ftp.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnupg/gnupg-2.0.26.tar.bz2"
|
2014-08-24 19:24:12 +00:00
|
|
|
mirror "ftp://mirror.tje.me.uk/pub/mirrors/ftp.gnupg.org/gnupg/gnupg-2.0.26.tar.bz2"
|
2014-08-13 08:10:59 +00:00
|
|
|
sha1 "3ff5b38152c919724fd09cf2f17df704272ba192"
|
2014-10-22 01:27:55 +00:00
|
|
|
revision 1
|
2011-12-17 20:50:50 +00:00
|
|
|
|
2014-07-01 10:48:03 +00:00
|
|
|
bottle do
|
2014-10-23 07:47:25 +00:00
|
|
|
revision 2
|
|
|
|
sha1 "ccbafc88773f15b92e7ab931ec1be83fb27b58c2" => :yosemite
|
|
|
|
sha1 "1735c876de43f9635e191e6b1f1ed3f1ae04068d" => :mavericks
|
|
|
|
sha1 "ad0e8129ffbaf615f8b43aa93b89eb1cdc517f1f" => :mountain_lion
|
2014-07-01 10:48:03 +00:00
|
|
|
end
|
|
|
|
|
2014-06-04 02:03:03 +00:00
|
|
|
depends_on "libgpg-error"
|
|
|
|
depends_on "libgcrypt"
|
|
|
|
depends_on "libksba"
|
|
|
|
depends_on "libassuan"
|
|
|
|
depends_on "pinentry"
|
2014-07-03 02:50:45 +00:00
|
|
|
depends_on "pth"
|
2014-06-04 02:03:03 +00:00
|
|
|
depends_on "gpg-agent"
|
2014-10-22 01:27:55 +00:00
|
|
|
depends_on "curl" if MacOS.version <= :mavericks
|
2014-06-04 02:03:03 +00:00
|
|
|
depends_on "dirmngr" => :recommended
|
|
|
|
depends_on "libusb-compat" => :recommended
|
|
|
|
depends_on "readline" => :optional
|
2011-12-17 20:50:50 +00:00
|
|
|
|
|
|
|
def install
|
2014-08-25 14:36:42 +00:00
|
|
|
# Adjust package name to fit our scheme of packaging both gnupg 1.x and
|
|
|
|
# 2.x, and gpg-agent separately, and adjust tests to fit this scheme
|
|
|
|
inreplace "configure" do |s|
|
|
|
|
s.gsub! "PACKAGE_NAME='gnupg'", "PACKAGE_NAME='gnupg2'"
|
|
|
|
s.gsub! "PACKAGE_TARNAME='gnupg'", "PACKAGE_TARNAME='gnupg2'"
|
|
|
|
end
|
|
|
|
inreplace "tests/openpgp/Makefile.in" do |s|
|
|
|
|
s.gsub! "required_pgms = ../../g10/gpg2 ../../agent/gpg-agent",
|
|
|
|
"required_pgms = ../../g10/gpg2"
|
|
|
|
s.gsub! "../../agent/gpg-agent --quiet --daemon sh",
|
|
|
|
"gpg-agent --quiet --daemon sh"
|
|
|
|
end
|
2014-10-09 02:23:26 +00:00
|
|
|
inreplace "tools/gpgkey2ssh.c", "gpg --list-keys", "gpg2 --list-keys"
|
2014-08-25 14:36:42 +00:00
|
|
|
|
2014-06-04 02:03:03 +00:00
|
|
|
(var/"run").mkpath
|
2011-12-17 20:50:50 +00:00
|
|
|
|
2014-06-04 02:03:03 +00:00
|
|
|
ENV.append "LDFLAGS", "-lresolv"
|
2013-07-25 21:38:49 +00:00
|
|
|
|
2014-06-04 02:03:03 +00:00
|
|
|
ENV["gl_cv_absolute_stdint_h"] = "#{MacOS.sdk_path}/usr/include/stdint.h"
|
2011-12-17 20:50:50 +00:00
|
|
|
|
2014-02-25 14:29:33 +00:00
|
|
|
agent = Formula["gpg-agent"].opt_prefix
|
2014-01-29 16:31:29 +00:00
|
|
|
|
2013-07-31 16:28:13 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
2013-11-15 16:51:18 +00:00
|
|
|
--sbindir=#{bin}
|
2013-07-31 16:28:13 +00:00
|
|
|
--enable-symcryptrun
|
|
|
|
--disable-agent
|
2014-01-29 16:31:29 +00:00
|
|
|
--with-agent-pgm=#{agent}/bin/gpg-agent
|
|
|
|
--with-protect-tool-pgm=#{agent}/libexec/gpg-protect-tool
|
2013-07-31 16:28:13 +00:00
|
|
|
]
|
|
|
|
|
2014-06-04 02:03:03 +00:00
|
|
|
if build.with? "readline"
|
2014-02-25 14:29:33 +00:00
|
|
|
args << "--with-readline=#{Formula["readline"].opt_prefix}"
|
2013-07-31 16:28:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2011-12-17 20:50:50 +00:00
|
|
|
system "make"
|
2014-08-25 14:36:50 +00:00
|
|
|
system "make", "check"
|
|
|
|
system "make", "install"
|
2011-12-17 20:50:50 +00:00
|
|
|
|
2012-03-28 03:56:56 +00:00
|
|
|
# Conflicts with a manpage from the 1.x formula, and
|
2011-12-17 20:50:50 +00:00
|
|
|
# gpg-zip isn't installed by this formula anyway
|
2014-06-04 02:03:03 +00:00
|
|
|
rm man1/"gpg-zip.1"
|
2011-12-17 20:50:50 +00:00
|
|
|
end
|
2014-12-27 16:01:22 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/gpgconf"
|
|
|
|
end
|
2011-12-17 20:50:50 +00:00
|
|
|
end
|