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.

98 lines
2.5 KiB

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