# Copyright 2020-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# shellcheck shell=bash
# shellcheck disable=SC2034,SC2155

EAPI=8

# https://distfiles.gentoo.org/pub/proj/dist-kernel/patchsets/
GENTOO_PATCHSET=linux-gentoo-patches-7.1.9
# https://github.com/gentoo/gentoo-kernel-config
GENTOO_CONFIG_VER=g19
# https://github.com/CachyOS/linux-cachyos
CACHY_CONFIG_COMMIT=bd534465e6b8a6fe4483b0ee2c28cbaf00a9b285
# https://github.com/CachyOS/kernel-patches
CACHY_PATCH_COMMIT=99064837d235f63a1fcd12625258f82bcf94c059
# bcachefs backports version
# https://github.com/koverstreet/bcachefs-tools
# https://github.com/xarblu/bcachefs-patches
BCACHEFS_VER=1.39.6
# cachyos tarball release
# https://github.com/CachyOS/linux
CACHY_TAR_REL=1

# available flavours
#CACHY_FLAVOURS="cachyos bmq bore deckify eevdf rt-bore server"
CACHY_FLAVOURS="cachyos bore deckify eevdf rt-bore server"

# patches
CACHY_PATCH_SPECS=(
	# flavours
	#bmq:sched/0001-prjc-cachy.patch
	bore:sched/0001-bore-cachy.patch
	deckify:misc/0001-acpi-call.patch
	deckify:misc/0001-handheld.patch
	deckify:sched/0001-bore-cachy.patch
	rt-bore:sched/0001-bore-cachy.patch
	rt-bore:misc/0001-rt-i915.patch
	# other scheds
	#muqss:sched/0001-muqss-cachy.patch
	# clang
	clang:misc/dkms-clang.patch
)

case "${PV}" in
	*_pre*|*_rc*) ;;
	*) KEYWORDS="~amd64" ;;
esac

inherit cachyos-kernel-build