SUMMARY="GNU's basic cryptographic library."
DESCRIPTION="
Libgcrypt is a general purpose crypto library based on the code \
used in GnuPG.
"
LICENSE="GNU LGPL v3"
COPYRIGHT="2000-2013 Free Software Foundation, Inc."
HOMEPAGE="http://directory.fsf.org/project/libgcrypt/" 
SRC_URI="ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.3.tar.bz2"
CHECKSUM_SHA256="bcf5334e7da352c45de6aec5d2084ce9a1d30029ff4a4a5da13f1848874759d1"
REVISION="2"
ARCHITECTURES="x86"

PROVIDES="
	libgcrypt = $portVersion compat >= 1.5
	lib:libgcrypt = 11.8.2 compat >= 11
	"

REQUIRES="
	haiku >= $haikuVersion
	lib:libgpg_error
	"

BUILD_REQUIRES="
	haiku_devel >= $haikuVersion
	devel:libgpg_error
	"

BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:make
	cmd:gcc
	"

PATCHES="libgcrypt-1.5.3.patch"

BUILD()
{
	autoconf
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libgcrypt

	packageEntries devel \
		$developDir $binDir
}

PROVIDES_devel="
	libgcrypt_devel = $portVersion compat >= 1.5
	devel:libgcrypt = 11.8.2 compat >= 11
	cmd:dumpsexp = $portVersion compat >= 1.5
	cmd:libgcrypt_config = $portVersion compat >= 1.5
	cmd:hmac256 = $portVersion compat >= 1.5
	"

REQUIRES_devel="
	libgcrypt == $portVersion base
	libgpg_error_devel
	"
