olm, bump version, move to dev-libs (#11495)

This commit is contained in:
Schrijvers Luc
2024-12-20 08:59:04 +01:00
committed by GitHub
parent cebb8c3128
commit e8afeb6e3a
2 changed files with 32 additions and 16 deletions

View File

@@ -0,0 +1,73 @@
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="1"
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 \
-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
}

View File

@@ -0,0 +1,22 @@
From 44da8be918b31762001a6c8bc7a3fc2a6b04c9d7 Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Fri, 20 Dec 2024 08:23:58 +0100
Subject: Turn off CMAKE_POSITION_INDEPENDENT_CODE
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 951965f..b8cd972 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
if(NOT CMAKE_BUILD_TYPE)
--
2.45.2