summaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
commitb7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (patch)
tree9fd110f9fc996e8a4213eeda994a8c112491b86d /x11-drivers
parent066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (diff)
gentoo resync : 19.03.2019
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/Manifest.gzbin5844 -> 5845 bytes
-rw-r--r--x11-drivers/nvidia-drivers/Manifest6
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule1
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-340.107-r1.ebuild521
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.116-r2.ebuild589
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-410.104-r2.ebuild592
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-415.27-r2.ebuild592
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-418.43-r2.ebuild585
-rw-r--r--x11-drivers/xf86-input-libinput/Manifest2
-rw-r--r--x11-drivers/xf86-input-libinput/xf86-input-libinput-0.28.2.ebuild2
-rw-r--r--x11-drivers/xf86-video-amdgpu/Manifest4
-rw-r--r--x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-19.0.0.ebuild28
-rw-r--r--x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-9999.ebuild7
-rw-r--r--x11-drivers/xf86-video-ati/Manifest4
-rw-r--r--x11-drivers/xf86-video-ati/xf86-video-ati-19.0.0.ebuild43
-rw-r--r--x11-drivers/xf86-video-ati/xf86-video-ati-9999.ebuild7
16 files changed, 2971 insertions, 12 deletions
diff --git a/x11-drivers/Manifest.gz b/x11-drivers/Manifest.gz
index 07395fb479f5..c10baf251b09 100644
--- a/x11-drivers/Manifest.gz
+++ b/x11-drivers/Manifest.gz
Binary files differ
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 857f304a79c3..bb2db4752f07 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -10,6 +10,7 @@ AUX nvidia-settings.desktop 185 BLAKE2B 5fab31cdfad3e882095bf0fb5c3821b5d934992f
AUX nvidia-smi.init 545 BLAKE2B f4a0743f1fa5136c9c0f327645d8b66932492f2539b5c2b0bd45d29b2010fff6bbdc9e97b619e67d38bce38104d29fc4d00a9e0efc31b8ff408cb02370785bec SHA512 f7f04a73d646b90cdc14a408f53650324d7c1d7754a1d92acc9a8acaef163bda1eef33acb831df77657786e7ceebe0d7f9d25d2edd57d1590be340ce12fea6e5
AUX nvidia-udev.sh 185 BLAKE2B cf7a46f2d123d5df46138d9ad12c4c700984fb773acdda93fc4dfe5fe5bfad36db70342ce4a851fc450a90b6ee6e481d8a4f6e38884063be14c4f0d6e15a2329 SHA512 166df3a4e7c1862ca2e0f634bf5eed7aad1bdd7e55764ca42371b91a7077c59f0bc243de5616fd38dac9694159d1695d54fbd08ac89d4d3f3649c70c7db5977e
AUX nvidia-udev.sh-r1 285 BLAKE2B 6ea76f2f913b2bc2c9955e7564c770368ea6a0327887684d086040047fb95a0088387c5f87f22bc1f5a093cc79299ad72dd1495719bb344c504a342d03f34db3 SHA512 493b0d5f2698d299e3b8d5782ac7fb8174e7ee93f1dae66bc1161eb4dd16d4db91048444dc6e7bea344960936c0a5c825041f6909af004438d8009a3d3fe71c9
+AUX nvidia-uvm.udev-rule 166 BLAKE2B 235df3e85d37d7bc86ad02e32714dcd9ac569c0813767b4f04470e803a95c66b50917fa830955d729069e1e036cb4438edd56249a1cfda701edde58105857ebd SHA512 1ccfcf425b1343e532567e7afd5e1192b6b57de58a1e8c3ec883ef88ecfe2c44d96ad31944f30aafe1dab4d3c5cb9b889ce8a0145295c851d8dbc31d51fd02a8
AUX nvidia.udev-rule 462 BLAKE2B d417e0e4f5a64c5cee235f4640554ff1ba4d34590a6c3459fd8b4e10dc7581010c006f96cfd01f2c9a847c79979631f6e5afbef01724d110201377e8f8c75966 SHA512 96f9edaa0b46bea5fce17596f868bea5265b303d7185af6ba81527bbd7b8fdf92de9311317cbde51a29d222083d451c25ab77c3d6837cbc4072a50d9af89aa86
DIST NVIDIA-FreeBSD-x86-340.107.tar.gz 60305952 BLAKE2B b634bfd610653f1c546b68e87d934c5d0e25a2e5be6df15e0cb6016793274b4cf08577669e61c35976f3482da2221b05797459b2814965bcfdbf519c8a6d2681 SHA512 fe09e1b3dd870a07b4edd163d302e2d98f00e139d05a8fa627c292182b61d2bd9b37eb746d639ba592dcf90fecedc57430cf1ef76b6522785ffcb3fd46fe9ba0
DIST NVIDIA-FreeBSD-x86-390.116.tar.gz 64325348 BLAKE2B 67312ba0f5b1e94a540a90e3787c339b023e36ef3da0deb6ddd2e0aaa22610b1a399be8ee5bdb35f6ca7cc5d1927b6f1e4d8c2e19353af863826f031cd0ab7bc SHA512 8494efa8c2e2dbc2295bb0fd150e72ca851504172da2456c2ed6c311ed952f62e9b2352817e6afdb94012d0881728f9320b056da8876076490076e07c3f7f6a1
@@ -31,9 +32,14 @@ DIST nvidia-settings-390.116.tar.bz2 1109033 BLAKE2B ddcb74c9ecd2134ae39b6d08a81
DIST nvidia-settings-410.104.tar.bz2 1120639 BLAKE2B 75554b0cca7c022a0f1cc02091f81ccd930e30e1dd5f674cf35b0cfed83c5e235c360b0f28701d39d42017b35b816f975ff177398eb9f59280851c0b8bfd57d3 SHA512 08d938117fca4d471bdff451219e6772fdd1e9c37c0ed623be8506c1cb5ce7ccde4d073848ade9f5bfca14b1a3cf9eb90b4b4bf44375bff43d023815b622b424
DIST nvidia-settings-415.27.tar.bz2 1128013 BLAKE2B 36513252ff3d5f2036c80250e012d79bebfc14daff56fdaabb032856f5f78ce77cf4ce32d6eaee5fe4c1a18db63d5c69d6848517f025c711f133e28b3e509396 SHA512 5ac3b673c41194a1952ec10cd3c961aefd281bb044ecae5c9d11cb55d4555fed44e6056b5a2e97b5b87687743cd7f702f33ce7e0f841f04c8175d63693a24594
DIST nvidia-settings-418.43.tar.bz2 1127336 BLAKE2B 622507f841da051a14bbbbb44b1364310d4224d54b5b00f09a9a2706fdf5900b0a2ccd9be4c94d8d4793158f3ed9cff40706795f29c314312470f0b420dc5104 SHA512 f2750684ad261b820414b78b20f9bcfe2a68f95283a646c75bf488c2dc4b78f3e3732df2839c8bdb45619a53df3712bc6dc575a22fbdcb8edff3c8aacf570a3f
+EBUILD nvidia-drivers-340.107-r1.ebuild 14338 BLAKE2B 2c47991dc68e8e9a4709dde9596dc4ca3024484a327030d9e6fbdb27ba0f8a461fdb3937a76439191cec3eb09367a2941e0fdfbec6a288fc0de8c2700c2c2c59 SHA512 860f184f400f4f63dcf5152b5daab3d99c07920779413558cd1f5a6f624ff744ee529577151f0b667cbb87a8a6852e8ffdb0777562f67b440e098735ab548886
EBUILD nvidia-drivers-340.107.ebuild 14336 BLAKE2B 9643ffca2bc0701291c4f652f130f45f78bbbe77006836de6ba0475174c8792f27046da39cc26b1b46fa46856c4b34cd9b8b0fc523b24e63cf13222d16176aac SHA512 595b0f9f702638ad458d20ab9e1d9515b24845d8c527463fc79dcdb3f910edea2a4fa3a0110d219c2b64e7782f55cf8e7c0701a3e3d5107c3f46f8f4630ad691
+EBUILD nvidia-drivers-390.116-r2.ebuild 16280 BLAKE2B 43fe015e30e5839d194c90d8a4a60fcd63aa6e1b6e68b6e32adf9bfdba11e2310d4cacf01bb7a3b3a94466b3537825ca862a520c80ed7e69def3c90a29afeaef SHA512 63fa021a0137605ead24268a96279f50e32d2c8b1039a1b943ffe4d680094bd21eb03a216fe9944e49dbae2aba5b5df3dfad29932f7736ffa974af114dff5dac
EBUILD nvidia-drivers-390.116.ebuild 16039 BLAKE2B d1c7b4cfe4629afaa53496cd0443fd039c9c8c1383b4409fa0ffa9fc52af05e5cf3f185ead9e3fb9a9a2dd64aed82eff172922e6800145ac0638542393423f1f SHA512 520666f81557c34fe49e7f7bfc9543ca453e5cf32638e696b00504af3adf7c00f13b6809903d3d5059547fc8b866ac12110453df1b7b4023330516918b21d5b9
+EBUILD nvidia-drivers-410.104-r2.ebuild 16168 BLAKE2B 96a60674813888c76bb5299a2ab3ef08f308e6ec3066c5ef1354e3fe4c96df06429e674a0ba97b1679e5ad7871a7da068a618c8a9d26578bdea76ea053365670 SHA512 6b8bd2c3dc5c6331e593a9219dd06315806006971cfc6a8c6931fbd4613673a187ddb07ab91e77b2aa73d1e9fb136ea3eb46124e0d10a0d57c35fc585c8b6fbd
EBUILD nvidia-drivers-410.104.ebuild 15928 BLAKE2B 45ba38b447f6fa971d733c052c6f510c7fc6a83ad7b4a38fc803ebbbd647c09a1213d1705646d8c599ed632165ce3e57ba93a8e9998ebb334ef705cd8287a179 SHA512 a019814eb4a160f585aa9a49337c35ddecd7cd299c785b8337efb50335850f4ad181ba67a8363a45dd7e7fac3c410bb384cc8d033cbf5bdb079ff87d9ec02d37
+EBUILD nvidia-drivers-415.27-r2.ebuild 16179 BLAKE2B 8e5b2502956f18d5e5c2253507c061d061090e4263cdc8fa2e03de338c3b43eb5fb05bea9fe76f8b8dbb4954fa9237c44e9179df10705ac1c691e456c9b502a8 SHA512 1859fb95780b11929e7d266d1ab1a01d2099557ffb03a7231052afd7fe9b9fc6d3238ece571bed9d62100c1908f5fb3d2c5a77380593ef168fc39cec7fd96a9c
EBUILD nvidia-drivers-415.27.ebuild 15939 BLAKE2B 5f3836bb7ccb8d63e2f8d01b5867463f30b9c3f775233ea20a004cac7aeea02cab323779322435ea53070e5290c55f255f9e6c005cb3e7428e0f608a63c7b6d5 SHA512 edb51b164c85a209d9ffb073c2a7ed5504a3fc054c46101164435000e539302f11619c114650069694f1cea074311feb1d2c301aca159e52029c3440695924e6
+EBUILD nvidia-drivers-418.43-r2.ebuild 16026 BLAKE2B f3ae0e7d798f79ef161c1fe813fe80f799058a6d6da154aa0496cb75228d627f5950a27e6014bb93761931fd33c7a5181856ae964306a41bee78f464dd1af3ca SHA512 62957078e1e8f8e0723c27f579a308a90795bcb1ce910535269daae35235ec5025e16cd4e21344106b0a75add7d1cc60f5142260d50c55be0e9a18eec4a98e77
EBUILD nvidia-drivers-418.43.ebuild 15786 BLAKE2B e06459dc2d4f157371d3cb13137e12ee0ffdb8faab315210033b094fd80f7921ad0b36dd026331d96a808040365e0c6a5d3cbf9fc4949933c32d5477348cf7a1 SHA512 17196c5f09166acbea0de37d5663385fafa29086084bd5ad2261e30bdab37e61da1d3e0f06e7952b9a95ac2b9d7fd926cbd23c58526d3d0fc3fc0e69c486f89b
MISC metadata.xml 1207 BLAKE2B 6fd00cf82a2940c84a3802484c9c752e5bd9786158f6f6e983cf5fe56f5018b7f1f90108525234bf8c98b0f63abba54a468509609f34b9e7647f7bfa7491bea1 SHA512 2a3274c9c81c05f1d722974a5f73dfec9ae778745092c4441e441d87f2554cb0c4822e8ce63c89a90e11d7237e6dc5a3a11ca12cdfd9813054e3abf75e7f9ba1
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule b/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule
new file mode 100644
index 000000000000..3df8a3ab07f2
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule
@@ -0,0 +1 @@
+KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/bin/mknod -m 660 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0; /bin/chgrp video /dev/nvidia-uvm'"
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-340.107-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-340.107-r1.ebuild
new file mode 100644
index 000000000000..51360af77195
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-340.107-r1.ebuild
@@ -0,0 +1,521 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
+ portability toolchain-funcs unpacker user udev
+
+NV_URI="https://us.download.nvidia.com/XFree86/"
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
+ x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ tools? (
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ )
+"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0/${PV%.*}"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acpi multilib kernel_FreeBSD kernel_linux static-libs +tools +X"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+COMMON="
+ app-eselect/eselect-opencl
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ tools? (
+ >=x11-libs/gtk+-2.4:2
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ x11-libs/gdk-pixbuf[X]
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXv
+ x11-libs/pango[X]
+ )
+ X? (
+ >=app-eselect/eselect-opengl-1.0.9
+ )
+"
+DEPEND="
+ ${COMMON}
+ app-arch/xz-utils
+ kernel_linux? ( virtual/linux-sources )
+"
+RDEPEND="
+ ${COMMON}
+ acpi? ( sys-power/acpid )
+ tools? ( !media-video/nvidia-settings )
+ X? (
+ <x11-base/xorg-server-1.20.99:=
+ >=x11-libs/libvdpau-0.3-r1
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ multilib? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ )
+ )
+"
+
+REQUIRED_USE="tools? ( X )"
+
+QA_PREBUILT="opt/* usr/lib*"
+
+S=${WORKDIR}/
+
+nvidia_drivers_versions_check() {
+ if use amd64 && has_multilib_profile && \
+ [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default ABI"
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux && kernel_is ge 4 18; then
+ ewarn "Gentoo supports kernels which are supported by NVIDIA"
+ ewarn "which are limited to the following kernels:"
+ ewarn "<sys-kernel/gentoo-sources-4.18"
+ ewarn "<sys-kernel/vanilla-sources-4.18"
+ ewarn ""
+ ewarn "You are free to utilize eapply_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Do not file a bug report about this."
+ ewarn ""
+ fi
+
+ # Since Nvidia ships many different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # Kernel features/options to check for
+ CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
+ use x86 && CONFIG_CHECK+=" ~HIGHMEM"
+
+ # Now do the above checks
+ use kernel_linux && check_extra_config
+}
+
+pkg_pretend() {
+ nvidia_drivers_versions_check
+}
+
+pkg_setup() {
+ nvidia_drivers_versions_check
+
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use kernel_linux; then
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+
+ # This needs to run after MODULE_NAMES (so that the eclass checks
+ # whether the kernel supports loadable modules) but before BUILD_PARAMS
+ # is set (so that KV_DIR is populated).
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
+
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ fi
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
+ use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
+ NV_DOC="${S}/doc"
+ NV_OBJ="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_OBJ="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+
+ if use kernel_linux; then
+ if kernel_is lt 2 6 9 ; then
+ eerror "You must build this against 2.6.9 or higher kernels."
+ fi
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+# convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+
+ local man_file
+ for man_file in "${NV_MAN}"/*1.gz; do
+ gunzip $man_file || die
+ done
+
+ # Allow user patches so they can support RC kernels and whatever else
+ eapply_user
+}
+
+src_compile() {
+ # This is already the default on Linux, as there's no toplevel Makefile, but
+ # on FreeBSD there's one and triggers the kernel module build, as we install
+ # it by itself, pass this.
+
+ cd "${NV_SRC}"
+ if use kernel_FreeBSD; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use kernel_linux; then
+ BUILD_TARGETS=module linux-mod_src_compile
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/libXNVCtrl clean
+ emake -C "${S}"/nvidia-settings-${PV}/src/libXNVCtrl \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ RANLIB="$(tc-getRANLIB)" \
+ libXNVCtrl.a
+ emake -C "${S}"/nvidia-settings-${PV}/src \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ LIBDIR="$(get_libdir)" \
+ NVML_ENABLED=0 \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ RANLIB="$(tc-getRANLIB)" \
+ STRIP_CMD=true
+ fi
+}
+
+# Install nvidia library:
+# the first parameter is the library to install
+# the second parameter is the provided soversion
+# the third parameter is the target directory if its not /usr/lib
+donvidia() {
+ # Full path to library minus SOVER
+ MY_LIB="$1"
+
+ # SOVER to use
+ MY_SOVER="$2"
+
+ # Where to install
+ MY_DEST="$3"
+
+ if [[ -z "${MY_DEST}" ]]; then
+ MY_DEST="/usr/$(get_libdir)"
+ action="dolib.so"
+ else
+ exeinto ${MY_DEST}
+ action="doexe"
+ fi
+
+ # Get just the library name
+ libname=$(basename $1)
+
+ # Install the library with the correct SOVER
+ ${action} ${MY_LIB}.${MY_SOVER} || \
+ die "failed to install ${libname}"
+
+ # If SOVER wasn't 1, then we need to create a .1 symlink
+ if [[ "${MY_SOVER}" != "1" ]]; then
+ dosym ${libname}.${MY_SOVER} \
+ ${MY_DEST}/${libname}.1 || \
+ die "failed to create ${libname} symlink"
+ fi
+
+ # Always create the symlink from the raw lib to the .1
+ dosym ${libname}.1 \
+ ${MY_DEST}/${libname} || \
+ die "failed to create ${libname} symlink"
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+
+ # Add the aliases
+ # This file is tweaked with the appropriate video group in
+ # pkg_preinst, see bug #491414
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+
+ # Ensures that our device nodes are created when not using X
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
+ udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use kernel_FreeBSD; then
+ if use x86-fbsd; then
+ insinto /boot/modules
+ doins "${S}/src/nvidia.kld"
+ fi
+
+ exeinto /boot/modules
+ doexe "${S}/src/nvidia.ko"
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ donvidia "${NV_OBJ}"/libnvidia-cfg.so ${NV_SOVER}
+
+ # NVIDIA framebuffer capture library
+ donvidia "${NV_OBJ}"/libnvidia-fbc.so ${NV_SOVER}
+
+ # NVIDIA video encode/decode <-> CUDA
+ if use kernel_linux; then
+ donvidia "${NV_OBJ}"/libnvcuvid.so ${NV_SOVER}
+ donvidia "${NV_OBJ}"/libnvidia-encode.so ${NV_SOVER}
+ fi
+
+ if use X; then
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins "${NV_X11}"/nvidia_drv.so
+
+ # Xorg GLX driver
+ donvidia "${NV_X11}"/libglx.so ${NV_SOVER} \
+ /usr/$(get_libdir)/opengl/nvidia/extensions
+ fi
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins "${NV_OBJ}"/nvidia.icd
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+
+ if use X; then
+ doexe "${NV_OBJ}"/nvidia-xconfig
+ fi
+
+ if use kernel_linux ; then
+ 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
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe "${NV_OBJ}"/nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym /{opt,usr}/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/ \
+ DESTDIR="${D}" \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ PREFIX=/usr \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ install
+
+ if use static-libs; then
+ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ fi
+
+ insinto /usr/share/nvidia/
+ doins nvidia-application-profiles-${PV}-key-documentation
+
+ insinto /etc/nvidia
+ newins \
+ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+
+ # There is no icon in the FreeBSD tarball.
+ use kernel_FreeBSD || \
+ doicon "${NV_OBJ}"/nvidia-settings.png
+
+ domenu "${FILESDIR}"/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+
+ fi
+
+ dobin "${NV_OBJ}"/nvidia-bug-report.sh
+
+ #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist
+
+ 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"
+
+ # Documentation
+ if use kernel_FreeBSD; then
+ dodoc "${NV_DOC}"/README
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ else
+ # Docs
+ newdoc "${NV_DOC}"/README.txt README
+ dodoc "${NV_DOC}"/NVIDIA_Changelog
+ doman "${NV_MAN}"/nvidia-smi.1
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+ fi
+
+ readme.gentoo_create_doc
+
+ docinto html
+ dodoc -r "${NV_DOC}"/html/*
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+ local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+ local nv_libdir="${NV_OBJ}"
+
+ if use kernel_linux && has_multilib_profile && \
+ [[ ${ABI} == "x86" ]] ; then
+ nv_libdir="${NV_OBJ}"/32
+ fi
+
+ if use X; then
+ # The GLX libraries
+ donvidia "${nv_libdir}"/libEGL.so ${NV_SOVER} ${GL_ROOT}
+ donvidia "${nv_libdir}"/libGL.so ${NV_SOVER} ${GL_ROOT}
+ donvidia "${nv_libdir}"/libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT}
+ donvidia "${nv_libdir}"/libnvidia-eglcore.so ${NV_SOVER}
+ donvidia "${nv_libdir}"/libnvidia-glcore.so ${NV_SOVER}
+ donvidia "${nv_libdir}"/libnvidia-glsi.so ${NV_SOVER}
+ donvidia "${nv_libdir}"/libnvidia-ifr.so ${NV_SOVER}
+ if use kernel_FreeBSD; then
+ donvidia "${nv_libdir}"/libnvidia-tls.so ${NV_SOVER}
+ else
+ donvidia "${nv_libdir}"/tls/libnvidia-tls.so ${NV_SOVER}
+ fi
+
+ # VDPAU
+ donvidia "${nv_libdir}"/libvdpau_nvidia.so ${NV_SOVER}
+
+ # GLES v2 libraries
+ insinto ${GL_ROOT}
+ doexe "${nv_libdir}"/libGLESv2.so.${PV}
+ dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2
+ dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so
+ fi
+
+ # NVIDIA monitoring library
+ if use kernel_linux ; then
+ donvidia "${nv_libdir}"/libnvidia-ml.so ${NV_SOVER}
+ fi
+
+ # CUDA & OpenCL
+ if use kernel_linux; then
+ donvidia "${nv_libdir}"/libcuda.so ${NV_SOVER}
+ donvidia "${nv_libdir}"/libnvidia-compiler.so ${NV_SOVER}
+ donvidia "${nv_libdir}"/libOpenCL.so 1.0.0 ${CL_ROOT}
+ donvidia "${nv_libdir}"/libnvidia-opencl.so ${NV_SOVER}
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_preinst
+
+ local videogroup="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "${videogroup}" ]; then
+ eerror "Failed to determine the video group gid"
+ die "Failed to determine the video group gid"
+ else
+ sed -i \
+ -e "s:PACKAGE:${PF}:g" \
+ -e "s:VIDEOGID:${videogroup}:" \
+ "${D}"/etc/modprobe.d/nvidia.conf || die
+ fi
+ fi
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ readme.gentoo_print_elog
+
+ if ! use X; then
+ elog "You have elected to not install the X.org driver. Along with"
+ elog "this the OpenGL libraries and VDPAU libraries were not"
+ elog "installed. Additionally, once the driver is loaded your card"
+ elog "and fan will run at max speed which may not be desirable."
+ elog "Use the 'nvidia-smi' init script to have your card and fan"
+ elog "speed scale appropriately."
+ elog
+ fi
+ if ! use tools; then
+ elog "USE=tools controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. Optionally you can install"
+ elog "media-video/nvidia-settings"
+ elog
+ fi
+}
+
+pkg_prerm() {
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.116-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.116-r2.ebuild
new file mode 100644
index 000000000000..b14bd5d1f669
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.116-r2.ebuild
@@ -0,0 +1,589 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
+ portability toolchain-funcs unpacker user udev
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="http://www.nvidia.com/"
+
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+
+NV_URI="https://us.download.nvidia.com/XFree86/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ arm? ( ${NV_URI}Linux-x86-ARM/${PV}/${ARM_NV_PACKAGE}.run )
+ x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
+ x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ tools? (
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ )
+"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0/${PV%.*}"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib static-libs +tools uvm wayland +X"
+REQUIRED_USE="
+ tools? ( X )
+ static-libs? ( tools )
+"
+
+COMMON="
+ app-eselect/eselect-opencl
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ tools? (
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ gtk3? (
+ x11-libs/gtk+:3
+ )
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf[X]
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ )
+ X? (
+ >=app-eselect/eselect-opengl-1.0.9
+ app-misc/pax-utils
+ )
+"
+DEPEND="
+ ${COMMON}
+ kernel_linux? ( virtual/linux-sources )
+ tools? ( sys-apps/dbus )
+"
+RDEPEND="
+ ${COMMON}
+ acpi? ( sys-power/acpid )
+ tools? ( !media-video/nvidia-settings )
+ 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}]
+ >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ )
+"
+QA_PREBUILT="opt/* usr/lib*"
+S=${WORKDIR}/
+
+nvidia_drivers_versions_check() {
+ if use amd64 && has_multilib_profile && \
+ [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default ABI"
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux && kernel_is ge 5 1; then
+ ewarn "Gentoo supports kernels which are supported by NVIDIA"
+ ewarn "which are limited to the following kernels:"
+ ewarn "<sys-kernel/gentoo-sources-5.1"
+ ewarn "<sys-kernel/vanilla-sources-5.1"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Do not file a bug report about this."
+ ewarn ""
+ fi
+
+ # Since Nvidia ships many different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # Kernel features/options to check for
+ CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
+ use x86 && CONFIG_CHECK+=" ~HIGHMEM"
+
+ # Now do the above checks
+ use kernel_linux && check_extra_config
+}
+
+pkg_pretend() {
+ nvidia_drivers_versions_check
+}
+
+pkg_setup() {
+ nvidia_drivers_versions_check
+
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use driver && use kernel_linux; then
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+ use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
+ use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
+
+ # This needs to run after MODULE_NAMES (so that the eclass checks
+ # whether the kernel supports loadable modules) but before BUILD_PARAMS
+ # is set (so that KV_DIR is populated).
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ fi
+
+ if use kernel_linux && kernel_is lt 2 6 9; then
+ eerror "You must build this against 2.6.9 or higher kernels."
+ fi
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
+ use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
+ NV_DOC="${S}/doc"
+ NV_OBJ="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_OBJ="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_prepare() {
+ local man_file
+ for man_file in "${NV_MAN}"/*1.gz; do
+ gunzip $man_file || die
+ done
+
+ if use tools; then
+ cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
+ sed -i \
+ -e "s:@PV@:${PV}:g" \
+ "${WORKDIR}"/nvidia-settings-linker.patch || die
+ eapply "${WORKDIR}"/nvidia-settings-linker.patch
+ fi
+
+ default
+
+ 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
+}
+
+src_compile() {
+ # This is already the default on Linux, as there's no toplevel Makefile, but
+ # on FreeBSD there's one and triggers the kernel module build, as we install
+ # it by itself, pass this.
+
+ cd "${NV_SRC}"
+ if use kernel_FreeBSD; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use driver && use kernel_linux; then
+ BUILD_TARGETS=module linux-mod_src_compile \
+ KERNELRELEASE="${KV_FULL}" \
+ src="${KERNEL_DIR}"
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/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 "${S}"/nvidia-settings-${PV}/src \
+ CC="$(tc-getCC)" \
+ DO_STRIP= \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LD="$(tc-getCC)" \
+ LIBDIR="$(get_libdir)" \
+ NVLD="$(tc-getLD)" \
+ NVML_ENABLED=0 \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1
+ fi
+}
+
+# Install nvidia library:
+# the first parameter is the library to install
+# the second parameter is the provided soversion
+# the third parameter is the target directory if it is not /usr/lib
+donvidia() {
+ # Full path to library
+ nv_LIB="${1}"
+
+ # SOVER to use
+ nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
+
+ # Where to install
+ nv_DEST="${2}"
+
+ # Get just the library name
+ nv_LIBNAME=$(basename "${nv_LIB}")
+
+ if [[ "${nv_DEST}" ]]; then
+ exeinto ${nv_DEST}
+ action="doexe"
+ else
+ nv_DEST="/usr/$(get_libdir)"
+ action="dolib.so"
+ fi
+
+ # Install the library
+ ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
+
+ # If the library has a SONAME and SONAME does not match the library name,
+ # then we need to create a symlink
+ if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
+ || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
+ fi
+
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
+ || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
+}
+
+src_install() {
+ if use driver && use kernel_linux; then
+ linux-mod_src_install
+
+ # Add the aliases
+ # This file is tweaked with the appropriate video group in
+ # pkg_preinst, see bug #491414
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+ if use uvm; then
+ doins "${FILESDIR}"/nvidia-rmmod.conf
+ udev_newrules "${FILESDIR}"/nvidia-uvm.udev-rule 99-nvidia-uvm.rules
+ else
+ sed -e 's|nvidia-uvm ||g' "${FILESDIR}"/nvidia-rmmod.conf \
+ > "${T}"/nvidia-rmmod.conf || die
+ doins "${T}"/nvidia-rmmod.conf
+ fi
+
+ # Ensures that our device nodes are created when not using X
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
+ udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use kernel_FreeBSD; then
+ if use x86-fbsd; then
+ insinto /boot/modules
+ doins "${S}/src/nvidia.kld"
+ fi
+
+ exeinto /boot/modules
+ doexe "${S}/src/nvidia.ko"
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+
+ # NVIDIA framebuffer capture library
+ donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+
+ # NVIDIA video encode/decode <-> CUDA
+ if use kernel_linux; then
+ donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
+ donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
+ fi
+
+ if use X; then
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins ${NV_X11}/nvidia_drv.so
+
+ # Xorg GLX driver
+ donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
+ /usr/$(get_libdir)/opengl/nvidia/extensions
+
+ # Xorg nvidia.conf
+ if has_version '>=x11-base/xorg-server-1.16'; then
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
+ fi
+
+ insinto /usr/share/glvnd/egl_vendor.d
+ doins ${NV_X11}/10_nvidia.json
+ fi
+
+ if use wayland; then
+ insinto /usr/share/egl/egl_external_platform.d
+ doins ${NV_X11}/10_nvidia_wayland.json
+ fi
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins ${NV_OBJ}/nvidia.icd
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+
+ if use X; then
+ doexe ${NV_OBJ}/nvidia-xconfig
+
+ insinto /etc/vulkan/icd.d
+ doins nvidia_icd.json
+ fi
+
+ if use kernel_linux; then
+ 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
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe ${NV_OBJ}/nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym /{opt,usr}/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/ \
+ DESTDIR="${D}" \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ PREFIX=/usr \
+ DO_STRIP= \
+ install
+
+ if use static-libs; then
+ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ fi
+
+ insinto /usr/share/nvidia/
+ doins nvidia-application-profiles-${PV}-key-documentation
+
+ insinto /etc/nvidia
+ newins \
+ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+
+ # There is no icon in the FreeBSD tarball.
+ use kernel_FreeBSD || \
+ doicon ${NV_OBJ}/nvidia-settings.png
+
+ domenu "${FILESDIR}"/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+ 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"
+
+ # Documentation
+ if use kernel_FreeBSD; then
+ dodoc "${NV_DOC}/README"
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ else
+ # Docs
+ newdoc "${NV_DOC}/README.txt" README
+ dodoc "${NV_DOC}/NVIDIA_Changelog"
+ doman "${NV_MAN}"/nvidia-smi.1
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+ fi
+
+ readme.gentoo_create_doc
+
+ docinto html
+ dodoc -r ${NV_DOC}/html/*
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+ local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+ local nv_libdir="${NV_OBJ}"
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+ nv_libdir="${NV_OBJ}"/32
+ fi
+
+ if use X; then
+ NV_GLX_LIBRARIES=(
+ "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
+ "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
+ "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
+ "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLESv2.so.2.1.0 ${GL_ROOT}"
+ "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLX.so.0 ${GL_ROOT}"
+ "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLdispatch.so.0 ${GL_ROOT}"
+ "libOpenCL.so.1.0.0 ${CL_ROOT}"
+ "libOpenGL.so.0 ${GL_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}"
+ )
+
+ if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-egl-wayland.so.1.0.2"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-wfb.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_FreeBSD; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-ml.so.${NV_SOVER}"
+ "tls/libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+ donvidia "${nv_libdir}"/${NV_LIB}
+ done
+ fi
+}
+
+pkg_preinst() {
+ if use driver && use kernel_linux; then
+ linux-mod_pkg_preinst
+
+ local videogroup="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "${videogroup}" ]; then
+ eerror "Failed to determine the video group gid"
+ die "Failed to determine the video group gid"
+ else
+ sed -i \
+ -e "s:PACKAGE:${PF}:g" \
+ -e "s:VIDEOGID:${videogroup}:" \
+ "${D}"/etc/modprobe.d/nvidia.conf || die
+ fi
+ fi
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use driver && use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ readme.gentoo_print_elog
+
+ if ! use X; then
+ elog "You have elected to not install the X.org driver. Along with"
+ elog "this the OpenGL libraries and VDPAU libraries were not"
+ elog "installed. Additionally, once the driver is loaded your card"
+ elog "and fan will run at max speed which may not be desirable."
+ elog "Use the 'nvidia-smi' init script to have your card and fan"
+ elog "speed scale appropriately."
+ elog
+ fi
+ if ! use tools; then
+ elog "USE=tools controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. Optionally you can install"
+ elog "media-video/nvidia-settings"
+ elog
+ fi
+}
+
+pkg_prerm() {
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use driver && use kernel_linux && linux-mod_pkg_postrm
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-410.104-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-410.104-r2.ebuild
new file mode 100644
index 000000000000..0451caf0436a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-410.104-r2.ebuild
@@ -0,0 +1,592 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
+ portability toolchain-funcs unpacker user udev
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="http://www.nvidia.com/"
+
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
+
+NV_URI="https://us.download.nvidia.com/XFree86/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ tools? (
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ )
+"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0/${PV%.*}"
+KEYWORDS="-* ~amd64 ~amd64-fbsd"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib static-libs +tools uvm wayland +X"
+REQUIRED_USE="
+ tools? ( X )
+ static-libs? ( tools )
+"
+
+COMMON="
+ app-eselect/eselect-opencl
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ tools? (
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ gtk3? (
+ x11-libs/gtk+:3
+ )
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf[X]
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ )
+ X? (
+ >=app-eselect/eselect-opengl-1.0.9
+ app-misc/pax-utils
+ )
+"
+DEPEND="
+ ${COMMON}
+ kernel_linux? ( virtual/linux-sources )
+ tools? ( sys-apps/dbus )
+"
+RDEPEND="
+ ${COMMON}
+ acpi? ( sys-power/acpid )
+ tools? ( !media-video/nvidia-settings )
+ 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}]
+ >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ )
+"
+QA_PREBUILT="opt/* usr/lib*"
+S=${WORKDIR}/
+
+nvidia_drivers_versions_check() {
+ if use amd64 && has_multilib_profile && \
+ [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default ABI"
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux && kernel_is ge 5 1; then
+ ewarn "Gentoo supports kernels which are supported by NVIDIA"
+ ewarn "which are limited to the following kernels:"
+ ewarn "<sys-kernel/gentoo-sources-5.1"
+ ewarn "<sys-kernel/vanilla-sources-5.1"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Do not file a bug report about this."
+ ewarn ""
+ fi
+
+ # Since Nvidia ships many different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # Kernel features/options to check for
+ CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~PM ~SYSVIPC ~ZONE_DMA"
+
+ # Now do the above checks
+ use kernel_linux && check_extra_config
+}
+
+pkg_pretend() {
+ nvidia_drivers_versions_check
+}
+
+pkg_setup() {
+ nvidia_drivers_versions_check
+
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use driver && use kernel_linux; then
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+ use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
+ use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
+
+ # This needs to run after MODULE_NAMES (so that the eclass checks
+ # whether the kernel supports loadable modules) but before BUILD_PARAMS
+ # is set (so that KV_DIR is populated).
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ fi
+
+ if use kernel_linux && kernel_is lt 2 6 9; then
+ eerror "You must build this against 2.6.9 or higher kernels."
+ fi
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
+ NV_DOC="${S}/doc"
+ NV_OBJ="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_OBJ="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_prepare() {
+ local man_file
+ for man_file in "${NV_MAN}"/*1.gz; do
+ gunzip $man_file || die
+ done
+
+ if use tools; then
+ cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
+ sed -i \
+ -e "s:@PV@:${PV}:g" \
+ "${WORKDIR}"/nvidia-settings-linker.patch || die
+ eapply "${WORKDIR}"/nvidia-settings-linker.patch
+ fi
+
+ default
+
+ 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
+}
+
+src_compile() {
+ # This is already the default on Linux, as there's no toplevel Makefile, but
+ # on FreeBSD there's one and triggers the kernel module build, as we install
+ # it by itself, pass this.
+
+ cd "${NV_SRC}"
+ if use kernel_FreeBSD; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use driver && use kernel_linux; then
+ BUILD_TARGETS=module linux-mod_src_compile \
+ KERNELRELEASE="${KV_FULL}" \
+ src="${KERNEL_DIR}"
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/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 "${S}"/nvidia-settings-${PV}/src \
+ CC="$(tc-getCC)" \
+ DO_STRIP= \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LD="$(tc-getCC)" \
+ LIBDIR="$(get_libdir)" \
+ NVLD="$(tc-getLD)" \
+ NVML_ENABLED=0 \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1
+ fi
+}
+
+# Install nvidia library:
+# the first parameter is the library to install
+# the second parameter is the provided soversion
+# the third parameter is the target directory if it is not /usr/lib
+donvidia() {
+ # Full path to library
+ nv_LIB="${1}"
+
+ # SOVER to use
+ nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
+
+ # Where to install
+ nv_DEST="${2}"
+
+ # Get just the library name
+ nv_LIBNAME=$(basename "${nv_LIB}")
+
+ if [[ "${nv_DEST}" ]]; then
+ exeinto ${nv_DEST}
+ action="doexe"
+ else
+ nv_DEST="/usr/$(get_libdir)"
+ action="dolib.so"
+ fi
+
+ # Install the library
+ ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
+
+ # If the library has a SONAME and SONAME does not match the library name,
+ # then we need to create a symlink
+ if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
+ || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
+ fi
+
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
+ || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
+}
+
+src_install() {
+ if use driver && use kernel_linux; then
+ linux-mod_src_install
+
+ # Add the aliases
+ # This file is tweaked with the appropriate video group in
+ # pkg_preinst, see bug #491414
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+ if use uvm; then
+ doins "${FILESDIR}"/nvidia-rmmod.conf
+ udev_newrules "${FILESDIR}"/nvidia-uvm.udev-rule 99-nvidia-uvm.rules
+ else
+ sed -e 's|nvidia-uvm ||g' "${FILESDIR}"/nvidia-rmmod.conf \
+ > "${T}"/nvidia-rmmod.conf || die
+ doins "${T}"/nvidia-rmmod.conf
+ fi
+
+ # Ensures that our device nodes are created when not using X
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
+ udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use kernel_FreeBSD; then
+ if use x86-fbsd; then
+ insinto /boot/modules
+ doins "${S}/src/nvidia.kld"
+ fi
+
+ exeinto /boot/modules
+ doexe "${S}/src/nvidia.ko"
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+
+ # NVIDIA framebuffer capture library
+ donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+
+ # NVIDIA video encode/decode <-> CUDA
+ if use kernel_linux; then
+ donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
+ donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
+ fi
+
+ if use X; then
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins ${NV_X11}/nvidia_drv.so
+
+ # Xorg GLX driver
+ donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
+ /usr/$(get_libdir)/xorg/modules/extensions
+
+ # Xorg nvidia.conf
+ if has_version '>=x11-base/xorg-server-1.16'; then
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
+ fi
+
+ insinto /usr/share/glvnd/egl_vendor.d
+ doins ${NV_X11}/10_nvidia.json
+ fi
+
+ if use wayland; then
+ insinto /usr/share/egl/egl_external_platform.d
+ doins ${NV_X11}/10_nvidia_wayland.json
+ fi
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins ${NV_OBJ}/nvidia.icd
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+
+ if use X; then
+ doexe ${NV_OBJ}/nvidia-xconfig
+
+ insinto /etc/vulkan/icd.d
+ doins nvidia_icd.json
+ fi
+
+ if use kernel_linux; then
+ 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
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe ${NV_OBJ}/nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym /{opt,usr}/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/ \
+ DESTDIR="${D}" \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ PREFIX=/usr \
+ DO_STRIP= \
+ install
+
+ if use static-libs; then
+ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ fi
+
+ insinto /usr/share/nvidia/
+ doins nvidia-application-profiles-${PV}-key-documentation
+
+ insinto /etc/nvidia
+ newins \
+ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+
+ # There is no icon in the FreeBSD tarball.
+ use kernel_FreeBSD || \
+ doicon ${NV_OBJ}/nvidia-settings.png
+
+ domenu "${FILESDIR}"/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+ 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"
+
+ # Documentation
+ if use kernel_FreeBSD; then
+ dodoc "${NV_DOC}/README"
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ else
+ # Docs
+ newdoc "${NV_DOC}/README.txt" README
+ dodoc "${NV_DOC}/NVIDIA_Changelog"
+ doman "${NV_MAN}"/nvidia-smi.1
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+ fi
+
+ readme.gentoo_create_doc
+
+ docinto html
+ dodoc -r ${NV_DOC}/html/*
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+ local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+ local nv_libdir="${NV_OBJ}"
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+ nv_libdir="${NV_OBJ}"/32
+ fi
+
+ if use X; then
+ NV_GLX_LIBRARIES=(
+ "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
+ "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
+ "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
+ "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLESv2.so.2.1.0 ${GL_ROOT}"
+ "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLX.so.0 ${GL_ROOT}"
+ "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLdispatch.so.0 ${GL_ROOT}"
+ "libOpenCL.so.1.0.0 ${CL_ROOT}"
+ "libOpenGL.so.0 ${GL_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-glvkspirv.so.${NV_SOVER}"
+ "libnvidia-ifr.so.${NV_SOVER}"
+ "libnvidia-opencl.so.${NV_SOVER}"
+ "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
+ "libvdpau_nvidia.so.${NV_SOVER}"
+ )
+
+ if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-egl-wayland.so.1.1.0"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-wfb.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_FreeBSD; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-ml.so.${NV_SOVER}"
+ "tls/libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-cbl.so.${NV_SOVER}"
+ "libnvidia-rtcore.so.${NV_SOVER}"
+ "libnvoptix.so.${NV_SOVER}"
+ )
+ fi
+
+ for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+ donvidia "${nv_libdir}"/${NV_LIB}
+ done
+ fi
+}
+
+pkg_preinst() {
+ if use driver && use kernel_linux; then
+ linux-mod_pkg_preinst
+
+ local videogroup="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "${videogroup}" ]; then
+ eerror "Failed to determine the video group gid"
+ die "Failed to determine the video group gid"
+ else
+ sed -i \
+ -e "s:PACKAGE:${PF}:g" \
+ -e "s:VIDEOGID:${videogroup}:" \
+ "${D}"/etc/modprobe.d/nvidia.conf || die
+ fi
+ fi
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use driver && use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ readme.gentoo_print_elog
+
+ if ! use X; then
+ elog "You have elected to not install the X.org driver. Along with"
+ elog "this the OpenGL libraries and VDPAU libraries were not"
+ elog "installed. Additionally, once the driver is loaded your card"
+ elog "and fan will run at max speed which may not be desirable."
+ elog "Use the 'nvidia-smi' init script to have your card and fan"
+ elog "speed scale appropriately."
+ elog
+ fi
+ if ! use tools; then
+ elog "USE=tools controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. Optionally you can install"
+ elog "media-video/nvidia-settings"
+ elog
+ fi
+}
+
+pkg_prerm() {
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use driver && use kernel_linux && linux-mod_pkg_postrm
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-415.27-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-415.27-r2.ebuild
new file mode 100644
index 000000000000..f00c9506c657
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-415.27-r2.ebuild
@@ -0,0 +1,592 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
+ portability toolchain-funcs unpacker user udev
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="http://www.nvidia.com/"
+
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
+
+NV_URI="https://us.download.nvidia.com/XFree86/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ tools? (
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ )
+"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0/${PV%.*}"
+KEYWORDS="-* ~amd64 ~amd64-fbsd"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib static-libs +tools uvm wayland +X"
+REQUIRED_USE="
+ tools? ( X )
+ static-libs? ( tools )
+"
+
+COMMON="
+ app-eselect/eselect-opencl
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ tools? (
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ gtk3? (
+ x11-libs/gtk+:3
+ )
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf[X]
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ )
+ X? (
+ >=app-eselect/eselect-opengl-1.0.9
+ app-misc/pax-utils
+ )
+"
+DEPEND="
+ ${COMMON}
+ kernel_linux? ( virtual/linux-sources )
+ tools? ( sys-apps/dbus )
+"
+RDEPEND="
+ ${COMMON}
+ acpi? ( sys-power/acpid )
+ tools? ( !media-video/nvidia-settings )
+ 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}]
+ >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ )
+"
+QA_PREBUILT="opt/* usr/lib*"
+S=${WORKDIR}/
+
+nvidia_drivers_versions_check() {
+ if use amd64 && has_multilib_profile && \
+ [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default ABI"
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux && kernel_is ge 4 21; then
+ ewarn "Gentoo supports kernels which are supported by NVIDIA"
+ ewarn "which are limited to the following kernels:"
+ ewarn "<sys-kernel/gentoo-sources-4.21"
+ ewarn "<sys-kernel/vanilla-sources-4.21"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Do not file a bug report about this."
+ ewarn ""
+ fi
+
+ # Since Nvidia ships many different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # Kernel features/options to check for
+ CONFIG_CHECK="!DEBUG_MUTEXES !I2C_NVIDIA_GPU ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
+
+ # Now do the above checks
+ use kernel_linux && check_extra_config
+}
+
+pkg_pretend() {
+ nvidia_drivers_versions_check
+}
+
+pkg_setup() {
+ nvidia_drivers_versions_check
+
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use driver && use kernel_linux; then
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+ use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
+ use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
+
+ # This needs to run after MODULE_NAMES (so that the eclass checks
+ # whether the kernel supports loadable modules) but before BUILD_PARAMS
+ # is set (so that KV_DIR is populated).
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ fi
+
+ if use kernel_linux && kernel_is lt 2 6 9; then
+ eerror "You must build this against 2.6.9 or higher kernels."
+ fi
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
+ NV_DOC="${S}/doc"
+ NV_OBJ="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_OBJ="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_prepare() {
+ local man_file
+ for man_file in "${NV_MAN}"/*1.gz; do
+ gunzip $man_file || die
+ done
+
+ if use tools; then
+ cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
+ sed -i \
+ -e "s:@PV@:${PV}:g" \
+ "${WORKDIR}"/nvidia-settings-linker.patch || die
+ eapply "${WORKDIR}"/nvidia-settings-linker.patch
+ fi
+
+ default
+
+ 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
+}
+
+src_compile() {
+ # This is already the default on Linux, as there's no toplevel Makefile, but
+ # on FreeBSD there's one and triggers the kernel module build, as we install
+ # it by itself, pass this.
+
+ cd "${NV_SRC}"
+ if use kernel_FreeBSD; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use driver && use kernel_linux; then
+ BUILD_TARGETS=module linux-mod_src_compile \
+ KERNELRELEASE="${KV_FULL}" \
+ src="${KERNEL_DIR}"
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/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 "${S}"/nvidia-settings-${PV}/src \
+ CC="$(tc-getCC)" \
+ DO_STRIP= \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LD="$(tc-getCC)" \
+ LIBDIR="$(get_libdir)" \
+ NVLD="$(tc-getLD)" \
+ NVML_ENABLED=0 \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1
+ fi
+}
+
+# Install nvidia library:
+# the first parameter is the library to install
+# the second parameter is the provided soversion
+# the third parameter is the target directory if it is not /usr/lib
+donvidia() {
+ # Full path to library
+ nv_LIB="${1}"
+
+ # SOVER to use
+ nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
+
+ # Where to install
+ nv_DEST="${2}"
+
+ # Get just the library name
+ nv_LIBNAME=$(basename "${nv_LIB}")
+
+ if [[ "${nv_DEST}" ]]; then
+ exeinto ${nv_DEST}
+ action="doexe"
+ else
+ nv_DEST="/usr/$(get_libdir)"
+ action="dolib.so"
+ fi
+
+ # Install the library
+ ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
+
+ # If the library has a SONAME and SONAME does not match the library name,
+ # then we need to create a symlink
+ if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
+ || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
+ fi
+
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
+ || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
+}
+
+src_install() {
+ if use driver && use kernel_linux; then
+ linux-mod_src_install
+
+ # Add the aliases
+ # This file is tweaked with the appropriate video group in
+ # pkg_preinst, see bug #491414
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+ if use uvm; then
+ doins "${FILESDIR}"/nvidia-rmmod.conf
+ udev_newrules "${FILESDIR}"/nvidia-uvm.udev-rule 99-nvidia-uvm.rules
+ else
+ sed -e 's|nvidia-uvm ||g' "${FILESDIR}"/nvidia-rmmod.conf \
+ > "${T}"/nvidia-rmmod.conf || die
+ doins "${T}"/nvidia-rmmod.conf
+ fi
+
+ # Ensures that our device nodes are created when not using X
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
+ udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use kernel_FreeBSD; then
+ if use x86-fbsd; then
+ insinto /boot/modules
+ doins "${S}/src/nvidia.kld"
+ fi
+
+ exeinto /boot/modules
+ doexe "${S}/src/nvidia.ko"
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+
+ # NVIDIA framebuffer capture library
+ donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+
+ # NVIDIA video encode/decode <-> CUDA
+ if use kernel_linux; then
+ donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
+ donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
+ fi
+
+ if use X; then
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins ${NV_X11}/nvidia_drv.so
+
+ # Xorg GLX driver
+ donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
+ /usr/$(get_libdir)/xorg/modules/extensions
+
+ # Xorg nvidia.conf
+ if has_version '>=x11-base/xorg-server-1.16'; then
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
+ fi
+
+ insinto /usr/share/glvnd/egl_vendor.d
+ doins ${NV_X11}/10_nvidia.json
+ fi
+
+ if use wayland; then
+ insinto /usr/share/egl/egl_external_platform.d
+ doins ${NV_X11}/10_nvidia_wayland.json
+ fi
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins ${NV_OBJ}/nvidia.icd
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+
+ if use X; then
+ doexe ${NV_OBJ}/nvidia-xconfig
+
+ insinto /etc/vulkan/icd.d
+ doins nvidia_icd.json
+ fi
+
+ if use kernel_linux; then
+ 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
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe ${NV_OBJ}/nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym /{opt,usr}/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/ \
+ DESTDIR="${D}" \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ PREFIX=/usr \
+ DO_STRIP= \
+ install
+
+ if use static-libs; then
+ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ fi
+
+ insinto /usr/share/nvidia/
+ doins nvidia-application-profiles-${PV}-key-documentation
+
+ insinto /etc/nvidia
+ newins \
+ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+
+ # There is no icon in the FreeBSD tarball.
+ use kernel_FreeBSD || \
+ doicon ${NV_OBJ}/nvidia-settings.png
+
+ domenu "${FILESDIR}"/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+ 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"
+
+ # Documentation
+ if use kernel_FreeBSD; then
+ dodoc "${NV_DOC}/README"
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ else
+ # Docs
+ newdoc "${NV_DOC}/README.txt" README
+ dodoc "${NV_DOC}/NVIDIA_Changelog"
+ doman "${NV_MAN}"/nvidia-smi.1
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+ fi
+
+ readme.gentoo_create_doc
+
+ docinto html
+ dodoc -r ${NV_DOC}/html/*
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+ local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+ local nv_libdir="${NV_OBJ}"
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+ nv_libdir="${NV_OBJ}"/32
+ fi
+
+ if use X; then
+ NV_GLX_LIBRARIES=(
+ "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
+ "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
+ "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
+ "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLESv2.so.2.1.0 ${GL_ROOT}"
+ "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLX.so.0 ${GL_ROOT}"
+ "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLdispatch.so.0 ${GL_ROOT}"
+ "libOpenCL.so.1.0.0 ${CL_ROOT}"
+ "libOpenGL.so.0 ${GL_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-glvkspirv.so.${NV_SOVER}"
+ "libnvidia-ifr.so.${NV_SOVER}"
+ "libnvidia-opencl.so.${NV_SOVER}"
+ "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
+ "libvdpau_nvidia.so.${NV_SOVER}"
+ )
+
+ if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-egl-wayland.so.1.1.0"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-wfb.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_FreeBSD; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-ml.so.${NV_SOVER}"
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-cbl.so.${NV_SOVER}"
+ "libnvidia-rtcore.so.${NV_SOVER}"
+ "libnvoptix.so.${NV_SOVER}"
+ )
+ fi
+
+ for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+ donvidia "${nv_libdir}"/${NV_LIB}
+ done
+ fi
+}
+
+pkg_preinst() {
+ if use driver && use kernel_linux; then
+ linux-mod_pkg_preinst
+
+ local videogroup="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "${videogroup}" ]; then
+ eerror "Failed to determine the video group gid"
+ die "Failed to determine the video group gid"
+ else
+ sed -i \
+ -e "s:PACKAGE:${PF}:g" \
+ -e "s:VIDEOGID:${videogroup}:" \
+ "${D}"/etc/modprobe.d/nvidia.conf || die
+ fi
+ fi
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use driver && use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ readme.gentoo_print_elog
+
+ if ! use X; then
+ elog "You have elected to not install the X.org driver. Along with"
+ elog "this the OpenGL libraries and VDPAU libraries were not"
+ elog "installed. Additionally, once the driver is loaded your card"
+ elog "and fan will run at max speed which may not be desirable."
+ elog "Use the 'nvidia-smi' init script to have your card and fan"
+ elog "speed scale appropriately."
+ elog
+ fi
+ if ! use tools; then
+ elog "USE=tools controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. Optionally you can install"
+ elog "media-video/nvidia-settings"
+ elog
+ fi
+}
+
+pkg_prerm() {
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use driver && use kernel_linux && linux-mod_pkg_postrm
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-418.43-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-418.43-r2.ebuild
new file mode 100644
index 000000000000..069ac0fbe702
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-418.43-r2.ebuild
@@ -0,0 +1,585 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
+ portability toolchain-funcs unpacker user udev
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="http://www.nvidia.com/"
+
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
+
+NV_URI="https://us.download.nvidia.com/XFree86/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ tools? (
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ )
+"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0/${PV%.*}"
+KEYWORDS="-* ~amd64 ~amd64-fbsd"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib static-libs +tools uvm wayland +X"
+REQUIRED_USE="
+ tools? ( X )
+ static-libs? ( tools )
+"
+
+COMMON="
+ app-eselect/eselect-opencl
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ tools? (
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ gtk3? (
+ x11-libs/gtk+:3
+ )
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf[X]
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ )
+ X? (
+ >=app-eselect/eselect-opengl-1.0.9
+ app-misc/pax-utils
+ )
+"
+DEPEND="
+ ${COMMON}
+ kernel_linux? ( virtual/linux-sources )
+ tools? ( sys-apps/dbus )
+"
+RDEPEND="
+ ${COMMON}
+ acpi? ( sys-power/acpid )
+ tools? ( !media-video/nvidia-settings )
+ 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}]
+ >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ )
+"
+QA_PREBUILT="opt/* usr/lib*"
+S=${WORKDIR}/
+
+nvidia_drivers_versions_check() {
+ if use amd64 && has_multilib_profile && \
+ [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default ABI"
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux && kernel_is ge 5 1; then
+ ewarn "Gentoo supports kernels which are supported by NVIDIA"
+ ewarn "which are limited to the following kernels:"
+ ewarn "<sys-kernel/gentoo-sources-5.1"
+ ewarn "<sys-kernel/vanilla-sources-5.1"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Do not file a bug report about this."
+ ewarn ""
+ fi
+
+ # Since Nvidia ships many different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # Kernel features/options to check for
+ CONFIG_CHECK="!DEBUG_MUTEXES !I2C_NVIDIA_GPU ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
+
+ # Now do the above checks
+ use kernel_linux && check_extra_config
+}
+
+pkg_pretend() {
+ nvidia_drivers_versions_check
+}
+
+pkg_setup() {
+ nvidia_drivers_versions_check
+
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use driver && use kernel_linux; then
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+ use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
+ use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
+
+ # This needs to run after MODULE_NAMES (so that the eclass checks
+ # whether the kernel supports loadable modules) but before BUILD_PARAMS
+ # is set (so that KV_DIR is populated).
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ fi
+
+ if use kernel_linux && kernel_is lt 2 6 9; then
+ eerror "You must build this against 2.6.9 or higher kernels."
+ fi
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
+ NV_DOC="${S}/doc"
+ NV_OBJ="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_OBJ="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_prepare() {
+ local man_file
+ for man_file in "${NV_MAN}"/*1.gz; do
+ gunzip $man_file || die
+ done
+
+ if use tools; then
+ cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
+ sed -i \
+ -e "s:@PV@:${PV}:g" \
+ "${WORKDIR}"/nvidia-settings-linker.patch || die
+ eapply "${WORKDIR}"/nvidia-settings-linker.patch
+ fi
+
+ default
+
+ 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
+}
+
+src_compile() {
+ # This is already the default on Linux, as there's no toplevel Makefile, but
+ # on FreeBSD there's one and triggers the kernel module build, as we install
+ # it by itself, pass this.
+
+ cd "${NV_SRC}"
+ if use kernel_FreeBSD; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use driver && use kernel_linux; then
+ BUILD_TARGETS=module linux-mod_src_compile \
+ KERNELRELEASE="${KV_FULL}" \
+ src="${KERNEL_DIR}"
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/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 "${S}"/nvidia-settings-${PV}/src \
+ CC="$(tc-getCC)" \
+ DO_STRIP= \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LD="$(tc-getCC)" \
+ LIBDIR="$(get_libdir)" \
+ NVLD="$(tc-getLD)" \
+ NVML_ENABLED=0 \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1
+ fi
+}
+
+# Install nvidia library:
+# the first parameter is the library to install
+# the second parameter is the provided soversion
+# the third parameter is the target directory if it is not /usr/lib
+donvidia() {
+ # Full path to library
+ nv_LIB="${1}"
+
+ # SOVER to use
+ nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
+
+ # Where to install
+ nv_DEST="${2}"
+
+ # Get just the library name
+ nv_LIBNAME=$(basename "${nv_LIB}")
+
+ if [[ "${nv_DEST}" ]]; then
+ exeinto ${nv_DEST}
+ action="doexe"
+ else
+ nv_DEST="/usr/$(get_libdir)"
+ action="dolib.so"
+ fi
+
+ # Install the library
+ ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
+
+ # If the library has a SONAME and SONAME does not match the library name,
+ # then we need to create a symlink
+ if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
+ || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
+ fi
+
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
+ || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
+}
+
+src_install() {
+ if use driver && use kernel_linux; then
+ linux-mod_src_install
+
+ # Add the aliases
+ # This file is tweaked with the appropriate video group in
+ # pkg_preinst, see bug #491414
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+ if use uvm; then
+ doins "${FILESDIR}"/nvidia-rmmod.conf
+ udev_newrules "${FILESDIR}"/nvidia-uvm.udev-rule 99-nvidia-uvm.rules
+ else
+ sed -e 's|nvidia-uvm ||g' "${FILESDIR}"/nvidia-rmmod.conf \
+ > "${T}"/nvidia-rmmod.conf || die
+ doins "${T}"/nvidia-rmmod.conf
+ fi
+
+ # Ensures that our device nodes are created when not using X
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
+ udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use kernel_FreeBSD; then
+ if use x86-fbsd; then
+ insinto /boot/modules
+ doins "${S}/src/nvidia.kld"
+ fi
+
+ exeinto /boot/modules
+ doexe "${S}/src/nvidia.ko"
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+
+ # NVIDIA framebuffer capture library
+ donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+
+ # NVIDIA video encode/decode <-> CUDA
+ if use kernel_linux; then
+ donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
+ donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
+ fi
+
+ if use X; then
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins ${NV_X11}/nvidia_drv.so
+
+ # Xorg GLX driver
+ donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
+ /usr/$(get_libdir)/xorg/modules/extensions
+
+ # Xorg nvidia.conf
+ if has_version '>=x11-base/xorg-server-1.16'; then
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
+ fi
+
+ insinto /usr/share/glvnd/egl_vendor.d
+ doins ${NV_X11}/10_nvidia.json
+ fi
+
+ if use wayland; then
+ insinto /usr/share/egl/egl_external_platform.d
+ doins ${NV_X11}/10_nvidia_wayland.json
+ fi
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins ${NV_OBJ}/nvidia.icd
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+
+ if use X; then
+ doexe ${NV_OBJ}/nvidia-xconfig
+
+ insinto /etc/vulkan/icd.d
+ doins nvidia_icd.json
+ fi
+
+ if use kernel_linux; then
+ 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
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe ${NV_OBJ}/nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym /{opt,usr}/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/ \
+ DESTDIR="${D}" \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ PREFIX=/usr \
+ DO_STRIP= \
+ install
+
+ if use static-libs; then
+ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ fi
+
+ insinto /usr/share/nvidia/
+ doins nvidia-application-profiles-${PV}-key-documentation
+
+ insinto /etc/nvidia
+ newins \
+ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+
+ # There is no icon in the FreeBSD tarball.
+ use kernel_FreeBSD || \
+ doicon ${NV_OBJ}/nvidia-settings.png
+
+ domenu "${FILESDIR}"/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+ 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"
+
+ # Documentation
+ if use kernel_FreeBSD; then
+ dodoc "${NV_DOC}/README"
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ else
+ # Docs
+ newdoc "${NV_DOC}/README.txt" README
+ dodoc "${NV_DOC}/NVIDIA_Changelog"
+ doman "${NV_MAN}"/nvidia-smi.1
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+ fi
+
+ readme.gentoo_create_doc
+
+ docinto html
+ dodoc -r ${NV_DOC}/html/*
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+ local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+ local nv_libdir="${NV_OBJ}"
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+ nv_libdir="${NV_OBJ}"/32
+ fi
+
+ if use X; then
+ NV_GLX_LIBRARIES=(
+ "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
+ "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
+ "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
+ "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLESv2.so.2.1.0 ${GL_ROOT}"
+ "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLX.so.0 ${GL_ROOT}"
+ "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLdispatch.so.0 ${GL_ROOT}"
+ "libOpenCL.so.1.0.0 ${CL_ROOT}"
+ "libOpenGL.so.0 ${GL_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-glvkspirv.so.${NV_SOVER}"
+ "libnvidia-ifr.so.${NV_SOVER}"
+ "libnvidia-opencl.so.${NV_SOVER}"
+ "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
+ "libvdpau_nvidia.so.${NV_SOVER}"
+ )
+
+ if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-egl-wayland.so.1.1.2"
+ )
+ fi
+
+ if use kernel_FreeBSD; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-ml.so.${NV_SOVER}"
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-cbl.so.${NV_SOVER}"
+ "libnvidia-rtcore.so.${NV_SOVER}"
+ "libnvoptix.so.${NV_SOVER}"
+ )
+ fi
+
+ for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+ donvidia "${nv_libdir}"/${NV_LIB}
+ done
+ fi
+}
+
+pkg_preinst() {
+ if use driver && use kernel_linux; then
+ linux-mod_pkg_preinst
+
+ local videogroup="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "${videogroup}" ]; then
+ eerror "Failed to determine the video group gid"
+ die "Failed to determine the video group gid"
+ else
+ sed -i \
+ -e "s:PACKAGE:${PF}:g" \
+ -e "s:VIDEOGID:${videogroup}:" \
+ "${D}"/etc/modprobe.d/nvidia.conf || die
+ fi
+ fi
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use driver && use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ readme.gentoo_print_elog
+
+ if ! use X; then
+ elog "You have elected to not install the X.org driver. Along with"
+ elog "this the OpenGL libraries and VDPAU libraries were not"
+ elog "installed. Additionally, once the driver is loaded your card"
+ elog "and fan will run at max speed which may not be desirable."
+ elog "Use the 'nvidia-smi' init script to have your card and fan"
+ elog "speed scale appropriately."
+ elog
+ fi
+ if ! use tools; then
+ elog "USE=tools controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. Optionally you can install"
+ elog "media-video/nvidia-settings"
+ elog
+ fi
+}
+
+pkg_prerm() {
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use driver && use kernel_linux && linux-mod_pkg_postrm
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/xf86-input-libinput/Manifest b/x11-drivers/xf86-input-libinput/Manifest
index 826de8d4d022..22f91577909e 100644
--- a/x11-drivers/xf86-input-libinput/Manifest
+++ b/x11-drivers/xf86-input-libinput/Manifest
@@ -1,5 +1,5 @@
DIST xf86-input-libinput-0.28.1.tar.bz2 375923 BLAKE2B f676e857fd47baad848a9325dd23ff41d9f3a0e1ab148b4e0662fe5c47f1c148bf702189c16990defdc18a33378647373ca18a379cb4421043871ec44f1224cc SHA512 2b8cabfbc3490edbe928771ed9d62a0d4a423bc1373fc6cf9d3a6b5937e17ddc48ebb1b70f1191e507024e4b8220c137495cbba825292b51e50709daa7d31623
DIST xf86-input-libinput-0.28.2.tar.bz2 377357 BLAKE2B a68b52781c5d1ff4b35b239c8f9f4b866ebb41521b05299a62b38e9570d5a09e22b3f25d1339844a61af72ae7868dbbbec8154932d1767fc65bfd365bc2b5e6b SHA512 da6eb632180649853b3aa2fb88debd6aafe5ede24a5f4a04a21cf18fa97fd414d300b86cdf8a42027c98ac89f1b9f88034fc9e364ac3a02fa38872e57b542a84
EBUILD xf86-input-libinput-0.28.1.ebuild 420 BLAKE2B e9e2008f62bfa1f5819c672e50c04818eb6b3be446e4f4a1350ccdb9a09689bd9db6dfeeac9258bf10a6437e5d0dab4e3e942289243228b18fe79f70db92516e SHA512 cf625cf52e92284cca71d7c69e720ba8e2aa8790831eb9e0484744357080a0132d4c5c11d1b8069c23c8b33d9b0891f05a00ae7f6eb238694e025a6906af67dc
-EBUILD xf86-input-libinput-0.28.2.ebuild 422 BLAKE2B c6edd7c71fb50a55638c15ef81ec1917d5c6b02c831f4283fb298a498b1861496fc2592c8a7544c9be26506c386074f836dec03cb330179c6d55aa979240563f SHA512 e874512a4d9db33ee0404672b19e8b27282d7b794abdc054e30ad82b59c91c5913dc94acf5990f69d353f103bbfb35f82f47d4f7fa33b08a4cc2e9f5090b1a7a
+EBUILD xf86-input-libinput-0.28.2.ebuild 421 BLAKE2B ba89335860be6420b007ec1c3b44e77df1907732ea2ffa988ec95dae965a50af7245f65e6b56eec639b898a45a82f483ebfab85e0d98b9a0f56912193219d71a SHA512 a034f611300e01e27f4b45408ed237c13cae59fd1de79d965db976bca0688d85be15f2a0cbbb1284874944ac0fa2cdd407048c840bc35937698ded31f353150a
MISC metadata.xml 230 BLAKE2B 70bf59e64305ef14908197f2aa7ffbc1769ade265097da68e001245451658af5921760c91cb74aae717543ea0017e2471fd94bfc5c4c447d2d60e2c23aa3b007 SHA512 d7a2643abd1904cc5ff4d91cbb6f1baeb7f75fd1db542c5e14f19412f4f0bd4b903f8e703a7662ba7482c79dac5529057760b6427599d35e0842755fd946e057
diff --git a/x11-drivers/xf86-input-libinput/xf86-input-libinput-0.28.2.ebuild b/x11-drivers/xf86-input-libinput/xf86-input-libinput-0.28.2.ebuild
index 4358426293f1..3272b5028c57 100644
--- a/x11-drivers/xf86-input-libinput/xf86-input-libinput-0.28.2.ebuild
+++ b/x11-drivers/xf86-input-libinput/xf86-input-libinput-0.28.2.ebuild
@@ -7,7 +7,7 @@ inherit linux-info xorg-2
DESCRIPTION="X.org input driver based on libinput"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sparc x86"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86"
IUSE=""
RDEPEND=">=dev-libs/libinput-1.5.0:0="
diff --git a/x11-drivers/xf86-video-amdgpu/Manifest b/x11-drivers/xf86-video-amdgpu/Manifest
index bf8489511837..fdeb40a6481b 100644
--- a/x11-drivers/xf86-video-amdgpu/Manifest
+++ b/x11-drivers/xf86-video-amdgpu/Manifest
@@ -1,4 +1,6 @@
DIST xf86-video-amdgpu-18.1.0.tar.bz2 430542 BLAKE2B c582c6d5357949833b5b9408e638e3037e38530f9a1d5e85936d1ee866effc4da1c56d7da2e8aa48cde73c09107968840262941e7b0063aa7d2aacfecc5bf120 SHA512 371f1a9f6cd2ce3b7117361222d196950c5efa01d957783c79a37c19a2273ce33d133fa51bb68432b8535aad61cb14fbb61d173a167d318b2533eb2507b7a903
+DIST xf86-video-amdgpu-19.0.0.tar.bz2 439773 BLAKE2B 899d8a13b2d4dc4a3fc604bacf9f2f9798f717fa6f7b602c7ee0308b2ef6ad41d49945eefdbb682b1ebe96d63e9789ad0e420180452e37f68ab7e8e35d80c434 SHA512 6a30fc03185816307f16693cd6b07f13694ca1b6b1327c58a951bccc8082f112bb768ab610229dc1040617eef860fc1ab17a7e6bf635c5a4e454e252f3addca8
EBUILD xf86-video-amdgpu-18.1.0.ebuild 543 BLAKE2B a0904e1b4c2dde86b3351392d458f6e09af39e81c6acefabb93a6a649578513be89320b99fe5f9246274c9deffe4fdd0522c8c6a4bf36ecba73e92f35a95aef9 SHA512 51633297c6dbad33da0a85a4162c5d6d5b65a94a14771a3f6a7776fccd13fc681abe263b5b8db46d48cd68ebeba6be361259563c77d967455f9a25c243392573
-EBUILD xf86-video-amdgpu-9999.ebuild 545 BLAKE2B aeaff4669e9966baec9c08b8eeec09490de3afeb5f766c86538448e7ac51f59d5c2506b89a7cf2a5315ac44fd0d4ed63e977cff401e46501de7b415fe1d952ab SHA512 bec75803e95688d7f9f959c1deb23990203fae91c16a06c7fd43b643a688d360ab50eed180ca69661c8cf715e4df0806f07470490810beb0207b36eb3f8f89cc
+EBUILD xf86-video-amdgpu-19.0.0.ebuild 519 BLAKE2B cdc81a08032965ed66038a0ad6386192dda0fd82150461081bd669352ba6cfb2abf36e94c8e43b46e16f3000582e1570d4e95c04eff3d75b194cc8143b6c0282 SHA512 92969acde37127488c1efe3dd8ed6bb7ab384be1f8e14df9e2b70f87b97d5197a24ea2485660b82089218bc26228f6f9f1eab5f5727f726a88c73fe0ed651987
+EBUILD xf86-video-amdgpu-9999.ebuild 519 BLAKE2B cdc81a08032965ed66038a0ad6386192dda0fd82150461081bd669352ba6cfb2abf36e94c8e43b46e16f3000582e1570d4e95c04eff3d75b194cc8143b6c0282 SHA512 92969acde37127488c1efe3dd8ed6bb7ab384be1f8e14df9e2b70f87b97d5197a24ea2485660b82089218bc26228f6f9f1eab5f5727f726a88c73fe0ed651987
MISC metadata.xml 230 BLAKE2B 70bf59e64305ef14908197f2aa7ffbc1769ade265097da68e001245451658af5921760c91cb74aae717543ea0017e2471fd94bfc5c4c447d2d60e2c23aa3b007 SHA512 d7a2643abd1904cc5ff4d91cbb6f1baeb7f75fd1db542c5e14f19412f4f0bd4b903f8e703a7662ba7482c79dac5529057760b6427599d35e0842755fd946e057
diff --git a/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-19.0.0.ebuild b/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-19.0.0.ebuild
new file mode 100644
index 000000000000..4040501730a7
--- /dev/null
+++ b/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-19.0.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+XORG_DRI="always"
+inherit xorg-3
+
+if [[ ${PV} == 9999* ]]; then
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Accelerated Open Source driver for AMDGPU cards"
+
+IUSE="udev"
+
+RDEPEND=">=x11-libs/libdrm-2.4.89[video_cards_amdgpu]
+ x11-base/xorg-server[glamor(-)]
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ XORG_CONFIGURE_OPTIONS=(
+ --enable-glamor
+ $(use_enable udev)
+ )
+}
diff --git a/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-9999.ebuild b/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-9999.ebuild
index 2fcd2628b398..4040501730a7 100644
--- a/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-9999.ebuild
+++ b/x11-drivers/xf86-video-amdgpu/xf86-video-amdgpu-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
XORG_DRI="always"
-inherit xorg-2
+inherit xorg-3
if [[ ${PV} == 9999* ]]; then
SRC_URI=""
@@ -20,10 +20,9 @@ RDEPEND=">=x11-libs/libdrm-2.4.89[video_cards_amdgpu]
udev? ( virtual/libudev:= )"
DEPEND="${RDEPEND}"
-src_configure() {
+pkg_setup() {
XORG_CONFIGURE_OPTIONS=(
--enable-glamor
$(use_enable udev)
)
- xorg-2_src_configure
}
diff --git a/x11-drivers/xf86-video-ati/Manifest b/x11-drivers/xf86-video-ati/Manifest
index 47298b3ea0c5..1f11c047ba23 100644
--- a/x11-drivers/xf86-video-ati/Manifest
+++ b/x11-drivers/xf86-video-ati/Manifest
@@ -1,4 +1,6 @@
DIST xf86-video-ati-18.1.0.tar.bz2 891953 BLAKE2B 9092554c708b583f9b99a6788104a1e9420537fbbeaaaa6ae7e82be2a2299ad834365d00f8b146ce845afb5e2a08d3de3da591143eff63d4fb34c7040251f443 SHA512 7a58c9a6cb4876bd2ff37d837372b4e360e81fec7de6a6c7a48d70a5338d62745f734f5d4207f30aa368ff2d9ef44f5f1ef36afd73802a618998c16fe395ed53
+DIST xf86-video-ati-19.0.0.tar.bz2 901467 BLAKE2B 727581b205dd02995a9da2114d5a300e06172b1ee0fb02ea273d2fcf97dbc8cffea6ea6f12d8c6ed5a4a185a972ee4f007309e7331ca17ec0d2658df76aa349c SHA512 0674c8befa926fd3b431ce80d90f2cd0de17314efe7fd3a5ed0d78018d6cd32625b514bf68436a47eb15e5ad4b50317f3c09fd687b77e69a067d1210ee459827
EBUILD xf86-video-ati-18.1.0.ebuild 879 BLAKE2B 71c0bf60d4faaf01cb2cc14d8a148ef9874f01a6100cfd0e6bad53011a76740b69b6da3090534d2f2103f2cfa6f06a10164a5131034fb7c4de733424397d633f SHA512 fd8b17c4601cde0b50762c72d123ab41d7021779e9aeb34df4b866cdaca0fdb4d8708f727833c2a2b0594fc306f24d0a4923dedecf6502e9e66e4422fee5df4a
-EBUILD xf86-video-ati-9999.ebuild 886 BLAKE2B 5b49fe83a653d882e82961de207869a019e4d364a8d150e15fe90734f540a5a49a7cd99f5ef8f06d357d000510c29599f6f20ccacfce489611c767b202f22adb SHA512 2983159bb106b1ef9e46afc717f5641b3adf090df31658a1204c63f10cb9036c1f1c8d7e7f1a87ee43c213f44da1c9bb6117a405f6156cfc3376e5346a36cc82
+EBUILD xf86-video-ati-19.0.0.ebuild 860 BLAKE2B 7cfc2e6c0865b774e6a8ad4ea320e77d92d8ab2d35a0f0631e065ac8086b90ad40e34eaf6aad12d65ad87f1af8033f6ec2380d485032d422d42c6c86a2e9a798 SHA512 4850f59267108c29c2846b1b465c08e15a2d7717bb8b71267a67c236baa7e7a0d9941ceef442f9d419fcee99a60af2d64c70723a9a61d65818a02982736aae7d
+EBUILD xf86-video-ati-9999.ebuild 860 BLAKE2B 7cfc2e6c0865b774e6a8ad4ea320e77d92d8ab2d35a0f0631e065ac8086b90ad40e34eaf6aad12d65ad87f1af8033f6ec2380d485032d422d42c6c86a2e9a798 SHA512 4850f59267108c29c2846b1b465c08e15a2d7717bb8b71267a67c236baa7e7a0d9941ceef442f9d419fcee99a60af2d64c70723a9a61d65818a02982736aae7d
MISC metadata.xml 308 BLAKE2B b9e4150ed35f39b333f5ba4de65f52d82c50e5a5d1b3ca46f14b8a9a5d0ae12ad461f0f376a93d7312a7e4b2ec7a7529e137b0eada1b85f1db643739083cf20c SHA512 2f2c9a682e7aa5c413561df59a02c5dc7f77da6eae4513e93196b7c76d0ca9d76dffc5c644e77396afaa86f922947ed1cccdd133d161f1c441a28554eec68708
diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-19.0.0.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-19.0.0.ebuild
new file mode 100644
index 000000000000..bcca1714ec2f
--- /dev/null
+++ b/x11-drivers/xf86-video-ati/xf86-video-ati-19.0.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+XORG_DRI=always
+inherit linux-info xorg-3
+
+if [[ ${PV} == 9999* ]]; then
+ SRC_URI=""
+else
+ KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+fi
+
+DESCRIPTION="ATI video driver"
+HOMEPAGE="https://www.x.org/wiki/ati/"
+
+IUSE="+glamor udev"
+
+RDEPEND=">=x11-libs/libdrm-2.4.89[video_cards_radeon]
+ >=x11-libs/libpciaccess-0.8.0
+ glamor? ( x11-base/xorg-server[glamor] )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto"
+
+pkg_pretend() {
+ if use kernel_linux ; then
+ if kernel_is -ge 3 9; then
+ CONFIG_CHECK="~!DRM_RADEON_UMS ~!FB_RADEON"
+ else
+ CONFIG_CHECK="~DRM_RADEON_KMS ~!FB_RADEON"
+ fi
+ fi
+ check_extra_config
+}
+
+pkg_setup() {
+ XORG_CONFIGURE_OPTIONS=(
+ $(use_enable glamor)
+ $(use_enable udev)
+ )
+}
diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-9999.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-9999.ebuild
index 58a78866021e..bcca1714ec2f 100644
--- a/x11-drivers/xf86-video-ati/xf86-video-ati-9999.ebuild
+++ b/x11-drivers/xf86-video-ati/xf86-video-ati-9999.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
XORG_DRI=always
-inherit linux-info xorg-2
+inherit linux-info xorg-3
if [[ ${PV} == 9999* ]]; then
SRC_URI=""
@@ -35,10 +35,9 @@ pkg_pretend() {
check_extra_config
}
-src_configure() {
+pkg_setup() {
XORG_CONFIGURE_OPTIONS=(
$(use_enable glamor)
$(use_enable udev)
)
- xorg-2_src_configure
}