Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/irqbalance/, sys-apps/irqbalance/files/
Date: Wed, 01 Mar 2017 17:20:51
Message-Id: 1488388841.13b6f378ac4f9a8c5546e160a3dc3a8a9ead5036.polynomial-c@gentoo
1 commit: 13b6f378ac4f9a8c5546e160a3dc3a8a9ead5036
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 1 17:15:12 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 1 17:20:41 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13b6f378
7
8 sys-apps/irqbalance: Bump to version 1.2.0
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 sys-apps/irqbalance/Manifest | 1 +
13 .../irqbalance/files/irqbalance-1.2.0-tinfo.patch | 32 +++++++++++
14 sys-apps/irqbalance/files/irqbalance.init.4 | 20 +++++++
15 sys-apps/irqbalance/irqbalance-1.2.0.ebuild | 63 ++++++++++++++++++++++
16 4 files changed, 116 insertions(+)
17
18 diff --git a/sys-apps/irqbalance/Manifest b/sys-apps/irqbalance/Manifest
19 index 1bcd2b23a92..f2409a80dfd 100644
20 --- a/sys-apps/irqbalance/Manifest
21 +++ b/sys-apps/irqbalance/Manifest
22 @@ -5,3 +5,4 @@ DIST irqbalance-1.0.6.tar.gz 352325 SHA256 95ac79992e6de501f613c781b0fc8aa17a4aa
23 DIST irqbalance-1.0.7.tar.gz 41209 SHA256 8c3916780d254b74fb1c7ec22876d63ac01f1b32776d9204a604b73c8f591d2a SHA512 388f982fe620d8df850e6e298a194a5ba1393f29f1b25897bfa79e34f3acb32e762b86e31154e7af614d5d84a38a61b85ff07c0dd2032e1eb6b0e30ea9010612 WHIRLPOOL fdbaa8817aae91bc1960115aa457e4dc92b36f62ba7680e9aac35459072d73f2e30015c616c86ce451ac6cd335406ac2423328232768c893e17e17537c3c951e
24 DIST irqbalance-1.0.9.tar.gz 44661 SHA256 f1b8115948bb9f0bc36b9d7143ee8be751a294bc189d311408e753acc37169c3 SHA512 ef3ce9eeec11ec86291e2e3cd701e782ee1fb4ba256e2ea5ea0ea04b373f97ff2eae0a44919127c4dbd7fd805e9e3df3a5e62a3528e4d1c9bbab4db39186b5c5 WHIRLPOOL 7bed3d8dd868b4ad697b997143a59b9101815d0bfc08d1d594248c1fcfeaec22045fbe779605583a89aa7d2c8a54e079317bf8a6e4ef8135fc887e2d1518e706
25 DIST irqbalance-1.1.0.tar.gz 46742 SHA256 91506e638b03bf27cf5da7dc250d58a753ce8a0288a20265fc7ff0266040706b SHA512 66abf71b87e25df190417afbf9da24d826d817de3c0ebdc686e3ae56ac131b2f9586092ba67e5f9c749cb139fbf2faaa2af2ef30700955a5b347f1964f61bf6b WHIRLPOOL 581cb27ae79648d69200ea2746cabf6dde8c865fd3afc80d87a0c43a150b40b6ad5e22ecd15fef5cc9aff166055b568e6217554c08b4767757f0534a998f35be
26 +DIST irqbalance-1.2.0.tar.gz 55618 SHA256 0efe5d2a0947b54d89c7196a48eca9b3b33c80bc15964e4226a0f7d3fd9535b2 SHA512 02510d0d4dc069570b5f98f3b8191384593a6ed9a88c65c87f5a4261f375c291d95c401b01c03ef9d80834925dd124a088f56ac90c5f290815e26337d4f61c1b WHIRLPOOL 32cdb9d91310012f729f45643b4d105a9840fb88fa55533d48b9a93848a6f3e7f273f9aa9957add8b5ddf4444f5d620da9accb9d79ad237126029176942a37cc
27
28 diff --git a/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch b/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch
29 new file mode 100644
30 index 00000000000..20716542b6d
31 --- /dev/null
32 +++ b/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch
33 @@ -0,0 +1,32 @@
34 +From 287d50594fe624bdb4400611d0dbecec6ff38a41 Mon Sep 17 00:00:00 2001
35 +From: Lars Wendler <polynomial-c@g.o>
36 +Date: Wed, 1 Mar 2017 17:11:42 +0100
37 +Subject: [PATCH] Prefer pkgconfig to check for ncursesw.
38 +
39 +That way we take possible separate tinfo lib into account.
40 +---
41 + configure.ac | 8 +++++++-
42 + 1 file changed, 7 insertions(+), 1 deletion(-)
43 +
44 +diff --git a/configure.ac b/configure.ac
45 +index 17b879a..77d8aa4 100644
46 +--- a/configure.ac
47 ++++ b/configure.ac
48 +@@ -26,7 +26,13 @@ AC_CHECK_FUNCS(getopt_long)
49 + AC_CHECK_LIB(numa, numa_available)
50 + AC_CHECK_LIB(m, floor)
51 +
52 +-AC_CHECK_LIB(curses, mvprintw)
53 ++PKG_CHECK_MODULES([NCURSESW], [ncursesw], [has_ncursesw=yes], [AC_CHECK_LIB(curses, mvprintw)])
54 ++AS_IF([test "x$has_ncursesw" = "xyes"], [
55 ++ AC_SUBST([NCURSESW_CFLAGS])
56 ++ AC_SUBST([NCURSESW_LIBS])
57 ++ LIBS="$LIBS $NCURSESW_LIBS"
58 ++ AC_SUBST([LIBS])
59 ++])
60 +
61 + AC_C_CONST
62 + AC_C_INLINE
63 +--
64 +2.12.0
65 +
66
67 diff --git a/sys-apps/irqbalance/files/irqbalance.init.4 b/sys-apps/irqbalance/files/irqbalance.init.4
68 new file mode 100644
69 index 00000000000..1fb9eeb11f4
70 --- /dev/null
71 +++ b/sys-apps/irqbalance/files/irqbalance.init.4
72 @@ -0,0 +1,20 @@
73 +#!/sbin/openrc-run
74 +# Copyright 1999-2017 Gentoo Foundation
75 +# Distributed under the terms of the GNU General Public License, v2 or later
76 +
77 +depend() {
78 + need localmount
79 + after bootmisc
80 +}
81 +
82 +command="/usr/sbin/irqbalance"
83 +command_args="${IRQBALANCE_OPTS}"
84 +
85 +start_pre() {
86 + if grep -q MSI /proc/interrupts 2>/dev/null && \
87 + test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then
88 + eerror "MSI interrupts found in /proc/interrupts but none found in sysfs."
89 + eerror "You need to update your kernel."
90 + return 1
91 + fi
92 +}
93
94 diff --git a/sys-apps/irqbalance/irqbalance-1.2.0.ebuild b/sys-apps/irqbalance/irqbalance-1.2.0.ebuild
95 new file mode 100644
96 index 00000000000..5a860709ee8
97 --- /dev/null
98 +++ b/sys-apps/irqbalance/irqbalance-1.2.0.ebuild
99 @@ -0,0 +1,63 @@
100 +# Copyright 1999-2017 Gentoo Foundation
101 +# Distributed under the terms of the GNU General Public License v2
102 +
103 +EAPI=5
104 +AUTOTOOLS_AUTORECONF=true
105 +
106 +inherit autotools-utils systemd linux-info
107 +
108 +DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system"
109 +HOMEPAGE="https://github.com/Irqbalance/irqbalance"
110 +SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
111 +
112 +LICENSE="GPL-2"
113 +SLOT="0"
114 +KEYWORDS="~amd64 ~ppc ~x86"
115 +IUSE="caps +numa selinux"
116 +
117 +CDEPEND="
118 + dev-libs/glib:2
119 + sys-libs/ncurses:0=[unicode]
120 + caps? ( sys-libs/libcap-ng )
121 + numa? ( sys-process/numactl )
122 +"
123 +DEPEND="${CDEPEND}
124 + virtual/pkgconfig
125 +"
126 +RDEPEND="${CDEPEND}
127 + selinux? ( sec-policy/selinux-irqbalance )
128 +"
129 +
130 +PATCHES=(
131 + "${FILESDIR}/${P}-tinfo.patch"
132 +)
133 +
134 +pkg_setup() {
135 + CONFIG_CHECK="~PCI_MSI"
136 + linux-info_pkg_setup
137 +}
138 +
139 +src_prepare() {
140 + # Follow systemd policies
141 + # https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy
142 + sed \
143 + -e 's/ $IRQBALANCE_ARGS//' \
144 + -e '/EnvironmentFile/d' \
145 + -i misc/irqbalance.service || die
146 + autotools-utils_src_prepare
147 +}
148 +
149 +src_configure() {
150 + local myeconfargs=(
151 + $(use_with caps libcap-ng)
152 + $(use_enable numa)
153 + )
154 + autotools-utils_src_configure
155 +}
156 +
157 +src_install() {
158 + autotools-utils_src_install
159 + newinitd "${FILESDIR}"/irqbalance.init.4 irqbalance
160 + newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
161 + systemd_dounit misc/irqbalance.service
162 +}