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

# Maintainer: Adrià Cereto i Massagué <ssorgatem at gmail.com>
# Contributor: Pekka Helenius (~Fincer) <fincer89 at hotmail dot com>
pkgname=dxvk-git
_pkgname=dxvk
pkgver=0.91.21
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=HEAD")
sha256sums=('SKIP')
##############################
# Custom patches, if present
if [[ $(find ./dxvk-patches -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
cp -r ./dxvk-patches/*.{patch,diff} ./
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
prepare() {
# Apply patches, if present
if [[ $(ls "${srcdir}"/*.{patch,diff} | wc -w) -ne 0 ]]; then
cd "${srcdir}"/dxvk-git
# Apply all custom patches
msg2 "Applying custom patches..."
for i in "${srcdir}"/*.{patch,diff}; do
patch -Np1 < ${i}
done
fi
}
##############################
pkgver() {
cd "${pkgname}"
git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g'
}
build() {
"${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package
}
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"
}