From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1255901-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id D50DD1382C5
	for <garchives@archives.gentoo.org>; Sat, 27 Feb 2021 19:26:21 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1D3D9E0857;
	Sat, 27 Feb 2021 19:26:21 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 03F56E0857
	for <gentoo-commits@lists.gentoo.org>; Sat, 27 Feb 2021 19:26:20 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id F1420335CF5
	for <gentoo-commits@lists.gentoo.org>; Sat, 27 Feb 2021 19:26:19 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A74274DC
	for <gentoo-commits@lists.gentoo.org>; Sat, 27 Feb 2021 19:26:18 +0000 (UTC)
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1614453970.72b0331ed080bebd6dc76534540bb8f96c0f0461.mattst88@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/solaar/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-misc/solaar/solaar-9999.ebuild
X-VCS-Directories: app-misc/solaar/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: 72b0331ed080bebd6dc76534540bb8f96c0f0461
X-VCS-Branch: master
Date: Sat, 27 Feb 2021 19:26:18 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: bf46ce68-51b5-4d03-940a-b658e1104dad
X-Archives-Hash: 091f11b2178a06fa0dd361fe8df54f4a

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
 }