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.

88 lines
2.1 KiB

5 years ago
  1. # Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com>
  2. # Contributor: Adrià Cereto i Massagué <ssorgatem at gmail.com>
  3. pkgname=d9vk-git
  4. pkgver=m0.12.r0.g6b125834
  5. pkgrel=1
  6. pkgdesc="A Vulkan-based compatibility layer for Direct3D 9 which allows running 3D applications on Linux using Wine"
  7. url="https://github.com/Joshua-Ashton/d9vk"
  8. license=('custom:zlib/libpng')
  9. arch=('x86_64')
  10. conflicts=(
  11. 'd9vk-bin'
  12. 'd9vk-mingw'
  13. 'd9vk-winelib'
  14. 'd9vk-mingw-git'
  15. 'd9vk-winelib-git'
  16. )
  17. depends=('wine' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader')
  18. makedepends=(
  19. 'ninja'
  20. 'meson>=0.43'
  21. 'glslang'
  22. 'git'
  23. 'wine'
  24. )
  25. provides=('d9vk')
  26. source=(${pkgname}::"git+https://github.com/Joshua-Ashton/d9vk.git")
  27. sha256sums=('SKIP'
  28. 'SKIP'
  29. 'b67f3a88115b1d048fb373ff6df2140c3027fe9edecccf58c1a88efce01fb738')
  30. ##############################
  31. # Copy custom patches to correct location
  32. p=0
  33. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  34. patches[$p]="$(basename ${patch})"
  35. let p++
  36. done
  37. unset p
  38. source+=(${source[@]} ${patches[@]})
  39. # Reset git tree and apply custom patches
  40. prepare() {
  41. cd "${srcdir}/${pkgname}"
  42. # Apply patches, if present
  43. if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
  44. # Apply all custom patches
  45. msg2 "Applying custom patches..."
  46. for i in "${srcdir}"/*.{patch,diff}; do
  47. if [[ -f ${i} ]]; then
  48. patch -Np1 < ${i}
  49. fi
  50. done
  51. fi
  52. }
  53. ##############################
  54. pkgver() {
  55. cd "$srcdir/${pkgname}"
  56. git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g'
  57. }
  58. build() {
  59. cd "$srcdir/${pkgname}"
  60. ./package-release.sh ${pkgver} build --no-package
  61. }
  62. package() {
  63. mkdir -p "$pkgdir"/usr/share/dxvk/{x32,x64}
  64. cd "$srcdir/${pkgname}"
  65. install -m0644 build/dxvk-${pkgver}/x32/d3d9.dll "$pkgdir"/usr/share/dxvk/x32/d3d9.dll
  66. install -m0644 build/dxvk-${pkgver}/x64/d3d9.dll "$pkgdir"/usr/share/dxvk/x64/d3d9.dll
  67. install -m0755 build/dxvk-${pkgver}/setup_dxvk.sh "$pkgdir"/usr/share/dxvk/setup_d9vk.sh
  68. mkdir "$pkgdir"/usr/bin
  69. cd "$pkgdir"/usr/bin
  70. ln -s /usr/share/dxvk/setup_d9vk.sh setup_d9vk
  71. }