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.

87 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=0.92.7
  6. pkgrel=1
  7. arch=('i686' 'x86_64')
  8. conflicts=("dxvk-win64-bin")
  9. provides=("dxvk" "dxvk64")
  10. depends=('vulkan-icd-loader' 'wine')
  11. pkgdesc="A Vulkan-based compatibility layer for Direct3D 10/11 which allows running 3D applications on Linux using Wine."
  12. arch=('x86_64' 'i686')
  13. url="https://github.com/doitsujin/dxvk"
  14. license=('custom:zlib/libpng')
  15. makedepends=('ninja' 'meson>=0.43' 'glslang' 'mingw-w64-gcc' 'git' 'wine')
  16. options=(!strip !buildflags staticlibs)
  17. source=(${pkgname}::"git+https://github.com/doitsujin/dxvk.git#commit=1af96347e1c6f1f2eb11aeb11009f380fd5761ec")
  18. sha256sums=('SKIP')
  19. _git_branch_dxvk=master
  20. _dxvk_commit=1af96347e1c6f1f2eb11aeb11009f380fd5761ec
  21. ##############################
  22. # Copy custom patches to correct location
  23. if [[ $(find "${startdir}/dxvk-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
  24. cp -r "${startdir}/dxvk-patches/"*.{patch,diff} "${startdir}"/
  25. p=0
  26. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  27. patches[$p]="$(basename ${patch})"
  28. let p++
  29. done
  30. unset p
  31. source+=(${source[@]} ${patches[@]})
  32. fi
  33. # Reset git tree and apply custom patches
  34. prepare() {
  35. cd "${srcdir}/dxvk-git"
  36. git checkout ${_git_branch_dxvk}
  37. git reset --hard ${_dxvk_commit} # Restore tracked files
  38. git clean -d -x -f # Delete untracked files
  39. # Apply patches, if present
  40. if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
  41. # Apply all custom patches
  42. msg2 "Applying custom patches..."
  43. for i in "${srcdir}"/*.{patch,diff}; do
  44. if [[ -f ${i} ]]; then
  45. patch -Np1 < ${i}
  46. fi
  47. done
  48. fi
  49. }
  50. ##############################
  51. # Retrieve DXVK version tag
  52. pkgver() {
  53. cd "${pkgname}"
  54. printf '%s' $(git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g')
  55. }
  56. # Launch DXVK build script
  57. build() {
  58. "${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package
  59. }
  60. # Bundle the compiled files
  61. package() {
  62. mkdir -p "${pkgdir}"/usr/{bin,share/dxvk}
  63. cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/"
  64. echo -e "#!/bin/sh\n/usr/share/dxvk/setup_dxvk.sh" \
  65. > "${pkgdir}/usr/bin/setup_dxvk"
  66. chmod +x "${pkgdir}/usr/bin/setup_dxvk"
  67. }