Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] MangoHud: update to 0.7.0.
@ 2023-09-27 21:49 Johnnynator
  2023-09-28 12:10 ` [PR PATCH] [Updated] " Johnnynator
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johnnynator @ 2023-09-27 21:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

There is a new pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages mangohud-0.7.0
https://github.com/void-linux/void-packages/pull/46301

MangoHud: update to 0.7.0.
None

A patch file from https://github.com/void-linux/void-packages/pull/46301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mangohud-0.7.0-46301.patch --]
[-- Type: text/x-diff, Size: 3657 bytes --]

From 0e2a74d9ac28353e3ad76b427c15fb1fd7c70b92 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Wed, 27 Sep 2023 23:27:16 +0200
Subject: [PATCH] MangoHud: update to 0.7.0.

---
 srcpkgs/MangoHud/files/musl.patch  | 22 ----------------------
 srcpkgs/MangoHud/patches/git.patch | 11 +++++++++++
 srcpkgs/MangoHud/template          | 16 +++++-----------
 3 files changed, 16 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/MangoHud/files/musl.patch
 create mode 100644 srcpkgs/MangoHud/patches/git.patch

diff --git a/srcpkgs/MangoHud/files/musl.patch b/srcpkgs/MangoHud/files/musl.patch
deleted file mode 100644
index c11ac1b414c2d..0000000000000
--- a/srcpkgs/MangoHud/files/musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- 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/patches/git.patch b/srcpkgs/MangoHud/patches/git.patch
new file mode 100644
index 0000000000000..b33b35e6274fa
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/git.patch
@@ -0,0 +1,11 @@
+--- a/src/meson.build	2023-09-26 08:29:47.000000000 +0200
++++ -	2023-09-27 23:33:42.659590482 +0200
+@@ -14,7 +14,7 @@
+ conf_data.set('ld_libdir_mangohud_abs', libdir_mangohud)
+ conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
+ conf_data.set('cpu_family', host_machine.cpu_family())
+-conf_data.set('version', run_command(['git', 'describe', '--tags', '--dirty=+']).stdout().strip())
++conf_data.set('version', meson.project_version())
+ 
+ overlay_shaders = [
+   'overlay.frag',
diff --git a/srcpkgs/MangoHud/template b/srcpkgs/MangoHud/template
index 4e2a01ca1ce90..91f91475a98a6 100644
--- a/srcpkgs/MangoHud/template
+++ b/srcpkgs/MangoHud/template
@@ -1,25 +1,19 @@
 # Template file for 'MangoHud'
 pkgname=MangoHud
-version=0.6.8
+version=0.7.0
 revision=1
 build_style=meson
-configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled
+configure_args="-Dwith_xnvctrl=disabled
  -Dwith_nvml=disabled -Duse_system_spdlog=enabled"
 hostmakedepends="Vulkan-Headers python3-Mako glslang pkg-config"
-makedepends="libglvnd-devel dbus-devel vulkan-loader Vulkan-Headers
- spdlog"
+makedepends="libglvnd-devel dbus-devel vulkan-loader spdlog json-c++"
 short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
 homepage="https://github.com/flightlessmango/MangoHud"
 distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source-DFSG.tar.xz"
-checksum=0c4358428e6ae48d13282dec4bf4e78015b4f5e46d080a7e7588786cef63c09f
-
-post_patch() {
-	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-		patch -Np0 -i ${FILESDIR}/musl.patch
-	fi
-}
+checksum=222e15d4f3e679937f7594e2e5615aaae41b97d487eb7938b96b26eeb1fbcf35
+python_version=3
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] MangoHud: update to 0.7.0.
  2023-09-27 21:49 [PR PATCH] MangoHud: update to 0.7.0 Johnnynator
@ 2023-09-28 12:10 ` Johnnynator
  2023-09-28 15:54 ` Johnnynator
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-09-28 12:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages mangohud-0.7.0
https://github.com/void-linux/void-packages/pull/46301

MangoHud: update to 0.7.0.
None

A patch file from https://github.com/void-linux/void-packages/pull/46301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mangohud-0.7.0-46301.patch --]
[-- Type: text/x-diff, Size: 4594 bytes --]

From c09074d1bda3a3f596a31fdbc307b0eefdd59497 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Wed, 27 Sep 2023 23:27:16 +0200
Subject: [PATCH] MangoHud: update to 0.7.0.

---
 srcpkgs/MangoHud/files/musl.patch  | 17 ++++---------
 srcpkgs/MangoHud/patches/git.patch | 38 ++++++++++++++++++++++++++++++
 srcpkgs/MangoHud/template          | 10 ++++----
 3 files changed, 48 insertions(+), 17 deletions(-)
 create mode 100644 srcpkgs/MangoHud/patches/git.patch

diff --git a/srcpkgs/MangoHud/files/musl.patch b/srcpkgs/MangoHud/files/musl.patch
index c11ac1b414c2d..6da85b375f17d 100644
--- a/srcpkgs/MangoHud/files/musl.patch
+++ b/srcpkgs/MangoHud/files/musl.patch
@@ -1,22 +1,15 @@
---- src/meson.build	2021-06-11 22:12:53.000000000 +0200
-+++ -	2021-06-14 23:32:49.677413454 +0200
-@@ -3,16 +3,16 @@
+--- src/meson.build	2023-09-26 08:29:47.000000000 +0200
++++ -	2023-09-28 14:06:04.988958823 +0200
+@@ -3,10 +3,10 @@
  # Needs prefix for configure_file()
  if get_option('append_libdir_mangohud')
-   libdir_mangohud = join_paths(get_option('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 = get_option('libdir')
+   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
  
- # 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/patches/git.patch b/srcpkgs/MangoHud/patches/git.patch
new file mode 100644
index 0000000000000..5826af61fba98
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/git.patch
@@ -0,0 +1,38 @@
+From c6e7c2da873cf2ada7cac9cc8953c3afda7f4cd1 Mon Sep 17 00:00:00 2001
+From: John Zimmermann <me@johnnynator.dev>
+Date: Thu, 28 Sep 2023 13:56:04 +0200
+Subject: [PATCH] meson: fallback to project_version() without git
+
+resolves #1131
+---
+ src/meson.build | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index 537ce63c69..07295960d7 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -9,12 +9,22 @@ else
+   ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
+ endif
+ 
++git = find_program('git', required: false)
++if git.found()
++  git_describe = run_command([git, 'describe', '--tags', '--dirty=+'], check: false)
++endif
++if git.found() and git_describe.returncode() == 0
++  describe_ver = git_describe.stdout().strip()
++else
++  describe_ver = meson.project_version()
++endif
++
+ conf_data = configuration_data()
+ 
+ conf_data.set('ld_libdir_mangohud_abs', libdir_mangohud)
+ conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
+ conf_data.set('cpu_family', host_machine.cpu_family())
+-conf_data.set('version', run_command(['git', 'describe', '--tags', '--dirty=+']).stdout().strip())
++conf_data.set('version', describe_ver)
+ 
+ overlay_shaders = [
+   'overlay.frag',
diff --git a/srcpkgs/MangoHud/template b/srcpkgs/MangoHud/template
index 4e2a01ca1ce90..ff3ea44ed8961 100644
--- a/srcpkgs/MangoHud/template
+++ b/srcpkgs/MangoHud/template
@@ -1,19 +1,19 @@
 # Template file for 'MangoHud'
 pkgname=MangoHud
-version=0.6.8
+version=0.7.0
 revision=1
 build_style=meson
-configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled
+configure_args="-Dwith_xnvctrl=disabled
  -Dwith_nvml=disabled -Duse_system_spdlog=enabled"
 hostmakedepends="Vulkan-Headers python3-Mako glslang pkg-config"
-makedepends="libglvnd-devel dbus-devel vulkan-loader Vulkan-Headers
- spdlog"
+makedepends="libglvnd-devel dbus-devel vulkan-loader spdlog json-c++"
 short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
 homepage="https://github.com/flightlessmango/MangoHud"
 distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source-DFSG.tar.xz"
-checksum=0c4358428e6ae48d13282dec4bf4e78015b4f5e46d080a7e7588786cef63c09f
+checksum=222e15d4f3e679937f7594e2e5615aaae41b97d487eb7938b96b26eeb1fbcf35
+python_version=3
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] MangoHud: update to 0.7.0.
  2023-09-27 21:49 [PR PATCH] MangoHud: update to 0.7.0 Johnnynator
  2023-09-28 12:10 ` [PR PATCH] [Updated] " Johnnynator
