dev-libs/olm: add 3.2.12

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2022-07-09 18:08:35 +03:00 committed by Parona
parent 2daa3ee8d3
commit 3641c26ce2
2 changed files with 109 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST olm-3.2.12.tar.bz2 2742680 BLAKE2B 47c3bacaf05cc0bb6088da34e6a031f9c770893771ddcf9f13bc0e10a050139f14969dfc91f38684336872089b4cbf9d66e4bd85692989eba5fc3df966da3cd2 SHA512 a25db4c72910512beca9120db59ebeeefc5fff6a381e88ae7cf261bc5ab896edc2cfe25ece57b7b28b2e3d8bc66367c457133c147e1a3514f926714159b5cf6f
DIST olm-3.2.6.tar.bz2 485416 BLAKE2B 414e636a1bd32ff7698f3db7748a77aaa2449d260c79f3dcb64db6c509e4f972e4098e439838eb876bc7b738d25a5c704fed94edc9ca41f2c036c3d1438934f0 SHA512 e22af4e7791962978ea4c39b9bebf807a864ca52b329f032e5e398864cd142c1f166aadbce74cb85f776cb0b8352754151f64c60dac2ce1858def73d684fd44a
DIST olm-3.2.7.tar.bz2 488852 BLAKE2B 8438d81647425cc2c258eeafaa1a0586d3b38bab32d7849f3e576a8543c910e7eaf19f8c151ad1659e4424a4f09d4641416ecf6dba2cd7523527a5176b29c644 SHA512 c36fefed4f8ba1058729387e4ed3b5b9e3be811940ff8284398255f06915b406f08fb30603f6fe6b28e344cbcaed6cfdbe430b3693701d4050047fb32fd88449

View File

@ -0,0 +1,108 @@
# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_OPTIONAL=1
PYTHON_COMPAT=( python3_{8..10} )
inherit cmake distutils-r1
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"
KEYWORDS="~amd64"
fi
LICENSE="Apache-2.0"
SLOT="0/$(ver_cut 1)"
IUSE="python test"
REQUIRED_USE="
doc? ( python )
python? ( ${PYTHON_REQUIRED_USE} )
"
RDEPEND="
python? (
${PYTHON_DEPS}
>=dev-python/cffi-1.0.0[${PYTHON_USEDEP}]
dev-python/future[${PYTHON_USEDEP}]
)
"
BDEPEND="
python? (
${RDEPEND}
test? (
dev-python/aspectlib[${PYTHON_USEDEP}]
dev-python/pytest-benchmark[${PYTHON_USEDEP}]
dev-python/pytest-cov[${PYTHON_USEDEP}]
dev-python/pytest-flake8[${PYTHON_USEDEP}]
dev-python/pytest-isort[${PYTHON_USEDEP}]
)
)
"
distutils_enable_tests pytest
distutils_enable_sphinx "${S}"/python/docs
DOCS=( "${S}/docs/" )
src_prepare() {
cmake_src_prepare
if use python; then
pushd python || die
distutils-r1_src_prepare
popd || die
fi
}
src_configure() {
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DOLM_TESTS=$(usex test)
)
cmake_src_configure
if use python; then
pushd python || die
distutils-r1_src_configure
popd || die
fi
}
src_compile() {
cmake_src_compile
if use python; then
pushd python || die
# Let python build find the already built libolm
export LIBRARY_PATH="${BUILD_DIR}/"
distutils-r1_src_compile
popd || die
fi
}
src_install() {
cmake_src_install
if use python; then
pushd python || die
distutils-r1_src_install
popd || die
fi
einstalldocs
}
src_test() {
# eclass doesnt appear to be to handle CTestTestfile.cmake in build root locations
BUILD_DIR="${BUILD_DIR}/tests" cmake_src_test
if use python; then
pushd ${S}/python || die
LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" distutils-r1_src_test
popd || die
fi
}