From b8a962e7a6561108ead128fe96241cdb2adc288e Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Mon, 14 Jan 2019 22:21:21 -0600 Subject: [PATCH] olm: update to 3.0.0 --- common/shlibs | 2 +- srcpkgs/olm/patches/python-find-olm.patch | 16 ---------------- srcpkgs/olm/template | 22 +++++++++++++++++----- 3 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 srcpkgs/olm/patches/python-find-olm.patch diff --git a/common/shlibs b/common/shlibs index 0fb0f917ecf8c1..87ddb0aa079b3a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3331,7 +3331,7 @@ libretro-gtk-0.14.so.0 retro-gtk-0.16.0_1 libmanette-0.2.so.0 libmanette-0.2.1_1 libfmt.so.5 fmt-5.2.1_1 libelementary-calendar.so.0 libio.elementary.calendar-4.2.3_1 -libolm.so.2 olm-2.3.0_1 +libolm.so.3 olm-2.3.0_1 libcrypto.so.44 libcrypto44-2.8.2_1 libtls.so.18 libtls18-2.8.2_1 libssl.so.46 libssl46-2.8.2_1 diff --git a/srcpkgs/olm/patches/python-find-olm.patch b/srcpkgs/olm/patches/python-find-olm.patch deleted file mode 100644 index 257e9028c3fc7d..00000000000000 --- a/srcpkgs/olm/patches/python-find-olm.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- python/olm/_base.py -+++ python/olm/_base.py -@@ -1,11 +1,10 @@ - import os.path - - from ctypes import * -+from ctypes import util - - --lib = cdll.LoadLibrary(os.path.join( -- os.path.dirname(__file__), "..", "..", "build", "libolm.so.2") --) -+lib = cdll.LoadLibrary(util.find_library("olm")) - - lib.olm_error.argtypes = [] - lib.olm_error.restypes = c_size_t diff --git a/srcpkgs/olm/template b/srcpkgs/olm/template index d6eb3ce46071da..b9eebd26241806 100644 --- a/srcpkgs/olm/template +++ b/srcpkgs/olm/template @@ -1,17 +1,19 @@ # Template file for 'olm' pkgname=olm -version=2.3.0 +version=3.0.0 revision=1 build_style=gnu-makefile make_check_target=test -hostmakedepends="python-devel python3-devel" -makedepends="python-devel python3-devel" -short_desc="An implementation of the Double Ratchet cryptographic ratchet" +hostmakedepends="python-devel python3-devel python-setuptools python3-setuptools" +makedepends="python-devel python3-devel libffi-devel" +depends="python-cffi python3-cffi python-future python3-future" +short_desc="Implementation of the Double Ratchet cryptographic ratchet" maintainer="Adam Beckmeyer " license="Apache-2.0" homepage="https://git.matrix.org/git/olm/about/" distfiles="https://git.matrix.org/git/olm/snapshot/${pkgname}-${version}.tar.gz" -checksum=533714fb84860e04c185790d16ef9085f15e902c2105db941d5c7e92b0565ef8 +checksum=4c54f93e4f426a9d5c8e66e63113d42fd2afca240cdcff30a469a342a6ec3bc6 +nocross=yes post_configure() { # -O0 prevents _FORTIFY_SOURCE working @@ -20,12 +22,22 @@ post_configure() { done } +# Makefile doesn't cd into python dir and build +post_build() { + make -C python +} + do_install() { make DESTDIR=${DESTDIR} PREFIX=/usr install for pysl in $py2_sitelib $py3_sitelib; do mkdir -p ${DESTDIR}${pysl} cp -r ${wrksrc}/python/olm ${DESTDIR}${pysl} done +# Install needed python modules + cd python ; python setup.py install --skip-build \ + --root=${DESTDIR} ; \ + python3 setup.py install --skip-build \ + --root=${DESTDIR} } olm-devel_package() {