@ 2023-09-28 15:54 ` Johnnynator
  2023-09-28 16:25 ` Johnnynator
  2023-09-28 16:33 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-09-28 15:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages mangohud-0.7.0
https://github.com/void-linux/void-packages/pull/46301

MangoHud: update to 0.7.0.
None

A patch file from https://github.com/void-linux/void-packages/pull/46301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mangohud-0.7.0-46301.patch --]
[-- Type: text/x-diff, Size: 9211 bytes --]

From 929b8f9d5f03aeacb5b98677cbf3d511e26764ec Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Wed, 27 Sep 2023 23:27:16 +0200
Subject: [PATCH] MangoHud: update to 0.7.0.

---
 srcpkgs/MangoHud/files/musl.patch             |  21 ++--
 ...lback-to-project_version-without-git.patch |  41 +++++++
 ...ptr-is-relative-on-non-glibc-systems.patch | 106 ++++++++++++++++++
 srcpkgs/MangoHud/template                     |  10 +-
 4 files changed, 159 insertions(+), 19 deletions(-)
 create mode 100644 srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch
 create mode 100644 srcpkgs/MangoHud/patches/0002-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch

diff --git a/srcpkgs/MangoHud/files/musl.patch b/srcpkgs/MangoHud/files/musl.patch
index c11ac1b414c2d..18538610707af 100644
--- a/srcpkgs/MangoHud/files/musl.patch
+++ b/srcpkgs/MangoHud/files/musl.patch
@@ -1,22 +1,15 @@
---- src/meson.build	2021-06-11 22:12:53.000000000 +0200
-+++ -	2021-06-14 23:32:49.677413454 +0200
-@@ -3,16 +3,16 @@
+--- src/meson.build	2023-09-26 08:29:47.000000000 +0200
++++ -	2023-09-28 14:06:04.988958823 +0200
+@@ -3,10 +3,10 @@
  # Needs prefix for configure_file()
  if get_option('append_libdir_mangohud')
