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

Reply via email to