summaryrefslogtreecommitdiff
blob: 53cc8bbbdf5dc1110cc8b0d6e3aed1ebed7f083a (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/beets/beets-1.0_beta14-r1.ebuild,v 1.3 2012/05/29 20:57:12 sochotnicky Exp $

EAPI="4"

SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
PYTHON_DEPEND="2"
PYTHON_USE_WITH="sqlite"

inherit distutils

MY_PV=${PV/_beta/b}
S="${WORKDIR}/${PN}-${MY_PV}"

DESCRIPTION="A media library management system for obsessive-compulsive music geeks"
SRC_URI="http://beets.googlecode.com/files/${PN}-${MY_PV}.tar.gz"
HOMEPAGE="http://beets.radbox.org/"

KEYWORDS="~amd64 ~x86"
SLOT="0"
LICENSE="MIT"
IUSE="chroma doc lastgenre bpd replaygain web"

DEPEND="dev-python/munkres
		dev-python/python-musicbrainz-ngs
		dev-python/unidecode
		media-libs/mutagen
		chroma? ( dev-python/pyacoustid )
		lastgenre? ( dev-python/pylast )
		bpd? ( dev-python/bluelet )
		replaygain? ( media-sound/rgain )
		web? ( dev-python/flask )
		doc? ( dev-python/sphinx )"

RDEPEND="${DEPEND}"

src_prepare() {
	distutils_src_prepare

	# remove plugins that do not have appropriate dependencies installed
	for flag in lastgenre bpd web chroma replaygain;do
		if ! use $flag ; then
			rm -r beetsplug/$flag* || \
				die "Unable to remove $flag plugin"
		fi
	done

	for flag in lastgenre bpd web;do
		if ! use $flag ; then
			sed -i "s:'beetsplug.$flag',::" setup.py || \
				die "Unable to disable $flag plugin "
		fi
	done
}

src_compile() {
	distutils_src_compile
	use doc && emake -C docs html
}

src_install() {
	distutils_src_install
	doman man/beet.1 man/beetsconfig.5
	use doc && dohtml -r docs/_build/html/
}