From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1252207-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id CA6FE13835A
	for <garchives@archives.gentoo.org>; Wed, 17 Feb 2021 19:33:14 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id EA2FDE08EC;
	Wed, 17 Feb 2021 19:33:13 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D1EF0E08EC
	for <gentoo-commits@lists.gentoo.org>; Wed, 17 Feb 2021 19:33:13 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6E05B341905
	for <gentoo-commits@lists.gentoo.org>; Wed, 17 Feb 2021 19:33:12 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A4EF94AF
	for <gentoo-commits@lists.gentoo.org>; Wed, 17 Feb 2021 19:33:10 +0000 (UTC)
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" <conikost@gentoo.org>
Message-ID: <1613590370.d50c2b42a4b140da2c9dba85542ec5bba82b84bf.conikost@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/radeontop/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-misc/radeontop/radeontop-1.3-r2.ebuild app-misc/radeontop/radeontop-9999.ebuild
X-VCS-Directories: app-misc/radeontop/
X-VCS-Committer: conikost
X-VCS-Committer-Name: Conrad Kostecki
X-VCS-Revision: d50c2b42a4b140da2c9dba85542ec5bba82b84bf
X-VCS-Branch: master
Date: Wed, 17 Feb 2021 19:33:10 +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: 80174ebb-5382-456c-b22a-72b0642b337e
X-Archives-Hash: 1eef24ca1b69d14fa1354d98192f7d15

commit:     d50c2b42a4b140da2c9dba85542ec5bba82b84bf
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 17 19:27:00 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Wed Feb 17 19:32:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50c2b42

app-misc/radeontop: fix build without amdgpu

Really fixes #768549.

Bug: https://bugs.gentoo.org/768549
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Jernej Jakob <jernej.jakob <AT> gmail.com>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 ...deontop-9999.ebuild => radeontop-1.3-r2.ebuild} | 23 ++++++++++++++++++----
 app-misc/radeontop/radeontop-9999.ebuild           |  2 +-
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/app-misc/radeontop/radeontop-9999.ebuild b/app-misc/radeontop/radeontop-1.3-r2.ebuild
similarity index 68%
copy from app-misc/radeontop/radeontop-9999.ebuild
copy to app-misc/radeontop/radeontop-1.3-r2.ebuild
index f8399ddb7e6..504d9fd32d8 100644
--- a/app-misc/radeontop/radeontop-9999.ebuild
+++ b/app-misc/radeontop/radeontop-1.3-r2.ebuild
@@ -2,15 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit toolchain-funcs git-r3
+inherit toolchain-funcs
 
 DESCRIPTION="Utility to view Radeon GPU utilization"
 HOMEPAGE="https://github.com/clbr/radeontop"
-EGIT_REPO_URI="https://github.com/clbr/radeontop.git"
+SRC_URI="https://github.com/clbr/radeontop/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
 IUSE="nls video_cards_amdgpu video_cards_radeon"
 REQUIRED_USE="
 	|| ( video_cards_amdgpu video_cards_radeon )
@@ -31,11 +31,26 @@ DEPEND="${RDEPEND}
 "
 BDEPEND="virtual/pkgconfig"
 
+src_prepare() {
+	default
+
+	cat > include/version.h <<-EOF || die
+		#ifndef VER_H
+		#define VER_H
+
+		#define VERSION "${PV}"
+
+		#endif
+	EOF
+	>getver.sh || die
+	touch .git || die
+}
+
 src_configure() {
 	tc-export CC
 	export LIBDIR=$(get_libdir)
 	export nls=$(usex nls 1 0)
-	export amdgpu=1
+	export amdgpu=$(usex video_cards_amdgpu 1 0)
 	export xcb=1
 	# Do not add -g or -s to CFLAGS
 	export plain=1

diff --git a/app-misc/radeontop/radeontop-9999.ebuild b/app-misc/radeontop/radeontop-9999.ebuild
index f8399ddb7e6..8185bf5f830 100644
--- a/app-misc/radeontop/radeontop-9999.ebuild
+++ b/app-misc/radeontop/radeontop-9999.ebuild
@@ -35,7 +35,7 @@ src_configure() {
 	tc-export CC
 	export LIBDIR=$(get_libdir)
 	export nls=$(usex nls 1 0)
-	export amdgpu=1
+	export amdgpu=$(usex video_cards_amdgpu 1 0)
 	export xcb=1
 	# Do not add -g or -s to CFLAGS
 	export plain=1