summaryrefslogtreecommitdiff
path: root/eclass/kernel-install.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-25 19:30:41 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-25 19:30:41 +0000
commit026061ba423025e6713112920f290759cdee03c4 (patch)
tree0e557363849e4d5c1320820fcf175bc1ec9690ab /eclass/kernel-install.eclass
parent479921825a5c44a5fbcd5441f00ee98e54db9bac (diff)
gentoo auto-resync : 25:12:2023 - 19:30:41
Diffstat (limited to 'eclass/kernel-install.eclass')
-rw-r--r--eclass/kernel-install.eclass24
1 files changed, 18 insertions, 6 deletions
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 9612700a1431..8c4d5c14fc03 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -79,7 +79,7 @@ _IDEPEND_BASE="
LICENSE="GPL-2"
if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
- IUSE+=" generic-uki"
+ IUSE+=" generic-uki module-compress"
# https://github.com/AndrewAmmerlaan/dist-kernel-log-to-licenses
# This script can help with generating the array below, keep in mind
# that it is not a fully automatic solution, i.e. use flags will
@@ -127,7 +127,6 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
["dev-libs/openssl"]="Apache-2.0"
["dev-libs/userspace-rcu"]="LGPL-2.1"
["media-libs/libmtp"]="LGPL-2.1"
- ["media-libs/libpng"]="libpng2"
["media-libs/libv4l"]="LGPL-2.1+"
["net-dns/c-ares"]="MIT ISC"
["net-dns/libidn2"]="|| ( GPL-2+ LGPL-3+ ) GPL-3+ unicode"
@@ -159,15 +158,12 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
["sys-apps/nvme-cli"]="GPL-2 GPL-2+"
["sys-apps/pcsc-lite"]="BSD ISC MIT GPL-3+ GPL-2"
["sys-apps/rng-tools"]="GPL-2"
- ["sys-apps/sandbox"]="GPL-2"
["sys-apps/sed"]="GPL-3+"
["sys-apps/shadow"]="BSD GPL-2"
["sys-apps/systemd[boot(-),cryptsetup,pkcs11,policykit,tpm,ukify(-)]"]="GPL-2 LGPL-2.1 MIT public-domain"
["sys-apps/util-linux"]="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
["sys-auth/polkit"]="LGPL-2"
["sys-block/nbd"]="GPL-2"
- ["sys-block/open-isns"]="LGPL-2.1"
- ["sys-boot/plymouth"]="GPL-2"
["sys-devel/gcc"]="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+"
["sys-fs/btrfs-progs"]="GPL-2"
["sys-fs/cryptsetup"]="GPL-2+"
@@ -192,7 +188,6 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
["sys-libs/readline"]="GPL-3+"
["sys-libs/zlib"]="ZLIB"
["sys-process/procps"]="GPL-2+ LGPL-2+ LGPL-2.1+"
- ["x11-libs/libdrm"]="MIT"
["amd64? ( sys-firmware/intel-microcode )"]="amd64? ( intel-ucode )"
["x86? ( sys-firmware/intel-microcode )"]="x86? ( intel-ucode )"
)
@@ -200,6 +195,9 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
generic-uki? ( ${INITRD_PACKAGES[@]} )
"
+ RDEPEND+="
+ sys-apps/kmod[lzma]
+ "
IDEPEND="
generic-uki? (
|| (
@@ -762,6 +760,20 @@ kernel-install_pkg_config() {
kernel-install_install_all "${PV}${KV_LOCALVERSION}"
}
+# @FUNCTION: kernel-install_compress_modules
+# @DESCRIPTION:
+# Compress modules installed in ED, if USE=module-compress is enabled.
+kernel-install_compress_modules() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ if use module-compress; then
+ einfo "Compressing kernel modules ..."
+ # taken from scripts/Makefile.modinst
+ find "${ED}/lib" -name '*.ko' -exec \
+ xz --check=crc32 --lzma2=dict=1MiB {} + || die
+ fi
+}
+
fi
EXPORT_FUNCTIONS src_test pkg_preinst pkg_postinst pkg_prerm pkg_postrm