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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/mythfrontend/mythfrontend-0.18.ebuild,v 1.3 2005/04/27 02:54:37 eradicator Exp $
inherit myth flag-o-matic eutils toolchain-funcs
DESCRIPTION="Homebrew PVR project"
HOMEPAGE="http://www.mythtv.org/"
SRC_URI="http://www.mythtv.org/mc/mythtv-${PV}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="alsa altivec arts cle266 directfb dvb ieee1394 jack joystick lcd lirc nvidia oggvorbis opengl oss xv X" # mmx "
DEPEND=">=media-libs/freetype-2.0
>=media-sound/lame-3.93.1
>=x11-libs/qt-3.1
dev-db/mysql
alsa? ( >=media-libs/alsa-lib-0.9 )
>=sys-apps/sed-4
arts? ( kde-base/arts )
directfb? ( dev-libs/DirectFB )
dvb? ( media-libs/libdvb )
jack? ( media-sound/jack-audio-connection-kit )
lcd? ( app-misc/lcdproc )
lirc? ( app-misc/lirc )
nvidia? ( media-video/nvidia-glx )
oggvorbis? ( media-libs/libvorbis )
opengl? ( virtual/opengl )
|| ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 )"
RDEPEND="${DEPEND}
!media-tv/mythtv"
PDEPEND="~x11-themes/mythtv-themes-${PV}"
S=${WORKDIR}/mythtv-${PV}
pkg_setup() {
if ! built_with_use x11-libs/qt mysql ; then
eerror "Qt is missing MySQL support. Please add"
eerror "'mysql' to your USE flags, and re-emerge Qt."
die "Qt needs MySQL support"
fi
if use nvidia; then
echo
ewarn "You enabled the 'nvidia' USE flag, you must have a GeForce 4 or"
ewarn "greater to use this. Otherwise, you'll have crashes with MythTV"
echo
fi
}
src_unpack() {
# Fix bugs 40964 and 42943.
filter-flags -fforce-addr -fPIC
# fix bug 67832, 81610, etc
is-flag "-march=pentium4" && replace-flags "-O3" "-O2"
is-flag "-march=pentium4" && replace-flags "-0s" "-O2"
is-flag "-march=athlon-xp" && replace-flags "-O3" "-O2"
myth_src_unpack || die "unpack failed"
cd ${S}
}
setup_pro() {
sed -e "s:CONFIG += linux backend:CONFIG += linux:" \
-i 'settings.pro' || die "Removal of mythbackend failed"
}
src_compile() {
use cle266 && use nvidia && die "You can not have USE="cle266" and USE="nvidia" at the same time. Must disable one or the other."
# tested on different versions on gcc, P4, celeron & athlon-xp, and all bork on postProcess_MMX
# with mmx enabled, so disabled for all architectures for now - FIXME
myconf="--disable-mmx
$(use_enable altivec)
$(use_enable oss audio-oss)
$(use_enable alsa audio-alsa)
$(use_enable arts audio-arts)
$(use_enable jack audio-jack)
$(use_enable lirc)
$(use_enable joystick joystick-menu)
$(use_enable cle266 xvmc-vld)
$(use_enable directfb)
$(use_enable dvb)
$(use_enable dvb dvb-eit)
--dvb-path=/usr/include
$(use_enable opengl opengl-vsync)
$(use_enable oggvorbis vorbis)
$(use_enable nvidia xvmc)
$(use_enable xv)
$(use_enable X x11)"
# $(use_enable ieee1394 firewire)
myth_src_compile
}
src_install() {
myth_src_install || die "install failed"
newbin "setup/setup" "mythsetup"
insinto /usr/share/mythtv/database
doins database/*
exeinto /usr/share/mythtv
doexe "${FILESDIR}/mythfilldatabase.cron"
exeinto /etc/init.d
newexe "${FILESDIR}/mythbackend.rc6" mythbackend
insinto /etc/conf.d
newins "${FILESDIR}/mythbackend.conf" mythbackend
dodoc keys.txt docs/*.{txt,pdf}
dohtml docs/*.html
keepdir /var/{log,run}/mythtv
}
|