summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ead49e49edfb1f43933ecad717f9e795c6cb9781 (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
# Maintainer: Jeremy Kescher <jeremy@kescher.at>
# Contributor: Benjamin Maisonnas <ben@wainei.net>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=lib32-vkd3d-valve-git
pkgver=1.1.r695.g40e4a74
pkgrel=1
pkgdesc="D3D12 to Vulkan translation library. 32-bit (Valve version)"
arch=('x86_64')
url='https://github.com/ValveSoftware/vkd3d'
license=('LGPL')
depends=('vkd3d'
         'lib32-spirv-tools'
         'lib32-vulkan-icd-loader'
         'lib32-libxcb'
         )
makedepends=( # Prevent out-of-date SPIRV headers error
             'spirv-headers-git'
             'vulkan-headers'
             'xcb-proto'
             'wine'
             )
conflicts=('lib32-vkd3d' 'lib32-vkd3d-git')
provides=('lib32-vkd3d')
source=('git+https://github.com/ValveSoftware/vkd3d.git#branch=proton_4.11')
sha256sums=('SKIP')

pkgver() {
  cd vkd3d
  git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/vkd3d.//'
}

prepare() {
  mkdir -p build

  cd vkd3d
  ./autogen.sh
}

build() {
  export CFLAGS+=" -m32"
  export CXXFLAGS+=" -m32"
  export LDFLAGS+=" -m32"
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  cd build
  ../vkd3d/configure \
    --prefix=/usr \
    --libdir=/usr/lib32 \
    --with-spirv-tools \
    --enable-tests=no \
    --host=i686-linux-gnu

  make
}

package() {
  make -C build DESTDIR="${pkgdir}" install

  rm -fr "${pkgdir}/usr/include"
}