summaryrefslogtreecommitdiff
blob: 3be14aeb7ee0e17f8c50001f646b3d35343a7926 (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
63
64
65
66
67
68
69
70
71
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8,9} )
PYTHON_REQ_USE="sqlite"
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_SETUPTOOLS=no

inherit distutils-r1 optfeature xdg

DESCRIPTION="A free cross-platform podcast aggregator"
HOMEPAGE="https://gpodder.github.io/"
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
IUSE="+dbus bluetooth kernel_linux mtp test"
RESTRICT="!test? ( test )"

# As in Fedora: re-enable >=dev-python/eyeD3-0.7[${PYTHON_USEDEP}] and
# ipod? ( media-libs/libgpod[python,${PYTHON_USEDEP}] ) once they
# support python3
COMMON_DEPEND="
	$(python_gen_cond_dep '
		dev-python/html5lib[${PYTHON_USEDEP}]
		dev-python/pycairo[${PYTHON_USEDEP}]
		>=dev-python/pygobject-3.22.0:3[${PYTHON_USEDEP}]
		>=dev-python/podcastparser-0.6.0[${PYTHON_USEDEP}]
		>=dev-python/mygpoclient-1.8[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
	')
	bluetooth? ( net-wireless/bluez )
	mtp? ( >=media-libs/libmtp-1.0.0:= )
"
RDEPEND="${COMMON_DEPEND}
	kernel_linux? ( sys-apps/iproute2 )
"
DEPEND="${COMMON_DEPEND}
	dev-util/desktop-file-utils
	dev-util/intltool
	sys-apps/help2man
	test? (
		dev-python/minimock
		dev-python/pytest-localserver
	)
"

src_prepare() {
	default

	sed -i -e 's:--cov=gpodder::' makefile || die
}

src_test() {
	emake releasetest
}

src_install() {
	emake PYTHON=${EPYTHON} DESTDIR="${D}" install
	distutils-r1_src_install
}

pkg_postinst() {
	xdg_pkg_postinst

	optfeature "for the youtube-dl extension" net-misc/youtube-dl
}