diff options
author | Andrew Shark | 2021-01-28 06:27:05 +0300 |
---|---|---|
committer | Andrew Shark | 2021-01-28 06:27:05 +0300 |
commit | f83f821ff893ba16a26768329d4088afdee626fb (patch) | |
tree | 967f8cade8ad292cfae0fc691dd10a38e978b41f | |
parent | 6094aebf8ec005a950b14e3b4af779b757b34871 (diff) | |
download | aur-f83f821ff893ba16a26768329d4088afdee626fb.tar.gz |
20.45_1188099-5
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rwxr-xr-x | progl | 30 | ||||
-rw-r--r-- | progl.bash-completion | 1 |
4 files changed, 59 insertions, 6 deletions
@@ -1,20 +1,24 @@ pkgbase = amdgpu-pro-installer pkgver = 20.45_1188099 - pkgrel = 4 + pkgrel = 5 url = https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-30 arch = x86_64 groups = Radeon_Software_for_Linux license = custom: multiple makedepends = wget source = https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz + source = progl + source = progl.bash-completion sha256sums = a4040db7822cde36c0783912428e1b4897ecdacb9b3d21d716357dae6e4fc6b7 + sha256sums = feb74796c3152cbafaba89d96e68a152f209bd3058c7eb0413cbe1ab0764e96f + sha256sums = e32801c38b475cd8df17a407726b86db3de26410f563d688325b4d4314fc5354 pkgname = amf-amdgpu-pro pkgdesc = AMDGPU Pro Advanced Multimedia Framework license = custom: AMDGPU-PRO EULA depends = libglvnd depends = libx11 - depends = vulkan-amdgpu-pro=20.45_1188099-4 + depends = vulkan-amdgpu-pro=20.45_1188099-5 pkgname = amdgpu-pro-libgl pkgdesc = AMDGPU Pro OpenGL driver @@ -33,7 +37,7 @@ pkgname = amdgpu-pro-libgl pkgname = lib32-amdgpu-pro-libgl pkgdesc = AMDGPU Pro OpenGL driver (32-bit) license = custom: AMDGPU-PRO EULA - depends = amdgpu-pro-libgl=20.45_1188099-4 + depends = amdgpu-pro-libgl=20.45_1188099-5 depends = lib32-libdrm depends = lib32-libx11 depends = lib32-libxcb @@ -17,7 +17,7 @@ vulkan-amdgpu-pro lib32-vulkan-amdgpu-pro ) pkgver=${major}_${minor} -pkgrel=4 +pkgrel=5 arch=('x86_64') url=https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-30 license=('custom: multiple') @@ -26,8 +26,12 @@ makedepends=('wget') DLAGENTS='https::/usr/bin/wget --referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-30 -N %u' -source=(https://drivers.amd.com/drivers/linux/amdgpu-pro-${major}-${minor}-ubuntu-${ubuntu_ver}.tar.xz) -sha256sums=(a4040db7822cde36c0783912428e1b4897ecdacb9b3d21d716357dae6e4fc6b7) +source=(https://drivers.amd.com/drivers/linux/amdgpu-pro-${major}-${minor}-ubuntu-${ubuntu_ver}.tar.xz + progl + progl.bash-completion) +sha256sums=(a4040db7822cde36c0783912428e1b4897ecdacb9b3d21d716357dae6e4fc6b7 + feb74796c3152cbafaba89d96e68a152f209bd3058c7eb0413cbe1ab0764e96f + e32801c38b475cd8df17a407726b86db3de26410f563d688325b4d4314fc5354) @@ -89,6 +93,17 @@ package_amdgpu-pro-libgl () { extract_deb "${srcdir}"/amdgpu-pro-${major}-${minor}-ubuntu-${ubuntu_ver}/libglapi1-amdgpu-pro_${major}-${minor}_amd64.deb extract_deb "${srcdir}"/amdgpu-pro-${major}-${minor}-ubuntu-${ubuntu_ver}/libgles2-amdgpu-pro_${major}-${minor}_amd64.deb move_copyright + + # extra_commands: + move_libdir "usr/lib/x86_64-linux-gnu" "usr/lib" + move_libdir "opt/amdgpu-pro/lib/x86_64-linux-gnu" "usr/lib/amdgpu-pro" + move_libdir "opt/amdgpu-pro/lib/xorg" "usr/lib/amdgpu-pro/xorg" + move_libdir "opt/amdgpu/share/drirc.d" "usr/share/drirc.d" + sed -i "s|/opt/amdgpu-pro/lib/x86_64-linux-gnu|#/usr/lib/amdgpu-pro # commented to prevent problems of booting with amdgpu-pro, use progl script|" "${pkgdir}"/etc/ld.so.conf.d/10-amdgpu-pro-x86_64.conf + install -Dm755 "${srcdir}"/progl "${pkgdir}"/usr/bin/progl + install -Dm755 "${srcdir}"/progl.bash-completion "${pkgdir}"/usr/share/bash-completion/completions/progl + # For some reason, applications started with normal OpenGL (i.e. without ag pro) crashes at launch if this conf file is presented, so hide it for now, until I find out the reason of that. + mv "${pkgdir}"/usr/share/drirc.d/10-amdgpu-pro.conf "${pkgdir}"/usr/share/drirc.d/10-amdgpu-pro.conf.hide } package_lib32-amdgpu-pro-libgl () { @@ -108,6 +123,9 @@ package_lib32-amdgpu-pro-libgl () { # extra_commands: rm "${pkgdir}"/etc/amd/amdrc "${pkgdir}"/opt/amdgpu-pro/lib/xorg/modules/extensions/libglx.so "${pkgdir}"/opt/amdgpu/share/drirc.d/10-amdgpu-pro.conf + move_libdir "usr/lib/i386-linux-gnu" "usr/lib32" + move_libdir "opt/amdgpu-pro/lib/i386-linux-gnu" "usr/lib32/amdgpu-pro" + sed -i "s|/opt/amdgpu-pro/lib/i386-linux-gnu|#/usr/lib32/amdgpu-pro # commented to prevent problems of booting with amdgpu-pro, use progl32 script|" "${pkgdir}"/etc/ld.so.conf.d/10-amdgpu-pro-i386.conf } package_vulkan-amdgpu-pro () { diff --git a/progl b/progl new file mode 100755 index 000000000000..a872bc65bdbb --- /dev/null +++ b/progl @@ -0,0 +1,30 @@ +#!/bin/bash + +# This script applies amdgpu-pro OpenGL driver for specific application. +# For example, running "$ progl davinci-resolve" will start DR with AMDGPU PRO driver. +# You can test the difference (GL_VENDOR, GL_RENDERER, GL_VERSION) with glmark2 utility. + +progl() { + export LD_LIBRARY_PATH="/usr/lib/amdgpu-pro/:${LD_LIBRARY_PATH}" +# export LIBGL_DRIVERS_PATH="/usr/lib/dri/" # unneeded, because already a system path +} + +progl32() { + export LD_LIBRARY_PATH="/usr/lib32/amdgpu-pro/:${LD_LIBRARY_PATH}" +# export LIBGL_DRIVERS_PATH="/usr/lib32/dri/" # unneeded, because already a system path +} + +# export dri_driver="amdgpu" # Do not know if needed, there is already a file in drirc.d, is not it sufficient? + + +if [[ $(basename $0) == progl ]]; then + progl +elif [[ $(basename $0) == progl32 ]]; then + progl32 +else + echo "Unknown function" + exit 1 +fi + +# applied variables, now execute the rest of the command +"$@" diff --git a/progl.bash-completion b/progl.bash-completion new file mode 100644 index 000000000000..394af7f36c92 --- /dev/null +++ b/progl.bash-completion @@ -0,0 +1 @@ +_have progl && complete -F _command progl |