aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby The Builder <bob@najdan.com>2021-07-29 07:54:17 -0400
committerBart Ribbers <bribbers@disroot.org>2021-07-29 18:03:31 +0000
commit43199c290fe8556312e1729f72b9e3f47083b933 (patch)
treedceae51b12cce78f07d9db0e95a537d9e3e4e916
parentaa016b055d80dac216d03a47dbd6a453e42ee2cb (diff)
downloadaports-43199c290fe8556312e1729f72b9e3f47083b933.tar.gz
aports-43199c290fe8556312e1729f72b9e3f47083b933.tar.bz2
aports-43199c290fe8556312e1729f72b9e3f47083b933.tar.xz
community/olm: avoid function collisions
until a new tag/version is created upstream: https://github.com/matrix-org/olm/issues/47
-rw-r--r--community/olm/0001-only-export-olm-functions-to-avoid-colliding-with-ot.patch40
-rw-r--r--community/olm/0002-bypass-concatenation-issue-during-build.patch27
-rw-r--r--community/olm/APKBUILD9
3 files changed, 74 insertions, 2 deletions
diff --git a/community/olm/0001-only-export-olm-functions-to-avoid-colliding-with-ot.patch b/community/olm/0001-only-export-olm-functions-to-avoid-colliding-with-ot.patch
new file mode 100644
index 0000000000..eec10cc8f3
--- /dev/null
+++ b/community/olm/0001-only-export-olm-functions-to-avoid-colliding-with-ot.patch
@@ -0,0 +1,40 @@
+From 4b26af508480bc21222c7fa45dc557258fccfb29 Mon Sep 17 00:00:00 2001
+From: Hubert Chathi <hubertc@matrix.org>
+Date: Wed, 16 Jun 2021 15:05:19 -0400
+Subject: [PATCH 1/2] only export olm functions to avoid colliding with other
+ libraries
+
+---
+ CMakeLists.txt | 4 ++++
+ libolm.version | 4 ++++
+ 2 files changed, 8 insertions(+)
+ create mode 100644 libolm.version
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dbe3b6a..0bd5ec8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,6 +48,10 @@ add_library(olm
+ lib/curve25519-donna/curve25519-donna.c)
+ add_library(Olm::Olm ALIAS olm)
+
++# restrict the exported symbols
++set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libolm.version)
++set_target_properties(olm PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libolm.version)
++
+ target_include_directories(olm
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+diff --git a/libolm.version b/libolm.version
+new file mode 100644
+index 0000000..f93b6f2
+--- /dev/null
++++ b/libolm.version
+@@ -0,0 +1,4 @@
++{
++ global: olm*; _olm*; megolm*; _ZN3olm*;
++ local: *;
++};
+--
+2.31.1
+
diff --git a/community/olm/0002-bypass-concatenation-issue-during-build.patch b/community/olm/0002-bypass-concatenation-issue-during-build.patch
new file mode 100644
index 0000000000..20b988336c
--- /dev/null
+++ b/community/olm/0002-bypass-concatenation-issue-during-build.patch
@@ -0,0 +1,27 @@
+From 76588a4001b0527d1cf04b15bfcd70da72d06b93 Mon Sep 17 00:00:00 2001
+From: Bobby The Builder <bob@najdan.com>
+Date: Thu, 29 Jul 2021 07:43:59 -0400
+Subject: [PATCH 2/2] bypass concatenation issue during build
+
+ ld: unrecognized option '--sort-common;-Wl'
+ [CMakeFiles/olm.dir/build.make:434: libolm.so.3.2.4] Error 1
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0bd5ec8..bfe990a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,7 @@ add_library(olm
+ add_library(Olm::Olm ALIAS olm)
+
+ # restrict the exported symbols
+-set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libolm.version)
++set(CMAKE_SHARED_LINKER_FLAGS -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libolm.version)
+ set_target_properties(olm PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libolm.version)
+
+ target_include_directories(olm
+--
+2.31.1
+
diff --git a/community/olm/APKBUILD b/community/olm/APKBUILD
index f0e714ae24..fe73700f8e 100644
--- a/community/olm/APKBUILD
+++ b/community/olm/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=olm
pkgver=3.2.4
-pkgrel=0
+pkgrel=1
pkgdesc="Implementation of the olm and megolm cryptographic ratchets"
arch="all"
url="https://gitlab.matrix.org/matrix-org/olm"
@@ -19,7 +19,10 @@ checkdepends="
py3-future
py3-aspectlib
"
-source="https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.gz"
+source="https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.gz
+ 0001-only-export-olm-functions-to-avoid-colliding-with-ot.patch
+ 0002-bypass-concatenation-issue-during-build.patch
+"
subpackages="$pkgname-dev py3-olm:py3"
case "$CARCH" in
@@ -69,4 +72,6 @@ py3() {
}
sha512sums="
19fa85da108a16b938fc77033b9f0b05a58ca85183891b5b9d56ae5c963bcd90fb91fee58ab9d689131bef399538f4b0a786d7f0c1b81ceca46ddd9761bf0340 olm-3.2.4.tar.gz
+16c6a1f466dbd1f06103f6259fb8ad45e76716fe07920324a580d7d8d1d012b29c21b2370215dd166a1d802abee5ae03854325c2d5025b9a42180bd35595109b 0001-only-export-olm-functions-to-avoid-colliding-with-ot.patch
+9ae094f453e5e07f151f3ffc9be247a7b5d9704738f3a53bbd637b1f8c8458dee2e91397c17b8cfc9ceb2051a46acc77c937671c4a0a2eee52d73d6d6a767f3a 0002-bypass-concatenation-issue-during-build.patch
"