From df1724f88fbcbc43fa959df6e2e98ea59e87071f Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@koprulu.sector>
Date: Sun, 19 Dec 2021 14:55:10 +0000
Subject: x11-drivers/nvidia-drivers-legacy : version bump

---
 .../nvidia-drivers-legacy-dkms-390.144-r1          |  12 -
 .../sys-kernel/nvidia-drivers-legacy-dkms-390.147  |  13 ++
 .../x11-drivers/nvidia-drivers-legacy-390.144-r3   |  15 --
 .../x11-drivers/nvidia-drivers-legacy-390.147      |  16 ++
 .../x11-misc/nvidia-settings-legacy-390.144        |  12 -
 .../x11-misc/nvidia-settings-legacy-390.147        |  13 ++
 metadata/pkg_desc_index                            |   6 +-
 sys-kernel/nvidia-drivers-legacy-dkms/Manifest     |   2 +-
 .../nvidia-drivers-legacy-dkms/files/dkms.patch    |   2 +-
 .../nvidia-drivers-legacy-dkms-390.144-r1.ebuild   |  48 ----
 .../nvidia-drivers-legacy-dkms-390.147.ebuild      |  48 ++++
 x11-drivers/nvidia-drivers-legacy/Manifest         |   2 +-
 x11-drivers/nvidia-drivers-legacy/files/dkms.patch |   2 +-
 .../nvidia-drivers-legacy-390.144-r3.ebuild        | 258 ---------------------
 .../nvidia-drivers-legacy-390.147.ebuild           | 258 +++++++++++++++++++++
 x11-misc/nvidia-settings-legacy/Manifest           |   2 +-
 .../nvidia-settings-legacy-390.144.ebuild          |  97 --------
 .../nvidia-settings-legacy-390.147.ebuild          |  97 ++++++++
 18 files changed, 453 insertions(+), 450 deletions(-)
 delete mode 100644 metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.144-r1
 create mode 100644 metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.147
 delete mode 100644 metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.144-r3
 create mode 100644 metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.147
 delete mode 100644 metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.144
 create mode 100644 metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.147
 delete mode 100644 sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.144-r1.ebuild
 create mode 100644 sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.147.ebuild
 delete mode 100644 x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.144-r3.ebuild
 create mode 100644 x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.147.ebuild
 delete mode 100644 x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.144.ebuild
 create mode 100644 x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.147.ebuild

diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.144-r1 b/metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.144-r1
deleted file mode 100644
index f6548166..00000000
--- a/metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.144-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst prerm unpack
-DEPEND=sys-kernel/dkms
-DESCRIPTION=NVIDIA driver sources for linux
-EAPI=6
-HOMEPAGE=http://www.nvidia.com/
-KEYWORDS=amd64
-LICENSE=GPL-2 NVIDIA-r2
-RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-dkms
-SLOT=0
-SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/390.144/NVIDIA-Linux-x86_64-390.144.run )
-_eclasses_=desktop	c0d27bf73aa08ca05b663dbd31fbef28	edos2unix	33e347e171066657f91f8b0c72ec8773	epatch	9f813bb3c47cf2e60619a663b87c5f4e	estack	055c42df72f76a4f45ec92b35e83cd56	eutils	dab5d8ec471d025b79c9e6906bcf3bff	ltprune	4f3f2db5ce3ccbeeacdf3f94954043aa	multilib	4b66d835ec72e021e359bb81eacfe988	preserve-libs	dbc9f8d2d49c66467bc327fddd8317bd	strip-linguas	ac3ee41ee2d31d8c41a77c0838320cc7	toolchain-funcs	9ea1c67b6f8315fdc2568abb674519aa	vcs-clean	b690a7e9b6c497cf59326a7545df4283	wrapper	4251d4c84c25f59094fd557e0063a974
-_md5_=85c16e3e6bd9d110a90a9cf35f8ce0b4
diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.147 b/metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.147
new file mode 100644
index 00000000..2b3ff722
--- /dev/null
+++ b/metadata/md5-cache/sys-kernel/nvidia-drivers-legacy-dkms-390.147
@@ -0,0 +1,13 @@
+DEFINED_PHASES=install postinst prerm unpack
+DEPEND=sys-kernel/dkms
+DESCRIPTION=NVIDIA driver sources for linux
+EAPI=6
+HOMEPAGE=http://www.nvidia.com/
+INHERIT=eutils
+KEYWORDS=amd64
+LICENSE=GPL-2 NVIDIA-r2
+RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-dkms
+SLOT=0
+SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/390.147/NVIDIA-Linux-x86_64-390.147.run )
+_eclasses_=desktop	c0d27bf73aa08ca05b663dbd31fbef28	edos2unix	33e347e171066657f91f8b0c72ec8773	epatch	9f813bb3c47cf2e60619a663b87c5f4e	estack	055c42df72f76a4f45ec92b35e83cd56	eutils	dab5d8ec471d025b79c9e6906bcf3bff	ltprune	4f3f2db5ce3ccbeeacdf3f94954043aa	multilib	4b66d835ec72e021e359bb81eacfe988	preserve-libs	dbc9f8d2d49c66467bc327fddd8317bd	strip-linguas	ac3ee41ee2d31d8c41a77c0838320cc7	toolchain-funcs	9ea1c67b6f8315fdc2568abb674519aa	vcs-clean	b690a7e9b6c497cf59326a7545df4283	wrapper	4251d4c84c25f59094fd557e0063a974
+_md5_=85c16e3e6bd9d110a90a9cf35f8ce0b4
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.144-r3 b/metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.144-r3
deleted file mode 100644
index 841e1f9f..00000000
--- a/metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.144-r3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test unpack
-DEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-DESCRIPTION=NVIDIA Accelerated Graphics Driver
-EAPI=6
-HOMEPAGE=http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx
-IUSE=acpi +dkms multilib +tools wayland +X abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_s390_32 abi_s390_64
-KEYWORDS=-* ~amd64
-LICENSE=GPL-2 NVIDIA-r2
-PDEPEND=tools? ( ~x11-misc/nvidia-settings-legacy-390.144:0 )
-RDEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=virtual/opencl-3 !!x11-drivers/nvidia-drivers acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-legacy-dkms-390.144:0 ) wayland? ( dev-libs/wayland[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) X? ( <x11-base/xorg-server-1.20.99:= >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXext-1.3.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-libs/zlib[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-RESTRICT=bindist mirror
-SLOT=0
-SRC_URI=amd64? ( http://http.download.nvidia.com/XFree86/Linux-x86_64/390.144/NVIDIA-Linux-x86_64-390.144.run )
-_eclasses_=desktop	c0d27bf73aa08ca05b663dbd31fbef28	edos2unix	33e347e171066657f91f8b0c72ec8773	epatch	9f813bb3c47cf2e60619a663b87c5f4e	estack	055c42df72f76a4f45ec92b35e83cd56	eutils	dab5d8ec471d025b79c9e6906bcf3bff	flag-o-matic	4134b5c0fb719b9161d10bdaba9e09e5	ltprune	4f3f2db5ce3ccbeeacdf3f94954043aa	multibuild	05a584848db4901c97fcd94ae7cc3a97	multilib	4b66d835ec72e021e359bb81eacfe988	multilib-build	19ec165e9adcaa4c132b9e3fe3e7f556	multilib-minimal	be5919734a8448dddd49c2b26db45091	portability	d1186f1e621de7b27ddcae82e6253259	preserve-libs	dbc9f8d2d49c66467bc327fddd8317bd	strip-linguas	ac3ee41ee2d31d8c41a77c0838320cc7	toolchain-funcs	9ea1c67b6f8315fdc2568abb674519aa	unpacker	928e1f35ef78ba9fc2b214e29c2b55a4	vcs-clean	b690a7e9b6c497cf59326a7545df4283	wrapper	4251d4c84c25f59094fd557e0063a974
-_md5_=871067e65302787e187d137e9ec3ad04
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.147 b/metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.147
new file mode 100644
index 00000000..cc32eeff
--- /dev/null
+++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-legacy-390.147
@@ -0,0 +1,16 @@
+DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test unpack
+DEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
+DESCRIPTION=NVIDIA Accelerated Graphics Driver
+EAPI=6
+HOMEPAGE=http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx
+INHERIT=eutils flag-o-matic multilib-minimal portability toolchain-funcs unpacker
+IUSE=acpi +dkms multilib +tools wayland +X abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_s390_32 abi_s390_64
+KEYWORDS=-* ~amd64
+LICENSE=GPL-2 NVIDIA-r2
+PDEPEND=tools? ( ~x11-misc/nvidia-settings-legacy-390.147:0 ) X? ( <x11-base/xorg-server-1.21 )
+RDEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=virtual/opencl-3 !!x11-drivers/nvidia-drivers acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-legacy-dkms-390.147:0 ) wayland? ( dev-libs/wayland[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) X? ( >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXext-1.3.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-libs/zlib[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
+RESTRICT=bindist mirror
+SLOT=0
+SRC_URI=amd64? ( http://http.download.nvidia.com/XFree86/Linux-x86_64/390.147/NVIDIA-Linux-x86_64-390.147.run )
+_eclasses_=desktop	c0d27bf73aa08ca05b663dbd31fbef28	edos2unix	33e347e171066657f91f8b0c72ec8773	epatch	9f813bb3c47cf2e60619a663b87c5f4e	estack	055c42df72f76a4f45ec92b35e83cd56	eutils	dab5d8ec471d025b79c9e6906bcf3bff	flag-o-matic	4134b5c0fb719b9161d10bdaba9e09e5	ltprune	4f3f2db5ce3ccbeeacdf3f94954043aa	multibuild	05a584848db4901c97fcd94ae7cc3a97	multilib	4b66d835ec72e021e359bb81eacfe988	multilib-build	19ec165e9adcaa4c132b9e3fe3e7f556	multilib-minimal	be5919734a8448dddd49c2b26db45091	portability	d1186f1e621de7b27ddcae82e6253259	preserve-libs	dbc9f8d2d49c66467bc327fddd8317bd	strip-linguas	ac3ee41ee2d31d8c41a77c0838320cc7	toolchain-funcs	9ea1c67b6f8315fdc2568abb674519aa	unpacker	928e1f35ef78ba9fc2b214e29c2b55a4	vcs-clean	b690a7e9b6c497cf59326a7545df4283	wrapper	4251d4c84c25f59094fd557e0063a974
+_md5_=f13c6ba5b669930ef6ff5550c6e1f915
diff --git a/metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.144 b/metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.144
deleted file mode 100644
index 6dd9b59b..00000000
--- a/metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.144
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings ~x11-drivers/nvidia-drivers-legacy-390.144:0 virtual/pkgconfig x11-base/xorg-proto
-DESCRIPTION=NVIDIA Linux X11 Settings Utility
-EAPI=6
-HOMEPAGE=http://www.nvidia.com/
-KEYWORDS=-* amd64
-LICENSE=GPL-2
-RDEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings ~x11-drivers/nvidia-drivers-legacy-390.144:0
-SLOT=0
-SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/390.144.tar.gz -> nvidia-settings-legacy-390.144.tar.gz
-_eclasses_=desktop	c0d27bf73aa08ca05b663dbd31fbef28	edos2unix	33e347e171066657f91f8b0c72ec8773	epatch	9f813bb3c47cf2e60619a663b87c5f4e	estack	055c42df72f76a4f45ec92b35e83cd56	eutils	dab5d8ec471d025b79c9e6906bcf3bff	ltprune	4f3f2db5ce3ccbeeacdf3f94954043aa	multilib	4b66d835ec72e021e359bb81eacfe988	preserve-libs	dbc9f8d2d49c66467bc327fddd8317bd	strip-linguas	ac3ee41ee2d31d8c41a77c0838320cc7	toolchain-funcs	9ea1c67b6f8315fdc2568abb674519aa	vcs-clean	b690a7e9b6c497cf59326a7545df4283	wrapper	4251d4c84c25f59094fd557e0063a974
-_md5_=6f44d95f419359984f2f80e9e65cb7e1
diff --git a/metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.147 b/metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.147
new file mode 100644
index 00000000..28c3cf5d
--- /dev/null
+++ b/metadata/md5-cache/x11-misc/nvidia-settings-legacy-390.147
@@ -0,0 +1,13 @@
+DEFINED_PHASES=compile install prepare
+DEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings ~x11-drivers/nvidia-drivers-legacy-390.147:0 virtual/pkgconfig x11-base/xorg-proto
+DESCRIPTION=NVIDIA Linux X11 Settings Utility
+EAPI=6
+HOMEPAGE=http://www.nvidia.com/
+INHERIT=eutils multilib toolchain-funcs
+KEYWORDS=-* amd64
+LICENSE=GPL-2
+RDEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings ~x11-drivers/nvidia-drivers-legacy-390.147:0
+SLOT=0
+SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/390.147.tar.gz -> nvidia-settings-legacy-390.147.tar.gz
+_eclasses_=desktop	c0d27bf73aa08ca05b663dbd31fbef28	edos2unix	33e347e171066657f91f8b0c72ec8773	epatch	9f813bb3c47cf2e60619a663b87c5f4e	estack	055c42df72f76a4f45ec92b35e83cd56	eutils	dab5d8ec471d025b79c9e6906bcf3bff	ltprune	4f3f2db5ce3ccbeeacdf3f94954043aa	multilib	4b66d835ec72e021e359bb81eacfe988	preserve-libs	dbc9f8d2d49c66467bc327fddd8317bd	strip-linguas	ac3ee41ee2d31d8c41a77c0838320cc7	toolchain-funcs	9ea1c67b6f8315fdc2568abb674519aa	vcs-clean	b690a7e9b6c497cf59326a7545df4283	wrapper	4251d4c84c25f59094fd557e0063a974
+_md5_=6f44d95f419359984f2f80e9e65cb7e1
diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index
index 2f404ce0..cc2c07a4 100644
--- a/metadata/pkg_desc_index
+++ b/metadata/pkg_desc_index
@@ -68,7 +68,7 @@ sys-kernel/linux-sources-redcore 5.14.21: Redcore Linux Kernel Sources
 sys-kernel/linux-sources-redcore-lts 5.10.87: Redcore Linux Kernel Sources (LTS)
 sys-kernel/linux-sources-redcore-lts-legacy 5.4.167: Redcore Linux Kernel Sources (LTS Legacy 5.4)
 sys-kernel/nvidia-drivers-dkms 470.63.01: NVIDIA driver sources for linux
-sys-kernel/nvidia-drivers-legacy-dkms 390.144-r1: NVIDIA driver sources for linux
+sys-kernel/nvidia-drivers-legacy-dkms 390.147: NVIDIA driver sources for linux
 sys-kernel/rtl8821cu-dkms 5.8.1: Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
 sys-kernel/vhba-dkms 20190831: Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite sources
 sys-kernel/virtualbox-modules-dkms 6.1.18-r1: Kernel Modules source for Virtualbox
@@ -87,12 +87,12 @@ x11-base/xorg-drivers 21.1-r100: Meta package containing deps on all xorg driver
 x11-base/xorg-server 21.1.1-r100: X.Org X servers
 x11-base/xwayland 21.1.3-r100: Standalone X server running under Wayland
 x11-drivers/nvidia-drivers 470.63.01: NVIDIA Accelerated Graphics Driver
-x11-drivers/nvidia-drivers-legacy 390.144-r3: NVIDIA Accelerated Graphics Driver
+x11-drivers/nvidia-drivers-legacy 390.147: NVIDIA Accelerated Graphics Driver
 x11-drivers/xf86-video-qxl 0.1.5_p20200205-r10: QEMU QXL paravirt video driver
 x11-libs/gtk+ 2.24.33-r10 3.24.29-r10: Gimp ToolKit +
 x11-misc/nvidia-prime 314: NVIDIA Prime Render Offload configuration and utilities
 x11-misc/nvidia-settings 470.63.01: NVIDIA Linux X11 Settings Utility
-x11-misc/nvidia-settings-legacy 390.144: NVIDIA Linux X11 Settings Utility
+x11-misc/nvidia-settings-legacy 390.147: NVIDIA Linux X11 Settings Utility
 x11-misc/pcmanfm-qt-share 1337: PCManFM-QT custom action to share folder using Samba
 x11-misc/sddm 0.18.1-r100: Simple Desktop Display Manager
 x11-themes/material-icon-theme 1337-r2: Icon theme following the Google's material design specifications
diff --git a/sys-kernel/nvidia-drivers-legacy-dkms/Manifest b/sys-kernel/nvidia-drivers-legacy-dkms/Manifest
index a71c5c34..edb57fcb 100644
--- a/sys-kernel/nvidia-drivers-legacy-dkms/Manifest
+++ b/sys-kernel/nvidia-drivers-legacy-dkms/Manifest
@@ -1 +1 @@
-DIST NVIDIA-Linux-x86_64-390.144.run 85000417 BLAKE2B 8ecfa768fb8fe92170ff5b82698a7fb22da8bc557ab2036464bf5650b6fffc7028e25a68e1f5638f6bc171eb45a4aba459465490c7a99aacd36dc769994062e8 SHA512 9503ebf41037a14deba995288a364768cb03fb682de8653a4b0c05955b23603443c41c4216c93eac7d7efc301734416012864ede728324ab47b93ff167d93da4
+DIST NVIDIA-Linux-x86_64-390.147.run 85930997 BLAKE2B a8085c9abc1c31251788a8f5abdc2090c9085b3028e364184244bbf24d822dc3266877c88b30f403507fa2dd511c68ec67e1f188d6b0f1f4d7d792881d5253fc SHA512 0d8bda32e916d71da2ea74bc12a4f3cb0a0c2ddda27511cf3c89bbf4aeb28db68f6b7261639d88dd1c0180b91213c09de930d233158268c5d9ab3b223510e964
diff --git a/sys-kernel/nvidia-drivers-legacy-dkms/files/dkms.patch b/sys-kernel/nvidia-drivers-legacy-dkms/files/dkms.patch
index aef487c1..96a0cd74 100644
--- a/sys-kernel/nvidia-drivers-legacy-dkms/files/dkms.patch
+++ b/sys-kernel/nvidia-drivers-legacy-dkms/files/dkms.patch
@@ -5,7 +5,7 @@ diff -Nur a/kernel/dkms.conf b/kernel/dkms.conf
 -PACKAGE_NAME="nvidia"
 -PACKAGE_VERSION="__VERSION_STRING"
 +PACKAGE_NAME="nvidia-drivers-legacy-dkms"
-+PACKAGE_VERSION="390.144"
++PACKAGE_VERSION="390.147"
  AUTOINSTALL="yes"
  
  # By default, DKMS will add KERNELRELEASE to the make command line; however,
diff --git a/sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.144-r1.ebuild b/sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.144-r1.ebuild
deleted file mode 100644
index c56e28a6..00000000
--- a/sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.144-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-inherit eutils
-
-NV_URI="http://us.download.nvidia.com/XFree86/"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-
-DESCRIPTION="NVIDIA driver sources for linux"
-HOMEPAGE="http://www.nvidia.com/"
-SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
-
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE=""
-
-DEPEND="sys-kernel/dkms"
-RDEPEND="${DEPEND}
-	!!sys-kernel/nvidia-drivers-dkms"
-
-PATCHES=( 
-	"${FILESDIR}"/dkms.patch
-	"${FILESDIR}"/kernel-5.14.patch
-)
-
-S="${WORKDIR}/${AMD64_NV_PACKAGE}"
-
-src_unpack() {
-	sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only
-}
-
-src_install() {
-	dodir usr/src/${P}
-	insinto usr/src/${P}
-	doins -r "${S}"/kernel/*
-}
-
-pkg_postinst() {
-	dkms add ${PN}/${PV}
-}
-
-pkg_prerm() {
-	dkms remove ${PN}/${PV} --all
-}
diff --git a/sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.147.ebuild b/sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.147.ebuild
new file mode 100644
index 00000000..c56e28a6
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-legacy-dkms/nvidia-drivers-legacy-dkms-390.147.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils
+
+NV_URI="http://us.download.nvidia.com/XFree86/"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+
+DESCRIPTION="NVIDIA driver sources for linux"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE=""
+
+DEPEND="sys-kernel/dkms"
+RDEPEND="${DEPEND}
+	!!sys-kernel/nvidia-drivers-dkms"
+
+PATCHES=( 
+	"${FILESDIR}"/dkms.patch
+	"${FILESDIR}"/kernel-5.14.patch
+)
+
+S="${WORKDIR}/${AMD64_NV_PACKAGE}"
+
+src_unpack() {
+	sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only
+}
+
+src_install() {
+	dodir usr/src/${P}
+	insinto usr/src/${P}
+	doins -r "${S}"/kernel/*
+}
+
+pkg_postinst() {
+	dkms add ${PN}/${PV}
+}
+
+pkg_prerm() {
+	dkms remove ${PN}/${PV} --all
+}
diff --git a/x11-drivers/nvidia-drivers-legacy/Manifest b/x11-drivers/nvidia-drivers-legacy/Manifest
index a71c5c34..edb57fcb 100644
--- a/x11-drivers/nvidia-drivers-legacy/Manifest
+++ b/x11-drivers/nvidia-drivers-legacy/Manifest
@@ -1 +1 @@
-DIST NVIDIA-Linux-x86_64-390.144.run 85000417 BLAKE2B 8ecfa768fb8fe92170ff5b82698a7fb22da8bc557ab2036464bf5650b6fffc7028e25a68e1f5638f6bc171eb45a4aba459465490c7a99aacd36dc769994062e8 SHA512 9503ebf41037a14deba995288a364768cb03fb682de8653a4b0c05955b23603443c41c4216c93eac7d7efc301734416012864ede728324ab47b93ff167d93da4
+DIST NVIDIA-Linux-x86_64-390.147.run 85930997 BLAKE2B a8085c9abc1c31251788a8f5abdc2090c9085b3028e364184244bbf24d822dc3266877c88b30f403507fa2dd511c68ec67e1f188d6b0f1f4d7d792881d5253fc SHA512 0d8bda32e916d71da2ea74bc12a4f3cb0a0c2ddda27511cf3c89bbf4aeb28db68f6b7261639d88dd1c0180b91213c09de930d233158268c5d9ab3b223510e964
diff --git a/x11-drivers/nvidia-drivers-legacy/files/dkms.patch b/x11-drivers/nvidia-drivers-legacy/files/dkms.patch
index aef487c1..96a0cd74 100644
--- a/x11-drivers/nvidia-drivers-legacy/files/dkms.patch
+++ b/x11-drivers/nvidia-drivers-legacy/files/dkms.patch
@@ -5,7 +5,7 @@ diff -Nur a/kernel/dkms.conf b/kernel/dkms.conf
 -PACKAGE_NAME="nvidia"
 -PACKAGE_VERSION="__VERSION_STRING"
 +PACKAGE_NAME="nvidia-drivers-legacy-dkms"
-+PACKAGE_VERSION="390.144"
++PACKAGE_VERSION="390.147"
  AUTOINSTALL="yes"
  
  # By default, DKMS will add KERNELRELEASE to the make command line; however,
diff --git a/x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.144-r3.ebuild b/x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.144-r3.ebuild
deleted file mode 100644
index d1f2fd66..00000000
--- a/x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.144-r3.ebuild
+++ /dev/null
@@ -1,258 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils flag-o-matic multilib-minimal portability toolchain-funcs unpacker
-
-NV_URI="http://http.download.nvidia.com/XFree86/"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
-SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
-
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="0"
-KEYWORDS="-* ~amd64"
-RESTRICT="bindist mirror"
-EMULTILIB_PKG="true"
-
-IUSE="acpi +dkms multilib +tools wayland +X"
-
-COMMON="
-	acct-group/video
-	acct-user/nvpd
-	net-libs/libtirpc
-	X? (
-			>=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
-			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
-	)"
-DEPEND="${COMMON}"
-PDEPEND="
-	tools? ( ~x11-misc/nvidia-settings-legacy-${PV}:${SLOT} )"
-RDEPEND="
-	${COMMON}
-	>=virtual/opencl-3
-	!!x11-drivers/nvidia-drivers
-	acpi? ( sys-power/acpid )
-	dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
-	wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
-	X? (
-		<x11-base/xorg-server-1.20.99:=
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		sys-libs/zlib[${MULTILIB_USEDEP}]
-	)
-"
-
-QA_PREBUILT="opt/* usr/lib*"
-
-PATCHES=( 
-	"${FILESDIR}"/dkms.patch
-	"${FILESDIR}"/kernel-5.14.patch
-)
-
-S=${WORKDIR}/
-
-pkg_setup() {
-	export DISTCC_DISABLE=1
-	export CCACHE_DISABLE=1
-
-	NV_DOC="${S}"
-	NV_OBJ="${S}"
-	NV_SRC="${S}/kernel"
-	NV_MAN="${S}"
-	NV_X11="${S}"
-	NV_SOVER=${PV}
-}
-
-src_prepare() {
-	default
-	local man_file
-	for man_file in "${NV_MAN}"/*1.gz; do
-		gunzip $man_file || die
-	done
-
-	if ! [ -f nvidia_icd.json ]; then
-		cp nvidia_icd.json.template nvidia_icd.json || die
-		sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
-	fi
-}
-
-donvidia() {
-	nv_LIB="${1}"
-	nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
-	nv_DEST="${2}"
-	nv_LIBNAME=$(basename "${nv_LIB}")
-
-	if [[ "${nv_DEST}" ]]; then
-		exeinto ${nv_DEST}
-		action="doexe"
-	else
-		nv_DEST="/usr/$(get_libdir)"
-		action="dolib.so"
-	fi
-
-	${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
-	if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
-		dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER}
-	fi
-
-	dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so}
-}
-
-src_install-libs() {
-	local inslibdir=$(get_libdir)
-	local GL_ROOT="/usr/$(get_libdir)"
-	local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
-	local nv_libdir="${NV_OBJ}"
-
-	if  has_multilib_profile && [[ ${ABI} == "x86" ]]; then
-		nv_libdir="${NV_OBJ}"/32
-	fi
-
-	if use X; then
-		NV_GLX_LIBRARIES=(
-			"libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
-			"libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
-			"libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
-			"libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
-			"libOpenCL.so.1.0.0 ${CL_ROOT}"
-			"libcuda.so.${NV_SOVER}"
-			"libnvcuvid.so.${NV_SOVER}"
-			"libnvidia-compiler.so.${NV_SOVER}"
-			"libnvidia-eglcore.so.${NV_SOVER}"
-			"libnvidia-encode.so.${NV_SOVER}"
-			"libnvidia-fatbinaryloader.so.${NV_SOVER}"
-			"libnvidia-fbc.so.${NV_SOVER}"
-			"libnvidia-glcore.so.${NV_SOVER}"
-			"libnvidia-glsi.so.${NV_SOVER}"
-			"libnvidia-ifr.so.${NV_SOVER}"
-			"libnvidia-opencl.so.${NV_SOVER}"
-			"libnvidia-ptxjitcompiler.so.${NV_SOVER}"
-			"libvdpau_nvidia.so.${NV_SOVER}"
-			"libnvidia-ml.so.${NV_SOVER}"
-			"tls/libnvidia-tls.so.${NV_SOVER}"
-		)
-
-		if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
-		then
-			NV_GLX_LIBRARIES+=(
-				"libnvidia-egl-wayland.so.1.0.2"
-			)
-		fi
-
-		if has_multilib_profile && [[ ${ABI} == "amd64" ]];
-		then
-			NV_GLX_LIBRARIES+=(
-				"libnvidia-wfb.so.${NV_SOVER}"
-			)
-		fi
-
-		for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
-			donvidia "${nv_libdir}"/${NV_LIB}
-		done
-	fi
-}
-
-src_install() {
-	donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
-	donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
-	donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
-	donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
-
-	if has_multilib_profile && use multilib; then
-		local OABI=${ABI}
-		for ABI in $(get_install_abis); do
-			src_install-libs
-		done
-		ABI=${OABI}
-		unset OABI
-	else
-		src_install-libs
-	fi
-
-	is_final_abi || die "failed to iterate through all ABIs"
-
-	if use X; then
-		insinto /usr/$(get_libdir)/xorg/modules/drivers
-		doins ${NV_X11}/nvidia_drv.so
-
-		donvidia ${NV_X11}/libglx.so.${NV_SOVER} /usr/$(get_libdir)/nvidia/xorg
-
-		insinto /usr/share/X11/xorg.conf.d
-		newins "${FILESDIR}"/nvidia-drm-outputclass.conf 50-nvidia-drm-outputclass.conf
-
-		insinto /usr/share/glvnd/egl_vendor.d
-		doins ${NV_X11}/10_nvidia.json
-
-		insinto /etc/vulkan/icd.d
-		doins ${NV_X11}/nvidia_icd.json
-
-		exeinto /opt/bin
-		doexe ${NV_OBJ}/nvidia-xconfig
-
-		doman "${NV_MAN}"/nvidia-xconfig.1
-	fi
-
-	if use wayland; then
-		insinto /usr/share/egl/egl_external_platform.d
-		doins ${NV_X11}/10_nvidia_wayland.json
-	fi
-
-	insinto /etc/modprobe.d
-	doins "${FILESDIR}"/nouveau.conf
-
-	insinto /etc/OpenCL/vendors
-	doins ${NV_OBJ}/nvidia.icd
-
-	exeinto /opt/bin/
-	doexe ${NV_OBJ}/nvidia-cuda-mps-control
-	doexe ${NV_OBJ}/nvidia-cuda-mps-server
-	doexe ${NV_OBJ}/nvidia-debugdump
-	doexe ${NV_OBJ}/nvidia-persistenced
-	doexe ${NV_OBJ}/nvidia-smi
-	doexe ${NV_OBJ}/nvidia-modprobe
-
-	fowners root:video /opt/bin/nvidia-modprobe
-	fperms 4710 /opt/bin/nvidia-modprobe
-	dosym /{opt,usr}/bin/nvidia-modprobe
-
-	newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
-	newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
-	newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
-
-	doman "${NV_MAN}"/nvidia-smi.1
-	doman "${NV_MAN}"/nvidia-cuda-mps-control.1
-	doman "${NV_MAN}"/nvidia-modprobe.1
-	doman "${NV_MAN}"/nvidia-persistenced.1
-}
-
-_dracut_initramfs_regen() {
-	if [ -x $(which dracut) ]; then
-		dracut -N -f --no-hostonly-cmdline
-	fi
-}
-
-pkg_preinst() {
-	if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
-		rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
-	fi
-
-	if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
-		rm -f "${ROOT}"/etc/env.d/09nvidia
-	fi
-}
-
-pkg_postinst() {
-	if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
-		_dracut_initramfs_regen
-	fi
-}
-
-pkg_postrm() {
-	if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
-		_dracut_initramfs_regen
-	fi
-}
diff --git a/x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.147.ebuild b/x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.147.ebuild
new file mode 100644
index 00000000..f8d1cb4a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers-legacy/nvidia-drivers-legacy-390.147.ebuild
@@ -0,0 +1,258 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic multilib-minimal portability toolchain-funcs unpacker
+
+NV_URI="http://http.download.nvidia.com/XFree86/"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
+SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+IUSE="acpi +dkms multilib +tools wayland +X"
+
+COMMON="
+	acct-group/video
+	acct-user/nvpd
+	net-libs/libtirpc
+	X? (
+			>=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
+			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
+	)"
+DEPEND="${COMMON}"
+PDEPEND="
+	tools? ( ~x11-misc/nvidia-settings-legacy-${PV}:${SLOT} )
+	X? ( <x11-base/xorg-server-1.21 )"
+RDEPEND="
+	${COMMON}
+	>=virtual/opencl-3
+	!!x11-drivers/nvidia-drivers
+	acpi? ( sys-power/acpid )
+	dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
+	wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+	X? (
+		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+		sys-libs/zlib[${MULTILIB_USEDEP}]
+	)
+"
+
+QA_PREBUILT="opt/* usr/lib*"
+
+PATCHES=( 
+	"${FILESDIR}"/dkms.patch
+	"${FILESDIR}"/kernel-5.14.patch
+)
+
+S=${WORKDIR}/
+
+pkg_setup() {
+	export DISTCC_DISABLE=1
+	export CCACHE_DISABLE=1
+
+	NV_DOC="${S}"
+	NV_OBJ="${S}"
+	NV_SRC="${S}/kernel"
+	NV_MAN="${S}"
+	NV_X11="${S}"
+	NV_SOVER=${PV}
+}
+
+src_prepare() {
+	default
+	local man_file
+	for man_file in "${NV_MAN}"/*1.gz; do
+		gunzip $man_file || die
+	done
+
+	if ! [ -f nvidia_icd.json ]; then
+		cp nvidia_icd.json.template nvidia_icd.json || die
+		sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
+	fi
+}
+
+donvidia() {
+	nv_LIB="${1}"
+	nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
+	nv_DEST="${2}"
+	nv_LIBNAME=$(basename "${nv_LIB}")
+
+	if [[ "${nv_DEST}" ]]; then
+		exeinto ${nv_DEST}
+		action="doexe"
+	else
+		nv_DEST="/usr/$(get_libdir)"
+		action="dolib.so"
+	fi
+
+	${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
+
+	if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+		dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER}
+	fi
+
+	dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so}
+}
+
+src_install-libs() {
+	local inslibdir=$(get_libdir)
+	local GL_ROOT="/usr/$(get_libdir)"
+	local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+	local nv_libdir="${NV_OBJ}"
+
+	if  has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+		nv_libdir="${NV_OBJ}"/32
+	fi
+
+	if use X; then
+		NV_GLX_LIBRARIES=(
+			"libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+			"libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+			"libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+			"libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+			"libOpenCL.so.1.0.0 ${CL_ROOT}"
+			"libcuda.so.${NV_SOVER}"
+			"libnvcuvid.so.${NV_SOVER}"
+			"libnvidia-compiler.so.${NV_SOVER}"
+			"libnvidia-eglcore.so.${NV_SOVER}"
+			"libnvidia-encode.so.${NV_SOVER}"
+			"libnvidia-fatbinaryloader.so.${NV_SOVER}"
+			"libnvidia-fbc.so.${NV_SOVER}"
+			"libnvidia-glcore.so.${NV_SOVER}"
+			"libnvidia-glsi.so.${NV_SOVER}"
+			"libnvidia-ifr.so.${NV_SOVER}"
+			"libnvidia-opencl.so.${NV_SOVER}"
+			"libnvidia-ptxjitcompiler.so.${NV_SOVER}"
+			"libvdpau_nvidia.so.${NV_SOVER}"
+			"libnvidia-ml.so.${NV_SOVER}"
+			"tls/libnvidia-tls.so.${NV_SOVER}"
+		)
+
+		if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+		then
+			NV_GLX_LIBRARIES+=(
+				"libnvidia-egl-wayland.so.1.0.2"
+			)
+		fi
+
+		if has_multilib_profile && [[ ${ABI} == "amd64" ]];
+		then
+			NV_GLX_LIBRARIES+=(
+				"libnvidia-wfb.so.${NV_SOVER}"
+			)
+		fi
+
+		for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+			donvidia "${nv_libdir}"/${NV_LIB}
+		done
+	fi
+}
+
+src_install() {
+	donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+	donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+	donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
+	donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
+
+	if has_multilib_profile && use multilib; then
+		local OABI=${ABI}
+		for ABI in $(get_install_abis); do
+			src_install-libs
+		done
+		ABI=${OABI}
+		unset OABI
+	else
+		src_install-libs
+	fi
+
+	is_final_abi || die "failed to iterate through all ABIs"
+
+	if use X; then
+		insinto /usr/$(get_libdir)/xorg/modules/drivers
+		doins ${NV_X11}/nvidia_drv.so
+
+		donvidia ${NV_X11}/libglx.so.${NV_SOVER} /usr/$(get_libdir)/nvidia/xorg
+
+		insinto /usr/share/X11/xorg.conf.d
+		newins "${FILESDIR}"/nvidia-drm-outputclass.conf 50-nvidia-drm-outputclass.conf
+
+		insinto /usr/share/glvnd/egl_vendor.d
+		doins ${NV_X11}/10_nvidia.json
+
+		insinto /etc/vulkan/icd.d
+		doins ${NV_X11}/nvidia_icd.json
+
+		exeinto /opt/bin
+		doexe ${NV_OBJ}/nvidia-xconfig
+
+		doman "${NV_MAN}"/nvidia-xconfig.1
+	fi
+
+	if use wayland; then
+		insinto /usr/share/egl/egl_external_platform.d
+		doins ${NV_X11}/10_nvidia_wayland.json
+	fi
+
+	insinto /etc/modprobe.d
+	doins "${FILESDIR}"/nouveau.conf
+
+	insinto /etc/OpenCL/vendors
+	doins ${NV_OBJ}/nvidia.icd
+
+	exeinto /opt/bin/
+	doexe ${NV_OBJ}/nvidia-cuda-mps-control
+	doexe ${NV_OBJ}/nvidia-cuda-mps-server
+	doexe ${NV_OBJ}/nvidia-debugdump
+	doexe ${NV_OBJ}/nvidia-persistenced
+	doexe ${NV_OBJ}/nvidia-smi
+	doexe ${NV_OBJ}/nvidia-modprobe
+
+	fowners root:video /opt/bin/nvidia-modprobe
+	fperms 4710 /opt/bin/nvidia-modprobe
+	dosym /{opt,usr}/bin/nvidia-modprobe
+
+	newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+	newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+	newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+
+	doman "${NV_MAN}"/nvidia-smi.1
+	doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+	doman "${NV_MAN}"/nvidia-modprobe.1
+	doman "${NV_MAN}"/nvidia-persistenced.1
+}
+
+_dracut_initramfs_regen() {
+	if [ -x $(which dracut) ]; then
+		dracut -N -f --no-hostonly-cmdline
+	fi
+}
+
+pkg_preinst() {
+	if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
+		rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+	fi
+
+	if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
+		rm -f "${ROOT}"/etc/env.d/09nvidia
+	fi
+}
+
+pkg_postinst() {
+	if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
+		_dracut_initramfs_regen
+	fi
+}
+
+pkg_postrm() {
+	if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
+		_dracut_initramfs_regen
+	fi
+}
diff --git a/x11-misc/nvidia-settings-legacy/Manifest b/x11-misc/nvidia-settings-legacy/Manifest
index 16b5ab1c..9cd3db6b 100644
--- a/x11-misc/nvidia-settings-legacy/Manifest
+++ b/x11-misc/nvidia-settings-legacy/Manifest
@@ -1 +1 @@
-DIST nvidia-settings-legacy-390.144.tar.gz 1297259 BLAKE2B 1b10eed74018ade47874b0b8b2fbe134ec04e6d1c6b36889e68e5a8dc831745ef03c99869664dd90298d04a4ba129da1005d4d111bf19f5dfee749c0cf51b295 SHA512 7e21282a1d8f0f4096b779fa5d0ac984d5faaf1dc27e30ba65b033ec07490908ece1daf30a113f799979261454cfd57fc87260bddafd9f64df969ab06714f271
+DIST nvidia-settings-legacy-390.147.tar.gz 1297256 BLAKE2B 029705fd3db8194c9fb3080dd04e589045ec786c9c30a3d2f8a153ac9ddce4dcc8b9341ba5562464b292d644d3232a83bf16e5fce5dbe17b039da764e5d564e6 SHA512 65bcc933e9c8ae2289c1103c077fdbb103a0b1d19c72d311d4e1b73addc52f0bde0a41b042568445a507f495c0149c8a376d661ca29dc35a0e85ef89bdb373ae
diff --git a/x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.144.ebuild b/x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.144.ebuild
deleted file mode 100644
index d9320b84..00000000
--- a/x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.144.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="NVIDIA Linux X11 Settings Utility"
-HOMEPAGE="http://www.nvidia.com/"
-SRC_URI="https://github.com/NVIDIA/nvidia-settings/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64"
-IUSE=""
-
-QA_PREBUILT=
-
-COMMON_DEPEND="
-	x11-libs/gtk+:2
-	x11-libs/gtk+:3
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXxf86vm
-	x11-libs/gdk-pixbuf-xlib
-	media-libs/mesa
-	x11-libs/pango[X]
-	x11-libs/libXv
-	x11-libs/libXrandr
-	dev-libs/glib:2
-	dev-libs/jansson
-	x11-libs/cairo
-	>=x11-libs/libvdpau-1.0"
-
-RDEPEND="${COMMON_DEPEND}
-	!!x11-misc/nvidia-settings
-	~x11-drivers/nvidia-drivers-legacy-${PV}:${SLOT}"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	x11-base/xorg-proto"
-
-S=${WORKDIR}/nvidia-settings-${PV}
-
-src_prepare() {
-	default
-	eapply "${FILESDIR}"/"${PN}"-linker.patch
-	eapply "${FILESDIR}"/"${PN}"-fno-common.patch
-}
-
-src_compile() {
-	emake -C src/ \
-		AR="$(tc-getAR)" \
-		CC="$(tc-getCC)" \
-		DO_STRIP= \
-		LD="$(tc-getCC)" \
-		LIBDIR="$(get_libdir)" \
-		NVLD="$(tc-getLD)" \
-		NV_VERBOSE=1 \
-		RANLIB="$(tc-getRANLIB)" \
-		build-xnvctrl
-
-	emake -C src/ \
-		CC="$(tc-getCC)" \
-		DO_STRIP= \
-		GTK3_AVAILABLE=1 \
-		LD="$(tc-getCC)" \
-		LIBDIR="$(get_libdir)" \
-		NVLD="$(tc-getLD)" \
-		NVML_ENABLED=0 \
-		NV_USE_BUNDLED_LIBJANSSON=0 \
-		NV_VERBOSE=1
-}
-
-src_install() {
-	emake -C src/ \
-		DESTDIR="${D}" \
-		GTK3_AVAILABLE=1 \
-		LIBDIR="${D}/usr/$(get_libdir)" \
-		NV_USE_BUNDLED_LIBJANSSON=0 \
-		NV_VERBOSE=1 \
-		PREFIX=/usr \
-		DO_STRIP= \
-		install
-
-	insinto /usr/$(get_libdir)
-	doins src/libXNVCtrl/libXNVCtrl.a
-
-	insinto /usr/include/NVCtrl
-	doins src/libXNVCtrl/*.h
-
-	doicon doc/nvidia-settings.png
-	domenu ${FILESDIR}/${PN}.desktop
-
-	dodoc doc/*.txt
-
-	rm -rvf ${D}usr/$(get_libdir)/libnvidia-gtk2.so.${PV}
-}
diff --git a/x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.147.ebuild b/x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.147.ebuild
new file mode 100644
index 00000000..d9320b84
--- /dev/null
+++ b/x11-misc/nvidia-settings-legacy/nvidia-settings-legacy-390.147.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="NVIDIA Linux X11 Settings Utility"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="https://github.com/NVIDIA/nvidia-settings/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64"
+IUSE=""
+
+QA_PREBUILT=
+
+COMMON_DEPEND="
+	x11-libs/gtk+:2
+	x11-libs/gtk+:3
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXxf86vm
+	x11-libs/gdk-pixbuf-xlib
+	media-libs/mesa
+	x11-libs/pango[X]
+	x11-libs/libXv
+	x11-libs/libXrandr
+	dev-libs/glib:2
+	dev-libs/jansson
+	x11-libs/cairo
+	>=x11-libs/libvdpau-1.0"
+
+RDEPEND="${COMMON_DEPEND}
+	!!x11-misc/nvidia-settings
+	~x11-drivers/nvidia-drivers-legacy-${PV}:${SLOT}"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	x11-base/xorg-proto"
+
+S=${WORKDIR}/nvidia-settings-${PV}
+
+src_prepare() {
+	default
+	eapply "${FILESDIR}"/"${PN}"-linker.patch
+	eapply "${FILESDIR}"/"${PN}"-fno-common.patch
+}
+
+src_compile() {
+	emake -C src/ \
+		AR="$(tc-getAR)" \
+		CC="$(tc-getCC)" \
+		DO_STRIP= \
+		LD="$(tc-getCC)" \
+		LIBDIR="$(get_libdir)" \
+		NVLD="$(tc-getLD)" \
+		NV_VERBOSE=1 \
+		RANLIB="$(tc-getRANLIB)" \
+		build-xnvctrl
+
+	emake -C src/ \
+		CC="$(tc-getCC)" \
+		DO_STRIP= \
+		GTK3_AVAILABLE=1 \
+		LD="$(tc-getCC)" \
+		LIBDIR="$(get_libdir)" \
+		NVLD="$(tc-getLD)" \
+		NVML_ENABLED=0 \
+		NV_USE_BUNDLED_LIBJANSSON=0 \
+		NV_VERBOSE=1
+}
+
+src_install() {
+	emake -C src/ \
+		DESTDIR="${D}" \
+		GTK3_AVAILABLE=1 \
+		LIBDIR="${D}/usr/$(get_libdir)" \
+		NV_USE_BUNDLED_LIBJANSSON=0 \
+		NV_VERBOSE=1 \
+		PREFIX=/usr \
+		DO_STRIP= \
+		install
+
+	insinto /usr/$(get_libdir)
+	doins src/libXNVCtrl/libXNVCtrl.a
+
+	insinto /usr/include/NVCtrl
+	doins src/libXNVCtrl/*.h
+
+	doicon doc/nvidia-settings.png
+	domenu ${FILESDIR}/${PN}.desktop
+
+	dodoc doc/*.txt
+
+	rm -rvf ${D}usr/$(get_libdir)/libnvidia-gtk2.so.${PV}
+}
-- 
cgit v1.2.3