pkgname=('mangohud-git' 'lib32-mangohud-git') pkgver=0.2.0.r123.gfa41e6f pkgrel=1 pkgdesc="Vulkan overlay layer to display information about the application" arch=('x86_64') makedepends=('gcc' 'meson' 'python-mako' 'libx11' 'lib32-libx11' 'git') depends=('glslang' 'libglvnd' 'lib32-libglvnd') replaces=('vulkan-mesa-layer-mango') license=('MIT') md5sums=('SKIP') source=("mangohud"::"git+https://github.com/flightlessmango/mangohud.git") build_args="-Dappend_libdir_mangohud=false" pkgver() { cd "$srcdir/mangohud" git describe --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' } prepare() { cd "${srcdir}/mangohud" git submodule update --init --depth 50 } build() { arch-meson mangohud build64 \ ${build_args} ninja -C build64 export CC="gcc -m32" export CXX="g++ -m32" export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" arch-meson mangohud build32 \ --libdir=lib32 \ ${build_args} ninja -C build32 } package_mangohud-git() { provides=("mangohud-git") conflicts=('mangohud') replaces=('mangohud') DESTDIR="${pkgdir}" ninja -C build64 install } package_lib32-mangohud-git() { replaces=('lib32-vulkan-mesa-layer-mango', 'lib32-mangohud') provides=("lib32-mangohud-git") conflicts=('lib32-mangohud') DESTDIR="${pkgdir}" ninja -C build32 install mv "$pkgdir/usr/share/doc/mangohud" "$pkgdir/usr/share/doc/$pkgname" }