Files
haikuports/net-libs/nettle/nettle-3.2.recipe
fbrosson db065e0ab4 nettle: fixes for prerequisites, provides and compat
Added missing build prerequisite: cmd:find.
Fixed the versioning of lib:libnettle and devel:libnettle.
Added lib:libhogweed and devel:libhogweed.
Added compat versions.
Added conditional provides for the 5 commands: nettle-hash, nettle-lfib-stream, nettle-pbkdf2, pkcs1-conv and sexp-conv.
2016-02-12 13:03:56 +00:00

90 lines
2.0 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 LGPL v2.1"
REVISION="1"
SOURCE_URI="ftp://ftp.gnu.org/gnu/nettle/nettle-$portVersion.tar.gz"
CHECKSUM_SHA256="ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
PROVIDES="
nettle$secondaryArchSuffix = $portVersion
lib:libnettle$secondaryArchSuffix = 6.2 compat >= 6
lib:libhogweed$secondaryArchSuffix = 4.2 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.2 compat >= 6
devel:libhogweed$secondaryArchSuffix = 4.2 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
cmd:make
"
PATCH()
{
sed -i 's/-lm/-lroot/g' $sourceDir/Makefile.in
sed -i 's/-lm/-lroot/g' $sourceDir/examples/Makefile.in
}
BUILD()
{
libtoolize --force --copy --install
autoconf
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libnettle libhogweed
fixPkgconfig
packageEntries devel $developDir
# Remove stuff we don't need in the secondary architecture base package,
# since we make it depend on the primary package.
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir
rm -rf $documentationDir
fi
}