From f70a1bfc721336d4fc7dfb711c2f518a6b18cf16 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 30 Sep 2020 17:27:54 +0100 Subject: gentoo resync : 30.09.2020 --- games-util/gamemode/Manifest | 6 +- games-util/gamemode/gamemode-1.2.ebuild | 105 ------------------------ games-util/gamemode/gamemode-1.6.ebuild | 132 +++++++++++++++++++++++++++++++ games-util/gamemode/gamemode-9999.ebuild | 63 ++++++++++----- 4 files changed, 180 insertions(+), 126 deletions(-) delete mode 100644 games-util/gamemode/gamemode-1.2.ebuild create mode 100644 games-util/gamemode/gamemode-1.6.ebuild (limited to 'games-util/gamemode') diff --git a/games-util/gamemode/Manifest b/games-util/gamemode/Manifest index ee24a8ec482b..cd9734955296 100644 --- a/games-util/gamemode/Manifest +++ b/games-util/gamemode/Manifest @@ -1,4 +1,4 @@ -DIST gamemode-1.2.tar.xz 38536 BLAKE2B af39b8c0585c522afa72238b8332a6a5301d36b3c53e50652a78c41788eae9f5cb319cad06eaf6f345c50f934e188df4c78d70efbad919dd6897d3350d14e568 SHA512 233602e5e93b6cfcc742510dafb00dc826000d0c8618a693e9a579dc3b31c546d22c0545084cfb78c6085226e6b0e26c066078bc1871d36d5fb90828cf63cea9 -EBUILD gamemode-1.2.ebuild 3297 BLAKE2B 083dfd5cb67d5b855c0992cf302643b585cf1e2cb7a3ab05dd3626e61b0371572fcdc4f655881752655d8f5a6248e2dcf421600c3285dbfc2f9a892ef6923a6d SHA512 619065fdc7332b2b202e6298769edef14b596a94ba25981488efa585380262c684b48877eeb3fe45fc3a601d0c6c4b82c772b3e9d4f1d19a18ec40c01aee1093 -EBUILD gamemode-9999.ebuild 3297 BLAKE2B 083dfd5cb67d5b855c0992cf302643b585cf1e2cb7a3ab05dd3626e61b0371572fcdc4f655881752655d8f5a6248e2dcf421600c3285dbfc2f9a892ef6923a6d SHA512 619065fdc7332b2b202e6298769edef14b596a94ba25981488efa585380262c684b48877eeb3fe45fc3a601d0c6c4b82c772b3e9d4f1d19a18ec40c01aee1093 +DIST gamemode-1.6.tar.xz 69916 BLAKE2B 2fbb680de4043a004a91005647208fd9ca25de250bffe97acc0cabea47dba90d1ef670478582203d616704ea1f5a771115aadef4971e1e41f078104116b08cc4 SHA512 7cb4f4dd51b35e3a0164092342be56ce70bf1a81a8ff071725b429378cf92a100e263bc33890d5f5e281ad87fb72e2f820cb716c5aedf14f387610dcb59eb690 +EBUILD gamemode-1.6.ebuild 4081 BLAKE2B 523fc99e01e1aebcad288dd512bea3cc36ee1f3e9befba642a6765061040e39f3a50bf3407c56b15fe38d0695a976830492ec8e70a44f5efaa7db60bb379a15b SHA512 ff3cd661e6c685d7187128f5e4d5f78622ce4f4b37665d348f07dd11264711ab9f55e398ba75784c616e72372e28e7f744b41064ed50fde78044bfbc425571be +EBUILD gamemode-9999.ebuild 4081 BLAKE2B 523fc99e01e1aebcad288dd512bea3cc36ee1f3e9befba642a6765061040e39f3a50bf3407c56b15fe38d0695a976830492ec8e70a44f5efaa7db60bb379a15b SHA512 ff3cd661e6c685d7187128f5e4d5f78622ce4f4b37665d348f07dd11264711ab9f55e398ba75784c616e72372e28e7f744b41064ed50fde78044bfbc425571be MISC metadata.xml 530 BLAKE2B 14e10e8800bca7ad7e412916ee250a4c9dbc5ed78feb99fbb9ec1feb6cc60cbf96494676eaf48200781f9e25bd330d97e16e7cbd46120df79a3e7affb8361d7e SHA512 6a080b2ec0af531ef9c5d989927a2bef7dd8870c27a5edccc9e61bc9c35cb8bc11c1b781aa003dbca470a2c8172b10f5317be6cca6c6d3d6bef206e91fe7e75c diff --git a/games-util/gamemode/gamemode-1.2.ebuild b/games-util/gamemode/gamemode-1.2.ebuild deleted file mode 100644 index 45b778ba90e2..000000000000 --- a/games-util/gamemode/gamemode-1.2.ebuild +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -MULTILIB_COMPAT=( abi_x86_{32,64} ) - -inherit meson multilib-minimal ninja-utils user - -DESCRIPTION="Optimise Linux system performance on demand" -HOMEPAGE="https://github.com/FeralInteractive/gamemode" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/FeralInteractive/gamemode.git" - GAMEMODE_GIT_PTR="master" - inherit git-r3 -else - GAMEMODE_GIT_PTR="${PV}" - SRC_URI="https://github.com/FeralInteractive/gamemode/releases/download/${GAMEMODE_GIT_PTR}/${P}.tar.xz" - KEYWORDS="~amd64 ~x86" -fi - -LICENSE="BSD" -SLOT="0" -IUSE="" - -RDEPEND=" - >=sys-apps/systemd-236[${MULTILIB_USEDEP}] - sys-auth/polkit -" -DEPEND="${RDEPEND}" - -pkg_pretend() { - elog - elog "GameMode needs a kernel capable of SCHED_ISO to use its soft realtime" - elog "feature. Examples of kernels providing that are sys-kernel/ck-source" - elog "and sys-kernel/pf-sources." - elog - elog "Support for soft realtime is completely optional. It may provide the" - elog "following benefits with systems having at least four CPU cores:" - elog - elog " * more CPU shares allocated exclusively to the game" - elog " * reduced input lag and reduced thread latency" - elog " * more consistent frame times resulting in less microstutters" - elog - elog "You probably won't benefit from soft realtime mode and thus don't need" - elog "SCHED_ISO if:" - elog - elog " * Your CPU has less than four cores because the game may experience" - elog " priority inversion with the graphics driver (thus heuristics" - elog " automatically disable SCHED_ISO usage then)" - elog " * Your game uses busy-loops to interface with the graphics driver" - elog " but you may still force SCHED_ISO per configuation file, YMMV," - elog " it depends on the graphics driver implementation, i.e. usage of" - elog " __GL_THREADED_OPTIMIZATIONS or similar." - elog " * If your game causes more than 70% CPU usage across all cores," - elog " SCHED_ISO automatically turns off and on depending on usage and" - elog " is processed with higher-than-normal priority then (renice)." - elog " This auto-switching may result in a lesser game experience." - elog - elog "For more info look at:" - elog "https://github.com/FeralInteractive/gamemode/blob/${GAMEMODE_GIT_PTR}/README.md" - elog -} - -multilib_src_configure() { - local myconf=() - if ! multilib_is_native_abi; then - myconf+=( - -Dwith-examples=false - -Dwith-daemon=false - ) - fi - meson_src_configure "${myconf[@]}" -} - -multilib_src_compile() { - eninja -} - -multilib_src_install() { - DESTDIR="${D}" eninja install - if multilib_is_native_abi; then - insinto /etc/security/limits.d - newins - 45-gamemode.conf <<-EOF - @gamemode - nice -10 - EOF - fi -} - -pkg_postinst() { - enewgroup gamemode - - elog - elog "GameMode can renice your games. You need to be in the gamemode group for this to work." - 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 -} diff --git a/games-util/gamemode/gamemode-1.6.ebuild b/games-util/gamemode/gamemode-1.6.ebuild new file mode 100644 index 000000000000..b84faf4b7183 --- /dev/null +++ b/games-util/gamemode/gamemode-1.6.ebuild @@ -0,0 +1,132 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) + +inherit meson multilib-minimal ninja-utils systemd + +DESCRIPTION="Optimise Linux system performance on demand" +HOMEPAGE="https://github.com/FeralInteractive/gamemode" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/FeralInteractive/gamemode.git" + GAMEMODE_GIT_PTR="master" + inherit git-r3 +else + GAMEMODE_GIT_PTR="${PV}" + SRC_URI="https://github.com/FeralInteractive/gamemode/releases/download/${GAMEMODE_GIT_PTR}/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="systemd elogind" + +REQUIRED_USE="^^ ( systemd elogind )" + +RDEPEND=" + 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" + elog "feature. Examples of kernels providing that are sys-kernel/ck-sources" + elog "and sys-kernel/pf-sources." + elog + elog "Support for soft realtime is completely optional. It may provide the" + elog "following benefits with systems having at least four CPU cores:" + elog + elog " * more CPU shares allocated exclusively to the game" + elog " * reduced input lag and reduced thread latency" + elog " * more consistent frame times resulting in less microstutters" + elog + elog "You probably won't benefit from soft realtime mode and thus don't need" + elog "SCHED_ISO if:" + elog + elog " * Your CPU has less than four cores because the game may experience" + elog " priority inversion with the graphics driver (thus heuristics" + elog " automatically disable SCHED_ISO usage then)" + elog " * Your game uses busy-loops to interface with the graphics driver" + elog " but you may still force SCHED_ISO per configuation file, YMMV," + elog " it depends on the graphics driver implementation, i.e. usage of" + elog " __GL_THREADED_OPTIMIZATIONS or similar." + elog " * If your game causes more than 70% CPU usage across all cores," + elog " SCHED_ISO automatically turns off and on depending on usage and" + elog " is processed with higher-than-normal priority then (renice)." + elog " This auto-switching may result in a lesser game experience." + elog + elog "For more info look at:" + elog "https://github.com/FeralInteractive/gamemode/blob/${GAMEMODE_GIT_PTR}/README.md" + elog +} + +multilib_src_configure() { + local emesonargs=( + -Dwith-sd-bus-provider=$(usex systemd "systemd" "elogind") + -Dwith-systemd-user-unit-dir="$(systemd_get_userunitdir)" + ) + if ! multilib_is_native_abi; then + emesonargs+=( + -Dwith-examples=false + -Dwith-sd-bus-provider=no-daemon + ) + fi + + meson_src_configure +} + +multilib_src_compile() { + eninja +} + +multilib_src_install() { + DESTDIR="${D}" eninja install + if multilib_is_native_abi; then + insinto /etc/security/limits.d + newins - 45-gamemode.conf <<-EOF + @gamemode - nice -10 + EOF + fi +} + +pkg_postinst() { + elog + 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 "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 +} diff --git a/games-util/gamemode/gamemode-9999.ebuild b/games-util/gamemode/gamemode-9999.ebuild index 45b778ba90e2..b84faf4b7183 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,18 +22,30 @@ 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" - elog "feature. Examples of kernels providing that are sys-kernel/ck-source" + elog "feature. Examples of kernels providing that are sys-kernel/ck-sources" elog "and sys-kernel/pf-sources." elog elog "Support for soft realtime is completely optional. It may provide the" @@ -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 } -- cgit v1.2.3