commit:     b28ddfaf282019d7af0d35f17aa80daf576fe7a2
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 21:48:11 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 21:55:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b28ddfaf

sys-power/powertop: Port to EAPI 7

Also fix bug 599114
(https://mail.gnome.org/archives/commits-list/2016-November/msg01707.html
helped figure it out)

Closes: https://bugs.gentoo.org/599114
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 sys-power/powertop/powertop-9999.ebuild | 41 ++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/sys-power/powertop/powertop-9999.ebuild 
b/sys-power/powertop/powertop-9999.ebuild
index 62872e31be8..bf3642c77e9 100644
--- a/sys-power/powertop/powertop-9999.ebuild
+++ b/sys-power/powertop/powertop-9999.ebuild
@@ -1,39 +1,39 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="6"
+EAPI=7
+
+EGIT_REPO_URI="https://github.com/fenrus75/powertop.git";
 
-inherit eutils linux-info
 if [[ ${PV} == "9999" ]] ; then
-       EGIT_REPO_URI="https://github.com/fenrus75/powertop.git";
-       inherit git-r3 autotools
+       GIT_ECLASS="git-r3"
        SRC_URI=""
 else
-       MY_P="${PN}-v${PV}"
-       
SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${MY_P}.tar.gz";
-       KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
-       S="${WORKDIR}/${MY_P}"
+       SRC_URI="https://github.com/fenrus75/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
 fi
 
-DESCRIPTION="tool that helps you find what software is using the most power"
-HOMEPAGE="https://01.org/powertop/";
+inherit autotools ${GIT_ECLASS} linux-info
+
+DESCRIPTION="tool to diagnose issues with power consumption and power 
management"
+HOMEPAGE="https://01.org/powertop/ https://github.com/fenrus75/powertop/";
 
 LICENSE="GPL-2"
 SLOT="0"
 IUSE="nls unicode X"
 
-COMMON_DEPEND="
+DEPEND="
        dev-libs/libnl:3
        sys-apps/pciutils
        sys-libs/ncurses:=[unicode?]
 "
 
-DEPEND="${COMMON_DEPEND}
+BDEPEND="
        virtual/pkgconfig
        sys-devel/gettext
 "
 RDEPEND="
-       ${COMMON_DEPEND}
+       ${DEPEND}
        X? ( x11-apps/xset )
        virtual/libintl
 "
@@ -98,11 +98,14 @@ pkg_setup() {
 
 src_prepare() {
        default
-       if [[ ${PV} == "9999" ]] ; then
-               chmod +x scripts/version || die "Failed to make 
'scripts/version' executable"
-               scripts/version || die "Failed to extract version information"
-               eautoreconf
-       fi
+
+       # Bug 599114
+       sed -i '1s|^|AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX_11])|' 
configure.ac || die
+
+       chmod +x scripts/version || die "Failed to make 'scripts/version' 
executable"
+       scripts/version || die "Failed to extract version information"
+
+       eautoreconf
 }
 
 src_configure() {

Reply via email to