commit:     72b0331ed080bebd6dc76534540bb8f96c0f0461
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 27 19:22:25 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Feb 27 19:26:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72b0331e

app-misc/solaar: Convert to PYTHON_SINGLE_TARGET

... and fix libnotify/libappindicator dependencies and add Python 3.9
compatibility and sync from 1.0.3_rc1. Sigh.

Closes: https://bugs.gentoo.org/732172
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 app-misc/solaar/solaar-9999.ebuild | 38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/app-misc/solaar/solaar-9999.ebuild 
b/app-misc/solaar/solaar-9999.ebuild
index 8b13996f6d3..0e6648c5ddf 100644
--- a/app-misc/solaar/solaar-9999.ebuild
+++ b/app-misc/solaar/solaar-9999.ebuild
@@ -1,39 +1,50 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{7,8} )
+DISTUTILS_SINGLE_IMPL=1
+PYTHON_COMPAT=( python3_{7..9} )
 
 inherit linux-info udev xdg distutils-r1
 
-DESCRIPTION="A Linux device manager for Logitech's Unifying Receiver 
peripherals"
+DESCRIPTION="Linux Device Manager for Logitech Unifying Receivers and Paired 
Devices"
 HOMEPAGE="https://pwr-solaar.github.io/Solaar/";
 if [[ ${PV} =~ 9999* ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/pwr-Solaar/Solaar";
 else
-       SRC_URI="https://github.com/pwr-Solaar/Solaar/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+       
SRC_URI="https://github.com/pwr-Solaar/Solaar/archive/${PV/_rc/rc}.tar.gz -> 
${P/_rc/rc}.tar.gz"
        KEYWORDS="~amd64 ~arm ~x86"
-       S="${WORKDIR}"/Solaar-${PV} # hopefully upstream fixes this in future 
packaging
+       S="${WORKDIR}"/Solaar-${PV/_rc/rc}
 fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="doc"
+IUSE="doc appindicator libnotify"
 
 RDEPEND="
        acct-group/plugdev
-       dev-python/pygobject:3[${PYTHON_USEDEP}]
-       >=dev-python/pyudev-0.13[${PYTHON_USEDEP}]
-       x11-libs/gtk+:3[introspection]"
+       $(python_gen_cond_dep '
+               dev-python/pygobject:3[${PYTHON_USEDEP}]
+               >=dev-python/pyudev-0.13[${PYTHON_USEDEP}]
+       ')
+       x11-libs/gtk+:3[introspection]
+       appindicator? ( dev-libs/libappindicator:3[introspection] )
+       libnotify? ( x11-libs/libnotify[introspection] )"
+# libappindicator & libnotify are entirely optional and detected at runtime
 
 CONFIG_CHECK="~HID_LOGITECH_DJ ~HIDRAW"
 
 python_prepare_all() {
        # don't autostart (bug #494608)
-       sed -i '/yield autostart_path/d' setup.py || die
+       sed -i \
+               -e '/yield autostart_path/d' \
+               setup.py || die
+
+       sed -i -r \
+               -e '/yield.*udev.*rules.d/{s,/etc,/lib,g}' \
+               setup.py || die
 
        # grant plugdev group rw access
        sed -i 's/#MODE=/MODE=/' rules.d/42-logitech-unify-permissions.rules || 
die
@@ -44,10 +55,11 @@ python_prepare_all() {
 python_install_all() {
        distutils-r1_python_install_all
 
-       udev_dorules rules.d/*.rules
-
        dodoc docs/devices.md
        if use doc; then
                dodoc -r docs/*
+       else
+               newdoc docs/index.md README.md
        fi
+       udev_dorules "${S}"/rules.d/42-logitech-unify-permissions.rules
 }

Reply via email to