diff options
author | Franc[e]sco | 2020-11-19 16:05:28 +0100 |
---|---|---|
committer | Franc[e]sco | 2020-11-19 16:05:28 +0100 |
commit | d78d9b93a03185473c2416b8233d91e3ae508fed (patch) | |
tree | b218f387d4a72143928def89cdab23942a1f22ec | |
download | aur-mangohud-opengl2.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | mangohud-opengl2.patch | 31 |
4 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..744e179b9d29 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,38 @@ +pkgbase = mangohud-opengl2 + pkgver = 0.5.1 + pkgrel = 3 + url = https://github.com/flightlessmango/MangoHud + arch = x86_64 + license = MIT + makedepends = meson + makedepends = python-mako + makedepends = glslang + makedepends = libglvnd + makedepends = lib32-libglvnd + makedepends = patch + makedepends = vulkan-headers + makedepends = vulkan-icd-loader + makedepends = lib32-vulkan-icd-loader + provides = mangohud + provides = mangohud-common + provides = lib32-mangohud + provides = lib32-mangohud-common + source = mangohud-opengl2-0.5.1.tar.gz::https://github.com/flightlessmango/MangoHud/archive/v0.5.1.tar.gz + sha256sums = 3e91d4fc7369d46763894c13f3315133871dd02705072981770c3cf58e8081c6 + +pkgname = mangohud-opengl2 + pkgdesc = (GL2, libre deps only version) A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more + depends = gcc-libs + depends = mangohud-common + optdepends = bash: mangohud helper script + +pkgname = 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 + depends = mangohud + depends = mangohud-common + +pkgname = mangohud-opengl2-common + pkgdesc = (GL2, libre deps only version) Common files for mangohud and lib32-mangohud + optdepends = bash: mangohud helper script + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..e783a13a728d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.tar.xz +/pkg +/src +*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c1e50d6f9467 --- /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" +} + diff --git a/mangohud-opengl2.patch b/mangohud-opengl2.patch new file mode 100644 index 000000000000..a2bf93eec0e2 --- /dev/null +++ b/mangohud-opengl2.patch @@ -0,0 +1,31 @@ +diff --git a/src/gl/imgui_impl_opengl3.cpp b/src/gl/imgui_impl_opengl3.cpp +index 2103773..28f24a7 100644 +--- a/src/gl/imgui_impl_opengl3.cpp ++++ b/src/gl/imgui_impl_opengl3.cpp +@@ -184,7 +184,7 @@ static bool ImGui_ImplOpenGL3_CreateDeviceObjects() + glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array); + + // Parse GLSL version string +- int glsl_version = 130; ++ int glsl_version = 120; + sscanf(g_GlslVersionString, "#version %d", &glsl_version); + + const GLchar* vertex_shader_glsl_120 = +@@ -422,7 +422,7 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version) + + if (!g_IsGLES) { + // Not GL ES +- glsl_version = "#version 130"; ++ glsl_version = "#version 120"; + g_GlVersion = major * 100 + minor * 10; + if (major >= 4 && minor >= 1) + glsl_version = "#version 410"; +@@ -456,7 +456,7 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version) + // Store GLSL version string so we can refer to it later in case we recreate shaders. + // Note: GLSL version is NOT the same as GL version. Leave this to NULL if unsure. + if (glsl_version == NULL) +- glsl_version = "#version 130"; ++ glsl_version = "#version 120"; + + IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(g_GlslVersionString)); + strcpy(g_GlslVersionString, glsl_version); |