commit: 9264246a123d854b9251da9e9665a3edcbaf9c71 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Oct 7 07:06:53 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Oct 7 07:07:25 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9264246a
sys-apps/file: enable py3.13, wire up python tests Signed-off-by: Sam James <sam <AT> gentoo.org> sys-apps/file/file-5.45-r4.ebuild | 15 ++++++++++++++- sys-apps/file/file-9999.ebuild | 38 ++++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/sys-apps/file/file-5.45-r4.ebuild b/sys-apps/file/file-5.45-r4.ebuild index 48a5067c2cd2..84ced37c5487 100644 --- a/sys-apps/file/file-5.45-r4.ebuild +++ b/sys-apps/file/file-5.45-r4.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 toolchain-funcs multilib-minimal @@ -155,6 +155,19 @@ src_compile() { fi } +src_test() { + multilib-minimal_src_test + + if use python ; then + cd python || die + distutils-r1_src_test + fi +} + +python_test() { + eunittest +} + multilib_src_install() { if multilib_is_native_abi ; then default diff --git a/sys-apps/file/file-9999.ebuild b/sys-apps/file/file-9999.ebuild index 9ea68ce9ec0c..84ced37c5487 100644 --- a/sys-apps/file/file-9999.ebuild +++ b/sys-apps/file/file-9999.ebuild @@ -5,20 +5,20 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) -inherit distutils-r1 libtool toolchain-funcs multilib-minimal +inherit distutils-r1 toolchain-funcs multilib-minimal if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://github.com/glensc/file.git" inherit autotools git-r3 else VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc - inherit verify-sig + inherit autotools verify-sig SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz" SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )" fi @@ -59,17 +59,22 @@ QA_CONFIG_IMPL_DECL_SKIP=( makedev ) PATCHES=( "${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet - "${FILESDIR}/file-5.43-portage-sandbox.patch" #889046 + "${FILESDIR}/file-5.45-seccomp-sandbox.patch" + "${FILESDIR}/${P}-32-bit-time_t.patch" + "${FILESDIR}/${P}-32-bit-time_t-deux.patch" + "${FILESDIR}/${P}-weak-magic-shell.patch" #908401 ) src_prepare() { default - if [[ ${PV} == 9999 ]] ; then - eautoreconf - else - elibtoolize - fi + #if [[ ${PV} == 9999 ]] ; then + # eautoreconf + #else + # elibtoolize + #fi + # Just for file-5.45-32-bit-time_t-deux.patch, drop in 5.46 + eautoreconf # Don't let python README kill main README, bug #60043 mv python/README.md python/README.python.md || die @@ -150,6 +155,19 @@ src_compile() { fi } +src_test() { + multilib-minimal_src_test + + if use python ; then + cd python || die + distutils-r1_src_test + fi +} + +python_test() { + eunittest +} + multilib_src_install() { if multilib_is_native_abi ; then default