dev-python/m2crypto: new version upstream
authorKalin KOZHUHAROV <me.kalin@gmail.com>
Sun, 16 Dec 2018 22:21:57 +0000 (23:21 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sat, 22 Dec 2018 11:43:26 +0000 (12:43 +0100)
There is already a bug 651726, but no activity (>10weeks).
* drop support for libressl, feel free to include again (need patch
rediff or submission upstream, see bug 651726)
* upstream adds python3 support, so include
* update dependencies (swig and openssl)

Amendig per @juippis review:

* Header fixed
* EAPI=7
* openssl: depend on :0 slot without version
* swig: depend on available in portage version (unslotted)
* keeping KEYWORDS as they were from 0.27.0-r2
* adding python3_7, so -> python3_{4..7}

Amending per @a17r review:
* Remove ${PN} from DESCRIPTION

Closes: https://bugs.gentoo.org/651726
Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net>
Closes: https://github.com/gentoo/gentoo/pull/10628
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-python/m2crypto/Manifest
dev-python/m2crypto/m2crypto-0.31.0.ebuild [new file with mode: 0644]

index ead9d821480e77336bc92a79c21f2258550c8179..f6a0ec6a25230ce9c29514eaa96cdedb10d0ee32 100644 (file)
@@ -1,2 +1,3 @@
 DIST M2Crypto-0.24.0.tar.gz 184457 BLAKE2B 15a11dc1b13359041875e8321d0159a1a393b7f85dfbd38d650721d8a2eaed2cc2199859c3e1e3c890033711e0b137f4c78b90f04681ff44a3356558b9f55aea SHA512 c23ae0f8ac790d4ef108a217a44e994341f6bbe4e12a7fef2518d8def82331246a145e19a2504b82b790a3ad4b467d2facc8a73bb7f1190b56441d8482c66aca
 DIST M2Crypto-0.27.0.tar.gz 1119288 BLAKE2B 90e227aef9a5b4c7f5ab9bd62fbe506ea0931a6c338c530adbeb1a8303a31cc7755d13003532fe0ee4005f1997db23bed2d03cd54224dc7d89a6f23882197800 SHA512 df0f6b16f7d00a19fafbb5da5a3ececff6b4627accd00ca65e0d6f9e752a97f41016d0072c8e681475fe1d87c89b7474067068c0bfce6c68a30baddeb31bfac2
+DIST M2Crypto-0.31.0.tar.gz 1292016 BLAKE2B 3f1e0e8f686719ff87fa3a51cdc287be989fa1554866582deb1968fd04605270e14cbfd280f64211c043c5d8cb77a09e6a8cec6824ab15416ab94366aa73d2a3 SHA512 9f3e2afda4b8ac14aa64a1534e446eb6895ec7182ce5b7ded8008178e01139d383561a87f8c9fb5fe4b9c257ba5c6b93339955eb9e2f7417cd3f4832c35c4598
diff --git a/dev-python/m2crypto/m2crypto-0.31.0.ebuild b/dev-python/m2crypto/m2crypto-0.31.0.ebuild
new file mode 100644 (file)
index 0000000..89114bf
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{4..7})
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+MY_PN="M2Crypto"
+
+DESCRIPTION="A Python crypto and SSL toolkit"
+HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+
+# NOTE: Apparently nobody cares about libressl support, dropping support
+# IUSE="libressl"
+
+RDEPEND="
+       dev-libs/openssl:0=[-bindist(-)]
+       virtual/python-typing[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+       >=dev-lang/swig-2.0.9
+       dev-python/setuptools[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Tests access network, and fail randomly. Bug #431458.
+RESTRICT=test
+
+python_compile() {
+       # setup.py looks at platform.machine() to determine swig options.
+       # For exotic ABIs, we need to give swig a hint.
+       # https://bugs.gentoo.org/617946
+       # TODO: Fix cross-compiles
+       local -x SWIG_FEATURES=
+       case ${ABI} in
+               x32) SWIG_FEATURES="-D__ILP32__" ;;
+       esac
+       distutils-r1_python_compile --openssl="${EPREFIX}"/usr
+}
+
+python_test() {
+       esetup.py test
+}