From 2826275d584e67d81d323706b7dab09d94fc76ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20M=C3=B3zes?= Date: Tue, 28 Apr 2020 14:16:25 +0000 Subject: [PATCH] dev-python/pypam: add python3.{7,8} support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug: https://bugs.gentoo.org/719426 Signed-off-by: Tomáš Mózes Signed-off-by: Yixun Lan --- dev-python/pypam/pypam-0.5.0-r4.ebuild | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 dev-python/pypam/pypam-0.5.0-r4.ebuild diff --git a/dev-python/pypam/pypam-0.5.0-r4.ebuild b/dev-python/pypam/pypam-0.5.0-r4.ebuild new file mode 100644 index 000000000000..d26ff5f7409f --- /dev/null +++ b/dev-python/pypam/pypam-0.5.0-r4.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 python3_{6,7,8} ) + +inherit distutils-r1 flag-o-matic + +MY_PN="PyPAM" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Python Bindings for PAM (Pluggable Authentication Modules)" +HOMEPAGE="http://www.pangalactic.org/PyPAM" +SRC_URI="http://www.pangalactic.org/PyPAM/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="" + +DEPEND=">=sys-libs/pam-0.64" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +DOCS=( AUTHORS examples/pamtest.py ) + +PATCHES=( + # Pull patches from fedora. + "${FILESDIR}/PyPAM-${PV}-dealloc.patch" + "${FILESDIR}/PyPAM-${PV}-nofree.patch" + "${FILESDIR}/PyPAM-${PV}-memory-errors.patch" + "${FILESDIR}/PyPAM-${PV}-return-value.patch" + "${FILESDIR}/PyPAM-python3-support.patch" + # Fix a missing include. + "${FILESDIR}/${P}-stricter.patch" +) + +src_compile() { + append-cflags -fno-strict-aliasing + distutils-r1_src_compile +} + +python_test() { + "${PYTHON}" tests/PamTest.py +} -- 2.26.2