summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-09-10 23:37:33 -0400
committerMike Gilbert <floppym@gentoo.org>2017-09-10 23:38:00 -0400
commita400d547ea53dfaaac6fa664b7cd4b6ad41707fc (patch)
tree75a1c0c84beb47227896997a8c85552d0c8b3c91 /sys-power
parentsys-power/cpupower: remove old (diff)
downloadgentoo-a400d547ea53dfaaac6fa664b7cd4b6ad41707fc.tar.gz
gentoo-a400d547ea53dfaaac6fa664b7cd4b6ad41707fc.tar.bz2
gentoo-a400d547ea53dfaaac6fa664b7cd4b6ad41707fc.zip
sys-power/cpupower: restore 3.18 for mate-base/mate-applets
Package-Manager: Portage-2.3.6_p60, Repoman-2.3.3_p38
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/cpupower/Manifest1
-rw-r--r--sys-power/cpupower/cpupower-3.18.ebuild71
2 files changed, 72 insertions, 0 deletions
diff --git a/sys-power/cpupower/Manifest b/sys-power/cpupower/Manifest
index 722c70c0fb63..931388fc2711 100644
--- a/sys-power/cpupower/Manifest
+++ b/sys-power/cpupower/Manifest
@@ -1 +1,2 @@
DIST cpupower-4.9.0.tar.xz 67620 SHA256 5e0eda0f31c6c14b0b181d98ad89ead6ea62114635eb29ad288778bbe0c88168 SHA512 67137bd7166a34f131332a5165384ebca5b97deb1c92e6d557195da4be4fecb0c5902159f748ea454461ad2181a778c32b4e4dfd1f8ce7e6a3ec41f553f23677 WHIRLPOOL 73dc80fe4308146efcbc05b3b7290a66d23b6653cde9013b76d230a914b184212f7a0713b82857c882c65a3448febcd08ae4581499cf97bb0e21a5622053c519
+DIST linux-3.18.tar.xz 80934708 SHA256 becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd SHA512 2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009 WHIRLPOOL 81634af631b7d30ccd1f4798f96f44d9aa0ba6609b73f2747eb6aebaf7a99487fb2dbd45767605186182533cb222bfd9236e8dd5e11a04fdb67c211e4e0a91d6
diff --git a/sys-power/cpupower/cpupower-3.18.ebuild b/sys-power/cpupower/cpupower-3.18.ebuild
new file mode 100644
index 000000000000..f31459e93566
--- /dev/null
+++ b/sys-power/cpupower/cpupower-3.18.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit multilib toolchain-funcs
+
+DESCRIPTION="Shows and sets processor power related values"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI="mirror://kernel/linux/kernel/v3.x/linux-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="cpufreq_bench debug 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
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/linux-${PV}/tools/power/${PN}
+
+pkg_setup() {
+ myemakeargs=(
+ DEBUG=$(usex debug true false)
+ V=1
+ CPUFREQ_BENCH=$(usex cpufreq_bench true false)
+ NLS=$(usex nls true false)
+ docdir=/usr/share/doc/${PF}/${PN}
+ mandir=/usr/share/man
+ libdir=/usr/$(get_libdir)
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC)"
+ STRIP=true
+ LDFLAGS="${LDFLAGS}"
+ OPTIMIZATION="${CFLAGS}"
+ )
+}
+
+src_unpack() {
+ tar -xf "${DISTDIR}"/linux-${PV}.tar.xz \
+ linux-${PV}/tools/power/${PN} \
+ linux-${PV}/Makefile \
+ || die
+}
+
+src_prepare() {
+ # -Wl,--as-needed compat
+ local libs="-lcpupower -lrt $($(tc-getPKG_CONFIG) --libs-only-l libpci)"
+ sed -i \
+ -e "/$libs/{ s,${libs},,g; s,\$, ${libs},g;}" \
+ -e "s:-O1 -g::" \
+ Makefile || die
+}
+
+src_compile() {
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" "${myemakeargs[@]}" install
+ dodoc README ToDo
+
+ newconfd "${FILESDIR}"/conf.d-r2 ${PN}
+ newinitd "${FILESDIR}"/init.d-r4 ${PN}
+}