diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-06 20:10:31 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-06 20:10:31 +0100 |
commit | 944b3df0f275eea0fd7808913d72a0b280df0c33 (patch) | |
tree | ec33697fafd5ce7028b7619baef7a6d27bb74362 /games-util/gamemode | |
parent | 7e17b5aabc330abb894f2b90bef0e3fcbcd180d2 (diff) |
gentoo auto-resync : 06:08:2022 - 20:10:30
Diffstat (limited to 'games-util/gamemode')
-rw-r--r-- | games-util/gamemode/Manifest | 5 | ||||
-rw-r--r-- | games-util/gamemode/files/gamemode-1.7-static-libs.patch | 29 | ||||
-rw-r--r-- | games-util/gamemode/gamemode-1.7.ebuild | 125 | ||||
-rw-r--r-- | games-util/gamemode/gamemode-9999.ebuild | 28 |
4 files changed, 172 insertions, 15 deletions
diff --git a/games-util/gamemode/Manifest b/games-util/gamemode/Manifest index 0873559efbcf..d9a3ecb792fd 100644 --- a/games-util/gamemode/Manifest +++ b/games-util/gamemode/Manifest @@ -1,5 +1,8 @@ AUX gamemode-1.6.1-signal_h-musl.patch 1401 BLAKE2B 5bb5ad906fdb2b08aff804986c97396f1886009ce6603ffc9fdeaac4c4470f0937cc4abda04e084ccdd1245e942d456c1efc98a7a8e7ab6914d2ef1ff9d97fe9 SHA512 0c0059c8e19b564e6228def6485522e66338e23ecd981644e72f92a5e5962d269235d92606ef13680820fce389552e6a23ba93fc9126c794d5da7fee0b670013 +AUX gamemode-1.7-static-libs.patch 870 BLAKE2B 25e49df2e018403e8913c263f133140f918ee125b95c8cb3aec748b879bea8c9fb2aa894e0aeff9db44dc026d53044597dfc34f3ce98d7bf3fca690f9fb79937 SHA512 797910ce125eb3626c991af636eba696e30f140b7caf8073b03289e894e31e6db18b41e492b5c3d54a07ff5358c43e81a6502ff1b0a1bb5bf594d9e42ac2a2ad DIST gamemode-1.6.1.tar.xz 71224 BLAKE2B aafa3123a2c672197d28fafbc7331004b6e4c87808e831f5e0341fd9a690acda8305da114651391fe39e6702bac805cede9d696280d03d4cc3d03d6f4d782efd SHA512 99403a68675522d3b412424591ab7f0cef54968a699f8f68aa59a42a43df73db4bc8a84ee8f97b9f78f329ecd1ed2f3a50e3cb539458f23e7c5fbe28f7978e47 +DIST gamemode-1.7.tar.xz 73264 BLAKE2B 81957a1989cf49532b0d80fc9b96a75d8205e7f148125309f3cae601f6fe125e8d839d4b92bea418a229a6e2658eaa55db2b3bbdb5e7efb26d278e2b22ab8269 SHA512 1fc91367af37d18e0042831b377cafec122c603ab699ecc314b0ded11410aab1bd739712e7305e497796fda25bee88d34438d5f3751595bf579dcbeb7335d15b EBUILD gamemode-1.6.1.ebuild 4027 BLAKE2B 9518f7a6b66a6f7f18cfb2a4e9795c148ee1c1da01c14210b2ad590b066bef1ce5c003f82b52d49035682de18022f1fcb9c0c0ef0f188c92bef4ab43e3841d25 SHA512 36e4e09521633239399131640e6f87e0f387073a36284ac79d6bb69ce578f132937c08cad7c48afa782c3b2427cfce539a37dac4fd7387e2876d18b77099d39b -EBUILD gamemode-9999.ebuild 3968 BLAKE2B 33ec5cfbbecf4efd06696a6401fc87549cb9a12e796555647754148c50091a2beebebe70d257489f2991339a8da39799d628571668a2488fecae0f48f7399aaf SHA512 76b58596849cbafc891881c6d439b3e707db7e09baf76662dec59cda397666632f7621324d8e6d87638088a5d1412df2f654d6aeed35d8806a6a347df6f6701f +EBUILD gamemode-1.7.ebuild 3907 BLAKE2B 2f61f856685d795f3499f1b903cab5249aa3cdea894fd4ffbeb502f2261971c857c4a2ffe6aa878818d003d5ff8c51d4e050b7ba25e5a3b92626004a2229729f SHA512 5c07fc775b33c6d5aa5de50c3e00b53cd801f09b981e954f818e7c98950c049b8eb0e15829ac69b96952fcf6a9ddce6fa091fd0abd91a5453936e7726b46706b +EBUILD gamemode-9999.ebuild 3966 BLAKE2B 8a049f4e1ea41405e9c8aed21ab857cee5776cd3723e1c35180a4f62accd159a933714f6c12909d66aa23b04c18219700b6bac4f7289db5a2110cacc0fe0228d SHA512 cbb339295cf464bd05b28fa1942e3e373321bc2ac6f072eb7ad078df8a907cff8a5130fbda55512e4959447a0457ad38102e90387af04f245edd9eea6fa9d3e8 MISC metadata.xml 561 BLAKE2B c4e2e040e853956f7c587f9933a6791d1742027d9291512c1073fb143b315056cd1c173c517213d62a2169149ae9079fed014c54d2bfff81d946f2c7987511c9 SHA512 a1020dc2ae103ef138f6de356fbc47772bf7ab256d4dfe3cad2880b49b7cffdb9894fc2d40f9996bb64a5c88b00779584b8e6976338f9c9f4d835ea15d0460f8 diff --git a/games-util/gamemode/files/gamemode-1.7-static-libs.patch b/games-util/gamemode/files/gamemode-1.7-static-libs.patch new file mode 100644 index 000000000000..89fd0ba3d70a --- /dev/null +++ b/games-util/gamemode/files/gamemode-1.7-static-libs.patch @@ -0,0 +1,29 @@ +From d339709cc42fe0b78b881d760003845010f5a7c1 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sat, 6 Aug 2022 14:42:27 +0100 +Subject: [PATCH] Don't force installation of static libgamemodeauto + +Defining the library with `library` rather than `both_libraries` allows the user +to choose which type they want to install using `-Ddefault_library`. + +Closes: https://github.com/FeralInteractive/gamemode/issues/287 +--- + lib/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/meson.build b/lib/meson.build +index e810509..7cdcf8a 100644 +--- a/lib/meson.build ++++ b/lib/meson.build +@@ -25,7 +25,7 @@ gamemode_headers_includes = [ + ] + + # Small library to automatically use gamemode +-libgamemodeauto = both_libraries( ++libgamemodeauto = library( + 'gamemodeauto', + sources: [ + 'client_loader.c', +-- +2.35.1 + diff --git a/games-util/gamemode/gamemode-1.7.ebuild b/games-util/gamemode/gamemode-1.7.ebuild new file mode 100644 index 000000000000..8e94f8d83a95 --- /dev/null +++ b/games-util/gamemode/gamemode-1.7.ebuild @@ -0,0 +1,125 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) + +inherit meson-multilib 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-53 + sys-apps/dbus[${MULTILIB_USEDEP},systemd(+)=,elogind(-)=] + sys-auth/polkit + sys-libs/libcap +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.7-static-libs.patch +) + +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. Example of a kernel providing that is 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-systemd-user-unit-dir="$(systemd_get_userunitdir)" + ) + if multilib_is_native_abi; then + emesonargs+=( + -Dwith-sd-bus-provider=$(usex systemd systemd elogind) + ) + else + emesonargs+=( + -Dwith-sd-bus-provider=no-daemon + -Dwith-pam-group=gamemode + -Dwith-examples=false + ) + fi + + meson_src_configure +} + +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 1c2a2df1c374..9490fc1e7b56 100644 --- a/games-util/gamemode/gamemode-9999.ebuild +++ b/games-util/gamemode/gamemode-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 2021 Gentoo Authors +# Copyright 2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 MULTILIB_COMPAT=( abi_x86_{32,64} ) @@ -35,6 +35,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.7-static-libs.patch +) + DOCS=( CHANGELOG.md LICENSE.txt @@ -76,28 +80,24 @@ pkg_pretend() { multilib_src_configure() { local emesonargs=( - -Dwith-sd-bus-provider=$(usex systemd "systemd" "elogind") -Dwith-systemd-user-unit-dir="$(systemd_get_userunitdir)" + -Dwith-pam-limits-dir="${EPREFIX}"/etc/security/limits.d ) - if ! multilib_is_native_abi; then + if multilib_is_native_abi; then + emesonargs+=( + -Dwith-sd-bus-provider=$(usex systemd systemd elogind) + ) + else emesonargs+=( - -Dwith-examples=false -Dwith-sd-bus-provider=no-daemon + -Dwith-pam-renicing=false + -Dwith-examples=false ) fi meson_src_configure } -multilib_src_install_all() { - 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" |