SUMMARY="Post-quantum cryptography tool"
DESCRIPTION="GnuPG-like unix program for encryption and signing that uses only \
quantum-computer-resistant algorithms"
HOMEPAGE="http://e-x-a.org/codecrypt"
COPYRIGHT="2013-2016 Mirek Kratochvil"
LICENSE="GNU GPL v3
	GNU LGPL v3
	"
REVISION="5"
SOURCE_URI="http://e-x-a.org/codecrypt/files/codecrypt-$portVersion.tar.gz"
CHECKSUM_SHA256="3be7c2a548aa336dbac706c3cab2071664d02b11652c16c02a8b4fb5cac6bc88"
PATCHES="codecrypt-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	codecrypt$secondaryArchSuffix = $portVersion
	cmd:ccr$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcryptopp$secondaryArchSuffix
	lib:libfftw3$secondaryArchSuffix
	lib:libgmp$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcryptopp$secondaryArchSuffix
	devel:libfftw3$secondaryArchSuffix
	devel:libgmp$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:cmp
	cmd:g++$secondaryArchSuffix
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	chmod +x configure
	CPPFLAGS="-D_BSD_SOURCE" LIBS="-lbsd" runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	install -d -m 755 "$docDir"
	install -t "$docDir" -m 644 README
}
