forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-apps/irqbalance: Bump to version 1.2.0
Package-Manager: Portage-2.3.3, Repoman-2.3.1
- Loading branch information
Lars Wendler
committed
Mar 1, 2017
1 parent
c0bc857
commit 13b6f37
Showing
4 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 287d50594fe624bdb4400611d0dbecec6ff38a41 Mon Sep 17 00:00:00 2001 | ||
From: Lars Wendler <[email protected]> | ||
Date: Wed, 1 Mar 2017 17:11:42 +0100 | ||
Subject: [PATCH] Prefer pkgconfig to check for ncursesw. | ||
|
||
That way we take possible separate tinfo lib into account. | ||
--- | ||
configure.ac | 8 +++++++- | ||
1 file changed, 7 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index 17b879a..77d8aa4 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -26,7 +26,13 @@ AC_CHECK_FUNCS(getopt_long) | ||
AC_CHECK_LIB(numa, numa_available) | ||
AC_CHECK_LIB(m, floor) | ||
|
||
-AC_CHECK_LIB(curses, mvprintw) | ||
+PKG_CHECK_MODULES([NCURSESW], [ncursesw], [has_ncursesw=yes], [AC_CHECK_LIB(curses, mvprintw)]) | ||
+AS_IF([test "x$has_ncursesw" = "xyes"], [ | ||
+ AC_SUBST([NCURSESW_CFLAGS]) | ||
+ AC_SUBST([NCURSESW_LIBS]) | ||
+ LIBS="$LIBS $NCURSESW_LIBS" | ||
+ AC_SUBST([LIBS]) | ||
+]) | ||
|
||
AC_C_CONST | ||
AC_C_INLINE | ||
-- | ||
2.12.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License, v2 or later | ||
|
||
depend() { | ||
need localmount | ||
after bootmisc | ||
} | ||
|
||
command="/usr/sbin/irqbalance" | ||
command_args="${IRQBALANCE_OPTS}" | ||
|
||
start_pre() { | ||
if grep -q MSI /proc/interrupts 2>/dev/null && \ | ||
test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then | ||
eerror "MSI interrupts found in /proc/interrupts but none found in sysfs." | ||
eerror "You need to update your kernel." | ||
return 1 | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
AUTOTOOLS_AUTORECONF=true | ||
|
||
inherit autotools-utils systemd linux-info | ||
|
||
DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system" | ||
HOMEPAGE="https://github.com/Irqbalance/irqbalance" | ||
SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~ppc ~x86" | ||
IUSE="caps +numa selinux" | ||
|
||
CDEPEND=" | ||
dev-libs/glib:2 | ||
sys-libs/ncurses:0=[unicode] | ||
caps? ( sys-libs/libcap-ng ) | ||
numa? ( sys-process/numactl ) | ||
" | ||
DEPEND="${CDEPEND} | ||
virtual/pkgconfig | ||
" | ||
RDEPEND="${CDEPEND} | ||
selinux? ( sec-policy/selinux-irqbalance ) | ||
" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${P}-tinfo.patch" | ||
) | ||
|
||
pkg_setup() { | ||
CONFIG_CHECK="~PCI_MSI" | ||
linux-info_pkg_setup | ||
} | ||
|
||
src_prepare() { | ||
# Follow systemd policies | ||
# https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy | ||
sed \ | ||
-e 's/ $IRQBALANCE_ARGS//' \ | ||
-e '/EnvironmentFile/d' \ | ||
-i misc/irqbalance.service || die | ||
autotools-utils_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local myeconfargs=( | ||
$(use_with caps libcap-ng) | ||
$(use_enable numa) | ||
) | ||
autotools-utils_src_configure | ||
} | ||
|
||
src_install() { | ||
autotools-utils_src_install | ||
newinitd "${FILESDIR}"/irqbalance.init.4 irqbalance | ||
newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance | ||
systemd_dounit misc/irqbalance.service | ||
} |