diff options
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/Manifest.gz | bin | 5073 -> 5070 bytes | |||
-rw-r--r-- | sys-power/switcheroo-control/Manifest | 6 | ||||
-rw-r--r-- | sys-power/switcheroo-control/files/switcheroo-control-init.d | 12 | ||||
-rw-r--r-- | sys-power/switcheroo-control/metadata.xml | 3 | ||||
-rw-r--r-- | sys-power/switcheroo-control/switcheroo-control-2.4.ebuild | 42 | ||||
-rw-r--r-- | sys-power/switcheroo-control/switcheroo-control-2.6-r1.ebuild | 63 |
6 files changed, 81 insertions, 45 deletions
diff --git a/sys-power/Manifest.gz b/sys-power/Manifest.gz Binary files differindex 73acb09882e5..14813c8b1b6d 100644 --- a/sys-power/Manifest.gz +++ b/sys-power/Manifest.gz diff --git a/sys-power/switcheroo-control/Manifest b/sys-power/switcheroo-control/Manifest index c66c69f6442e..cf21e1239dab 100644 --- a/sys-power/switcheroo-control/Manifest +++ b/sys-power/switcheroo-control/Manifest @@ -1,5 +1,5 @@ -DIST switcheroo-control-2.4.tar.xz 27964 BLAKE2B f85014ad6696e301bafd75b694f5c130498171d95b0330d2996568737cbcd677eef5256bc47638bf87d178d6fe099f3c53bd710a1534db20f1dbe5fbe51681c7 SHA512 47f071b17cbb520d862800ef2d8389ada1130be96a8c1efed9be6793081b5826355ad30b0feeba1cc9eda792b4c943ffc852d12648b0c5e74f25c207d151c1c3 +AUX switcheroo-control-init.d 240 BLAKE2B 00fd91de3da9e59fdf0f073a3a9f89ac6fee9cbc9941da2b44be62c0eca79562b3a9cb123ef86237d3be25f1c5ce3f293fb4814e023da110bb7faae0218c7037 SHA512 0f70d93839d68f09b07d96ae397e41d086500c55cca358125002991280bcd6471e5870ba2a8f696201deaee3403093156ae123804fd9649483cfd5655f887299 DIST switcheroo-control-2.6.tar.xz 29996 BLAKE2B 98204a1d0f3b92cc2b98ad9f382313aed4da5877ac6be607c48ee9386bd25087301e249907a7e1385eea357f0a3ce5fb2936fac688923dfa3555a9870f0d2e58 SHA512 ac8867a839ae958676f5c5c7bb4c25cbbcf70eb35a696bb3d80b388c31a9722e75311c041c4c60b8f1d00f405af97dd9173e99780a2be3c621ac759c4986a2d2 -EBUILD switcheroo-control-2.4.ebuild 917 BLAKE2B 6bd3ab227424ef1e6ec1efd9d8383f353c076c5bbbe0bbf0875e5f22cada2f8ee42631c2eb793bd4bbd6ad7070a5404adc0b484901271ae26bedac0f74b14b67 SHA512 199a464108ba28b19059539888eb0dea7c9cb33018a8727479b088d3bf6924f48d8820bd90fed882d36ff2127c9f0e4660621df5738c65638319090550ff1712 +EBUILD switcheroo-control-2.6-r1.ebuild 1425 BLAKE2B fecbaaf594b8a1d58da5deddd74c9ce83b8f1b72b679eceffb93c9884c65cfc56130fe5ca673a89d146590575a55562972fb29c6b4b0242e2909449f0881cdf2 SHA512 96351d6dd3eb20929f44fffb25a7dffd08a1cfd8f6c66153dd589801010b3970e214c45322d52228eae47f487878f9a08da89e16fb5bd66ef887cfa8e9fc48c0 EBUILD switcheroo-control-2.6.ebuild 1187 BLAKE2B 94b67e1eeb81efb7e0960120fdaa77c73574277b09186d27bb92ae404b96e15840889213fa28e6ca6033ee28ba1206d169653fef82080064bbdac524758ae9c0 SHA512 a9619706e3449f918ac9bdfe9654358d01a6a66e17d52fd3ece64d56899d2e960c2bc168b7863bf2d7cdbf5ef5f93e0146582400f0c34c459e5e27863a8427bd -MISC metadata.xml 217 BLAKE2B f8189b02494f180dac078dcd5c275d3c795f20f360f8b172c66065a2d937e396b24b8631bba4cd8567d60285ce89fc77b9539f2233bf33899c820613c48c33ba SHA512 f0c9e5b3d281fecd21b1e23a6f44c94c1c0b3220de46a177d35932111b7f1ab4399061c42833ac1ee9bd0324b139fc8db66e0d2890224d607bd3be38ae469be9 +MISC metadata.xml 319 BLAKE2B a3d0c3eb8684beca028aa1a168ffd796db835207225c2e3979bf3d0cadb99e96bc774aa2598356df483597a87a7bf4cd5c3b0ba7cffd3b4c2e1faa0d37c9cb9a SHA512 68760ca73834ff5f65c898d935dc4ece52b2f54b5501457433f92a8d93a48f4e3baac188e22b1a65d990b13abad2f7463f8d8ce2c286bdf172841fd46c023a18 diff --git a/sys-power/switcheroo-control/files/switcheroo-control-init.d b/sys-power/switcheroo-control/files/switcheroo-control-init.d new file mode 100644 index 000000000000..e6ca92908715 --- /dev/null +++ b/sys-power/switcheroo-control/files/switcheroo-control-init.d @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +description="Switcheroo Control Proxy service" + +command=/usr/libexec/switcheroo-control +command_background=yes +pidfile=/run/switcheroo-control.pid + +depend() { + need dbus + before alsasound display-manager +} diff --git a/sys-power/switcheroo-control/metadata.xml b/sys-power/switcheroo-control/metadata.xml index 572c7daf2ccf..88197da5238c 100644 --- a/sys-power/switcheroo-control/metadata.xml +++ b/sys-power/switcheroo-control/metadata.xml @@ -4,4 +4,7 @@ <maintainer type="person"> <email>pacho@gentoo.org</email> </maintainer> + <upstream> + <remote-id type="freedesktop-gitlab">hadess/switcheroo-control</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-power/switcheroo-control/switcheroo-control-2.4.ebuild b/sys-power/switcheroo-control/switcheroo-control-2.4.ebuild deleted file mode 100644 index edf3b3edbb4b..000000000000 --- a/sys-power/switcheroo-control/switcheroo-control-2.4.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2021-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit meson - -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/accd4a9492979bfd91b587ae7e18d3a2/${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? ( dev-util/umockdev ) -" - -RESTRICT="!test? ( test )" - -src_configure() { - local emesonargs=( - $(meson_use gtk-doc gtk_doc) - ) - 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 -} diff --git a/sys-power/switcheroo-control/switcheroo-control-2.6-r1.ebuild b/sys-power/switcheroo-control/switcheroo-control-2.6-r1.ebuild new file mode 100644 index 000000000000..c44f0662b570 --- /dev/null +++ b/sys-power/switcheroo-control/switcheroo-control-2.6-r1.ebuild @@ -0,0 +1,63 @@ +# 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 systemd + +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:= +" +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 + python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]" +} + +src_configure() { + local emesonargs=( + -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)" + $(meson_use gtk-doc gtk_doc) + $(meson_use test tests) + ) + meson_src_configure +} + +src_install() { + meson_src_install + python_fix_shebang "${D}"/usr/bin/switcherooctl + newinitd "${FILESDIR}"/${PN}-init.d ${PN} +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "You to enable the service:" + if systemd_is_booted; then + elog "# systemctl enable switcheroo-control" + else + elog "# rc-update add ${PN} default" + fi + fi +} |