* Re: [PR PATCH] [Updated] New package: MangoHud-nvidia-0.6.8
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
@ 2023-03-28 17:11 ` gmbeard
2023-03-28 17:12 ` gmbeard
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-03-28 17:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages feature/MangoHud-nvidia
https://github.com/void-linux/void-packages/pull/42919
New package: MangoHud-nvidia-0.6.8
### Description
This packages MangoHud with the necessary build config to enable nVidia GPU stats. Because of the non-free license of the nVidia headers used in the source distribution, I've made the assumption that this must be treated in the same way as the `nvidia*` packages (i.e `nonfree`), hence the separate package.
This is essentially a straight clone of the existing MangoHud package, but uses a non-DFSG upstream.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- x86\_64-musl
A patch file from https://github.com/void-linux/void-packages/pull/42919.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feature/MangoHud-nvidia-42919.patch --]
[-- Type: text/x-diff, Size: 3063 bytes --]
From d88859d73829e2b39fb52b5ffe1b73049d6fa683 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Wed, 22 Mar 2023 07:28:46 +0000
Subject: [PATCH] New package: MangoHud-nvidia-0.6.8
---
srcpkgs/MangoHud-nvidia/files/musl.patch | 22 +++++++++++++++
srcpkgs/MangoHud-nvidia/template | 35 ++++++++++++++++++++++++
2 files changed, 57 insertions(+)
create mode 100644 srcpkgs/MangoHud-nvidia/files/musl.patch
create mode 100644 srcpkgs/MangoHud-nvidia/template
diff --git a/srcpkgs/MangoHud-nvidia/files/musl.patch b/srcpkgs/MangoHud-nvidia/files/musl.patch
new file mode 100644
index 000000000000..c11ac1b414c2
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/files/musl.patch
@@ -0,0 +1,22 @@
+--- src/meson.build 2021-06-11 22:12:53.000000000 +0200
++++ - 2021-06-14 23:32:49.677413454 +0200
+@@ -3,16 +3,16 @@
+ # Needs prefix for configure_file()
+ if get_option('append_libdir_mangohud')
+ libdir_mangohud = join_paths(get_option('libdir'), 'mangohud')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'), 'mangohud')
+ else
+ libdir_mangohud = get_option('libdir')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'))
+ endif
+
+ # For build.sh
+ if get_option('ld_libdir_prefix')
+ # FIXME derive from libdir
+- ld_libdir_mangohud = get_option('prefix') + '/lib/mangohud/\$LIB/'
++ ld_libdir_mangohud = get_option('prefix') + '/lib/mangohud/lib'
+ endif
+
+ conf_data = configuration_data()
diff --git a/srcpkgs/MangoHud-nvidia/template b/srcpkgs/MangoHud-nvidia/template
new file mode 100644
index 000000000000..d47973a5156e
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/template
@@ -0,0 +1,35 @@
+# Template file for 'MangoHud-nvidia'
+pkgname=MangoHud-nvidia
+version=0.6.8
+revision=1
+build_style=meson
+configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled
+ -Dwith_nvml=enabled -Duse_system_spdlog=enabled"
+hostmakedepends="Vulkan-Headers python3-Mako glslang pkg-config"
+makedepends="libglvnd-devel dbus-devel vulkan-loader Vulkan-Headers
+ spdlog"
+short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
+maintainer="gmbeard <gmbeard@googlemail.com>"
+license="MIT,custom:NVIDIA"
+homepage="https://github.com/flightlessmango/MangoHud"
+distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source.tar.xz"
+checksum=9c64ccab1a72ba1dc61cb88d2fbcce1d343fc6b6cdf22c2cc2859bfb2da66fd4
+conflicts=MangoHud
+repository=nonfree
+
+post_patch() {
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ patch -Np0 -i ${FILESDIR}/musl.patch
+ fi
+}
+
+post_install() {
+ # Extract the NVIDIA license from the nvml.h header
+ head -n $( \
+ awk '/NVML API Reference/{ print NR-1; exit }' ${wrksrc}/include/nvml.h \
+ ) ${wrksrc}/include/nvml.h \
+ | sed 's;^\([/ ]\?\)\*/\?;;g' >${wrksrc}/LICENSE-NVIDIA
+
+ vlicense LICENSE
+ vlicense LICENSE-NVIDIA
+}
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.8
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
2023-03-28 17:11 ` [PR PATCH] [Updated] " gmbeard
@ 2023-03-28 17:12 ` gmbeard
2023-04-15 10:41 ` [PR PATCH] [Updated] " gmbeard
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-03-28 17:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1487306528
Comment:
Update checksum and added NVIDIA license
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Updated] New package: MangoHud-nvidia-0.6.8
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
2023-03-28 17:11 ` [PR PATCH] [Updated] " gmbeard
2023-03-28 17:12 ` gmbeard
@ 2023-04-15 10:41 ` gmbeard
2023-04-27 5:55 ` [PR PATCH] [Updated] New package: MangoHud-nvidia-0.6.9 gmbeard
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-04-15 10:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages feature/MangoHud-nvidia
https://github.com/void-linux/void-packages/pull/42919
New package: MangoHud-nvidia-0.6.8
### Description
This packages MangoHud with the necessary build config to enable nVidia GPU stats. Because of the non-free license of the nVidia headers used in the source distribution, I've made the assumption that this must be treated in the same way as the `nvidia*` packages (i.e `nonfree`), hence the separate package.
This is essentially a straight clone of the existing MangoHud package, but uses a non-DFSG upstream.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- x86\_64-musl
A patch file from https://github.com/void-linux/void-packages/pull/42919.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feature/MangoHud-nvidia-42919.patch --]
[-- Type: text/x-diff, Size: 9688 bytes --]
From 5f5b2ed0af783be57d160a01fa1208e7deda1455 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Wed, 22 Mar 2023 07:28:46 +0000
Subject: [PATCH] New package: MangoHud-nvidia-0.6.9
---
srcpkgs/MangoHud-nvidia/files/musl.patch | 13 ++
...libdir_mangohud-handling-remove-ld_l.patch | 142 ++++++++++++++++++
srcpkgs/MangoHud-nvidia/template | 33 ++++
3 files changed, 188 insertions(+)
create mode 100644 srcpkgs/MangoHud-nvidia/files/musl.patch
create mode 100644 srcpkgs/MangoHud-nvidia/patches/0001-meson-unwrap-ld_libdir_mangohud-handling-remove-ld_l.patch
create mode 100644 srcpkgs/MangoHud-nvidia/template
diff --git a/srcpkgs/MangoHud-nvidia/files/musl.patch b/srcpkgs/MangoHud-nvidia/files/musl.patch
new file mode 100644
index 000000000000..71e58f83dc82
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/files/musl.patch
@@ -0,0 +1,13 @@
+--- a/src/meson.build 2021-06-11 22:12:53.000000000 +0200
++++ b/src/meson.build 2021-06-14 23:32:49.677413454 +0200
+@@ -3,8 +3,8 @@
+ # Needs prefix for configure_file()
+ if get_option('append_libdir_mangohud')
+ libdir_mangohud = join_paths(get_option('libdir'), 'mangohud')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'), 'mangohud')
+ else
+ libdir_mangohud = get_option('libdir')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'))
+ endif
diff --git a/srcpkgs/MangoHud-nvidia/patches/0001-meson-unwrap-ld_libdir_mangohud-handling-remove-ld_l.patch b/srcpkgs/MangoHud-nvidia/patches/0001-meson-unwrap-ld_libdir_mangohud-handling-remove-ld_l.patch
new file mode 100644
index 000000000000..05b18d847ea3
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/patches/0001-meson-unwrap-ld_libdir_mangohud-handling-remove-ld_l.patch
@@ -0,0 +1,142 @@
+This reverts commit f47f777e26825b23d191f7a28d0c2404750e4207.
+
+There seems to be an issue using MangoHud with Steam (and other apps)
+when the absolute library path is used in LD_PRELOAD. This patch
+reverts back to the 0.6.8 behaviour.
+
+diff --git a/bin/mangohud.in b/bin/mangohud.in
+--- a/bin/mangohud.in
++++ b/bin/mangohud.in
+@@ -8,16 +8,21 @@ if [ "$#" -eq 0 ]; then
+ exit 1
+ fi
+
+-MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud.so"
+-
+ if [ "$1" = "--dlsym" ]; then
+ MANGOHUD_DLSYM=1
+- MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
+ shift
+ fi
+
++MANGOHUD_LIB_NAME="@ld_libdir_mangohud_abs@libMangoHud.so"
++
++if [ "$MANGOHUD_DLSYM" = "1" ]; then
++ MANGOHUD_LIB_NAME="@ld_libdir_mangohud_abs@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
++fi
++
+ # Preload using the plain filenames of the libs, the dynamic linker will
+-# figure out whether the 32 or 64 bit version should be used
+-LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}${MANGOHUD_LIB_NAME}"
++# figure out whether the 32 or 64 bit version should be used, and will search
++# for it in the correct directory
++LD_PRELOAD="${LD_PRELOAD}${LD_PRELOAD:+:}${MANGOHUD_LIB_NAME}"
++LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}@ld_libdir_mangohud@"
+
+-exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" "$@"
++exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" "$@"
+diff --git a/build.sh b/build.sh
+--- a/build.sh
++++ b/build.sh
+@@ -142,13 +142,13 @@ configure() {
+ git submodule update --init --depth 50
+ CONFIGURE_OPTS="-Dwerror=true"
+ if [[ ! -f "build/meson64/build.ninja" ]]; then
+- meson build/meson64 --libdir lib/mangohud/lib64 --prefix /usr -Dappend_libdir_mangohud=false $@ ${CONFIGURE_OPTS}
++ meson build/meson64 --libdir lib/mangohud/lib64 --prefix /usr -Dappend_libdir_mangohud=false -Dld_libdir_abs=true $@ ${CONFIGURE_OPTS}
+ fi
+ if [[ ! -f "build/meson32/build.ninja" && "$MACHINE" = "x86_64" ]]; then
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH_32}"
+- meson build/meson32 --libdir lib/mangohud/lib32 --prefix /usr -Dappend_libdir_mangohud=false $@ ${CONFIGURE_OPTS}
++ meson build/meson32 --libdir lib/mangohud/lib32 --prefix /usr -Dappend_libdir_mangohud=false -Dld_libdir_abs=true $@ ${CONFIGURE_OPTS}
+ fi
+ }
+
+diff --git a/meson_options.txt b/meson_options.txt
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,6 +1,7 @@
+ option('glibcxx_asserts', type : 'boolean', value : false)
+ option('use_system_spdlog', type : 'feature', value : 'disabled', description: 'Use system spdlog library')
+ option('append_libdir_mangohud', type : 'boolean', value : true, description: 'Append "mangohud" to libdir path or not.')
++option('ld_libdir_abs', type : 'boolean', value : false, description: 'Use absolute path in LD_PRELOAD')
+ option('include_doc', type : 'boolean', value : true, description: 'Include the example config, man pages, appstream files etc.')
+ option('with_nvml', type : 'combo', value : 'enabled', choices: ['enabled', 'system', 'disabled'], description: 'Enable NVML support')
+ option('with_xnvctrl', type : 'feature', value : 'enabled', description: 'Enable XNVCtrl support')
+diff --git a/src/app/layer.json.in b/src/app/layer.json.in
+--- a/src/app/layer.json.in
++++ b/src/app/layer.json.in
+@@ -4,7 +4,7 @@
+ "name": "VK_LAYER_MANGOAPP_overlay",
+ "type": "GLOBAL",
+ "api_version": "1.3.0",
+- "library_path": "@ld_libdir_mangohud_abs@/libMangoApp.so",
++ "library_path": "@ld_libdir_mangohud@libMangoApp.so",
+ "implementation_version": "1",
+ "description": "Mangoapp Layer",
+ "functions": {
+diff --git a/src/mangohud.json.in b/src/mangohud.json.in
+--- a/src/mangohud.json.in
++++ b/src/mangohud.json.in
+@@ -4,7 +4,7 @@
+ "name": "VK_LAYER_MANGOHUD_overlay",
+ "type": "GLOBAL",
+ "api_version": "1.3.0",
+- "library_path": "@ld_libdir_mangohud_abs@/libMangoHud.so",
++ "library_path": "@ld_libdir_mangohud@libMangoHud.so",
+ "implementation_version": "1",
+ "description": "Vulkan Hud Overlay",
+ "functions": {
+diff --git a/src/meson.build b/src/meson.build
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -2,17 +2,22 @@ glslang = find_program('glslangValidator')
+
+ # Needs prefix for configure_file()
+ if get_option('append_libdir_mangohud')
+- libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'), 'mangohud')
++ libdir_mangohud = join_paths(get_option('libdir'), 'mangohud')
+ ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/'
+ else
+- libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
++ libdir_mangohud = get_option('libdir')
+ ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
+ endif
+
+ conf_data = configuration_data()
+
+-conf_data.set('ld_libdir_mangohud_abs', libdir_mangohud)
+-conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
++if get_option('ld_libdir_abs')
++ conf_data.set('ld_libdir_mangohud_abs', ld_libdir_mangohud)
++ conf_data.set('ld_libdir_mangohud', '')
++else
++ conf_data.set('ld_libdir_mangohud_abs', '')
++ conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
++endif
+
+ overlay_shaders = [
+ 'overlay.frag',
+@@ -282,7 +287,7 @@ endif
+
+ configure_file(input : 'mangohud.json.in',
+ output : '@0@.@1@.json'.format(meson.project_name(), host_machine.cpu_family()),
+- configuration : conf_data,
++ configuration : {'ld_libdir_mangohud' : ld_libdir_mangohud.replace('\$', '$')},
+ install : true,
+ install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),
+ install_tag : 'runtime',
+@@ -298,7 +303,7 @@ configure_file(input : '../bin/mangohud.in',
+ if get_option('mangoapp_layer')
+ configure_file(input : 'app/layer.json.in',
+ output : 'libMangoApp.@0@.json'.format(host_machine.cpu_family()),
+- configuration : conf_data,
++ configuration : {'ld_libdir_mangohud' : ld_libdir_mangohud.replace('\$', '$')},
+ install : true,
+ install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),
+ install_tag : 'mangoapp',
+--
+2.40.0
+
diff --git a/srcpkgs/MangoHud-nvidia/template b/srcpkgs/MangoHud-nvidia/template
new file mode 100644
index 000000000000..d888f25fb84b
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/template
@@ -0,0 +1,33 @@
+# Template file for 'MangoHud-nvidia'
+pkgname=MangoHud-nvidia
+version=0.6.9
+revision=1
+build_style=meson
+configure_args="-Dwith_xnvctrl=disabled -Dwith_nvml=enabled -Duse_system_spdlog=enabled"
+hostmakedepends="Vulkan-Headers python3-Mako glslang pkg-config"
+makedepends="libglvnd-devel dbus-devel vulkan-loader Vulkan-Headers spdlog"
+short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
+maintainer="gmbeard <gmbeard@googlemail.com>"
+license="MIT,custom:NVIDIA"
+homepage="https://github.com/flightlessmango/MangoHud"
+distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source.tar.xz"
+checksum=a6e59ad810a30cd0a6a62ac5a7b5d8a10abab48eb1312e084ca7c81472d76573
+conflicts=MangoHud
+repository=nonfree
+
+post_patch() {
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ patch -Np1 -i ${FILESDIR}/musl.patch
+ fi
+}
+
+post_install() {
+ # Extract the NVIDIA license from the nvml.h header
+ head -n $( \
+ awk '/NVML API Reference/{ print NR-1; exit }' ${wrksrc}/include/nvml.h \
+ ) ${wrksrc}/include/nvml.h \
+ | sed 's;^\([/ ]\?\)\*/\?;;g' >${wrksrc}/LICENSE-NVIDIA
+
+ vlicense LICENSE
+ vlicense LICENSE-NVIDIA
+}
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Updated] New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (2 preceding siblings ...)
2023-04-15 10:41 ` [PR PATCH] [Updated] " gmbeard
@ 2023-04-27 5:55 ` gmbeard
2023-04-27 6:03 ` gmbeard
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-04-27 5:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages feature/MangoHud-nvidia
https://github.com/void-linux/void-packages/pull/42919
New package: MangoHud-nvidia-0.6.9
### Description
This packages MangoHud with the necessary build config to enable nVidia GPU stats. Because of the non-free license of the nVidia headers used in the source distribution, I've made the assumption that this must be treated in the same way as the `nvidia*` packages (i.e `nonfree`), hence the separate package.
This is essentially a straight clone of the existing MangoHud package, but uses a non-DFSG upstream.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- x86\_64-musl
A patch file from https://github.com/void-linux/void-packages/pull/42919.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feature/MangoHud-nvidia-42919.patch --]
[-- Type: text/x-diff, Size: 4537 bytes --]
From 85d24cd23e1e4a6d0ec4456d46f1145cadcb71c6 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Wed, 22 Mar 2023 07:28:46 +0000
Subject: [PATCH] New package: MangoHud-nvidia-0.6.9
---
srcpkgs/MangoHud-nvidia/files/musl.patch | 30 +++++++++
srcpkgs/MangoHud-nvidia/template | 84 ++++++++++++++++++++++++
2 files changed, 114 insertions(+)
create mode 100644 srcpkgs/MangoHud-nvidia/files/musl.patch
create mode 100644 srcpkgs/MangoHud-nvidia/template
diff --git a/srcpkgs/MangoHud-nvidia/files/musl.patch b/srcpkgs/MangoHud-nvidia/files/musl.patch
new file mode 100644
index 000000000000..63d052cc3571
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/files/musl.patch
@@ -0,0 +1,30 @@
+--- a/src/meson.build 2023-04-17 23:31:55.000000000 +0100
++++ b/src/meson.build 2023-04-27 06:21:59.187169515 +0100
+@@ -3,10 +3,10 @@
+ # Needs prefix for configure_file()
+ if get_option('append_libdir_mangohud')
+ libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'), 'mangohud')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'), 'mangohud')
+ else
+ libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'))
+ endif
+
+ conf_data = configuration_data()
+--- a/bin/mangohud.in 2023-04-17 23:31:55.000000000 +0100
++++ b/bin/mangohud.in 2023-04-27 06:30:23.169862796 +0100
+@@ -8,11 +8,11 @@
+ exit 1
+ fi
+
+-MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud.so"
++MANGOHUD_LIB_NAME="@ld_libdir_mangohud@/libMangoHud.so"
+
+ if [ "$1" = "--dlsym" ]; then
+ MANGOHUD_DLSYM=1
+- MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
++ MANGOHUD_LIB_NAME="@ld_libdir_mangohud@/libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
+ shift
+ fi
diff --git a/srcpkgs/MangoHud-nvidia/template b/srcpkgs/MangoHud-nvidia/template
new file mode 100644
index 000000000000..984f77ced9e0
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/template
@@ -0,0 +1,84 @@
+# Template file for 'MangoHud-nvidia'
+pkgname=MangoHud-nvidia
+version=0.6.9
+revision=1
+build_style=meson
+configure_args="-Dwith_xnvctrl=disabled -Dwith_nvml=enabled -Duse_system_spdlog=enabled"
+hostmakedepends="python3-Mako glslang pkg-config"
+makedepends="libglvnd-devel dbus-devel vulkan-loader spdlog"
+short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
+maintainer="gmbeard <gmbeard@googlemail.com>"
+license="MIT,custom:NVIDIA"
+homepage="https://github.com/flightlessmango/MangoHud"
+distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}-${revision}/MangoHud-v${version}-${revision}-Source.tar.xz"
+checksum=30d9336b60cbc7fdc2a1ba86ec62b9fb7f2986a2b0f6196ca347f5c13e583c6d
+conflicts=MangoHud
+repository=nonfree
+
+post_patch() {
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ patch -Np1 -i ${FILESDIR}/musl.patch
+ fi
+}
+
+# Ensure that each eligible architecture ships its multilib layer files.
+# This allows us to not have to ship these files in the current *-32bit packages
+_generate_counterpart_vulkan_layer() {
+
+ local arch=${XBPS_TARGET_MACHINE%-*}
+ local oarch
+ local olibdir="/usr/lib32/"
+
+ if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+ olibdir="/usr/lib64/"
+ fi
+
+ # Deduce the current and counterpart archs based on meson's cpu_family,
+ # which is what the build uses to name the layer files...
+ # (https://mesonbuild.com/Reference-tables.html#cpu-families)
+ case "${arch}" in
+ aarch64)
+ oarch="arm"
+ ;;
+ armv[67]l)
+ arch="arm"
+ oarch="aarch64"
+ ;;
+ x86_64)
+ oarch="x86"
+ ;;
+ i686)
+ arch="x86"
+ oarch="x86_64"
+ ;;
+ ppc64*)
+ arch="ppc64"
+ oarch="ppc"
+ ;;
+ ppc|ppcle)
+ arch="ppc"
+ oarch="ppc64"
+ ;;
+ *) ;; # no counterparts
+ esac
+
+ if [ -n "${oarch}" ]; then
+ local layer="${DESTDIR}/usr/share/vulkan/implicit_layer.d/MangoHud.${arch}.json"
+
+ sed "s#/usr/lib${XBPS_TARGET_WORDSIZE}/#${olibdir}#g" \
+ "${layer}" > "${layer/.${arch}/.${oarch}}"
+ fi
+}
+
+post_install() {
+ _generate_counterpart_vulkan_layer
+
+ # Extract the NVIDIA license from the nvml.h header
+ head -n $( \
+ awk '/NVML API Reference/{ print NR-1; exit }' ${wrksrc}/include/nvml.h \
+ ) ${wrksrc}/include/nvml.h \
+ | sed 's;^\([/ ]\?\)\*/\?;;g' >${wrksrc}/LICENSE-NVIDIA
+
+ vlicense LICENSE
+ vlicense LICENSE-NVIDIA
+}
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (3 preceding siblings ...)
2023-04-27 5:55 ` [PR PATCH] [Updated] New package: MangoHud-nvidia-0.6.9 gmbeard
@ 2023-04-27 6:03 ` gmbeard
2023-04-27 6:06 ` [PR PATCH] [Updated] " gmbeard
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-04-27 6:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1524786556
Comment:
Updated to include hotfix, and to ensure mutilib pkgs install the 32bit vulkan layer files (as per suggestions in https://github.com/flightlessmango/MangoHud/issues/991)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Updated] New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (4 preceding siblings ...)
2023-04-27 6:03 ` gmbeard
@ 2023-04-27 6:06 ` gmbeard
2023-07-27 1:46 ` github-actions
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-04-27 6:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages feature/MangoHud-nvidia
https://github.com/void-linux/void-packages/pull/42919
New package: MangoHud-nvidia-0.6.9
### Description
This packages MangoHud with the necessary build config to enable nVidia GPU stats. Because of the non-free license of the nVidia headers used in the source distribution, I've made the assumption that this must be treated in the same way as the `nvidia*` packages (i.e `nonfree`), hence the separate package.
This is essentially a straight clone of the existing MangoHud package, but uses a non-DFSG upstream.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- x86\_64-musl
A patch file from https://github.com/void-linux/void-packages/pull/42919.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feature/MangoHud-nvidia-42919.patch --]
[-- Type: text/x-diff, Size: 4517 bytes --]
From 20a7b928b44665d4c0670c9c832102c15a3bc6cf Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Wed, 22 Mar 2023 07:28:46 +0000
Subject: [PATCH] New package: MangoHud-nvidia-0.6.9
---
srcpkgs/MangoHud-nvidia/files/musl.patch | 30 +++++++++
srcpkgs/MangoHud-nvidia/template | 84 ++++++++++++++++++++++++
2 files changed, 114 insertions(+)
create mode 100644 srcpkgs/MangoHud-nvidia/files/musl.patch
create mode 100644 srcpkgs/MangoHud-nvidia/template
diff --git a/srcpkgs/MangoHud-nvidia/files/musl.patch b/srcpkgs/MangoHud-nvidia/files/musl.patch
new file mode 100644
index 000000000000..63d052cc3571
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/files/musl.patch
@@ -0,0 +1,30 @@
+--- a/src/meson.build 2023-04-17 23:31:55.000000000 +0100
++++ b/src/meson.build 2023-04-27 06:21:59.187169515 +0100
+@@ -3,10 +3,10 @@
+ # Needs prefix for configure_file()
+ if get_option('append_libdir_mangohud')
+ libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'), 'mangohud')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'), 'mangohud')
+ else
+ libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
++ ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'))
+ endif
+
+ conf_data = configuration_data()
+--- a/bin/mangohud.in 2023-04-17 23:31:55.000000000 +0100
++++ b/bin/mangohud.in 2023-04-27 06:30:23.169862796 +0100
+@@ -8,11 +8,11 @@
+ exit 1
+ fi
+
+-MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud.so"
++MANGOHUD_LIB_NAME="@ld_libdir_mangohud@/libMangoHud.so"
+
+ if [ "$1" = "--dlsym" ]; then
+ MANGOHUD_DLSYM=1
+- MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
++ MANGOHUD_LIB_NAME="@ld_libdir_mangohud@/libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
+ shift
+ fi
diff --git a/srcpkgs/MangoHud-nvidia/template b/srcpkgs/MangoHud-nvidia/template
new file mode 100644
index 000000000000..a0f42ac47c83
--- /dev/null
+++ b/srcpkgs/MangoHud-nvidia/template
@@ -0,0 +1,84 @@
+# Template file for 'MangoHud-nvidia'
+pkgname=MangoHud-nvidia
+version=0.6.9
+revision=1
+build_style=meson
+configure_args="-Dwith_xnvctrl=disabled -Dwith_nvml=enabled -Duse_system_spdlog=enabled"
+hostmakedepends="python3-Mako glslang pkg-config"
+makedepends="libglvnd-devel dbus-devel vulkan-loader spdlog"
+short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
+maintainer="gmbeard <gmbeard@googlemail.com>"
+license="MIT,custom:NVIDIA"
+homepage="https://github.com/flightlessmango/MangoHud"
+distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}-1/MangoHud-v${version}-1-Source.tar.xz"
+checksum=30d9336b60cbc7fdc2a1ba86ec62b9fb7f2986a2b0f6196ca347f5c13e583c6d
+conflicts=MangoHud
+repository=nonfree
+
+post_patch() {
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ patch -Np1 -i ${FILESDIR}/musl.patch
+ fi
+}
+
+# Ensure that each eligible architecture ships its multilib layer files.
+# This allows us to not have to ship these files in the current *-32bit packages
+_generate_counterpart_vulkan_layer() {
+
+ local arch=${XBPS_TARGET_MACHINE%-*}
+ local oarch
+ local olibdir="/usr/lib32/"
+
+ if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+ olibdir="/usr/lib64/"
+ fi
+
+ # Deduce the current and counterpart archs based on meson's cpu_family,
+ # which is what the build uses to name the layer files...
+ # (https://mesonbuild.com/Reference-tables.html#cpu-families)
+ case "${arch}" in
+ aarch64)
+ oarch="arm"
+ ;;
+ armv[67]l)
+ arch="arm"
+ oarch="aarch64"
+ ;;
+ x86_64)
+ oarch="x86"
+ ;;
+ i686)
+ arch="x86"
+ oarch="x86_64"
+ ;;
+ ppc64*)
+ arch="ppc64"
+ oarch="ppc"
+ ;;
+ ppc|ppcle)
+ arch="ppc"
+ oarch="ppc64"
+ ;;
+ *) ;; # no counterparts
+ esac
+
+ if [ -n "${oarch}" ]; then
+ local layer="${DESTDIR}/usr/share/vulkan/implicit_layer.d/MangoHud.${arch}.json"
+
+ sed "s#/usr/lib${XBPS_TARGET_WORDSIZE}/#${olibdir}#g" \
+ "${layer}" > "${layer/.${arch}/.${oarch}}"
+ fi
+}
+
+post_install() {
+ _generate_counterpart_vulkan_layer
+
+ # Extract the NVIDIA license from the nvml.h header
+ head -n $( \
+ awk '/NVML API Reference/{ print NR-1; exit }' ${wrksrc}/include/nvml.h \
+ ) ${wrksrc}/include/nvml.h \
+ | sed 's;^\([/ ]\?\)\*/\?;;g' >${wrksrc}/LICENSE-NVIDIA
+
+ vlicense LICENSE
+ vlicense LICENSE-NVIDIA
+}
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (5 preceding siblings ...)
2023-04-27 6:06 ` [PR PATCH] [Updated] " gmbeard
@ 2023-07-27 1:46 ` github-actions
2023-07-28 13:15 ` gmbeard
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: github-actions @ 2023-07-27 1:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1652793281
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (6 preceding siblings ...)
2023-07-27 1:46 ` github-actions
@ 2023-07-28 13:15 ` gmbeard
2023-10-28 1:44 ` github-actions
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-07-28 13:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1655667474
Comment:
\*bump\*
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (7 preceding siblings ...)
2023-07-28 13:15 ` gmbeard
@ 2023-10-28 1:44 ` github-actions
2023-10-28 6:23 ` gmbeard
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: github-actions @ 2023-10-28 1:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1783657891
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (8 preceding siblings ...)
2023-10-28 1:44 ` github-actions
@ 2023-10-28 6:23 ` gmbeard
2024-01-28 1:45 ` github-actions
2024-02-12 1:44 ` [PR PATCH] [Closed]: " github-actions
11 siblings, 0 replies; 13+ messages in thread
From: gmbeard @ 2023-10-28 6:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 216 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1783719893
Comment:
@classabbyamp @paper42 is there any chance of this package being accepted?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (9 preceding siblings ...)
2023-10-28 6:23 ` gmbeard
@ 2024-01-28 1:45 ` github-actions
2024-02-12 1:44 ` [PR PATCH] [Closed]: " github-actions
11 siblings, 0 replies; 13+ messages in thread
From: github-actions @ 2024-01-28 1:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/42919#issuecomment-1913405857
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Closed]: New package: MangoHud-nvidia-0.6.9
2023-03-22 7:44 [PR PATCH] New package: MangoHud-nvidia-0.6.8 gmbeard
` (10 preceding siblings ...)
2024-01-28 1:45 ` github-actions
@ 2024-02-12 1:44 ` github-actions
11 siblings, 0 replies; 13+ messages in thread
From: github-actions @ 2024-02-12 1:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
There's a closed pull request on the void-packages repository
New package: MangoHud-nvidia-0.6.9
https://github.com/void-linux/void-packages/pull/42919
Description:
### Description
This packages MangoHud with the necessary build config to enable nVidia GPU stats. Because of the non-free license of the nVidia headers used in the source distribution, I've made the assumption that this must be treated in the same way as the `nvidia*` packages (i.e `nonfree`), hence the separate package.
This is essentially a straight clone of the existing MangoHud package, but uses a non-DFSG upstream.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- x86\_64-musl
^ permalink raw reply [flat|nested] 13+ messages in thread