public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Roman" <davidroman96@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: games-util/mangohud/
Date: Mon, 10 Mar 2025 11:04:36 +0000 (UTC)	[thread overview]
Message-ID: <1741534577.433320ceb9ab51aec8067d3afd6e4bd7ed93ea08.davidroman@gentoo> (raw)

commit:     433320ceb9ab51aec8067d3afd6e4bd7ed93ea08
Author:     Kostadin Shishmanov <kostadinshishmanov <AT> protonmail <DOT> com>
AuthorDate: Sun Mar  9 15:24:10 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sun Mar  9 15:36:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=433320ce

games-util/mangohud: add 0.8.1

Closes: https://bugs.gentoo.org/949874
Signed-off-by: Kostadin Shishmanov <kostadinshishmanov <AT> protonmail.com>

 games-util/mangohud/Manifest              |   1 +
 games-util/mangohud/mangohud-0.8.1.ebuild | 151 ++++++++++++++++++++++++++++++
 2 files changed, 152 insertions(+)

diff --git a/games-util/mangohud/Manifest b/games-util/mangohud/Manifest
index 4dee78a5f..5212a63f7 100644
--- a/games-util/mangohud/Manifest
+++ b/games-util/mangohud/Manifest
@@ -1,4 +1,5 @@
 DIST mangohud-0.7.2.tar.gz 14906751 BLAKE2B a88e6497d8a8bcd899fc41d555dec429a69c864a10476c1d549acead58a7fc7c5f5d14d901b75bd2aed1d8c8088a027417a74480b89501d947333d665d0567c0 SHA512 edc3e380f9f58b65ae04c970e84eec9ff3458eafb2d89b2208c0afa6978a745a634aab6b0e025996175981e80c66475ef92ffe326d31a67055895b8fd1213e63
 DIST mangohud-0.8.0.tar.gz 14911988 BLAKE2B 94da2c850f616adb02478a641b6554298a4e9ce4eff7ef75c962adb180fd43ebb789c684204d11eb9194fc14c5db7fbe94045b3843b25ac7c3f1d655d4f7725f SHA512 ece0c8310789e1876b97926ddeb4305b5180460766a343c9f875c0d6342194c14e6c94ef28748b452ecdc590e174ef042283ba5ba40047070ea684c3b855cb7c
+DIST mangohud-0.8.1.tar.gz 14918082 BLAKE2B 11ca387718b13f853573e37212bbd838c915bac949704860e7abf5f324c2668a70377e0b9d8e27b490ff984a7016da4e7ac7306335d4f83d0e807b9cdd21b19d SHA512 c99326bdb48dec9068e41536b468ff9dec5996d3b051a8277fe68fd91309219c8197f699b84cac4561321a946416ef2eea35a42b35e9da0bb01c977710635d93
 DIST vulkan-headers-1.2.158-2-meson-wrap.zip 1107 BLAKE2B 35e4bb1f7410a009243fe7d4a4ba6cede7f01e0b56ad6ff72ad30c00c2452bd6d2a4fb44ab92c296147e2506a92acc6de1f817cb5433b96d66652cbcd8885595 SHA512 30cbbb90580399839e1bba8881b9b8cc33fdeead93f37d5f3398c9d53fb3ab050ca2562fd68f376fa4ee0825ee3787f560d70d55a170c780dd575ff2eeb66efd
 DIST vulkan-headers-1.2.158.tar.gz 831647 BLAKE2B 792d7e895e27c4a8fbc93fc4d9c9e696d2ceb946e745709c050c0693b77afbeb6411a4267fc59508ddeb58167d469349fedc1c5d4b4a7415b590c97248b244bc SHA512 f7aa9222f9deb1316d22deacc2c6cd85c409f0f2b2d37ecd55e0fc8466d381bbe3bed287881b993a01c5f33736e1607014f820980b7a54a3721fab6980960c91

