# $Id: Portfile,v 1.39 2006/07/06 00:41:39 landonf Exp $

PortSystem	1.0
name		gnupg
version		1.4.4
categories	mail security
maintainers	waqar@opendarwin.org
description	GNU pretty-good-privacy package
long_description	\
	GnuPG is a complete and free replacement for PGP. Because 	\
	it does not use the patented IDEA algorithm, it can be used 	\
	without any restrictions. GnuPG is a RFC2440 (OpenPGP) 		\
	compliant application.
homepage	http://www.gnupg.org
platforms	darwin freebsd sunos
master_sites	http://ftp.gnupg.org/gcrypt/gnupg/		\
		ftp://ftp.gnupg.org/gcrypt/gnupg/ 		\
		ftp://ftp.planetmirror.com/pub/gnupg/ 		\
		ftp://gd.tuwien.ac.at/privacy/gnupg/gnupg/ 	\
		ftp://ftp.jyu.fi/pub/crypt/gcrypt/gnupg/ 	\
		ftp://ftp.freenet.de/pub/ftp.gnupg.org/gcrypt/gnupg/

use_bzip2	yes
checksums	${distfiles} md5 fab063f2218dee3f9af78dd55b521849 \
		${distfiles} sha1 3414d67f22973576f31e354f44859bafbccb7eee 

configure.args	--mandir=${prefix}/share/man 		\
		--infodir=${prefix}/share/info 		\
		--disable-asm --disable-dynload 	\
		--with-libiconv-prefix=${prefix} 	\
		--with-libintl-prefix=${prefix} 	\
		--with-zlib=${prefix} 			\
		--with-bzip2=${prefix}

depends_lib	port:libiconv 	\
		port:gettext 	\
		port:zlib 	\
		port:bzip2 

test.run	yes
test.dir	${worksrcpath}/checks
test.target 	check

variant idea 	{
	patch_sites-append	http://www.gnupg.dk/contrib-dk
  	patchfiles 	idea.c.gz
  	checksums-append \
      			idea.c.gz md5 9dc3bc086824a8c7a331f35e09a3e57f
  	patch.dir 	${worksrcpath}/cipher
  	patch.cmd 	cat
   	patch.pre_args 	> idea.c
}

platform sunos	{
	configure.args-delete --disable-asm --disable-dynload
}

post-destroot	{
	file delete -force ${destroot}${prefix}/share/info/dir \
		${destroot}${prefix}/share/locale/locale.alias \
		${destroot}${prefix}/lib/charset.alias
}
