summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Krakow <kai@kaishome.de>2020-09-20 13:10:11 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-09-28 14:32:58 +0300
commit8aecc9b9d855f27f70c12e103e62aa228a423783 (patch)
tree7ebee2da73a4f439040503b9c1c67eeb7e6f32b4 /games-util/gamemode
parentacct-group/gamemode: New group (diff)
downloadgentoo-8aecc9b9d855f27f70c12e103e62aa228a423783.tar.gz
gentoo-8aecc9b9d855f27f70c12e103e62aa228a423783.tar.bz2
gentoo-8aecc9b9d855f27f70c12e103e62aa228a423783.zip
games-util/gamemode: Update 9999 ebuild
This updates the 9999 version to reflect the changes from upstream. This also hacks around a header problem in multilib and removes the hard dependency on systemd. Closes: https://bugs.gentoo.org/722884 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Kai Krakow <kai@kaishome.de> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'games-util/gamemode')
-rw-r--r--games-util/gamemode/gamemode-9999.ebuild61
1 files changed, 44 insertions, 17 deletions
diff --git a/games-util/gamemode/gamemode-9999.ebuild b/games-util/gamemode/gamemode-9999.ebuild
index 45b778ba90e2..0af83005b8c1 100644
--- a/games-util/gamemode/gamemode-9999.ebuild
+++ b/games-util/gamemode/gamemode-9999.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit meson multilib-minimal ninja-utils user
+inherit meson multilib-minimal ninja-utils systemd
DESCRIPTION="Optimise Linux system performance on demand"
HOMEPAGE="https://github.com/FeralInteractive/gamemode"
@@ -22,14 +22,26 @@ fi
LICENSE="BSD"
SLOT="0"
-IUSE=""
+IUSE="systemd elogind"
+
+REQUIRED_USE="^^ ( systemd elogind )"
RDEPEND="
- >=sys-apps/systemd-236[${MULTILIB_USEDEP}]
+ acct-group/gamemode
+ dev-libs/inih
+ sys-apps/dbus[${MULTILIB_USEDEP},systemd(+)=,elogind(-)=]
sys-auth/polkit
+ sys-libs/libcap
"
DEPEND="${RDEPEND}"
+DOCS=(
+ CHANGELOG.md
+ LICENSE.txt
+ README.md
+ example/gamemode.ini
+)
+
pkg_pretend() {
elog
elog "GameMode needs a kernel capable of SCHED_ISO to use its soft realtime"
@@ -64,14 +76,18 @@ pkg_pretend() {
}
multilib_src_configure() {
- local myconf=()
+ local emesonargs=(
+ -Dwith-sd-bus-provider=$(usex systemd "systemd" "elogind")
+ -Dwith-systemd-user-unit-dir="$(systemd_get_userunitdir)"
+ )
if ! multilib_is_native_abi; then
- myconf+=(
+ emesonargs+=(
-Dwith-examples=false
- -Dwith-daemon=false
+ -Dwith-sd-bus-provider=no-daemon
)
fi
- meson_src_configure "${myconf[@]}"
+
+ meson_src_configure
}
multilib_src_compile() {
@@ -89,17 +105,28 @@ multilib_src_install() {
}
pkg_postinst() {
- enewgroup gamemode
-
elog
- elog "GameMode can renice your games. You need to be in the gamemode group for this to work."
+ elog "GameMode has optional support for adjusting nice and ioprio of games"
+ elog "running with it. You may need to adjust your PAM limits to make use"
+ elog "of this. You need to be in the gamemode group for this to work."
+ elog
elog "Run the following command as root to add your user:"
elog "# gpasswd -a USER gamemode # with USER = your user name"
elog
-
- elog "Enable and start the daemon in your systemd user instance, then add"
- elog "LD_PRELOAD=\$LD_PRELOAD:/usr/\$LIB/libgamemodeauto.so %command%"
- elog "to the start options of any steam game to enable the performance"
- elog "governor as you start the game."
+ elog "You can run the following command to test your settings:"
+ elog
+ elog "# gamemoded -t"
+ elog
+ elog "GameMode supports GPU optimizations. It defaults to OFF. Any"
+ elog "damage resulting from usage of this is your own responsibility."
+ elog
+ elog "systemd user sessions will automatically run the daemon on demand,"
+ elog "it does not need to be enabled explicitly. Games not supporting"
+ elog "GameMode natively can still make use of it, just add"
+ elog
+ elog "gamemoderun %command%"
+ elog
+ elog "to the start options of any steam game to enable optimizations"
+ elog "automatically as you start the game."
elog
}