summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2022-05-10 12:07:22 -0600
committerMark Wagie2022-05-10 12:07:22 -0600
commit54b5de18d4143bc054dc674b6f7ee9b0baa3284f (patch)
tree0063a0121e60420340b2831a81deefed259f25ad
parentaf5851321182d2ff1e7ab853b252d381dfdc48ba (diff)
downloadaur-54b5de18d4143bc054dc674b6f7ee9b0baa3284f.tar.gz
many improvents & fixes, split into x11 & wayland packages
-rw-r--r--.SRCINFO69
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD138
3 files changed, 131 insertions, 83 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c5b8dc26498..124428b74405 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,45 +1,62 @@
pkgbase = mangohud
+ pkgdesc = A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more.
pkgver = 0.6.7
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/flightlessmango/MangoHud
arch = x86_64
license = MIT
- makedepends = meson
- makedepends = python-mako
+ makedepends = dbus
+ makedepends = git
+ makedepends = glew
+ makedepends = glfw-x11
makedepends = glslang
- makedepends = libglvnd
+ makedepends = lib32-dbus
makedepends = lib32-libglvnd
- makedepends = vulkan-headers
- makedepends = vulkan-icd-loader
makedepends = lib32-vulkan-icd-loader
+ makedepends = libglvnd
makedepends = libxnvctrl
- makedepends = dbus
- source = mangohud-0.6.7.tar.gz::https://github.com/flightlessmango/MangoHud/archive/v0.6.7.tar.gz
- source = imgui-1.81.tar.gz::https://github.com/ocornut/imgui/archive/refs/tags/v1.81.tar.gz
- source = imgui-1.81-1-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/imgui/1.81/1/get_zip
- source = spdlog-1.8.5.tar.gz::https://github.com/gabime/spdlog/archive/refs/tags/v1.8.5.tar.gz
+ makedepends = meson
+ makedepends = nlohmann-json
+ makedepends = python-mako
+ makedepends = spdlog
+ makedepends = vulkan-headers
+ source = git+https://github.com/flightlessmango/MangoHud.git#tag=v0.6.7
+ source = git+https://github.com/flightlessmango/minhook.git
+ source = https://github.com/ocornut/imgui/archive/v1.81/imgui-1.81.tar.gz
+ source = https://wrapdb.mesonbuild.com/v2/imgui_1.81-1/get_patch#/imgui-1.81-1-wrap.zip
+ source = spdlog-1.8.5.tar.gz::https://github.com/gabime/spdlog/archive/v1.8.5.tar.gz
source = spdlog-1.8.5-1-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/spdlog/1.8.5/1/get_zip
- sha256sums = ccfbbee87960889e2396f322c057b14d4143620a1cc66b11d573adccdae7a079
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = f7c619e03a06c0f25e8f47262dbc32d61fd033d2c91796812bf0f8c94fca78fb
sha256sums = 6d00b442690b6a5c5d8f898311daafbce16d370cf64f53294c3b8c5c661e435f
sha256sums = 944d0bd7c763ac721398dca2bb0f3b5ed16f67cef36810ede5061f35a543b4b8
sha256sums = 3c38f275d5792b1286391102594329e98b17737924b344f98312ab09929b74be
-pkgname = mangohud
- pkgdesc = A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more
- depends = gcc-libs
- depends = dbus
+pkgname = mangohud-x11
depends = mangohud-common
- optdepends = bash: mangohud helper script
- optdepends = libxnvctrl: support for older NVIDIA GPUs
+ depends = dbus
+ depends = gcc-libs
+ depends = glew
+ depends = glfw-x11
+ depends = libx11
+ depends = spdlog
+ depends = vulkan-icd-loader
+ optdepends = libxnvctrl: NVIDIA GPU stats by XNVCtrl
+ provides = mangohud
+ conflicts = mangohud
-pkgname = lib32-mangohud
- pkgdesc = A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more (32-bit)
- depends = lib32-gcc-libs
- depends = lib32-dbus
+pkgname = lib32-mangohud-x11
depends = mangohud-common
- optdepends = lib32-libxnvctrl: support for older NVIDIA GPUs
+ depends = lib32-dbus
+ depends = lib32-gcc-libs
+ depends = lib32-libx11
+ depends = lib32-vulkan-icd-loader
+ optdepends = lib32-libxnvctrl: NVIDIA GPU stats by XNVCtrl
+ provides = lib32-mangohud
+ conflicts = lib32-mangohud
-pkgname = mangohud-common
- pkgdesc = Common files for mangohud and lib32-mangohud
- optdepends = bash: mangohud helper script
+pkgname = mangohud-common-x11
+ pkgdesc = Common files for MangoHud
+ provides = mangohud-common
+ conflicts = mangohud-common
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4dab8d6386e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index e647ae256ddd..58f1dc1df435 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,81 +1,105 @@
# Maintainer: Ranieri Althoff <ranisalt+aur at gmail dot com>
-
-_imgui_ver=1.81
-_imgui_wrap_ver=1
-
-_spdlog_ver=1.8.5
-_spdlog_wrap_ver=1
-
+# Co-Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
+pkgname=('mangohud-x11' 'lib32-mangohud-x11' 'mangohud-common-x11')
pkgbase=mangohud
-pkgname=('mangohud' 'lib32-mangohud' 'mangohud-common')
pkgver=0.6.7
-pkgrel=1
-url='https://github.com/flightlessmango/MangoHud'
-license=('MIT')
+pkgrel=2
+_imgui_ver=1.81
+_spdlog_ver=1.8.5
+pkgdesc="A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more."
arch=('x86_64')
-makedepends=('meson' 'python-mako' 'glslang' 'libglvnd' 'lib32-libglvnd'
- 'vulkan-headers' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader'
- 'libxnvctrl' 'dbus')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/flightlessmango/MangoHud/archive/v$pkgver.tar.gz"
- "imgui-$_imgui_ver.tar.gz::https://github.com/ocornut/imgui/archive/refs/tags/v$_imgui_ver.tar.gz"
- "imgui-$_imgui_ver-$_imgui_wrap_ver-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/imgui/$_imgui_ver/$_imgui_wrap_ver/get_zip"
- "spdlog-$_spdlog_ver.tar.gz::https://github.com/gabime/spdlog/archive/refs/tags/v$_spdlog_ver.tar.gz"
- "spdlog-$_spdlog_ver-$_spdlog_wrap_ver-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/spdlog/$_spdlog_ver/$_spdlog_wrap_ver/get_zip")
-sha256sums=('ccfbbee87960889e2396f322c057b14d4143620a1cc66b11d573adccdae7a079'
+url="https://github.com/flightlessmango/MangoHud"
+license=('MIT')
+makedepends=('dbus' 'git' 'glew' 'glfw-x11' 'glslang' 'lib32-dbus' 'lib32-libglvnd'
+ 'lib32-vulkan-icd-loader' 'libglvnd' 'libxnvctrl' 'meson' 'nlohmann-json'
+ 'python-mako' 'spdlog' 'vulkan-headers')
+source=("git+https://github.com/flightlessmango/MangoHud.git#tag=v$pkgver"
+ 'git+https://github.com/flightlessmango/minhook.git'
+ "https://github.com/ocornut/imgui/archive/v${_imgui_ver}/imgui-${_imgui_ver}.tar.gz"
+ "https://wrapdb.mesonbuild.com/v2/imgui_${_imgui_ver}-1/get_patch#/imgui-${_imgui_ver}-1-wrap.zip"
+ "spdlog-${_spdlog_ver}.tar.gz::https://github.com/gabime/spdlog/archive/v${_spdlog_ver}.tar.gz"
+ "spdlog-${_spdlog_ver}-1-wrap.zip::https://wrapdb.mesonbuild.com/v1/projects/spdlog/${_spdlog_ver}/1/get_zip")
+sha256sums=('SKIP'
+ 'SKIP'
'f7c619e03a06c0f25e8f47262dbc32d61fd033d2c91796812bf0f8c94fca78fb'
'6d00b442690b6a5c5d8f898311daafbce16d370cf64f53294c3b8c5c661e435f'
'944d0bd7c763ac721398dca2bb0f3b5ed16f67cef36810ede5061f35a543b4b8'
'3c38f275d5792b1286391102594329e98b17737924b344f98312ab09929b74be')
-_srcdir="MangoHud-$pkgver"
+prepare() {
+ cd "$srcdir/MangoHud"
+ git submodule init modules/minhook
+ git config submodule.minhook.url "$srcdir/minhook"
+ git submodule update
+
+ mkdir -p "$srcdir/common"
+
+ ln -sfv "$srcdir/imgui-${_imgui_ver}" subprojects
+ ln -sfv "$srcdir/spdlog-${_spdlog_ver}" subprojects
+
+ # Use system nlohmann-json package instead of subproject
+ sed -i "s/ json_sp = subproject('nlohmann_json')//g" meson.build
+ sed -i "s/json_dep = json_sp.get_variable('nlohmann_json_dep')/json_dep = dependency('nlohmann_json')/g" meson.build
+}
build() {
- ln -s "$srcdir/imgui-$_imgui_ver" "$_srcdir/subprojects/imgui"
- ln -s "$srcdir/spdlog-$_spdlog_ver" "$_srcdir/subprojects/spdlog"
-
- arch-meson -Dappend_libdir_mangohud=false -Duse_system_vulkan=enabled "$_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 --wrap-mode default -Dappend_libdir_mangohud=false -Duse_system_vulkan=enabled "$_srcdir" build32 --libdir lib32
- ninja -C build32
+local meson_options=(
+ -Duse_system_vulkan=enabled
+ -Dappend_libdir_mangohud=false
+ -Dwith_x11=enabled
+ -Dwith_wayland=disabled
+ -Dmangoapp=true
+ -Dmangohudctl=true
+ -Dmangoapp_layer=true
+ )
+
+ arch-meson MangoHud build "${meson_options[@]}" \
+ -Duse_system_spdlog=enabled
+ meson compile -C build
+
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+ export LLVM_CONFIG="/usr/bin/llvm-config32"
+
+ arch-meson MangoHud build32 "${meson_options[@]}" \
+ --libdir lib32 \
+ -Dinclude_doc=false
+ meson compile -C build32
}
-package_mangohud() {
- pkgdesc='A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more'
- depends=('gcc-libs' 'dbus' 'mangohud-common')
- optdepends=('bash: mangohud helper script'
- 'libxnvctrl: support for older NVIDIA GPUs')
+package_mangohud-x11() {
+ depends=('mangohud-common' 'dbus' 'gcc-libs' 'glew' 'glfw-x11' 'libx11'
+ 'spdlog' 'vulkan-icd-loader')
+ optdepends=('libxnvctrl: NVIDIA GPU stats by XNVCtrl')
+ provides=("${pkgname%-x11}")
+ conflicts=("${pkgname%-x11}")
- DESTDIR="$pkgdir" ninja -C build64 install
- rm -r "$pkgdir/usr/bin" "$pkgdir/usr/share/doc" "$pkgdir/usr/share/man"
+ DESTDIR="$pkgdir" meson install -C build
- install -Dm644 "$_srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ mv -f "$pkgdir"/usr/share/{doc,man} "$srcdir/common"
}
-package_lib32-mangohud() {
- pkgdesc='A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more (32-bit)'
- depends=('lib32-gcc-libs' 'lib32-dbus' 'mangohud-common')
- optdepends=('lib32-libxnvctrl: support for older NVIDIA GPUs')
+package_lib32-mangohud-x11() {
+ depends=('mangohud-common' 'lib32-dbus' 'lib32-gcc-libs' 'lib32-libx11'
+ 'lib32-vulkan-icd-loader')
+ optdepends=('lib32-libxnvctrl: NVIDIA GPU stats by XNVCtrl')
+ provides=("${pkgname%-x11}")
+ conflicts=("${pkgname%-x11}")
- 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"
- mv "$pkgdir/usr/share/vulkan/implicit_layer.d/libMangoApp.json" "$pkgdir/usr/share/vulkan/implicit_layer.d/libMangoApp.x86.json"
+ DESTDIR="$pkgdir" meson install -C build32
- install -Dm644 "$_srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ rm -rf "$pkgdir"/usr/{bin,share}
}
-package_mangohud-common() {
- pkgdesc='Common files for mangohud and lib32-mangohud'
- optdepends=('bash: mangohud helper script')
+package_mangohud-common-x11() {
+ pkgdesc="Common files for MangoHud"
+ provides=("${pkgname%-x11}")
+ conflicts=("${pkgname%-x11}")
- DESTDIR="$pkgdir" ninja -C build64 install
- rm -r "$pkgdir/usr/lib" "$pkgdir/usr/share/vulkan"
+ install -d "$pkgdir"/usr/share/
+ cp -r common/* "$pkgdir/usr/share/"
- install -Dm644 "$_srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$srcdir/MangoHud"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgbase"
}
-