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.

75 lines
2.0 KiB

  1. # Maintainer: Adrià Cereto i Massagué <ssorgatem at gmail.com>
  2. # Contributor: Pekka Helenius (~Fincer) <fincer89 at hotmail dot com>
  3. pkgname=dxvk-git
  4. _pkgname=dxvk
  5. pkgver=0.91.21
  6. pkgrel=1
  7. arch=('i686' 'x86_64')
  8. conflicts=("dxvk-win64-bin")
  9. provides=("dxvk" "dxvk64")
  10. depends=('vulkan-icd-loader' 'wine' 'winetricks')
  11. conflicts=("dxvk-git<$pkgver")
  12. pkgdesc="A Vulkan-based compatibility layer for Direct3D 10/11 which allows running 3D applications on Linux using Wine."
  13. arch=('x86_64' 'i686')
  14. url="https://github.com/doitsujin/dxvk"
  15. license=('custom:zlib/libpng')
  16. makedepends=('ninja' 'meson>=0.43' 'glslang' 'mingw-w64-gcc' 'git' 'wine')
  17. options=(!strip !buildflags staticlibs)
  18. source=(${pkgname}::"git+https://github.com/doitsujin/dxvk.git")
  19. sha256sums=('SKIP')
  20. ##############################
  21. # Custom patches, if present
  22. if [[ $(find ./dxvk-patches -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
  23. cp -r ./dxvk-patches/*.{patch,diff} ./
  24. p=0
  25. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  26. patches[$p]="$(basename ${patch})"
  27. let p++
  28. done
  29. unset p
  30. source+=(${source[@]} ${patches[@]})
  31. fi
  32. prepare() {
  33. # Apply patches, if present
  34. if [[ $(ls "${srcdir}"/*.{patch,diff} | wc -w) -ne 0 ]]; then
  35. cd "${srcdir}"/dxvk-git
  36. # Apply all custom patches
  37. msg2 "Applying custom patches..."
  38. for i in "${srcdir}"/*.{patch,diff}; do
  39. patch -Np1 < ${i}
  40. done
  41. fi
  42. }
  43. ##############################
  44. pkgver() {
  45. cd "${pkgname}"
  46. git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g'
  47. }
  48. build() {
  49. "${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package
  50. }
  51. package() {
  52. mkdir -p "${pkgdir}"/usr/{bin,share/dxvk}
  53. cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/"
  54. echo -e "#!/bin/sh\nwinetricks --force /usr/share/dxvk/setup_dxvk.verb" \
  55. > "${pkgdir}/usr/bin/setup_dxvk"
  56. chmod +x "${pkgdir}/usr/bin/setup_dxvk"
  57. }