blob: 2c3bfefe83eff39991afef5459512a15aa500514 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# Maintainer : Daniel Bermond <dbermond@archlinux.org>
# Contributor: Det <nimetonmaili g-mail>
# Contributor: Ng Oon-Ee
# Contributor: Dan Vratil
# Contributor: Jeremy Sands
# Contributor: Erik Hardesty
# Contributor: josephgbr
pkgbase=lib32-nvidia-utils-beta
pkgname=('lib32-nvidia-utils-beta' 'lib32-opencl-nvidia-beta')
pkgver=565.57.01
pkgrel=1
pkgdesc='NVIDIA drivers utilities (32-bit, beta version)'
arch=('x86_64')
url='https://www.nvidia.com/'
license=('LicenseRef-custom')
makedepends=("nvidia-utils-beta>=${pkgver}") # to avoid conflict during installation in the build chroot
options=('!strip' '!emptydirs')
_pkg="NVIDIA-Linux-${CARCH}-${pkgver}"
source=("https://us.download.nvidia.com/XFree86/Linux-${CARCH}/${pkgver}/${_pkg}.run")
sha256sums=('6eebe94e585e385e8804f5a74152df414887bf819cc21bd95b72acd0fb182c7a')
# create soname links
_create_links() {
local _lib
local _soname
local _base
find "$pkgdir" -type f -name '*.so*' ! -path '*xorg/*' -print0 | while read -d $'\0' _lib
do
_soname="$(dirname "$_lib")/$(readelf -d "$_lib" | grep -Po 'SONAME.*: \[\K[^]]*' || true)"
_base="$(printf '%s' "$_soname" | sed -r 's/(.*).so.*/\1.so/')"
[ -e "$_soname" ] || ln -s "$(basename "$_lib")" "$_soname"
[ -e "$_base" ] || ln -s "$(basename "$_soname")" "$_base"
done
}
prepare() {
# extract the source file
[ -d "$_pkg" ] && rm -rf "$_pkg"
printf '%s\n' " -> Self-Extracting ${_pkg}.run..."
sh "${_pkg}.run" --extract-only
}
package_lib32-opencl-nvidia-beta() {
pkgdesc='OpenCL implemention for NVIDIA (32-bit, beta version)'
depends=('lib32-zlib' 'lib32-gcc-libs' "lib32-nvidia-utils-beta>=${pkgver}")
optdepends=('opencl-headers: headers necessary for OpenCL development')
provides=("lib32-opencl-nvidia=${pkgver}" 'lib32-opencl-driver')
conflicts=('lib32-opencl-nvidia')
cd "${_pkg}/32"
# OpenCL
install -D -m755 "libnvidia-opencl.so.${pkgver}" -t "${pkgdir}/usr/lib32"
_create_links
# license
install -D -m644 "${srcdir}/${_pkg}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
package_lib32-nvidia-utils-beta() {
depends=('lib32-zlib' 'lib32-gcc-libs' 'lib32-libglvnd' "nvidia-utils-beta>=${pkgver}")
optdepends=('lib32-opencl-nvidia-beta: for OpenCL support')
provides=("lib32-nvidia-utils=${pkgver}" 'lib32-vulkan-driver' 'lib32-opengl-driver'
"lib32-nvidia-libgl=${pkgver}" "lib32-nvidia-libgl-beta=${pkgver}")
conflicts=('lib32-nvidia-utils' 'lib32-nvidia-libgl')
replaces=('lib32-nvidia-libgl')
cd "${_pkg}/32"
install -D -m755 "libGLX_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib32"
# OpenGL libraries
install -D -m755 "libEGL_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libGLESv1_CM_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libGLESv2_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib32"
# OpenGL core library
install -D -m755 "libnvidia-glcore.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-eglcore.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-glsi.so.${pkgver}" -t "${pkgdir}/usr/lib32"
# misc
install -D -m755 "libnvidia-fbc.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-encode.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-ml.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-glvkspirv.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-gpucomp.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvidia-allocator.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -d -m755 "${pkgdir}/usr/lib32/gbm"
ln -s "../libnvidia-allocator.so.${pkgver}" "${pkgdir}/usr/lib32/gbm/nvidia-drm_gbm.so"
# VDPAU
install -D -m755 "libvdpau_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib32/vdpau"
# nvidia-tls library
install -D -m755 "libnvidia-tls.so.${pkgver}" -t "${pkgdir}/usr/lib32"
# CUDA
install -D -m755 "libcuda.so.${pkgver}" -t "${pkgdir}/usr/lib32"
install -D -m755 "libnvcuvid.so.${pkgver}" -t "${pkgdir}/usr/lib32"
# PTX JIT Compiler (Parallel Thread Execution (PTX) is a pseudo-assembly language for CUDA)
install -D -m755 "libnvidia-ptxjitcompiler.so.${pkgver}" -t "${pkgdir}/usr/lib32"
# Optical flow
install -D -m755 "libnvidia-opticalflow.so.${pkgver}" -t "${pkgdir}/usr/lib32"
_create_links
# license
install -D -m644 "${srcdir}/${_pkg}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|