commit:     3949027c0bf2c8ca374179c9ec32302ca10b1962
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 13:00:06 2022 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 13:00:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3949027c

sys-power/switcheroo-control: add 2.6

Closes: https://bugs.gentoo.org/834963
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 sys-power/switcheroo-control/Manifest              |  1 +
 .../switcheroo-control-2.6.ebuild                  | 53 ++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/sys-power/switcheroo-control/Manifest 
b/sys-power/switcheroo-control/Manifest
index e6b1cd94e504..0df8a9135e34 100644
--- a/sys-power/switcheroo-control/Manifest
+++ b/sys-power/switcheroo-control/Manifest
@@ -1 +1,2 @@
 DIST switcheroo-control-2.4.tar.xz 27964 BLAKE2B 
f85014ad6696e301bafd75b694f5c130498171d95b0330d2996568737cbcd677eef5256bc47638bf87d178d6fe099f3c53bd710a1534db20f1dbe5fbe51681c7
 SHA512 
47f071b17cbb520d862800ef2d8389ada1130be96a8c1efed9be6793081b5826355ad30b0feeba1cc9eda792b4c943ffc852d12648b0c5e74f25c207d151c1c3
+DIST switcheroo-control-2.6.tar.xz 29996 BLAKE2B 
98204a1d0f3b92cc2b98ad9f382313aed4da5877ac6be607c48ee9386bd25087301e249907a7e1385eea357f0a3ce5fb2936fac688923dfa3555a9870f0d2e58
 SHA512 
ac8867a839ae958676f5c5c7bb4c25cbbcf70eb35a696bb3d80b388c31a9722e75311c041c4c60b8f1d00f405af97dd9173e99780a2be3c621ac759c4986a2d2

diff --git a/sys-power/switcheroo-control/switcheroo-control-2.6.ebuild 
b/sys-power/switcheroo-control/switcheroo-control-2.6.ebuild
new file mode 100644
index 000000000000..93e64ab5b467
--- /dev/null
+++ b/sys-power/switcheroo-control/switcheroo-control-2.6.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit meson python-any-r1
+
+DESCRIPTION="D-Bus service to check the availability of dual-GPU"
+HOMEPAGE="https://gitlab.freedesktop.org/hadess/switcheroo-control/";
+SRC_URI="https://gitlab.freedesktop.org/hadess/switcheroo-control/uploads/86ea54ac7ddb901b6bf6e915209151f8/${P}.tar.xz";
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="gtk-doc test"
+
+KEYWORDS="~amd64"
+
+RDEPEND="
+       >=dev-libs/glib-2.56.0:2
+       >=dev-libs/libgudev-232:=
+       sys-apps/systemd
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       gtk-doc? ( dev-util/gtk-doc )
+       test? (
+               $(python_gen_any_dep 
'dev-python/python-dbusmock[${PYTHON_USEDEP}]')
+               dev-util/umockdev
+       )
+"
+
+RESTRICT="!test? ( test )"
+
+python_check_deps() {
+       use test || return 0
+       has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+       local emesonargs=(
+               $(meson_use gtk-doc gtk_doc)
+               $(meson_use test tests)
+       )
+       meson_src_configure
+}
+
+pkg_postinst() {
+       if [[ -z "${REPLACING_VERSIONS}" ]]; then
+               elog "You need to run systemd and enable the service:"
+               elog "# systemctl enable switcheroo-control"
+       fi
+}

Reply via email to