Files
haikuports/net-libs/nettle/nettle-3.4.recipe
2017-11-20 20:42:06 +01:00

88 lines
1.9 KiB
Bash

SUMMARY="Low-level cryptographic library"
DESCRIPTION="Nettle is a cryptographic library that is designed to fit easily \
in more or less any context: In crypto toolkits for object-oriented languages \
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel \
space."
HOMEPAGE="https://www.lysator.liu.se/~nisse/nettle/"
COPYRIGHT="2001-2016 Niels Möller"
LICENSE="GNU GPL v2
GNU GPL v3
GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://ftp.gnu.org/gnu/nettle/nettle-$portVersion.tar.gz"
CHECKSUM_SHA256="ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94"
PATCHES="nettle-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
nettle$secondaryArchSuffix = $portVersion
lib:libnettle$secondaryArchSuffix = 6.4 compat >= 6
lib:libhogweed$secondaryArchSuffix = 4.4 compat >= 4
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:nettle_hash
cmd:nettle_lfib_stream
cmd:nettle_pbkdf2
cmd:pkcs1_conv
cmd:sexp_conv
"
fi
REQUIRES="
haiku$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
"
PROVIDES_devel="
nettle${secondaryArchSuffix}_devel = $portVersion
devel:libnettle$secondaryArchSuffix = 6.4 compat >= 6
devel:libhogweed$secondaryArchSuffix = 4.4 compat >= 4
"
REQUIRES_devel="
nettle$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgmp$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
"
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libnettle libhogweed
fixPkgconfig
packageEntries devel $developDir
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir
rm -rf $documentationDir
fi
}
TEST()
{
LIBRARY_PATH="$sourceDir/.lib:$LIBRARY_PATH" make check
}