logo

overlay

Personnal gentoo overlay
commit: 324a80328d33ecc2493aef13e2b8df91df4f8a18
parent: a6aad1f2cb58da91611225f803633c2cafbaedd3
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 13 Nov 2017 14:55:21 +0100

Cleaning of old ebuilds or forgotten ebuilds from games-rhythm

Diffstat:

app-portage/gentoolkit/Manifest | 1-
app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch | 37-------------------------------------
app-portage/gentoolkit/files/0.3.0.9-equery-strip-XXXFLAGS.patch | 27---------------------------
app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-526400.patch | 26--------------------------
app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-1.patch | 26--------------------------
app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-2.patch | 30------------------------------
app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild | 88-------------------------------------------------------------------------------
app-portage/gentoolkit/metadata.xml | 14--------------
games-rhythm/oshu/Manifest | 1-
games-rhythm/oshu/metadata.xml | 8--------
games-rhythm/oshu/oshu-1.3.0.ebuild | 11-----------
x11-drivers/nvidia-drivers/Manifest | 12------------
x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist | 1-
x11-drivers/nvidia-drivers/files/95-nvidia-settings | 2--
x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 | 2--
x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch | 11-----------
x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch | 13-------------
x11-drivers/nvidia-drivers/files/nvidia-169.07 | 14--------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-331.13-pax-usercopy.patch | 52----------------------------------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-337.12-pax-constify.patch | 25-------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch | 25-------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch | 47-----------------------------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch | 102-------------------------------------------------------------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-361.28-pax.patch | 351-------------------------------------------------------------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch | 398-------------------------------------------------------------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-367.35-profiles-rc.patch | 11-----------
x11-drivers/nvidia-drivers/files/nvidia-drivers-367.44-profiles-rc.patch | 11-----------
x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch | 11-----------
x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch | 17-----------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch | 54------------------------------------------------------
x11-drivers/nvidia-drivers/files/nvidia-drivers-settings.desktop | 7-------
x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf | 8--------
x11-drivers/nvidia-drivers/files/nvidia-persistenced.init | 25-------------------------
x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf | 3---
x11-drivers/nvidia-drivers/files/nvidia-settings.desktop | 7-------
x11-drivers/nvidia-drivers/files/nvidia-smi.init | 25-------------------------
x11-drivers/nvidia-drivers/files/nvidia-udev.sh | 17-----------------
x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 | 20--------------------
x11-drivers/nvidia-drivers/files/nvidia-uvm.conf | 3---
x11-drivers/nvidia-drivers/files/nvidia.udev-rule | 6------
x11-drivers/nvidia-drivers/metadata.xml | 27---------------------------
x11-drivers/nvidia-drivers/nvidia-drivers-370.28.ebuild | 551-------------------------------------------------------------------------------
x11-drivers/nvidia-drivers/nvidia-drivers-375.26.ebuild | 554-------------------------------------------------------------------------------
43 files changed, 0 insertions(+), 2681 deletions(-)

