summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3fa892ec9c3621892313dc539d7224a3369ab191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: AdriƠ Cereto i MassaguƩ <ssorgatem at gmail.com>

pkgname=dxvk-git
_srcname=dxvk
pkgver=20180301.3dea58d
pkgrel=1
epoch=
pkgdesc="A Vulkan-based compatibility layer for Direct3D 11 which allows running 3D applications on Linux using Wine. Requires Wine with Vulkan support (wine-staging or wine-vulkan)"
arch=('x86_64')
url="https://github.com/doitsujin/dxvk"
license=('zlib/libpng')
groups=()
depends=('vulkan-icd-loader' 'wine')
makedepends=('ninja' 'meson' 'glslang' 'mingw-w64-gcc')
checkdepends=()
optdepends=('wine-staging: Wine with Vulkan support' 'wine-vulkan: Wine with Vulkan support')
provides=("dxvk")
conflicts=("dxvk-bin")
replaces=()
backup=()
options=(!strip !buildflags staticlibs)
install=
changelog=
source=("git+https://github.com/doitsujin/dxvk.git")
noextract=()
md5sums=("SKIP")
validpgpkeys=()


pkgver() {
        cd "$_srcname"
        git log -1 --format=%cd.%h --date=short|tr -d -
}


build() {
	cd "$_srcname"
	if [ -d "build.w64" ]; then rm -r build.w64; fi
	meson --cross-file build-win64.txt build.w64
	cd build.w64
        meson configure -Dprefix=/opt/dxvk/w64 -Dbuildtype=release
        ninja
	cd ..
	if [ -d "build.w32" ]; then rm -r build.w32; fi
	meson --cross-file build-win32.txt build.w32
	cd build.w32
	meson configure -Dprefix=/opt/dxvk/w32 -Dbuildtype=release
	ninja
}



package() {
	cd "$_srcname"/build.w64
	meson configure -Dprefix=/opt/dxvk/w64
	DESTDIR="$pkgdir/" ninja install
	mkdir -p "$pkgdir/usr/local/bin"
	ln -s "/opt/dxvk/w64/bin/setup_dxvk.sh" "$pkgdir/usr/local/bin/setup_dxvk64"
        cd ../build.w32
        meson configure -Dprefix=/opt/dxvk/w32
        DESTDIR="$pkgdir/" ninja install
        ln -s "/opt/dxvk/w32/bin/setup_dxvk.sh" "$pkgdir/usr/local/bin/setup_dxvk32"
}