From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1430862-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 68E4F158094
	for <garchives@archives.gentoo.org>; Sat, 27 Aug 2022 23:00:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 631D3E077F;
	Sat, 27 Aug 2022 23:00:11 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 3B45DE0794
	for <gentoo-commits@lists.gentoo.org>; Sat, 27 Aug 2022 23:00:10 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 62131341607
	for <gentoo-commits@lists.gentoo.org>; Sat, 27 Aug 2022 19:23:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C403956D
	for <gentoo-commits@lists.gentoo.org>; Sat, 27 Aug 2022 19:22:58 +0000 (UTC)
From: "Adel KARA SLIMANE" <adel@karaslimane.com>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Adel KARA SLIMANE" <adel@karaslimane.com>
Message-ID: <1661628168.4636e479e98f107273cecb1565c4198a149d3284.adel@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.6.8.ebuild games-util/mangohud/mangohud-9999.ebuild
X-VCS-Directories: games-util/mangohud/
X-VCS-Committer: adel
X-VCS-Committer-Name: Adel KARA SLIMANE
X-VCS-Revision: 4636e479e98f107273cecb1565c4198a149d3284
X-VCS-Branch: dev
Date: Sat, 27 Aug 2022 19:22:58 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 62bb4787-df73-4ba1-b8e7-5df574db631e
X-Archives-Hash: b21d68eeb0fc568522aea2623d904eab

commit:     4636e479e98f107273cecb1565c4198a149d3284
Author:     Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Sat Aug 27 19:22:23 2022 +0000
Commit:     Adel KARA SLIMANE <adel <AT> karaslimane <DOT> com>
CommitDate: Sat Aug 27 19:22:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4636e479

games-util/mangohud: version bump to 0.6.8

use imgui-1.81 ebuild instead of bundling it

Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>

 games-util/mangohud/Manifest              |   1 +
 games-util/mangohud/mangohud-0.6.8.ebuild | 100 ++++++++++++++++++++++++++++++
 games-util/mangohud/mangohud-9999.ebuild  |  92 +++++++++++++++++++++++++++
 3 files changed, 193 insertions(+)

diff --git a/games-util/mangohud/Manifest b/games-util/mangohud/Manifest
index 16dbf2e48..97ecf7cc5 100644
--- a/games-util/mangohud/Manifest
+++ b/games-util/mangohud/Manifest
@@ -2,3 +2,4 @@ DIST imgui-1.81-1-meson-wrap.zip 1850 BLAKE2B 325f84fd57a896ec9aceb83a54752e8dba
 DIST imgui-1.81.tar.gz 1413443 BLAKE2B 6f2e63777821b2767da92d9f40f4de7b4313c38817413e959e612c0ce67701645cf29f0748a3b86cfbd41e0b4b2c8099e9a0ca786c637ca1661fffd7b0de0629 SHA512 d7a2b66dea77359f78068a595607d7668e09ddd0b91910f67fc6463cb920b91b0cc1855984bd4d41e6a880b69ca7cd5e3adc064dcf461c0629b9f8c845a4fc3e
 DIST mangohud-0.6.6.1.tar.gz 14839055 BLAKE2B e0e27e62bf688b80611461ecab1bf4cf2c39f8359a9dc2cc1362555bfca55db30a72684da4e07e03970d8e5dee1d26f1d7a1fa30ff47aa86ec653dba273f24cf SHA512 c097dede7e534641f12a9c7f0a2ce049611e17732c7d232251b38d5c50bbcee53b2b22e548ff27f514fa57a45c563d883a1a9382c2c0ee9ac6832a2775e8f221
 DIST mangohud-0.6.7.1.tar.gz 14834501 BLAKE2B 6fdd91309531f32d663a0bec4f3edd26095781290ce40294f4ea87297855ce210efbc57443710aa180652bc555887519a12166c76dec19cdf3037bbdc384db15 SHA512 7d5250cc6a50215430cc79c7d11ad18219be374966383ab3f6cba9626fa045c973245d74bc32d75649adebf0fdc7acd086f5afdf5e1708e35da1f7a920a54f1d
+DIST mangohud-0.6.8.tar.gz 14844076 BLAKE2B 0da41ecac5e608e755cd1f3bbb3cff698e55a59adb3a5e5c42d1b8b19b1c0666c572016c29db11992ff72abaa80b756bbd50687ce17409380e89a2554f13dee1 SHA512 c2344c21dedebce0c56e88db476177eef29bab9e418a3c5ba13d1059d81f3ee23718e2f9257e32f9f62dcaf6554c65cbf36dac691b2bb3c355def2c9de0a52cc

