Use system-wide Wine, DXVK & D9VK for Steam Play/Proton (Windows) games directly from Linux Steam client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.2 KiB

5 years ago
  1. pkgname=openvr-git
  2. pkgver=1.4.18.r0.g02bc73b
  3. pkgrel=1
  4. pkgdesc="API and runtime that allows access to VR hardware from multiple vendors. Contains API and samples. The runtime is under SteamVR in Tools on Steam."
  5. arch=('x86_64')
  6. url="https://github.com/ValveSoftware/openvr"
  7. license=('custom')
  8. depends=('libgl' 'sdl2' 'glew')
  9. optdepends=('oculus-udev: Udev rule to make the rift sensors usable to the "plugdev" group'
  10. 'steam: For SteamVR (Duh)'
  11. 'vive-udev: Udev rule to make the Vive sensors usable to the "plugdev" group')
  12. makedepends=('git' 'cmake' 'qt5-base') #qt5 for the overlayexample
  13. provides=("openvr")
  14. options=('!strip' 'staticlibs')
  15. source=("git+https://github.com/ValveSoftware/openvr.git"
  16. 'https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch'
  17. '0001-also-add-pragma-pack-around-VRControllerState_t.patch')
  18. md5sums=('SKIP'
  19. '7350517830b1a0038d30c6ad33b4bb39'
  20. '8a9379f8cdf9a38f21942f46378714a5')
  21. pkgver() {
  22. cd "$srcdir/openvr"
  23. #echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
  24. git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  25. }
  26. prepare() {
  27. cd "$srcdir/openvr"
  28. git apply ../0fa21ba17748efcca1816536e27bdca70141b074.patch #https://github.com/ValveSoftware/openvr/pull/594
  29. git apply ../0001-also-add-pragma-pack-around-VRControllerState_t.patch
  30. }
  31. build() {
  32. #export CXX=clang++
  33. #export CC=clang
  34. cd openvr
  35. cmake -DBUILD_SHARED=0 -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release .
  36. make
  37. # Valve's build of libopenvr_api.so contains symbols that have no source code available
  38. # See: https://github.com/ValveSoftware/openvr/issues/425
  39. #cmake -DBUILD_SHARED=1 -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release .
  40. #make
  41. cd samples
  42. cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/ -Wno-dev .
  43. make
  44. }
  45. package() {
  46. #make install DESTDIR="$pkgdir"
  47. #make install DESTDIR="$pkgdir"
  48. install -d "$pkgdir"/usr/lib
  49. install -m 555 openvr/bin/linux64/libopenvr_api.so "$pkgdir/usr/lib"
  50. install -m 555 openvr/bin/linux64/libopenvr_api.a "$pkgdir/usr/lib"
  51. #make install DESTDIR="$pkgdir" #There is no installer for the samples
  52. install -d "$pkgdir/usr/bin"
  53. install -d "$pkgdir/usr/shaders"
  54. install -m 755 "$srcdir/openvr/samples/bin/linux64/hellovr_vulkan" "$pkgdir/usr/bin"
  55. for shader in "$srcdir/openvr/samples/bin/shaders/"*.spv
  56. do
  57. install -m 755 "$shader" "$pkgdir/usr/shaders"
  58. done
  59. install -m 755 "$srcdir/openvr/samples/bin/linux64/hellovr_opengl" "$pkgdir/usr/bin"
  60. install -m 755 "$srcdir/openvr/samples/bin/hellovr_actions.json" "$pkgdir/usr/"
  61. install -m 755 "$srcdir/openvr/samples/bin/cube_texture.png" "$pkgdir/usr/" #TODO: fix source code to look in proper place
  62. install -m 755 "$srcdir/openvr/samples/bin/linux64/helloworldoverlay" "$pkgdir/usr/bin"
  63. install -m 755 "$srcdir/openvr/samples/bin/linux64/tracked_camera_openvr_sample" "$pkgdir/usr/bin"
  64. #install -m 755 "$srcdir/build/samples/hellovr_opengl/run_hellovr.sh" "$pkgdir/usr/bin/run_hellovr.sh"
  65. install -d "$pkgdir/usr/include/"
  66. cp -ra "$srcdir/openvr/headers"/* "$pkgdir/usr/include/"
  67. #install "$srcdir/openvr/headers"/* "$pkgdir/usr/include/"
  68. }
  69. # vim:set ts=2 sw=2 et: