Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/solaar/
Date: Mon, 27 Feb 2023 15:12:46
Message-Id: 1677510172.742cfff92a456b596f2dbf440a4eb3dd10560d41.pacho@gentoo
1 commit: 742cfff92a456b596f2dbf440a4eb3dd10560d41
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 27 15:02:52 2023 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 27 15:02:52 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=742cfff9
7
8 app-misc/solaar: migrate to Ayatana appindicators implementation
9
10 Also fix udev_reload call and update icons cache properly
11
12 Closes: https://bugs.gentoo.org/887351
13 Closes: https://bugs.gentoo.org/854771
14 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
15
16 app-misc/solaar/solaar-1.1.8-r1.ebuild | 81 ++++++++++++++++++++++++++++++++++
17 1 file changed, 81 insertions(+)
18
19 diff --git a/app-misc/solaar/solaar-1.1.8-r1.ebuild b/app-misc/solaar/solaar-1.1.8-r1.ebuild
20 new file mode 100644
21 index 000000000000..13ddbb755105
22 --- /dev/null
23 +++ b/app-misc/solaar/solaar-1.1.8-r1.ebuild
24 @@ -0,0 +1,81 @@
25 +# Copyright 1999-2023 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +DISTUTILS_USE_PEP517=setuptools
31 +DISTUTILS_SINGLE_IMPL=1
32 +PYTHON_COMPAT=( python3_{9..11} )
33 +
34 +inherit linux-info udev xdg distutils-r1
35 +
36 +DESCRIPTION="Linux Device Manager for Logitech Unifying Receivers and Paired Devices"
37 +HOMEPAGE="https://pwr-solaar.github.io/Solaar/"
38 +if [[ ${PV} =~ 9999* ]]; then
39 + inherit git-r3
40 + EGIT_REPO_URI="https://github.com/pwr-Solaar/Solaar"
41 +else
42 + SRC_URI="https://github.com/pwr-Solaar/Solaar/archive/${PV/_rc/rc}.tar.gz -> ${P/_rc/rc}.tar.gz"
43 + KEYWORDS="~amd64 ~arm ~x86"
44 + S="${WORKDIR}"/Solaar-${PV/_rc/rc}
45 +fi
46 +
47 +LICENSE="GPL-2"
48 +SLOT="0"
49 +IUSE="doc appindicator libnotify"
50 +
51 +RDEPEND="
52 + acct-group/plugdev
53 + $(python_gen_cond_dep '
54 + dev-python/psutil[${PYTHON_USEDEP}]
55 + dev-python/pygobject:3[${PYTHON_USEDEP}]
56 + dev-python/python-evdev[${PYTHON_USEDEP}]
57 + dev-python/python-xlib[${PYTHON_USEDEP}]
58 + >=dev-python/pyudev-0.13[${PYTHON_USEDEP}]
59 + dev-python/pyyaml[${PYTHON_USEDEP}]
60 +
61 + ')
62 + x11-libs/gtk+:3[introspection]
63 + appindicator? ( dev-libs/libayatana-appindicator )
64 + libnotify? ( x11-libs/libnotify[introspection] )"
65 +# libayatana-appindicator & libnotify are entirely optional and detected at runtime
66 +
67 +CONFIG_CHECK="~HID_LOGITECH_DJ ~HIDRAW"
68 +
69 +python_prepare_all() {
70 + # don't autostart (bug #494608)
71 + sed -i \
72 + -e '/yield autostart_path/d' \
73 + setup.py || die
74 +
75 + sed -i -r \
76 + -e '/yield.*udev.*rules.d/{s,/etc,/lib,g}' \
77 + setup.py || die
78 +
79 + # grant plugdev group rw access
80 + sed -i 's/#MODE=/MODE=/' rules.d/42-logitech-unify-permissions.rules || die
81 +
82 + distutils-r1_python_prepare_all
83 +}
84 +
85 +python_install_all() {
86 + distutils-r1_python_install_all
87 +
88 + dodoc docs/devices.md ChangeLog.md
89 + if use doc; then
90 + dodoc -r docs/*
91 + else
92 + newdoc docs/index.md README.md
93 + fi
94 + udev_dorules "${S}"/rules.d/42-logitech-unify-permissions.rules
95 +}
96 +
97 +pkg_postinst() {
98 + udev_reload
99 + xdg_pkg_postinst
100 +}
101 +
102 +pkg_postrm() {
103 + udev_reload
104 + xdg_pkg_postrm
105 +}