aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Fontaine <antoine.fontaine@epfl.ch>2020-05-31 19:50:25 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-08-29 18:45:01 -0300
commit44c2b69713faa6672da6f6f5f4c95b89c70cd1ff (patch)
treeb43b13bac7534b74d7122ba5043b9a23f68f492e
parentd008c4e95aa48fdec92bcad57400863cde962de9 (diff)
downloadaports-44c2b69713faa6672da6f6f5f4c95b89c70cd1ff.tar.gz
aports-44c2b69713faa6672da6f6f5f4c95b89c70cd1ff.tar.bz2
aports-44c2b69713faa6672da6f6f5f4c95b89c70cd1ff.tar.xz
community/olm: enable python3 bindings
Co-authored-by: Leo <thinkabit.ukim@gmail.com>
-rw-r--r--community/olm/APKBUILD22
1 files changed, 18 insertions, 4 deletions
diff --git a/community/olm/APKBUILD b/community/olm/APKBUILD
index f519a13190..af4d6dc17c 100644
--- a/community/olm/APKBUILD
+++ b/community/olm/APKBUILD
@@ -2,14 +2,19 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=olm
pkgver=3.1.5
-pkgrel=0
+pkgrel=1
pkgdesc="Implementation of the olm and megolm cryptographic ratchets"
arch="all"
url="https://gitlab.matrix.org/matrix-org/olm"
license="Apache-2.0"
-makedepends="cmake"
+makedepends="
+ cmake
+ python3-dev
+ py3-cffi
+ py3-setuptools
+ "
source="https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.gz"
-subpackages="$pkgname-dev"
+subpackages="$pkgname-dev py3-olm:py3"
build() {
cmake -B build \
@@ -17,14 +22,23 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
cmake --build build
+
+ # hack to make the python build work
+ ln -s lib/libolm.so build/libolm.so
+ make -C python olm-python3
}
check() {
- cd build/tests
+ cd "$builddir"/build/tests
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
DESTDIR="$pkgdir" cmake --build build --target install
}
+
+py3() {
+ depends="python3 py3-future py3-cffi"
+ DESTDIR="$subpkgdir" make -C "$builddir"/python install-python3
+}
sha512sums="2adb55cbed27f15db78a5ebd86ed78183a6d093e41b57d18cd8d046ceeb114993cf0b1c4f1a0e363aa9701cea580ec80797251db5f812fe088e3ea107f453563 olm-3.1.5.tar.gz"