public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-process/nvtop/, sys-process/nvtop/files/
@ 2024-12-14 11:49 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-12-14 11:49 UTC (permalink / raw
  To: gentoo-commits

commit:     7b49a2dab317e861f5fd619f561215ac0f96a658
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Fri Dec 13 04:58:58 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 11:48:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b49a2da

sys-process/nvtop: new package (from ::guru)

- Add patch to fix missing drm.h when VIDEO_CARDS lacks amdgpu
- Applied Z. Liu <zhixu.liu <AT> gmail.com> 's work
- Add Z. Liu <zhixu.liu <AT> gmail.com> as maintainer

Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39702
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/nvtop/Manifest                         |  1 +
 .../nvtop/files/nvtop-3.1.0-fix-drm-missing.patch  | 23 ++++++++++
 sys-process/nvtop/metadata.xml                     | 34 ++++++++++++++
 sys-process/nvtop/nvtop-3.1.0.ebuild               | 52 ++++++++++++++++++++++
 sys-process/nvtop/nvtop-9999.ebuild                | 48 ++++++++++++++++++++
 5 files changed, 158 insertions(+)

diff --git a/sys-process/nvtop/Manifest b/sys-process/nvtop/Manifest
new file mode 100644
index 000000000000..09ab64b89019
--- /dev/null
+++ b/sys-process/nvtop/Manifest
@@ -0,0 +1 @@
+DIST nvtop-3.1.0.tar.gz 269897 BLAKE2B 8d8e8b8014ea4d9dba241d620eaf9b4c37e99b593a8dddc31cc40d084eb1d5aaf3dff712d86567f46fb3b360b77392ac1836c9487e6b9f9a2514b27f2ebd1e94 SHA512 a22806920d85954930cf9a24450de2603418326b59bc7acedf8ff59ddb0f40e119de496a63f42706b4b6961c83ba664a8a33a3e4106a1c3ef6cd3da758aa5a55

diff --git a/sys-process/nvtop/files/nvtop-3.1.0-fix-drm-missing.patch b/sys-process/nvtop/files/nvtop-3.1.0-fix-drm-missing.patch
new file mode 100644
index 000000000000..ea08bef38df5
--- /dev/null
+++ b/sys-process/nvtop/files/nvtop-3.1.0-fix-drm-missing.patch
@@ -0,0 +1,23 @@
+Merged by upstream: https://github.com/Syllo/nvtop/pull/338
+From 28328c5a6931786e57c9a205b2415114fa68a1ce Mon Sep 17 00:00:00 2001
+From: Takuya Wakazono <pastalian46@gmail.com>
+Date: Sat, 30 Nov 2024 21:54:23 +0900
+Subject: [PATCH] Include libdrm for builds with panfrost and panthor support
+
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 169e112..25e4865 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -74,7 +74,7 @@ if(AMDGPU_SUPPORT OR INTEL_SUPPORT)
+   target_sources(nvtop PRIVATE device_discovery_linux.c)
+ endif()
+ 
+-if(AMDGPU_SUPPORT OR MSM_SUPPORT)
++if(AMDGPU_SUPPORT OR MSM_SUPPORT OR PANFROST_SUPPORT OR PANTHOR_SUPPORT)
+   # Search for libdrm for AMDGPU support
+   find_package(Libdrm)
+ 

diff --git a/sys-process/nvtop/metadata.xml b/sys-process/nvtop/metadata.xml
new file mode 100644
index 000000000000..c47dc39b5ba8
--- /dev/null
+++ b/sys-process/nvtop/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person" proxied="yes">
+		<email>vowstar@gmail.com</email>
+		<name>Huang Rui</name>
+	</maintainer>
+	<maintainer type="person" proxied="yes">
+		<email>zhixu.liu@gmail.com</email>
+		<name>Z. Liu</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<upstream>
+		<bugs-to>https://github.com/Syllo/nvtop/issues</bugs-to>
+		<changelog>https://github.com/Syllo/nvtop/releases</changelog>
+		<remote-id type="github">Syllo/nvtop</remote-id>
+	</upstream>
+	<longdescription lang="en">
+	NVTOP stands for Neat Videocard TOP, a (h)top like task monitor
+	for GPUs and accelerators. It can handle multiple GPUs and print
+	information about them in a htop-familiar way.
+
+	Currently supported vendors are AMD (Linux amdgpu driver), Apple
+	(limited M1 &amp; M2 support), Huawei (Ascend), Intel (Linux i915/Xe
+	drivers), NVIDIA (Linux proprietary divers), Qualcomm Adreno (Linux
+	MSM driver), Broadcom VideoCore (Linux v3d driver).
+	</longdescription>
+	<use>
+		<flag name="unicode">Enable support for ncurses Unicode choice</flag>
+	</use>
+</pkgmetadata>

diff --git a/sys-process/nvtop/nvtop-3.1.0.ebuild b/sys-process/nvtop/nvtop-3.1.0.ebuild
new file mode 100644
index 000000000000..81a0b78f6af0
--- /dev/null
+++ b/sys-process/nvtop/nvtop-3.1.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+DESCRIPTION="(h)top like task monitor for AMD, NVIDIA, Intel and other GPUs"
+HOMEPAGE="https://github.com/Syllo/nvtop"
+
+if [[ "${PV}" == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/Syllo/${PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/Syllo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+IUSE="unicode video_cards_intel video_cards_amdgpu video_cards_nvidia video_cards_freedreno"
+
+RDEPEND="
+	video_cards_intel?  ( virtual/udev )
+	video_cards_amdgpu? ( x11-libs/libdrm[video_cards_amdgpu] )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers )
+	video_cards_freedreno? ( x11-libs/libdrm[video_cards_freedreno] )
+	sys-libs/ncurses[unicode(+)?]
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.1.0-fix-drm-missing.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DCURSES_NEED_WIDE=$(usex unicode)
+		-DINTEL_SUPPORT=$(usex video_cards_intel)
+		-DNVIDIA_SUPPORT=$(usex video_cards_nvidia)
+		-DAMDGPU_SUPPORT=$(usex video_cards_amdgpu)
+		-DMSM_SUPPORT=$(usex video_cards_freedreno)
+	)
+
+	cmake_src_configure
+}

diff --git a/sys-process/nvtop/nvtop-9999.ebuild b/sys-process/nvtop/nvtop-9999.ebuild
new file mode 100644
index 000000000000..0a63ae9e454e
--- /dev/null
+++ b/sys-process/nvtop/nvtop-9999.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+DESCRIPTION="(h)top like task monitor for AMD, NVIDIA, Intel and other GPUs"
+HOMEPAGE="https://github.com/Syllo/nvtop"
+
+if [[ "${PV}" == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/Syllo/${PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/Syllo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+IUSE="unicode video_cards_intel video_cards_amdgpu video_cards_nvidia video_cards_freedreno"
+
+RDEPEND="
+	video_cards_intel?  ( virtual/udev )
+	video_cards_amdgpu? ( x11-libs/libdrm[video_cards_amdgpu] )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers )
+	video_cards_freedreno? ( x11-libs/libdrm[video_cards_freedreno] )
+	sys-libs/ncurses[unicode(+)?]
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+	virtual/pkgconfig
+"
+
+src_configure() {
+	local mycmakeargs=(
+		-DCURSES_NEED_WIDE=$(usex unicode)
+		-DINTEL_SUPPORT=$(usex video_cards_intel)
+		-DNVIDIA_SUPPORT=$(usex video_cards_nvidia)
+		-DAMDGPU_SUPPORT=$(usex video_cards_amdgpu)
+		-DMSM_SUPPORT=$(usex video_cards_freedreno)
+	)
+
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-14 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14 11:49 [gentoo-commits] repo/gentoo:master commit in: sys-process/nvtop/, sys-process/nvtop/files/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox