1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 K_WANT_GENPATCHES
="base extras"
6 #Note: to bump xanmod, check K_GENPATCHES_VER in sys-kernel/gentoo-sources
8 K_SECURITY_UNSUPPORTED
="1"
9 K_NOSETEXTRAVERSION
="1"
14 DESCRIPTION
="Full XanMod source, including the Gentoo patchset and other patch options."
15 HOMEPAGE
="https://xanmod.org
16 https://github.com/zhmars/cjktty-patches
17 https://github.com/hamadmarri/TT-CPU-Scheduler"
22 # Freeze the 'tt' use flag until the corresponding patch is released upstream.
28 XANMOD_URI
="https://github.com/xanmod/linux/releases/download/"
30 TT_URI
="https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/"
31 CJKTTY_URI
="https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v${KV_MAJOR}.x/"
33 ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz
35 ${XANMOD_URI}/${OKV}${XANMOD_VERSION}/patch-${OKV}${XANMOD_VERSION}.xz
36 ${CJKTTY_URI}/cjktty-${KV_MAJOR}.${KV_MINOR}.patch
38 #${TT_URI}/${KV_MAJOR}.${KV_MINOR}/tt-${KV_MAJOR}.${KV_MINOR}.patch
39 #${CJKTTY_URI}/cjktty-${KV_MAJOR}.${KV_MINOR}.patch
44 mkdir
"${WORKDIR}/genpatches" || die
45 for i
in ${K_WANT_GENPATCHES}; do
46 tar xf
"${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}-${K_GENPATCHES_VER}.${i}.tar.xz" \
47 -C "${WORKDIR}/genpatches" || die
50 rm "${WORKDIR}"/genpatches/*linux-"${KV_MAJOR}"."${KV_MINOR}"*.
patch || die
53 for i
in $
(dir
"${WORKDIR}"/genpatches
/*.
patch); do
54 UNIPATCH_LIST
+=" ${i}"
58 UNIPATCH_LIST
+=" ${DISTDIR}/cjktty-${KV_MAJOR}.${KV_MINOR}.patch"
61 UNIPATCH_LIST
+=" ${DISTDIR}/patch-${OKV}${XANMOD_VERSION}.xz"
62 unipatch
"${UNIPATCH_LIST}"
63 unpack_fix_install_path
70 elog
"Use xanmod-sources with microcodes"
71 elog
"Read https://wiki.gentoo.org/wiki/Intel_microcode"