diff options
author | David Seifert <soap@gentoo.org> | 2021-02-08 09:57:19 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-02-08 09:57:19 +0100 |
commit | bbde4ed769adaabba6eab841b777ee4f2524b068 (patch) | |
tree | 3ab2c66cbe432b88dc8ca0a7b00cf66f70744982 /x11-drivers/nvidia-drivers | |
parent | x11-drivers/nvidia-drivers: Version bump to 450.102.04 (diff) | |
download | gentoo-bbde4ed769adaabba6eab841b777ee4f2524b068.tar.gz gentoo-bbde4ed769adaabba6eab841b777ee4f2524b068.tar.bz2 gentoo-bbde4ed769adaabba6eab841b777ee4f2524b068.zip |
x11-drivers/nvidia-drivers: 450.102.04 remove dead code
* Remove FreeBSD support
* Remove eselect-opengl codepaths
* Remove GTK2 dependency
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r-- | x11-drivers/nvidia-drivers/Manifest | 1 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04.ebuild | 365 |
2 files changed, 136 insertions, 230 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index c29ae8fbbcef..325dec96ed53 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -2,7 +2,6 @@ DIST NVIDIA-FreeBSD-x86-390.138.tar.gz 65940848 BLAKE2B ea40a0289012425ee1fa1c74 DIST NVIDIA-FreeBSD-x86_64-390.138.tar.gz 65280213 BLAKE2B 36d5651ceaf90cefcf9e844f8f5810ac42bebca2ca47318b27606c1401d8f343fc7b2619a5405dee9d5d64ec98379b0582f6d5fe5dd4df1269ba48332a6a5ec2 SHA512 fb61e19010826e5c2e403ecc12e19ee28517682599100804d74be92a9e3c6688b51dafa6c6703a5a0d080b0ca16495792fec3badf9cab959321cc401e72520a3 DIST NVIDIA-FreeBSD-x86_64-435.21.tar.gz 64153630 BLAKE2B fee655cc843c004ac0c1ec85b9417292016a013136e04ad047d2513edbdc7c732561d6bcc4603c658905972dce6618de49d4d6ac583e84fdf212cf45397b48c1 SHA512 2c160c06ca58e3009deb1ba4a4a28d39419e251ced3bfa9a442942f9cce17003d67e8a8bfa23036d3916cc0e66f4bff0fbedaae73db6f10b995235a56d7eba7c DIST NVIDIA-FreeBSD-x86_64-440.100.tar.gz 82523267 BLAKE2B 9d8eddcf3a58787a03fab207c197d722ff047f8bc840ea41e8d38815fbfab9e54759b9fbeaa26e3d147f54cb4a510eec421708d3bbb21197922f4dc175ed6df5 SHA512 96f57e1f308f0e5f00ef09a128e91a68ac55033893000e84cf4ff1a910a88798743c911b3effcc26c3f27ae224b733d8c2f87e9ec0596149f65ad7bcd71edbc5 -DIST NVIDIA-FreeBSD-x86_64-450.102.04.tar.gz 83102763 BLAKE2B 178104973cf2b0afebd04445bfb9d155c1fd6891d6ee627a27951a53677b85a7106aa32514b51d38203642daec6927ff6c31eba5a2101e45bd73cf4022f79173 SHA512 86273a7ed926b59bdbc035d8b23adb27280b5a5b012699733aaf7f80ea31faf7b6278b7f159250bc27b3bd07a0a84107f0e0333ff9d50a0ca2ed8e1b63a78d6d DIST NVIDIA-FreeBSD-x86_64-450.80.02.tar.gz 83040706 BLAKE2B d97bae80f6fdcec12fd12af0296f9ba44487cc83c86c14bc9f17d52e0e81107e1eaddd411d06d1bfd27c73bcf71300f7f49218d2a031540c0b42cd62998ef9aa SHA512 6dca92f20102a0432c6b92b7897a2ff5ec3da234af72907539026e18b1da55fc3ae01dc875be07ce9cae808ae4f9c08d2a2af1171db038c37bbba6ca9d03cf3a DIST NVIDIA-FreeBSD-x86_64-455.45.01.tar.gz 116070033 BLAKE2B 4a724ce58fb7164d12b50d1388a2a471903f4aa834cf606adf572e667ef7c1fec7bc291310fdca2d271709fed017b8f361a39bc495d616e6056a4c0afa2443b5 SHA512 4999911944f76fa759126308ac48d0a770e57966c7783e02370f45d9451a50d6015642b385465d4fc800df8c35655b78d90f7c9a8df82bdf81db8be12eacbe87 DIST NVIDIA-FreeBSD-x86_64-460.27.04.tar.gz 103234112 BLAKE2B a631425c00240dabdd1bd4dcc18945c4216352667cdd0c01b465486024cea215ee2423773ead2e22246337a2387b54ae2e16775b0727d57304b53f7ce6648ad7 SHA512 1308f14ae1100471a5aabece85403772cdd1abac44a725c53d33d9f0ee27a83dbd2088c60662f44a6f7d1fe91b43311b767790dcc5787c50546ffbabb62ded1a diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04.ebuild index db3a3952632a..554a7a80f110 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04.ebuild @@ -2,46 +2,40 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 + inherit desktop flag-o-matic linux-info linux-mod multilib-minimal \ - nvidia-driver portability systemd toolchain-funcs unpacker udev + nvidia-driver systemd toolchain-funcs unpacker udev -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}" +ARM64_NV_PACKAGE="NVIDIA-Linux-aarch64-${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 - ) -" + )" EMULTILIB_PKG="true" -KEYWORDS="-* ~amd64" + LICENSE="GPL-2 NVIDIA-r2" SLOT="0/${PV%%.*}" - -IUSE="compat +driver gtk3 kernel_FreeBSD kernel_linux +kms +libglvnd multilib static-libs +tools uvm wayland +X" +# TODO: for arm64, keyword virtual/opencl on arm64 +KEYWORDS="-* ~amd64" +IUSE="compat +driver +kms multilib static-libs +tools uvm wayland +X" REQUIRED_USE=" tools? ( X ) - static-libs? ( tools ) -" + static-libs? ( tools )" COMMON=" - driver? ( kernel_linux? ( acct-group/video ) ) - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + driver? ( acct-group/video ) tools? ( dev-libs/atk dev-libs/glib:2 dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) x11-libs/cairo x11-libs/gdk-pixbuf - x11-libs/gtk+:2 + x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXrandr @@ -50,20 +44,17 @@ COMMON=" x11-libs/pango[X] ) X? ( - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] app-misc/pax-utils - libglvnd? ( - media-libs/libglvnd[X,${MULTILIB_USEDEP}] - ) - ) -" + media-libs/libglvnd[X,${MULTILIB_USEDEP}] + >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] + )" DEPEND=" ${COMMON} - kernel_linux? ( virtual/linux-sources ) - tools? ( sys-apps/dbus ) -" + virtual/linux-sources + tools? ( sys-apps/dbus )" RDEPEND=" ${COMMON} + net-libs/libtirpc uvm? ( >=virtual/opencl-3 ) wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] ) X? ( @@ -71,23 +62,20 @@ RDEPEND=" >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] - ) - kernel_linux? ( net-libs/libtirpc ) -" + )" + QA_PREBUILT="opt/* usr/lib*" -S=${WORKDIR}/ -PATCHES=( - "${FILESDIR}"/${PN}-440.26-locale.patch -) -NV_KV_MAX_PLUS="5.10" +S="${WORKDIR}" +NV_KV_MAX_PLUS="5.11" CONFIG_CHECK=" !DEBUG_MUTEXES ~!I2C_NVIDIA_GPU ~!LOCKDEP ~DRM ~DRM_KMS_HELPER - ~SYSVIPC -" + ~SYSVIPC" + +PATCHES=( "${FILESDIR}"/${PN}-440.26-locale.patch ) pkg_pretend() { nvidia-driver_check @@ -100,7 +88,7 @@ pkg_setup() { export DISTCC_DISABLE=1 export CCACHE_DISABLE=1 - if use driver && use kernel_linux; then + if use driver; 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)" @@ -111,51 +99,18 @@ pkg_setup() { 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" + 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/')" - - if kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - fi - 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_configure() { - tc-export AR CC LD OBJCOPY - - default -} - src_prepare() { - local man_file - for man_file in "${NV_MAN}"/*1.gz; do - gunzip $man_file || die - done + gunzip *1.gz || die if use tools; then cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die @@ -164,29 +119,37 @@ src_prepare() { "${WORKDIR}"/nvidia-settings-linker.patch \ || die eapply "${WORKDIR}"/nvidia-settings-linker.patch + + # remove GTK2 support entirely (#592730) + sed -i \ + -e '/^GTK2LIB = /d;/INSTALL.*GTK2LIB/,+1d' \ + nvidia-settings-${PV}/src/Makefile || die fi default - if ! [ -f nvidia_icd.json ]; then + 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_configure() { + tc-export AR CC LD OBJCOPY + default +} + src_compile() { - 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 + pushd kernel >/dev/null || die + if use driver; then BUILD_TARGETS=module linux-mod_src_compile \ KERNELRELEASE="${KV_FULL}" \ src="${KERNEL_DIR}" fi + popd >/dev/null || die if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src/libXNVCtrl \ + emake -C nvidia-settings-${PV}/src/libXNVCtrl \ DO_STRIP= \ LIBDIR="$(get_libdir)" \ NVLD="$(tc-getLD)" \ @@ -194,9 +157,9 @@ src_compile() { OUTPUTDIR=. \ RANLIB="$(tc-getRANLIB)" - emake -C "${S}"/nvidia-settings-${PV}/src \ + emake -C nvidia-settings-${PV}/src \ DO_STRIP= \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ + GTK3_AVAILABLE=1 \ LIBDIR="$(get_libdir)" \ NVLD="$(tc-getLD)" \ NVML_ENABLED=0 \ @@ -223,7 +186,7 @@ donvidia() { # Get just the library name nv_LIBNAME=$(basename "${nv_LIB}") - if [[ "${nv_DEST}" ]]; then + if [[ -n ${nv_DEST} ]]; then exeinto ${nv_DEST} action="doexe" else @@ -236,7 +199,7 @@ donvidia() { # 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 + if [[ -n ${nv_SOVER} && ${nv_SOVER} != ${nv_LIBNAME} ]]; then dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} fi @@ -244,7 +207,7 @@ donvidia() { } src_install() { - if use driver && use kernel_linux; then + if use driver; then linux-mod_src_install # Add the aliases @@ -266,50 +229,38 @@ src_install() { 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} + donvidia libnvidia-cfg.so.${PV} # NVIDIA framebuffer capture library - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER} + donvidia libnvidia-fbc.so.${PV} # 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 + donvidia libnvcuvid.so.${PV} + donvidia libnvidia-encode.so.${PV} if use X; then # Xorg DDX driver - insinto /usr/$(get_libdir)/xorg/modules/drivers - doins ${NV_X11}/nvidia_drv.so + exeinto /usr/$(get_libdir)/xorg/modules/drivers + doexe nvidia_drv.so # Xorg GLX driver - donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \ + donvidia libglxserver_nvidia.so.${PV} \ /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/X11/xorg.conf.d + newins {,50-}nvidia-drm-outputclass.conf insinto /usr/share/glvnd/egl_vendor.d - doins ${NV_X11}/10_nvidia.json + doins 10_nvidia.json fi if use wayland; then insinto /usr/share/egl/egl_external_platform.d - doins ${NV_X11}/10_nvidia_wayland.json + doins 10_nvidia_wayland.json fi insinto /etc/vulkan/icd.d @@ -319,45 +270,39 @@ src_install() { doins nvidia_layers.json # OpenCL ICD for NVIDIA - if use kernel_linux; then - insinto /etc/OpenCL/vendors - doins ${NV_OBJ}/nvidia.icd - fi + insinto /etc/OpenCL/vendors + doins nvidia.icd # Helper Apps exeinto /opt/bin/ - if use X; then - doexe ${NV_OBJ}/nvidia-xconfig - fi + use X && doexe nvidia-xconfig - 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 + doexe nvidia-cuda-mps-control + doexe nvidia-cuda-mps-server + doexe nvidia-debugdump + doexe nvidia-persistenced + doexe nvidia-smi + + # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092) + doexe nvidia-modprobe + fowners root:video /opt/bin/nvidia-modprobe + fperms 4710 /opt/bin/nvidia-modprobe + dosym ../../opt/bin/nvidia-modprobe /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 if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ + emake -C nvidia-settings-${PV}/src/ \ + DESTDIR="${ED}" \ DO_STRIP= \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ + GTK3_AVAILABLE=1 \ + LIBDIR="${ED}/usr/$(get_libdir)" \ NV_USE_BUNDLED_LIBJANSSON=0 \ NV_VERBOSE=1 \ OUTPUTDIR=. \ @@ -365,10 +310,10 @@ src_install() { install if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a + dolib.a nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h + doins nvidia-settings-${PV}/src/libXNVCtrl/*.h fi insinto /usr/share/nvidia/ @@ -378,17 +323,14 @@ src_install() { 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 - + doicon 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 + dobin nvidia-bug-report.sh systemd_dounit *.service dobin nvidia-sleep.sh @@ -409,140 +351,105 @@ src_install() { 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 + newdoc README.txt README + dodoc NVIDIA_Changelog + doman nvidia-smi.1 + use X && doman nvidia-xconfig.1 + use tools && doman nvidia-settings.1 + doman nvidia-cuda-mps-control.1 readme.gentoo_create_doc dodoc supported-gpus.json docinto html - dodoc -r ${NV_DOC}/html/* + dodoc -r html/. } src_install-libs() { local inslibdir=$(get_libdir) - if use libglvnd; then - local GL_ROOT="/usr/$(get_libdir)" - else - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" - fi + local GL_ROOT="/usr/$(get_libdir)" local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" - local nv_libdir="${NV_OBJ}" + local nv_libdir="${S}" - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then - nv_libdir="${NV_OBJ}"/32 + if has_multilib_profile && [[ ${ABI} == "x86" ]]; then + nv_libdir="${S}"/32 fi if use X; then NV_GLX_LIBRARIES=( - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}" + "libEGL_nvidia.so.${PV} ${GL_ROOT}" + "libGLESv1_CM_nvidia.so.${PV} ${GL_ROOT}" + "libGLESv2_nvidia.so.${PV} ${GL_ROOT}" + "libGLX_nvidia.so.${PV} ${GL_ROOT}" "libOpenCL.so.1.0.0 ${CL_ROOT}" - "libcuda.so.${NV_SOVER}" - "libnvcuvid.so.${NV_SOVER}" - "libnvidia-compiler.so.${NV_SOVER}" - "libnvidia-eglcore.so.${NV_SOVER}" - "libnvidia-encode.so.${NV_SOVER}" - "libnvidia-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}" + "libcuda.so.${PV}" + "libnvcuvid.so.${PV}" + "libnvidia-compiler.so.${PV}" + "libnvidia-eglcore.so.${PV}" + "libnvidia-encode.so.${PV}" + "libnvidia-fbc.so.${PV}" + "libnvidia-glcore.so.${PV}" + "libnvidia-glsi.so.${PV}" + "libnvidia-glvkspirv.so.${PV}" + "libnvidia-ifr.so.${PV}" + "libnvidia-opencl.so.${PV}" + "libnvidia-ptxjitcompiler.so.${PV}" + "libvdpau_nvidia.so.${PV}" ) - if ! use libglvnd; then - NV_GLX_LIBRARIES+=( - "libEGL.so.$( [[ ${ABI} == "amd64" ]] && usex compat ${NV_SOVER} 1.1.0 || echo 1.1.0) ${GL_ROOT}" - "libGL.so.1.7.0 ${GL_ROOT}" - "libGLESv1_CM.so.1.2.0 ${GL_ROOT}" - "libGLESv2.so.2.1.0 ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLdispatch.so.0 ${GL_ROOT}" - "libOpenGL.so.0 ${GL_ROOT}" - ) - fi - if use wayland && [[ ${ABI} == "amd64" ]]; - then + if use wayland && [[ ${ABI} == "amd64" ]]; then NV_GLX_LIBRARIES+=( "libnvidia-egl-wayland.so.1.1.4" ) 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 + NV_GLX_LIBRARIES+=( + "libnvidia-ml.so.${PV}" + "libnvidia-tls.so.${PV}" + ) - if use kernel_linux && [[ ${ABI} == "amd64" ]]; - then + if [[ ${ABI} == "amd64" ]]; then NV_GLX_LIBRARIES+=( - "libnvidia-cbl.so.${NV_SOVER}" - "libnvidia-ngx.so.${NV_SOVER}" - "libnvidia-rtcore.so.${NV_SOVER}" - "libnvoptix.so.${NV_SOVER}" + "libnvidia-cbl.so.${PV}" + "libnvidia-ngx.so.${PV}" + "libnvidia-rtcore.so.${PV}" + "libnvoptix.so.${PV}" ) fi - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do - donvidia "${nv_libdir}"/${NV_LIB} + local nv_lib + for nv_lib in "${NV_GLX_LIBRARIES[@]}"; do + donvidia "${nv_libdir}"/${nv_lib} done fi } pkg_preinst() { - if use driver && use kernel_linux; then + if use driver; then linux-mod_pkg_preinst local videogroup="$(getent group video | cut -d ':' -f 3)" - if [ -z "${videogroup}" ]; then + 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 + "${ED}"/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 + rm -rf "${EROOT}"/usr/lib/opengl/nvidia/* || die # 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 + rm -f "${EROOT}"/etc/env.d/09nvidia || die } pkg_postinst() { - use driver && use kernel_linux && linux-mod_pkg_postinst + use driver && linux-mod_pkg_postinst readme.gentoo_print_elog @@ -570,9 +477,9 @@ pkg_postinst() { elog "Set the NVreg_TemporaryFilePath kernel module parameter to a" elog "suitable path in case the default of /tmp does not work for you" elog "For more information see:" - elog "${ROOT}/usr/share/doc/${PF}/html/powermanagement.html" + elog "${EROOT}/usr/share/doc/${PF}/html/powermanagement.html" } pkg_postrm() { - use driver && use kernel_linux && linux-mod_pkg_postrm + use driver && linux-mod_pkg_postrm } |