--- nvidia-drivers-173.14.31.ebuild.orig 2012-03-23 23:59:43.000000000 +0100 +++ nvidia-drivers-173.14.31.ebuild.orig 2012-03-24 00:13:23.000000000 +0100 @@ -254,6 +254,11 @@ -e 's:-Wsign-compare::g' \ "${NV_SRC}"/Makefile.kbuild + # Fix building with Linux 3.3.x wrt #408841 + sed -i \ + -e '/CFLAGS="$CFLAGS/s:-I$SOURCES/arch/x86/include:& -I$OUTPUT/arch/x86/include/generated:' \ + usr/src/nv/conftest.sh || die + # If you set this then it's your own fault when stuff breaks :) use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*