summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2019-11-27 11:14:19 -0500
committerMike Gilbert <floppym@gentoo.org>2019-11-27 11:14:19 -0500
commite835ea9ec180af8d0a800c2d5d7928c58bf3ece6 (patch)
treef8712947e7d840c2d3763fc32bb7ce8e63231f63 /sys-power
parentdev-python/argcomplete: Bump to 1.10.3 (diff)
downloadgentoo-e835ea9ec180af8d0a800c2d5d7928c58bf3ece6.tar.gz
gentoo-e835ea9ec180af8d0a800c2d5d7928c58bf3ece6.tar.bz2
gentoo-e835ea9ec180af8d0a800c2d5d7928c58bf3ece6.zip
sys-power/cpupower: bump to 5.4
Package-Manager: Portage-2.3.79_p3, Repoman-2.3.18_p2 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/cpupower/Manifest1
-rw-r--r--sys-power/cpupower/cpupower-5.4.ebuild67
-rw-r--r--sys-power/cpupower/files/cpupower-5.4-cflags.patch32
3 files changed, 100 insertions, 0 deletions
diff --git a/sys-power/cpupower/Manifest b/sys-power/cpupower/Manifest
index eca4716f0bc6..778c7cda1ae7 100644
--- a/sys-power/cpupower/Manifest
+++ b/sys-power/cpupower/Manifest
@@ -1 +1,2 @@
DIST cpupower-4.13.0.tar.xz 67812 BLAKE2B 3b94b18bb57b0499a96d57ca26a48f528bf993e0f1ed7eb6d2949c879de8796501629bd0978946eae925d86dd3204a1cab0c99f1c3a8b51731dfbdb61451e990 SHA512 5e7095e2741eae920a097864926931afb2656e492b504f203c40c24ddc5aee5014c7689b220225171b5ea10c69b70774fb2a979d05ea56ef1fa063f3097626c7
+DIST linux-5.4.tar.xz 109441440 BLAKE2B 193bc4a3147e147d5529956164ec4912fad5d5c6fb07f909ff1056e57235834173194afc686993ccd785c1ff15804de0961b625f3008cca0e27493efc8f27b13 SHA512 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f
diff --git a/sys-power/cpupower/cpupower-5.4.ebuild b/sys-power/cpupower/cpupower-5.4.ebuild
new file mode 100644
index 000000000000..d45b53b560a1
--- /dev/null
+++ b/sys-power/cpupower/cpupower-5.4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="Shows and sets processor power related values"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v${PV%%.*}.x/linux-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0/0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="nls"
+
+# File collision w/ headers of the deprecated cpufrequtils
+RDEPEND="sys-apps/pciutils
+ !<sys-apps/linux-misc-apps-3.6-r2
+ !sys-power/cpufrequtils"
+DEPEND="${RDEPEND}
+ virtual/os-headers
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}/cpupower-5.4-cflags.patch"
+)
+
+S="${WORKDIR}/linux-${PV}"
+
+src_configure() {
+ export bindir="${EPREFIX}/usr/bin"
+ export sbindir="${EPREFIX}/usr/sbin"
+ export mandir="${EPREFIX}/usr/share/man"
+ export includedir="${EPREFIX}/usr/include"
+ export libdir="${EPREFIX}/usr/$(get_libdir)"
+ export localedir="${EPREFIX}/usr/share/locale"
+ export docdir="${EPREFIX}/usr/share/doc/${PF}"
+ export confdir="${EPREFIX}/etc"
+ export V=1
+ export NLS=$(usex nls true false)
+}
+
+src_compile() {
+ myemakeargs=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC)"
+ VERSION=${PV}
+ )
+
+ cd tools/power/cpupower || die
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ cd tools/power/cpupower || die
+ emake "${myemakeargs[@]}" DESTDIR="${D}" install
+ doheader lib/cpupower.h
+ einstalldocs
+
+ newconfd "${FILESDIR}"/conf.d-r2 cpupower
+ newinitd "${FILESDIR}"/init.d-r4 cpupower
+
+ systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service
+ systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf
+}
diff --git a/sys-power/cpupower/files/cpupower-5.4-cflags.patch b/sys-power/cpupower/files/cpupower-5.4-cflags.patch
new file mode 100644
index 000000000000..f21435a0cd02
--- /dev/null
+++ b/sys-power/cpupower/files/cpupower-5.4-cflags.patch
@@ -0,0 +1,32 @@
+From 6ae1f1b03aaaee6a9a56040d3ba7af6bf6648ad6 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Wed, 27 Nov 2019 10:51:15 -0500
+Subject: [PATCH] Respect user CFLAGS
+
+---
+ tools/power/cpupower/Makefile | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
+index c8622497ef23..f17e8c94da16 100644
+--- a/tools/power/cpupower/Makefile
++++ b/tools/power/cpupower/Makefile
+@@ -178,14 +178,7 @@ else
+ endif
+ export QUIET ECHO
+
+-# if DEBUG is enabled, then we do not strip or optimize
+-ifeq ($(strip $(DEBUG)),true)
+- override CFLAGS += -O1 -g -DDEBUG
+- STRIPCMD = /bin/true -Since_we_are_debugging
+-else
+- override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
+- STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
+-endif
++STRIPCMD = true
+
+
+ # the actual make rules
+--
+2.24.0
+