Automate installation of DXVK, D9VK + Wine/Wine Staging & update GPU drivers + PlayonLinux wineprefixes (Debian/Ubuntu/Mint/Arch Linux/Manjaro)
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.

95 lines
2.4 KiB

  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=6125834
  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#commit=HEAD")
  27. sha256sums=('SKIP')
  28. _git_branch_d9vk=master
  29. _d9vk_commit=HEAD
  30. ##############################
  31. # Copy custom patches to correct location
  32. if [[ $(find "${startdir}/d9vk-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
  33. cp -r "${startdir}/d9vk-patches/"*.{patch,diff} "${startdir}"/
  34. p=0
  35. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  36. patches[$p]="$(basename ${patch})"
  37. let p++
  38. done
  39. unset p
  40. source+=(${source[@]} ${patches[@]})
  41. fi
  42. # Reset git tree and apply custom patches
  43. prepare() {
  44. cd "${srcdir}/${pkgname}"
  45. git checkout ${_git_branch_d9vk}
  46. git reset --hard ${_d9vk_commit} # Restore tracked files
  47. git clean -d -x -f # Delete untracked files
  48. # Apply patches, if present
  49. if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
  50. # Apply all custom patches
  51. msg2 "Applying custom patches..."
  52. for i in "${srcdir}"/*.{patch,diff}; do
  53. if [[ -f ${i} ]]; then
  54. patch -Np1 < ${i}
  55. fi
  56. done
  57. fi
  58. }
  59. ##############################
  60. pkgver() {
  61. cd "$srcdir/${pkgname}"
  62. git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g'
  63. }
  64. build() {
  65. cd "$srcdir/${pkgname}"
  66. ./package-release.sh ${pkgver} build --no-package
  67. }
  68. package() {
  69. mkdir -p "$pkgdir"/usr/share/dxvk/{x32,x64}
  70. cd "$srcdir/${pkgname}"
  71. install -m0644 build/dxvk-${pkgver}/x32/d3d9.dll "$pkgdir"/usr/share/dxvk/x32/d3d9.dll
  72. install -m0644 build/dxvk-${pkgver}/x64/d3d9.dll "$pkgdir"/usr/share/dxvk/x64/d3d9.dll
  73. install -m0755 build/dxvk-${pkgver}/setup_dxvk.sh "$pkgdir"/usr/share/dxvk/setup_d9vk.sh
  74. mkdir "$pkgdir"/usr/bin
  75. cd "$pkgdir"/usr/bin
  76. ln -s /usr/share/dxvk/setup_d9vk.sh setup_d9vk
  77. }