diff --git a/dev-libs/olm/Manifest b/dev-libs/olm/Manifest index f484737..df50282 100644 --- a/dev-libs/olm/Manifest +++ b/dev-libs/olm/Manifest @@ -1,2 +1,2 @@ DIST olm-3.1.4.tar.bz2 461540 BLAKE2B fa69b1543330c5da37c04227b51197ba57968ef24def40df621b85c0988eac91f8a155f600ab26849f2cd213059c97c7035be6dcca0943245cd4e4895da314b3 SHA512 87265d835ca7332d162bd3573dffdd09c8337c464dd673f100db9193e8ea4cedd8cb2a92cf2c34ad1b552a55bbbce8f87a47559ccfba03fa69b32fc7ff07f5f0 -EBUILD olm-3.1.4.ebuild 403 BLAKE2B 4db785c84c89f033802a6bfa82e660ac081e18d24489e2e310c95898d6543f9c4848a46a9481d80ef3bec54078082d37677a2731a9cebaae8e375adadfd8b2d1 SHA512 77429ce81d43b5f1eb71d8d5a830b23872d51e8742044c5c1cbd26c9fb6e0c74999337442a1f4cff054d1890752d9edb3d8be2a7e8a08a9653a18d110b1c0df8 +EBUILD olm-3.1.4.ebuild 1079 BLAKE2B e0e3f346b411020ecdca9dc20cd064467fbc733a896b801a67be82126fd5b756ac5a908d371c390b8d81853d140b87ece83f75d4b382d08a6cdc70bf5b4073de SHA512 2da14f587665853d5fae64461972a45fc72a5550f4eacfb88bb70f621f592482b2618e083a1e7285c529a142800fe8a61a7ab7cb79fc207183eba1fb6792065a diff --git a/dev-libs/olm/olm-3.1.4.ebuild b/dev-libs/olm/olm-3.1.4.ebuild index 80db4f2..4207b4e 100644 --- a/dev-libs/olm/olm-3.1.4.ebuild +++ b/dev-libs/olm/olm-3.1.4.ebuild @@ -1,9 +1,11 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit cmake-utils +PYTHON_COMPAT=( python2_7 python3_{6,7,8} ) + +inherit cmake-utils python-r1 DESCRIPTION="Implementation of the olm and megolm cryptographic ratchets" HOMEPAGE="https://gitlab.matrix.org/matrix-org/olm" @@ -12,4 +14,41 @@ SRC_URI="https://gitlab.matrix.org/matrix-org/${PN}/-/archive/${PV}/${P}.tar.bz2 LICENSE="Apache2.0" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="+python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + python? ( + ${PYTHON_DEPS} + dev-python/cffi[${PYTHON_USEDEP}] + dev-python/future[${PYTHON_USEDEP}] + dev-python/typing[${PYTHON_USEDEP}] + )" + +compile_pybinding() { + cd python + "${EPYTHON}" setup.py build || die + python_optimize +} + +src_compile() { + default + + if use python; then + python_foreach_impl compile_pybinding + fi +} + +install_pybinding() { + cd python + "${EPYTHON}" setup.py install --root="${D}" --prefix="${EPREFIX}/usr/" || die + python_optimize +} + +src_install() { + default + + if use python; then + python_foreach_impl install_pybinding + fi +}