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.

90 lines
2.5 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. arch=('x86_64')
  8. url="https://github.com/Joshua-Ashton/d9vk"
  9. license=('zlib/libpng')
  10. makedepends=('ninja' 'meson>=0.43' 'glslang' 'git' 'wine')
  11. source=(
  12. ${pkgname}::"git+https://github.com/Joshua-Ashton/d9vk.git#commit=HEAD"
  13. )
  14. sha256sums=('SKIP'
  15. 'SKIP'
  16. 'b67f3a88115b1d048fb373ff6df2140c3027fe9edecccf58c1a88efce01fb738')
  17. _git_branch_d9vk=master
  18. _d9vk_commit=HEAD
  19. ##############################
  20. # Copy custom patches to correct location
  21. if [[ $(find "${startdir}/d9vk-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
  22. cp -r "${startdir}/d9vk-patches/"*.{patch,diff} "${startdir}"/
  23. p=0
  24. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  25. patches[$p]="$(basename ${patch})"
  26. let p++
  27. done
  28. unset p
  29. source+=(${source[@]} ${patches[@]})
  30. fi
  31. # Reset git tree and apply custom patches
  32. prepare() {
  33. cd "${srcdir}/${pkgname}"
  34. git checkout ${_git_branch_d9vk}
  35. git reset --hard ${_d9vk_commit} # Restore tracked files
  36. git clean -d -x -f # Delete untracked files
  37. # Apply patches, if present
  38. if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
  39. # Apply all custom patches
  40. msg2 "Applying custom patches..."
  41. for i in "${srcdir}"/*.{patch,diff}; do
  42. if [[ -f ${i} ]]; then
  43. patch -Np1 < ${i}
  44. fi
  45. done
  46. fi
  47. }
  48. ##############################
  49. pkgver() {
  50. cd "$srcdir/${pkgname}"
  51. git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g'
  52. }
  53. prepare() {
  54. cd "$srcdir/${pkgname}"
  55. patch -Np1 < "$srcdir"/patch_remove_d3d10-11.patch
  56. }
  57. build() {
  58. cd "$srcdir/${pkgname}"
  59. ./package-release.sh ${pkgver} build --no-package
  60. }
  61. package_d9vk-git() {
  62. depends=('vulkan-icd-loader' 'wine' 'lib32-vulkan-icd-loader')
  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. }