From db298309338ad1f4833e157923c149bfe990b82f Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Mon, 10 May 2021 11:00:20 +0800 Subject: [PATCH] pypax: fork for python3.9, https://bugs.gentoo.org/788418 --- dev-python/pypax/Manifest | 1 + dev-python/pypax/metadata.xml | 20 ++++++++++++ dev-python/pypax/pypax-0.9.5.ebuild | 49 +++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 dev-python/pypax/Manifest create mode 100644 dev-python/pypax/metadata.xml create mode 100644 dev-python/pypax/pypax-0.9.5.ebuild diff --git a/dev-python/pypax/Manifest b/dev-python/pypax/Manifest new file mode 100644 index 000000000..2d3883f50 --- /dev/null +++ b/dev-python/pypax/Manifest @@ -0,0 +1 @@ +DIST elfix-0.9.5.tar.gz 401722 BLAKE2B 184f8944c62412675819ca86f13bcf23039ebcf069df528267f3e4272859e6cc442a1e05a7a121d88987c282d7e2f513d02f28ce41a8e3c0c226b456fa256aa6 SHA512 e15ab664357796f3a63ac54912eb43ae659947088a10ef16aafcbdd713cc3670fb0319cb2b95a2d29092866d322ef69df1d63847dfc0c4ab2cdd49e6eaa4635e diff --git a/dev-python/pypax/metadata.xml b/dev-python/pypax/metadata.xml new file mode 100644 index 000000000..caddff84b --- /dev/null +++ b/dev-python/pypax/metadata.xml @@ -0,0 +1,20 @@ + + + + + blueness@gentoo.org + Anthony G. Basile + + + hardened@gentoo.org + Gentoo Hardened + + + python@gentoo.org + Python + + + Enable XATTR_PAX_FLAGS support. + Enable PT_PAX_FLAGS support. + + diff --git a/dev-python/pypax/pypax-0.9.5.ebuild b/dev-python/pypax/pypax-0.9.5.ebuild new file mode 100644 index 000000000..003fe3f88 --- /dev/null +++ b/dev-python/pypax/pypax-0.9.5.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{7..9} ) + +inherit distutils-r1 + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/elfix.git" + inherit git-r3 +else + SRC_URI="https://dev.gentoo.org/~blueness/elfix/elfix-${PV}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86" + S="${WORKDIR}/elfix-${PV}" +fi + +DESCRIPTION="Python module to get or set either PT_PAX and/or XATTR_PAX flags" +HOMEPAGE="https://dev.gentoo.org/~blueness/elfix/ + https://wiki.gentoo.org/wiki/Project:Hardened/PaX_Quickstart" + +LICENSE="GPL-3" +SLOT="0" +IUSE="+ptpax +xtpax" + +REQUIRED_USE="|| ( ptpax xtpax )" + +RDEPEND=" + ptpax? ( dev-libs/elfutils ) + xtpax? ( sys-apps/attr )" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + ${RDEPEND}" + +src_compile() { + cd scripts || die + unset PTPAX + unset XTPAX + use ptpax && export PTPAX="yes" + use xtpax && export XTPAX="yes" + distutils-r1_src_compile +} + +src_install() { + cd scripts || die + distutils-r1_src_install +}