diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-14 01:43:18 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-14 01:43:18 +0100 |
commit | 30737dc88991519b90363c2c7bae8fd049098d13 (patch) | |
tree | 765be9d1f204022a140e3ce7307c5bee63420459 /eclass | |
parent | 174cda0f83caffc0ee683143e9b2c501ef589cc1 (diff) |
gentoo auto-resync : 14:10:2022 - 01:43:18
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 37294 -> 37310 bytes | |||
-rw-r--r-- | eclass/kernel-2.eclass | 4 | ||||
-rw-r--r-- | eclass/kernel-build.eclass | 23 | ||||
-rw-r--r-- | eclass/linux-mod.eclass | 36 | ||||
-rw-r--r-- | eclass/lua-single.eclass | 4 |
5 files changed, 46 insertions, 21 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 5c4980e01bf5..39a7675ad150 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 50464470a9bb..c18ef21099d1 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -281,7 +281,7 @@ # If you do change them, there is a chance that we will not fix resulting bugs; # that of course does not mean we're not willing to help. -inherit estack toolchain-funcs +inherit estack multiprocessing toolchain-funcs case ${EAPI} in 7|8) ;; @@ -1065,7 +1065,7 @@ unipatch() { extention=${extention/:*/} PIPE_CMD="" case ${extention} in - xz) PIPE_CMD="xz -dc";; + xz) PIPE_CMD="xz -T$(makeopts_jobs) -dc";; lzma) PIPE_CMD="lzma -dc";; bz2) PIPE_CMD="bzip2 -dc";; patch*) PIPE_CMD="cat";; diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 98a385bf72c0..1fa25cbc9574 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -29,7 +29,7 @@ esac PYTHON_COMPAT=( python3_{8..11} ) -inherit python-any-r1 savedconfig toolchain-funcs kernel-install +inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install BDEPEND=" ${PYTHON_DEPS} @@ -90,6 +90,27 @@ kernel-build_src_configure() { ARCH=$(tc-arch-kernel) ) + if type -P xz &>/dev/null ; then + export XZ_OPT="-T$(makeopts_jobs)" + fi + + if type -P zstd &>/dev/null ; then + export ZSTD_NBTHREADS="$(makeopts_jobs)" + fi + + # pigz/pbzip2/lbzip2 all need to take an argument, not an env var, + # for their options, which won't work because of how the kernel build system + # uses the variables (e.g. passes directly to tar as an executable). + if type -P pigz &>/dev/null ; then + MAKEARGS+=( KGZIP="pigz" ) + fi + + if type -P pbzip2 &>/dev/null ; then + MAKEARGS+=( KBZIP2="pbzip2" ) + elif type -P lbzip2 &>/dev/null ; then + MAKEARGS+=( KBZIP2="lbzip2" ) + fi + restore_config .config [[ -f .config ]] || die "Ebuild error: please copy default config into .config" diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index b7c13cbf7e76..850645106e63 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -150,8 +150,8 @@ # It's a read-only variable. It contains the extension of the kernel modules. case ${EAPI:-0} in - [67]) - inherit eutils + [67]) + inherit eutils ;; 8) ;; @@ -163,7 +163,7 @@ _LINUX_MOD_ECLASS=1 # TODO: When adding support for future EAPIs, please audit this list # for unused inherits and conditionalise them. -inherit linux-info multilib toolchain-funcs +inherit linux-info multilib multiprocessing toolchain-funcs case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; @@ -361,8 +361,8 @@ generate_modulesd() { debug-print-function ${FUNCNAME} $* [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return - local currm_path currm currm_t t myIFS myVAR - local module_docs module_enabled module_aliases \ + local currm_path currm currm_t t myIFS myVAR + local module_docs module_enabled module_aliases \ module_additions module_examples module_modinfo module_opts for currm_path in ${@} @@ -380,9 +380,9 @@ generate_modulesd() { module_additions="$(eval echo \${#MODULESD_${currm_t}_ADDITIONS[*]})" module_examples="$(eval echo \${#MODULESD_${currm_t}_EXAMPLES[*]})" - [[ ${module_aliases} -eq 0 ]] && unset module_aliases + [[ ${module_aliases} -eq 0 ]] && unset module_aliases [[ ${module_additions} -eq 0 ]] && unset module_additions - [[ ${module_examples} -eq 0 ]] && unset module_examples + [[ ${module_examples} -eq 0 ]] && unset module_examples # If we specify we dont want it, then lets exit, otherwise we assume # that if its set, we do want it. @@ -712,22 +712,26 @@ linux-mod_src_install() { cd "${objdir}" || die "${objdir} does not exist" insinto "${INSTALL_MOD_PATH}"/lib/modules/${KV_FULL}/${libdir} - # check here for CONFIG_MODULE_COMPRESS_<compression option> (NONE, GZIP, XZ, ZSTD) + # check here for CONFIG_MODULE_COMPRESS_<compression option> (NONE, GZIP, XZ, ZSTD) # and similarily compress the module being built if != NONE. if linux_chkconfig_present MODULE_COMPRESS_XZ; then - xz ${modulename}.${KV_OBJ} - doins ${modulename}.${KV_OBJ}.xz || die "doins ${modulename}.${KV_OBJ}.xz failed" + xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz failed" + doins ${modulename}.${KV_OBJ}.xz elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then - gzip ${modulename}.${KV_OBJ} - doins ${modulename}.${KV_OBJ}.gz || die "doins ${modulename}.${KV_OBJ}.gz failed" + if type -P pigz &>/dev/null ; then + pigz -n$(makeopts_jobs) ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with pigz failed" + else + gzip ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with gzip failed" + fi + doins ${modulename}.${KV_OBJ}.gz elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then - zstd ${modulename}.${KV_OBJ} - doins ${modulename}.${KV_OBJ}.zst || die "doins ${modulename}.${KV_OBJ}.zst failed" + zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ} || "Compressing ${modulename}.${KV_OBJ} with zstd failed" + doins ${modulename}.${KV_OBJ}.zst else - doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" + doins ${modulename}.${KV_OBJ} fi - cd "${OLDPWD}" + cd "${OLDPWD}" || die "${OLDPWD} does not exist" generate_modulesd "${objdir}/${modulename}" done diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass index 12eba57f4a89..aadd3b4ea675 100644 --- a/eclass/lua-single.eclass +++ b/eclass/lua-single.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: lua-single.eclass @@ -52,7 +52,7 @@ # " # BDEPEND="virtual/pkgconfig" # -# # Only neeed if the setup phase has to do more than just call lua-single_pkg_setup +# # Only need if the setup phase has to do more than just call lua-single_pkg_setup # pkg_setup() { # lua-single_pkg_setup # [...] |