summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
commitd99093fb4bb5652015c06274d64083daa2439e4f (patch)
treecf61513204d97974179580065e85df5c8009087c /eclass
parent463397cf1e064185110fe57c568d73f99a06f5d1 (diff)
gentoo resync : 03.03.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37107 -> 37087 bytes
-rw-r--r--eclass/cmake.eclass98
-rw-r--r--eclass/desktop.eclass13
-rw-r--r--eclass/dune.eclass3
-rw-r--r--eclass/findlib.eclass4
-rw-r--r--eclass/golang-base.eclass3
-rw-r--r--eclass/kde.org.eclass12
-rw-r--r--eclass/kernel-build.eclass5
-rw-r--r--eclass/kernel-install.eclass21
-rw-r--r--eclass/llvm.eclass4
-rw-r--r--eclass/oasis.eclass4
-rw-r--r--eclass/opam.eclass3
-rw-r--r--eclass/toolchain.eclass11
13 files changed, 114 insertions, 67 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 8c9c20d40a3a..e08429eadcb2 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 62fa02715700..196c60e0b15c 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.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: cmake.eclass
@@ -127,26 +127,6 @@ if [[ ${PN} != cmake ]]; then
BDEPEND+=" dev-util/cmake"
fi
-# @FUNCTION: _cmake_banned_func
-# @INTERNAL
-# @DESCRIPTION:
-# Banned functions are banned.
-_cmake_banned_func() {
- die "${FUNCNAME[1]} is banned. use -D$1<related_CMake_variable>=\"\$(usex $2)\" instead"
-}
-
-# Determine using IN or OUT source build
-_cmake_check_build_dir() {
- : ${CMAKE_USE_DIR:=${S}}
- if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
- # we build in source dir
- BUILD_DIR="${CMAKE_USE_DIR}"
- fi
-
- mkdir -p "${BUILD_DIR}" || die
- einfo "Working in BUILD_DIR: \"$BUILD_DIR\""
-}
-
# @FUNCTION: cmake_run_in
# @USAGE: <working dir> <run command>
# @DESCRIPTION:
@@ -190,18 +170,6 @@ comment_add_subdirectory() {
die "comment_add_subdirectory is banned. Use cmake_comment_add_subdirectory instead"
}
-# @FUNCTION: cmake-utils_use_with
-# @INTERNAL
-# @DESCRIPTION:
-# Banned. Use -DWITH_FOO=$(usex foo) instead.
-cmake-utils_use_with() { _cmake_banned_func WITH_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_enable
-# @INTERNAL
-# @DESCRIPTION:
-# Banned. Use -DENABLE_FOO=$(usex foo) instead.
-cmake-utils_use_enable() { _cmake_banned_func ENABLE_ "$@" ; }
-
# @FUNCTION: cmake_use_find_package
# @USAGE: <USE flag> <package name>
# @DESCRIPTION:
@@ -220,6 +188,26 @@ cmake_use_find_package() {
echo "-DCMAKE_DISABLE_FIND_PACKAGE_$2=$(use $1 && echo OFF || echo ON)"
}
+# @FUNCTION: _cmake_banned_func
+# @INTERNAL
+# @DESCRIPTION:
+# Banned functions are banned.
+_cmake_banned_func() {
+ die "${FUNCNAME[1]} is banned. use -D$1<related_CMake_variable>=\"\$(usex $2)\" instead"
+}
+
+# @FUNCTION: cmake-utils_use_with
+# @INTERNAL
+# @DESCRIPTION:
+# Banned. Use -DWITH_FOO=$(usex foo) instead.
+cmake-utils_use_with() { _cmake_banned_func WITH_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_enable
+# @INTERNAL
+# @DESCRIPTION:
+# Banned. Use -DENABLE_FOO=$(usex foo) instead.
+cmake-utils_use_enable() { _cmake_banned_func ENABLE_ "$@" ; }
+
# @FUNCTION: cmake-utils_use_disable
# @INTERNAL
# @DESCRIPTION:
@@ -268,6 +256,24 @@ cmake-utils_use() { _cmake_banned_func "" "$@" ; }
# Banned. Use -DNOFOO=$(usex !foo) instead.
cmake-utils_useno() { _cmake_banned_func "" "$@" ; }
+# @FUNCTION: _cmake_check_build_dir
+# @INTERNAL
+# @DESCRIPTION:
+# Determine using IN or OUT source build
+_cmake_check_build_dir() {
+ : ${CMAKE_USE_DIR:=${S}}
+ if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
+ # we build in source dir
+ BUILD_DIR="${CMAKE_USE_DIR}"
+ fi
+
+ mkdir -p "${BUILD_DIR}" || die
+ einfo "Working in BUILD_DIR: \"$BUILD_DIR\""
+}
+
+# @FUNCTION: _cmake_modify-cmakelists
+# @INTERNAL
+# @DESCRIPTION:
# Internal function for modifying hardcoded definitions.
# Removes dangerous definitions that override Gentoo settings.
_cmake_modify-cmakelists() {
@@ -307,7 +313,7 @@ _cmake_modify-cmakelists() {
# @FUNCTION: cmake_src_prepare
# @DESCRIPTION:
-# Apply ebuild and user patches.
+# Apply ebuild and user patches. *MUST* be run or cmake_src_configure will fail.
cmake_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
@@ -358,25 +364,20 @@ cmake_src_prepare() {
_CMAKE_SRC_PREPARE_HAS_RUN=1
}
-# @VARIABLE: mycmakeargs
-# @DEFAULT_UNSET
+# @FUNCTION: cmake_src_configure
# @DESCRIPTION:
-# Optional cmake defines as a bash array. Should be defined before calling
-# src_configure.
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
+# Passes arguments to cmake by reading from an optionally pre-defined local
+# mycmakeargs bash array.
# @CODE
# src_configure() {
# local mycmakeargs=(
-# $(cmake_use_with openconnect)
+# $(cmake_use_find_package foo LibFoo)
# )
-#
# cmake_src_configure
# }
# @CODE
-
-# @FUNCTION: cmake_src_configure
-# @DESCRIPTION:
-# General function for configuring with cmake. Default behaviour is to start an
-# out-of-source build.
cmake_src_configure() {
debug-print-function ${FUNCNAME} "$@"
@@ -561,8 +562,8 @@ cmake_src_configure() {
# @FUNCTION: cmake_src_compile
# @DESCRIPTION:
-# General function for compiling with cmake.
-# Automatically detects the build type. All arguments are passed to emake.
+# General function for compiling with cmake. All arguments are passed
+# to cmake_build.
cmake_src_compile() {
debug-print-function ${FUNCNAME} "$@"
@@ -572,7 +573,8 @@ cmake_src_compile() {
# @FUNCTION: cmake_build
# @DESCRIPTION:
# Function for building the package. Automatically detects the build type.
-# All arguments are passed to emake.
+# All arguments are passed to eninja (default) or emake depending on the value
+# of CMAKE_MAKEFILE_GENERATOR.
cmake_build() {
debug-print-function ${FUNCNAME} "$@"
diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass
index 7d5c0f0f9a26..82e764e2a1a4 100644
--- a/eclass/desktop.eclass
+++ b/eclass/desktop.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: desktop.eclass
@@ -162,8 +162,15 @@ make_desktop_entry() {
else
local desktop_name="${PN}-${slot}"
fi
- local desktop="${exec%%[[:space:]]*}"
- desktop="${T}/${desktop##*/}-${desktop_name}.desktop"
+ local desktop_exec="${exec%%[[:space:]]*}"
+ desktop_exec="${desktop_exec##*/}"
+
+ # Prevent collisions if a file with the same name already exists #771708
+ local desktop="${desktop_exec}-${desktop_name}" count=0
+ while [[ -e ${ED}/usr/share/applications/${desktop}.desktop ]]; do
+ desktop="${desktop_exec}-$((++count))-${desktop_name}"
+ done
+ desktop="${T}/${desktop}.desktop"
# Don't append another ";" when a valid category value is provided.
type=${type%;}${type:+;}
diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index da1813def533..03857d25a2d4 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -1,10 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: dune.eclass
# @MAINTAINER:
# rkitover@gmail.com
# Mark Wright <gienah@gentoo.org>
+# ML <ml@gentoo.org>
# @AUTHOR:
# Rafael Kitover <rkitover@gmail.com>
# @SUPPORTED_EAPIS: 5 6 7
diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index 8090d6ce5c29..0e37e2ecfa0f 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.eclass
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: findlib.eclass
# @MAINTAINER:
-# maintainer-needed@gentoo.org
+# ML <ml@gentoo.org>
# @AUTHOR:
# Original author: Matthieu Sozeau <mattam@gentoo.org> (retired)
# @BLURB: ocamlfind (a.k.a. findlib) eclass
diff --git a/eclass/golang-base.eclass b/eclass/golang-base.eclass
index 45603d76fd5d..e700d17a4d8f 100644
--- a/eclass/golang-base.eclass
+++ b/eclass/golang-base.eclass
@@ -36,6 +36,9 @@ QA_FLAGS_IGNORED='.*'
# Upstream does not support stripping go packages
RESTRICT="strip"
+# force GO111MODULE to be auto for bug https://bugs.gentoo.org/771129
+export GO111MODULE=auto
+
# @ECLASS-VARIABLE: EGO_PN
# @REQUIRED
# @DESCRIPTION:
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index 819b73d5dfa4..f0b6079ef968 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.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: kde.org.eclass
@@ -86,6 +86,10 @@ case ${CATEGORY} in
*) ;;
esac
+# @FUNCTION: _kde.org_is_unreleased
+# @INTERNAL
+# @DESCRIPTION:
+# Return true if $CATEGORY-$PV matches against an entry in KDE_UNRELEASED array.
_kde.org_is_unreleased() {
local pair
for pair in "${KDE_UNRELEASED[@]}" ; do
@@ -101,6 +105,9 @@ _kde.org_is_unreleased() {
return 1
}
+# @FUNCTION: _kde.org_calculate_src_uri
+# @INTERNAL
+# @DESCRIPTION:
# Determine fetch location for released tarballs
_kde.org_calculate_src_uri() {
debug-print-function ${FUNCNAME} "$@"
@@ -162,6 +169,9 @@ _kde.org_calculate_src_uri() {
fi
}
+# @FUNCTION: _kde.org_calculate_live_repo
+# @INTERNAL
+# @DESCRIPTION:
# Determine fetch location for live sources
_kde.org_calculate_live_repo() {
debug-print-function ${FUNCNAME} "$@"
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 249f038fa107..b4f7be60df34 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -32,9 +32,12 @@ case "${EAPI:-0}" in
;;
esac
-inherit savedconfig toolchain-funcs kernel-install
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit python-any-r1 savedconfig toolchain-funcs kernel-install
BDEPEND="
+ ${PYTHON_DEPS}
sys-devel/bc
sys-devel/flex
virtual/libelf
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index b8109f47d0bf..231dce2de6a4 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -58,6 +58,12 @@ RDEPEND="
sys-kernel/installkernel-systemd-boot
)
initramfs? ( >=sys-kernel/dracut-049-r3 )"
+# needed by objtool that is installed along with the kernel and used
+# to build external modules
+# NB: linux-mod.eclass also adds this dep but it's cleaner to have
+# it here, and resolves QA warnings: https://bugs.gentoo.org/732210
+RDEPEND+="
+ virtual/libelf"
BDEPEND="
test? (
dev-tcltk/expect
@@ -211,9 +217,15 @@ kernel-install_test() {
local qemu_arch=$(kernel-install_get_qemu_arch)
+ # NB: if you pass a path that does not exist or is not a regular
+ # file/directory, dracut will silently ignore it and use the default
+ # https://github.com/dracutdevs/dracut/issues/1136
+ > "${T}"/empty-file || die
+ mkdir -p "${T}"/empty-directory || die
+
dracut \
- --conf /dev/null \
- --confdir /dev/null \
+ --conf "${T}"/empty-file \
+ --confdir "${T}"/empty-directory \
--no-hostonly \
--kmoddir "${modules}" \
"${T}/initrd" "${version}" || die
@@ -402,8 +414,7 @@ kernel-install_pkg_prerm() {
# @FUNCTION: kernel-install_pkg_postrm
# @DESCRIPTION:
-# No-op at the moment. Will be used to remove obsolete kernels
-# in the future.
+# Clean up the generated initramfs from the removed kernel directory.
kernel-install_pkg_postrm() {
debug-print-function ${FUNCNAME} "${@}"
@@ -411,7 +422,7 @@ kernel-install_pkg_postrm() {
local ver="${PV}${KV_LOCALVERSION}"
local image_path=$(dist-kernel_get_image_path)
ebegin "Removing initramfs"
- rm -f "${EROOT}/usr/src/linux-${ver}/${image_path%/*}/initrd" &&
+ rm -f "${EROOT}/usr/src/linux-${ver}/${image_path%/*}"/initrd{,.uefi} &&
find "${EROOT}/usr/src/linux-${ver}" -depth -type d -empty -delete
eend ${?}
fi
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
index 761ffdbad5e2..2da2ba0aa90a 100644
--- a/eclass/llvm.eclass
+++ b/eclass/llvm.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: llvm.eclass
@@ -85,7 +85,7 @@ DEPEND="!!sys-devel/llvm:0"
# @INTERNAL
# @DESCRIPTION:
# Correct values of LLVM slots, newest first.
-declare -g -r _LLVM_KNOWN_SLOTS=( {12..8} )
+declare -g -r _LLVM_KNOWN_SLOTS=( {13..8} )
# @FUNCTION: get_llvm_prefix
# @USAGE: [-b|-d] [<max_slot>]
diff --git a/eclass/oasis.eclass b/eclass/oasis.eclass
index bcc46b4af326..53cfbb87122e 100644
--- a/eclass/oasis.eclass
+++ b/eclass/oasis.eclass
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: oasis.eclass
# @MAINTAINER:
-# maintainer-needed@gentoo.org
+# ML <ml@gentoo.org>
# @AUTHOR:
# Original Author: Alexis Ballier <aballier@gentoo.org>
# @SUPPORTED_EAPIS: 3 4 5
diff --git a/eclass/opam.eclass b/eclass/opam.eclass
index 05ebea510548..338ba842cd9c 100644
--- a/eclass/opam.eclass
+++ b/eclass/opam.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: opam.eclass
# @MAINTAINER:
# Mark Wright <gienah@gentoo.org>
+# ML <ml@gentoo.org>
# @AUTHOR:
# Alexis Ballier <aballier@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 59f8660a3d90..f41ce22c5915 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -170,7 +170,16 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
tc_version_is_at_least 6.5 &&
IUSE+=" graphite" TC_FEATURES+=(graphite)
tc_version_is_between 4.9 8 && IUSE+=" cilk"
- tc_version_is_at_least 4.9 && IUSE+=" ada +vtv"
+ tc_version_is_at_least 4.9 && IUSE+=" ada"
+
+ # Don't enable USE=vtv starting from gcc-10. Once gcc-10
+ # stable everywhere disable by default on older versions
+ # as well.
+ if tc_version_is_at_least 10; then
+ IUSE+=" vtv"
+ elif tc_version_is_at_least 4.9; then
+ IUSE+=" +vtv"
+ fi
tc_version_is_at_least 5.0 && IUSE+=" jit"
tc_version_is_between 5.0 9 && IUSE+=" mpx"
tc_version_is_at_least 6.0 && IUSE+=" +pie +ssp +pch"