There are two things you need to do:
- Expose the patches to the ebuild
- Update the ebuild so it doesn't limit you to "MODULES_KERNEL_MAX=6.6"
So copy kernel-6.10.patch to the patch directory you created (/etc/portage/patches/x11-drivers/nvidia-drivers-470.256.02/) as 0001-kernel-6.10.patch and copy kernel-6.12.patch as 0002-kernel-6.12.patch.
Next copy the gentoo ebuild and it's files to your local overlay
Code: Select all
mkdir -p /var/db/repos/local/x11-drivers/nvidia-drivers/files
cp /var/db/repos/gentoo/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild /var/db/repos/local/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r3.ebuild <<note the revision increment
cp /var/db/repos/gentoo/x11-drivers/nvidia-drivers/files/* /var/db/repos/local/x11-drivers/nvidia-drivers/files/
Update the new local ebuild so it will allow compilation against your 6.12 kernel, with an editor, or just
Code: Select all
sed -i 's/MODULES_KERNEL_MAX=6.6/MODULES_KERNEL_MAX=6.12/' /var/db/repos/local/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r3.ebuild
Then use the ebuild command to "digest" it
Code: Select all
ebuild /var/db/repos/local/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r3.ebuild digest
If you have not used a local overlay before you'll need:
Code: Select all
[local]
location = /var/db/repos/local
priority = 10
masters = gentoo
Now if you
emerge nvidia-drivers portage should want to install x11-drivers/nvidia-drivers-470.256.02-r3::local instead of x11-drivers/nvidia-drivers-470.256.02-r2::gentoo
I have no intention of teaching grandma to suck eggs with this post, I just thought it best to be thorough.