summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
commitc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (patch)
treec44943ee0563a3fa957716de909fed683117fcb9 /eclass
parent69051588e2f955485fe5d45d45e616bc60a2de57 (diff)
gentoo (valentine's day) resync : 14.02.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37101 -> 37101 bytes
-rw-r--r--eclass/apache-2.eclass2
-rw-r--r--eclass/bazel.eclass1
-rw-r--r--eclass/cargo.eclass7
-rw-r--r--eclass/distutils-r1.eclass41
-rw-r--r--eclass/python-r1.eclass15
-rw-r--r--eclass/qt5-build.eclass10
-rw-r--r--eclass/ruby-fakegem.eclass62
-rw-r--r--eclass/rust-toolchain.eclass3
9 files changed, 100 insertions, 41 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 0c5a3e9ef9a1..fe5c3cb63be4 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 aac25683d99e..0c4d1c0005fd 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -507,7 +507,7 @@ apache-2_src_prepare() {
# Don't rename configure.in _before_ any possible user patches!
if [[ -f "configure.in" ]] ; then
- elog "Renaming configure.in to configure.ac"
+ einfo "Renaming configure.in to configure.ac"
mv configure.{in,ac} || die
fi
diff --git a/eclass/bazel.eclass b/eclass/bazel.eclass
index 854b740db4f2..ac7ca241519c 100644
--- a/eclass/bazel.eclass
+++ b/eclass/bazel.eclass
@@ -113,6 +113,7 @@ bazel_setup_bazelrc() {
build --define=PREFIX=${EPREFIX%/}/usr
build --define=LIBDIR=\$(PREFIX)/$(get_libdir)
+ build --define=INCLUDEDIR=\$(PREFIX)/include
EOF
if tc-is-cross-compiler; then
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 7f7a681f6f52..e763ac3468c5 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -6,7 +6,8 @@
# rust@gentoo.org
# @AUTHOR:
# Doug Goldstein <cardoe@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
+# Georgy Yakovlev <gyakovlev@genotoo.org>
+# @SUPPORTED_EAPIS: 7
# @BLURB: common functions and variables for cargo builds
if [[ -z ${_CARGO_ECLASS} ]]; then
@@ -51,7 +52,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# other src_ functions of this eclass.
# note that cargo_gen_config is automatically called by cargo_src_unpack.
-# @VARIABLE: myfeatures
+# @ECLASS_VARIABLE: myfeatures
# @DEFAULT_UNSET
# @DESCRIPTION:
# Optional cargo features defined as bash array.
@@ -119,7 +120,7 @@ cargo_crate_uris() {
# Cargo can also be configured through environment variables in addition to the TOML syntax below.
# For each configuration key below of the form foo.bar the environment variable CARGO_FOO_BAR
# can also be used to define the value.
-# Environment variables will take precedent over TOML configuration,
+# Environment variables will take precedence over TOML configuration,
# and currently only integer, boolean, and string keys are supported.
# For example the build.jobs key can also be defined by CARGO_BUILD_JOBS.
# Or setting CARGO_TERM_VERBOSE=false in make.conf will make build quieter.
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 07ded8516fdc..780becc3ace9 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -518,12 +518,20 @@ distutils_enable_tests() {
esetup.py() {
debug-print-function ${FUNCNAME} "${@}"
+ [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context"
+
local die_args=()
[[ ${EAPI} != [45] ]] && die_args+=( -n )
[[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg
- set -- "${EPYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}"
+ local setup_py=( setup.py )
+ if [[ ${DISTUTILS_USE_SETUPTOOLS} == pyproject.toml ]]; then
+ # TODO: remove '.main' when we require v10
+ setup_py=( -m pyproject2setuppy.main )
+ fi
+
+ set -- "${EPYTHON}" "${setup_py[@]}" "${mydistutilsargs[@]}" "${@}"
echo "${@}" >&2
"${@}" || die "${die_args[@]}"
@@ -632,14 +640,7 @@ _distutils-r1_disable_ez_setup() {
# Generate setup.py for pyproject.toml if requested.
_distutils-r1_handle_pyproject_toml() {
if [[ ! -f setup.py && -f pyproject.toml ]]; then
- if [[ ${DISTUTILS_USE_SETUPTOOLS} == pyproject.toml ]]; then
- cat > setup.py <<-EOF || die
- #!/usr/bin/env python
- from pyproject2setuppy.main import main
- main()
- EOF
- chmod +x setup.py || die
- else
+ if [[ ${DISTUTILS_USE_SETUPTOOLS} != pyproject.toml ]]; then
eerror "No setup.py found but pyproject.toml is present. In order to enable"
eerror "pyproject.toml support in distutils-r1, set:"
eerror " DISTUTILS_USE_SETUPTOOLS=pyproject.toml"
@@ -780,23 +781,14 @@ distutils-r1_python_compile() {
_distutils-r1_copy_egg_info
- local build_args=()
# distutils is parallel-capable since py3.5
- # to avoid breaking stable ebuilds, enable it only if either:
- # a. we're dealing with EAPI 7
- # b. we're dealing with Python 3.7 or PyPy3
- if python_is_python3 && [[ ${EPYTHON} != python3.4 ]]; then
- if [[ ${EAPI} != [56] || ${EPYTHON} != python3.[56] ]]; then
- local jobs=$(makeopts_jobs "${MAKEOPTS}" INF)
- if [[ ${jobs} == INF ]]; then
- local nproc=$(get_nproc)
- jobs=$(( nproc + 1 ))
- fi
- build_args+=( -j "${jobs}" )
- fi
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" INF)
+ if [[ ${jobs} == INF ]]; then
+ local nproc=$(get_nproc)
+ jobs=$(( nproc + 1 ))
fi
- esetup.py build "${build_args[@]}" "${@}"
+ esetup.py build -j "${jobs}" "${@}"
}
# @FUNCTION: _distutils-r1_wrap_scripts
@@ -869,9 +861,8 @@ distutils-r1_python_install() {
# python likes to compile any module it sees, which triggers sandbox
# failures if some packages haven't compiled their modules yet.
addpredict "${EPREFIX}/usr/lib/${EPYTHON}"
- addpredict "${EPREFIX}/usr/$(get_libdir)/${EPYTHON}"
- addpredict /usr/lib/pypy2.7
addpredict /usr/lib/pypy3.6
+ addpredict /usr/lib/pypy3.7
addpredict /usr/lib/portage/pym
addpredict /usr/local # bug 498232
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 5cae020c6d90..74e3fb38a1cc 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -524,16 +524,18 @@ python_gen_impl_dep() {
}
# @FUNCTION: python_gen_any_dep
-# @USAGE: <dependency-block> [<impl-pattern>...]
+# @USAGE: [<dependency-block> [<impl-pattern>...]]
# @DESCRIPTION:
# Generate an any-of dependency that enforces a version match between
-# the Python interpreter and Python packages. <dependency-block> needs
-# to list one or more dependencies with verbatim '${PYTHON_USEDEP}'
+# the Python interpreter and Python packages. <dependency-block> may
+# list one or more dependencies with verbatim '${PYTHON_USEDEP}'
# or '${PYTHON_SINGLE_USEDEP}' references (quoted!) that will get
-# expanded inside the function. Optionally, patterns may be specified
-# to restrict the dependency to a subset of Python implementations
-# supported by the ebuild.
+# expanded inside the function. If <dependency-block> is an empty string
+# (or no arguments are passed), a pure dependency on any Python
+# interpreter will be generated.
#
+# Optionally, patterns may be specified to restrict the dependency to
+# a subset of Python implementations supported by the ebuild.
# The patterns can be either fnmatch-style patterns (matched via bash
# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate
# appropriately all enabled Python 2/3 implementations (alike
@@ -587,7 +589,6 @@ python_gen_any_dep() {
debug-print-function ${FUNCNAME} "${@}"
local depstr=${1}
- [[ ${depstr} ]] || die "No dependency string provided"
shift
local i PYTHON_PKG_DEP out=
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 99fe5db77053..6698b69b32f4 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt5-build.eclass
@@ -103,14 +103,18 @@ EGIT_REPO_URI=(
IUSE="debug test"
-[[ ${QT5_BUILD_TYPE} == release ]] && RESTRICT+=" test" # bug 457182
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ RESTRICT+=" test" # bug 457182
+else
+ RESTRICT+=" !test? ( test )"
+fi
BDEPEND="
dev-lang/perl
virtual/pkgconfig
"
if [[ ${PN} != qttest ]]; then
- DEPEND+=" test? ( ~dev-qt/qttest-${PV} )"
+ DEPEND+=" test? ( ~dev-qt/qttest-$(ver_cut 1-3) )"
fi
###### Phase functions ######
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 8ab448765946..6fee9eb3e157 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ruby-fakegem.eclass
@@ -113,6 +113,20 @@ RUBY_FAKEGEM_BINDIR="${RUBY_FAKEGEM_BINDIR-bin}"
# get installed. Some gems provide extra files such as version information,
# Rails generators, or data that needs to be installed as well.
+# @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTENSIONS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# List of extensions supported by this gem. Each extension is listed as
+# the configuration script that needs to be run to generate the
+# extension.
+
+# @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTENSION_LIBDIR
+# @DESCRIPTION:
+# The lib directory where extensions are copied directly after they have
+# been compiled. This is needed to run tests on the code and was the
+# legacy way to install extensions for a long time.
+RUBY_FAKEGEM_EXTENSION_LIBDIR="${RUBY_FAKEGEM_EXTENSION_LIBDIR-lib}"
+
case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI} (too old) for ruby-fakegem.eclass" ;;
@@ -387,6 +401,22 @@ EOF
) || die "Unable to create fakegem wrapper"
}
+# @FUNCTION: each_fakegem_configure
+# @DESCRIPTION:
+# Configure extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any.
+each_fakegem_configure() {
+ for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
+ ${RUBY} -C ${extension%/*} ${extension##*/} || die
+ done
+}
+
+# @FUNCTION: each_ruby_configure
+# @DESCRIPTION:
+# Run each_fakegem_configure for each ruby target
+each_ruby_configure() {
+ each_fakegem_configure
+}
+
# @FUNCTION: all_fakegem_compile
# @DESCRIPTION:
# Build documentation for the package if indicated by the doc USE flag
@@ -408,6 +438,24 @@ all_fakegem_compile() {
fi
}
+# @FUNCTION: each_fakegem_compile
+# @DESCRIPTION:
+# Compile extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any.
+each_fakegem_compile() {
+ for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
+ emake V=1 -C ${extension%/*}
+ mkdir -p "${RUBY_FAKEGEM_EXTENSION_LIBDIR%/}"
+ cp "${extension%/*}"/*$(get_modname) "${RUBY_FAKEGEM_EXTENSION_LIBDIR%/}/" || die "Copy of extension into ${RUBY_FAKEGEM_EXTENSION_LIBDIR} failed"
+ done
+}
+
+# @FUNCTION: each_ruby_compile
+# @DESCRIPTION:
+# Run each_fakegem_compile for each ruby target
+each_ruby_compile() {
+ each_fakegem_compile
+}
+
# @FUNCTION: all_ruby_unpack
# @DESCRIPTION:
# Unpack the source archive, including support for unpacking gems.
@@ -506,6 +554,18 @@ each_fakegem_install() {
[[ -n ${_gemlibdirs} ]] && \
ruby_fakegem_doins -r ${_gemlibdirs}
+
+ if [[ -n ${RUBY_FAKEGEM_EXTENSIONS} ]] && [ ${#RUBY_FAKEGEM_EXTENSIONS[@]} -ge 0 ]; then
+ einfo "installing extensions"
+ local _extensionsdir="$(ruby_fakegem_gemsdir)/extensions/$(ruby_rbconfig_value 'arch')/$(ruby_rbconfig_value 'ruby_version')/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}"
+
+ for extension in ${RUBY_FAKEGEM_EXTENSIONS[@]} ; do
+ emake V=1 sitearchdir="${ED}/${_extensionsdir}" -C ${extension%/*} install
+ done
+
+ # Add the marker to indicate that the extensions are installed
+ touch "${ED}${_extensionsdir}/gem.build_complete" || die
+ fi
}
# @FUNCTION: each_ruby_install
diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index 9d7360ed1c4b..ad670d0cb315 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.eclass
@@ -35,7 +35,8 @@ inherit multilib-build
rust_abi() {
local CTARGET=${1:-${CHOST}}
case ${CTARGET%%*-} in
- aarch64*) echo aarch64-unknown-linux-gnu;;
+ aarch64*gnu) echo aarch64-unknown-linux-gnu;;
+ aarch64*musl) echo aarch64-unknown-linux-musl;;
mips64*) echo mips64-unknown-linux-gnuabi64;;
powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
powerpc64*) echo powerpc64-unknown-linux-gnu;;