diff options
Diffstat (limited to 'community/olm/APKBUILD')
-rw-r--r-- | community/olm/APKBUILD | 58 |
1 files changed, 36 insertions, 22 deletions
diff --git a/community/olm/APKBUILD b/community/olm/APKBUILD index c44f99ada50..abb78621ccd 100644 --- a/community/olm/APKBUILD +++ b/community/olm/APKBUILD @@ -1,58 +1,72 @@ # Contributor: Bart Ribbers <bribbers@disroot.org> # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=olm -pkgver=3.2.1 -pkgrel=0 +pkgver=3.2.16 +pkgrel=1 pkgdesc="Implementation of the olm and megolm cryptographic ratchets" -arch="all !mips64" # pytest-benchmark unavailable +arch="all" url="https://gitlab.matrix.org/matrix-org/olm" license="Apache-2.0" makedepends=" cmake - python3-dev py3-cffi py3-setuptools + python3-dev + samurai " checkdepends=" py3-pytest - py3-pytest-cov py3-pytest-benchmark + py3-pytest-cov py3-future py3-aspectlib " source="https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.gz" -subpackages="$pkgname-dev py3-olm:py3" +subpackages="$pkgname-dev py3-olm-pyc py3-olm:py3" build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -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 + cd python + python3 setup.py build } check() { - cd "$builddir"/build/tests - CTEST_OUTPUT_ON_FAILURE=TRUE ctest + ctest --test-dir build/tests --output-on-failure cd "$builddir"/python - # the tests also have trouble with lib path - # give the ffi it just built with a link, - # and the C libolm with the ld environment variable - ln build/lib.linux-*/_libolm*.so tests/_libolm.so - LD_LIBRARY_PATH="$builddir/build/lib" PYTHONPATH="$PWD" pytest + local _pyarch + case "$CARCH" in + x86_64|aarch64|ppc64le) _pyarch="$CARCH" ;; + x86) _pyarch=i686 ;; + armhf|armv7) _pyarch=armv8l ;; + s390x) _pyarch=s390x;; + esac + + local _py3ver=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') + + # TODO: fails to find _libolm.abi3.so + # PYTHONPATH="$PWD/build/lib.linux-$_pyarch-$_py3ver" pytest } package() { - DESTDIR="$pkgdir" cmake --build build --target install + DESTDIR="$pkgdir" cmake --install build + DESTDIR="$pkgdir" make -C "$builddir"/python install-python3 } py3() { - depends="python3 py3-future py3-cffi" - DESTDIR="$subpkgdir" make -C "$builddir"/python install-python3 + depends=" + py3-cffi + py3-future + python3 + " + amove usr/lib/python3* } -sha512sums="0c24e397a02e430487639494997c7d6cf47cce229b36114db818f14173e79c5ef7d25598c25f2778da4a1647e72fdd67e8b3c6272b980132f308d5fd1b17e189 olm-3.2.1.tar.gz" + +sha512sums=" +a75dbaa4321baf53dab820599ddb8740e5982a4537dd2f1df2de2d7bb5c9500d0d1af25f08495e37cc50d3176646d8d6f78bb24bc827f3c246242f07db90eea8 olm-3.2.16.tar.gz +" |