Keep copy of m2crypto for now due to Gentoo deprecation
Hanno Böck

Hanno Böck commited on 2026-05-11 14:48:40
Zeige 2 geänderte Dateien mit 70 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1 @@
1
+DIST m2crypto-0.47.0.tar.gz 662529 BLAKE2B f1ba6628ae713470850c2fa5db3230b000666ee93184622498ffc5b8527d445b96a0868addd491988147487553fc62aaedff4a651fd2e0b2efacc5fcfb81ec19 SHA512 a99a0e084831fde0bafe4be0ca748ec171a9c38225dd5d49d1af5a80122e89c75921589936b58fcd8b71f53ab006038d10dfd362d5cc37ae6bf1018ab378cce8
... ...
@@ -0,0 +1,69 @@
1
+# Copyright 2018-2026 Gentoo Authors
2
+# Distributed under the terms of the GNU General Public License v2
3
+
4
+EAPI=8
5
+
6
+DISTUTILS_EXT=1
7
+DISTUTILS_USE_PEP517=setuptools
8
+PYTHON_COMPAT=( python3_{11..14} )
9
+PYPI_PN="M2Crypto"
10
+PYTHON_REQ_USE="threads(+)"
11
+
12
+inherit distutils-r1 toolchain-funcs pypi
13
+
14
+DESCRIPTION="A Python crypto and SSL toolkit"
15
+HOMEPAGE="
16
+	https://sr.ht/~mcepl/m2crypto/
17
+	https://gitlab.com/m2crypto/m2crypto/
18
+	https://pypi.org/project/M2Crypto/
19
+"
20
+
21
+# openssl via src/SWIG/_lib11_compat.i
22
+LICENSE="BSD-2 openssl"
23
+SLOT="0"
24
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
25
+IUSE="abi_mips_n32 abi_mips_n64 abi_mips_o32"
26
+
27
+DEPEND="
28
+	dev-libs/openssl:=
29
+"
30
+RDEPEND="
31
+	${DEPEND}
32
+	dev-python/packaging[${PYTHON_USEDEP}]
33
+"
34
+BDEPEND="
35
+	>=dev-lang/swig-2.0.9
36
+"
37
+
38
+distutils_enable_tests unittest
39
+
40
+swig_define() {
41
+	local x
42
+	for x; do
43
+		if tc-cpp-is-true "defined(${x})"; then
44
+			SWIG_FEATURES+=" -D${x}"
45
+		fi
46
+	done
47
+}
48
+
49
+src_prepare() {
50
+	# relies on very exact clock behavior which apparently fails
51
+	# with inconvenient CONFIG_HZ*
52
+	sed -e 's:test_server_simple_timeouts:_&:' \
53
+		-i tests/test_ssl.py || die
54
+	distutils-r1_src_prepare
55
+}
56
+
57
+python_compile() {
58
+	# setup.py looks at platform.machine() to determine swig options.
59
+	# For exotic ABIs, we need to give swig a hint.
60
+	local -x SWIG_FEATURES=
61
+
62
+	# https://bugs.gentoo.org/617946
63
+	swig_define __ILP32__
64
+
65
+	# https://bugs.gentoo.org/674112
66
+	swig_define __ARM_PCS_VFP
67
+
68
+	distutils-r1_python_compile
69
+}
0 70