summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-14 15:30:24 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-14 15:30:24 +0000
commit9b921f0a27acb73f29835bcf94b91bbdef87e9de (patch)
treea20561c628642e6e518ffac7df78980360a7ff8b /eclass
parent05a3b7c2189f095dfc46fbb03d4b3e801d3dc13a (diff)
gentoo auto-resync : 14:12:2022 - 15:30:24
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37488 -> 37492 bytes
-rw-r--r--eclass/apache-2.eclass82
-rw-r--r--eclass/distutils-r1.eclass106
-rw-r--r--eclass/python-any-r1.eclass1
-rw-r--r--eclass/python-utils-r1.eclass80
-rwxr-xr-xeclass/tests/python-utils-r1.sh18
-rw-r--r--eclass/unpacker.eclass33
7 files changed, 163 insertions, 157 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 1bf97396ef66..566752a02395 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index 583657b35ffd..71fcb5428699 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -36,6 +36,12 @@ esac
# INTERNAL VARIABLES
# ==============================================================================
+# @ECLASS_VARIABLE: GENTOO_USE_PCRE1
+# @DESCRIPTION:
+# Temporary variable to allow older Apache versions to force using legacy
+# dev-libs/libpcre. This will be removed once ebuilds using dev-libs/libpcre2
+# ar stable.
+
# @ECLASS_VARIABLE: GENTOO_PATCHNAME
# @DESCRIPTION:
# This internal variable contains the prefix for the patch tarball.
@@ -138,7 +144,6 @@ RDEPEND="
dev-lang/perl
>=dev-libs/apr-1.5.1:=
=dev-libs/apr-util-1*:=[gdbm=,ldap?]
- dev-libs/libpcre
virtual/libcrypt:=
apache2_modules_brotli? ( >=app-arch/brotli-0.6.0:= )
apache2_modules_deflate? ( sys-libs/zlib )
@@ -166,6 +171,12 @@ RDEPEND="
systemd? ( sys-apps/systemd )
"
+if [[ -n ${GENTOO_USE_PCRE1} ]] ; then
+ RDEPEND+=" dev-libs/libpcre"
+else
+ RDEPEND+=" dev-libs/libpcre2"
+fi
+
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
@@ -517,20 +528,37 @@ apache-2_src_prepare() {
# ${T} must be not group-writable, else grsec TPE will block it
chmod g-w "${T}" || die
- # This package really should upgrade to using pcre's .pc file.
- cat <<-\EOF >"${T}"/pcre-config
- #!/bin/bash
- flags=()
- for flag; do
- if [[ ${flag} == "--version" ]]; then
- flags+=( --modversion )
- else
- flags+=( "${flag}" )
- fi
- done
- exec ${PKG_CONFIG} libpcre "${flags[@]}"
- EOF
- chmod a+x "${T}"/pcre-config || die
+ if [[ -n ${GENTOO_USE_PCRE1} ]] ; then
+ # This package really should upgrade to using pcre's .pc file.
+ cat <<-\EOF > "${T}"/pcre-config
+ #!/usr/bin/env bash
+ flags=()
+ for flag; do
+ if [[ ${flag} == "--version" ]]; then
+ flags+=( --modversion )
+ else
+ flags+=( "${flag}" )
+ fi
+ done
+ exec ${PKG_CONFIG} libpcre "${flags[@]}"
+ EOF
+ chmod a+x "${T}"/pcre-config || die
+ else
+ # This package really should upgrade to using pcre's .pc file.
+ cat <<-\EOF > "${T}"/pcre2-config
+ #!/usr/bin/env bash
+ flags=()
+ for flag; do
+ if [[ ${flag} == "--version" ]]; then
+ flags+=( --modversion )
+ else
+ flags+=( "${flag}" )
+ fi
+ done
+ exec ${PKG_CONFIG} libpcre2-8 "${flags[@]}"
+ EOF
+ chmod a+x "${T}"/pcre2-config || die
+ fi
}
# @FUNCTION: apache-2_src_configure
@@ -539,10 +567,11 @@ apache-2_src_prepare() {
# MY_CONF
apache-2_src_configure() {
tc-export PKG_CONFIG
+ export ac_cv_path_PKGCONFIG="${PKG_CONFIG}"
# Sanity check in case people have bad mounts/TPE settings. #500928
- if ! "${T}"/pcre-config --help >/dev/null ; then
- eerror "Could not execute ${T}/pcre-config; do you have bad mount"
+ if ! "${T}"/pcre-config --help >/dev/null && ! "${T}"/pcre2-config --help >/dev/null ; then
+ eerror "Could not execute ${T}/pcre-config (or pcre2-config); do you have bad mount"
eerror "permissions in ${T} or have TPE turned on in your kernel?"
die "check your runtime settings #500928"
fi
@@ -567,13 +596,28 @@ apache-2_src_configure() {
--with-mpm=${MY_MPM}
--with-apr="${SYSROOT}${EPREFIX}"/usr
--with-apr-util="${SYSROOT}${EPREFIX}"/usr
- --with-pcre="${T}"/pcre-config
--with-z="${EPREFIX}"/usr
--with-port=80
--with-program-name=apache2
--enable-layout=Gentoo
)
- ac_cv_path_PKGCONFIG=${PKG_CONFIG} \
+
+ if [[ -n ${GENTOO_USE_PCRE1} ]] ; then
+ export ac_cv_prog_ac_ct_PCRE_CONFIG="${T}"/pcre-config
+
+ MY_CONF+=(
+ --without-pcre2
+ --with-pcre="${T}"/pcre-config
+ )
+ else
+ export ac_cv_prog_ac_ct_PCRE_CONFIG="${T}"/pcre2-config
+
+ MY_CONF+=(
+ --without-pcre
+ --with-pcre2="${T}"/pcre2-config
+ )
+ fi
+
econf "${MY_CONF[@]}"
sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h || die
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 97c5e562bc0f..371d52bcb7ef 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on the work of: Krzysztof Pawlik <nelchael@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: python-r1 python-single-r1
# @BLURB: A simple eclass to build Python packages using distutils.
# @DESCRIPTION:
@@ -44,15 +44,9 @@
# For more information, please see the Python Guide:
# https://projects.gentoo.org/python/guide/
-case "${EAPI:-0}" in
- [0-5])
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
- [6-8])
- ;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
+case ${EAPI:-0} in
+ 7|8) ;;
+ *) die "EAPI=${EAPI:-0} not supported";;
esac
# @ECLASS_VARIABLE: DISTUTILS_OPTIONAL
@@ -177,7 +171,6 @@ esac
if [[ ! ${_DISTUTILS_R1} ]]; then
-[[ ${EAPI} == 6 ]] && inherit eutils xdg-utils
inherit multibuild multiprocessing ninja-utils toolchain-funcs
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
@@ -236,7 +229,7 @@ _distutils_set_globals() {
;;
meson-python)
bdep+='
- >=dev-python/meson-python-0.10.0-r1[${PYTHON_USEDEP}]
+ >=dev-python/meson-python-0.11.0[${PYTHON_USEDEP}]
'
;;
pbr)
@@ -322,11 +315,7 @@ _distutils_set_globals() {
if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
RDEPEND="${PYTHON_DEPS} ${rdep}"
- if [[ ${EAPI} != 6 ]]; then
- BDEPEND="${PYTHON_DEPS} ${bdep}"
- else
- DEPEND="${PYTHON_DEPS} ${bdep}"
- fi
+ BDEPEND="${PYTHON_DEPS} ${bdep}"
REQUIRED_USE=${PYTHON_REQUIRED_USE}
fi
}
@@ -539,11 +528,7 @@ distutils_enable_sphinx() {
python_compile_all() { sphinx_compile_all; }
IUSE+=" doc"
- if [[ ${EAPI} == 6 ]]; then
- DEPEND+=" doc? ( ${deps} )"
- else
- BDEPEND+=" doc? ( ${deps} )"
- fi
+ BDEPEND+=" doc? ( ${deps} )"
# we need to ensure successful return in case we're called last,
# otherwise Portage may wrongly assume sourcing failed
@@ -624,11 +609,7 @@ distutils_enable_tests() {
if [[ -n ${test_deps} ]]; then
IUSE+=" test"
RESTRICT+=" !test? ( test )"
- if [[ ${EAPI} == 6 ]]; then
- DEPEND+=" test? ( ${test_deps} )"
- else
- BDEPEND+=" test? ( ${test_deps} )"
- fi
+ BDEPEND+=" test? ( ${test_deps} )"
fi
# we need to ensure successful return in case we're called last,
@@ -672,7 +653,7 @@ esetup.py() {
setup_py=( -c "from setuptools import setup; setup()" )
fi
- if [[ ${EAPI} != [67] && ${mydistutilsargs[@]} ]]; then
+ if [[ ${EAPI} != 7 && ${mydistutilsargs[@]} ]]; then
die "mydistutilsargs is banned in EAPI ${EAPI} (use DISTUTILS_ARGS)"
fi
@@ -744,7 +725,7 @@ distutils_install_for_testing() {
local install_method=root
case ${1} in
--via-home)
- [[ ${EAPI} == [67] ]] || die "${*} is banned in EAPI ${EAPI}"
+ [[ ${EAPI} == 7 ]] || die "${*} is banned in EAPI ${EAPI}"
install_method=home
shift
;;
@@ -895,7 +876,7 @@ _distutils-r1_check_all_phase_mismatch() {
eqawarn "QA Notice: distutils-r1_python_${EBUILD_PHASE}_all called"
eqawarn "from python_${EBUILD_PHASE}. Did you mean to use"
eqawarn "python_${EBUILD_PHASE}_all()?"
- [[ ${EAPI} != [67] ]] &&
+ [[ ${EAPI} != 7 ]] &&
die "distutils-r1_python_${EBUILD_PHASE}_all called from python_${EBUILD_PHASE}."
fi
}
@@ -1001,7 +982,7 @@ _distutils-r1_print_package_versions() {
local pkg
einfo "Build system packages:"
for pkg in "${packages[@]}"; do
- local installed=$(best_version "${pkg}")
+ local installed=$(best_version -b "${pkg}")
einfo " $(printf '%-30s' "${pkg}"): ${installed#${pkg}-}"
done
}
@@ -1050,9 +1031,13 @@ distutils-r1_python_prepare_all() {
fi
python_export_utf8_locale
- [[ ${EAPI} == 6 ]] && xdg_environment_reset # Bug 577704
_distutils-r1_print_package_versions
+ if [[ -n ${SYSROOT} ]] && ! has_version -b ">=dev-python/gpep517-12"; then
+ ewarn ">=dev-python/gpep517-12 features cross-compilation fixes."
+ ewarn "Please consider upgrading to avoid issues."
+ fi
+
_DISTUTILS_DEFAULT_CALLED=1
}
@@ -1312,29 +1297,24 @@ distutils_pep517_install() {
local config_settings=
case ${DISTUTILS_USE_PEP517} in
meson-python)
- # TODO: remove the condition once we BDEP on >=0.11
- if has_version -b ">=dev-python/meson-python-0.11"; then
- local -x NINJAOPTS=$(get_NINJAOPTS)
- config_settings=$(
- "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
- import json
- import os
- import shlex
- import sys
-
- ninjaopts = shlex.split(os.environ["NINJAOPTS"])
- print(json.dumps({
- "setup-args": sys.argv[1:],
- "compile-args": [
- "-v",
- f"--ninja-args={ninjaopts!r}",
- ],
- }))
- EOF
- )
- elif [[ -n ${DISTUTILS_ARGS[@]} ]]; then
- die "DISTUTILS_ARGS requires >=dev-python/meson-python-0.11 (missing BDEP?)"
- fi
+ local -x NINJAOPTS=$(get_NINJAOPTS)
+ config_settings=$(
+ "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
+ import json
+ import os
+ import shlex
+ import sys
+
+ ninjaopts = shlex.split(os.environ["NINJAOPTS"])
+ print(json.dumps({
+ "setup-args": sys.argv[1:],
+ "compile-args": [
+ "-v",
+ f"--ninja-args={ninjaopts!r}",
+ ],
+ }))
+ EOF
+ )
;;
setuptools)
if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
@@ -1381,16 +1361,18 @@ distutils_pep517_install() {
local build_backend=$(_distutils-r1_get_backend)
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
- local config_args=()
- [[ -n ${config_settings} ]] &&
- config_args+=( --config-json "${config_settings}" )
local cmd=(
gpep517 build-wheel
--backend "${build_backend}"
--output-fd 3
--wheel-dir "${WHEEL_BUILD_DIR}"
- "${config_args[@]}"
)
+ if [[ -n ${config_settings} ]]; then
+ cmd+=( --config-json "${config_settings}" )
+ fi
+ if [[ -n ${SYSROOT} ]] && has_version -b ">=dev-python/gpep517-12"; then
+ cmd+=( --sysroot "${SYSROOT}" )
+ fi
printf '%s\n' "${cmd[*]}"
local wheel=$(
"${cmd[@]}" 3>&1 >&2 || die "Wheel build failed"
@@ -1453,7 +1435,9 @@ distutils-r1_python_compile() {
#
# see extension.py for list of suffixes
# .pyx is added for Cython
- if [[ 1 -ne ${jobs} && 2 -eq $(
+ #
+ # esetup.py does not respect SYSROOT, so skip it there
+ if [[ -z ${SYSROOT} && 1 -ne ${jobs} && 2 -eq $(
find '(' -name '*.c' -o -name '*.cc' -o -name '*.cpp' \
-o -name '*.cxx' -o -name '*.c++' -o -name '*.m' \
-o -name '*.mm' -o -name '*.pyx' ')' -printf '\n' |
@@ -1521,7 +1505,7 @@ _distutils-r1_wrap_scripts() {
debug-print "${FUNCNAME}: installing wrapper at ${bindir}/${basename}"
local dosym=dosym
- [[ ${EAPI} == [67] ]] && dosym=dosym8
+ [[ ${EAPI} == 7 ]] && dosym=dosym8
"${dosym}" -r /usr/lib/python-exec/python-exec2 \
"${bindir#${EPREFIX}}/${basename}"
done
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index f1f54358000c..558f725f74b7 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -174,7 +174,6 @@ _python_any_set_globals() {
local usestr deps i PYTHON_PKG_DEP
[[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
- _PYTHON_ALLOW_PY27=1 \
_python_set_impls
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index c0099fa756ad..d7b3df6105ab 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -133,9 +133,9 @@ _python_set_impls() {
# please keep them in sync with _PYTHON_ALL_IMPLS
# and _PYTHON_HISTORICAL_IMPLS
case ${i} in
- pypy3|python2_7|python3_[89]|python3_1[01])
+ pypy3|python3_[89]|python3_1[01])
;;
- jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-6]|python3_[1-7])
+ jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-7]|python3_[1-7])
obsolete+=( "${i}" )
;;
*)
@@ -172,13 +172,7 @@ _python_set_impls() {
done
if [[ ! ${supp[@]} ]]; then
- # special-case python2_7 for python-any-r1
- if [[ ${_PYTHON_ALLOW_PY27} ]] && has python2_7 "${PYTHON_COMPAT[@]}"
- then
- supp+=( python2_7 )
- else
- die "No supported implementation in PYTHON_COMPAT."
- fi
+ die "No supported implementation in PYTHON_COMPAT."
fi
if [[ ${_PYTHON_SUPPORTED_IMPLS[@]} ]]; then
@@ -412,10 +406,6 @@ _python_export() {
local val
case "${impl}" in
- python2*|python3.6|python3.7*)
- # python* up to 3.7
- val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) || die
- ;;
python*)
# python3.8+
val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}-embed) || die
@@ -454,22 +444,16 @@ _python_export() {
PYTHON_PKG_DEP)
local d
case ${impl} in
- python2.7)
- PYTHON_PKG_DEP='>=dev-lang/python-2.7.10_p16:2.7';;
python3.8)
- PYTHON_PKG_DEP=">=dev-lang/python-3.8.15_p3:3.8";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.8.16:3.8";;
python3.9)
- PYTHON_PKG_DEP=">=dev-lang/python-3.9.15_p3:3.9";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.9.16:3.9";;
python3.10)
- PYTHON_PKG_DEP=">=dev-lang/python-3.10.8_p3:3.10";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.10.9:3.10";;
python3.11)
- PYTHON_PKG_DEP=">=dev-lang/python-3.11.0_p2:3.11";;
- python*)
- PYTHON_PKG_DEP="dev-lang/python:${impl#python}";;
- pypy)
- PYTHON_PKG_DEP='>=dev-python/pypy-7.3.9-r2:0=';;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.11.1:3.11";;
pypy3)
- PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.9_p9:0=';;
+ PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.10-r1:0=';;
*)
die "Invalid implementation: ${impl}"
esac
@@ -643,22 +627,22 @@ python_optimize() {
einfo "Optimize Python modules for ${instpath}"
case "${EPYTHON}" in
- python2.7|python3.[34])
- "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
- "${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}"
- ;;
- python3.[5678]|pypy3)
+ python3.8)
# both levels of optimization are separate since 3.5
"${PYTHON}" -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
"${PYTHON}" -O -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
"${PYTHON}" -OO -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
;;
- python*)
+ python*|pypy3)
+ # Python 3.9+
"${PYTHON}" -m compileall -j "${jobs}" -o 0 -o 1 -o 2 --hardlink-dupes -q -f -d "${instpath}" "${d}"
;;
- *)
+ pypy)
"${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
;;
+ *)
+ die "${FUNCNAME}: unexpected EPYTHON=${EPYTHON}"
+ ;;
esac
done
}
@@ -955,15 +939,6 @@ _python_wrapper_setup() {
local EPYTHON PYTHON
_python_export "${impl}" EPYTHON PYTHON
- local pyver pyother
- if [[ ${EPYTHON} != python2* ]]; then
- pyver=3
- pyother=2
- else
- pyver=2
- pyother=3
- fi
-
# Python interpreter
# note: we don't use symlinks because python likes to do some
# symlink reading magic that breaks stuff
@@ -972,10 +947,10 @@ _python_wrapper_setup() {
#!/bin/sh
exec "${PYTHON}" "\${@}"
_EOF_
- cp "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die
- chmod +x "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die
+ cp "${workdir}/bin/python" "${workdir}/bin/python3" || die
+ chmod +x "${workdir}/bin/python" "${workdir}/bin/python3" || die
- local nonsupp=( "python${pyother}" "python${pyother}-config" )
+ local nonsupp=( python2 python2-config )
# CPython-specific
if [[ ${EPYTHON} == python* ]]; then
@@ -984,24 +959,22 @@ _python_wrapper_setup() {
exec "${PYTHON}-config" "\${@}"
_EOF_
cp "${workdir}/bin/python-config" \
- "${workdir}/bin/python${pyver}-config" || die
+ "${workdir}/bin/python3-config" || die
chmod +x "${workdir}/bin/python-config" \
- "${workdir}/bin/python${pyver}-config" || die
+ "${workdir}/bin/python3-config" || die
# Python 2.6+.
ln -s "${PYTHON/python/2to3-}" "${workdir}"/bin/2to3 || die
# Python 2.7+.
ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}.pc \
- "${workdir}"/pkgconfig/python${pyver}.pc || die
+ "${workdir}"/pkgconfig/python3.pc || die
# Python 3.8+.
- if [[ ${EPYTHON} != python[23].[67] ]]; then
- ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}-embed.pc \
- "${workdir}"/pkgconfig/python${pyver}-embed.pc || die
- fi
+ ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}-embed.pc \
+ "${workdir}"/pkgconfig/python3-embed.pc || die
else
- nonsupp+=( 2to3 python-config "python${pyver}-config" )
+ nonsupp+=( 2to3 python-config python3-config )
fi
local x
@@ -1098,11 +1071,10 @@ python_fix_shebang() {
"${EPYTHON}")
match=1
;;
- python|python[23])
+ python|python3)
match=1
- [[ ${in_path##*/} == python2 ]] && error=1
;;
- python[23].[0-9]|python3.[1-9][0-9]|pypy|pypy3|jython[23].[0-9])
+ python2|python[23].[0-9]|python3.[1-9][0-9]|pypy|pypy3|jython[23].[0-9])
# Explicit mismatch.
match=1
error=1
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 6abf10cadabd..6a1d2f98cbf9 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -64,23 +64,7 @@ tmpfile=$(mktemp)
inherit python-utils-r1
-ebegin "Testing python2.7"
-eindent
-test_var EPYTHON python2_7 python2.7
-test_var PYTHON python2_7 /usr/bin/python2.7
-if [[ -x /usr/bin/python2.7 ]]; then
- test_var PYTHON_SITEDIR python2_7 "/usr/lib*/python2.7/site-packages"
- test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
- test_var PYTHON_LIBPATH python2_7 "/usr/lib*/libpython2.7$(get_libname)"
- test_var PYTHON_CONFIG python2_7 /usr/bin/python2.7-config
- test_var PYTHON_CFLAGS python2_7 "*-I/usr/include/python2.7*"
- test_var PYTHON_LIBS python2_7 "*-lpython2.7*"
-fi
-test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
-test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
-eoutdent
-
-for minor in 6 7 8 9 10 11; do
+for minor in 8 9 10 11; do
ebegin "Testing python3.${minor}"
eindent
test_var EPYTHON "python3_${minor}" "python3.${minor}"
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 3d8bf7a8452d..5ce681ebaa0d 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -30,7 +30,7 @@ inherit multiprocessing toolchain-funcs
# @DEFAULT_UNSET
# @DESCRIPTION:
# Utility to use to decompress bzip2 files. Will dynamically pick between
-# `lbzip2`, `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc"
+# `lbzip2`, `pbzip2`, and `bzip2`. Make sure your choice accepts the "-dc"
# options.
# Note: this is meant for users to set, not ebuilds.
@@ -39,7 +39,7 @@ inherit multiprocessing toolchain-funcs
# @DEFAULT_UNSET
# @DESCRIPTION:
# Utility to use to decompress lzip files. Will dynamically pick between
-# `plzip`, `pdlzip` and `lzip`. Make sure your choice accepts the "-dc" options.
+# `xz`, `plzip`, `pdlzip`, and `lzip`. Make sure your choice accepts the "-dc" options.
# Note: this is meant for users to set, not ebuilds.
# for internal use only (unpack_pdv and unpack_makeself)
@@ -429,7 +429,22 @@ _unpacker_get_decompressor() {
*.lzma|*.xz|*.txz)
echo "xz -T$(makeopts_jobs) -dc" ;;
*.lz)
- : ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)}
+ find_lz_unpacker() {
+ local has_version_arg="-b"
+
+ [[ ${EAPI} == 6 ]] && has_version_arg="--host-root"
+ if has_version "${has_version_arg}" ">=app-arch/xz-utils-5.4.0" ; then
+ echo xz
+ return
+ fi
+
+ local x
+ for x in plzip pdlzip lzip ; do
+ type -P ${x} && break
+ done
+ }
+
+ : ${UNPACKER_LZIP:=$(find_lz_unpacker)}
echo "${UNPACKER_LZIP} -dc" ;;
*.zst)
echo "zstd -dc" ;;
@@ -472,7 +487,7 @@ unpack_gpkg() {
local dirname=${images[0]%/*}
mkdir -p "${dirname}" || die
tar -xOf "${gpkg}" "${images[0]}" | ${decomp:-cat} |
- tar --no-same-owner -xC "${dirname}"
+ tar --no-same-owner -C "${dirname}" -xf -
assert "Unpacking ${gpkg} failed"
}
@@ -604,7 +619,15 @@ unpacker_src_uri_depends() {
*.zip)
d="app-arch/unzip" ;;
*.lz)
- d="|| ( app-arch/plzip app-arch/pdlzip app-arch/lzip )" ;;
+ d="
+ || (
+ >=app-arch/xz-utils-5.4.0
+ app-arch/plzip
+ app-arch/pdlzip
+ app-arch/lzip
+ )
+ "
+ ;;
*.zst)
d="app-arch/zstd" ;;
*.lha|*.lzh)