diff --git a/games-util/mangohud/mangohud-0.8.1.ebuild b/games-util/mangohud/mangohud-0.8.1.ebuild
new file mode 100644
index 000000000..c191316b8
--- /dev/null
+++ b/games-util/mangohud/mangohud-0.8.1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit flag-o-matic python-single-r1 meson-multilib
+
+MY_PV=$(ver_cut 1-3)
+[[ -n "$(ver_cut 4)" ]] && MY_PV_REV="-$(ver_cut 4)"
+
+DESCRIPTION="Vulkan and OpenGL overlay for monitoring FPS, sensors, system load and more"
+HOMEPAGE="https://github.com/flightlessmango/MangoHud"
+
+VK_HEADERS_VER="1.2.158"
+VK_HEADERS_MESON_WRAP_VER="2"
+
+SRC_URI="
+	https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VK_HEADERS_VER}.tar.gz
+		-> vulkan-headers-${VK_HEADERS_VER}.tar.gz
+	https://wrapdb.mesonbuild.com/v2/vulkan-headers_${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}/get_patch
+		-> vulkan-headers-${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}-meson-wrap.zip
+"
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/flightlessmango/MangoHud.git"
+else
+	SRC_URI+="
+		https://github.com/flightlessmango/MangoHud/archive/v${MY_PV}${MY_PV_REV}.tar.gz
+			-> ${P}.tar.gz
+	"
+	KEYWORDS="~amd64"
+	S="${WORKDIR}/MangoHud-${PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="+dbus debug +X xnvctrl wayland mangoapp mangohudctl mangoplot video_cards_nvidia video_cards_amdgpu test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	|| ( X wayland )
+	xnvctrl? ( video_cards_nvidia )
+	mangoapp? ( X )
+"
+
+BDEPEND="
+	app-arch/unzip
+	dev-util/glslang
+	test? ( dev-util/cmocka )
+	$(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]')
+"
+
+DEPEND="
+	${PYTHON_DEPS}
+	=media-libs/imgui-1.89.9*:=[opengl,vulkan,${MULTILIB_USEDEP}]
+	=media-libs/implot-0.16*:=[${MULTILIB_USEDEP}]
+	dev-libs/spdlog:=[${MULTILIB_USEDEP}]
+	dev-libs/libfmt:=[${MULTILIB_USEDEP}]
+	dev-cpp/nlohmann_json
+	x11-libs/libxkbcommon:=[${MULTILIB_USEDEP}]
+	dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+	video_cards_nvidia? (
+		x11-drivers/nvidia-drivers[${MULTILIB_USEDEP}]
+		xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
+	)
+	wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+	mangoapp? (
+		=media-libs/imgui-1.89.9*[glfw]
+		media-libs/glfw[X(+)?,wayland(+)?]
+		media-libs/glew
+	)
+"
+
+RDEPEND="
+	${DEPEND}
+	media-libs/libglvnd[${MULTILIB_USEDEP}]
+	media-libs/vulkan-loader[${MULTILIB_USEDEP}]
+	mangoplot? (
+		media-fonts/lato
+		$(python_gen_cond_dep '
+			|| (
+				dev-python/matplotlib[gtk3,${PYTHON_USEDEP}]
+				dev-python/matplotlib[qt5(-),${PYTHON_USEDEP}]
+				dev-python/matplotlib[qt6(-),${PYTHON_USEDEP}]
+				dev-python/matplotlib[wxwidgets,${PYTHON_USEDEP}]
+			)
+		')
+	)
+"
+
+src_unpack() {
+	default
+
+	[[ -n "${MY_PV_REV}" ]] && ( mv "${WORKDIR}/MangoHud-${MY_PV}${MY_PV_REV}" "${WORKDIR}/MangoHud-${PV}" || die )
+
+	if [[ $PV == 9999 ]]; then
+		git-r3_src_unpack
+	fi
+
+	unpack vulkan-headers-${VK_HEADERS_VER}.tar.gz
+	unpack vulkan-headers-${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}-meson-wrap.zip
+	mv "${WORKDIR}/Vulkan-Headers-${VK_HEADERS_VER}" "${S}/subprojects/" || die
+}
+
+src_prepare() {
+	default
+	# replace all occurences of "#include <imgui.h>" to "#include <imgui/imgui.h>"
+	find . -type f -exec sed -i 's|<imgui.h>|<imgui/imgui.h>|g' {} \; || die
+	find . -type f -exec sed -i 's|"imgui.h"|<imgui/imgui.h>|g' {} \; || die
+	find . -type f -exec sed -i 's|<imgui_internal.h>|<imgui/imgui_internal.h>|g' {} \; || die
+	find . -type f -exec sed -i 's|"imgui_internal.h"|<imgui/imgui_internal.h>|g' {} \; || die
+	find . -type f -exec sed -i 's|"imgui_impl_glfw.h"|<imgui/imgui_impl_glfw.h>|g' {} \; || die
+	find . -type f -exec sed -i 's|"imgui_impl_opengl3.h"|<imgui/imgui_impl_opengl3.h>|g' {} \; || die
+}
+
+multilib_src_configure() {
+	# workaround for lld
+	# https://github.com/flightlessmango/MangoHud/issues/1240
+	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+	local emesonargs=(
+		-Dappend_libdir_mangohud=false
+		-Dinclude_doc=false
+		-Duse_system_spdlog=enabled
+		$(meson_feature video_cards_nvidia with_nvml)
+		$(meson_feature xnvctrl with_xnvctrl)
+		$(meson_feature X with_x11)
+		$(meson_feature wayland with_wayland)
+		$(meson_feature dbus with_dbus)
+		$(meson_use mangoapp mangoapp)
+		$(meson_use mangohudctl mangohudctl)
+		$(meson_feature mangoplot mangoplot)
+	)
+	meson_src_configure
+}
+
+pkg_postinst() {
+	if ! use xnvctrl; then
+		einfo ""
+		einfo "If mangohud can't get GPU load, or other GPU information,"
+		einfo "and you have an older Nvidia device."
+		einfo ""
+		einfo "Try enabling the 'xnvctrl' useflag."
+		einfo ""
+	fi
+}


             reply	other threads:[~2025-03-10 11:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 11:04 David Roman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-10 11:04 [gentoo-commits] repo/proj/guru:master commit in: games-util/mangohud/ David Roman
2025-02-17  9:49 David Roman
2025-02-17  9:49 David Roman
2024-12-28 20:08 Florian Schmaus
2024-12-28 20:08 Florian Schmaus
2024-12-27 15:34 Julien Roy
2024-12-26 15:36 Julien Roy
2024-12-12 13:06 David Roman
2024-12-10 11:32 David Roman
2024-09-18 23:46 Haelwenn Monnier
2024-05-23 10:36 David Roman
2024-05-12  9:38 Viorel Munteanu
2024-05-12  9:38 Viorel Munteanu
2024-05-10  0:33 Haelwenn Monnier
2024-04-13 17:15 Julien Roy
2024-04-13 16:14 Julien Roy
2024-02-08  9:29 David Roman
2024-02-08  9:29 David Roman
2024-02-07 10:10 David Roman
2024-02-07 10:10 David Roman
2023-08-23 17:33 David Roman
2023-08-21 12:43 Haelwenn Monnier
2023-08-21 12:43 Haelwenn Monnier
2022-09-26 10:05 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2022-09-26 10:05 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2022-09-08  1:46 Ronny Gutbrod
2022-09-06  1:06 Ronny Gutbrod
2022-07-23 17:36 Haelwenn Monnier
2022-05-12  9:14 Andrew Ammerlaan
2022-05-12  9:14 Andrew Ammerlaan
2022-05-10  7:49 Florian Schmaus
2022-05-09 18:44 Andrew Ammerlaan
2022-05-05  4:07 Haelwenn Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1741534577.433320ceb9ab51aec8067d3afd6e4bd7ed93ea08.davidroman@gentoo \
    --to=davidroman96@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox