summaryrefslogtreecommitdiff
path: root/app-laptop/i8kutils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-laptop/i8kutils
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-laptop/i8kutils')
-rw-r--r--app-laptop/i8kutils/Manifest10
-rw-r--r--app-laptop/i8kutils/files/i8k.conf31
-rw-r--r--app-laptop/i8kutils/files/i8k.init-r150
-rw-r--r--app-laptop/i8kutils/files/i8kmon.service9
-rw-r--r--app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch34
-rw-r--r--app-laptop/i8kutils/files/i8kutils-gcc5.patch28
-rw-r--r--app-laptop/i8kutils/i8kutils-1.33-r1.ebuild54
-rw-r--r--app-laptop/i8kutils/i8kutils-1.42.ebuild52
-rw-r--r--app-laptop/i8kutils/metadata.xml15
9 files changed, 283 insertions, 0 deletions
diff --git a/app-laptop/i8kutils/Manifest b/app-laptop/i8kutils/Manifest
new file mode 100644
index 000000000000..edbafe95aea3
--- /dev/null
+++ b/app-laptop/i8kutils/Manifest
@@ -0,0 +1,10 @@
+AUX i8k.conf 891 BLAKE2B 734a958f641396e103b6a018d983638d91c540267325b8057f23091e614b88e5eb45b9cf154e32a8aa00f219904227eaed3887f87c379e18d6475a945a065f19 SHA512 bc262f0014237abfc87efc60dabbb37e86c459077831b68c07ea13608d1174bd32cb695e74ca4597839f7b128cfc1b4860874cce0c6f511972569e5f0948526d
+AUX i8k.init-r1 1216 BLAKE2B b8e2dbb0cb343b751deaacda9a7f57646c27fc501669980e20e3b42302e87fb89001b48dcecb3d5866a06dd5cf538044ab3ff356c9dba18a7b57ebd3dc408fc1 SHA512 39282605172dac48c12819e5adeb080d3c73257d775fb8e53d2bdcf26e0510dd10055d8a51e17043f2a5d49da3ffb73f28a767fbfb44c0bb77feb621e25867cb
+AUX i8kmon.service 158 BLAKE2B e567398b719557fffc6b4a244e4528d6147e8406db59d4cca39d531e88a04be5e4154971f15ed9db24d7f8ebfef103ea78cdaa4aeae356823045f7012782cf39 SHA512 77cbed13d4c1982a491faafe7e45da7a4fc06ea94e6b126405211f54a4bb5b4c794d94f6ca56d6d16ad0e0e62d8311bf90e0e6c60c74147ea12963c530c69529
+AUX i8kutils-1.42-Makefile.patch 1296 BLAKE2B cbcc827c1c93ebb4a597c642ed14110c92de701b7b094228924442c75806ecf2e35b43a65c7a39f412e9d10d24ea97c726c76cd9653ea090a0215a795ac47905 SHA512 3dd548cff896d3b14df0e55059f842cf3e04c0a9057f2c16eea7fb160882ceab4dc91782012d2243a4a78f9271c2effdb09109ffe889c27149a65940b69785d9
+AUX i8kutils-gcc5.patch 1161 BLAKE2B 12705e687c801a2863f2b8908473b1268bb3af474004ec1b317d03cb9ffb100dc4c4b2b5afeaeea76d047037b5ba5586a8629a1bbf5313b99e76dd7728679e1b SHA512 c789ef70244c59041308c5ff692c2bec6cf4fa5e673deeea9ec59cd1b6036e60f6ca4036dea04eaaa1b8172e3388b2f5e02227311e032c9c552e04ac50276616
+DIST i8kutils_1.33.tar.gz 50378 BLAKE2B 648d5dca57a407b1239b5a8d51dbe44214140368eefa71d72ef31b0cac3c0e7af2cb0ce44eb7ee429f555ef6503025ffa7543d9d17d2c42db98b67865fac0a03 SHA512 a7b9277b8c9bc2642a65122dda31cfa7cc0c4fa780ba980364c0a4e0e4599502c6557871464ff256c5911370d98944826d0e29d4d3621605d5e8c1c8a23e5578
+DIST i8kutils_1.42.tar.xz 37544 BLAKE2B ca8ec63252f43b269ba2a5565fce275aaa6542ebe6f4824d12b194cb0ae8b09dbe354c743ad78af8bcb897e411f1739df464e6c5603d470842de4b59be753984 SHA512 148e8788c50cbaa22f1dd3b72867839f5bc2d91cda70aee74f7c9a3d8542386a44652c5eb8dd9eba0e30400fc6bb72855d3cc7f2dc4284c2529b9cba2eac485b
+EBUILD i8kutils-1.33-r1.ebuild 1063 BLAKE2B 6700e2387d61a8f8ed4bceb041ba21216914998d59dcfb6c43cb6b1976df812bb6ce72e9093263f7c9ad8d833040000fc38df490cb4e1dd0832046745653b33b SHA512 62664f2355a3e6603cb462e38d5e5503af27e746e16fcddffa9b60671039fce01edefe433f2af044b65580a4b6bfcbe974ecab53394428e39071bd1002d48d31
+EBUILD i8kutils-1.42.ebuild 1027 BLAKE2B 80ec3999adf84113e7be00c5ba56d4bc9ee12b926a6d04ec27038936ccd1c0ebd9aa95e1586b8688839137d94621f07c3e5d64df496de30888d0aed66867d358 SHA512 40edad83ee0c8f0b348a0a0117b2a1476a095b992744e9edba15cf85b0dd603be0f1848228b8b166652e0b3248a2bf72d3ab7535fdd73126f8d26c9a4bc40399
+MISC metadata.xml 440 BLAKE2B ef848635f744a68b02e5a51fd42484c0e62547a59f5361e2cf36b7ae70d3c8ef93f6f9d2a156ef7df77ee7140d1ae5a045b74ff2931e39dbca14e27de0ec4559 SHA512 9e56ccb489ffacafec5d8d882a9e7efb5a5213c36735b245127915649f29663c7686c3d4b590aa678ee8afd7b5c47f658fb65a37c7a51e7c6474ae42f6f42b55
diff --git a/app-laptop/i8kutils/files/i8k.conf b/app-laptop/i8kutils/files/i8k.conf
new file mode 100644
index 000000000000..c5bd389b294a
--- /dev/null
+++ b/app-laptop/i8kutils/files/i8k.conf
@@ -0,0 +1,31 @@
+# Config file for /etc/init.d/i8k
+
+# Parameters:
+#
+# i8kbuttons Parameters
+# =====================
+# VOLUME_UP : command for i8kbuttons to run on volume up key
+# VOLUME_DOWN : command for i8kbuttons to run on volume down key
+# VOLUME_MUTE : command for i8kbuttons to run on mute key
+# BUTTON_REPEAT : repeat rate, in milliseconds, for i8kbuttons keypresses
+#
+# If VOLUME_* commands are not defined, i8kbuttons will not be started
+#
+# i8kmon Parameters
+# =================
+# NOMON : if set, i8kmon will not be started
+# NOAUTO : if set, i8kmon will not control the fans
+# TIMEOUT : timeout, in seconds, at which i8kmon will check/update status
+# (default is 2)
+
+# for ALSA
+MIXER="/usr/bin/amixer -q set Master"
+VOLUME_UP="$MIXER 1+"
+VOLUME_DOWN="$MIXER 1-"
+VOLUME_MUTE="$MIXER toggle"
+
+# for aumix (no mute support)
+#VOLUME_UP="aumix -v +4"
+#VOLUME_DOWN="aumix -v -4"
+
+BUTTON_REPEAT=100
diff --git a/app-laptop/i8kutils/files/i8k.init-r1 b/app-laptop/i8kutils/files/i8k.init-r1
new file mode 100644
index 000000000000..1e1cb7ca0c94
--- /dev/null
+++ b/app-laptop/i8kutils/files/i8k.init-r1
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+
+depend() {
+ after alsasound
+ after modules
+}
+
+checkconfig() {
+ if [ ! -e /proc/i8k ] ; then
+ eerror "The i8k driver is not installed"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then
+ ebegin "Starting i8kbuttons"
+ start-stop-daemon --start --quiet --pidfile /var/run/i8kbuttons.pid \
+ --make-pidfile --exec /usr/bin/i8kbuttons --background \
+ -- ${VOLUME_UP:+-u "${VOLUME_UP}"} \
+ ${VOLUME_DOWN:+-d "$VOLUME_DOWN"} \
+ ${VOLUME_MUTE:+-m "$VOLUME_MUTE"} \
+ ${BUTTON_REPEAT:+-r "$BUTTON_REPEAT"}
+ eend $?
+ fi
+ if [ ! -n "$NOMON" ]; then
+ ebegin "Starting i8kmon"
+ start-stop-daemon --start -b --quiet \
+ --pidfile /var/run/i8kmon.pid \
+ --make-pidfile \
+ --exec /usr/bin/i8kmon --background \
+ --name "tclsh /usr/bin/i8kmon" \
+ -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
+ eend $?
+ fi
+}
+
+stop() {
+ if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then
+ ebegin "Stopping i8kbuttons"
+ start-stop-daemon --stop --quiet --pidfile /var/run/i8kbuttons.pid
+ eend $?
+ fi
+ if [ ! -n "$NOMON" ]; then
+ ebegin "Stopping i8kmon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/i8kmon.pid
+ eend $?
+ fi
+}
diff --git a/app-laptop/i8kutils/files/i8kmon.service b/app-laptop/i8kutils/files/i8kmon.service
new file mode 100644
index 000000000000..3b80f46334af
--- /dev/null
+++ b/app-laptop/i8kutils/files/i8kmon.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Dell laptop thermal monitoring
+ConditionPathExists=/proc/i8k
+
+[Service]
+ExecStart=/usr/bin/i8kmon -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch b/app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch
new file mode 100644
index 000000000000..7dc56d91aa3e
--- /dev/null
+++ b/app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch
@@ -0,0 +1,34 @@
+Fix a race condition causing parallel builds to sometimes fail.
+
+Both probe_i8k_calls_time and i8kctl contain a main() function, though
+i8kctl's is omitted when built with -DLIB so they can link without a
+conflict. i8kctl is also a standalone exe so it is built twice, with
+and without -DLIB. When building in parallel you can get into a
+situation where the object file created by the probe_i8k_calls_time
+target gets overwritten with the one from i8kctl and bad things happen.
+Nothing actually uses the i8kctl.o that has main() so we can just not
+build it.
+
+Also move CFLAGS, CC, LDFLAGS respect out of the ebuild.
+
+--- a/Makefile
++++ b/Makefile
+@@ -17,13 +17,13 @@ ccflags-y = -Wall
+
+ all: i8kctl probe_i8k_calls_time
+
+-i8kctl: i8kctl.c i8kctl.o
+- gcc -Wall i8kctl.c -o i8kctl
++i8kctl: i8kctl.c
++ $(CC) -Wall ${CFLAGS} -o i8kctl i8kctl.c
+
+ probe_i8k_calls_time: probe_i8k_calls_time.c
+- gcc -Wall -c -g -DLIB i8kctl.c
+- gcc -Wall -c -g -DLIB probe_i8k_calls_time.c
+- gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o
++ $(CC) -Wall ${CFLAGS} -c -DLIB i8kctl.c
++ $(CC) -Wall ${CFLAGS} -c -DLIB probe_i8k_calls_time.c
++ $(CC) -Wall ${CFLAGS} ${LDFLAGS} -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o
+
+ i8k:
+ make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
diff --git a/app-laptop/i8kutils/files/i8kutils-gcc5.patch b/app-laptop/i8kutils/files/i8kutils-gcc5.patch
new file mode 100644
index 000000000000..258b95f595f6
--- /dev/null
+++ b/app-laptop/i8kutils/files/i8kutils-gcc5.patch
@@ -0,0 +1,28 @@
+Fix build with GCC 5.
+
+x86_64-pc-linux-gnu-gcc -O2 -march=native -g -pipe -c -o i8kctl.o i8kctl.c
+gcc -Wall -c -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -DLIB i8kctl.c
+gcc -Wall -c -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -DLIB probe_i8k_calls_time.c
+gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o
+probe_i8k_calls_time.o: In function `main':
+probe_i8k_calls_time.c:(.text+0x62): undefined reference to `timestamp'
+probe_i8k_calls_time.c:(.text+0x82): undefined reference to `timestamp'
+probe_i8k_calls_time.c:(.text+0xa2): undefined reference to `timestamp'
+probe_i8k_calls_time.c:(.text+0xbf): undefined reference to `timestamp'
+probe_i8k_calls_time.c:(.text+0xdc): undefined reference to `timestamp'
+probe_i8k_calls_time.o:probe_i8k_calls_time.c:(.text+0xf9): more undefined references to `timestamp' follow
+collect2: error: ld returned 1 exit status
+Makefile:24: recipe for target 'probe_i8k_calls_time' failed
+
+
+--- a/probe_i8k_calls_time.c
++++ b/probe_i8k_calls_time.c
+@@ -13,7 +13,7 @@ double t;
+
+ struct timespec tmst;
+
+-inline double timestamp()
++double timestamp()
+ {
+ clock_gettime(CLOCK_REALTIME, &tmst);
+ t = tmst.tv_nsec;
diff --git a/app-laptop/i8kutils/i8kutils-1.33-r1.ebuild b/app-laptop/i8kutils/i8kutils-1.33-r1.ebuild
new file mode 100644
index 000000000000..cf870ed7fd3b
--- /dev/null
+++ b/app-laptop/i8kutils/i8kutils-1.33-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="Dell Inspiron and Latitude utilities"
+HOMEPAGE="http://packages.debian.org/sid/i8kutils"
+SRC_URI="mirror://debian/pool/main/i/${PN}/${P/-/_}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="examples tk"
+
+DEPEND="tk? ( dev-lang/tk )"
+RDEPEND="${DEPEND}"
+
+DOCS=( README.i8kutils )
+
+src_prepare() {
+ sed \
+ -e '/^CC/d' \
+ -e '/^CFLAGS/d' \
+ -e 's: -g : $(LDFLAGS) :g' \
+ -i Makefile || die
+
+ tc-export CC
+}
+
+src_install() {
+ dobin i8kbuttons i8kctl
+ doman i8kbuttons.1 i8kctl.1
+ dosym /usr/bin/i8kctl /usr/bin/i8kfan
+
+ use examples && dodoc -r examples
+
+ newinitd "${FILESDIR}"/i8k.init-r1 i8k
+ newconfd "${FILESDIR}"/i8k.conf i8k
+
+ if use tk; then
+ dobin i8kmon
+ doman i8kmon.1
+ dodoc i8kmon.conf
+ systemd_dounit "${FILESDIR}"/i8kmon.service
+ else
+ cat >> "${ED}"/etc/conf.d/i8k <<- EOF
+ # i8kmon disabled because the package was installed without USE=tk
+ NOMON=1
+ EOF
+ fi
+
+}
diff --git a/app-laptop/i8kutils/i8kutils-1.42.ebuild b/app-laptop/i8kutils/i8kutils-1.42.ebuild
new file mode 100644
index 000000000000..a02cb3a89a8a
--- /dev/null
+++ b/app-laptop/i8kutils/i8kutils-1.42.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Dell Inspiron and Latitude utilities"
+HOMEPAGE="https://launchpad.net/i8kutils"
+SRC_URI="https://launchpad.net/i8kutils/trunk/${PV}/+download/${P/-/_}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tk"
+
+DEPEND="tk? ( dev-lang/tk:0 )"
+RDEPEND="${DEPEND}
+ sys-power/acpi"
+
+S="${WORKDIR}/${PN}"
+
+DOCS=( README.i8kutils )
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-gcc5.patch"
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+
+ tc-export CC
+}
+
+src_install() {
+ dobin i8kctl i8kfan
+ doman i8kctl.1
+ dodoc README.i8kutils
+
+ newinitd "${FILESDIR}"/i8k.init-r1 i8k
+ newconfd "${FILESDIR}"/i8k.conf i8k
+
+ if use tk; then
+ dobin i8kmon
+ doman i8kmon.1
+ dodoc i8kmon.conf
+ systemd_dounit "${FILESDIR}"/i8kmon.service
+ else
+ cat >> "${ED}"/etc/conf.d/i8k <<- EOF
+
+ # i8kmon disabled because the package was installed without USE=tk
+ NOMON=1
+ EOF
+ fi
+}
diff --git a/app-laptop/i8kutils/metadata.xml b/app-laptop/i8kutils/metadata.xml
new file mode 100644
index 000000000000..a365634fd545
--- /dev/null
+++ b/app-laptop/i8kutils/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>adi@adirat.com</email>
+ <name>Ioan-Adrian Ratiu</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">i8kutils</remote-id>
+ </upstream>
+</pkgmetadata>