x11-drivers/nvidia-drivers-173.14.09 does not respect custom cflags,
because there's a correct path to a Makefile missing in that ebuild.
emerge output (i used version 177.13, but this error seems to be in every
ebuild that has "custom-cflags" as use flag:
------------------
...
* Checking for MTRR support ...
[ ok ]
* Checking for Paravirtualized guest support ...
>>> Unpacking source...
Creating directory NVIDIA-Linux-x86_64-177.13-pkg2
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64
177.13...........................................................................................................................................
* Applying NVIDIA_glx-defines.patch ...
[ ok ]
* Applying NVIDIA_glx-glheader.patch ...
[ ok ]
* Applying NVIDIA_i2c-hwmon.patch ...
[ ok ]
sed: can't read Makefile.*: Datei oder Verzeichnis nicht gefunden
* Converting NVIDIA-Linux-x86_64-177.13-pkg2/usr/src/nv/Makefile.kbuild to use
M= instead of SUBDIRS= ... [ ok ]
>>> Source unpacked.
...
------------------
As you see, the ebuild tries to patch Makefile.* in ${S}, which doesn't exist.
As an easy workaround it should be enough to use "${NV_SRC}"/Makefile.* here.
I'll attach a patch.
thx in advance ;)
Reproducible: Always
Steps to Reproduce:
1. emerge nvidia-drivers