blob: 1c00c904b743de779e9e6f97b926ba78ebde6cce (
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
76
77
78
79
80
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
RESTRICT=nomirror
inherit vdr-plugin
DESCRIPTION="Video Disk Recorder Muggle Plugin"
HOMEPAGE="http://www.htpc-tech.de/htpc/muggle.htm"
SRC_URI="http://downloads.htpc-tech.de/muggle/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -amd64"
IUSE="flac vorbis graphtft mysql embedded postgres sqlite"
DEPEND=">=media-video/vdr-1.2.6
media-libs/taglib
media-libs/libmad
mysql? ( >=dev-db/mysql-4.0 )
sqlite? ( dev-db/sqlite )
postgres? ( dev-db/postgresql )
vorbis? ( >=media-libs/libvorbis-1.0 )
flac? ( media-libs/flac )"
pkg_setup() {
vdr-plugin_pkg_setup
if ! use mysql && ! use sqlite && ! use postgres; then
echo
eerror "Please choose on of the following use flags"
eerror "mysql sqlite postgres for your vaforited databank"
echo
die "No DB use flag added"
fi
}
src_unpack() {
vdr-plugin_src_unpack
sed -i "s:#include <vdr/getopt.h>:#include <getopt.h>:" ${S}/muggle.c
use graphtft && epatch ${FILESDIR}/${P}_graphTFT_Cover.diff
use vorbis && sed -i "s:# HAVE_VORBISFILE=1:HAVE_VORBISFILE=1:" Makefile
use flac && sed -i "s:# HAVE_FLAC=1:HAVE_FLAC=1:" Makefile
if use mysql && use embedded ; then
einfo "Compiling with support for embedded mysql."
if has_version '<dev-db/mysql-4.1.11'
then
ewarn "The resulting binary will not work with an external server"
ewarn "because your libmysqlclient is not version >= 4.1.11"
fi
elif use mysql && ! use embedded && sed -i "s:#.*HAVE_ONLY_SERVER=1:HAVE_ONLY_SERVER=1:" Makefile ; then
einfo "Compiling with mysql support, without support for embedded mysql."
elif use sqlite && sed -i "s:# HAVE_SQLITE = 1:HAVE_SQLITE = 1:" Makefile ; then
einfo "Compiling with sqlite support"
else
einfo "Compiling with postgres support"
use postgres && sed -i "s:HAVE_MYSQL = 1:HAVE_PG:" Makefile
fi
}
src_install() {
vdr-plugin_src_install
dobin mugglei
}
|