Files
haikuports/dev-libs/wolfssl/wolfssl-5.7.6.recipe
2025-01-02 12:45:03 +01:00

84 lines
1.9 KiB
Bash

SUMMARY="An embedded SSL implementation"
DESCRIPTION="The wolfSSL embedded SSL library (formerly CyaSSL) is a \
lightweight SSL/TLS library written in ANSI C and targeted for embedded, \
RTOS, and resource-constrained environments - primarily because of its \
small size, speed, and feature set."
HOMEPAGE="https://www.wolfssl.com/"
COPYRIGHT="2006-2024 wolfSSL Inc."
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/wolfSSL/wolfssl/archive/v$portVersion-stable.tar.gz"
CHECKSUM_SHA256="52b1e439e30d1ed8162a16308a8525a862183b67aa30373b11166ecbab000d63"
PATCHES="wolfssl-$portVersion.patchset"
SOURCE_FILENAME="wolfssl-$portVersion.tar.gz"
SOURCE_DIR="wolfssl-$portVersion-stable"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="43.0.0"
libVersionCompat="$portVersion compat >= ${portVersion%%.*}"
PROVIDES="
wolfssl$secondaryArchSuffix = $portVersion
lib:libwolfssl$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
wolfssl${secondaryArchSuffix}_devel
devel:libwolfssl$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
wolfssl$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage wolfssl$secondaryArchSuffix \
"$libDir"/libwolfssl.so.$libVersion
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$commandBinDir
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libwolfssl
fixPkgconfig
packageEntries devel \
"$developDir" \
"$documentationDir" \
"$libDir"/cmake
}
TEST()
{
ctest --test-dir build --output-on-failure
}