sys-apps/file: Sync with Gentoo

It's from Gentoo commit 9264246a123d854b9251da9e9665a3edcbaf9c71.
This commit is contained in:
Flatcar Buildbot 2024-10-21 07:08:10 +00:00
parent 69426e92b2
commit 05c495cccd
2 changed files with 42 additions and 11 deletions

View File

@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools DISTUTILS_USE_PEP517=setuptools
DISTUTILS_OPTIONAL=1 DISTUTILS_OPTIONAL=1
PYTHON_COMPAT=( python3_{10..12} ) PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 toolchain-funcs multilib-minimal inherit distutils-r1 toolchain-funcs multilib-minimal
@ -155,6 +155,19 @@ src_compile() {
fi 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() { multilib_src_install() {
if multilib_is_native_abi ; then if multilib_is_native_abi ; then
default default

View File

@ -5,20 +5,20 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools DISTUTILS_USE_PEP517=setuptools
DISTUTILS_OPTIONAL=1 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 if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/glensc/file.git" EGIT_REPO_URI="https://github.com/glensc/file.git"
inherit autotools git-r3 inherit autotools git-r3
else else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc 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="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )" 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 )" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )"
fi fi
@ -59,17 +59,22 @@ QA_CONFIG_IMPL_DECL_SKIP=( makedev )
PATCHES=( PATCHES=(
"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet "${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() { src_prepare() {
default default
if [[ ${PV} == 9999 ]] ; then #if [[ ${PV} == 9999 ]] ; then
eautoreconf # eautoreconf
else #else
elibtoolize # elibtoolize
fi #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 # Don't let python README kill main README, bug #60043
mv python/README.md python/README.python.md || die mv python/README.md python/README.python.md || die
@ -150,6 +155,19 @@ src_compile() {
fi 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() { multilib_src_install() {
if multilib_is_native_abi ; then if multilib_is_native_abi ; then
default default