1 |
commit: c0ead648b4774b4edb6becf3b874caa4ea124464 |
2 |
Author: Guillaume Seren <guillaumeseren <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 25 20:41:57 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 1 12:28:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0ead648 |
7 |
|
8 |
media-sound/beets: Add 9999 ebuild |
9 |
|
10 |
Signed-off-by: Guillaume Seren <guillaumeseren <AT> gmail.com> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/15519 |
12 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
13 |
|
14 |
media-sound/beets/beets-9999.ebuild | 176 ++++++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 176 insertions(+) |
16 |
|
17 |
diff --git a/media-sound/beets/beets-9999.ebuild b/media-sound/beets/beets-9999.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..d3bc4cc7ad1 |
20 |
--- /dev/null |
21 |
+++ b/media-sound/beets/beets-9999.ebuild |
22 |
@@ -0,0 +1,176 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+DISTUTILS_SINGLE_IMPL=1 |
29 |
+PYTHON_COMPAT=( python{2_7,3_{6,7,8}} ) |
30 |
+PYTHON_REQ_USE="sqlite" |
31 |
+ |
32 |
+inherit distutils-r1 bash-completion-r1 |
33 |
+ |
34 |
+if [[ ${PV} == "9999" ]]; then |
35 |
+ EGIT_REPO_URI="https://github.com/beetbox/beets.git" |
36 |
+ inherit git-r3 |
37 |
+ KEYWORDS="~amd64 ~x86" |
38 |
+else |
39 |
+ MY_PV=${PV/_beta/-beta.} |
40 |
+ MY_P=${PN}-${MY_PV} |
41 |
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
42 |
+ KEYWORDS="~amd64 ~x86" |
43 |
+ S="${WORKDIR}/${MY_P}" |
44 |
+fi |
45 |
+ |
46 |
+DESCRIPTION="Media library management system for obsessive-compulsive music geeks" |
47 |
+HOMEPAGE="http://beets.io/ https://pypi.org/project/beets/" |
48 |
+ |
49 |
+LICENSE="MIT" |
50 |
+SLOT="0" |
51 |
+IUSE="badfiles chromaprint discogs doc ffmpeg gstreamer icu lastfm mpd replaygain test thumbnail webserver" |
52 |
+ |
53 |
+RDEPEND="${DEPEND}" |
54 |
+DEPEND=" |
55 |
+ $(python_gen_cond_dep ' |
56 |
+ test? ( |
57 |
+ dev-python/wheel[${PYTHON_MULTI_USEDEP}] |
58 |
+ dev-python/beautifulsoup[${PYTHON_MULTI_USEDEP}] |
59 |
+ dev-python/flask[${PYTHON_MULTI_USEDEP}] |
60 |
+ dev-python/mock[${PYTHON_MULTI_USEDEP}] |
61 |
+ dev-python/rarfile[${PYTHON_MULTI_USEDEP}] |
62 |
+ dev-python/responses[${PYTHON_MULTI_USEDEP}] |
63 |
+ dev-python/pyxdg[${PYTHON_MULTI_USEDEP}] |
64 |
+ dev-python/requests-oauthlib[${PYTHON_MULTI_USEDEP}] |
65 |
+ ) |
66 |
+ >=dev-python/jellyfish-0.7.1[${PYTHON_MULTI_USEDEP}] |
67 |
+ dev-python/munkres[${PYTHON_MULTI_USEDEP}] |
68 |
+ >=dev-python/python-musicbrainz-ngs-0.4[${PYTHON_MULTI_USEDEP}] |
69 |
+ dev-python/pyyaml[${PYTHON_MULTI_USEDEP}] |
70 |
+ dev-python/requests[${PYTHON_MULTI_USEDEP}] |
71 |
+ dev-python/requests-oauthlib[${PYTHON_MULTI_USEDEP}] |
72 |
+ >=dev-python/six-1.9[${PYTHON_MULTI_USEDEP}] |
73 |
+ dev-python/unidecode[${PYTHON_MULTI_USEDEP}] |
74 |
+ >=media-libs/mutagen-1.33[${PYTHON_MULTI_USEDEP}] |
75 |
+ >=dev-python/confuse-1.0.0[${PYTHON_MULTI_USEDEP}] |
76 |
+ >=dev-python/mediafile-0.2.0[${PYTHON_MULTI_USEDEP}] |
77 |
+ badfiles? ( |
78 |
+ media-libs/flac |
79 |
+ media-sound/mp3val |
80 |
+ ) |
81 |
+ chromaprint? ( |
82 |
+ dev-python/pyacoustid[${PYTHON_MULTI_USEDEP}] |
83 |
+ media-libs/chromaprint[tools] |
84 |
+ ) |
85 |
+ discogs? ( dev-python/discogs-client[${PYTHON_MULTI_USEDEP}] ) |
86 |
+ ffmpeg? ( media-video/ffmpeg:0[encode] ) |
87 |
+ gstreamer? ( |
88 |
+ media-libs/gst-plugins-good:1.0 |
89 |
+ media-libs/gst-plugins-bad:1.0 |
90 |
+ ) |
91 |
+ icu? ( dev-db/sqlite[icu] ) |
92 |
+ lastfm? ( dev-python/pylast[${PYTHON_MULTI_USEDEP}] ) |
93 |
+ mpd? ( |
94 |
+ dev-python/bluelet[${PYTHON_MULTI_USEDEP}] |
95 |
+ dev-python/python-mpd[${PYTHON_MULTI_USEDEP}] |
96 |
+ ) |
97 |
+ replaygain? ( |
98 |
+ gstreamer? ( |
99 |
+ dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}] |
100 |
+ media-plugins/gst-plugins-libav:1.0 |
101 |
+ ) |
102 |
+ !gstreamer? ( media-sound/mp3gain ) |
103 |
+ ) |
104 |
+ thumbnail? ( |
105 |
+ dev-python/pyxdg[${PYTHON_MULTI_USEDEP}] |
106 |
+ || ( |
107 |
+ dev-python/pillow[${PYTHON_MULTI_USEDEP}] |
108 |
+ media-gfx/imagemagick |
109 |
+ ) |
110 |
+ ) |
111 |
+ webserver? ( |
112 |
+ dev-python/flask[${PYTHON_MULTI_USEDEP}] |
113 |
+ dev-python/flask-cors[${PYTHON_MULTI_USEDEP}] |
114 |
+ ) |
115 |
+ ')" |
116 |
+BDEPEND=" |
117 |
+ $(python_gen_cond_dep ' |
118 |
+ dev-python/sphinx[${PYTHON_MULTI_USEDEP}] |
119 |
+ ')" |
120 |
+ |
121 |
+DOCS=( README.rst docs/changelog.rst ) |
122 |
+ |
123 |
+distutils_enable_tests pytest |
124 |
+ |
125 |
+python_prepare_all() { |
126 |
+ distutils-r1_python_prepare_all |
127 |
+ |
128 |
+ rm_use_plugins() { |
129 |
+ [[ -n "${1}" ]] || die "rm_use_plugins: No use option given" |
130 |
+ local use=${1} |
131 |
+ local plugins=${use} |
132 |
+ use ${use} && return |
133 |
+ einfo "no ${use}:" |
134 |
+ [[ $# -gt 1 ]] && plugins="${@:2}" |
135 |
+ for arg in ${plugins[@]}; do |
136 |
+ einfo " removing ${arg}" |
137 |
+ if [[ -e "beetsplug/${arg}.py" ]]; then |
138 |
+ rm beetsplug/${arg}.py || die "Unable to remove ${arg} plugin" |
139 |
+ fi |
140 |
+ if [[ -d "beetsplug/${arg}" ]]; then |
141 |
+ rm -r beetsplug/${arg} || die "Unable to remove ${arg} plugin" |
142 |
+ fi |
143 |
+ sed -e "s:'beetsplug.${arg}',::" -i setup.py || \ |
144 |
+ die "Unable to disable ${arg} plugin " |
145 |
+ done |
146 |
+ } |
147 |
+ |
148 |
+ rm_use_plugins chromaprint chroma |
149 |
+ rm_use_plugins ffmpeg convert |
150 |
+ rm_use_plugins icu loadext |
151 |
+ rm_use_plugins lastfm lastgenre lastimport |
152 |
+ rm_use_plugins mpd bpd mpdstats |
153 |
+ rm_use_plugins webserver web |
154 |
+ rm_use_plugins thumbnail thumbnails |
155 |
+ |
156 |
+ # remove plugins that do not have appropriate dependencies installed |
157 |
+ for flag in badfiles discogs replaygain; do |
158 |
+ rm_use_plugins ${flag} |
159 |
+ done |
160 |
+ |
161 |
+ if ! use mpd; then |
162 |
+ rm test/test_player.py || die |
163 |
+ rm test/test_mpdstats.py || die |
164 |
+ fi |
165 |
+ if ! use webserver; then |
166 |
+ rm test/test_web.py || die "Failed to remove test_web.py" |
167 |
+ fi |
168 |
+ if use test; then |
169 |
+ # Those test need network |
170 |
+ rm test/test_art.py || die |
171 |
+ rm test/test_discogs.py || die |
172 |
+ rm test/test_embyupdate.py || die |
173 |
+ rm test/test_lastgenre.py || die |
174 |
+ rm test/test_spotify.py || die |
175 |
+ # rm test/test_plexupdate.py |
176 |
+ rm test/test_thumbnails.py || die |
177 |
+ # Not working |
178 |
+ rm test/test_replaygain.py || die |
179 |
+ # Not working |
180 |
+ rm test/test_convert.py || die |
181 |
+ fi |
182 |
+} |
183 |
+ |
184 |
+python_compile_all() { |
185 |
+ esetup.py build_sphinx -b man --build-dir=docs/build |
186 |
+ use doc && esetup.py build_sphinx -b html --build-dir=docs/build |
187 |
+} |
188 |
+ |
189 |
+python_install_all() { |
190 |
+ distutils-r1_python_install_all |
191 |
+ |
192 |
+ doman docs/build/man/* |
193 |
+ use doc && local HTML_DOCS=( docs/build/html/. ) |
194 |
+ einstalldocs |
195 |
+ |
196 |
+ "${D}$(python_get_scriptdir)/beet" completion > "${T}/beet.bashcomp" |
197 |
+ newbashcomp "${T}/beet.bashcomp" beet |
198 |
+} |