Use system-wide Wine, DXVK & D9VK for Steam Play/Proton (Windows) games directly from Linux Steam client
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.0 KiB

5 years ago
  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")
  29. sha256sums=('SKIP'
  30. 'SKIP')
  31. ##############################
  32. p=0
  33. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  34. patches[$p]="$(basename ${patch})"
  35. let p++
  36. done
  37. unset p
  38. source+=(${source[@]} ${patches[@]})
  39. # Reset git tree and apply custom patches
  40. prepare() {
  41. cd "${srcdir}/${pkgname}"
  42. # Apply patches, if present
  43. if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
  44. # Apply all custom patches
  45. msg2 "Applying custom patches..."
  46. for i in "${srcdir}"/*.{patch,diff}; do
  47. if [[ -f ${i} ]]; then
  48. patch -Np1 < ${i}
  49. fi
  50. done
  51. fi
  52. }
  53. ##############################
  54. # Retrieve DXVK version tag
  55. pkgver() {
  56. cd "${pkgname}"
  57. printf '%s' $(git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g')
  58. }
  59. # Launch DXVK build script
  60. build() {
  61. "${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package
  62. }
  63. # Bundle the compiled files
  64. package() {
  65. mkdir -p "${pkgdir}"/usr/{bin,share/dxvk}
  66. cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/"
  67. echo -e "#!/bin/sh\n/usr/share/dxvk/setup_dxvk.sh" \
  68. > "${pkgdir}/usr/bin/setup_dxvk"
  69. chmod +x "${pkgdir}/usr/bin/setup_dxvk"
  70. }