summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin35954 -> 35950 bytes
-rw-r--r--eclass/autotools.eclass10
-rw-r--r--eclass/cdrom.eclass16
-rw-r--r--eclass/common-lisp-3.eclass4
-rw-r--r--eclass/distutils-r1.eclass209
-rw-r--r--eclass/go-module.eclass18
-rw-r--r--eclass/java-utils-2.eclass10
-rw-r--r--eclass/latex-package.eclass79
-rw-r--r--eclass/linux-info.eclass4
-rw-r--r--eclass/llvm.org.eclass4
-rw-r--r--eclass/mercurial.eclass4
-rw-r--r--eclass/mono.eclass4
-rw-r--r--eclass/rebar.eclass4
13 files changed, 250 insertions, 116 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index b5697b842ad2..b699e64294d3 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 8a44aae417db..c275c83d55c2 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -13,13 +13,13 @@
# Note: We require GNU m4, as does autoconf. So feel free to use any features
# from the GNU version of m4 without worrying about other variants (i.e. BSD).
-if [[ ${__AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
+if [[ ${_AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
# See if we were included already, but someone changed the value
# of AUTOTOOLS_AUTO_DEPEND on us. We could reload the entire
# eclass at that point, but that adds overhead, and it's trivial
# to re-order inherit in eclasses/ebuilds instead. #409611
- if [[ ${__AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then
- die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}"
+ if [[ ${_AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then
+ die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${_AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}"
fi
fi
@@ -74,7 +74,7 @@ inherit gnuconfig libtool
# Do NOT change this variable in your ebuilds!
# If you want to force a newer minor version, you can specify the correct
# WANT value by using a colon: <PV>:<WANT_AUTOMAKE>
-_LATEST_AUTOMAKE=( 1.16.4:1.16 )
+_LATEST_AUTOMAKE=( 1.16.5:1.16 )
_automake_atom="sys-devel/automake"
_autoconf_atom="sys-devel/autoconf"
@@ -134,7 +134,7 @@ if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
*) BDEPEND=${AUTOTOOLS_DEPEND} ;;
esac
fi
-__AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
+_AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
unset _automake_atom _autoconf_atom
diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass
index 5d90a11eab77..81539e8560ce 100644
--- a/eclass/cdrom.eclass
+++ b/eclass/cdrom.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cdrom.eclass
# @MAINTAINER:
# games@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Functions for CD-ROM handling
# @DESCRIPTION:
# Acquire CD(s) for those lovely CD-based emerges. Yes, this violates
@@ -16,7 +16,7 @@
# The functions are generally called in src_unpack.
case ${EAPI:-0} in
- [67]) ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -79,11 +79,11 @@ fi
cdrom_get_cds() {
unset CDROM_SET
export CDROM_CURRENT_CD=0
- export CDROM_NUM_CDS="${#}"
- local i
- for i in $(seq ${#}); do
- export CDROM_CHECK_${i}="${!i}"
- done
+ export CDROM_NUM_CDS="${#}"
+ local i
+ for i in $(seq ${#}); do
+ export CDROM_CHECK_${i}="${!i}"
+ done
# If the user has set CD_ROOT or CD_ROOT_1, don't bother informing
# them about which discs are needed as they presumably already know.
diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 5314e391db8f..df624d51607c 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -127,7 +127,9 @@ common-lisp-install-sources() {
if [[ -f ${path} ]] ; then
common-lisp-install-one-source ${fpredicate} "${path}" "$(dirname "${path}")"
elif [[ -d ${path} ]] ; then
- common-lisp-install-sources -t ${ftype} $(find "${path}" -type f)
+ local files
+ readarray -d '' files < <(find "${path}" -type f -print0 || die "cannot traverse ${path}" )
+ common-lisp-install-sources -t ${ftype} "${files[@]}" || die
else
die "${path} is neither a regular file nor a directory"
fi
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index ed2e9f70269f..7a7bdb4a4d39 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -98,6 +98,10 @@ esac
#
# - flit - flit_core backend
#
+# - hatchling - hatchling backend (from hatch)
+#
+# - jupyter - jupyter_packaging backend
+#
# - pdm - pdm.pep517 backend
#
# - poetry - poetry-core backend
@@ -151,6 +155,13 @@ esac
# ${DISTUTILS_DEPS}"
# @CODE
+# @ECLASS_VARIABLE: GPEP517_TESTING
+# @USER_VARIABLE
+# @DESCRIPTION:
+# Enable in make.conf to test building via dev-python/gpep517 instead of
+# inline Python snippets. dev-python/gpep517 needs to be installed
+# first.
+
if [[ ! ${_DISTUTILS_R1} ]]; then
[[ ${EAPI} == 6 ]] && inherit eutils xdg-utils
@@ -185,15 +196,23 @@ _distutils_set_globals() {
case ${DISTUTILS_USE_PEP517} in
flit)
bdep+='
- dev-python/flit_core[${PYTHON_USEDEP}]'
+ >=dev-python/flit_core-3.7.1[${PYTHON_USEDEP}]'
+ ;;
+ hatchling)
+ bdep+='
+ >=dev-python/hatchling-0.22.0[${PYTHON_USEDEP}]'
+ ;;
+ jupyter)
+ bdep+='
+ >=dev-python/jupyter_packaging-0.11.1[${PYTHON_USEDEP}]'
;;
pdm)
bdep+='
- dev-python/pdm-pep517[${PYTHON_USEDEP}]'
+ >=dev-python/pdm-pep517-0.12.3[${PYTHON_USEDEP}]'
;;
poetry)
bdep+='
- dev-python/poetry-core[${PYTHON_USEDEP}]'
+ >=dev-python/poetry-core-1.0.8[${PYTHON_USEDEP}]'
;;
setuptools)
bdep+='
@@ -406,7 +425,7 @@ distutils_enable_sphinx() {
_DISTUTILS_SPHINX_PLUGINS=( "${@}" )
local deps autodoc=1 d
- deps="dev-python/sphinx[\${PYTHON_USEDEP}]"
+ deps=">=dev-python/sphinx-4.4.0[\${PYTHON_USEDEP}]"
for d; do
if [[ ${d} == --no-autodoc ]]; then
autodoc=
@@ -430,13 +449,15 @@ distutils_enable_sphinx() {
use doc || return 0
local p
- for p in dev-python/sphinx "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do
+ for p in ">=dev-python/sphinx-4.4.0" \
+ "${_DISTUTILS_SPHINX_PLUGINS[@]}"
+ do
python_has_version "${p}[${PYTHON_USEDEP}]" ||
return 1
done
}
else
- deps="dev-python/sphinx"
+ deps=">=dev-python/sphinx-4.4.0"
fi
sphinx_compile_all() {
@@ -519,7 +540,7 @@ distutils_enable_tests() {
test_pkg=">=dev-python/nose-1.3.7-r4"
;;
pytest)
- test_pkg=">=dev-python/pytest-6.2.5-r2"
+ test_pkg=">=dev-python/pytest-7.0.1"
;;
setup.py)
;;
@@ -731,6 +752,42 @@ distutils_install_for_testing() {
esetup.py install "${add_args[@]}" "${@}"
}
+# @FUNCTION: distutils_write_namespace
+# @USAGE: <namespace>...
+# @DESCRIPTION:
+# Write the __init__.py file for the requested namespace into PEP517
+# install tree, in order to fix running tests when legacy namespace
+# packages are installed (dev-python/namespace-*).
+#
+# This function must only be used in python_test(). The created file
+# will automatically be removed upon leaving the test phase.
+distutils_write_namespace() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
+ die "${FUNCNAME} is available only in PEP517 mode"
+ fi
+ if [[ ${EBUILD_PHASE} != test || ! ${BUILD_DIR} ]]; then
+ die "${FUNCNAME} should only be used in python_test"
+ fi
+
+ local namespace
+ for namespace; do
+ if [[ ${namespace} == *[./]* ]]; then
+ die "${FUNCNAME} does not support nested namespaces at the moment"
+ fi
+
+ local path=${BUILD_DIR}/install$(python_get_sitedir)/${namespace}/__init__.py
+ if [[ -f ${path} ]]; then
+ die "Requested namespace ${path} exists already!"
+ fi
+ cat > "${path}" <<-EOF || die
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
+ EOF
+ _DISTUTILS_POST_PHASE_RM+=( "${path}" )
+ done
+}
+
# @FUNCTION: _distutils-r1_disable_ez_setup
# @INTERNAL
# @DESCRIPTION:
@@ -812,6 +869,15 @@ distutils-r1_python_prepare_all() {
if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
_distutils-r1_disable_ez_setup
_distutils-r1_handle_pyproject_toml
+
+ case ${DISTUTILS_USE_SETUPTOOLS} in
+ no)
+ eqawarn "Non-PEP517 builds are deprecated for ebuilds using plain distutils."
+ eqawarn "Please migrate to DISTUTILS_USE_PEP517=setuptools."
+ eqawarn "Please see Python Guide for more details:"
+ eqawarn " https://projects.gentoo.org/python/guide/distutils.html"
+ ;;
+ esac
fi
if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
@@ -911,6 +977,12 @@ _distutils-r1_backend_to_key() {
flit_core.buildapi|flit.buildapi)
echo flit
;;
+ hatchling.build)
+ echo hatchling
+ ;;
+ jupyter_packaging.build_api)
+ echo jupyter
+ ;;
pdm.pep517.api)
echo pdm
;;
@@ -938,16 +1010,20 @@ _distutils-r1_get_backend() {
if [[ -f pyproject.toml ]]; then
# if pyproject.toml exists, try getting the backend from it
# NB: this could fail if pyproject.toml doesn't list one
- build_backend=$(
- "${EPYTHON}" - 3>&1 <<-EOF
- import os
- import tomli
- print(tomli.load(open("pyproject.toml", "rb"))
- .get("build-system", {})
- .get("build-backend", ""),
- file=os.fdopen(3, "w"))
- EOF
- )
+ if [[ ${GPEP517_TESTING} ]]; then
+ build_backend=$(gpep517 get-backend)
+ else
+ build_backend=$(
+ "${EPYTHON}" - 3>&1 <<-EOF
+ import os
+ import tomli
+ print(tomli.load(open("pyproject.toml", "rb"))
+ .get("build-system", {})
+ .get("build-backend", ""),
+ file=os.fdopen(3, "w"))
+ EOF
+ )
+ fi
fi
if [[ -z ${build_backend} && ${DISTUTILS_USE_PEP517} == setuptools &&
-f setup.py ]]
@@ -1013,30 +1089,45 @@ distutils_pep517_install() {
local build_backend=$(_distutils-r1_get_backend)
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
- local wheel=$(
- "${EPYTHON}" - 3>&1 >&2 <<-EOF || die "Wheel build failed"
- import ${build_backend%:*}
- import os
- print(${build_backend/:/.}.build_wheel(os.environ['WHEEL_BUILD_DIR']),
- file=os.fdopen(3, 'w'))
- EOF
- )
+ if [[ ${GPEP517_TESTING} ]]; then
+ local wheel=$(
+ gpep517 build-wheel --backend "${build_backend}" \
+ --output-fd 3 \
+ --wheel-dir "${WHEEL_BUILD_DIR}" 3>&1 >&2 ||
+ die "Wheel build failed"
+ )
+ else
+ local wheel=$(
+ "${EPYTHON}" - 3>&1 >&2 <<-EOF || die "Wheel build failed"
+ import ${build_backend%:*}
+ import os
+ print(${build_backend/:/.}.build_wheel(os.environ['WHEEL_BUILD_DIR']),
+ file=os.fdopen(3, 'w'))
+ EOF
+ )
+ fi
[[ -n ${wheel} ]] || die "No wheel name returned"
einfo " Installing the wheel to ${root}"
- # NB: --compile-bytecode does not produce the correct paths,
- # and python_optimize doesn't handle being called outside D,
- # so we just defer compiling until the final merge
- # NB: we override sys.prefix & sys.exec_prefix because otherwise
- # installer would use virtualenv's prefix
- local -x PYTHON_PREFIX=${EPREFIX}/usr
- "${EPYTHON}" - -d "${root}" "${WHEEL_BUILD_DIR}/${wheel}" --no-compile-bytecode \
- <<-EOF || die "installer failed"
- import os, sys
- sys.prefix = sys.exec_prefix = os.environ["PYTHON_PREFIX"]
- from installer.__main__ import main
- main(sys.argv[1:])
- EOF
+ if [[ ${GPEP517_TESTING} ]]; then
+ gpep517 install-wheel --destdir="${root}" --interpreter="${PYTHON}" \
+ --prefix="${EPREFIX}/usr" "${WHEEL_BUILD_DIR}/${wheel}" ||
+ die "Wheel install failed"
+ else
+ # NB: --compile-bytecode does not produce the correct paths,
+ # and python_optimize doesn't handle being called outside D,
+ # so we just defer compiling until the final merge
+ # NB: we override sys.prefix & sys.exec_prefix because otherwise
+ # installer would use virtualenv's prefix
+ local -x PYTHON_PREFIX=${EPREFIX}/usr
+ "${EPYTHON}" - -d "${root}" "${WHEEL_BUILD_DIR}/${wheel}" --no-compile-bytecode \
+ <<-EOF || die "installer failed"
+ import os, sys
+ sys.prefix = sys.exec_prefix = os.environ["PYTHON_PREFIX"]
+ from installer.__main__ import main
+ main(sys.argv[1:])
+ EOF
+ fi
# remove installed licenses
find "${root}$(python_get_sitedir)" \
@@ -1046,7 +1137,11 @@ distutils_pep517_install() {
# clean the build tree; otherwise we may end up with PyPy3
# extensions duplicated into CPython dists
if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then
- esetup.py clean -a
+ if [[ ${GPEP517_TESTING} ]]; then
+ rm -rf build || die
+ else
+ esetup.py clean -a
+ fi
fi
}
@@ -1067,7 +1162,13 @@ distutils-r1_python_compile() {
# call setup.py build when using setuptools (either via PEP517
# or in legacy mode)
if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then
- if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
+ if [[ ${GPEP517_TESTING} ]]; then
+ if [[ -d build ]]; then
+ eqawarn "A 'build' directory exists already. Artifacts from this directory may"
+ eqawarn "be picked up by setuptools when building for another interpreter."
+ eqawarn "Please remove this directory prior to building."
+ fi
+ elif [[ ! ${DISTUTILS_USE_PEP517} ]]; then
_distutils-r1_copy_egg_info
fi
@@ -1078,7 +1179,21 @@ distutils-r1_python_compile() {
jobs=$(( nproc + 1 ))
fi
- esetup.py build -j "${jobs}" "${@}"
+ if [[ ${DISTUTILS_USE_PEP517} && ${GPEP517_TESTING} ]]; then
+ # issue build_ext only if it looks like we have something
+ # to build; setuptools is expensive to start
+ # see extension.py for list of suffixes
+ # .pyx is added for Cython
+ if [[ -n $(
+ find '(' -name '*.c' -o -name '*.cc' -o -name '*.cpp' \
+ -o -name '*.cxx' -o -name '*.c++' -o -name '*.m' \
+ -o -name '*.mm' -o -name '*.pyx' ')' -print -quit
+ ) ]]; then
+ esetup.py build_ext -j "${jobs}" "${@}"
+ fi
+ else
+ esetup.py build -j "${jobs}" "${@}"
+ fi
fi
if [[ ${DISTUTILS_USE_PEP517} ]]; then
@@ -1239,7 +1354,10 @@ distutils-r1_python_install() {
# are already in scriptdir
rm -r "${root}${scriptdir}" || die
if [[ ${DISTUTILS_SINGLE_IMPL} ]]; then
- mv "${root}$(python_get_scriptdir)" "${root}${scriptdir}" || die
+ local wrapped_scriptdir=${root}$(python_get_scriptdir)
+ if [[ -d ${wrapped_scriptdir} ]]; then
+ mv "${wrapped_scriptdir}" "${root}${scriptdir}" || die
+ fi
fi
else
local root=${D%/}/_${EPYTHON}
@@ -1406,10 +1524,15 @@ distutils-r1_run_phase() {
esac
local -x LDSHARED="${CC} ${ldopts}" LDCXXSHARED="${CXX} ${ldopts}"
+ local _DISTUTILS_POST_PHASE_RM=()
"${@}"
local ret=${?}
+ if [[ -n ${_DISTUTILS_POST_PHASE_RM} ]]; then
+ rm "${_DISTUTILS_POST_PHASE_RM[@]}" || die
+ fi
+
cd "${_DISTUTILS_INITIAL_CWD}" || die
return "${ret}"
}
@@ -1580,7 +1703,7 @@ _distutils-r1_check_namespace_pth() {
ewarn "read our documentation on reliable handling of namespaces and update"
ewarn "the ebuild accordingly:"
ewarn
- ewarn " https://wiki.gentoo.org/wiki/Project:Python/Namespace_packages"
+ ewarn " https://projects.gentoo.org/python/guide/concept.html#namespace-packages"
fi
}
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index 3027373ed3dd..a5dafb45cab8 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -105,7 +105,7 @@ QA_FLAGS_IGNORED='.*'
RESTRICT+=" strip"
# @ECLASS_VARIABLE: EGO_SUM
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# This is replaced by a dependency tarball, see above for how to create
# one.
@@ -153,7 +153,7 @@ RESTRICT+=" strip"
# go.sum copy of the Hash1 values during building of the package.
# @ECLASS_VARIABLE: _GOMODULE_GOPROXY_BASEURI
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Golang module proxy service to fetch module files from. Note that the module
# proxy generally verifies modules via the Hash1 code.
@@ -176,7 +176,7 @@ RESTRICT+=" strip"
: "${_GOMODULE_GOPROXY_BASEURI:=mirror://goproxy/}"
# @ECLASS_VARIABLE: _GOMODULE_GOSUM_REVERSE_MAP
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Mapping back from Gentoo distfile name to upstream distfile path.
# Associative array to avoid O(N*M) performance when populating the GOPROXY
@@ -206,7 +206,7 @@ ego() {
}
# @FUNCTION: go-module_set_globals
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Convert the information in EGO_SUM for other usage in the ebuild.
# - Populates EGO_SUM_SRC_URI that can be added to SRC_URI
@@ -297,7 +297,7 @@ go-module_set_globals() {
}
# @FUNCTION: go-module_setup_proxy
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# If your ebuild redefines src_unpack and uses EGO_SUM you need to call
# this function in src_unpack.
@@ -359,7 +359,7 @@ go-module_src_unpack() {
}
# @FUNCTION: _go-module_src_unpack_gosum
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Populate a GOPROXY directory hierarchy with distfiles from EGO_SUM and
# unpack the base distfiles.
@@ -405,7 +405,7 @@ _go-module_src_unpack_gosum() {
}
# @FUNCTION: _go-module_gosum_synthesize_files
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Given a path & version, populate all Goproxy metadata files which aren't
# needed to be downloaded directly.
@@ -433,7 +433,7 @@ _go-module_gosum_synthesize_files() {
}
# @FUNCTION: _go-module_src_unpack_verify_gosum
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Validate the Go modules declared by EGO_SUM are sufficient to cover building
# the package, without actually building it yet.
@@ -482,7 +482,7 @@ go-module_live_vendor() {
}
# @FUNCTION: _go-module_gomod_encode
-# @DEPRECATED
+# @DEPRECATED: none
# @DESCRIPTION:
# Encode the name(path) of a Golang module in the format expected by Goproxy.
#
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 11798908daef..2a649942550c 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -2099,8 +2099,9 @@ ejavac() {
einfo "${compiler_executable} ${javac_args} ${@}"
fi
- ebegin "Compiling"
- ${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
+ local args=( ${compiler_executable} ${javac_args} "${@}" )
+ echo "${args[@]}" >&2
+ "${args[@]}" || die "ejavac failed"
}
# @FUNCTION: ejavadoc
@@ -2125,8 +2126,9 @@ ejavadoc() {
einfo "javadoc ${javadoc_args} ${@}"
fi
- ebegin "Generating JavaDoc"
- javadoc ${javadoc_args} "${@}" || die "ejavadoc failed"
+ local args=( javadoc ${javadoc_args} "${@}" )
+ echo "${args[@]}" >&2
+ "${args[@]}" || die "ejavadoc failed"
}
# @FUNCTION: java-pkg_filter-compiler
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass
index 359b5177bb37..784254aecf4f 100644
--- a/eclass/latex-package.eclass
+++ b/eclass/latex-package.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: latex-package.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Matthew Turk <satai@gentoo.org>
# Martin Ehmsen <ehmsen@gentoo.org>
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: An eclass for easy installation of LaTeX packages
# @DESCRIPTION:
# This eClass is designed to be easy to use and implement. The vast majority of
@@ -51,21 +51,24 @@
# you must either grab each file individually, or find a place to mirror an
# archive of them. (iBiblio)
+case ${EAPI} in
+ 7) inherit eapi8-dosym ;;
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_LATEX_PACKAGE_ECLASS} ]]; then
_LATEX_PACKAGE_ECLASS=1
RDEPEND="virtual/latex-base"
-DEPEND="${RDEPEND}
+BDEPEND="${RDEPEND}
>=sys-apps/texinfo-4.2-r5"
-case ${EAPI:-0} in
- [0-6])
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
- 7) ;;
- *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
-esac
-
HOMEPAGE="http://www.tug.org/"
+
+# @ECLASS_VARIABLE: TEXMF
+# @DESCRIPTION:
+# Top-level installation path.
TEXMF="/usr/share/texmf-site"
# @ECLASS_VARIABLE: SUPPLIER
@@ -90,7 +93,7 @@ LATEX_DOC_ARGUMENTS=""
# It installs the files found in the current directory to the standard locations
# for a TeX installation
latex-package_src_doinstall() {
- debug-print function $FUNCNAME $*
+ debug-print-function "${FUNCNAME}" "$@"
# Avoid generating font cache outside of the sandbox
export VARTEXFONTS="${T}/fonts"
@@ -103,23 +106,26 @@ latex-package_src_doinstall() {
case ${1} in
"sh")
while IFS= read -r -d '' i; do
- dobin ${i}
+ dobin "${i}"
done < <(find -maxdepth 1 -type f -name "*.${1}" -print0)
;;
"sty" | "cls" | "fd" | "clo" | "def" | "cfg")
while IFS= read -r -d '' i; do
- insinto ${TEXMF}/tex/latex/${PN}
- doins ${i}
+ insinto "${TEXMF}/tex/latex/${PN}"
+ doins "${i}"
done < <(find -maxdepth 1 -type f -name "*.${1}" -print0)
;;
"dvi" | "ps" | "pdf")
while IFS= read -r -d '' i; do
insinto /usr/share/doc/${PF}
- doins ${i}
- dosym /usr/share/doc/${PF}/$(basename ${i}) ${TEXMF}/doc/latex/${PN}/${i}
- docompress -x /usr/share/doc/${PF}/$(basename ${i})
+ doins "${i}"
+ local dosym=dosym
+ [[ ${EAPI} == 7 ]] && dosym=dosym8
+ ${dosym} -r "/usr/share/doc/${PF}/$(basename "${i}")" \
+ "${TEXMF}/doc/latex/${PN}/${i}"
+ docompress -x "/usr/share/doc/${PF}/$(basename "${i}")"
done < <(find -maxdepth 1 -type f -name "*.${1}" -print0)
;;
@@ -127,17 +133,18 @@ latex-package_src_doinstall() {
if ! in_iuse doc || use doc ; then
while IFS= read -r -d '' i; do
[[ -n ${LATEX_PACKAGE_SKIP} ]] &&
- has ${i##*/} ${LATEX_PACKAGE_SKIP} &&
+ has "${i##*/}" ${LATEX_PACKAGE_SKIP} &&
continue
einfo "Making documentation: ${i}"
# some macros need compiler called twice, do it here.
- set -- pdflatex ${LATEX_DOC_ARGUMENTS} --halt-on-error --interaction=nonstopmode ${i}
+ set -- pdflatex ${LATEX_DOC_ARGUMENTS} \
+ --halt-on-error --interaction=nonstopmode "${i}"
if "${@}"; then
"${@}"
else
einfo "pdflatex failed, trying texi2dvi"
- texi2dvi -q -c --language=latex ${i} || die
+ texi2dvi -q -c --language=latex "${i}" || die
fi
done < <(find -maxdepth 1 -type f -name "*.${1}" -print0)
fi
@@ -145,27 +152,27 @@ latex-package_src_doinstall() {
"tfm" | "vf" | "afm")
while IFS= read -r -d '' i; do
- insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN}
- doins ${i}
+ insinto "${TEXMF}/fonts/${1}/${SUPPLIER}/${PN}"
+ doins "${i}"
done < <(find -maxdepth 1 -type f -name "*.${1}" -print0)
;;
"pfb")
while IFS= read -r -d '' i; do
- insinto ${TEXMF}/fonts/type1/${SUPPLIER}/${PN}
- doins ${i}
+ insinto "${TEXMF}/fonts/type1/${SUPPLIER}/${PN}"
+ doins "${i}"
done < <(find -maxdepth 1 -type f -name "*.pfb" -print0)
;;
"ttf")
while IFS= read -r -d '' i; do
- insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN}
- doins ${i}
+ insinto "${TEXMF}/fonts/truetype/${SUPPLIER}/${PN}"
+ doins "${i}"
done < <(find -maxdepth 1 -type f -name "*.ttf" -print0)
;;
"bst")
while IFS= read -r -d '' i; do
- insinto ${TEXMF}/bibtex/bst/${PN}
- doins ${i}
+ insinto "${TEXMF}/bibtex/bst/${PN}"
+ doins "${i}"
done < <(find -maxdepth 1 -type f -name "*.bst" -print0)
;;
@@ -198,10 +205,10 @@ latex-package_src_doinstall() {
# Calls latex for each *.ins in the current directory in order to generate the
# relevant files that will be installed
latex-package_src_compile() {
- debug-print function $FUNCNAME $*
+ debug-print-function "${FUNCNAME}" "$@"
while IFS= read -r -d '' i; do
einfo "Extracting from ${i}"
- latex --halt-on-error --interaction=nonstopmode ${i} || die
+ latex --halt-on-error --interaction=nonstopmode "${i}" || die
done < <(find -maxdepth 1 -type f -name "*.ins" -print0)
}
@@ -209,7 +216,7 @@ latex-package_src_compile() {
# @DESCRIPTION:
# Installs the package
latex-package_src_install() {
- debug-print function $FUNCNAME $*
+ debug-print-function "${FUNCNAME}" "$@"
latex-package_src_doinstall all
einstalldocs
}
@@ -219,7 +226,7 @@ latex-package_src_install() {
# Calls latex-package_rehash to ensure the TeX installation is consistent with
# the kpathsea database
latex-package_pkg_postinst() {
- debug-print function $FUNCNAME $*
+ debug-print-function "${FUNCNAME}" "$@"
latex-package_rehash
}
@@ -228,7 +235,7 @@ latex-package_pkg_postinst() {
# Calls latex-package_rehash to ensure the TeX installation is consistent with
# the kpathsea database
latex-package_pkg_postrm() {
- debug-print function $FUNCNAME $*
+ debug-print-function "${FUNCNAME}" "$@"
latex-package_rehash
}
@@ -236,10 +243,10 @@ latex-package_pkg_postrm() {
# @DESCRIPTION:
# Rehashes the kpathsea database, according to the current TeX installation
latex-package_rehash() {
- debug-print function $FUNCNAME $*
+ debug-print-function "${FUNCNAME}" "$@"
texmf-update
}
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
-
fi
+
+EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 57b1f4c89ae9..7b56a47016c6 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -781,7 +781,7 @@ check_extra_config() {
require_configured_kernel
fi
- einfo "Checking for suitable kernel configuration options..."
+ ebegin "Checking for suitable kernel configuration options"
for config in ${CONFIG_CHECK}
do
@@ -857,6 +857,7 @@ check_extra_config() {
done
if [[ ${hard_errors_count} -gt 0 ]]; then
+ eend 1
eerror "Please check to make sure these options are set correctly."
eerror "Failure to do so may cause unexpected problems."
eerror "Once you have satisfied these options, please try merging"
@@ -864,6 +865,7 @@ check_extra_config() {
export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
die "Incorrect kernel configuration options"
elif [[ ${soft_errors_count} -gt 0 ]]; then
+ eend 1
ewarn "Please check to make sure these options are set correctly."
ewarn "Failure to do so may cause unexpected problems."
else
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index fa23782cc244..0c47ec4aac0c 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -213,6 +213,7 @@ llvm.org_set_globals() {
SRC_URI+="
!doc? (
https://dev.gentoo.org/~mgorny/dist/llvm/llvm-${PV}-manpages.tar.bz2
+ https://dev.gentoo.org/~sam/distfiles/llvm/llvm-${PV}-manpages.tar.bz2
)"
;;
*)
@@ -221,7 +222,8 @@ llvm.org_set_globals() {
if [[ -n ${LLVM_PATCHSET} ]]; then
SRC_URI+="
- https://dev.gentoo.org/~mgorny/dist/llvm/llvm-gentoo-patchset-${LLVM_PATCHSET}.tar.xz"
+ https://dev.gentoo.org/~mgorny/dist/llvm/llvm-gentoo-patchset-${LLVM_PATCHSET}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/llvm/llvm-gentoo-patchset-${LLVM_PATCHSET}.tar.xz"
fi
local x
diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass
index 2f54314568e6..8f0e6edfeb0b 100644
--- a/eclass/mercurial.eclass
+++ b/eclass/mercurial.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mercurial.eclass
@@ -106,8 +106,6 @@ EHG_OFFLINE="${EHG_OFFLINE:-${EVCS_OFFLINE}}"
mercurial_fetch() {
debug-print-function ${FUNCNAME} "${@}"
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
-
EHG_REPO_URI=${1-${EHG_REPO_URI}}
[[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty"
diff --git a/eclass/mono.eclass b/eclass/mono.eclass
index ea0485746230..ddea2d4b9c64 100644
--- a/eclass/mono.eclass
+++ b/eclass/mono.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mono.eclass
@@ -43,7 +43,6 @@ export XDG_CONFIG_HOME="${T}"
unset MONO_AOT_CACHE
egacinstall() {
- use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
gacutil -i "${1}" \
-root "${ED}"/usr/$(get_libdir) \
-gacdir /usr/$(get_libdir) \
@@ -52,7 +51,6 @@ egacinstall() {
}
mono_multilib_comply() {
- use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
local dir finddirs=() mv_command=${mv_command:-mv}
if [[ -d "${ED}/usr/lib" && "$(get_libdir)" != "lib" ]]
then
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 17ae8e0d7658..e7a64bb7a7e2 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rebar.eclass
@@ -35,7 +35,7 @@ EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
RDEPEND="dev-lang/erlang:="
DEPEND="${RDEPEND}"
BDEPEND="
- dev-util/rebar
+ dev-util/rebar:0
>=sys-apps/gawk-4.1
"
if [[ ${EAPI} == 6 ]]; then