sys-kernel/xanmod-{kernel, sources}: version bump, update metadata
[gentoo-zh.git] / sys-kernel / xanmod-sources / xanmod-sources-6.1.46.ebuild
blob9f962f332f52919a43773ce0daadca387f7dcf76
1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI="8"
5 K_WANT_GENPATCHES="base extras"
6 #Note: to bump xanmod, check K_GENPATCHES_VER in sys-kernel/gentoo-sources
7 K_GENPATCHES_VER="52"
8 K_SECURITY_UNSUPPORTED="1"
9 K_NOSETEXTRAVERSION="1"
10 ETYPE="sources"
11 inherit kernel-2
12 detect_version
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"
18 LICENSE+=" CDDL"
19 KEYWORDS="~amd64"
22 # Freeze the 'tt' use flag until the corresponding patch is released upstream.
24 #IUSE="cjktty tt"
26 IUSE="cjktty"
27 XANMOD_VERSION="1"
28 XANMOD_URI="mirror://sourceforge/xanmod"
29 OKV="${OKV}-xanmod"
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/"
32 SRC_URI="
33 ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz
34 ${GENPATCHES_URI}
35 ${XANMOD_URI}/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
42 src_unpack() {
43 universal_unpack
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
48 done
50 rm "${WORKDIR}"/genpatches/*linux-"${KV_MAJOR}"."${KV_MINOR}"*.patch || die
52 UNIPATCH_LIST=""
53 for i in $(dir "${WORKDIR}"/genpatches/*.patch); do
54 UNIPATCH_LIST+=" ${i}"
55 done
57 if use cjktty; then
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
64 env_setup_xmakeopts
65 cd "${S}" || die
68 pkg_postinst() {
69 elog "MICROCODES"
70 elog "Use xanmod-sources with microcodes"
71 elog "Read https://wiki.gentoo.org/wiki/Intel_microcode"
73 kernel-2_pkg_postinst
76 #pkg_postrm() {
77 # kernel-2_pkg_postrm