summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-02-08 09:57:13 +0100
committerDavid Seifert <soap@gentoo.org>2021-02-08 09:57:13 +0100
commitc69bf17e826fd34d1ce705ba9e9698c6f4439a25 (patch)
tree1c79636c78ed58b4aa5140315ff8af5a12a623a2 /x11-drivers
parentx11-drivers/nvidia-drivers: Version bump to 390.141 (diff)
downloadgentoo-c69bf17e826fd34d1ce705ba9e9698c6f4439a25.tar.gz
gentoo-c69bf17e826fd34d1ce705ba9e9698c6f4439a25.tar.bz2
gentoo-c69bf17e826fd34d1ce705ba9e9698c6f4439a25.zip
x11-drivers/nvidia-drivers: 390.141 remove dead code
* Remove FreeBSD support * Remove eselect-opengl codepaths * Remove GTK2 dependency Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest3
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.141.ebuild383
2 files changed, 129 insertions, 257 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 67de309e1202..9da92616564f 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -1,14 +1,11 @@
DIST NVIDIA-FreeBSD-x86-390.138.tar.gz 65940848 BLAKE2B ea40a0289012425ee1fa1c74cb5963ac3d7e0992dc55255bb1c20fc8391fce772bf8ab97458047307211865c4e0239acad1196ec88c0259a9e6f70103c2888ec SHA512 32d66398af1edfd4b72a8e1e84ad8a3bcdb18d1c92f5cca5fcaca82d3ed73d40e55b403693a7896735b55a758ddf03437811f6ca7c082c8f85de9112da037713
-DIST NVIDIA-FreeBSD-x86-390.141.tar.gz 65965659 BLAKE2B ada76a7561405f36b516e7ed83129f23b9715be024cfa309ce1ab9e105581239a0596ce08d01849970a700d7546930facf2d8edbd647edf63bd32a4ec933539d SHA512 15f313f9d2a44dcf95df5fb8d19bc9f2bb89dfb5b527470bfb9dda7e0d3f3d38a28d3fcc9f453f836224349b397c0aa6a9a55be619f258741c5b4ae0d3e0be3c
DIST NVIDIA-FreeBSD-x86_64-390.138.tar.gz 65280213 BLAKE2B 36d5651ceaf90cefcf9e844f8f5810ac42bebca2ca47318b27606c1401d8f343fc7b2619a5405dee9d5d64ec98379b0582f6d5fe5dd4df1269ba48332a6a5ec2 SHA512 fb61e19010826e5c2e403ecc12e19ee28517682599100804d74be92a9e3c6688b51dafa6c6703a5a0d080b0ca16495792fec3badf9cab959321cc401e72520a3
-DIST NVIDIA-FreeBSD-x86_64-390.141.tar.gz 65303462 BLAKE2B d1a8359a54cde50b156cc83f52f9d9fca15a92643819e6c83b5d30c739be8e8688c99f5e5f9002b072042eb91d7cd04de80ef335eb4a53c3291e1059fd455545 SHA512 58c8a6e643ecdbdac0300146853f64067b1f514d1dcc46e3884da5d26409cd2ef3fc65d84bd00b4295d71b267cb71ecd7471afe7a3e3a663f8a951a50749304f
DIST NVIDIA-FreeBSD-x86_64-435.21.tar.gz 64153630 BLAKE2B fee655cc843c004ac0c1ec85b9417292016a013136e04ad047d2513edbdc7c732561d6bcc4603c658905972dce6618de49d4d6ac583e84fdf212cf45397b48c1 SHA512 2c160c06ca58e3009deb1ba4a4a28d39419e251ced3bfa9a442942f9cce17003d67e8a8bfa23036d3916cc0e66f4bff0fbedaae73db6f10b995235a56d7eba7c
DIST NVIDIA-FreeBSD-x86_64-440.100.tar.gz 82523267 BLAKE2B 9d8eddcf3a58787a03fab207c197d722ff047f8bc840ea41e8d38815fbfab9e54759b9fbeaa26e3d147f54cb4a510eec421708d3bbb21197922f4dc175ed6df5 SHA512 96f57e1f308f0e5f00ef09a128e91a68ac55033893000e84cf4ff1a910a88798743c911b3effcc26c3f27ae224b733d8c2f87e9ec0596149f65ad7bcd71edbc5
DIST NVIDIA-FreeBSD-x86_64-450.80.02.tar.gz 83040706 BLAKE2B d97bae80f6fdcec12fd12af0296f9ba44487cc83c86c14bc9f17d52e0e81107e1eaddd411d06d1bfd27c73bcf71300f7f49218d2a031540c0b42cd62998ef9aa SHA512 6dca92f20102a0432c6b92b7897a2ff5ec3da234af72907539026e18b1da55fc3ae01dc875be07ce9cae808ae4f9c08d2a2af1171db038c37bbba6ca9d03cf3a
DIST NVIDIA-FreeBSD-x86_64-455.45.01.tar.gz 116070033 BLAKE2B 4a724ce58fb7164d12b50d1388a2a471903f4aa834cf606adf572e667ef7c1fec7bc291310fdca2d271709fed017b8f361a39bc495d616e6056a4c0afa2443b5 SHA512 4999911944f76fa759126308ac48d0a770e57966c7783e02370f45d9451a50d6015642b385465d4fc800df8c35655b78d90f7c9a8df82bdf81db8be12eacbe87
DIST NVIDIA-FreeBSD-x86_64-460.27.04.tar.gz 103234112 BLAKE2B a631425c00240dabdd1bd4dcc18945c4216352667cdd0c01b465486024cea215ee2423773ead2e22246337a2387b54ae2e16775b0727d57304b53f7ce6648ad7 SHA512 1308f14ae1100471a5aabece85403772cdd1abac44a725c53d33d9f0ee27a83dbd2088c60662f44a6f7d1fe91b43311b767790dcc5787c50546ffbabb62ded1a
DIST NVIDIA-Linux-armv7l-gnueabihf-390.138.run 28540622 BLAKE2B 342852dd6fa371f86d19547d73edef582fe3f04cf4f6e9ec247767951180671ba46f3ed2ee7bab11b0cf2f8bb1eb846b1d7481d318789c14ce79b54fefe0f830 SHA512 e04b8aca202c1df305f7b67ec372322494fa7b77f27cbf04f240527dcac0ce3ffa5e0e9df36b52045ac13fbc2f84b5033784040884ed19072f66f41385d11b97
-DIST NVIDIA-Linux-armv7l-gnueabihf-390.141.run 30011657 BLAKE2B 501a32c875e01a95561de579a175eba158e6ea4d64bd6fbc2a085edcfd17cb1ad221a8e9acf34f028428cb2023a8180d441815ae892a0bc39439e84ba10aaf82 SHA512 646be832b7d9c45e8dab40c711c48eacd31c7c3beb4933874473077a1421586bf75aa1e6db3c4f3d4434f7ce0b27ccae8a75a7b75cceef07e0528123cece91ab
DIST NVIDIA-Linux-x86-390.138.run 49091672 BLAKE2B 465f025041aafdb03699babdb97380b73c2d7a0568bf2ffe4f3830974457d29eec28dbdf2742bfb1508f00eb6f5d4697f03726561b470b479eb9caa940113bdc SHA512 f6c1e388a6801f0557e34ce9094f99e1a87510c3c620f0ecd9959a6e3bb0a313a8b991c8da319d60531e6a1e2f098d94bc88b12b63c624930295f0e05bb4f9ae
DIST NVIDIA-Linux-x86-390.141.run 49589744 BLAKE2B 304672806b89885adbf8459ea99ca872769e44a42ff041a5b79ef05d113d7717f505f543441e7a2fc6c569f6d66391f0380a4f23f3e68108c8de817bf251f850 SHA512 6dfde3b54520070954b45f6bc071251084e1741f55e582b1abd806eb367e4b9ce0015615bf6a887fa784d075b3db08b6940da4163b960969773d1bdc52b4961e
DIST NVIDIA-Linux-x86_64-390.138.run 83780873 BLAKE2B 5e6a9d77dd2b9de17d923198105a9227ffe2adbc1ed7c9dd5ef3cc810358f71ae47ce9615cbe04f36090f052082a2066772505fd763cbfdbce272f0fb7c25dc7 SHA512 2984fb8f5de598fd3031ebd928942ceb09fd26ae9e61b40b2d348e3174e172a932a1b2a5c2e5534f299b883ade323932be4fdcd26d6f7235a17f6f5a04fa792c
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.141.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.141.ebuild
index eed90337a65d..c0f539d3fe98 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.141.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.141.ebuild
@@ -2,51 +2,40 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+
inherit desktop flag-o-matic linux-info linux-mod multilib-minimal \
- nvidia-driver portability toolchain-funcs unpacker udev
+ nvidia-driver toolchain-funcs unpacker udev
-AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
-X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
NV_URI="https://us.download.nvidia.com/XFree86/"
SRC_URI="
- amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
- arm? ( ${NV_URI}Linux-x86-ARM/${PV}/${ARM_NV_PACKAGE}.run )
- x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
tools? (
https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
- )
-"
+ )"
EMULTILIB_PKG="true"
-KEYWORDS="-* ~amd64 ~x86"
+
LICENSE="GPL-2 NVIDIA-r2"
SLOT="0/${PV%%.*}"
-
-IUSE="compat +driver gtk3 kernel_FreeBSD kernel_linux +kms +libglvnd multilib static-libs +tools uvm wayland +X"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="compat +driver +kms multilib static-libs +tools uvm wayland +X"
REQUIRED_USE="
tools? ( X )
- static-libs? ( tools )
-"
+ static-libs? ( tools )"
COMMON="
- driver? ( kernel_linux? ( acct-group/video ) )
- kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ driver? ( acct-group/video )
tools? (
dev-libs/atk
dev-libs/glib:2
dev-libs/jansson
- gtk3? (
- x11-libs/gtk+:3
- )
x11-libs/cairo
x11-libs/gdk-pixbuf
- x11-libs/gtk+:2
+ x11-libs/gtk+:3
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
@@ -55,19 +44,13 @@ COMMON="
x11-libs/pango[X]
)
X? (
- !libglvnd? ( >=app-eselect/eselect-opengl-1.0.9 )
- libglvnd? (
- media-libs/libglvnd[X,${MULTILIB_USEDEP}]
- !app-eselect/eselect-opengl
- )
app-misc/pax-utils
- )
-"
+ media-libs/libglvnd[X,${MULTILIB_USEDEP}]
+ )"
DEPEND="
${COMMON}
- kernel_linux? ( virtual/linux-sources )
- tools? ( sys-apps/dbus )
-"
+ virtual/linux-sources
+ tools? ( sys-apps/dbus )"
RDEPEND="
${COMMON}
uvm? ( >=virtual/opencl-3 )
@@ -78,19 +61,18 @@ RDEPEND="
>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
>=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
+ )"
+
QA_PREBUILT="opt/* usr/lib*"
-S=${WORKDIR}/
-NV_KV_MAX_PLUS="5.8"
+S="${WORKDIR}"
+NV_KV_MAX_PLUS="5.11"
CONFIG_CHECK="
!DEBUG_MUTEXES
~!I2C_NVIDIA_GPU
~!LOCKDEP
~DRM
~DRM_KMS_HELPER
- ~SYSVIPC
-"
+ ~SYSVIPC"
pkg_pretend() {
use x86 && CONFIG_CHECK+=" ~HIGHMEM"
@@ -105,7 +87,7 @@ pkg_setup() {
export DISTCC_DISABLE=1
export CCACHE_DISABLE=1
- if use driver && use kernel_linux; then
+ if use driver; then
MODULE_NAMES="nvidia(video:${S}/kernel)"
use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
@@ -116,46 +98,18 @@ pkg_setup() {
linux-mod_pkg_setup
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
- SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
# linux-mod_src_compile calls set_arch_to_kernel, which
# sets the ARCH to x86 but NVIDIA's wrapping Makefile
# expects x86_64 or i386 and then converts it to x86
# later on in the build process
BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
-
- if kernel_is lt 2 6 9; then
- eerror "You must build this against 2.6.9 or higher kernels."
- fi
- fi
-
- # set variables to where files are in the package structure
- if use kernel_FreeBSD; then
- use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
- use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
- NV_DOC="${S}/doc"
- NV_OBJ="${S}/obj"
- NV_SRC="${S}/src"
- NV_MAN="${S}/x11/man"
- NV_X11="${S}/obj"
- NV_SOVER=1
- elif use kernel_linux; then
- NV_DOC="${S}"
- NV_OBJ="${S}"
- NV_SRC="${S}/kernel"
- NV_MAN="${S}"
- NV_X11="${S}"
- NV_SOVER=${PV}
- else
- die "Could not determine proper NVIDIA package"
fi
}
src_prepare() {
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
+ gunzip *1.gz || die
if use tools; then
cp "${FILESDIR}"/nvidia-settings-fno-common.patch "${WORKDIR}" || die
@@ -167,52 +121,50 @@ src_prepare() {
|| die
eapply "${WORKDIR}"/nvidia-settings-fno-common.patch
eapply "${WORKDIR}"/nvidia-settings-linker.patch
+
+ # remove GTK2 support entirely (#592730)
+ sed -i \
+ -e '/^GTK2LIB = /d;/INSTALL.*GTK2LIB/,+1d' \
+ nvidia-settings-${PV}/src/Makefile || die
fi
default
- if ! [ -f nvidia_icd.json ]; then
+ if ! [[ -f nvidia_icd.json ]]; then
cp nvidia_icd.json.template nvidia_icd.json || die
sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
fi
sed "s:%LIBDIR%:$(get_libdir):g" "${FILESDIR}/nvidia-390.conf" \
- > "${T}/nvidia-390.conf" || die
+ > "${T}"/nvidia-390.conf || die
+}
+
+src_configure() {
+ tc-export AR CC LD OBJCOPY
+ default
}
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
+ pushd kernel >/dev/null || die
+ if use driver; then
BUILD_TARGETS=module linux-mod_src_compile \
KERNELRELEASE="${KV_FULL}" \
src="${KERNEL_DIR}"
fi
+ popd >/dev/null || die
if use tools; then
- emake -C "${S}"/nvidia-settings-${PV}/src \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
+ emake -C nvidia-settings-${PV}/src \
DO_STRIP= \
- LD="$(tc-getCC)" \
LIBDIR="$(get_libdir)" \
NVLD="$(tc-getLD)" \
NV_VERBOSE=1 \
RANLIB="$(tc-getRANLIB)" \
build-xnvctrl
- emake -C "${S}"/nvidia-settings-${PV}/src \
- CC="$(tc-getCC)" \
- OBJCOPY="$(tc-getOBJCOPY)" \
+ emake -C nvidia-settings-${PV}/src \
DO_STRIP= \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LD="$(tc-getCC)" \
+ GTK3_AVAILABLE=1 \
LIBDIR="$(get_libdir)" \
NVLD="$(tc-getLD)" \
NVML_ENABLED=0 \
@@ -238,7 +190,7 @@ donvidia() {
# Get just the library name
nv_LIBNAME=$(basename "${nv_LIB}")
- if [[ "${nv_DEST}" ]]; then
+ if [[ -n ${nv_DEST} ]]; then
exeinto ${nv_DEST}
action="doexe"
else
@@ -251,7 +203,7 @@ donvidia() {
# If the library has a SONAME and SONAME does not match the library name,
# then we need to create a symlink
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+ if [[ -n ${nv_SOVER} && ${nv_SOVER} != ${nv_LIBNAME} ]]; then
dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER}
fi
@@ -259,7 +211,7 @@ donvidia() {
}
src_install() {
- if use driver && use kernel_linux; then
+ if use driver; then
linux-mod_src_install
# Add the aliases
@@ -280,113 +232,92 @@ src_install() {
exeinto "$(get_udevdir)"
newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
- elif use kernel_FreeBSD; then
- if use x86-fbsd; then
- insinto /boot/modules
- doins "${S}/src/nvidia.kld"
- fi
-
- exeinto /boot/modules
- doexe "${S}/src/nvidia.ko"
fi
# NVIDIA kernel <-> userspace driver config lib
- donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+ donvidia libnvidia-cfg.so.${PV}
# NVIDIA framebuffer capture library
- donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+ donvidia libnvidia-fbc.so.${PV}
# NVIDIA video encode/decode <-> CUDA
- if use kernel_linux; then
- donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
- fi
+ donvidia libnvcuvid.so.${PV}
+ donvidia libnvidia-encode.so.${PV}
if use X; then
# Xorg DDX driver
- insinto /usr/$(get_libdir)/xorg/modules/drivers
- doins ${NV_X11}/nvidia_drv.so
+ exeinto /usr/$(get_libdir)/xorg/modules/drivers
+ doexe nvidia_drv.so
# Xorg GLX driver
- if use libglvnd; then
- local extensions_dir="/usr/$(get_libdir)/extensions/nvidia"
- else
- local extensions_dir="/usr/$(get_libdir)/opengl/nvidia/extensions/"
- fi
- donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
- "${extensions_dir}"
+ donvidia libglx.so.${PV} \
+ /usr/$(get_libdir)/extensions/nvidia
# Xorg nvidia.conf
- if has_version '>=x11-base/xorg-server-1.16'; then
- insinto /usr/share/X11/xorg.conf.d
- newins {,50-}nvidia-drm-outputclass.conf
- fi
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
+ doins 10_nvidia.json
fi
if use wayland; then
insinto /usr/share/egl/egl_external_platform.d
- doins ${NV_X11}/10_nvidia_wayland.json
+ doins 10_nvidia_wayland.json
fi
# OpenCL ICD for NVIDIA
- if use kernel_linux; then
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
- fi
+ insinto /etc/OpenCL/vendors
+ doins nvidia.icd
# Helper Apps
exeinto /opt/bin/
if use X; then
- doexe ${NV_OBJ}/nvidia-xconfig
+ doexe nvidia-xconfig
insinto /etc/vulkan/icd.d
doins nvidia_icd.json
insinto /etc/X11/xorg.conf.d
- doins ${T}/nvidia-390.conf
+ doins "${T}"/nvidia-390.conf
fi
- if use kernel_linux; then
- doexe ${NV_OBJ}/nvidia-cuda-mps-control
- doexe ${NV_OBJ}/nvidia-cuda-mps-server
- doexe ${NV_OBJ}/nvidia-debugdump
- doexe ${NV_OBJ}/nvidia-persistenced
- doexe ${NV_OBJ}/nvidia-smi
-
- # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
- doexe ${NV_OBJ}/nvidia-modprobe
- fowners root:video /opt/bin/nvidia-modprobe
- fperms 4710 /opt/bin/nvidia-modprobe
- dosym /{opt,usr}/bin/nvidia-modprobe
-
- doman nvidia-cuda-mps-control.1
- doman nvidia-modprobe.1
- doman nvidia-persistenced.1
- newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
- newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
- newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
- fi
+ doexe nvidia-cuda-mps-control
+ doexe nvidia-cuda-mps-server
+ doexe nvidia-debugdump
+ doexe nvidia-persistenced
+ doexe nvidia-smi
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym ../../opt/bin/nvidia-modprobe /usr/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
if use tools; then
- emake -C "${S}"/nvidia-settings-${PV}/src/ \
- DESTDIR="${D}" \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LIBDIR="${D}/usr/$(get_libdir)" \
+ emake -C nvidia-settings-${PV}/src/ \
+ DESTDIR="${ED}" \
+ DO_STRIP= \
+ GTK3_AVAILABLE=1 \
+ LIBDIR="${ED}/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
+ dolib.a nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
insinto /usr/include/NVCtrl
- doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ doins nvidia-settings-${PV}/src/libXNVCtrl/*.h
fi
insinto /usr/share/nvidia/
@@ -396,17 +327,14 @@ src_install() {
newins \
nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
- # There is no icon in the FreeBSD tarball.
- use kernel_FreeBSD || \
- doicon ${NV_OBJ}/nvidia-settings.png
-
+ doicon nvidia-settings.png
domenu "${FILESDIR}"/nvidia-settings.desktop
exeinto /etc/X11/xinit/xinitrc.d
newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
fi
- dobin ${NV_OBJ}/nvidia-bug-report.sh
+ dobin nvidia-bug-report.sh
if has_multilib_profile && use multilib; then
local OABI=${ABI}
@@ -422,140 +350,100 @@ src_install() {
is_final_abi || die "failed to iterate through all ABIs"
# Documentation
- if use kernel_FreeBSD; then
- dodoc "${NV_DOC}/README"
- use X && doman "${NV_MAN}"/nvidia-xconfig.1
- use tools && doman "${NV_MAN}"/nvidia-settings.1
- else
- # Docs
- newdoc "${NV_DOC}/README.txt" README
- dodoc "${NV_DOC}/NVIDIA_Changelog"
- doman "${NV_MAN}"/nvidia-smi.1
- use X && doman "${NV_MAN}"/nvidia-xconfig.1
- use tools && doman "${NV_MAN}"/nvidia-settings.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- fi
+ newdoc README.txt README
+ dodoc NVIDIA_Changelog
+ doman nvidia-smi.1
+ use X && doman nvidia-xconfig.1
+ use tools && doman nvidia-settings.1
+ doman nvidia-cuda-mps-control.1
readme.gentoo_create_doc
docinto html
- dodoc -r ${NV_DOC}/html/*
+ dodoc -r html/.
}
src_install-libs() {
local inslibdir=$(get_libdir)
- if use libglvnd; then
- local GL_ROOT="/usr/$(get_libdir)"
- else
- local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
- fi
+ local GL_ROOT="/usr/$(get_libdir)"
local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
- local nv_libdir="${NV_OBJ}"
+ local nv_libdir="${S}"
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
+ if has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+ nv_libdir="${S}"/32
fi
if use X; then
NV_GLX_LIBRARIES=(
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libEGL_nvidia.so.${PV} ${GL_ROOT}"
+ "libGLESv1_CM_nvidia.so.${PV} ${GL_ROOT}"
+ "libGLESv2_nvidia.so.${PV} ${GL_ROOT}"
+ "libGLX_nvidia.so.${PV} ${GL_ROOT}"
"libOpenCL.so.1.0.0 ${CL_ROOT}"
- "libcuda.so.${NV_SOVER}"
- "libnvcuvid.so.${NV_SOVER}"
- "libnvidia-compiler.so.${NV_SOVER}"
- "libnvidia-eglcore.so.${NV_SOVER}"
- "libnvidia-encode.so.${NV_SOVER}"
- "libnvidia-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}"
+ "libcuda.so.${PV}"
+ "libnvcuvid.so.${PV}"
+ "libnvidia-compiler.so.${PV}"
+ "libnvidia-eglcore.so.${PV}"
+ "libnvidia-encode.so.${PV}"
+ "libnvidia-fatbinaryloader.so.${PV}"
+ "libnvidia-fbc.so.${PV}"
+ "libnvidia-glcore.so.${PV}"
+ "libnvidia-glsi.so.${PV}"
+ "libnvidia-ifr.so.${PV}"
+ "libnvidia-opencl.so.${PV}"
+ "libnvidia-ptxjitcompiler.so.${PV}"
+ "libvdpau_nvidia.so.${PV}"
)
- if ! use libglvnd; then
- NV_GLX_LIBRARIES+=(
- "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
- "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
- "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
- "libGLESv2.so.2.1.0 ${GL_ROOT}"
- "libGLX.so.0 ${GL_ROOT}"
- "libGLdispatch.so.0 ${GL_ROOT}"
- "libOpenGL.so.0 ${GL_ROOT}"
- )
- fi
- if use wayland && [[ ${ABI} == "amd64" ]];
- then
+ if use wayland && [[ ${ABI} == "amd64" ]]; then
NV_GLX_LIBRARIES+=(
"libnvidia-egl-wayland.so.1.0.2"
)
fi
- if use kernel_linux && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-wfb.so.${NV_SOVER}"
- )
- fi
-
- if use kernel_FreeBSD; then
+ if [[ ${ABI} == "amd64" ]]; then
NV_GLX_LIBRARIES+=(
- "libnvidia-tls.so.${NV_SOVER}"
+ "libnvidia-wfb.so.${PV}"
)
fi
- if use kernel_linux; then
- NV_GLX_LIBRARIES+=(
- "libnvidia-ml.so.${NV_SOVER}"
- "tls/libnvidia-tls.so.${NV_SOVER}"
- )
- fi
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-ml.so.${PV}"
+ "tls/libnvidia-tls.so.${PV}"
+ )
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
+ local nv_lib
+ for nv_lib in "${NV_GLX_LIBRARIES[@]}"; do
+ donvidia "${nv_libdir}"/${nv_lib}
done
fi
}
pkg_preinst() {
- if use driver && use kernel_linux; then
+ if use driver; then
linux-mod_pkg_preinst
local videogroup="$(getent group video | cut -d ':' -f 3)"
- if [ -z "${videogroup}" ]; then
+ if [[ -z ${videogroup} ]]; then
eerror "Failed to determine the video group gid"
die "Failed to determine the video group gid"
else
sed -i \
-e "s:PACKAGE:${PF}:g" \
-e "s:VIDEOGID:${videogroup}:" \
- "${D}"/etc/modprobe.d/nvidia.conf || die
+ "${ED}"/etc/modprobe.d/nvidia.conf || die
fi
fi
# Clean the dynamic libGL stuff's home to ensure
# we dont have stale libs floating around
- if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
- rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
- fi
+ rm -rf "${EROOT}"/usr/lib/opengl/nvidia/* || die
# Make sure we nuke the old nvidia-glx's env.d file
- if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
- rm -f "${ROOT}"/etc/env.d/09nvidia
- fi
+ rm -f "${EROOT}"/etc/env.d/09nvidia || die
}
pkg_postinst() {
- use driver && use kernel_linux && linux-mod_pkg_postinst
-
- # Switch to the nvidia implementation
- if ! use libglvnd; then
- use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
- fi
+ use driver && linux-mod_pkg_postinst
readme.gentoo_print_elog
@@ -576,16 +464,3 @@ pkg_postinst() {
elog
fi
}
-
-pkg_prerm() {
- if ! use libglvnd; then
- use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
- fi
-}
-
-pkg_postrm() {
- use driver && use kernel_linux && linux-mod_pkg_postrm
- if ! use libglvnd; then
- use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
- fi
-}