commit:     dc990c2ce3f52b90873d6e5dbf5bb04823860ba7
Author:     Karl Linden <karl.j.linden <AT> gmail <DOT> com>
AuthorDate: Tue May 31 06:00:47 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue May 31 07:07:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc990c2c

sys-process/rtirq: Initial commit.

A crucial part of professional realtime audio is low latency. rtirq sets
realtime priorities and scheduling policies for desired IRQ threads on boot.
Without rtirq you would need to set these priorities yourself after each boot
or live with sound dropouts. See also [1].

Gentoo-Bug: https://bugs.gentoo.org/566678
Closes: https://github.com/gentoo/gentoo/pull/1554
Package-Manager: portage-2.3.0_rc1
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

[1]: http://alsa.opensrc.org/Rtirq

 sys-process/rtirq/Manifest              |  1 +
 sys-process/rtirq/files/rtirq           | 29 +++++++++++++++++++++++
 sys-process/rtirq/metadata.xml          | 12 ++++++++++
 sys-process/rtirq/rtirq-20150216.ebuild | 42 +++++++++++++++++++++++++++++++++
 4 files changed, 84 insertions(+)

diff --git a/sys-process/rtirq/Manifest b/sys-process/rtirq/Manifest
new file mode 100644
index 0000000..5b01898
--- /dev/null
+++ b/sys-process/rtirq/Manifest
@@ -0,0 +1 @@
+DIST rtirq-20150216.tar.gz 12249 SHA256 
2b44133cefe1527c9f3eecaa59f167f314286cdff10d55301dd6d2cb794e9b93 SHA512 
4cb4e3a8e314cec238c2a21c975bec258f229b660e0994893b73aa0b16f6041179ff4e220532fde237d70e15fd5420e22ee5dbf84168148060e760d76617b59c
 WHIRLPOOL 
4f1441532ef75b78f5a17b78a325d86d767960923094b2ba8dbdff21b12102fb70a20c56cfa7f325703ff84a1bf50396c7e761f84ea01a4952970172919fa324

diff --git a/sys-process/rtirq/files/rtirq b/sys-process/rtirq/files/rtirq
new file mode 100644
index 0000000..dd31153
--- /dev/null
+++ b/sys-process/rtirq/files/rtirq
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+command="/usr/sbin/rtirq.sh"
+
+extra_commands="status"
+
+depend() {
+    need localmount
+    after alsasound logger
+}
+
+start() {
+    ebegin "Starting rtirq"
+    ${command} start
+    eend $?
+}
+
+stop() {
+    ebegin "Stopping rtirq"
+    ${command} reset
+    eend $?
+}
+
+status() {
+    ${command} status
+}

diff --git a/sys-process/rtirq/metadata.xml b/sys-process/rtirq/metadata.xml
new file mode 100644
index 0000000..d2a8f10
--- /dev/null
+++ b/sys-process/rtirq/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Karl Linden</name>
+       </maintainer>
+       <maintainer type="project">
+       <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+</pkgmetadata>

diff --git a/sys-process/rtirq/rtirq-20150216.ebuild 
b/sys-process/rtirq/rtirq-20150216.ebuild
new file mode 100644
index 0000000..aa0d0d6
--- /dev/null
+++ b/sys-process/rtirq/rtirq-20150216.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+DESCRIPTION="Modify realtime scheduling policy and priority of IRQ handlers"
+HOMEPAGE="http://www.rncbc.org/jack/";
+
+SRC_URI="http://www.rncbc.org/jack/${P}.tar.gz";
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=sys-apps/util-linux-2.13"
+
+src_prepare() {
+       # Correct config file path.
+       sed -i -e "s:^\(RTIRQ_CONFIG\=\)\(.*\):\1/etc/conf.d/rtirq:" ${PN}.sh 
|| die
+       sed -i -e "s:/etc/sysconfig/rtirq:/etc/conf.d/rtirq:" ${PN}.conf || die
+
+       default
+}
+
+src_install(){
+       dosbin ${PN}.sh
+       doinitd "${FILESDIR}"/${PN}
+       newconfd ${PN}.conf ${PN}
+}
+
+pkg_postinst(){
+       if [[ "$(rc-config list default | grep rtirq)" = "" ]] ; then
+               elog "You probably want to add rtirq to the default runlevel, 
i.e."
+               elog "  rc-update add rtirq default"
+       fi
+       if [[ "$(uname -r | grep rt)" = "" ]] ; then
+               elog "To use rtirq you need a realtime kernel."
+               elog "Realtime kernel sources are supplied in 
sys-kernel/rt-sources."
+       fi
+       elog "To display the rtirq status issue:"
+       elog "  /etc/init.d/rtirq status"
+}

Reply via email to