Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/beets/
Date: Wed, 05 Sep 2018 21:08:09
Message-Id: 1536181601.9923e14b1646b58c044afae815684290744fa1f3.asturm@gentoo
1 commit: 9923e14b1646b58c044afae815684290744fa1f3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 22 14:11:05 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 5 21:06:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9923e14b
7
8 media-sound/beets: 1.4.7 version bump with many improvements
9
10 EAPI-6 bump.
11 python3 support.
12 Decouple use flag names from plugin names with rm_use_plugins()
13 Consolidate various use flags and use more common names.
14 Re-add USE replaygain.
15 Add missing || die.
16 Add missing USE=badfiles handling.
17 Fix and sort RDEPENDs.
18 Tests are broken since at least 1.4.3.
19
20 Bug: https://bugs.gentoo.org/625974
21 Closes: https://bugs.gentoo.org/563380
22 Closes: https://bugs.gentoo.org/625578
23 Package-Manager: Portage-2.3.48, Repoman-2.3.10
24
25 media-sound/beets/Manifest | 1 +
26 media-sound/beets/beets-1.4.7.ebuild | 139 +++++++++++++++++++++++++++++++++++
27 media-sound/beets/metadata.xml | 6 ++
28 3 files changed, 146 insertions(+)
29
30 diff --git a/media-sound/beets/Manifest b/media-sound/beets/Manifest
31 index f620929dd77..6f517f7471e 100644
32 --- a/media-sound/beets/Manifest
33 +++ b/media-sound/beets/Manifest
34 @@ -1 +1,2 @@
35 DIST beets-1.4.3.tar.gz 1428494 BLAKE2B 29adc617c4efbb304b05c6bc027a09fd34c11af70b22a86a329fe9048de31828f729114db929e97b103a6f6d8210c0b74716f327f8b4f853f745433fea5f1e14 SHA512 b95a9056abae5da3db7786342e8969b4f9c86c2c4589dd48bad244d28ef3d3da4900d3d3eaee1e45964960c62ecaa8d754a33829e0d7f497f01ecc763c0f492d
36 +DIST beets-1.4.7.tar.gz 1458621 BLAKE2B f7dd19a7dd92415c29e9b1a7932ba33cb5d43000d35a58b2f42c1487db68c6374dd159960f67e1ac68722693d91d364b24297fb2c0c86a39b82fe5b40a1e739d SHA512 6663a2ffece208a510fce9f5d3dd9c8e617cab60cdb994f7bdb13fd759cfea8882290c75c3cdf4f6de9c7d9b78845b6ed29f98b41c787c89ff8782e4ac3ec152
37
38 diff --git a/media-sound/beets/beets-1.4.7.ebuild b/media-sound/beets/beets-1.4.7.ebuild
39 new file mode 100644
40 index 00000000000..7a21e504abd
41 --- /dev/null
42 +++ b/media-sound/beets/beets-1.4.7.ebuild
43 @@ -0,0 +1,139 @@
44 +# Copyright 1999-2018 Gentoo Foundation
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=6
48 +
49 +PYTHON_COMPAT=( python{2_7,3_{5,6}} )
50 +PYTHON_REQ_USE="sqlite"
51 +inherit distutils-r1
52 +
53 +MY_PV=${PV/_beta/-beta.}
54 +MY_P=${PN}-${MY_PV}
55 +
56 +DESCRIPTION="A media library management system for obsessive-compulsive music geeks"
57 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
58 +HOMEPAGE="http://beets.io/ https://pypi.org/project/beets/"
59 +
60 +KEYWORDS="~amd64 ~x86"
61 +SLOT="0"
62 +LICENSE="MIT"
63 +IUSE="badfiles chromaprint doc discogs ffmpeg flac gstreamer lastfm mpd ogg opus replaygain test thumbnail webserver"
64 +
65 +RDEPEND="
66 + dev-python/jellyfish[${PYTHON_USEDEP}]
67 + dev-python/munkres[${PYTHON_USEDEP}]
68 + >=dev-python/python-musicbrainz-ngs-0.4[${PYTHON_USEDEP}]
69 + dev-python/pyyaml[${PYTHON_USEDEP}]
70 + dev-python/requests[${PYTHON_USEDEP}]
71 + dev-python/requests-oauthlib[${PYTHON_USEDEP}]
72 + >=dev-python/six-1.9[${PYTHON_USEDEP}]
73 + dev-python/unidecode[${PYTHON_USEDEP}]
74 + >=media-libs/mutagen-1.33[${PYTHON_USEDEP}]
75 + virtual/python-enum34[${PYTHON_USEDEP}]
76 + badfiles? (
77 + media-libs/flac
78 + media-sound/mp3val
79 + )
80 + chromaprint? (
81 + dev-python/pyacoustid[${PYTHON_USEDEP}]
82 + media-libs/chromaprint[tools]
83 + )
84 + discogs? ( dev-python/discogs-client[${PYTHON_USEDEP}] )
85 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
86 + ffmpeg? ( media-video/ffmpeg:0[encode] )
87 + lastfm? ( dev-python/pylast[${PYTHON_USEDEP}] )
88 + mpd? (
89 + dev-python/bluelet[${PYTHON_USEDEP}]
90 + dev-python/python-mpd[${PYTHON_USEDEP}]
91 + )
92 + replaygain? (
93 + gstreamer? (
94 + dev-python/pygobject:3[${PYTHON_USEDEP}]
95 + media-libs/gstreamer:1.0[introspection]
96 + media-libs/gst-plugins-base:1.0[ogg?]
97 + media-libs/gst-plugins-good:1.0
98 + flac? ( media-plugins/gst-plugins-flac:1.0 )
99 + opus? ( media-plugins/gst-plugins-opus:1.0 )
100 + )
101 + !gstreamer? ( media-sound/mp3gain )
102 + )
103 + thumbnail? (
104 + dev-python/pyxdg[${PYTHON_USEDEP}]
105 + virtual/python-pathlib[${PYTHON_USEDEP}]
106 + || (
107 + dev-python/pillow[${PYTHON_USEDEP}]
108 + media-gfx/imagemagick
109 + )
110 + )
111 + webserver? (
112 + dev-python/flask[${PYTHON_USEDEP}]
113 + dev-python/flask-cors[${PYTHON_USEDEP}]
114 + )
115 +"
116 +DEPEND="
117 + dev-python/setuptools[${PYTHON_USEDEP}]
118 +"
119 +
120 +RESTRICT="test" # tests broken in 1.4.3 already
121 +
122 +S=${WORKDIR}/${MY_P}
123 +
124 +src_prepare() {
125 + rm_use_plugins() {
126 + [[ -n "${1}" ]] || die "rm_use_plugins: No use option given"
127 + local use=${1}
128 + local plugins=${use}
129 + use ${use} && return
130 + einfo "no ${use}:"
131 + [[ $# -gt 1 ]] && plugins="${@:2}"
132 + for arg in ${plugins[@]}; do
133 + einfo " removing ${arg}"
134 + if [[ -e "beetsplug/${arg}.py" ]]; then
135 + rm beetsplug/${arg}.py || die "Unable to remove ${arg} plugin"
136 + fi
137 + if [[ -d "beetsplug/${arg}" ]]; then
138 + rm -r beetsplug/${arg} || die "Unable to remove ${arg} plugin"
139 + fi
140 + sed -e "s:'beetsplug.${arg}',::" -i setup.py || \
141 + die "Unable to disable ${arg} plugin "
142 + done
143 + }
144 +
145 + default
146 +
147 + rm_use_plugins chromaprint chroma
148 + rm_use_plugins ffmpeg convert
149 + rm_use_plugins lastfm lastgenre lastimport
150 + rm_use_plugins mpd bpd mpdstats
151 + rm_use_plugins webserver web
152 + rm_use_plugins thumbnail thumbnails
153 +
154 + # remove plugins that do not have appropriate dependencies installed
155 + for flag in badfiles discogs replaygain; do
156 + rm_use_plugins ${flag}
157 + done
158 +
159 + if ! use mpd; then
160 + rm -f test/test_player.py || die
161 + fi
162 +}
163 +
164 +python_compile_all() {
165 + use doc && emake -C docs html
166 +}
167 +
168 +python_test() {
169 + cd test || die
170 + if ! use webserver; then
171 + rm test_web.py || die "Failed to remove test_web.py"
172 + fi
173 + "${PYTHON}" testall.py || die "Testsuite failed"
174 +}
175 +
176 +python_install_all() {
177 + distutils-r1_python_install_all
178 +
179 + doman man/beet.1 man/beetsconfig.5
180 + use doc && local HTML_DOCS=( docs/_build/html/. )
181 + einstalldocs
182 +}
183
184 diff --git a/media-sound/beets/metadata.xml b/media-sound/beets/metadata.xml
185 index 46b548c1ee8..c57948828ca 100644
186 --- a/media-sound/beets/metadata.xml
187 +++ b/media-sound/beets/metadata.xml
188 @@ -30,15 +30,21 @@
189 <flag name="badfiles">Validate MP3 &amp; FLAC files</flag>
190 <flag name="bpd">Enable support for <pkg>media-sound/mpd</pkg> server emulation</flag>
191 <flag name="chroma">Enable support for acoustic fingerprinting plugin using <pkg>media-libs/chromaprint</pkg></flag>
192 + <flag name="chromaprint">Enable support for acoustic fingerprinting plugin using <pkg>media-libs/chromaprint</pkg></flag>
193 <flag name="convert">Enable support for the convert plugin which makes it possible to transcode files</flag>
194 + <flag name="ffmpeg">Enable support for the convert plugin to transcode files via <pkg>media-video/ffmpeg</pkg></flag>
195 <flag name="discogs">Enable support for the discogs API plugin</flag>
196 + <flag name="lastfm">Enable support for importing personal last.fm playcounts and music genres from last.fm tags</flag>
197 <flag name="lastgenre">Enable support for importing music genres from last.fm tags</flag>
198 <flag name="lastimport">Enable support for importing your last.fm playcounts</flag>
199 + <flag name="mpd">Enable support for <pkg>media-sound/mpd</pkg> server emulation and statistic gathered from <pkg>media-sound/mpd</pkg></flag>
200 <flag name="mpdstats">Enable support for collecting statistic about listening habits from <pkg>media-sound/mpd</pkg></flag>
201 <flag name="opus">Enable opus support in gstreamer-based replaygain</flag>
202 <flag name="replaygain">Enable support for Replay Gain metadata calculation during import</flag>
203 + <flag name="thumbnail">Enable album thumbnails generation</flag>
204 <flag name="thumbnails">Generate thumbnails for albums</flag>
205 <flag name="web">Enable embedded webserver support through <pkg>dev-python/flask</pkg></flag>
206 + <flag name="webserver">Enable embedded webserver support through <pkg>dev-python/flask</pkg></flag>
207 </use>
208 <upstream>
209 <remote-id type="pypi">beets</remote-id>