# Maintainer: Pekka Helenius (~Fincer) # Contributor: AdriƠ Cereto i MassaguƩ pkgname=dxvk-git _pkgname=dxvk pkgver=0.92.7 pkgrel=1 arch=('i686' 'x86_64') conflicts=("dxvk-win64-bin") provides=("dxvk" "dxvk64") depends=('vulkan-icd-loader' 'wine' 'winetricks') conflicts=("dxvk-git<$pkgver") pkgdesc="A Vulkan-based compatibility layer for Direct3D 10/11 which allows running 3D applications on Linux using Wine." arch=('x86_64' 'i686') url="https://github.com/doitsujin/dxvk" license=('custom:zlib/libpng') makedepends=('ninja' 'meson>=0.43' 'glslang' 'mingw-w64-gcc' 'git' 'wine') options=(!strip !buildflags staticlibs) source=(${pkgname}::"git+https://github.com/doitsujin/dxvk.git#commit=1af96347e1c6f1f2eb11aeb11009f380fd5761ec") sha256sums=('SKIP') _git_branch_dxvk=master _dxvk_commit=1af96347e1c6f1f2eb11aeb11009f380fd5761ec ############################## # Copy custom patches to correct location if [[ $(find "${startdir}/dxvk-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then cp -r "${startdir}/dxvk-patches/"*.{patch,diff} "${startdir}"/ p=0 for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do patches[$p]="$(basename ${patch})" let p++ done unset p source+=(${source[@]} ${patches[@]}) fi # Reset git tree and apply custom patches prepare() { cd "${srcdir}/dxvk-git" git checkout ${_git_branch_dxvk} git reset --hard ${_dxvk_commit} # Restore tracked files git clean -d -x -f # Delete untracked files # Apply patches, if present if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then # Apply all custom patches msg2 "Applying custom patches..." for i in "${srcdir}"/*.{patch,diff}; do patch -Np1 < ${i} done fi } ############################## # Retrieve DXVK version tag pkgver() { cd "${pkgname}" git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g' } # Launch DXVK build script build() { "${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package } # Bundle the compiled files package() { mkdir -p "${pkgdir}"/usr/{bin,share/dxvk} cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/" echo -e "#!/bin/sh\nwinetricks --force /usr/share/dxvk/setup_dxvk.verb" \ > "${pkgdir}/usr/bin/setup_dxvk" chmod +x "${pkgdir}/usr/bin/setup_dxvk" }