From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 010821582EF for ; Sun, 09 Mar 2025 16:52:08 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id DFB123430BE for ; Sun, 09 Mar 2025 16:52:08 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id D089D110370; Sun, 09 Mar 2025 16:52:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id C2BAD110370 for ; Sun, 09 Mar 2025 16:52:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6BAAA343026 for ; Sun, 09 Mar 2025 16:52:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C7160122C for ; Sun, 09 Mar 2025 16:52:05 +0000 (UTC) From: "Kostadin Shishmanov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kostadin Shishmanov" Message-ID: <1741534577.433320ceb9ab51aec8067d3afd6e4bd7ed93ea08.kocelfc@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/ X-VCS-Repository: repo/proj/guru X-VCS-Files: games-util/mangohud/Manifest games-util/mangohud/mangohud-0.8.1.ebuild X-VCS-Directories: games-util/mangohud/ X-VCS-Committer: kocelfc X-VCS-Committer-Name: Kostadin Shishmanov X-VCS-Revision: 433320ceb9ab51aec8067d3afd6e4bd7ed93ea08 X-VCS-Branch: dev Date: Sun, 09 Mar 2025 16:52:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a2da0956-e21b-4bff-bdfe-a12067e1d00c X-Archives-Hash: 09b3d0b7d8f951294cd0927c5d275aa1 commit: 433320ceb9ab51aec8067d3afd6e4bd7ed93ea08 Author: Kostadin Shishmanov protonmail com> AuthorDate: Sun Mar 9 15:24:10 2025 +0000 Commit: Kostadin Shishmanov tutanota 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 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 " to "#include " + find . -type f -exec sed -i 's|||g' {} \; || die + find . -type f -exec sed -i 's|"imgui.h"||g' {} \; || die + find . -type f -exec sed -i 's|||g' {} \; || die + find . -type f -exec sed -i 's|"imgui_internal.h"||g' {} \; || die + find . -type f -exec sed -i 's|"imgui_impl_glfw.h"||g' {} \; || die + find . -type f -exec sed -i 's|"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 +}