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.

96 lines
2.4 KiB

  1. # Maintainer: Pekka Helenius (~Fincer) <fincer89 at hotmail dot com>
  2. # Contributor: Adrià Cereto i Massagué <ssorgatem at gmail.com>
  3. pkgname=dxvk-git
  4. _pkgname=dxvk
  5. pkgver=1.2.1.4
  6. pkgrel=1
  7. pkgdesc="A Vulkan-based compatibility layer for Direct3D 10/11 which allows running 3D applications on Linux using Wine."
  8. url="https://github.com/doitsujin/dxvk"
  9. license=('custom:zlib/libpng')
  10. arch=('x86_64')
  11. conflicts=(
  12. 'dxvk-bin'
  13. 'dxvk-winelib-git'
  14. 'dxvk-legacy-git'
  15. 'dxvk-mingw-git'
  16. )
  17. depends=('wine' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader')
  18. makedepends=(
  19. 'ninja'
  20. 'meson>=0.43'
  21. 'glslang'
  22. 'mingw-w64-gcc'
  23. 'git'
  24. 'wine'
  25. )
  26. provides=('dxvk')
  27. options=(!strip !buildflags staticlibs)
  28. source=(${pkgname}::"git+https://github.com/doitsujin/dxvk.git#commit=HEAD")
  29. sha256sums=('SKIP')
  30. _git_branch_dxvk=master
  31. _dxvk_commit=HEAD
  32. ##############################
  33. # Copy custom patches to correct location
  34. if [[ $(find "${startdir}/dxvk-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
  35. cp -r "${startdir}/dxvk-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}/dxvk-git"
  47. git checkout ${_git_branch_dxvk}
  48. git reset --hard ${_dxvk_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. # Retrieve DXVK version tag
  63. pkgver() {
  64. cd "${pkgname}"
  65. printf '%s' $(git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g')
  66. }
  67. # Launch DXVK build script
  68. build() {
  69. "${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package
  70. }
  71. # Bundle the compiled files
  72. package() {
  73. mkdir -p "${pkgdir}"/usr/{bin,share/dxvk}
  74. cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/"
  75. echo -e "#!/bin/sh\n/usr/share/dxvk/setup_dxvk.sh" \
  76. > "${pkgdir}/usr/bin/setup_dxvk"
  77. chmod +x "${pkgdir}/usr/bin/setup_dxvk"
  78. }