summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78680f75474fdf55cba77ba23041af3c77ae80f8 (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
pkgname=mingw-w64-volk
pkgver=1.3.283.0
pkgrel=1
arch=(any)
url="https://github.com/zeux/volk"
pkgdesc="Meta loader for Vulkan API (mingw-w64)"
license=('MIT')
depends=(mingw-w64-vulkan-icd-loader mingw-w64-vulkan-headers)
makedepends=(mingw-w64-cmake)
options=('!buildflags' 'staticlibs' '!strip')
source=("https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-${pkgver}.tar.gz")
sha256sums=('872035f1f26c53b218632a3a8dbccbd276710aaabafb9bb1bc1a6c0633ee6aab')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  cd "${srcdir}"/volk-vulkan-sdk-${pkgver}
  for _arch in ${_architectures}; do
    ${_arch}-cmake -B build-${_arch} -DVOLK_INSTALL=ON .
    make -C build-${_arch}
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "${srcdir}"/volk-vulkan-sdk-${pkgver}/build-${_arch}
    make DESTDIR="${pkgdir}" install
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}