# $Id: Portfile 80354 2011-07-10 09:50:32Z ryandesign@macports.org $

PortSystem	1.0

name		gpg-agent
version		2.0.17
categories	security mail
maintainers	boeyms openmaintainer
description	GPG key agent
long_description	gpg-agent is a key management agent similar \
			in function to ssh-agent.
homepage	http://www.gnupg.org
platforms	darwin freebsd sunos
distname        gnupg-${version}
dist_subdir     gnupg2
master_sites    gnupg:gnupg

use_bzip2	yes

checksums	sha1    41ef5460417ca0a1131fc730849fe3afd49ad2de\
		rmd160  f919947a1896ac20c455534d91a3e2d3e5b60c1f

configure.args	--enable-agent-only \
		--with-pinentry-pgm=${prefix}/bin/pinentry

# glib fails to find the right stdint.h  It picks clang's internal one rather
# than the system header
configure.env   gl_cv_absolute_stdint_h=/usr/include/stdint.h

depends_lib	port:libiconv 		\
		port:gettext 		\
		port:zlib 		\
		port:bzip2 		\
		port:bison		\
		port:libassuan		\
		port:libksba		\
		port:libgcrypt		\
		port:libgpg-error	\
		port:pth		\
		port:pinentry

patchfiles	patch-po_Makevars.diff

post-destroot {
	delete ${destroot}${prefix}/share/doc/gnupg/README
}

variant no_pinentry description {Do not use pinentry to handle user input} {
	depends_lib-delete	port:pinentry
	configure.args-delete	--with-pinentry-pgm=${prefix}/bin/pinentry
}

livecheck.type  regex
livecheck.url   ftp://ftp.gnupg.org/gcrypt/gnupg/
livecheck.regex gnupg-(\\d+\\.\\d+\\.\\d+)
