Files
haikuports/dev-libs/olm/olm-3.2.16.recipe
2025-12-08 16:28:46 +01:00

75 lines
1.7 KiB
Bash

SUMMARY="Implementation of the olm and megolm cryptographic ratchets"
DESCRIPTION="An implementation of the Double Ratchet cryptographic ratchet, \
written in C and C++11 and exposed as a C API.
This library also includes an implementation of the Megolm cryptographic
ratchet."
HOMEPAGE="https://gitlab.matrix.org/matrix-org/olm"
COPYRIGHT="2015-2016 OpenMarket Ltd.
2018-2019 New Vector Ltd."
LICENSE="Apache v2"
REVISION="2"
SOURCE_URI="https://gitlab.matrix.org/matrix-org/olm/-/archive/$portVersion/olm-$portVersion.tar.bz2"
CHECKSUM_SHA256="327cfcb81ef0c42f4b1d5c24b25d56932b57d64ccd9f00ed919a893a43333411"
PATCHES="olm-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
olm$secondaryArchSuffix = $portVersion
lib:libolm$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
olm${secondaryArchSuffix}_devel = $portVersion
devel:libolm$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
olm$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage olm$secondaryArchSuffix \
"$libDir"/libolm.so.$libVersion
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DOLM_TESTS=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libolm
fixPkgconfig
packageEntries devel \
"$developDir" \
"$libDir"/cmake
}
TEST()
{
ctest --test-dir build/tests --output-on-failure
}