From 7963b67b7bbee8240d0ce52a7e4b056f7db64b7c Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Sat, 30 Jan 2016 13:18:04 +0100 Subject: x11-drivers/nvidia-drivers: Update 358 branch for bug #562910. Clean up 361 branch ebuild. Package-Manager: portage-2.2.27 --- x11-drivers/nvidia-drivers/Manifest | 1 + .../nvidia-drivers/nvidia-drivers-358.16-r2.ebuild | 538 +++++++++++++++++++++ .../nvidia-drivers/nvidia-drivers-361.18-r2.ebuild | 13 +- 3 files changed, 544 insertions(+), 8 deletions(-) create mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r2.ebuild (limited to 'x11-drivers') diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index 00809e0f7e19..39d279aa2d1b 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -43,4 +43,5 @@ DIST NVIDIA-Linux-x86_64-96.43.23-pkg2.run 15962375 SHA256 ce8d8253e7dab7da63fbd DIST nvidia-settings-304.131.tar.bz2 1480447 SHA256 d36d2d1ae7c1bb72cd18e713470546d2aa7057624b1f61319daf559a94054d29 SHA512 9269f54f87581e29e6d7cabeaf989c70cb27aa55f6b8f5f1c71b8a14401326d06ea194710722b41283cca56f5808b90a9b1fb12158d48c6332cce15a701c5796 WHIRLPOOL be8e38a09a0bfa40267b9cdae2800a9ef00a89e28e618b743b7acb0cd9ece4b242b74ced32018d735989592300b49b2ee683caa11a1e161bcecf070a58952dfd DIST nvidia-settings-340.96.tar.bz2 1551011 SHA256 af7303b070a4b41e388a7be6dfae17f020a5cc197170d4815b9a291a3a98aaff SHA512 fc6096338e48c347e4e854d06e8f63d8edb6527953996e63f3f70619be59d0436176547b5197ef30d18a82cf5b58dd775dcca4a2624107b63cce1ae589f2b154 WHIRLPOOL e7266ca0395aa1a5666a43bf6e54e258706d4e76bfd15079485e2379b332d2d6ba0c97b32e49f5b041340bb2d3c0e11dace702754ffc952c149557e0ab9d820a DIST nvidia-settings-352.79.tar.bz2 1570988 SHA256 1f103cbfe162281355c484a5c3ef9ac1bb0528acba2d229111da7e58cf18f217 SHA512 d56e20844bf71d55e51aebca38e922a2985fdbd4edab29a07f9a4a8a0b883ca469c3b949f048837ec77464da90e2d485e5efcd314afc2810c44ad7dc497b53fe WHIRLPOOL 51999a744f6b3e36c4d12f841c136a754533de09c1802f60392666392beeccbb0bf1489269cac33b12ccb061554609d3dc8d8ffbf45b4cb860108fd9f86e2139 +DIST nvidia-settings-358.16.tar.bz2 1571104 SHA256 8cd78df738a824e282771755ae9a41d5b194b15f9df96b9fd23fcf3005967d35 SHA512 0438aa2599e98f68a04c9f663f4ef9b05092df512fbca40ad0fe17e25ca4d940d02cc55e9fd44a2551950a2a30782d1e48553c4bebd071bfff280869a6dde556 WHIRLPOOL 60b7e9abba3163ac877a3a9d944cf72352e28d2fd1a3af0996d3b7d40ef48be7f057c1063f9ca61c693cbf1bff57be61704f13d941220bf74a8049954f87154d DIST nvidia-settings-361.18.tar.bz2 1570821 SHA256 5e821bf9c92931da7c4ac2cac4c61a83e7f74641902935232cad747511fab363 SHA512 1a19ebb6773b53564a7996c8f963c161df599ed8ca577f505fbed1181f144a5e53fa970e3fee7fceed16909bd012f74f9af74080314ae9de9356894df9b1be4d WHIRLPOOL 23ff413900fca81427d755ecb5889dbb69033e101cf7c2f3edea4971defd03aedee95f5488779f634c690c05bfabe0763baf3dbf6377de950cabe48ad9c72684 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r2.ebuild new file mode 100644 index 000000000000..9f0cd78d4503 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r2.ebuild @@ -0,0 +1,538 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user udev + +NV_URI="http://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? ( ftp://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 strip" +EMULTILIB_PKG="true" + +IUSE="acpi multilib kernel_FreeBSD kernel_linux +kms pax_kernel static-libs +tools gtk3 +X uvm" +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 + ) +" +DEPEND=" + ${COMMON} + kernel_linux? ( virtual/linux-sources ) +" +RDEPEND=" + ${COMMON} + acpi? ( sys-power/acpid ) + tools? ( !media-video/nvidia-settings ) + X? ( + =x11-libs/libvdpau-0.3-r1 + multilib? ( + >=x11-libs/libX11-1.6.2[abi_x86_32] + >=x11-libs/libXext-1.3.2[abi_x86_32] + ) + ) +" + +QA_PREBUILT="opt/* usr/lib*" + +S=${WORKDIR}/ + +pkg_pretend() { + 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 4; then + ewarn "Gentoo supports kernels which are supported by NVIDIA" + ewarn "which are limited to the following kernels:" + ewarn " 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 + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins ${NV_OBJ}/nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + 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.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + use tools && doman "${NV_MAN}/nvidia-settings.1.gz" + doman "${NV_MAN}/nvidia-cuda-mps-control.1.gz" + 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.gz + doman nvidia-modprobe.1.gz + doman nvidia-persistenced.1.gz + 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)" \ + PREFIX=/usr \ + NV_USE_BUNDLED_LIBJANSSON=0 \ + install + + use static-libs && \ + dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a + + insinto /usr/include/NVCtrl + doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h + + 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 || \ + newicon ${NV_OBJ}/nvidia-settings.png ${PN}-settings.png + + domenu "${FILESDIR}"/${PN}-settings.desktop + + exeinto /etc/X11/xinit/xinitrc.d + doexe "${FILESDIR}"/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" + + readme.gentoo_create_doc +} + +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 libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + NV_GLX_LIBRARIES=( + "libEGL.so 1 ${GL_ROOT}" + "libEGL_nvidia.so 0 ${GL_ROOT}" + "libGL.so ${NV_SOVER} ${GL_ROOT}" + "libGLESv1_CM.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-fbc.so ${NV_SOVER}" + "libnvidia-glcore.so ${NV_SOVER}" + "libnvidia-glsi.so ${NV_SOVER}" + "libnvidia-ifr.so ${NV_SOVER}" + "libnvidia-opencl.so ${NV_SOVER}" + "libvdpau.so ${NV_SOVER} ${GL_ROOT}" + "libvdpau_nvidia.so ${NV_SOVER}" + "libvdpau_trace.so ${NV_SOVER} ${GL_ROOT}" + ) + 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 ${libdir}/${NV_LIB} + done + + # GLES v2 library is special + insinto ${GL_ROOT} + doexe ${libdir}/libGLESv2.so.${PV} + dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2 + dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so + 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-361.18-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-361.18-r2.ebuild index b2f24108bfbc..329f634ceab5 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-361.18-r2.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-361.18-r2.ebuild @@ -29,7 +29,7 @@ KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" RESTRICT="bindist mirror strip" EMULTILIB_PKG="true" -IUSE="acpi +driver gtk2 gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm +X" +IUSE="acpi +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm +X" REQUIRED_USE=" tools? ( X ) static-libs? ( tools ) @@ -42,9 +42,7 @@ COMMON=" dev-libs/atk dev-libs/glib:2 dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) + gtk3? ( x11-libs/gtk+:3 ) x11-libs/cairo x11-libs/gdk-pixbuf[X] x11-libs/gtk+:2 @@ -368,6 +366,9 @@ src_install() { use static-libs && \ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a + insinto /usr/include/NVCtrl + doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h + insinto /usr/share/nvidia/ doins nvidia-application-profiles-${PV}-key-documentation @@ -375,9 +376,6 @@ src_install() { newins \ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - # There is no icon in the FreeBSD tarball. use kernel_FreeBSD || \ newicon ${NV_OBJ}/nvidia-settings.png ${PN}-settings.png @@ -389,7 +387,6 @@ src_install() { fi dobin ${NV_OBJ}/nvidia-bug-report.sh - #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist if has_multilib_profile && use multilib; then local OABI=${ABI} -- cgit v1.2.3-65-gdbad