commit:     375703a32fcb3885dec6a435bf44ea11650d0c80
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 19:43:29 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 13 19:57:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=375703a3

linux-mod.eclass: use pigz for parallel compression if available

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/linux-mod.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 8f511ba8ff05..e837916b881a 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -719,7 +719,11 @@ linux-mod_src_install() {
                        xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ}
                        doins ${modulename}.${KV_OBJ}.xz || die "doins 
${modulename}.${KV_OBJ}.xz failed"
                elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
-                       gzip ${modulename}.${KV_OBJ}
+                       if type -P pigz ; then
+                               pigz -n$(makeopts_jobs) ${modulename}.${KV_OBJ}
+                       else
+                               gzip ${modulename}.${KV_OBJ}
+                       fi
                        doins ${modulename}.${KV_OBJ}.gz || die "doins 
${modulename}.${KV_OBJ}.gz failed"
                elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
                        zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ}

Reply via email to