summaryrefslogtreecommitdiff
path: root/sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild')
-rw-r--r--sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild b/sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild
new file mode 100644
index 000000000000..6390ac5c14d9
--- /dev/null
+++ b/sys-power/intel-undervolt/intel-undervolt-1.7-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd toolchain-funcs
+
+DESCRIPTION="Intel CPU undervolting and throttling configuration tool"
+HOMEPAGE="https://github.com/kitsunyan/intel-undervolt"
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/kitsunyan/${PN}.git"
+else
+ SRC_URI="https://github.com/kitsunyan/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="-* ~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="elogind"
+
+DEPEND="elogind? ( sys-auth/elogind )"
+
+RDEPEND="${DEPEND}"
+
+BDEPEND="virtual/pkgconfig"
+
+CONFIG_CHECK="~INTEL_RAPL ~X86_MSR"
+
+src_configure() {
+ local myconf=(
+ # it's a non-standard build system
+ $(usex elogind --enable-elogind '')
+ $(usex elogind --eloginddir="${EPREFIX}/$(get_libdir)/elogind" '')
+ --enable-openrc
+ --enable-systemd
+ --unitdir="$(systemd_get_systemunitdir)"
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ tc-export CC
+
+ local myemakeargs=(
+ CC="${CC}"
+ CFLAGS="${CFLAGS}"
+ )
+
+ emake "${myemakeargs[@]}"
+}
+
+pkg_postinst() {
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ ${v} == 1.6 ]] ; then
+ elog "openrc service has been renamed to intel-undervolt-loop"
+ elog "please update your startup configuration"
+ fi
+ done
+}