commit:     cf99a44f45292fe71d7f96af3e8abd9755a7f86d
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  6 13:50:06 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Aug  6 13:50:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf99a44f

games-util/gamemode: Bump to 1.7, don't install static lib, EAPI 8

Closes: https://bugs.gentoo.org/745096
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/gamemode/Manifest                       |  1 +
 .../gamemode/files/gamemode-1.7-static-libs.patch  | 29 ++++++++++++++++++++++
 .../{gamemode-9999.ebuild => gamemode-1.7.ebuild}  | 27 ++++++++++----------
 games-util/gamemode/gamemode-9999.ebuild           | 28 ++++++++++-----------
 4 files changed, 57 insertions(+), 28 deletions(-)

diff --git a/games-util/gamemode/Manifest b/games-util/gamemode/Manifest
index 82d722917814..a38ad2d24ca7 100644
--- a/games-util/gamemode/Manifest
+++ b/games-util/gamemode/Manifest
@@ -1 +1,2 @@
 DIST gamemode-1.6.1.tar.xz 71224 BLAKE2B 
aafa3123a2c672197d28fafbc7331004b6e4c87808e831f5e0341fd9a690acda8305da114651391fe39e6702bac805cede9d696280d03d4cc3d03d6f4d782efd
 SHA512 
99403a68675522d3b412424591ab7f0cef54968a699f8f68aa59a42a43df73db4bc8a84ee8f97b9f78f329ecd1ed2f3a50e3cb539458f23e7c5fbe28f7978e47
+DIST gamemode-1.7.tar.xz 73264 BLAKE2B 
81957a1989cf49532b0d80fc9b96a75d8205e7f148125309f3cae601f6fe125e8d839d4b92bea418a229a6e2658eaa55db2b3bbdb5e7efb26d278e2b22ab8269
 SHA512 
1fc91367af37d18e0042831b377cafec122c603ab699ecc314b0ded11410aab1bd739712e7305e497796fda25bee88d34438d5f3751595bf579dcbeb7335d15b

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 <[email protected]>
+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-9999.ebuild 
b/games-util/gamemode/gamemode-1.7.ebuild
similarity index 93%
copy from games-util/gamemode/gamemode-9999.ebuild
copy to games-util/gamemode/gamemode-1.7.ebuild
index 1c2a2df1c374..8e94f8d83a95 100644
--- a/games-util/gamemode/gamemode-9999.ebuild
+++ b/games-util/gamemode/gamemode-1.7.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,23 @@ pkg_pretend() {
 
 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
+       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-group=gamemode
+                       -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"

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"

Reply via email to