Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package libXnvctrl-devel and a change in MangoHud to depend on it, so that Nvidia cards will be detected on MangoHud
@ 2023-05-22  8:46 RoundDuckKira
  2023-05-22  9:10 ` [PR PATCH] [Updated] " RoundDuckKira
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: RoundDuckKira @ 2023-05-22  8:46 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RoundDuckKira/void-packages-dev master
https://github.com/void-linux/void-packages/pull/44028

New package libXnvctrl-devel and a change in MangoHud to depend on it, so that Nvidia cards will be detected on MangoHud
<!-- 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)
- I built this PR locally for these architectures (if supported. mark crossbuilds): n/a


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

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

From fcc36ac4ccdbe9d4331853f17bd16ee60a9c7e76 Mon Sep 17 00:00:00 2001
From: Kira Taylor Patton <roundduckkira@protonmail.com>
Date: Mon, 22 May 2023 04:30:24 -0400
Subject: [PATCH] Fixing a bug with MangoHUD where Nvidia GPUs can't be read by
 the program by making it depend on a new package named libXnvctrl-devel

---
 srcpkgs/MangoHud/template                     |  8 ++--
 .../nvidia-settings-libxnvctrl_so.patch       | 38 +++++++++++++++++++
 srcpkgs/libXnvctrl-devel/template             | 29 ++++++++++++++
 3 files changed, 71 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libXnvctrl-devel/patches/nvidia-settings-libxnvctrl_so.patch
 create mode 100644 srcpkgs/libXnvctrl-devel/template

diff --git a/srcpkgs/MangoHud/template b/srcpkgs/MangoHud/template
index 4e2a01ca1ce9..aaa3f29e9883 100644
--- a/srcpkgs/MangoHud/template
+++ b/srcpkgs/MangoHud/template
@@ -1,13 +1,13 @@
 # Template file for 'MangoHud'
 pkgname=MangoHud
 version=0.6.8
-revision=1
+revision=2
 build_style=meson
-configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled
+configure_args="-Duse_system_vulkan=enabled -Dwith_xnvctrl=enabled
  -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 Vulkan-Headers libXnvctrl-devel spdlog"
+depends="libXnvctrl-devel"
 short_desc="Vulkan and OpenGL overlay for monitoring FPS, temperatures and more"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
diff --git a/srcpkgs/libXnvctrl-devel/patches/nvidia-settings-libxnvctrl_so.patch b/srcpkgs/libXnvctrl-devel/patches/nvidia-settings-libxnvctrl_so.patch
new file mode 100644
index 000000000000..70043f0c2125
--- /dev/null
+++ b/srcpkgs/libXnvctrl-devel/patches/nvidia-settings-libxnvctrl_so.patch
@@ -0,0 +1,38 @@
+diff --git a/src/Makefile b/src/Makefile
+index 68eb140..6d0aab8 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -345,7 +345,7 @@ endif
+ 
+ ifdef BUILD_GTK3LIB
+ $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB)))
+-$(GTK3LIB).unstripped: $(LIBXNVCTRL) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK)
++$(GTK3LIB).unstripped: $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK)
+ 	$(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS)  $(BIN_LDFLAGS) \
+ 	    $(LIBXNVCTRL) $(LIBS) $(GTK3_LIBS) \
+ 	    -Wl,--unresolved-symbols=ignore-all -o $@ \
+diff --git a/src/libXNVCtrl/xnvctrl.mk b/src/libXNVCtrl/xnvctrl.mk
+index e6be2ef..c0921c4 100644
+--- a/src/libXNVCtrl/xnvctrl.mk
++++ b/src/libXNVCtrl/xnvctrl.mk
+@@ -39,6 +39,11 @@ XNVCTRL_CFLAGS ?=
+ 
+ LIBXNVCTRL = $(OUTPUTDIR)/libXNVCtrl.a
+ 
++LIBXNVCTRL_SHARED = $(OUTPUTDIR)/libXNVCtrl.so
++LIBXNVCTRL_ABI_VERSION_MAJOR = 0
++LIBXNVCTRL_ABI_VERSION_MINOR = 0
++LIBXNVCTRL_LIBS += -lXext -lX11
++
+ LIBXNVCTRL_SRC = $(XNVCTRL_DIR)/NVCtrl.c
+ 
+ LIBXNVCTRL_OBJ = $(call BUILD_OBJECT_LIST,$(LIBXNVCTRL_SRC))
+@@ -47,3 +52,8 @@ $(eval $(call DEFINE_OBJECT_RULE,TARGET,$(LIBXNVCTRL_SRC)))
+ 
+ $(LIBXNVCTRL) : $(LIBXNVCTRL_OBJ)
+ 	$(call quiet_cmd,AR) ru $@ $(LIBXNVCTRL_OBJ)
++
++$(LIBXNVCTRL_SHARED) : $(LIBXNVCTRL_OBJ)
++	$(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname=$(notdir $@).${LIBXNVCTRL_ABI_VERSION_MAJOR} -o $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $^ $(LIBXNVCTRL_LIBS)
++	ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@
++	ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR)
diff --git a/srcpkgs/libXnvctrl-devel/template b/srcpkgs/libXnvctrl-devel/template
new file mode 100644
index 000000000000..7c9606a7e219
--- /dev/null
+++ b/srcpkgs/libXnvctrl-devel/template
@@ -0,0 +1,29 @@
+# Template file for 'libXnvctrl-devel'
+pkgname=libXnvctrl-devel
+version=525.116.04
+revision=1
+#archs="i686 x86_64"
+#build_wrksrc=
+build_style=gnu-makefile
+make_use_env=yes
+#configure_args=""
+#make_build_args=""
+#make_install_args=""
+#conf_files=""
+#make_dirs="/var/log/dir 0755 root root"
+hostmakedepends="inetutils base-devel"
+makedepends="jansson-devel gtk+3-devel libXv-devel libvdpau-devel libXext-devel libXxf86vm-devel"
+# depends=""
+short_desc="Nvidia hardware monitoring library"
+maintainer="Kira Taylor Patton <roundduckkira@protonmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/NVIDIA/nvidia-settings"
+#changelog=""
+distfiles="https://github.com/NVIDIA/nvidia-settings/archive/refs/tags/${version}.tar.gz"
+checksum=32db97759c2a58fea86a63a69a423f1bf65198496cb2ac2279f4210b50097358
+
+do_install() {
+	vmkdir /usr/include/NVCtrl 755
+	vcopy src/libXNVCtrl/*.h /usr/include/NVCtrl/
+	vcopy src/_out/Linux_x86_64/libXNVCtrl.* /usr/lib/
+}

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

end of thread, other threads:[~2023-05-23 16:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22  8:46 [PR PATCH] New package libXnvctrl-devel and a change in MangoHud to depend on it, so that Nvidia cards will be detected on MangoHud RoundDuckKira
2023-05-22  9:10 ` [PR PATCH] [Updated] " RoundDuckKira
2023-05-22  9:27 ` hervyqa
2023-05-22 10:19 ` RoundDuckKira
2023-05-22 10:20 ` RoundDuckKira
2023-05-22 11:44 ` abenson
2023-05-22 23:54 ` RoundDuckKira
2023-05-23 16:40 ` RoundDuckKira
2023-05-23 16:40 ` [PR PATCH] [Closed]: " RoundDuckKira

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).