diff --git a/games-util/mangohud/mangohud-0.6.8.ebuild b/games-util/mangohud/mangohud-0.6.8.ebuild
new file mode 100644
index 000000000..e77071978
--- /dev/null
+++ b/games-util/mangohud/mangohud-0.6.8.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit python-any-r1 meson
+
+MY_PV=$(ver_cut 1-3)
+[[ -n "$(ver_cut 4)" ]] && MY_PV_REV="-$(ver_cut 4)"
+
+DESCRIPTION="A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more"
+HOMEPAGE="https://github.com/flightlessmango/MangoHud"
+
+SRC_URI="
+	https://github.com/flightlessmango/MangoHud/archive/v${MY_PV}${MY_PV_REV}.tar.gz -> ${P}.tar.gz
+"
+
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="+dbus debug +X xnvctrl wayland video_cards_nvidia"
+
+REQUIRED_USE="
+	|| ( X wayland )
+	xnvctrl? ( video_cards_nvidia )"
+
+BDEPEND="
+	app-arch/unzip
+	$(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]')
+"
+
+python_check_deps() {
+	python_has_version "dev-python/mako[${PYTHON_USEDEP}]"
+}
+
+DEPEND="
+	~media-libs/imgui-1.81
+	dev-libs/spdlog
+	dev-util/glslang
+	>=dev-util/vulkan-headers-1.2
+	media-libs/vulkan-loader
+	media-libs/libglvnd
+	x11-libs/libdrm
+	dbus? ( sys-apps/dbus )
+	X? ( x11-libs/libX11 )
+	video_cards_nvidia? (
+		x11-drivers/nvidia-drivers
+		xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
+	)
+	wayland? ( dev-libs/wayland )
+"
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/MangoHud-${PV}"
+
+PATCHES=(
+	"${FILESDIR}/mangohud-0.6.6-meson-fix-imgui-dep.patch"
+)
+
+src_unpack() {
+	default
+	[[ -n "${MY_PV_REV}" ]] && ( mv ${WORKDIR}/MangoHud-${MY_PV}${MY_PV_REV} ${WORKDIR}/MangoHud-${PV} || die )
+}
+
+src_prepare() {
+	default
+	# replace all occurences of "#include <imgui.h>" to "#include <imgui/imgui.h>"
+	find . -type f -exec sed -i 's/#include <imgui.h>/#include <imgui\/imgui.h>/g' {} \;
+	find . -type f -exec sed -i 's/#include "imgui.h"/#include <imgui\/imgui.h>/g' {} \;
+}
+
+src_configure() {
+	local emesonargs=(
+		-Dappend_libdir_mangohud=false
+		-Duse_system_spdlog=enabled
+		-Duse_system_vulkan=enabled
+		-Dinclude_doc=false
+		$(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_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
+}

diff --git a/games-util/mangohud/mangohud-9999.ebuild b/games-util/mangohud/mangohud-9999.ebuild
new file mode 100644
index 000000000..1bbdaead5
--- /dev/null
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit git-r3 python-any-r1 meson
+
+MY_PV=$(ver_cut 1-3)
+[[ -n "$(ver_cut 4)" ]] && MY_PV_REV="-$(ver_cut 4)"
+
+DESCRIPTION="A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more"
+HOMEPAGE="https://github.com/flightlessmango/MangoHud"
+
+inherit meson git-r3
+EGIT_REPO_URI="https://github.com/flightlessmango/MangoHud.git"
+
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="+dbus debug +X xnvctrl wayland video_cards_nvidia"
+
+REQUIRED_USE="
+	|| ( X wayland )
+	xnvctrl? ( video_cards_nvidia )"
+
+BDEPEND="
+	app-arch/unzip
+	$(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]')
+"
+
+python_check_deps() {
+	python_has_version "dev-python/mako[${PYTHON_USEDEP}]"
+}
+
+DEPEND="
+	~media-libs/imgui-1.81
+	dev-libs/spdlog
+	dev-util/glslang
+	>=dev-util/vulkan-headers-1.2
+	media-libs/vulkan-loader
+	media-libs/libglvnd
+	x11-libs/libdrm
+	dbus? ( sys-apps/dbus )
+	X? ( x11-libs/libX11 )
+	video_cards_nvidia? (
+		x11-drivers/nvidia-drivers
+		xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
+	)
+	wayland? ( dev-libs/wayland )
+"
+
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/mangohud-0.6.6-meson-fix-imgui-dep.patch"
+)
+
+src_prepare() {
+	default
+	# replace all occurences of "#include <imgui.h>" to "#include <imgui/imgui.h>"
+	find . -type f -exec sed -i 's/#include <imgui.h>/#include <imgui\/imgui.h>/g' {} \;
+	find . -type f -exec sed -i 's/#include "imgui.h"/#include <imgui\/imgui.h>/g' {} \;
+}
+
+src_configure() {
+	local emesonargs=(
+		-Dappend_libdir_mangohud=false
+		-Duse_system_spdlog=enabled
+		-Duse_system_vulkan=enabled
+		-Dinclude_doc=false
+		$(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_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
+}