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.

102 lines
2.5 KiB

  1. # Maintainer: Pekka Helenius (~Fincer) <fincer89 at hotmail dot com>
  2. # Override /etc/makepkg.conf PKGDEST variable if it's enabled
  3. PKGDEST="${PWD}"
  4. pkgname=vkd3d-proton-git
  5. _pkgname=vkd3d-proton
  6. pkgver=3.1.1.2967
  7. pkgrel=1
  8. pkgdesc="Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation."
  9. url="https://github.com/HansKristian-Work/vkd3d-proton"
  10. license=('LGPL2.1')
  11. arch=('x86_64')
  12. conflicts=(
  13. 'vkd3d-proton'
  14. )
  15. depends=('wine' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader')
  16. makedepends=(
  17. 'ninja'
  18. 'meson>=0.49'
  19. 'glslang'
  20. 'mingw-w64-gcc'
  21. 'git'
  22. 'wine'
  23. )
  24. _vkd3d_gitsrc=
  25. _git_branch_vkd3d=master
  26. _vkd3d_commit=HEAD
  27. provides=('vkd3d-proton')
  28. options=(!strip !buildflags staticlibs)
  29. source=(${pkgname}::"${_vkd3d_gitsrc}#commit=${_vkd3d_commit}")
  30. sha256sums=('SKIP')
  31. ##############################
  32. # Copy custom patches to correct location
  33. if [[ $(find "${startdir}/vkd3d-proton-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
  34. cp -r "${startdir}/vkd3d-proton-patches/"*.{patch,diff} "${startdir}"/
  35. p=0
  36. for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
  37. patches[$p]="$(basename ${patch})"
  38. let p++
  39. done
  40. unset p
  41. source+=(${source[@]} ${patches[@]})
  42. fi
  43. # Reset git tree and apply custom patches
  44. prepare() {
  45. cd "${srcdir}/vkd3d-proton-git"
  46. git checkout ${_git_branch_vkd3d}
  47. git reset --hard ${_vkd3d_commit} # Restore tracked files
  48. git clean -d -x -f # Delete untracked files
  49. git submodule update --init --recursive
  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 VKD3D version tag
  63. pkgver() {
  64. cd "${pkgname}"
  65. printf '%s' $(git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g')
  66. }
  67. # Launch VKD3D build script
  68. build() {
  69. cd "${pkgname}"
  70. ./package-release.sh ${pkgver} "${srcdir}"/build --no-package
  71. }
  72. # Bundle the compiled files
  73. package() {
  74. mkdir -p "${pkgdir}"/usr/{bin,share/vkd3d_proton}
  75. cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/vkd3d_proton/"
  76. echo -e "#!/bin/sh" > "${pkgdir}/usr/bin/setup_vkd3d_proton"
  77. echo -e "
  78. cd /usr/share/vkd3d_proton/
  79. ./setup_vkd3d_proton.sh \${@}
  80. " >> "${pkgdir}/usr/bin/setup_vkd3d_proton"
  81. chmod +x "${pkgdir}/usr/bin/setup_vkd3d_proton"
  82. }