diff options
| author | Jack Nagel | 2011-12-17 14:50:50 -0600 |
|---|---|---|
| committer | Jack Nagel | 2011-12-17 17:24:43 -0600 |
| commit | e84bc65e938beda3bcbf0e3d931557e379f83ac6 (patch) | |
| tree | 68fec7ab0722dc2b564395ebb9453e379a1dce9a /Library/Formula/gnupg2.rb | |
| parent | be8c650cbb8b7973a91e4ab1c466a52478d63a69 (diff) | |
| download | homebrew-e84bc65e938beda3bcbf0e3d931557e379f83ac6.tar.bz2 | |
New formula: gnupg2
gnupg2 is designed coexist with gnupg 1.x. The formula contains a patch
to keep things like documentation and language data from conflicting
with gnupg 1.x by namespacing everything as 'gnupg2'.
gpg-agent is currently an external package in Homebrew, as it can also
be used with gnupg 1.x; so in the formula we disable building the agent
and declare a dependency on it instead.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/gnupg2.rb')
| -rw-r--r-- | Library/Formula/gnupg2.rb | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Library/Formula/gnupg2.rb b/Library/Formula/gnupg2.rb new file mode 100644 index 000000000..c38533a44 --- /dev/null +++ b/Library/Formula/gnupg2.rb @@ -0,0 +1,93 @@ +require 'formula' + +class Gnupg2 < Formula + url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-2.0.18.tar.bz2' + homepage 'http://www.gnupg.org/' + sha1 '5ec2f718760cc3121970a140aeea004b64545c46' + + depends_on 'libgpg-error' + depends_on 'libgcrypt' + depends_on 'libksba' + depends_on 'libassuan' + depends_on 'pinentry' + depends_on 'pth' + depends_on 'gpg-agent' + depends_on 'dirmngr' => :optional + depends_on 'libusb-compat' => :optional + + def patches + # fix runtime data location + # change package name to 'gnupg2' to avoid conflicts + # fix tests for external gpg-agent + DATA + end + + def install + (var+'run').mkpath + + # so we don't use Clang's internal stdint.h + ENV['gl_cv_absolute_stdint_h'] = '/usr/include/stdint.h' + + system "./configure", "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--enable-symcryptrun", + "--disable-agent" + system "make" + system "make check" + system "make install" + + # conflicts with a manpage from the 1.x formula, and + # gpg-zip isn't installed by this formula anyway + rm man1+'gpg-zip.1' + end +end + +__END__ +diff --git a/common/homedir.c b/common/homedir.c +index 5f2e31e..d797b68 100644 +--- a/common/homedir.c ++++ b/common/homedir.c +@@ -365,7 +365,7 @@ dirmngr_socket_name (void) + } + return name; + #else /*!HAVE_W32_SYSTEM*/ +- return "/var/run/dirmngr/socket"; ++ return "HOMEBREW_PREFIX/var/run/dirmngr/socket"; + #endif /*!HAVE_W32_SYSTEM*/ + } + + +diff --git a/configure b/configure +index 3df3900..b102aec 100755 +--- a/configure ++++ b/configure +@@ -558,8 +558,8 @@ MFLAGS= + MAKEFLAGS= + + # Identity of this package. +-PACKAGE_NAME='gnupg' +-PACKAGE_TARNAME='gnupg' ++PACKAGE_NAME='gnupg2' ++PACKAGE_TARNAME='gnupg2' + PACKAGE_VERSION='2.0.18' + PACKAGE_STRING='gnupg 2.0.18' + PACKAGE_BUGREPORT='http://bugs.gnupg.org' + +diff --git a/tests/openpgp/Makefile.in b/tests/openpgp/Makefile.in +index ab2f10f..1d3cace 100644 +--- a/tests/openpgp/Makefile.in ++++ b/tests/openpgp/Makefile.in +@@ -286,11 +286,11 @@ GPG_IMPORT = ../../g10/gpg2 --homedir . \ + + + # Programs required before we can run these tests. +-required_pgms = ../../g10/gpg2 ../../agent/gpg-agent \ ++required_pgms = ../../g10/gpg2 \ + ../../tools/gpg-connect-agent + + TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= LC_ALL=C \ +- ../../agent/gpg-agent --quiet --daemon sh ++ gpg-agent --quiet --daemon sh + + TESTS = version.test mds.test \ + decrypt.test decrypt-dsa.test \ |
