summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin35980 -> 35975 bytes
-rw-r--r--eclass/kernel-2.eclass21
-rw-r--r--eclass/linux-info.eclass11
-rw-r--r--eclass/linux-mod.eclass13
-rw-r--r--eclass/lua-single.eclass2
-rw-r--r--eclass/lua-utils.eclass4
-rw-r--r--eclass/lua.eclass2
-rw-r--r--eclass/meson-multilib.eclass8
-rw-r--r--eclass/meson.eclass56
9 files changed, 67 insertions, 50 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 900de55148fa..e75fbd345d06 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 58e0bae94eee..c2f1e93dca68 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -220,11 +220,6 @@ fi
HOMEPAGE="https://www.kernel.org/ https://wiki.gentoo.org/wiki/Kernel ${HOMEPAGE}"
: ${LICENSE:="GPL-2"}
-# This is the latest KV_PATCH of the deblob tool available from the
-# libre-sources upstream. If you bump this, you MUST regenerate the Manifests
-# for ALL kernel-2 consumer packages where deblob is available.
-: ${DEBLOB_MAX_VERSION:=38}
-
# No need to run scanelf/strip on kernel sources/headers (bug #134453).
RESTRICT="binchecks strip"
@@ -558,10 +553,9 @@ kernel_is() {
local v n=0
for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done
[[ ${n} -eq 1 ]] && detect_version
- unset v n
# Now we can continue
- local operator test value
+ local operator
case ${1#-} in
lt) operator="-lt"; shift;;
@@ -573,9 +567,10 @@ kernel_is() {
esac
[[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters"
- : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH ))
- : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} ))
- [ ${test} ${operator} ${value} ]
+ ver_test \
+ "${KV_MAJOR:-0}.${KV_MINOR:-0}.${KV_PATCH:-0}" \
+ "${operator}" \
+ "${1:-${KV_MAJOR:-0}}.${2:-${KV_MINOR:-0}}.${3:-${KV_PATCH:-0}}"
}
# Capture the sources type and set DEPENDs
@@ -600,11 +595,6 @@ if [[ ${ETYPE} == sources ]]; then
# Bug #266157, deblob for libre support
if [[ -z ${K_PREDEBLOBBED} ]]; then
- # Bug #359865, force a call to detect_version if needed
- kernel_is ge 2 6 27 && \
- [[ -z ${K_DEBLOB_AVAILABLE} ]] && \
- kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
- K_DEBLOB_AVAILABLE=1
# deblob less than 5.10 require python 2.7
if kernel_is lt 5 10; then
K_DEBLOB_AVAILABLE=0
@@ -621,7 +611,6 @@ if [[ ${ETYPE} == sources ]]; then
# tree has been dropped from the kernel.
kernel_is lt 4 14 && LICENSE+=" !deblob? ( linux-firmware )"
- [[ ${EAPI} == 6 ]] && DEPEND+=" deblob? ( ${PYTHON_DEPS} )" ||
BDEPEND+=" deblob? ( ${PYTHON_DEPS} )"
if [[ -n KV_MINOR ]]; then
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 6da13cc0b2f5..8edd17c317d4 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -395,7 +395,7 @@ kernel_is() {
linux-info_get_any_version
# Now we can continue
- local operator test value
+ local operator
case ${1#-} in
lt) operator="-lt"; shift;;
@@ -407,9 +407,10 @@ kernel_is() {
esac
[[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters"
- : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH ))
- : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} ))
- [ ${test} ${operator} ${value} ]
+ ver_test \
+ "${KV_MAJOR:-0}.${KV_MINOR:-0}.${KV_PATCH:-0}" \
+ "${operator}" \
+ "${1:-${KV_MAJOR:-0}}.${2:-${KV_MINOR:-0}}.${3:-${KV_PATCH:-0}}"
}
get_localversion() {
@@ -457,7 +458,7 @@ get_version_warning_done=
#
# The kernel version variables (KV_MAJOR, KV_MINOR, KV_PATCH, KV_EXTRA and KV_LOCAL) are also set.
#
-# The KV_DIR is set using the KERNEL_DIR env var, the KV_DIR_OUT is set using a valid
+# The KV_DIR is set using the KERNEL_DIR env var, the KV_OUT_DIR is set using a valid
# KBUILD_OUTPUT (in a decreasing priority list, we look for the env var, makefile var or the
# symlink /lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build).
get_version() {
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 7e47a2e209d5..eda5e9aee013 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -20,12 +20,14 @@
# @ECLASS-VARIABLE: MODULES_OPTIONAL_USE
# @PRE_INHERIT
+# @DEFAULT_UNSET
# @DESCRIPTION:
# A string containing the USE flag to use for making this eclass optional
# The recommended non-empty value is 'modules'
# @ECLASS-VARIABLE: MODULES_OPTIONAL_USE_IUSE_DEFAULT
# @PRE_INHERIT
+# @DEFAULT_UNSET
# @DESCRIPTION:
# A boolean to control the IUSE default state for the MODULES_OPTIONAL_USE USE
# flag. Default value is unset (false). True represented by 1 or 'on', other
@@ -35,21 +37,26 @@
# @DESCRIPTION:
# A string containing the directory of the target kernel sources. The default value is
# "/usr/src/linux"
+: ${KERNEL_DIR:=/usr/src/linux}
# @ECLASS-VARIABLE: ECONF_PARAMS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# It's a string containing the parameters to pass to econf.
# If this is not set, then econf isn't run.
# @ECLASS-VARIABLE: BUILD_PARAMS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# It's a string with the parameters to pass to emake.
# @ECLASS-VARIABLE: BUILD_TARGETS
# @DESCRIPTION:
# It's a string with the build targets to pass to make. The default value is "clean module"
+: ${BUILD_TARGETS:=clean module}
# @ECLASS-VARIABLE: MODULE_NAMES
+# @DEFAULT_UNSET
# @DESCRIPTION:
# It's a string containing the modules to be built automatically using the default
# src_compile/src_install. It will only make ${BUILD_TARGETS} once in any directory.
@@ -94,12 +101,14 @@
# This can be explicitly enabled by setting any of the following variables.
# @ECLASS-VARIABLE: MODULESD_<modulename>_ENABLED
+# @DEFAULT_UNSET
# @DESCRIPTION:
# This is used to disable the modprobe.d file generation otherwise the file will be
# always generated (unless no MODULESD_<modulename>_* variable is provided). Set to "no" to disable
# the generation of the file and the installation of the documentation.
# @ECLASS-VARIABLE: MODULESD_<modulename>_EXAMPLES
+# @DEFAULT_UNSET
# @DESCRIPTION:
# This is a bash array containing a list of examples which should
# be used. If you want us to try and take a guess set this to "guess".
@@ -111,6 +120,7 @@
# where array_component is "<modulename> options" (see modprobe.conf(5))
# @ECLASS-VARIABLE: MODULESD_<modulename>_ALIASES
+# @DEFAULT_UNSET
# @DESCRIPTION:
# This is a bash array containing a list of associated aliases.
#
@@ -121,17 +131,20 @@
# where array_component is "wildcard <modulename>" (see modprobe.conf(5))
# @ECLASS-VARIABLE: MODULESD_<modulename>_ADDITIONS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# This is a bash array containing a list of additional things to
# add to the bottom of the file. This can be absolutely anything.
# Each entry is a new line.
# @ECLASS-VARIABLE: MODULESD_<modulename>_DOCS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# This is a string list which contains the full path to any associated
# documents for <modulename>. These files are installed in the live tree.
# @ECLASS-VARIABLE: KV_OBJ
+# @INTERNAL
# @DESCRIPTION:
# It's a read-only variable. It contains the extension of the kernel modules.
diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index ba7973d82c44..26967000748c 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -154,7 +154,7 @@ EXPORT_FUNCTIONS pkg_setup
# Example value:
# @CODE
# lua_targets_lua5-1? ( dev-lang/lua:5.1 )
-# lua_targets_lua5-3? ( dev-lang/lua:5.2 )
+# lua_targets_lua5-3? ( dev-lang/lua:5.3 )
# @CODE
# @ECLASS-VARIABLE: LUA_REQUIRED_USE
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 954f776cda2e..3b24f383d7aa 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -231,8 +231,8 @@ _lua_get_library_file() {
# as parameters.
#
# The optional first parameter may specify the requested Lua
-# implementation (either as LUA_TARGETS value, e.g. lua5-2,
-# or an ELUA one, e.g. lua5.2). If no implementation passed,
+# implementation (either as LUA_TARGETS value, e.g. lua5-4,
+# or an ELUA one, e.g. lua5.4). If no implementation passed,
# the current one will be obtained from ${ELUA}.
_lua_export() {
debug-print-function ${FUNCNAME} "${@}"
diff --git a/eclass/lua.eclass b/eclass/lua.eclass
index b6c309a3e55f..f1967ae6e015 100644
--- a/eclass/lua.eclass
+++ b/eclass/lua.eclass
@@ -157,7 +157,7 @@ fi
# Example value:
# @CODE
# lua_targets_lua5-1? ( dev-lang/lua:5.1 )
-# lua_targets_lua5-3? ( dev-lang/lua:5.2 )
+# lua_targets_lua5-3? ( dev-lang/lua:5.3 )
# @CODE
# @ECLASS-VARIABLE: LUA_REQUIRED_USE
diff --git a/eclass/meson-multilib.eclass b/eclass/meson-multilib.eclass
index fc1ef5802f93..1ed95f99fa18 100644
--- a/eclass/meson-multilib.eclass
+++ b/eclass/meson-multilib.eclass
@@ -3,10 +3,10 @@
# @ECLASS: meson-multilib.eclass
# @MAINTAINER:
-# Author: Matt Turner <mattst88@gentoo.org>
+# Matt Turner <mattst88@gentoo.org>
# @AUTHOR:
-# Author: Michał Górny <mgorny@gentoo.org>
-# Author: Matt Turner <mattst88@gentoo.org>
+# Michał Górny <mgorny@gentoo.org>
+# Matt Turner <mattst88@gentoo.org>
# @SUPPORTED_EAPIS: 7 8
# @BLURB: meson wrapper for multilib builds
# @DESCRIPTION:
@@ -125,7 +125,7 @@ meson-multilib_src_install() {
}
multilib_src_install() {
- meson_src_install "${_meson_args[@]}"
+ meson_install "${_meson_args[@]}"
}
fi
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 2a563e367c66..eaff26709a75 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -47,7 +47,7 @@ inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-_MESON_DEPEND=">=dev-util/meson-0.56.0
+_MESON_DEPEND=">=dev-util/meson-0.57.0
>=dev-util/ninja-1.8.2
dev-util/meson-format-array
"
@@ -77,12 +77,6 @@ fi
# Optional meson arguments as Bash array; this should be defined before
# calling meson_src_configure.
-# @VARIABLE: emesontestargs
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Optional meson test arguments as Bash array; this should be defined before
-# calling meson_src_test.
-
# @VARIABLE: MYMESONARGS
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -379,7 +373,17 @@ meson_src_configure() {
meson_src_compile() {
debug-print-function ${FUNCNAME} "$@"
- eninja -C "${BUILD_DIR}" "$@"
+ local mesoncompileargs=(
+ -C "${BUILD_DIR}"
+ --jobs "$(makeopts_jobs "${MAKEOPTS}" 0)"
+ --load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)"
+ --verbose
+ "$@"
+ )
+
+ set -- meson compile "${mesoncompileargs[@]}"
+ echo "$@" >&2
+ "$@" || die "compile failed"
}
# @FUNCTION: meson_src_test
@@ -391,32 +395,42 @@ meson_src_test() {
local mesontestargs=(
-C "${BUILD_DIR}"
+ --num-processes "$(makeopts_jobs "${MAKEOPTS}")"
+ "$@"
)
- [[ -n ${NINJAOPTS} || -n ${MAKEOPTS} ]] &&
- mesontestargs+=(
- --num-processes "$(makeopts_jobs ${NINJAOPTS:-${MAKEOPTS}})"
- )
- # Append additional arguments from ebuild
- mesontestargs+=("${emesontestargs[@]}")
-
- set -- meson test "${mesontestargs[@]}" "$@"
+ set -- meson test "${mesontestargs[@]}"
echo "$@" >&2
"$@" || die "tests failed"
}
+# @FUNCTION: meson_install
+# @USAGE: [extra meson install arguments]
+# @DESCRIPTION:
+# Calls meson install with suitable arguments
+meson_install() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local mesoninstallargs=(
+ -C "${BUILD_DIR}"
+ --destdir "${D}"
+ "$@"
+ )
+
+ set -- meson install "${mesoninstallargs[@]}"
+ echo "$@" >&2
+ "$@" || die "install failed"
+}
+
# @FUNCTION: meson_src_install
-# @USAGE: [extra ninja install arguments]
+# @USAGE: [extra meson install arguments]
# @DESCRIPTION:
# This is the meson_src_install function.
meson_src_install() {
debug-print-function ${FUNCNAME} "$@"
- DESTDIR="${D}" eninja -C "${BUILD_DIR}" install "$@"
-
- pushd "${S}" > /dev/null || die
+ meson_install "$@"
einstalldocs
- popd > /dev/null || die
}
fi