Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/gamemode/, games-util/gamemode/files/
Date: Sat, 06 Aug 2022 13:51:06
Message-Id: 1659793810.cf99a44f45292fe71d7f96af3e8abd9755a7f86d.chewi@gentoo
1 commit: cf99a44f45292fe71d7f96af3e8abd9755a7f86d
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 6 13:50:06 2022 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 6 13:50:10 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf99a44f
7
8 games-util/gamemode: Bump to 1.7, don't install static lib, EAPI 8
9
10 Closes: https://bugs.gentoo.org/745096
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 games-util/gamemode/Manifest | 1 +
14 .../gamemode/files/gamemode-1.7-static-libs.patch | 29 ++++++++++++++++++++++
15 .../{gamemode-9999.ebuild => gamemode-1.7.ebuild} | 27 ++++++++++----------
16 games-util/gamemode/gamemode-9999.ebuild | 28 ++++++++++-----------
17 4 files changed, 57 insertions(+), 28 deletions(-)
18
19 diff --git a/games-util/gamemode/Manifest b/games-util/gamemode/Manifest
20 index 82d722917814..a38ad2d24ca7 100644
21 --- a/games-util/gamemode/Manifest
22 +++ b/games-util/gamemode/Manifest
23 @@ -1 +1,2 @@
24 DIST gamemode-1.6.1.tar.xz 71224 BLAKE2B aafa3123a2c672197d28fafbc7331004b6e4c87808e831f5e0341fd9a690acda8305da114651391fe39e6702bac805cede9d696280d03d4cc3d03d6f4d782efd SHA512 99403a68675522d3b412424591ab7f0cef54968a699f8f68aa59a42a43df73db4bc8a84ee8f97b9f78f329ecd1ed2f3a50e3cb539458f23e7c5fbe28f7978e47
25 +DIST gamemode-1.7.tar.xz 73264 BLAKE2B 81957a1989cf49532b0d80fc9b96a75d8205e7f148125309f3cae601f6fe125e8d839d4b92bea418a229a6e2658eaa55db2b3bbdb5e7efb26d278e2b22ab8269 SHA512 1fc91367af37d18e0042831b377cafec122c603ab699ecc314b0ded11410aab1bd739712e7305e497796fda25bee88d34438d5f3751595bf579dcbeb7335d15b
26
27 diff --git a/games-util/gamemode/files/gamemode-1.7-static-libs.patch b/games-util/gamemode/files/gamemode-1.7-static-libs.patch
28 new file mode 100644
29 index 000000000000..89fd0ba3d70a
30 --- /dev/null
31 +++ b/games-util/gamemode/files/gamemode-1.7-static-libs.patch
32 @@ -0,0 +1,29 @@
33 +From d339709cc42fe0b78b881d760003845010f5a7c1 Mon Sep 17 00:00:00 2001
34 +From: James Le Cuirot <chewi@g.o>
35 +Date: Sat, 6 Aug 2022 14:42:27 +0100
36 +Subject: [PATCH] Don't force installation of static libgamemodeauto
37 +
38 +Defining the library with `library` rather than `both_libraries` allows the user
39 +to choose which type they want to install using `-Ddefault_library`.
40 +
41 +Closes: https://github.com/FeralInteractive/gamemode/issues/287
42 +---
43 + lib/meson.build | 2 +-
44 + 1 file changed, 1 insertion(+), 1 deletion(-)
45 +
46 +diff --git a/lib/meson.build b/lib/meson.build
47 +index e810509..7cdcf8a 100644
48 +--- a/lib/meson.build
49 ++++ b/lib/meson.build
50 +@@ -25,7 +25,7 @@ gamemode_headers_includes = [
51 + ]
52 +
53 + # Small library to automatically use gamemode
54 +-libgamemodeauto = both_libraries(
55 ++libgamemodeauto = library(
56 + 'gamemodeauto',
57 + sources: [
58 + 'client_loader.c',
59 +--
60 +2.35.1
61 +
62
63 diff --git a/games-util/gamemode/gamemode-9999.ebuild b/games-util/gamemode/gamemode-1.7.ebuild
64 similarity index 93%
65 copy from games-util/gamemode/gamemode-9999.ebuild
66 copy to games-util/gamemode/gamemode-1.7.ebuild
67 index 1c2a2df1c374..8e94f8d83a95 100644
68 --- a/games-util/gamemode/gamemode-9999.ebuild
69 +++ b/games-util/gamemode/gamemode-1.7.ebuild
70 @@ -1,7 +1,7 @@
71 -# Copyright 2021 Gentoo Authors
72 +# Copyright 2022 Gentoo Authors
73 # Distributed under the terms of the GNU General Public License v2
74
75 -EAPI=7
76 +EAPI=8
77
78 MULTILIB_COMPAT=( abi_x86_{32,64} )
79
80 @@ -35,6 +35,10 @@ RDEPEND="
81 "
82 DEPEND="${RDEPEND}"
83
84 +PATCHES=(
85 + "${FILESDIR}"/${PN}-1.7-static-libs.patch
86 +)
87 +
88 DOCS=(
89 CHANGELOG.md
90 LICENSE.txt
91 @@ -76,28 +80,23 @@ pkg_pretend() {
92
93 multilib_src_configure() {
94 local emesonargs=(
95 - -Dwith-sd-bus-provider=$(usex systemd "systemd" "elogind")
96 -Dwith-systemd-user-unit-dir="$(systemd_get_userunitdir)"
97 )
98 - if ! multilib_is_native_abi; then
99 + if multilib_is_native_abi; then
100 + emesonargs+=(
101 + -Dwith-sd-bus-provider=$(usex systemd systemd elogind)
102 + )
103 + else
104 emesonargs+=(
105 - -Dwith-examples=false
106 -Dwith-sd-bus-provider=no-daemon
107 + -Dwith-pam-group=gamemode
108 + -Dwith-examples=false
109 )
110 fi
111
112 meson_src_configure
113 }
114
115 -multilib_src_install_all() {
116 - if multilib_is_native_abi; then
117 - insinto /etc/security/limits.d
118 - newins - 45-gamemode.conf <<-EOF
119 - @gamemode - nice -10
120 - EOF
121 - fi
122 -}
123 -
124 pkg_postinst() {
125 elog
126 elog "GameMode has optional support for adjusting nice and ioprio of games"
127
128 diff --git a/games-util/gamemode/gamemode-9999.ebuild b/games-util/gamemode/gamemode-9999.ebuild
129 index 1c2a2df1c374..9490fc1e7b56 100644
130 --- a/games-util/gamemode/gamemode-9999.ebuild
131 +++ b/games-util/gamemode/gamemode-9999.ebuild
132 @@ -1,7 +1,7 @@
133 -# Copyright 2021 Gentoo Authors
134 +# Copyright 2022 Gentoo Authors
135 # Distributed under the terms of the GNU General Public License v2
136
137 -EAPI=7
138 +EAPI=8
139
140 MULTILIB_COMPAT=( abi_x86_{32,64} )
141
142 @@ -35,6 +35,10 @@ RDEPEND="
143 "
144 DEPEND="${RDEPEND}"
145
146 +PATCHES=(
147 + "${FILESDIR}"/${PN}-1.7-static-libs.patch
148 +)
149 +
150 DOCS=(
151 CHANGELOG.md
152 LICENSE.txt
153 @@ -76,28 +80,24 @@ pkg_pretend() {
154
155 multilib_src_configure() {
156 local emesonargs=(
157 - -Dwith-sd-bus-provider=$(usex systemd "systemd" "elogind")
158 -Dwith-systemd-user-unit-dir="$(systemd_get_userunitdir)"
159 + -Dwith-pam-limits-dir="${EPREFIX}"/etc/security/limits.d
160 )
161 - if ! multilib_is_native_abi; then
162 + if multilib_is_native_abi; then
163 + emesonargs+=(
164 + -Dwith-sd-bus-provider=$(usex systemd systemd elogind)
165 + )
166 + else
167 emesonargs+=(
168 - -Dwith-examples=false
169 -Dwith-sd-bus-provider=no-daemon
170 + -Dwith-pam-renicing=false
171 + -Dwith-examples=false
172 )
173 fi
174
175 meson_src_configure
176 }
177
178 -multilib_src_install_all() {
179 - if multilib_is_native_abi; then
180 - insinto /etc/security/limits.d
181 - newins - 45-gamemode.conf <<-EOF
182 - @gamemode - nice -10
183 - EOF
184 - fi
185 -}
186 -
187 pkg_postinst() {
188 elog
189 elog "GameMode has optional support for adjusting nice and ioprio of games"