From 27d0a299b1bcf7f2b3292552ddb1e0183bc869aa Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Sun, 28 Nov 2021 22:56:29 +0200 Subject: [PATCH] dev-libs/olm: bump 3.2.6 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alfred Wingate --- dev-libs/olm/Manifest | 1 + dev-libs/olm/olm-3.2.6.ebuild | 96 +++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 dev-libs/olm/olm-3.2.6.ebuild diff --git a/dev-libs/olm/Manifest b/dev-libs/olm/Manifest index e5ecd0a..b3cd40b 100644 --- a/dev-libs/olm/Manifest +++ b/dev-libs/olm/Manifest @@ -1 +1,2 @@ DIST olm-3.2.4.tar.bz2 479336 BLAKE2B 9de6b869c94a7f47b269b55526408ce6930ac5354495608038888f13efe72a6fab498c85c6ffe073a1f76391cbe4a83cfc6c65382d593bc487dafe64894ca0ed SHA512 94f661a2c9fe22f7dfefc89e488be37da2fe19dedd3ba296e09c55e63886ed82b71a30d84ecbdfa5dee820b1b6a918daefab248536c137459b8f244dc514920b +DIST olm-3.2.6.tar.bz2 485416 BLAKE2B 414e636a1bd32ff7698f3db7748a77aaa2449d260c79f3dcb64db6c509e4f972e4098e439838eb876bc7b738d25a5c704fed94edc9ca41f2c036c3d1438934f0 SHA512 e22af4e7791962978ea4c39b9bebf807a864ca52b329f032e5e398864cd142c1f166aadbce74cb85f776cb0b8352754151f64c60dac2ce1858def73d684fd44a diff --git a/dev-libs/olm/olm-3.2.6.ebuild b/dev-libs/olm/olm-3.2.6.ebuild new file mode 100644 index 0000000..1440da9 --- /dev/null +++ b/dev-libs/olm/olm-3.2.6.ebuild @@ -0,0 +1,96 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..9} ) +DISTUTILS_OPTIONAL=1 + +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 )" + +DEPEND=" + python? ( + >=dev-python/cffi-1.0.0[${PYTHON_USEDEP}] + dev-python/future[${PYTHON_USEDEP}] + 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 ON OFF) + ) + 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() { + emake test + if use python; then + pushd python || die + LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" distutils-r1_src_test + popd || die + fi +}