| 1 |
|
# Copyright 2022-2025 Gentoo Authors
|
|
1 |
# Copyright 2022-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
PYTHON_COMPAT=( python3_{11..13} )
|
| 7 |
|
DISTUTILS_USE_PEP517=setuptools
|
| 8 |
|
inherit distutils-r1 xdg
|
|
6 |
# See https://quodlibet.readthedocs.io/en/latest/packaging.html
|
|
7 |
PYTHON_COMPAT=( python3_{11..14} )
|
|
8 |
inherit edo optfeature python-single-r1 virtualx xdg
|
| 9 |
9 |
|
| 10 |
10 |
DESCRIPTION="audio library tagger, manager, and player for GTK+"
|
| 11 |
11 |
HOMEPAGE="https://quodlibet.readthedocs.io/"
|
| 12 |
12 |
SRC_URI="https://github.com/${PN}/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
|
| 13 |
|
|
| 14 |
13 |
S="${WORKDIR}/${PN}-release-${PV}"
|
| 15 |
|
LICENSE="GPL-2"
|
|
14 |
|
|
15 |
LICENSE="GPL-2+"
|
| 16 |
16 |
SLOT="0"
|
| 17 |
|
KEYWORDS="amd64 ppc ppc64 x86"
|
|
17 |
KEYWORDS="amd64 ppc ppc64 ~x86"
|
| 18 |
18 |
IUSE="+dbus gstreamer +udev"
|
|
19 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
| 19 |
20 |
|
| 20 |
|
RDEPEND="dev-libs/keybinder:3[introspection]
|
| 21 |
|
dev-python/feedparser[${PYTHON_USEDEP}]
|
| 22 |
|
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
| 23 |
|
media-libs/mutagen[${PYTHON_USEDEP}]
|
|
21 |
RDEPEND="
|
|
22 |
${PYTHON_DEPS}
|
|
23 |
dev-libs/keybinder:3[introspection]
|
|
24 |
$(python_gen_cond_dep '
|
|
25 |
>=dev-python/feedparser-6.0.11[${PYTHON_USEDEP}]
|
|
26 |
>=dev-python/pycairo-1.19[${PYTHON_USEDEP}]
|
|
27 |
>=dev-python/pygobject-3.34.0:3[${PYTHON_USEDEP}]
|
|
28 |
>=media-libs/mutagen-1.45[${PYTHON_USEDEP}]
|
|
29 |
')
|
| 24 |
30 |
net-libs/libsoup:3.0[introspection]
|
| 25 |
31 |
x11-libs/gtk+[introspection]
|
| 26 |
32 |
gstreamer? (
|
| ... | ... | |
| 28 |
34 |
media-libs/gst-plugins-base:1.0
|
| 29 |
35 |
media-libs/gst-plugins-good:1.0
|
| 30 |
36 |
media-plugins/gst-plugins-meta:1.0
|
| 31 |
|
)
|
|
37 |
)
|
| 32 |
38 |
!gstreamer? ( media-libs/xine-lib )
|
| 33 |
39 |
dbus? (
|
| 34 |
40 |
app-misc/media-player-info
|
| 35 |
|
dev-python/dbus-python[${PYTHON_USEDEP}]
|
| 36 |
|
)
|
| 37 |
|
udev? ( virtual/udev )"
|
| 38 |
|
DEPEND="dev-util/intltool"
|
| 39 |
|
|
| 40 |
|
PATCHES=(
|
| 41 |
|
"${FILESDIR}/${PN}-4.6.0-python312-new.patch"
|
| 42 |
|
)
|
|
41 |
$(python_gen_cond_dep '
|
|
42 |
dev-python/dbus-python[${PYTHON_USEDEP}]
|
|
43 |
')
|
|
44 |
)
|
|
45 |
udev? ( virtual/udev )
|
|
46 |
"
|
|
47 |
BDEPEND="
|
|
48 |
dev-util/intltool
|
|
49 |
test? (
|
|
50 |
$(python_gen_cond_dep '
|
|
51 |
dev-python/pytest[${PYTHON_USEDEP}]
|
|
52 |
')
|
|
53 |
)
|
|
54 |
"
|
| 43 |
55 |
|
| 44 |
56 |
src_prepare() {
|
|
57 |
default
|
|
58 |
|
| 45 |
59 |
local qlconfig=quodlibet/config.py
|
| 46 |
60 |
|
| 47 |
61 |
if ! use gstreamer; then
|
| ... | ... | |
| 49 |
63 |
fi
|
| 50 |
64 |
|
| 51 |
65 |
sed -i -e '/gst_pipeline/s:"":"alsasink":' ${qlconfig} || die
|
|
66 |
}
|
| 52 |
67 |
|
| 53 |
|
distutils-r1_src_prepare
|
|
68 |
src_compile() {
|
|
69 |
# The package has a complex setuptools-based build system inside
|
|
70 |
# of gdist/. Using PEP517 requires some workarounds and isn't
|
|
71 |
# really useful here.
|
|
72 |
edo ${EPYTHON} setup.py build
|
|
73 |
}
|
|
74 |
|
|
75 |
src_test() {
|
|
76 |
EPYTEST_DESELECT=(
|
|
77 |
# Network tests
|
|
78 |
'tests/plugin/test_covers.py::test_live_cover_download[lastfm-cover]'
|
|
79 |
'tests/plugin/test_covers.py::test_live_cover_download[discogs-cover]'
|
|
80 |
tests/test_browsers_iradio.py::TInternetRadio::test_click_add_station
|
|
81 |
# ?
|
|
82 |
tests/plugin/test_replaygain.py::TReplayGain::test_analyze_sinewave
|
|
83 |
)
|
|
84 |
|
|
85 |
# https://quodlibet.readthedocs.io/en/latest/development/testing.html#testing
|
|
86 |
#virtx edo ${EPYTHON} setup.py test
|
|
87 |
virtx epytest || die "Tests failed with ${EPYTHON}"
|
| 54 |
88 |
}
|
| 55 |
89 |
|
| 56 |
90 |
src_install() {
|
| 57 |
|
distutils-r1_src_install
|
|
91 |
edo ${EPYTHON} setup.py install --prefix="${EPREFIX}/usr" --root="${D}"
|
|
92 |
python_optimize
|
|
93 |
|
| 58 |
94 |
dodoc README.rst
|
|
95 |
}
|
| 59 |
96 |
|
| 60 |
|
# fix location of desktop file
|
| 61 |
|
mv "${ED}/usr/share/appdata" "${ED}/usr/share/metainfo" || die "Failed to fix desktop file location"
|
|
97 |
pkg_postinst() {
|
|
98 |
optfeature "Kanji Kana Simple Inverter" app-i18n/kakasi
|
|
99 |
optfeature "tray icon under Unity and KDE Plasma" dev-libs/libayatana-appindicator
|
|
100 |
optfeature "Musicbrainz NGS" dev-python/musicbrainzngs
|
|
101 |
optfeature "MQTT" dev-python/paho-mqtt
|
|
102 |
optfeature "Discord status" dev-python/pypresence
|
|
103 |
optfeature "MOD music files" media-libs/libmodplug
|
|
104 |
optfeature "crossfade" media-plugins/gst-plugins-bs2b:1.0
|
|
105 |
optfeature "fingerprint" media-plugins/gst-plugins-chromaprint:1.0
|
|
106 |
optfeature "pitch" media-plugins/gst-plugins-soundtouch:1.0
|
|
107 |
optfeature "uPnP media server" net-misc/rygel
|
|
108 |
optfeature "notification" virtual/notification-daemon
|
| 62 |
109 |
}
|