blob: 392cff262b0fb7ba1a4e7b7c4d8c136825406d04 [file] [log] [blame]
# Copyright 2015 Google Inc. All rights reserved.
# This overrides the virtual/linux-sources package in chromiumos-overlay to
# include the custom Lakitu kernel.
EAPI="5"
DESCRIPTION="Lakitu Kernel virtual package"
HOMEPAGE="http://src.chromium.org"
LICENSE="metapackage"
SLOT="0"
KEYWORDS="*"
IUSE_KERNEL_VERS=(
kernel-6_6
kernel-6_1
kernel-5_15
)
IUSE="kernel_sources +base csql lakitu-nc ${IUSE_KERNEL_VERS[*]}"
REQUIRED_USE="?? ( ${IUSE_KERNEL_VERS[*]} )"
# We have to make sure to unmerge any previous chromiumos kernel.
RDEPEND="
!sys-kernel/chromeos-kernel
!sys-kernel/lakitu-kernel
!sys-kernel/upstream-kernel-mainline
!sys-kernel/upstream-kernel-next
kernel-5_15? ( sys-kernel/lakitu-kernel-5_15[kernel_sources=] )
kernel-6_1? (
base? ( sys-kernel/lakitu-kernel-6_1[kernel_sources=] )
csql? ( sys-kernel/csql-kernel-6_1[kernel_sources=] )
lakitu-nc? ( sys-kernel/lakitu-nc-kernel-6_1[kernel_sources=] )
)
kernel-6_6? (
base? ( sys-kernel/lakitu-kernel-6_6[kernel_sources=] )
csql? ( sys-kernel/csql-kernel-6_6[kernel_sources=] )
lakitu-nc? ( sys-kernel/lakitu-nc-kernel-6_6[kernel_sources=] )
)
"
# Add blockers so when migrating between USE flags, the old version gets
# unmerged automatically.
RDEPEND+="
$(for v in "${IUSE_KERNEL_VERS[@]}"; do echo "!${v}? ( !sys-kernel/lakitu-${v} )"; done)
"
# Default to the 6.6 kernel if none has been selected.
RDEPEND_DEFAULT="sys-kernel/lakitu-kernel-6_6"
# Here be dragons!
RDEPEND+="
$(printf '!%s? ( ' "${IUSE_KERNEL_VERS[@]}")
${RDEPEND_DEFAULT}
$(printf '%0.s) ' "${IUSE_KERNEL_VERS[@]}")
"