Skip to content

Commit 0e680f8

Browse files
Add PKGBUILD
1 parent 7df8918 commit 0e680f8

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

pkgbuild/PKGBUILD

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Maintainer: Simon Hallsten <[email protected]>
2+
3+
pkgname=('mangohud' 'lib32-mangohud')
4+
pkgver=0.6.6.1.r175.g11142b5
5+
pkgrel=1
6+
pkgdesc="Vulkan and OpenGL overlay to display performance information"
7+
arch=('x86_64')
8+
makedepends=('dbus' 'gcc' 'meson' 'python-mako' 'libx11' 'lib32-libx11' 'git' 'pkgconf' 'vulkan-headers')
9+
depends=('glslang' 'libglvnd' 'lib32-libglvnd' 'glew' 'glfw-x11')
10+
replaces=('vulkan-mesa-layer-mango')
11+
license=('MIT')
12+
source=("mangohud"::"git+https://github.com/flightlessmango/MangoHud.git#branch=master"
13+
"mangohud-minhook"::"git+https://github.com/flightlessmango/minhook.git"
14+
"imgui-v1.81.tar.gz::https://github.com/ocornut/imgui/archive/v1.81.tar.gz"
15+
"imgui-1.81-1-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/imgui/1.81/1/get_zip"
16+
"spdlog-1.8.5.tar.gz::https://github.com/gabime/spdlog/archive/v1.8.5.tar.gz"
17+
"spdlog-1.8.5-1-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/spdlog/1.8.5/1/get_zip")
18+
19+
sha256sums=('SKIP'
20+
'SKIP'
21+
'f7c619e03a06c0f25e8f47262dbc32d61fd033d2c91796812bf0f8c94fca78fb'
22+
'6d00b442690b6a5c5d8f898311daafbce16d370cf64f53294c3b8c5c661e435f'
23+
'944d0bd7c763ac721398dca2bb0f3b5ed16f67cef36810ede5061f35a543b4b8'
24+
'3c38f275d5792b1286391102594329e98b17737924b344f98312ab09929b74be')
25+
26+
_build_args="-Dappend_libdir_mangohud=false -Dwith_xnvctrl=disabled -Duse_system_vulkan=enabled -Dmangoapp_layer=true"
27+
28+
pkgver() {
29+
cd "$srcdir/mangohud"
30+
git describe --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
31+
}
32+
33+
prepare() {
34+
cd "${srcdir}/mangohud"
35+
git submodule init
36+
git config submodule.modules/minhook.url "$srcdir/mangohud-minhook"
37+
git submodule update
38+
39+
# meson subprojects
40+
ln -sv "$srcdir/imgui-1.81" subprojects
41+
ln -sv "$srcdir/spdlog-1.8.5" subprojects
42+
}
43+
44+
build() {
45+
arch-meson mangohud build64 \
46+
${_build_args} -Dmangoapp=true -Dmangohudctl=true
47+
48+
ninja -C build64
49+
export CC="gcc -m32"
50+
export CXX="g++ -m32"
51+
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH_32}"
52+
export LLVM_CONFIG="/usr/bin/llvm-config32"
53+
54+
arch-meson mangohud build32 \
55+
--libdir=lib32 \
56+
${_build_args}
57+
58+
ninja -C build32
59+
}
60+
61+
package_mangohud() {
62+
provides=("mangohud")
63+
conflicts=('mangohud-common')
64+
DESTDIR="${pkgdir}" ninja -C build64 install
65+
}
66+
67+
package_lib32-mangohud() {
68+
provides=("lib32-mangohud")
69+
DESTDIR="${pkgdir}" ninja -C build32 install
70+
rm -rf "$pkgdir/usr/bin"
71+
rm -rf "$pkgdir/usr/share"
72+
}

0 commit comments

Comments
 (0)