diff --git a/app-portage/gentoolkit/Manifest b/app-portage/gentoolkit/Manifest @@ -1 +0,0 @@ -DIST gentoolkit-0.3.0.9.tar.gz 3194703 SHA256 c660d150dfccbaea6f291fb7fc2659c8e0e38eaebe6e68f92dee728c8c7e320d SHA512 75b2d15b2b9ed08055840b56b239ed5d63838a10e8d31ec3ed8822cf1d3ef32841609763433736e17f93a5fdd293ccbda4a3dfa0f007241321aec3333bcde847 WHIRLPOOL 5e9dc038c161361eb2dd8f0cd17e8efaa41183a281d6fcf620c1631c6da661673d085c60572424cd48504222c29613473591f8dd276792ab96ba3cfda88f1fe1 diff --git a/app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch b/app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch @@ -1,37 +0,0 @@ -From 9a33ceffe2e0045bf75b1209a90e9a53530d4e0d Mon Sep 17 00:00:00 2001 -From: Tobias Heinlein <keytoaster@gentoo.org> -Date: Sat, 19 Apr 2014 18:39:03 +0200 -Subject: [PATCH 01/14] equery: Don't always print the license field (bug - #508114). - ---- - pym/gentoolkit/equery/meta.py | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py -index e2d2124..d3342cd 100644 ---- a/pym/gentoolkit/equery/meta.py -+++ b/pym/gentoolkit/equery/meta.py -@@ -373,12 +373,13 @@ def call_format_functions(best_match, matches): - useflags = format_useflags(best_match.metadata.use()) - print_sequence(format_list(useflags)) - -- _license = best_match.environment(["LICENSE"]) -- if QUERY_OPTS["license"]: -- _license = format_list(_license) -- else: -- _license = format_list(_license, "License: ", " " * 13) -- print_sequence(_license) -+ if QUERY_OPTS["license"] or not got_opts: -+ _license = best_match.environment(["LICENSE"]) -+ if QUERY_OPTS["license"]: -+ _license = format_list(_license) -+ else: -+ _license = format_list(_license, "License: ", " " * 13) -+ print_sequence(_license) - - if QUERY_OPTS["stablereq"]: - # Get {<Package 'dev-libs/glib-2.20.5'>: [u'ia64', u'm68k', ...], ...} --- -2.1.3 - diff --git a/app-portage/gentoolkit/files/0.3.0.9-equery-strip-XXXFLAGS.patch b/app-portage/gentoolkit/files/0.3.0.9-equery-strip-XXXFLAGS.patch @@ -1,27 +0,0 @@ -From 1351a6b8f09ab2f4a7469d6e2be874b56a31d3c4 Mon Sep 17 00:00:00 2001 -From: Brian Dolbec <dolsen@gentoo.org> -Date: Thu, 28 Aug 2014 20:56:22 -0700 -Subject: [PATCH 03/14] equery has: Add CFLAGS, CXXFLAGS, LDFLAGS to strip the - leading '-' - -Strip the leading '-' from values found in these files. ---- - pym/gentoolkit/equery/has.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pym/gentoolkit/equery/has.py b/pym/gentoolkit/equery/has.py -index 15c60b9..180f7f0 100644 ---- a/pym/gentoolkit/equery/has.py -+++ b/pym/gentoolkit/equery/has.py -@@ -74,7 +74,7 @@ def query_in_env(query, env_var, pkg): - """Check if the query is in the pkg's environment.""" - - try: -- if env_var in ("USE", "IUSE"): -+ if env_var in ("USE", "IUSE", "CFLAGS", "CXXFLAGS", "LDFLAGS"): - results = set( - [x.lstrip("+-") for x in pkg.environment(env_var).split()] - ) --- -2.1.3 - diff --git a/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-526400.patch b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-526400.patch @@ -1,26 +0,0 @@ -From 91023ef967c680db9307b5c58762e8872346167e Mon Sep 17 00:00:00 2001 -From: Paul Varner <fuzzyray@gentoo.org> -Date: Fri, 24 Oct 2014 12:59:59 -0500 -Subject: [PATCH 06/14] Fix gawk warning escape sequence \. treated as plain. - Bug 526400 - ---- - bin/revdep-rebuild.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/revdep-rebuild.sh b/bin/revdep-rebuild.sh -index 3179a83..01a0454 100755 ---- a/bin/revdep-rebuild.sh -+++ b/bin/revdep-rebuild.sh -@@ -842,7 +842,7 @@ main_checks() { - done < <( - # Regexify LD_LIBRARY_MASK. Exclude it from the search. - LD_LIBRARY_MASK="${LD_LIBRARY_MASK//$'\n'/|}" -- gawk -v ldmask="(${LD_LIBRARY_MASK//./\\\.})" ' -+ gawk -v ldmask="(${LD_LIBRARY_MASK//./\\\\.})" ' - /no version information available/ && $0 !~ ldmask { - gsub(/[()]/, "", $NF) - if (seen[$NF]++) next --- -2.1.3 - diff --git a/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-1.patch b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-1.patch @@ -1,26 +0,0 @@ -From c5baf551987e2fb412caa396ae34f7f4341ad819 Mon Sep 17 00:00:00 2001 -From: slis <lis.slawek@gmail.com> -Date: Mon, 17 Mar 2014 07:42:01 +0100 -Subject: [PATCH 1/2] Fix #504654 - problem with encoding for non-ascii - filenames - ---- - pym/gentoolkit/revdep_rebuild/stuff.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py -index cc3da7b..7a8373d 100644 ---- a/pym/gentoolkit/revdep_rebuild/stuff.py -+++ b/pym/gentoolkit/revdep_rebuild/stuff.py -@@ -22,7 +22,7 @@ def call_program(args): - subp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = subp.communicate() - stdout = stdout.decode('utf-8') -- return str(stdout) -+ return stdout - - - def scan(params, files, max_args, logger): --- -1.9.1 - diff --git a/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-2.patch b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-2.patch @@ -1,30 +0,0 @@ -From ae20dbd7f2ef2810d3150e870ece6f5b7278f676 Mon Sep 17 00:00:00 2001 -From: slis <lis.slawek@gmail.com> -Date: Mon, 17 Mar 2014 07:48:19 +0100 -Subject: [PATCH 2/2] Fix for non-existing libraries version - (https://bugs.gentoo.org/show_bug.cgi?id=504654#c5) - ---- - pym/gentoolkit/revdep_rebuild/analyse.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py -index d7b210b..bd1b6b7 100644 ---- a/pym/gentoolkit/revdep_rebuild/analyse.py -+++ b/pym/gentoolkit/revdep_rebuild/analyse.py -@@ -185,7 +185,11 @@ class LibCheck(object): - scanned_files = self.scanned_files - found_libs = {} - for bits in self.searchbits: -- scanned = scanned_files[bits] -+ try: -+ scanned = scanned_files[bits] -+ except KeyError: -+ self.logger.debug('There are no %s-bit libraries'%bits) -+ continue - self.logger.debug(self.smsg % bits) - self.setlibs(sorted(scanned), bits) - for soname, filepaths in scanned.items(): --- -1.9.1 - diff --git a/app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild b/app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild @@ -1,88 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=(python{2_7,3_4} pypy) -PYTHON_REQ_USE="xml(+),threads(+)" - -inherit distutils-r1 eutils - -DESCRIPTION="Collection of administration scripts for Gentoo" -HOMEPAGE="https://www.gentoo.org/proj/en/portage/tools/index.xml" -SRC_URI="mirror://gentoo/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -IUSE="" - -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -DEPEND="sys-apps/portage[${PYTHON_USEDEP}]" -RDEPEND="${DEPEND} - !<=app-portage/gentoolkit-dev-0.2.7 - sys-apps/gawk - sys-apps/gentoo-functions" - -PATCHES=( - "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-1.patch - "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-2.patch - "${FILESDIR}"/${PV}-equery-508114.patch - "${FILESDIR}"/${PV}-equery-strip-XXXFLAGS.patch - "${FILESDIR}"/${PV}-revdep-rebuild-526400.patch -) - -python_prepare_all() { - epatch "${FILESDIR}/0.3.1-setup.py-print.patch" - python_setup - echo VERSION="${PVR}" "${PYTHON}" setup.py set_version - VERSION="${PVR}" "${PYTHON}" setup.py set_version - mv ./bin/revdep-rebuild{,.py} || die - distutils-r1_python_prepare_all -} - -python_install_all() { - distutils-r1_python_install_all - - # Rename the python versions of revdep-rebuild, since we are not ready - # to switch to the python version yet. Link /usr/bin/revdep-rebuild to - # revdep-rebuild.sh. Leaving the python version available for potential - # testing by a wider audience. - dosym revdep-rebuild.sh /usr/bin/revdep-rebuild - - # TODO: Fix this as it is now a QA violation - # Create cache directory for revdep-rebuild - keepdir /var/cache/revdep-rebuild - use prefix || fowners 0:0 /var/cache/revdep-rebuild - fperms 0700 /var/cache/revdep-rebuild - - # remove on Gentoo Prefix platforms where it's broken anyway - if use prefix; then - elog "The revdep-rebuild command is removed, the preserve-libs" - elog "feature of portage will handle issues." - rm "${ED}"/usr/bin/revdep-rebuild* - rm "${ED}"/usr/share/man/man1/revdep-rebuild.1 - rm -rf "${ED}"/etc/revdep-rebuild - rm -rf "${ED}"/var - fi -} - -pkg_postinst() { - # Only show the elog information on a new install - if [[ ! ${REPLACING_VERSIONS} ]]; then - elog - elog "For further information on gentoolkit, please read the gentoolkit" - elog "guide: https://www.gentoo.org/doc/en/gentoolkit.xml" - elog - elog "Another alternative to equery is app-portage/portage-utils" - elog - elog "Additional tools that may be of interest:" - elog - elog " app-admin/eclean-kernel" - elog " app-portage/diffmask" - elog " app-portage/flaggie" - elog " app-portage/install-mask" - elog " app-portage/portpeek" - elog " app-portage/smart-live-rebuild" - fi -} diff --git a/app-portage/gentoolkit/metadata.xml b/app-portage/gentoolkit/metadata.xml @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>tools-portage@gentoo.org</email> - <name>Gentoo Portage tools team</name> - </maintainer> - <longdescription> -Gentoolkit is a collection of useful adminstration scripts particular to -the Gentoo Linux distribution. It contains rough drafts and -implementations of features that may in time make it into Portage, or -into full-fledged tools in their own right. -</longdescription> -</pkgmetadata> diff --git a/games-rhythm/oshu/Manifest b/games-rhythm/oshu/Manifest @@ -1 +0,0 @@ -DIST oshu-1.3.0.tar.gz 2428000 SHA256 b3afe603a3ff66fcf8e8fd8197f37d204965952a136caebdee3f19be5228722d SHA512 74723916d6fb0de8f9eacfaea14b5881f8be30710f79bd152cc36d06e48b6af4a7c7eb6d5ceb953c2901d82b7c1b3aa8ab9a4bf43dad660a00a81b3d8c90b1bb WHIRLPOOL 6dc5765c34e2d76375840a31289b93749ab5d2c6d62840e2acd9b36ee5dae3513429c97745988cb2149a3090c45e4ab156ff33e7933ba43fe5008064f2d9762e diff --git a/games-rhythm/oshu/metadata.xml b/games-rhythm/oshu/metadata.xml @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="person"> - <email>contact@hacktivis.me</email> - <name>Haelwenn (lanodan) Monnier</name> -</maintainer> -</pkgmetadata> diff --git a/games-rhythm/oshu/oshu-1.3.0.ebuild b/games-rhythm/oshu/oshu-1.3.0.ebuild @@ -1,11 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EBUILD=6 - -DESCRIPTION="Lightweight osu! port" -HOMEPAGE="https://github.com/fmang/oshu" -SRC_URI="https://www.mg0.fr/oshu/oshu-1.3.0.tar.gz" -KEYWORDS="~amd64 ~x86" -LICENSE="GPL-3" -SLOT="0" diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest @@ -1,12 +0,0 @@ -DIST NVIDIA-FreeBSD-x86-370.28.tar.gz 58718517 SHA256 52193b15b4ca822b029f860eed4d00270c925f5d24f7bb511a5b7bbea696d58c SHA512 83ffb19069cc240f8836d808a5eb02c142e7ad923fc2e3049a3b316acc12df070d42dfdc5a8a8e1411ccc9fba0bfa4ed84f457435e985434cd86ae966a63a3f4 WHIRLPOOL b1bec4d5e34ea39c3b1b44adcf85b7392cef39517979d32bc800e48a79a57cfb5f1ca5ff82bc302aa67ed12094782e09ab146f021a9c04e18430034a5ab341a9 -DIST NVIDIA-FreeBSD-x86-375.26.tar.gz 59091851 SHA256 5249d01a21bb846a08975c4f3a90935b6dc8fd33ec8e5faa0d624ef15bcf2b88 SHA512 281f41f341ccf7f7c1e0de9a6519813c7fd2d13ef59001c0a6f126cd5b8f2b67848c780ddaf6647e0c8b9a79c12ff77493c07203510084e741746834b26f5fdb WHIRLPOOL 48e5f810f41337f6b8f5db419288ae5050c3efd71d0b4b7f7b64251612860d5c7e83cb78885a73f6752160ca8dce852560db7d95ce93d5d86dba21e59bae5e77 -DIST NVIDIA-FreeBSD-x86_64-370.28.tar.gz 57905860 SHA256 5087a93af8aaab6cff35ba60c9d67b4249827f6b7681abaaa571a20784a54552 SHA512 40637d64a0ee5029bb1c5ad7a590c5be61253ef6283c4217666768ad8601d7f51ef0d8705c8711f65c3d0a5a5721490813220c5f9186c6d2d12baf5d9c11122e WHIRLPOOL 361648788b7efb9e550b3e67d2e6022e31dab29f5660c42a1b6c961fe4638216fb8785814ee9fa1636fc39c39afce7caffbdc24fcf8bbd14e4eec5b5eeaeb1eb -DIST NVIDIA-FreeBSD-x86_64-375.26.tar.gz 58287080 SHA256 c7d32cb434f9a7e84903a1305d7577705f991fdb6eb4ab3ff79d41b2df82265d SHA512 514c92636eeffa68cea5140819a9ad14888c18c1c60b0865e5cc9f9896b503f22c1236f76e65ed5e11cf3685ceb483c78d2a442b4e9bf274ae3ab399cf40ed9e WHIRLPOOL aa4eb254a6f3c5b0a9b2aaab12a011a92763e7a966b31840a595c18e24d82935dbe0ab3faa4c9aeb7ae24ec7505cb60c20c1e117396cf0527161a2aa1face296 -DIST NVIDIA-Linux-armv7l-gnueabihf-370.28.run 26117701 SHA256 efb60a23aa22b46e94e91d5f5a5fc0c17b47bcf50471e4371653ced5a5350dce SHA512 04699849441bccfb9214fda4c7ff8ecefa11249d1fbfe470e37fefdd132becc225a1bcc16bc976c3fb145a427961f5402c95ecc84b613adb71caef9c96fe7d90 WHIRLPOOL 675a495594c46666ec11c83a76cdc8821e9b57079ee53cd7adcf00e783d121e163b7c5b10598aa55a1fee72eee47defc514fba986685af41c90ab2c5d890abbd -DIST NVIDIA-Linux-armv7l-gnueabihf-375.26.run 26735389 SHA256 8d2b7b36e74ceb1c439b2a5f8d2cdf009fda4f668509bb5d45171455abc774b9 SHA512 f18031c9b9ca6825f93f433d3f59b76a380a12b55e2f4556c2a1725fcdbea58176f22dcdb322f20e27d524f3fda75dd4f5a2a9263268411e0f5e361c580d865d WHIRLPOOL 4ecd41bebae3df91a39612849eb6f7e926398e906d2cb878aa788571976fb1cdfeabd47ac0cd3db26c4a0408608b8dfbc3815d10cdd1acd8eeaba6ed5824bb73 -DIST NVIDIA-Linux-x86-370.28.run 44189522 SHA256 6323254ccf2a75d7ced1374a76ca56778689d0d8a9819e4ee5378ea3347b9835 SHA512 2df8b3d1064073c8b793287994fe0648625d095f3434b7b67531e19632cbad318994df90b55de18aa457d55a1374b35d64a646564259995d3f2197c48737921c WHIRLPOOL 85a089c833311abdc06bbc1fc68cd5ff8ed43dd5e5887d340dc854f905ae741de0ae4343d024259f493dd668075096c460bc1f93c1795d2befb81dd3c4a4983a -DIST NVIDIA-Linux-x86-375.26.run 44541069 SHA256 7c79cfaae5512f34ff14cf0fe76632c7c720600d4bbae71d90ff73f1674e617b SHA512 3bc859a95469a45f3c627018248d83e178d160385c3d17d9f890b0d142ecd1220fb21c442e4fe7755b831227a9c820736f447b162acd9699819c6e8145d6d841 WHIRLPOOL 33ad62f7021f38fd9dfa6b0fcfbc0b69a263409bd5b3b8da8eea6aa9af84299f0d5318bbc8b54139b1744b96fa08114029f8cc70b4f80b0fbd2d76efc47d0462 -DIST NVIDIA-Linux-x86_64-370.28.run 76690360 SHA256 90aa3c186e45b39e6fc0064ab8dbda8bcc897cb61d2e7b7cb30b4ec9a4b39239 SHA512 931476f92a63d142478b2d6b3da4031769fd3b93aee2387800a78b1354b59a5fb5e4e293436b6b4c246627d51c0f55d140ab230de385cb1567bc8b25518eb741 WHIRLPOOL ce866c38291d2ab4aeeff05654a0e61196129f77baea5af93ddbc22fab9574ba39cc05d58020ea2407cc7342f0bcf5c2702d42290f4cc3b53c9e04fb7c617413 -DIST NVIDIA-Linux-x86_64-375.26.run 75869960 SHA256 4f42b2c3709dc2f11a1deca89628582062f4e9bca87f28a4fde50d25bd4a1ecf SHA512 0990ac2e7b045bf62a8c58eb7acf91458756de91887d43486d9754bfc1493b28193072a9687d2d892cc98aaa4e584a8b2a8471756d4f19965da904d51e437dd1 WHIRLPOOL b9890e705dbc3e967a978c5f823f71a418b03aa1b36669c1763559ed81a6a103e9d011246ffe049eda899425e254e8955b921ea9132a8d36530dc4a230cb4832 -DIST nvidia-settings-370.28.tar.bz2 1573509 SHA256 59d7818a4837144e373ce958233db059fde59e279477001e187579770ebf0c5f SHA512 c4da6ae54839a8f91d3557153a648f69095e9a486dbaaf73e453d625660f1adcada12ee5c4bccc1afe2cfd454ead13c1df0e59d5d6aa70f6065823d53f7bb461 WHIRLPOOL e5f0a9fd67e50aee42598d6a0ce9a69a162405a6121518c7aaf9ede409e9bdeb44e3102a123eb6f8c963e0fdaca429a8b693f6af2f0467e746c42f57a496d45f -DIST nvidia-settings-375.26.tar.bz2 1615459 SHA256 beb0d88e2f63427239fd2014299ef7bf780e70800f68be5d011575e858711fe9 SHA512 e575670ccf7e3ef0089ee6a969f107f6f43d742a60cc325c6d95efc4773f34a6e013fd2c4e38b5f90054e24146a05c2300c0cf6a9b7013b556bacc1402956f49 WHIRLPOOL 854e4444beb330c97b29ebc00936c9d2f2522165ef2ca86f68ae28abadef516aedb341e2b2bf6d7a762decaeac4d5c3084bddaa21492b0a60607a2bbf541c301 diff --git a/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist b/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist @@ -1 +0,0 @@ -PRELINK_PATH_MASK="/usr/lib{,64}/tls/libnvidia-tls*:/usr/lib{,64}/libnvidia*:/usr/lib{,64}/libGL*:/usr/lib{,64}/opengl/nvidia/*:/usr/lib{,64}/OpenCL/vendors/nvidia/*:/usr/lib{,64}/xorg/modules/drivers/nvidia*:/usr/lib{,64}/libvdpau_nvidia*:/usr/lib{,64}/libXvMCNVIDIA*:/usr/lib{,64}/libcuda*:/usr/lib{,64}/libnvcuvid*" diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings b/x11-drivers/nvidia-drivers/files/95-nvidia-settings @@ -1,2 +0,0 @@ -#!/bin/sh -/opt/bin/nvidia-settings --load-config-only diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 b/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/bin/nvidia-settings --load-config-only diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch @@ -1,11 +0,0 @@ -diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h ---- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100 -+++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100 -@@ -39,6 +39,7 @@ - typedef XID GLXPixmap; - typedef XID GLXDrawable; - typedef XID GLXPbuffer; -+typedef XID GLXPbufferSGIX; - typedef XID GLXWindow; - typedef XID GLXFBConfigID; - diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch @@ -1,13 +0,0 @@ ---- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000 -+++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000 -@@ -66,6 +66,10 @@ - typedef double GLclampd; - typedef void GLvoid; - -+/* Patching for some better defines in the global system */ -+#ifndef GL_GLEXT_LEGACY -+#include <GL/glext.h> -+#endif - - /*************************************************************/ - diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07 @@ -1,14 +0,0 @@ -# Nvidia drivers support -alias char-major-195 nvidia -alias /dev/nvidiactl char-major-195 - -# To tweak the driver the following options can be used, note that -# you should be careful, as it could cause instability!! For more -# options see /usr/share/doc/PACKAGE/README -# -# !!! SECURITY WARNING !!! -# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW -# WHAT YOU ARE DOING. -# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, -# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. -options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-331.13-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-331.13-pax-usercopy.patch @@ -1,52 +0,0 @@ ---- a/kernel/nv-linux.h -+++ b/kernel/nv-linux.h -@@ -757,16 +757,16 @@ - - #if defined(NV_KMEM_CACHE_CREATE_PRESENT) - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6) --#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ -+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ - { \ - kmem_cache = kmem_cache_create(name, sizeof(type), \ -- 0, 0, NULL, NULL); \ -+ 0, flags, NULL, NULL); \ - } - #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) --#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ -+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ - { \ - kmem_cache = kmem_cache_create(name, sizeof(type), \ -- 0, 0, NULL); \ -+ 0, flags, NULL); \ - } - #else - #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!" ---- a/kernel/nv.c -+++ b/kernel/nv.c -@@ -794,7 +794,7 @@ - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t); -+ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t, SLAB_USERCOPY); - if (nv_stack_t_cache == NULL) - { - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); -@@ -924,7 +924,7 @@ - nv->os_state = (void *) &nv_ctl_device; - nv_lock_init_locks(nv); - -- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, NV_PTE_CACHE_STR, nv_pte_t); -+ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, NV_PTE_CACHE_STR, nv_pte_t, 0); - if (nv_pte_t_cache == NULL) - { - rc = -ENOMEM; -@@ -935,7 +935,7 @@ - if (NV_BUILD_MODULE_INSTANCES == 0) - { - NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t", -- nvidia_p2p_page_t); -+ nvidia_p2p_page_t, 0); - if (nvidia_p2p_page_t_cache == NULL) - { - rc = -ENOMEM; diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-337.12-pax-constify.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-337.12-pax-constify.patch @@ -1,25 +0,0 @@ ---- a/kernel/uvm/nvidia_uvm_common.c -+++ b/kernel/uvm/nvidia_uvm_common.c -@@ -95,7 +95,6 @@ static RM_STATUS uvmnext_gpu_event_stop_ - #endif // NVIDIA_UVM_NEXT_ENABLED - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - // TODO: This would be easier if RM allowed for multiple registrations, since we - // could register UVM-Lite and UVM-Next separately (bug 1372835). -@@ -147,9 +146,11 @@ static RM_STATUS uvmSetupGpuProvider(voi - RM_STATUS status = RM_OK; - - #ifdef NVIDIA_UVM_RM_ENABLED -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ .isrTopHalf = uvmnext_isr_top_half, -+ }; - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch @@ -1,25 +0,0 @@ ---- a/kernel/uvm/uvm_common.c -+++ b/kernel/uvm/uvm_common.c -@@ -95,7 +95,6 @@ static RM_STATUS uvmnext_gpu_event_stop_ - #endif // NVIDIA_UVM_NEXT_ENABLED - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - // TODO: This would be easier if RM allowed for multiple registrations, since we - // could register UVM-Lite and UVM-Next separately (bug 1372835). -@@ -147,9 +146,11 @@ static RM_STATUS uvmSetupGpuProvider(voi - RM_STATUS status = RM_OK; - - #ifdef NVIDIA_UVM_RM_ENABLED -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ .isrTopHalf = uvmnext_isr_top_half, -+ }; - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch @@ -1,47 +0,0 @@ ---- a/kernel/nv.c -+++ b/kernel/nv.c -@@ -705,7 +705,7 @@ int __init nvidia_init_module(void) - #endif - - nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -- nvidia_stack_t); -+ nvidia_stack_t, SLAB_USERCOPY); - if (nvidia_stack_t_cache == NULL) - { - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); -@@ -846,7 +846,7 @@ int __init nvidia_init_module(void) - nv_lock_init_locks(nv); - - nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name, -- nvidia_pte_t); -+ nvidia_pte_t, 0); - if (nvidia_pte_t_cache == NULL) - { - rc = -ENOMEM; -@@ -857,7 +857,7 @@ int __init nvidia_init_module(void) - if (!nv_multiple_kernel_modules) - { - nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name, -- nvidia_p2p_page_t); -+ nvidia_p2p_page_t, 0); - if (nvidia_p2p_page_t_cache == NULL) - { - rc = -ENOMEM; ---- a/kernel/nv-linux.h -+++ b/kernel/nv-linux.h -@@ -1431,11 +1431,11 @@ extern void *nvidia_stack_t_cache; - - #if !defined(NV_VMWARE) - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL) -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL) - #else --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL, \ -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL, \ - NULL) - #endif - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch @@ -1,102 +0,0 @@ -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/common/inc/nv-linux.h NVIDIA-Linux-x86_64-355.06/kernel/common/inc/nv-linux.h ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/common/inc/nv-linux.h 2015-07-29 05:13:57.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/common/inc/nv-linux.h 2015-08-21 16:45:55.624336728 +0200 -@@ -1408,11 +1408,11 @@ extern void *nvidia_stack_t_cache; - - #if !defined(NV_VMWARE) - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL) -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL) - #else --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL, \ -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL, \ - NULL) - #endif - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv.c ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv.c 2015-07-29 05:13:57.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv.c 2015-08-21 16:44:51.008340178 +0200 -@@ -719,7 +719,7 @@ int __init nvidia_init_module(void) - #endif - - nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -- nvidia_stack_t); -+ nvidia_stack_t, SLAB_USERCOPY); - if (nvidia_stack_t_cache == NULL) - { - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); -@@ -861,7 +861,7 @@ int __init nvidia_init_module(void) - nv_state_init_gpu_uuid_cache(nv); - - nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name, -- nvidia_pte_t); -+ nvidia_pte_t, 0); - if (nvidia_pte_t_cache == NULL) - { - rc = -ENOMEM; -@@ -872,7 +872,7 @@ int __init nvidia_init_module(void) - if (!nv_multiple_kernel_modules) - { - nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name, -- nvidia_p2p_page_t); -+ nvidia_p2p_page_t, 0); - if (nvidia_p2p_page_t_cache == NULL) - { - rc = -ENOMEM; -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv-mmap.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv-mmap.c ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv-mmap.c 2015-07-29 05:13:57.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv-mmap.c 2015-08-21 16:58:15.968297199 +0200 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia-uvm/uvm_common.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia-uvm/uvm_common.c ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia-uvm/uvm_common.c 2015-07-29 05:10:08.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia-uvm/uvm_common.c 2015-08-21 17:00:33.788289841 +0200 -@@ -60,7 +60,7 @@ static void uvmnext_exit(void) - { - - } --static NV_STATUS uvmnext_isr_top_half(void) -+static NV_STATUS uvmnext_isr_top_half(UvmGpuUuid *gpuUuidStruct) - { - return NV_ERR_NO_INTR_PENDING; - } -@@ -79,7 +79,6 @@ NvBool uvmnext_activated(void) - #endif // NVIDIA_UVM_NEXT_ENABLED - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - // TODO: This would be easier if RM allowed for multiple registrations, since we - // could register UVM-Lite and UVM-Next separately (bug 1372835). -@@ -112,9 +111,11 @@ static NV_STATUS uvmSetupGpuProvider(voi - NV_STATUS status = NV_OK; - - #ifdef NVIDIA_UVM_RM_ENABLED -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ .isrTopHalf = uvmnext_isr_top_half, -+ }; - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-361.28-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-361.28-pax.patch @@ -1,351 +0,0 @@ -diff -urp work.orig/kernel/common/inc/nv-linux.h work/kernel/common/inc/nv-linux.h ---- work.orig/kernel/common/inc/nv-linux.h 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/common/inc/nv-linux.h 2016-02-10 11:49:15.309410457 +0100 -@@ -1351,6 +1351,9 @@ extern void *nvidia_stack_t_cache; - #define NV_KMEM_CACHE_CREATE(name, type) \ - NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, 0, NULL) - -+#define NV_KMEM_CACHE_CREATE_USERCOPY(name, type) \ -+ NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL) -+ - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ - kmem_cache_destroy(kmem_cache) - -diff -urp work.orig/kernel/common/inc/nv-modeset-interface.h work/kernel/common/inc/nv-modeset-interface.h ---- work.orig/kernel/common/inc/nv-modeset-interface.h 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/common/inc/nv-modeset-interface.h 2016-02-10 11:49:54.970985152 +0100 -@@ -70,7 +70,7 @@ typedef struct { - * mix nvidia and nvidia-modeset kernel modules from different - * releases. - */ -- const char *version_string; -+// const char *version_string; - - /* - * Allocate and free an nvidia_stack_t to pass into -@@ -104,6 +104,6 @@ typedef struct { - - } nvidia_modeset_rm_ops_t; - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops); -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string); - - #endif /* _NV_MODESET_INTERFACE_H_ */ -diff -urp work.orig/kernel/common/inc/nv-register-module.h work/kernel/common/inc/nv-register-module.h ---- work.orig/kernel/common/inc/nv-register-module.h 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/common/inc/nv-register-module.h 2016-02-10 11:50:18.941376865 +0100 -@@ -34,7 +34,7 @@ typedef struct nvidia_module_s { - int (*ioctl)(struct inode *, struct file * file, unsigned int cmd, unsigned long arg); - unsigned int (*poll)(struct file * file, poll_table *wait); - --} nvidia_module_t; -+} __do_const nvidia_module_t; - - int nvidia_register_module(nvidia_module_t *); - int nvidia_unregister_module(nvidia_module_t *); -diff -urp work.orig/kernel/nvidia/nv.c work/kernel/nvidia/nv.c ---- work.orig/kernel/nvidia/nv.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv.c 2016-02-10 11:50:40.191828792 +0100 -@@ -704,7 +704,7 @@ int __init nvidia_init_module(void) - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name, - nvidia_stack_t); - if (nvidia_stack_t_cache == NULL) - { -diff -urp work.orig/kernel/nvidia/nv-chrdev.c work/kernel/nvidia/nv-chrdev.c ---- work.orig/kernel/nvidia/nv-chrdev.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-chrdev.c 2016-02-10 11:50:57.201126955 +0100 -@@ -20,8 +20,6 @@ int nv_register_chrdev(void *param) - { - nvidia_module_t *module = (nvidia_module_t *)param; - -- module->instance = nv_module_instance; -- - return (nvidia_register_module(module)); - } - -diff -urp work.orig/kernel/nvidia/nv-instance.c work/kernel/nvidia/nv-instance.c ---- work.orig/kernel/nvidia/nv-instance.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-instance.c 2016-02-10 11:51:35.418977554 +0100 -@@ -54,6 +54,7 @@ struct pci_driver nv_pci_driver = { - nvidia_module_t nv_fops = { - .owner = THIS_MODULE, - .module_name = MODULE_NAME, -+ .instance = MODULE_INSTANCE_NUMBER, - .open = nvidia_open, - .close = nvidia_close, - .ioctl = nvidia_ioctl, -diff -urp work.orig/kernel/nvidia/nv-mmap.c work/kernel/nvidia/nv-mmap.c ---- work.orig/kernel/nvidia/nv-mmap.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-mmap.c 2016-02-10 11:14:27.996577127 +0100 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp work.orig/kernel/nvidia/nv-modeset-interface.c work/kernel/nvidia/nv-modeset-interface.c ---- work.orig/kernel/nvidia/nv-modeset-interface.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-modeset-interface.c 2016-02-10 12:05:23.822391866 +0100 -@@ -59,10 +59,9 @@ void nvidia_modeset_resume(NvU32 gpuId) - } - } - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops) -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string) - { -- const nvidia_modeset_rm_ops_t local_rm_ops = { -- .version_string = NV_VERSION_STRING, -+ static const nvidia_modeset_rm_ops_t local_rm_ops = { - .alloc_stack = nvidia_modeset_rm_ops_alloc_stack, - .free_stack = nvidia_modeset_rm_ops_free_stack, - .get_gpuid_list = nvidia_get_gpuid_list, -@@ -72,13 +71,13 @@ NV_STATUS nvidia_get_rm_ops(nvidia_modes - .set_callbacks = nvidia_modeset_set_callbacks, - }; - -- if (strcmp(rm_ops->version_string, NV_VERSION_STRING) != 0) -+ if (strcmp(*version_string, NV_VERSION_STRING) != 0) - { -- rm_ops->version_string = NV_VERSION_STRING; -+ *version_string = NV_VERSION_STRING; - return NV_ERR_GENERIC; - } - -- *rm_ops = local_rm_ops; -+ *rm_ops = &local_rm_ops; - - return NV_OK; - } -diff -urp work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c work/kernel/nvidia-modeset/nvidia-modeset-linux.c ---- work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-02-03 23:32:20.000000000 +0100 -+++ work/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-02-10 12:08:02.275059160 +0100 -@@ -320,49 +320,48 @@ static void nvkms_resume(NvU32 gpuId) - * so we can use a single nvidia_modeset_stack_ptr for calling RM. - *************************************************************************/ - --static nvidia_modeset_rm_ops_t __rm_ops = { 0 }; -+static const nvidia_modeset_rm_ops_t *__rm_ops; - static nvidia_modeset_stack_ptr nvkms_nvidia_stack = NULL; - static nvidia_modeset_callbacks_t nvkms_rm_callbacks = { -- nvkms_suspend, -- nvkms_resume -+ .suspend = nvkms_suspend, -+ .resume = nvkms_resume - }; - - static int nvkms_alloc_rm(void) - { - NV_STATUS nvstatus; - int ret; -+ const char *version_string = NV_VERSION_STRING; - -- __rm_ops.version_string = NV_VERSION_STRING; -- -- nvstatus = nvidia_get_rm_ops(&__rm_ops); -+ nvstatus = nvidia_get_rm_ops(&__rm_ops, &version_string); - - if (nvstatus != NV_OK) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Version mismatch: " - "nvidia.ko(%s) nvidia-modeset.ko(%s)\n", -- __rm_ops.version_string, NV_VERSION_STRING); -+ version_string, NV_VERSION_STRING); - return -EINVAL; - } - -- ret = __rm_ops.set_callbacks(&nvkms_rm_callbacks); -+ ret = __rm_ops->set_callbacks(&nvkms_rm_callbacks); - if (ret < 0) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Failed to register callbacks\n"); - return ret; - } - -- return __rm_ops.alloc_stack(&nvkms_nvidia_stack); -+ return __rm_ops->alloc_stack(&nvkms_nvidia_stack); - } - - static void nvkms_free_rm(void) - { -- __rm_ops.set_callbacks(NULL); -- if (__rm_ops.free_stack != NULL) { -- __rm_ops.free_stack(nvkms_nvidia_stack); -+ __rm_ops->set_callbacks(NULL); -+ if (__rm_ops->free_stack != NULL) { -+ __rm_ops->free_stack(nvkms_nvidia_stack); - } - } - - void NVKMS_API_CALL nvkms_call_rm(void *ops) - { -- __rm_ops.op(nvkms_nvidia_stack, ops); -+ __rm_ops->op(nvkms_nvidia_stack, ops); - } - - /************************************************************************* -@@ -681,17 +680,17 @@ done: - - NvBool NVKMS_API_CALL nvkms_open_gpu(NvU32 gpuId) - { -- return __rm_ops.open_gpu(gpuId, nvkms_nvidia_stack) == 0; -+ return __rm_ops->open_gpu(gpuId, nvkms_nvidia_stack) == 0; - } - - void NVKMS_API_CALL nvkms_close_gpu(NvU32 gpuId) - { -- __rm_ops.close_gpu(gpuId, nvkms_nvidia_stack); -+ __rm_ops->close_gpu(gpuId, nvkms_nvidia_stack); - } - - NvBool NVKMS_API_CALL nvkms_list_gpus(NvU32 *gpu_ids, NvU32 *gpu_count) - { -- return __rm_ops.get_gpuid_list(gpu_ids, gpu_count); -+ return __rm_ops->get_gpuid_list(gpu_ids, gpu_count); - } - - /************************************************************************* -diff -urp work.orig/kernel/nvidia-uvm/uvm8_channel.c work/kernel/nvidia-uvm/uvm8_channel.c ---- work.orig/kernel/nvidia-uvm/uvm8_channel.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_channel.c 2016-02-10 11:39:16.735603941 +0100 -@@ -268,7 +268,7 @@ void uvm_channel_end_push(uvm_push_t *pu - mb(); - - channel->cpu_put = new_cpu_put; -- ACCESS_ONCE(*channel->channel_info.GPPut) = new_cpu_put; -+ ACCESS_ONCE_RW(*channel->channel_info.GPPut) = new_cpu_put; - - uvm_spin_unlock(&channel->pool->lock); - -diff -urp work.orig/kernel/nvidia-uvm/uvm8_global.c work/kernel/nvidia-uvm/uvm8_global.c ---- work.orig/kernel/nvidia-uvm/uvm8_global.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_global.c 2016-02-10 11:28:23.142115625 +0100 -@@ -32,16 +32,16 @@ - #include "nv_uvm_interface.h" - - uvm_global_t g_uvm_global; --static struct UvmOpsUvmEvents g_exported_uvm8_ops; -+static struct UvmOpsUvmEvents g_exported_uvm8_ops = { -+ .startDevice = NULL, -+ .stopDevice = NULL, -+ .isrTopHalf = uvm8_isr_top_half, -+}; - - static NV_STATUS uvm8_register_callbacks(void) - { - NV_STATUS status = NV_OK; - -- g_exported_uvm8_ops.startDevice = NULL; -- g_exported_uvm8_ops.stopDevice = NULL; -- g_exported_uvm8_ops.isrTopHalf = uvm8_isr_top_half; -- - // Register the UVM callbacks with the main GPU driver: - status = uvm_rm_locked_call(nvUvmInterfaceRegisterUvmCallbacks(&g_exported_uvm8_ops)); - return status; -diff -urp work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c ---- work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-02-10 11:38:57.478030852 +0100 -@@ -288,7 +288,7 @@ NvU64 uvm_gpu_semaphore_get_gpu_va(uvm_g - - NvU32 uvm_gpu_semaphore_get_payload(uvm_gpu_semaphore_t *semaphore) - { -- return ACCESS_ONCE(*semaphore->payload); -+ return ACCESS_ONCE_RW(*semaphore->payload); - } - - void uvm_gpu_semaphore_set_payload(uvm_gpu_semaphore_t *semaphore, NvU32 payload) -@@ -304,7 +304,7 @@ void uvm_gpu_semaphore_set_payload(uvm_g - // being optimized out on non-SMP configs (we need them for interacting with - // the GPU correctly even on non-SMP). - mb(); -- ACCESS_ONCE(*semaphore->payload) = payload; -+ ACCESS_ONCE_RW(*semaphore->payload) = payload; - } - - NV_STATUS uvm_gpu_tracking_semaphore_alloc(uvm_gpu_semaphore_pool_t *pool, uvm_gpu_tracking_semaphore_t *tracking_sem) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_hal.c work/kernel/nvidia-uvm/uvm8_hal.c ---- work.orig/kernel/nvidia-uvm/uvm8_hal.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_hal.c 2016-02-10 11:47:13.377356162 +0100 -@@ -58,7 +58,7 @@ typedef struct - // arch_ops: id is an architecture - uvm_arch_hal_t arch_ops; - } u; --} uvm_hal_class_ops_t; -+} __do_const uvm_hal_class_ops_t; - - // Table for copy engine functions. - // Each entry is associated with a copy engine class through the 'class' field. -diff -urp work.orig/kernel/nvidia-uvm/uvm8_mmu.h work/kernel/nvidia-uvm/uvm8_mmu.h ---- work.orig/kernel/nvidia-uvm/uvm8_mmu.h 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_mmu.h 2016-02-10 12:09:05.463637996 +0100 -@@ -24,7 +24,6 @@ - #ifndef __UVM8_MMU_H__ - #define __UVM8_MMU_H__ - --#include "uvm8_forward_decl.h" - #include "uvm8_pmm_gpu.h" - #include "uvmtypes.h" - #include "uvm_common.h" -diff -urp work.orig/kernel/nvidia-uvm/uvm_common.c work/kernel/nvidia-uvm/uvm_common.c ---- work.orig/kernel/nvidia-uvm/uvm_common.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_common.c 2016-02-10 11:45:58.008501609 +0100 -@@ -74,7 +74,6 @@ static int uvmnext_activated(void) - #endif - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - static char* uvm_driver_mode = "lite"; - -@@ -198,12 +197,17 @@ static NV_STATUS uvmSetupGpuProvider(voi - { - NV_STATUS status = NV_OK; - -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ }; -+ -+ pax_open_kernel(); - if (uvmnext_activated()) -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ *(void **)&g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; - else if (uvmfull_activated()) -- g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ *(void **)&g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ pax_close_kernel(); - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); -diff -urp work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h work/kernel/nvidia-uvm/uvm_full_fault_buffer.h ---- work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-02-10 11:26:28.143422741 +0100 -@@ -31,6 +31,7 @@ - #define _UVM_FULL_FAULT_BUFFER_H_ - - #include "uvmtypes.h" -+#include "linux/compiler.h" - - #define MAXWELL_FAULT_BUFFER_A (0xb069) - #define MEM_RD32(a) (*(const volatile NvU32 *)(a)) -@@ -303,7 +304,7 @@ typedef struct - NvUvmControlPrefetch_t controlPrefetch; - NvUvmTestFaultBufferOverflow_t testFaultBufferOverflow; - NvUvmClearFaultBufferOverflow_t clearFaultBufferOverflow; --} UvmFaultBufferOps; -+} __no_const UvmFaultBufferOps; - - /****************************************************************************** - uvmfull_fault_buffer_init diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch @@ -1,398 +0,0 @@ -diff -urp work.orig/kernel/common/inc/nv-linux.h work/kernel/common/inc/nv-linux.h ---- work.orig/kernel/common/inc/nv-linux.h 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/common/inc/nv-linux.h 2016-03-22 13:51:58.637292065 +0100 -@@ -1307,6 +1307,9 @@ extern void *nvidia_stack_t_cache; - #define NV_KMEM_CACHE_CREATE(name, type) \ - NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, 0, NULL) - -+#define NV_KMEM_CACHE_CREATE_USERCOPY(name, type) \ -+ NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL) -+ - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ - kmem_cache_destroy(kmem_cache) - -diff -urp work.orig/kernel/common/inc/nv-modeset-interface.h work/kernel/common/inc/nv-modeset-interface.h ---- work.orig/kernel/common/inc/nv-modeset-interface.h 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/common/inc/nv-modeset-interface.h 2016-03-22 13:51:58.637292065 +0100 -@@ -72,7 +72,7 @@ typedef struct { - * mix nvidia and nvidia-modeset kernel modules from different - * releases. - */ -- const char *version_string; -+// const char *version_string; - - /* - * Allocate and free an nvidia_stack_t to pass into -@@ -115,6 +115,6 @@ typedef struct { - - } nvidia_modeset_rm_ops_t; - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops); -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string); - - #endif /* _NV_MODESET_INTERFACE_H_ */ -diff -urp work.orig/kernel/common/inc/nv-register-module.h work/kernel/common/inc/nv-register-module.h ---- work.orig/kernel/common/inc/nv-register-module.h 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/common/inc/nv-register-module.h 2016-03-22 13:51:58.637292065 +0100 -@@ -34,7 +34,7 @@ typedef struct nvidia_module_s { - int (*ioctl)(struct inode *, struct file * file, unsigned int cmd, unsigned long arg); - unsigned int (*poll)(struct file * file, poll_table *wait); - --} nvidia_module_t; -+} __do_const nvidia_module_t; - - int nvidia_register_module(nvidia_module_t *); - int nvidia_unregister_module(nvidia_module_t *); -diff -urp work.orig/kernel/nvidia/nv.c work/kernel/nvidia/nv.c ---- work.orig/kernel/nvidia/nv.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv.c 2016-03-22 13:51:58.637292065 +0100 -@@ -654,7 +654,7 @@ int __init nvidia_init_module(void) - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name, - nvidia_stack_t); - if (nvidia_stack_t_cache == NULL) - { -diff -urp work.orig/kernel/nvidia/nv-chrdev.c work/kernel/nvidia/nv-chrdev.c ---- work.orig/kernel/nvidia/nv-chrdev.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-chrdev.c 2016-03-22 13:51:58.637292065 +0100 -@@ -20,8 +20,6 @@ int nv_register_chrdev(void *param) - { - nvidia_module_t *module = (nvidia_module_t *)param; - -- module->instance = nv_module_instance; -- - return (nvidia_register_module(module)); - } - -diff -urp work.orig/kernel/nvidia/nv-instance.c work/kernel/nvidia/nv-instance.c ---- work.orig/kernel/nvidia/nv-instance.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-instance.c 2016-03-22 13:51:58.637292065 +0100 -@@ -51,6 +51,7 @@ struct pci_driver nv_pci_driver = { - nvidia_module_t nv_fops = { - .owner = THIS_MODULE, - .module_name = MODULE_NAME, -+ .instance = MODULE_INSTANCE_NUMBER, - .open = nvidia_open, - .close = nvidia_close, - .ioctl = nvidia_ioctl, -diff -urp work.orig/kernel/nvidia/nv-mmap.c work/kernel/nvidia/nv-mmap.c ---- work.orig/kernel/nvidia/nv-mmap.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-mmap.c 2016-03-22 13:51:58.637292065 +0100 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp work.orig/kernel/nvidia/nv-modeset-interface.c work/kernel/nvidia/nv-modeset-interface.c ---- work.orig/kernel/nvidia/nv-modeset-interface.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-modeset-interface.c 2016-03-22 13:56:37.019870910 +0100 -@@ -100,10 +100,9 @@ static NvU32 nvidia_modeset_enumerate_gp - return count; - } - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops) -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string) - { -- const nvidia_modeset_rm_ops_t local_rm_ops = { -- .version_string = NV_VERSION_STRING, -+ static const nvidia_modeset_rm_ops_t local_rm_ops = { - .alloc_stack = nvidia_modeset_rm_ops_alloc_stack, - .free_stack = nvidia_modeset_rm_ops_free_stack, - .get_gpuid_list = nvidia_get_gpuid_list, -@@ -114,13 +113,13 @@ NV_STATUS nvidia_get_rm_ops(nvidia_modes - .set_callbacks = nvidia_modeset_set_callbacks, - }; - -- if (strcmp(rm_ops->version_string, NV_VERSION_STRING) != 0) -+ if (strcmp(*version_string, NV_VERSION_STRING) != 0) - { -- rm_ops->version_string = NV_VERSION_STRING; -+ *version_string = NV_VERSION_STRING; - return NV_ERR_GENERIC; - } - -- *rm_ops = local_rm_ops; -+ *rm_ops = &local_rm_ops; - - return NV_OK; - } -diff -urp work.orig/kernel/nvidia-drm/nvidia-drm-drv.c work/kernel/nvidia-drm/nvidia-drm-drv.c ---- work.orig/kernel/nvidia-drm/nvidia-drm-drv.c 2016-03-17 03:57:24.000000000 +0100 -+++ work/kernel/nvidia-drm/nvidia-drm-drv.c 2016-03-22 14:23:07.084230003 +0100 -@@ -586,7 +586,7 @@ static const struct drm_ioctl_desc nv_dr - DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED), - }; - --static struct drm_driver nv_drm_driver = { -+static drm_driver_no_const nv_drm_driver __read_only = { - - .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER, - -@@ -643,6 +643,7 @@ static void nvidia_update_drm_driver_fea - return; - } - -+ pax_open_kernel(); - nv_drm_driver.driver_features |= DRIVER_MODESET | DRIVER_ATOMIC; - - nv_drm_driver.master_set = nvidia_drm_master_set; -@@ -651,6 +652,7 @@ static void nvidia_update_drm_driver_fea - nv_drm_driver.dumb_create = nvidia_drm_dumb_create; - nv_drm_driver.dumb_map_offset = nvidia_drm_dumb_map_offset; - nv_drm_driver.dumb_destroy = drm_gem_dumb_destroy; -+ pax_close_kernel(); - - #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */ - } -diff -urp work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c work/kernel/nvidia-modeset/nvidia-modeset-linux.c ---- work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-03-17 03:57:25.000000000 +0100 -+++ work/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-03-22 13:55:05.208148788 +0100 -@@ -317,29 +317,28 @@ static void nvkms_resume(NvU32 gpuId) - * Interface with resman. - *************************************************************************/ - --static nvidia_modeset_rm_ops_t __rm_ops = { 0 }; -+static const nvidia_modeset_rm_ops_t *__rm_ops; - static nvidia_modeset_callbacks_t nvkms_rm_callbacks = { -- nvkms_suspend, -- nvkms_resume -+ .suspend = nvkms_suspend, -+ .resume = nvkms_resume - }; - - static int nvkms_alloc_rm(void) - { - NV_STATUS nvstatus; - int ret; -+ const char *version_string = NV_VERSION_STRING; - -- __rm_ops.version_string = NV_VERSION_STRING; -- -- nvstatus = nvidia_get_rm_ops(&__rm_ops); -+ nvstatus = nvidia_get_rm_ops(&__rm_ops, &version_string); - - if (nvstatus != NV_OK) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Version mismatch: " - "nvidia.ko(%s) nvidia-modeset.ko(%s)\n", -- __rm_ops.version_string, NV_VERSION_STRING); -+ version_string, NV_VERSION_STRING); - return -EINVAL; - } - -- ret = __rm_ops.set_callbacks(&nvkms_rm_callbacks); -+ ret = __rm_ops->set_callbacks(&nvkms_rm_callbacks); - if (ret < 0) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Failed to register callbacks\n"); - return ret; -@@ -350,20 +349,20 @@ static int nvkms_alloc_rm(void) - - static void nvkms_free_rm(void) - { -- __rm_ops.set_callbacks(NULL); -+ __rm_ops->set_callbacks(NULL); - } - - void NVKMS_API_CALL nvkms_call_rm(void *ops) - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.op(stack, ops); -+ __rm_ops->op(stack, ops); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - /************************************************************************* -@@ -685,13 +684,13 @@ NvBool NVKMS_API_CALL nvkms_open_gpu(NvU - nvidia_modeset_stack_ptr stack = NULL; - NvBool ret; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return NV_FALSE; - } - -- ret = __rm_ops.open_gpu(gpuId, stack) == 0; -+ ret = __rm_ops->open_gpu(gpuId, stack) == 0; - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - - return ret; - } -@@ -700,18 +699,18 @@ void NVKMS_API_CALL nvkms_close_gpu(NvU3 - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.close_gpu(gpuId, stack); -+ __rm_ops->close_gpu(gpuId, stack); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - NvU32 NVKMS_API_CALL nvkms_enumerate_gpus(nv_gpu_info_t *gpu_info) - { -- return __rm_ops.enumerate_gpus(gpu_info); -+ return __rm_ops->enumerate_gpus(gpu_info); - } - - /************************************************************************* -diff -urp work.orig/kernel/nvidia-uvm/uvm8_global.c work/kernel/nvidia-uvm/uvm8_global.c ---- work.orig/kernel/nvidia-uvm/uvm8_global.c 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_global.c 2016-03-22 14:00:03.852089935 +0100 -@@ -33,17 +33,17 @@ - #include "nv_uvm_interface.h" - - uvm_global_t g_uvm_global; --static struct UvmOpsUvmEvents g_exported_uvm8_ops; -+static struct UvmOpsUvmEvents g_exported_uvm8_ops = { -+ .startDevice = NULL, -+ .stopDevice = NULL, -+ .isrTopHalf = uvm8_isr_top_half, -+}; - static bool g_ops_registered = false; - - static NV_STATUS uvm8_register_callbacks(void) - { - NV_STATUS status = NV_OK; - -- g_exported_uvm8_ops.startDevice = NULL; -- g_exported_uvm8_ops.stopDevice = NULL; -- g_exported_uvm8_ops.isrTopHalf = uvm8_isr_top_half; -- - // Register the UVM callbacks with the main GPU driver: - status = uvm_rm_locked_call(nvUvmInterfaceRegisterUvmCallbacks(&g_exported_uvm8_ops)); - if (status != NV_OK) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c ---- work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-03-22 13:51:58.641294799 +0100 -@@ -285,7 +285,7 @@ NvU64 uvm_gpu_semaphore_get_gpu_va(uvm_g - - NvU32 uvm_gpu_semaphore_get_payload(uvm_gpu_semaphore_t *semaphore) - { -- return ACCESS_ONCE(*semaphore->payload); -+ return ACCESS_ONCE_RW(*semaphore->payload); - } - - void uvm_gpu_semaphore_set_payload(uvm_gpu_semaphore_t *semaphore, NvU32 payload) -@@ -301,7 +301,7 @@ void uvm_gpu_semaphore_set_payload(uvm_g - // being optimized out on non-SMP configs (we need them for interacting with - // the GPU correctly even on non-SMP). - mb(); -- ACCESS_ONCE(*semaphore->payload) = payload; -+ ACCESS_ONCE_RW(*semaphore->payload) = payload; - } - - NV_STATUS uvm_gpu_tracking_semaphore_alloc(uvm_gpu_semaphore_pool_t *pool, uvm_gpu_tracking_semaphore_t *tracking_sem) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_hal.h work/kernel/nvidia-uvm/uvm8_hal.h ---- work.orig/kernel/nvidia-uvm/uvm8_hal.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_hal.h 2016-03-22 13:55:38.620347598 +0100 -@@ -293,7 +293,7 @@ typedef struct - // fault_buffer_ops: id is a hardware class - uvm_fault_buffer_hal_t fault_buffer_ops; - } u; --} uvm_hal_class_ops_t; -+} __do_const uvm_hal_class_ops_t; - - // When UVM next support is enabled support for future chips in the hal is - // enabled by providing additional hal table entries below. -diff -urp work.orig/kernel/nvidia-uvm/uvm8_mmu.h work/kernel/nvidia-uvm/uvm8_mmu.h ---- work.orig/kernel/nvidia-uvm/uvm8_mmu.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_mmu.h 2016-03-22 13:57:44.255581049 +0100 -@@ -24,7 +24,6 @@ - #ifndef __UVM8_MMU_H__ - #define __UVM8_MMU_H__ - --#include "uvm8_forward_decl.h" - #include "uvm8_hal_types.h" - #include "uvm8_pmm_gpu.h" - #include "uvmtypes.h" -diff -urp work.orig/kernel/nvidia-uvm/uvm_common.c work/kernel/nvidia-uvm/uvm_common.c ---- work.orig/kernel/nvidia-uvm/uvm_common.c 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_common.c 2016-03-22 13:59:20.045675359 +0100 -@@ -54,7 +54,6 @@ - #include "uvm8_forward_decl.h" - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - static char* uvm_driver_mode = "lite"; - -@@ -171,10 +170,16 @@ static NV_STATUS uvmSetupGpuProvider(voi - { - NV_STATUS status = NV_OK; - -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- if (uvmfull_activated()) -- g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ }; -+ -+ if (uvmfull_activated()) { -+ pax_open_kernel(); -+ *(void **)&g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ pax_close_kernel(); -+ } - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); -diff -urp work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h work/kernel/nvidia-uvm/uvm_full_fault_buffer.h ---- work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-03-22 13:51:58.645297533 +0100 -@@ -31,6 +31,7 @@ - #define _UVM_FULL_FAULT_BUFFER_H_ - - #include "uvmtypes.h" -+#include "linux/compiler.h" - - #define MAXWELL_FAULT_BUFFER_A (0xb069) - #define MEM_RD32(a) (*(const volatile NvU32 *)(a)) -@@ -303,7 +304,7 @@ typedef struct - NvUvmControlPrefetch_t controlPrefetch; - NvUvmTestFaultBufferOverflow_t testFaultBufferOverflow; - NvUvmClearFaultBufferOverflow_t clearFaultBufferOverflow; --} UvmFaultBufferOps; -+} __no_const UvmFaultBufferOps; - - /****************************************************************************** - uvmfull_fault_buffer_init -diff -urp work.orig/kernel/nvidia-uvm/uvm_linux.h work/kernel/nvidia-uvm/uvm_linux.h ---- work.orig/kernel/nvidia-uvm/uvm_linux.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_linux.h 2016-03-22 14:09:14.810534336 +0100 -@@ -485,7 +485,7 @@ static inline NvU64 NV_GETTIME(void) - - // WRITE_ONCE/READ_ONCE have incompatible definitions across versions, which produces warnings. - // Therefore, we define our own macros --#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) -+#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE_RW(x) = (val)) - #define UVM_READ_ONCE(x) ACCESS_ONCE(x) - - // Added in 3.11 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.35-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.35-profiles-rc.patch @@ -1,11 +0,0 @@ ---- a/nvidia-application-profiles-367.35-rc -+++ b/nvidia-application-profiles-367.35-rc -@@ -44,7 +44,7 @@ - { - "name" : "NamedVertexAttributesApplyDivisor", - "settings" : [ "GL23cd0e", 1 ] -- }, -+ } - ], - "rules" : [ - { diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.44-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.44-profiles-rc.patch @@ -1,11 +0,0 @@ ---- a/nvidia-application-profiles-367.44-rc -+++ b/nvidia-application-profiles-367.44-rc -@@ -44,7 +44,7 @@ - { - "name" : "NamedVertexAttributesApplyDivisor", - "settings" : [ "GL23cd0e", 1 ] -- }, -+ } - ], - "rules" : [ - { diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch @@ -1,11 +0,0 @@ ---- a/nvidia-application-profiles-370.28-rc -+++ b/nvidia-application-profiles-370.28-rc -@@ -44,7 +44,7 @@ - { - "name" : "NamedVertexAttributesApplyDivisor", - "settings" : [ "GL23cd0e", 1 ] -- }, -+ } - ], - "rules" : [ - { diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch @@ -1,17 +0,0 @@ -Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ -diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c ---- kernel.orig/nv-procfs.c 2011-07-13 03:29:30.000000000 +0200 -+++ kernel/nv-procfs.c 2011-07-19 15:45:27.982993911 +0200 -@@ -707,8 +707,10 @@ int nv_register_procfs(void) - * However, in preparation for this, we need to preserve - * the procfs read() and write() operations. - */ -- nv_procfs_registry_fops.read = entry->proc_fops->read; -- nv_procfs_registry_fops.write = entry->proc_fops->write; -+ pax_open_kernel(); -+ *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read; -+ *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write; -+ pax_close_kernel(); - - entry = NV_CREATE_PROC_FILE("registry", proc_nvidia, - nv_procfs_read_registry, diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch @@ -1,54 +0,0 @@ -diff -urp kernel.orig/nv.c kernel/nv.c ---- kernel.orig/nv.c 2011-09-24 02:32:09.000000000 +0200 -+++ kernel/nv.c 2011-10-05 19:13:41.474242252 +0200 -@@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t); -+ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY); - if (nv_stack_t_cache == NULL) - { - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); -@@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi - } - #endif - -- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t); -+ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0); - if (nv_pte_t_cache == NULL) - { - rc = -ENOMEM; -@@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi - } - - NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t", -- nvidia_p2p_page_t); -+ nvidia_p2p_page_t, 0); - if (nvidia_p2p_page_t_cache == NULL) - { - rc = -ENOMEM; -diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h ---- kernel.orig/nv-linux.h 2011-09-24 02:32:09.000000000 +0200 -+++ kernel/nv-linux.h 2011-10-05 19:14:42.522238996 +0200 -@@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock; - - #if defined(NV_KMEM_CACHE_CREATE_PRESENT) - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6) --#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ -+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ - { \ - kmem_cache = kmem_cache_create(name, sizeof(type), \ -- 0, 0, NULL, NULL); \ -+ 0, flags, NULL, NULL); \ - } - #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) --#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ -+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ - { \ - kmem_cache = kmem_cache_create(name, sizeof(type), \ -- 0, 0, NULL); \ -+ 0, flags, NULL); \ - } - #else - #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!" diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-settings.desktop b/x11-drivers/nvidia-drivers/files/nvidia-drivers-settings.desktop @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=NVIDIA X Server Settings -Comment=Configure NVIDIA X Server Settings -Exec=/opt/bin/nvidia-settings -Icon=nvidia-drivers-settings -Categories=System;Settings; diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf @@ -1,8 +0,0 @@ -# run-time configuration file for /etc/init.d/nvidia-persistenced - -# NVPD_USER: The user nvidia-persistenced is intended to run for -NVPD_USER="" - -# ARGS: Additional arguments to set the default persistence mode -# (see nvidia-persistenced(1)) -ARGS="" diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init @@ -1,25 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -pidfile="/var/run/nvidia-persistenced/nvidia-persistenced.pid" - -start() { - if ! [ "${NVPD_USER}x" = x ]; then - ebegin "Starting nvidia-persistenced for ${NVPD_USER}" - NVPD_USER_ARG="--user ${NVPD_USER}" - else - ebegin "Starting nvidia-persistenced" - fi - start-stop-daemon --start --quiet --pidfile ${pidfile} \ - --background --exec /opt/bin/nvidia-persistenced \ - -- ${NVPD_USER_ARG} ${ARGS} - eend $? -} - -stop() { - ebegin "Stopping nvidia-persistenced" - start-stop-daemon --stop --quiet --pidfile ${pidfile} - eend $? -} diff --git a/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf b/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf @@ -1,3 +0,0 @@ -# Nvidia UVM support - -remove nvidia modprobe -r --ignore-remove nvidia-modeset nvidia-uvm nvidia diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop b/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=NVIDIA X Server Settings -Comment=Configure NVIDIA X Server Settings -Exec=/usr/bin/nvidia-settings -Icon=nvidia-settings -Categories=System;Settings; diff --git a/x11-drivers/nvidia-drivers/files/nvidia-smi.init b/x11-drivers/nvidia-drivers/files/nvidia-smi.init @@ -1,25 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -pidfile="/run/nvidia-smi.pid" - -depend() { - after modules -} - -start() { - ebegin "Starting NVIDIA System Management Interface" - rm -f ${pidfile} - start-stop-daemon --start --quiet --pidfile ${pidfile} \ - --make-pidfile --background --exec /opt/bin/nvidia-smi -- \ - -q -l 300 - eend $? -} - -stop() { - ebegin "Stopping NVIDIA System Management Interface" - start-stop-daemon --stop --quiet --pidfile ${pidfile} - eend $? -} diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh @@ -1,17 +0,0 @@ -#!/bin/sh - -if [ $# -ne 1 ]; then - echo "Invalid args" >&2 - exit 1 -fi - -case $1 in - add|ADD) - /opt/bin/nvidia-smi > /dev/null - ;; - remove|REMOVE) - rm -f /dev/nvidia* - ;; -esac - -exit 0 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 @@ -1,20 +0,0 @@ -#!/bin/sh - -if [ $# -ne 1 ]; then - echo "Invalid args" >&2 - exit 1 -fi - -case $1 in - add|ADD) - #hopefully this prevents infinite loops like bug #454740 - if lsmod | grep -iq nvidia; then - /opt/bin/nvidia-smi > /dev/null - fi - ;; - remove|REMOVE) - rm -f /dev/nvidia* - ;; -esac - -exit 0 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-uvm.conf b/x11-drivers/nvidia-drivers/files/nvidia-uvm.conf @@ -1,3 +0,0 @@ -# Nvidia UVM support - -remove nvidia modprobe -r --ignore-remove nvidia-uvm nvidia diff --git a/x11-drivers/nvidia-drivers/files/nvidia.udev-rule b/x11-drivers/nvidia-drivers/files/nvidia.udev-rule @@ -1,6 +0,0 @@ -ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" -# Previously the ACTION was "add|remove" but one user on bug #376527 had a -# problem until he recompiled udev-171-r5, which is one of the versions I -# tested with and it was fine. I'm breaking the rules out just to be safe -# so someone else doesn't have an issue -ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="person"> - <email>jer@gentoo.org</email> -</maintainer> -<maintainer type="project"> - <email>hardened@gentoo.org</email> -</maintainer> -<longdescription> -Nvidia provides different branches of its drivers for different batches of its -hardware. When maintaining these ebuilds or other ebuilds depending on them, -you will need to keep in mind that the major versions represent these different -branches. -</longdescription> -<use> - <flag name="compat">Install non-GLVND libGL for backwards compatibility</flag> - <flag name="driver">Install the kernel driver module</flag> - <flag name="X">Install the X.org driver, OpenGL libraries, XvMC libraries, and VDPAU libraries</flag> - <flag name="gtk2">Install nvidia-settings with support for GTK+ 2</flag> - <flag name="gtk3">Install nvidia-settings with support for GTK+ 3</flag> - <flag name="kms">Enable support for kernel mode setting (KMS)</flag> - <flag name="pax_kernel">PaX patches from the PaX project</flag> - <flag name="tools">Install additional tools such as nvidia-settings</flag> - <flag name="uvm">Install the Unified Memory kernel module (nvidia-uvm) for sharing memory between CPU and GPU in CUDA programs</flag> -</use> -</pkgmetadata> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-370.28.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-370.28.ebuild @@ -1,551 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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}" -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${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/ http://www.nvidia.com/Download/Find.aspx" -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? ( 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" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel 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 ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 8; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.8" - ewarn "<sys-kernel/vanilla-sources-4.8" - 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="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" - use x86 && CONFIG_CHECK+=" ~HIGHMEM" - - # Now do the above checks - use kernel_linux && check_extra_config -} - -pkg_setup() { - # 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() { - epatch "${FILESDIR}"/${P}-profiles-rc.patch - - if use pax_kernel; then - ewarn "Using PAX patches is not supported. You will be asked to" - ewarn "use a standard kernel should you have issues. Should you" - ewarn "need support with these patches, contact the PaX team." - epatch "${FILESDIR}"/${PN}-364.12-pax.patch - fi - - # Allow user patches so they can support RC kernels and whatever else - epatch_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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - doins "${FILESDIR}"/nvidia-rmmod.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 - - # 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 0: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)" \ - 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${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.${NV_SOVER}" - ) - 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 ${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-375.26.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-375.26.ebuild @@ -1,554 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils flag-o-matic 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}" -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${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/ http://www.nvidia.com/Download/Find.aspx" -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? ( - 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" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel 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 ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland ) - X? ( - <x11-base/xorg-server-1.19.99:= - >=x11-libs/libvdpau-1.0 - 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 10; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.10" - ewarn "<sys-kernel/vanilla-sources-4.10" - 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="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" - use x86 && CONFIG_CHECK+=" ~HIGHMEM" - - # Now do the above checks - use kernel_linux && check_extra_config -} - -pkg_setup() { - # 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() { - eapply "${FILESDIR}"/${P}-profiles-rc.patch - - if use pax_kernel; then - ewarn "Using PAX patches is not supported. You will be asked to" - ewarn "use a standard kernel should you have issues. Should you" - ewarn "need support with these patches, contact the PaX team." - eapply "${FILESDIR}"/${PN}-375.20-pax.patch - fi - - # 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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - doins "${FILESDIR}"/nvidia-rmmod.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 - - # 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 - 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 - - docinto html - dodoc -r ${NV_DOC}/html/* - - # 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 0: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)" \ - 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" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${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.${NV_SOVER}" - ) - 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 ${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 -}