summaryrefslogtreecommitdiff
blob: e98e68e13b9cccd5f757b7056654a4f24486d218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_USE_PEP517=setuptools

inherit distutils-r1 optfeature xdg

DESCRIPTION="Graphical client for the Soulseek peer to peer network written in Python"
HOMEPAGE="https://nicotine-plus.org/"
SRC_URI="https://github.com/Nicotine-Plus/nicotine-plus/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/nicotine-plus-${PV}"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="test"
RESTRICT="!test? ( test )"

# NOTE: good link - https://github.com/nicotine-plus/nicotine-plus/blob/master/doc/DEPENDENCIES.md
BDEPEND="
	sys-devel/gettext
	test? (
		dev-python/pytest
		|| (
		   >=gui-libs/gtk-4.6.9[broadway]
		   >=x11-libs/gtk+-3.22.20:3[broadway]
		)
	)
"
RDEPEND="
	dev-python/pygobject:3[${PYTHON_USEDEP}]
	|| (
		>=gui-libs/gtk-4.6.9[introspection]
		>=x11-libs/gtk+-3.22.20:3[introspection]
	)
"

distutils_enable_tests pytest

DOCS=( AUTHORS.md NEWS.md README.md TRANSLATORS.md )

src_prepare() {
	default
	# remove update check test violating network sandbox
	sed -i -e 's:test_update_check:_&:' \
		"${S}"/pynicotine/tests/unit/test_version.py || die
}
pkg_postinst() {
	xdg_pkg_postinst

	elog "Nicotine can work with both gtk3+ and gtk4."
	elog "The newer version is preferred but it has worse screen reader support"
	elog "If you need it you can switch to gtk3+ by running nicotine"
	elog "with an environmental variable like this:"
	elog "   $ NICOTINE_GTK_VERSION=3 nicotine"

	optfeature "Adwaita theme on GNOME (GTK 4)" gui-libs/libadwaita
	optfeature "Chat spellchecking (GTK 3)" app-text/gspell
}