-   libdir_mangohud = join_paths(get_option('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')
++  ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir'), 'mangohud') + '/'
  else
-   libdir_mangohud = get_option('libdir')
+   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
- 
- # 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'
++  ld_libdir_mangohud = join_paths(get_option('prefix') ,get_option('libdir')) + '/'
  endif
  
  conf_data = configuration_data()
diff --git a/srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch b/srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch
new file mode 100644
index 0000000000000..d999df1bb0098
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch
@@ -0,0 +1,41 @@
+From c6e7c2da873cf2ada7cac9cc8953c3afda7f4cd1 Mon Sep 17 00:00:00 2001
+From: John Zimmermann <me@johnnynator.dev>
+Date: Thu, 28 Sep 2023 13:56:04 +0200
+Subject: [PATCH 1/2] meson: fallback to project_version() without git
+
+resolves #1131
+---
+ src/meson.build | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index 537ce63..0729596 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -9,12 +9,22 @@ else
+   ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
+ endif
+ 
++git = find_program('git', required: false)
++if git.found()
++  git_describe = run_command([git, 'describe', '--tags', '--dirty=+'], check: false)
++endif
++if git.found() and git_describe.returncode() == 0
++  describe_ver = git_describe.stdout().strip()
++else
++  describe_ver = meson.project_version()
++endif
++
+ conf_data = configuration_data()
+ 
+ conf_data.set('ld_libdir_mangohud_abs', libdir_mangohud)
+ conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
+ conf_data.set('cpu_family', host_machine.cpu_family())
+-conf_data.set('version', run_command(['git', 'describe', '--tags', '--dirty=+']).stdout().strip())
++conf_data.set('version', describe_ver)
+ 
+ overlay_shaders = [
+   'overlay.frag',
+-- 
+2.42.0
+
diff --git a/srcpkgs/MangoHud/patches/0002-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch b/srcpkgs/MangoHud/patches/0002-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch
new file mode 100644
index 0000000000000..76f21a4629bc0
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/0002-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch
@@ -0,0 +1,106 @@
+From 8d289a44590d2fe614c8cb3ccb13620b306292ba Mon Sep 17 00:00:00 2001
+From: John Zimmermann <me@johnnynator.dev>
+Date: Thu, 28 Sep 2023 16:42:21 +0200
+Subject: [PATCH 2/2] elfhacks: d_un.d_ptr is relative on non glibc systems
+
+elf(5) documents it this way, GLIBC diverts from this documentation
+---
+ src/elfhacks.cpp   | 22 ++++++++++++++--------
+ src/real_dlsym.cpp |  1 +
+ 2 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/elfhacks.cpp b/src/elfhacks.cpp
+index 7cfc310..810a19d 100644
+--- a/src/elfhacks.cpp
++++ b/src/elfhacks.cpp
+@@ -29,6 +29,12 @@
+  *  \{
+  */
+ 
++#ifdef __GLIBC__
++# define ABS_ADDR(obj, ptr) (ptr)
++#else
++# define ABS_ADDR(obj, ptr) ((obj->addr) + (ptr))
++#endif
++
+ struct eh_iterate_callback_args {
+ 	eh_iterate_obj_callback_func callback;
+ 	void *arg;
+@@ -196,22 +202,22 @@ int eh_init_obj(eh_obj_t *obj)
+ 			if (obj->strtab)
+ 				return ENOTSUP;
+ 
+-			obj->strtab = (const char *) obj->dynamic[p].d_un.d_ptr;
++			obj->strtab = (const char *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		} else if (obj->dynamic[p].d_tag == DT_HASH) {
+ 			if (obj->hash)
+ 				return ENOTSUP;
+ 
+-			obj->hash = (ElfW(Word) *) obj->dynamic[p].d_un.d_ptr;
++			obj->hash = (ElfW(Word) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		} else if (obj->dynamic[p].d_tag == DT_GNU_HASH) {
+ 			if (obj->gnu_hash)
+ 				return ENOTSUP;
+ 
+-			obj->gnu_hash = (Elf32_Word *) obj->dynamic[p].d_un.d_ptr;
++			obj->gnu_hash = (Elf32_Word *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		} else if (obj->dynamic[p].d_tag == DT_SYMTAB) {
+ 			if (obj->symtab)
+ 				return ENOTSUP;
+ 
+-			obj->symtab = (ElfW(Sym) *) obj->dynamic[p].d_un.d_ptr;
++			obj->symtab = (ElfW(Sym) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		}
+ 		p++;
+ 	}
+@@ -449,7 +455,7 @@ int eh_find_next_dyn(eh_obj_t *obj, ElfW_Sword tag, int i, ElfW(Dyn) **next)
+ 
+ int eh_set_rela_plt(eh_obj_t *obj, int p, const char *sym, void *val)
+ {
+-	ElfW(Rela) *rela = (ElfW(Rela) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rela) *rela = (ElfW(Rela) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relasize;
+ 	unsigned int i;
+ 
+@@ -470,7 +476,7 @@ int eh_set_rela_plt(eh_obj_t *obj, int p, const char *sym, void *val)
+ 
+ int eh_set_rel_plt(eh_obj_t *obj, int p, const char *sym, void *val)
+ {
+-	ElfW(Rel) *rel = (ElfW(Rel) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rel) *rel = (ElfW(Rel) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relsize;
+ 	unsigned int i;
+ 
+@@ -520,7 +526,7 @@ int eh_set_rel(eh_obj_t *obj, const char *sym, void *val)
+ 
+ int eh_iterate_rela_plt(eh_obj_t *obj, int p, eh_iterate_rel_callback_func callback, void *arg)
+ {
+-	ElfW(Rela) *rela = (ElfW(Rela) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rela) *rela = (ElfW(Rela) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relasize;
+ 	eh_rel_t rel;
+ 	eh_sym_t sym;
+@@ -550,7 +556,7 @@ int eh_iterate_rela_plt(eh_obj_t *obj, int p, eh_iterate_rel_callback_func callb
+ 
+ int eh_iterate_rel_plt(eh_obj_t *obj, int p, eh_iterate_rel_callback_func callback, void *arg)
+ {
+-	ElfW(Rel) *relp = (ElfW(Rel) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rel) *relp = (ElfW(Rel) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relsize;
+ 	eh_rel_t rel;
+ 	eh_sym_t sym;
+diff --git a/src/real_dlsym.cpp b/src/real_dlsym.cpp
+index 173dc1b..3e5a77c 100644
+--- a/src/real_dlsym.cpp
++++ b/src/real_dlsym.cpp
+@@ -26,6 +26,7 @@ static void get_real_functions()
+ #endif
+         "*libc.so*",
+         "*libc.*.so*",
++        "*ld-musl-*.so*",
+     };
+ 
+     for (size_t i = 0; i < sizeof(libs) / sizeof(*libs); i++)
+-- 
+2.42.0
+
diff --git a/srcpkgs/MangoHud/template b/srcpkgs/MangoHud/template
index 4e2a01ca1ce90..ff3ea44ed8961 100644
--- a/srcpkgs/MangoHud/template
+++ b/srcpkgs/MangoHud/template
@@ -1,19 +1,19 @@
 # Template file for 'MangoHud'
 pkgname=MangoHud
-version=0.6.8
+version=0.7.0
 revision=1
 build_style=meson
-configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled
+configure_args="-Dwith_xnvctrl=disabled
  -Dwith_nvml=disabled -Duse_system_spdlog=enabled"
 hostmakedepends="Vulkan-Headers python3-Mako glslang pkg-config"
-makedepends="libglvnd-devel dbus-devel vulkan-loader Vulkan-Headers
- spdlog"
+makedepends="libglvnd-devel dbus-devel vulkan-loader spdlog json-c++"
 short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
 homepage="https://github.com/flightlessmango/MangoHud"
 distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source-DFSG.tar.xz"
-checksum=0c4358428e6ae48d13282dec4bf4e78015b4f5e46d080a7e7588786cef63c09f
+checksum=222e15d4f3e679937f7594e2e5615aaae41b97d487eb7938b96b26eeb1fbcf35
+python_version=3
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] MangoHud: update to 0.7.0.
  2023-09-27 21:49 [PR PATCH] MangoHud: update to 0.7.0 Johnnynator
  2023-09-28 12:10 ` [PR PATCH] [Updated] " Johnnynator
  2023-09-28 15:54 ` Johnnynator
@ 2023-09-28 16:25 ` Johnnynator
  2023-09-28 16:33 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-09-28 16:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages mangohud-0.7.0
https://github.com/void-linux/void-packages/pull/46301

MangoHud: update to 0.7.0.
None

A patch file from https://github.com/void-linux/void-packages/pull/46301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mangohud-0.7.0-46301.patch --]
[-- Type: text/x-diff, Size: 11355 bytes --]

From e04d41217e9279b9f18ff6f29fcb54c3be3e92b5 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Wed, 27 Sep 2023 23:27:16 +0200
Subject: [PATCH] MangoHud: update to 0.7.0.

---
 srcpkgs/MangoHud/files/musl.patch             |  22 ----
 ...ptr-is-relative-on-non-glibc-systems.patch | 108 ++++++++++++++++++
 ...lback-to-project_version-without-git.patch |  41 +++++++
 ...ing-absolute-path-instead-of-Dynamic.patch |  49 ++++++++
 srcpkgs/MangoHud/template                     |  18 ++-
 5 files changed, 206 insertions(+), 32 deletions(-)
 delete mode 100644 srcpkgs/MangoHud/files/musl.patch
 create mode 100644 srcpkgs/MangoHud/patches/0001-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch
 create mode 100644 srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch
 create mode 100644 srcpkgs/MangoHud/patches/0002-meson-allow-setting-absolute-path-instead-of-Dynamic.patch

diff --git a/srcpkgs/MangoHud/files/musl.patch b/srcpkgs/MangoHud/files/musl.patch
deleted file mode 100644
index c11ac1b414c2d..0000000000000
--- a/srcpkgs/MangoHud/files/musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- 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/patches/0001-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch b/srcpkgs/MangoHud/patches/0001-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch
new file mode 100644
index 0000000000000..6abe3dfc73f7a
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/0001-elfhacks-d_un.d_ptr-is-relative-on-non-glibc-systems.patch
@@ -0,0 +1,108 @@
+From fc925300601098dc45241087626369843d6a2c66 Mon Sep 17 00:00:00 2001
+From: John Zimmermann <me@johnnynator.dev>
+Date: Thu, 28 Sep 2023 16:42:21 +0200
+Subject: [PATCH 1/2] elfhacks: d_un.d_ptr is relative on non glibc systems
+
+elf(5) documents it this way, GLIBC diverts from this documentation
+
+partial fix for #601
+---
+ src/elfhacks.cpp   | 22 ++++++++++++++--------
+ src/real_dlsym.cpp |  1 +
+ 2 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/elfhacks.cpp b/src/elfhacks.cpp
+index 7cfc310..810a19d 100644
+--- a/src/elfhacks.cpp
++++ b/src/elfhacks.cpp
+@@ -29,6 +29,12 @@
+  *  \{
+  */
+ 
++#ifdef __GLIBC__
++# define ABS_ADDR(obj, ptr) (ptr)
++#else
++# define ABS_ADDR(obj, ptr) ((obj->addr) + (ptr))
++#endif
++
+ struct eh_iterate_callback_args {
+ 	eh_iterate_obj_callback_func callback;
+ 	void *arg;
+@@ -196,22 +202,22 @@ int eh_init_obj(eh_obj_t *obj)
+ 			if (obj->strtab)
+ 				return ENOTSUP;
+ 
+-			obj->strtab = (const char *) obj->dynamic[p].d_un.d_ptr;
++			obj->strtab = (const char *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		} else if (obj->dynamic[p].d_tag == DT_HASH) {
+ 			if (obj->hash)
+ 				return ENOTSUP;
+ 
+-			obj->hash = (ElfW(Word) *) obj->dynamic[p].d_un.d_ptr;
++			obj->hash = (ElfW(Word) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		} else if (obj->dynamic[p].d_tag == DT_GNU_HASH) {
+ 			if (obj->gnu_hash)
+ 				return ENOTSUP;
+ 
+-			obj->gnu_hash = (Elf32_Word *) obj->dynamic[p].d_un.d_ptr;
++			obj->gnu_hash = (Elf32_Word *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		} else if (obj->dynamic[p].d_tag == DT_SYMTAB) {
+ 			if (obj->symtab)
+ 				return ENOTSUP;
+ 
+-			obj->symtab = (ElfW(Sym) *) obj->dynamic[p].d_un.d_ptr;
++			obj->symtab = (ElfW(Sym) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 		}
+ 		p++;
+ 	}
+@@ -449,7 +455,7 @@ int eh_find_next_dyn(eh_obj_t *obj, ElfW_Sword tag, int i, ElfW(Dyn) **next)
+ 
+ int eh_set_rela_plt(eh_obj_t *obj, int p, const char *sym, void *val)
+ {
+-	ElfW(Rela) *rela = (ElfW(Rela) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rela) *rela = (ElfW(Rela) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relasize;
+ 	unsigned int i;
+ 
+@@ -470,7 +476,7 @@ int eh_set_rela_plt(eh_obj_t *obj, int p, const char *sym, void *val)
+ 
+ int eh_set_rel_plt(eh_obj_t *obj, int p, const char *sym, void *val)
+ {
+-	ElfW(Rel) *rel = (ElfW(Rel) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rel) *rel = (ElfW(Rel) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relsize;
+ 	unsigned int i;
+ 
+@@ -520,7 +526,7 @@ int eh_set_rel(eh_obj_t *obj, const char *sym, void *val)
+ 
+ int eh_iterate_rela_plt(eh_obj_t *obj, int p, eh_iterate_rel_callback_func callback, void *arg)
+ {
+-	ElfW(Rela) *rela = (ElfW(Rela) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rela) *rela = (ElfW(Rela) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relasize;
+ 	eh_rel_t rel;
+ 	eh_sym_t sym;
+@@ -550,7 +556,7 @@ int eh_iterate_rela_plt(eh_obj_t *obj, int p, eh_iterate_rel_callback_func callb
+ 
+ int eh_iterate_rel_plt(eh_obj_t *obj, int p, eh_iterate_rel_callback_func callback, void *arg)
+ {
+-	ElfW(Rel) *relp = (ElfW(Rel) *) obj->dynamic[p].d_un.d_ptr;
++	ElfW(Rel) *relp = (ElfW(Rel) *) ABS_ADDR(obj, obj->dynamic[p].d_un.d_ptr);
+ 	ElfW(Dyn) *relsize;
+ 	eh_rel_t rel;
+ 	eh_sym_t sym;
+diff --git a/src/real_dlsym.cpp b/src/real_dlsym.cpp
+index 173dc1b..3e5a77c 100644
+--- a/src/real_dlsym.cpp
++++ b/src/real_dlsym.cpp
+@@ -26,6 +26,7 @@ static void get_real_functions()
+ #endif
+         "*libc.so*",
+         "*libc.*.so*",
++        "*ld-musl-*.so*",
+     };
+ 
+     for (size_t i = 0; i < sizeof(libs) / sizeof(*libs); i++)
+-- 
+2.42.0
+
diff --git a/srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch b/srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch
new file mode 100644
index 0000000000000..d999df1bb0098
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/0001-meson-fallback-to-project_version-without-git.patch
@@ -0,0 +1,41 @@
+From c6e7c2da873cf2ada7cac9cc8953c3afda7f4cd1 Mon Sep 17 00:00:00 2001
+From: John Zimmermann <me@johnnynator.dev>
+Date: Thu, 28 Sep 2023 13:56:04 +0200
+Subject: [PATCH 1/2] meson: fallback to project_version() without git
+
+resolves #1131
+---
+ src/meson.build | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index 537ce63..0729596 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -9,12 +9,22 @@ else
+   ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
+ endif
+ 
++git = find_program('git', required: false)
++if git.found()
++  git_describe = run_command([git, 'describe', '--tags', '--dirty=+'], check: false)
++endif
++if git.found() and git_describe.returncode() == 0
++  describe_ver = git_describe.stdout().strip()
++else
++  describe_ver = meson.project_version()
++endif
++
+ conf_data = configuration_data()
+ 
+ conf_data.set('ld_libdir_mangohud_abs', libdir_mangohud)
+ conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
+ conf_data.set('cpu_family', host_machine.cpu_family())
+-conf_data.set('version', run_command(['git', 'describe', '--tags', '--dirty=+']).stdout().strip())
++conf_data.set('version', describe_ver)
+ 
+ overlay_shaders = [
+   'overlay.frag',
+-- 
+2.42.0
+
diff --git a/srcpkgs/MangoHud/patches/0002-meson-allow-setting-absolute-path-instead-of-Dynamic.patch b/srcpkgs/MangoHud/patches/0002-meson-allow-setting-absolute-path-instead-of-Dynamic.patch
new file mode 100644
index 0000000000000..19664a1829f58
--- /dev/null
+++ b/srcpkgs/MangoHud/patches/0002-meson-allow-setting-absolute-path-instead-of-Dynamic.patch
@@ -0,0 +1,49 @@
+From 252f18e54d8a56ce4420c549fb48963cad3b91c0 Mon Sep 17 00:00:00 2001
+From: John Zimmermann <me@johnnynator.dev>
+Date: Thu, 28 Sep 2023 18:17:37 +0200
+Subject: [PATCH 2/2] meson: allow setting absolute path instead of 'Dynamic
+ string tokens'
+
+resolves #601
+---
+ meson_options.txt |  1 +
+ src/meson.build   | 10 ++++++++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 5f7d11b..0173a54 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -12,3 +12,4 @@ option('mangoapp', type: 'boolean', value : false)
+ option('mangohudctl', type: 'boolean', value : false)
+ option('mangoapp_layer', type: 'boolean', value : false)
+ option('tests', type: 'feature', value: 'auto', description: 'Run tests')
++option('dynamic_string_tokens', type: 'boolean', value: true, description: 'Use dynamic string tokens in LD_PRELOAD')
+diff --git a/src/meson.build b/src/meson.build
+index 537ce63..034dce2 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -1,12 +1,18 @@
+ glslang = find_program('glslang', 'glslangValidator')
+ 
++if get_option('dynamic_string_tokens')
++  ld_prefix = get_option('prefix') + '/\$LIB/'
++else
++  ld_prefix = join_paths(get_option('prefix') ,get_option('libdir')) + '/'
++endif
++
+ # 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 = ld_prefix + 'mangohud/'
+ else
+   libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
+-  ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
++  ld_libdir_mangohud = ld_prefix
+ endif
+ 
+ conf_data = configuration_data()
+-- 
+2.42.0
+
diff --git a/srcpkgs/MangoHud/template b/srcpkgs/MangoHud/template
index 4e2a01ca1ce90..ac024dba897b7 100644
--- a/srcpkgs/MangoHud/template
+++ b/srcpkgs/MangoHud/template
@@ -1,25 +1,23 @@
 # Template file for 'MangoHud'
 pkgname=MangoHud
-version=0.6.8
+version=0.7.0
 revision=1
 build_style=meson
-configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled
+configure_args="-Dwith_xnvctrl=disabled
  -Dwith_nvml=disabled -Duse_system_spdlog=enabled"
 hostmakedepends="Vulkan-Headers python3-Mako glslang pkg-config"
-makedepends="libglvnd-devel dbus-devel vulkan-loader Vulkan-Headers
- spdlog"
+makedepends="libglvnd-devel dbus-devel vulkan-loader spdlog json-c++"
 short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
 homepage="https://github.com/flightlessmango/MangoHud"
 distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source-DFSG.tar.xz"
-checksum=0c4358428e6ae48d13282dec4bf4e78015b4f5e46d080a7e7588786cef63c09f
+checksum=222e15d4f3e679937f7594e2e5615aaae41b97d487eb7938b96b26eeb1fbcf35
+python_version=3
 
-post_patch() {
-	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-		patch -Np0 -i ${FILESDIR}/musl.patch
-	fi
-}
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	configure_args+=" -Ddynamic_string_tokens=false"
+fi
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Merged]: MangoHud: update to 0.7.0.
  2023-09-27 21:49 [PR PATCH] MangoHud: update to 0.7.0 Johnnynator
                   ` (2 preceding siblings ...)
  2023-09-28 16:25 ` Johnnynator
@ 2023-09-28 16:33 ` Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-09-28 16:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

There's a merged pull request on the void-packages repository

MangoHud: update to 0.7.0.
https://github.com/void-linux/void-packages/pull/46301

Description:
None

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-28 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 21:49 [PR PATCH] MangoHud: update to 0.7.0 Johnnynator
2023-09-28 12:10 ` [PR PATCH] [Updated] " Johnnynator
2023-09-28 15:54 ` Johnnynator
2023-09-28 16:25 ` Johnnynator
2023-09-28 16:33 ` [PR PATCH] [Merged]: " Johnnynator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).