summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFranc[e]sco2020-11-19 16:05:28 +0100
committerFranc[e]sco2020-11-19 16:05:28 +0100
commitd78d9b93a03185473c2416b8233d91e3ae508fed (patch)
treeb218f387d4a72143928def89cdab23942a1f22ec /PKGBUILD
downloadaur-d78d9b93a03185473c2416b8233d91e3ae508fed.tar.gz
first commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD69
1 files changed, 69 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c1e50d6f946
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Ranieri Althoff <ranisalt+aur at gmail dot com>
+
+pkgbase=mangohud-opengl2
+pkgname=('mangohud-opengl2' 'lib32-mangohud-opengl2' 'mangohud-opengl2-common')
+provides=('mangohud' 'mangohud-common' 'lib32-mangohud' 'lib32-mangohud-common')
+conficts=('mangohud')
+pkgver=0.5.1
+pkgrel=3
+url='https://github.com/flightlessmango/MangoHud'
+license=('MIT')
+arch=('x86_64')
+makedepends=('meson' 'python-mako' 'glslang' 'libglvnd' 'lib32-libglvnd' 'patch'
+ 'vulkan-headers' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/flightlessmango/MangoHud/archive/v$pkgver.tar.gz")
+sha256sums=('3e91d4fc7369d46763894c13f3315133871dd02705072981770c3cf58e8081c6')
+
+_srcdir="MangoHud-$pkgver"
+
+prepare() {
+ cd "${_srcdir}"
+ patch --forward --strip=1 --input="${startdir}/mangohud-opengl2.patch"
+}
+
+build() {
+ arch-meson -Dappend_libdir_mangohud=false -Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled \
+ "$_srcdir" build64
+ ninja -C build64
+
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+ export LLVM_CONFIG="/usr/bin/llvm-config32"
+ arch-meson -Dappend_libdir_mangohud=false -Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled \
+ "$_srcdir" build32 --libdir lib32
+ ninja -C build32
+}
+
+package_mangohud-opengl2() {
+ pkgdesc='(GL2, libre deps only version) A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more'
+ depends=('gcc-libs' 'mangohud-common')
+ optdepends=('bash: mangohud helper script')
+
+ DESTDIR="$pkgdir" ninja -C build64 install
+ rm -r "$pkgdir/usr/bin" "$pkgdir/usr/share/doc" "$pkgdir/usr/share/man"
+
+ install -Dm644 "$_srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lib32-mangohud-opengl2() {
+ pkgdesc='(GL2, libre deps only version) A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more (32-bit)'
+ depends=('lib32-gcc-libs' 'mangohud' 'mangohud-common')
+
+ DESTDIR="$pkgdir" ninja -C build32 install
+ rm -r "$pkgdir/usr/bin" "$pkgdir/usr/share/doc" "$pkgdir/usr/share/man"
+ mv "$pkgdir/usr/share/vulkan/implicit_layer.d/MangoHud.json" "$pkgdir/usr/share/vulkan/implicit_layer.d/MangoHud.x86.json"
+
+ install -Dm644 "$_srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_mangohud-opengl2-common() {
+ pkgdesc='(GL2, libre deps only version) Common files for mangohud and lib32-mangohud'
+ optdepends=('bash: mangohud helper script')
+
+ DESTDIR="$pkgdir" ninja -C build64 install
+ rm -r "$pkgdir/usr/lib" "$pkgdir/usr/share/vulkan"
+
+ install -Dm644 "$_srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+