summaryrefslogtreecommitdiff
blob: acd742a019e2183402ca15ec79e7ea49ef6cba98 (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
72
73
74
75
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

KDE_LINGUAS_DIR=( po convert-presets/po )
PLUGINS=(
	alsa-sound dbus gui-docking-menu gui-error-log gui-quickbar
	gui-standard-display internetradio lirc oss-sound radio recording shortcuts
	soundserver streaming timecontrol timeshifter v4lradio
)
KDE_LINGUAS="cs de es is it pl pt pt_BR ru sk tr uk"
inherit kde4-base

MY_P=${PN}4-${PV/_/-}

DESCRIPTION="kradio is a radio tuner application for KDE"
HOMEPAGE="http://kradio.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
SLOT="4"
IUSE="alsa debug encode ffmpeg libav lirc +mp3 +vorbis v4l"

DEPEND="
	media-libs/libsndfile
	alsa? ( media-libs/alsa-lib )
	ffmpeg? (
		>=media-libs/libmms-0.4
		libav? ( media-video/libav:= )
		!libav? ( media-video/ffmpeg:0= )
	)
	lirc? ( app-misc/lirc )
	mp3? ( media-sound/lame )
	vorbis? (
		media-libs/libvorbis
		media-libs/libogg
	)
"
RDEPEND="${DEPEND}"

S=${WORKDIR}/${MY_P}

PATCHES=( "${FILESDIR}/${PN}-4.0.7-include.patch" )

src_prepare() {
	local lang
	for lang in ${KDE_LINGUAS} ; do
		if ! use linguas_${lang} ; then
			for dir in "${KDE_LINGUAS_DIR[@]}" ; do
				rm ${dir}/${lang}.po
			done
			for plugin in "${PLUGINS[@]}" ; do
				rm plugins/${plugin}/po/${lang}.po
			done
		fi
	done

	kde4-base_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DWITH_ALSA=$(usex alsa)
		-DWITH_FFMPEG=$(usex ffmpeg)
		-DWITH_LIRC=$(usex lirc)
		-DWITH_LAME=$(usex mp3)
		-DWITH_OGG_VORBIS=$(usex vorbis)
		-DWITH_V4L2=$(usex v4l)
	)

	kde4-base_src_configure
}