2021-01-04 22:52:11 +01:00
|
|
|
# Copyright 2020-2021 Gentoo Authors
|
2020-05-31 21:27:02 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
2021-01-17 23:26:20 +01:00
|
|
|
PYTHON_COMPAT=( python3_{7,8,9} )
|
2020-09-22 20:29:23 +02:00
|
|
|
DISTUTILS_OPTIONAL=1
|
|
|
|
|
|
|
|
inherit cmake distutils-r1
|
2020-05-31 21:27:02 +02:00
|
|
|
|
|
|
|
DESCRIPTION="An implementation of the Double Ratchet cryptographic ratchet in C++"
|
|
|
|
HOMEPAGE="https://git.matrix.org/git/olm/about/"
|
|
|
|
|
|
|
|
if [[ "${PV}" == 9999 ]]; then
|
|
|
|
inherit git-r3
|
|
|
|
EGIT_REPO_URI="https://gitlab.matrix.org/matrix-org/${PN}.git"
|
|
|
|
else
|
|
|
|
SRC_URI="https://gitlab.matrix.org/matrix-org/${PN}/-/archive/${PV}/${P}.tar.bz2"
|
2020-06-01 14:21:13 +02:00
|
|
|
KEYWORDS="~amd64"
|
2020-05-31 21:27:02 +02:00
|
|
|
fi
|
|
|
|
|
2020-12-29 21:18:42 +01:00
|
|
|
LICENSE="Apache-2.0"
|
2020-05-31 21:27:02 +02:00
|
|
|
SLOT="0/$(ver_cut 1)"
|
2020-09-22 20:29:23 +02:00
|
|
|
IUSE="python"
|
|
|
|
|
|
|
|
DEPEND="
|
|
|
|
python? (
|
|
|
|
dev-python/cffi[${PYTHON_USEDEP}]
|
|
|
|
dev-python/future[${PYTHON_USEDEP}]
|
|
|
|
)
|
|
|
|
"
|
|
|
|
|
2020-09-25 08:31:09 +02:00
|
|
|
CMAKE_IN_SOURCE_BUILD=1
|
|
|
|
|
|
|
|
PATCHES=( "${FILESDIR}/olmlib.patch" )
|
|
|
|
|
2020-09-22 20:29:23 +02:00
|
|
|
src_prepare() {
|
|
|
|
cmake_src_prepare
|
|
|
|
use python && (cd python; distutils-r1_src_prepare)
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
cmake_src_compile
|
2021-01-20 15:23:34 +01:00
|
|
|
export LIBRARY_PATH="${S}/$(get_libdir)/" # Let python build find the already built libolm
|
2020-09-22 20:29:23 +02:00
|
|
|
use python && (cd python; distutils-r1_src_compile)
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
cmake_src_install
|
|
|
|
use python && (cd python; distutils-r1_src_install)
|
|
|
|
}
|