1 |
cardoe 08/01/28 16:02:25 |
2 |
|
3 |
Added: mythtv-0.21_pre15635.ebuild |
4 |
Log: |
5 |
newer trunk revision |
6 |
(Portage version: 2.1.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-tv/mythtv/mythtv-0.21_pre15635.ebuild |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/mythtv-0.21_pre15635.ebuild?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/mythtv-0.21_pre15635.ebuild?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: mythtv-0.21_pre15635.ebuild |
15 |
=================================================================== |
16 |
# Copyright 1999-2008 Gentoo Foundation |
17 |
# Distributed under the terms of the GNU General Public License v2 |
18 |
# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.21_pre15635.ebuild,v 1.1 2008/01/28 16:02:24 cardoe Exp $ |
19 |
|
20 |
inherit flag-o-matic multilib eutils qt3 mythtv subversion toolchain-funcs |
21 |
|
22 |
DESCRIPTION="Homebrew PVR project" |
23 |
SLOT="0" |
24 |
KEYWORDS="~amd64 ~ppc ~x86" |
25 |
|
26 |
IUSE_VIDEO_CARDS="video_cards_i810 video_cards_nvidia video_cards_via" |
27 |
|
28 |
IUSE="alsa altivec autostart dbox2 debug directv dts dvb dvd hdhomerun ieee1394 iptv ivtv jack joystick lcd lirc mmx vorbis opengl perl xvmc ${IUSE_VIDEO_CARDS}" |
29 |
|
30 |
RDEPEND=">=media-libs/freetype-2.0 |
31 |
>=media-sound/lame-3.93.1 |
32 |
x11-libs/libX11 |
33 |
x11-libs/libXext |
34 |
x11-libs/libXinerama |
35 |
x11-libs/libXv |
36 |
x11-libs/libXrandr |
37 |
x11-libs/libXxf86vm |
38 |
xvmc? ( |
39 |
x11-libs/libXvMC |
40 |
video_cards_nvidia? ( x11-drivers/nvidia-drivers ) |
41 |
video_cards_via? ( x11-drivers/xf86-video-via ) |
42 |
video_cards_i810? ( x11-drivers/xf86-video-i810 ) |
43 |
) |
44 |
$(qt_min_version 3.3) |
45 |
virtual/mysql |
46 |
virtual/opengl |
47 |
virtual/glu |
48 |
|| ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 ) |
49 |
alsa? ( >=media-libs/alsa-lib-0.9 ) |
50 |
dts? ( || ( media-libs/libdca media-libs/libdts ) ) |
51 |
dvd? ( media-libs/libdvdnav ) |
52 |
dvb? ( media-libs/libdvb media-tv/linuxtv-dvb-headers ) |
53 |
directv? ( virtual/perl-Time-HiRes ) |
54 |
ivtv? ( media-tv/ivtv ) |
55 |
jack? ( media-sound/jack-audio-connection-kit ) |
56 |
lcd? ( app-misc/lcdproc ) |
57 |
lirc? ( app-misc/lirc ) |
58 |
perl? ( dev-perl/DBD-mysql ) |
59 |
vorbis? ( media-libs/libvorbis ) |
60 |
ieee1394? ( >=sys-libs/libraw1394-1.2.0 |
61 |
>=sys-libs/libavc1394-0.5.0 |
62 |
>=media-libs/libiec61883-1.0.0 ) |
63 |
autostart? ( net-dialup/mingetty |
64 |
x11-wm/evilwm |
65 |
x11-apps/xset )" |
66 |
|
67 |
DEPEND="${RDEPEND} |
68 |
x11-proto/xineramaproto |
69 |
x11-proto/xf86vidmodeproto |
70 |
x11-apps/xinit" |
71 |
|
72 |
PDEPEND="=x11-themes/mythtv-themes-${MY_PV}*" |
73 |
|
74 |
S="${WORKDIR}/${PN}-${MY_PV}" |
75 |
|
76 |
MYTHTV_GROUPS="video,audio,tty,uucp" |
77 |
|
78 |
pkg_setup() { |
79 |
|
80 |
local rip=0 |
81 |
if ! built_with_use -a =x11-libs/qt-3* mysql opengl ; then |
82 |
echo |
83 |
eerror "MythTV requires Qt to be built with mysql and opengl use flags enabled." |
84 |
eerror "Please re-emerge =x11-libs/qt-3*, after having the use flags set." |
85 |
echo |
86 |
rip=1 |
87 |
fi |
88 |
|
89 |
if use xvmc && use video_cards_nvidia; then |
90 |
echo |
91 |
ewarn "You enabled the 'xvmc' USE flag, you must have a GeForce 4 or" |
92 |
ewarn "greater to use this. Otherwise, you'll have crashes with MythTV" |
93 |
echo |
94 |
fi |
95 |
|
96 |
if use xvmc && ! ( use video_cards_i810 || use video_cards_nvidia || use video_cards_via ); then |
97 |
echo |
98 |
eerror "You enabled the XvMC USE flag but did not configure VIDEO_CARDS with either" |
99 |
eerror "an nVidia, Intel i810, or VIA video card." |
100 |
echo |
101 |
rip=1 |
102 |
fi |
103 |
|
104 |
[[ $rip == 1 ]] && die "Please fix the above issues, before continuing." |
105 |
|
106 |
echo |
107 |
einfo "This ebuild now uses a heavily stripped down version of your CFLAGS" |
108 |
einfo "Don't complain because your -momfg-fast-speed CFLAG is being stripped" |
109 |
einfo "Only additional CFLAG issues that will be addressed are for binary" |
110 |
einfo "package building." |
111 |
echo |
112 |
} |
113 |
|
114 |
src_unpack() { |
115 |
subversion_src_unpack |
116 |
|
117 |
# upstream wants the revision number in their version.cpp |
118 |
# since the subversion.eclass strips out the .svn directory |
119 |
# svnversion in MythTV's build doesn't work |
120 |
sed -e "s:\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`:${SVNREV}:" \ |
121 |
-i "${S}"/version.pro || die "svnversion sed failed" |
122 |
} |
123 |
|
124 |
src_compile() { |
125 |
local myconf="--prefix=/usr |
126 |
--mandir=/usr/share/man |
127 |
--libdir-name=$(get_libdir)" |
128 |
use alsa || myconf="${myconf} --disable-audio-alsa" |
129 |
use jack || myconf="${myconf} --disable-audio-jack" |
130 |
use dts && myconf="${myconf} --enable-libdts" |
131 |
use dbox2 || myconf="${myconf} --disable-dbox2" |
132 |
use hdhomerun || myconf="${myconf} --disable-hdhomerun" |
133 |
use altivec || myconf="${myconf} --disable-altivec" |
134 |
use ivtv || myconf="${myconf} --disable-ivtv" |
135 |
use perl || myconf="${myconf} --without-bindings=perl" |
136 |
use xvmc && myconf="${myconf} --enable-xvmc" |
137 |
use xvmc && use video_cards_via && myconf="${myconf} --enable-xvmc-pro" |
138 |
use xvmc && ! use video_cards_nvidia && myconf="${myconf} --disable-xvmc-opengl" |
139 |
myconf="${myconf} |
140 |
--disable-audio-arts |
141 |
$(use_enable lirc) |
142 |
$(use_enable joystick joystick-menu) |
143 |
$(use_enable dvb) |
144 |
--dvb-path=/usr/include |
145 |
$(use_enable opengl opengl-vsync) |
146 |
$(use_enable ieee1394 firewire) |
147 |
$(use_enable iptv) |
148 |
--enable-xrandr |
149 |
--enable-xv |
150 |
--disable-directfb |
151 |
--enable-x11 |
152 |
--enable-proc-opt" |
153 |
|
154 |
if use mmx || use amd64; then |
155 |
myconf="${myconf} --enable-mmx" |
156 |
else |
157 |
myconf="${myconf} --disable-mmx" |
158 |
fi |
159 |
|
160 |
if use debug; then |
161 |
myconf="${myconf} --compile-type=debug" |
162 |
else |
163 |
myconf="${myconf} --compile-type=release" |
164 |
fi |
165 |
|
166 |
## CFLAG cleaning so it compiles |
167 |
MARCH=$(get-flag "march") |
168 |
MTUNE=$(get-flag "mtune") |
169 |
MCPU=$(get-flag "mcpu") |
170 |
strip-flags |
171 |
filter-flags "-march=*" "-mtune=*" "-mcpu=*" |
172 |
filter-flags "-O" "-O?" |
173 |
|
174 |
if [[ -n "${MARCH}" ]]; then |
175 |
myconf="${myconf} --arch=${MARCH}" |
176 |
fi |
177 |
if [[ -n "${MTUNE}" ]]; then |
178 |
myconf="${myconf} --tune=${MTUNE}" |
179 |
fi |
180 |
if [[ -n "${MCPU}" ]]; then |
181 |
myconf="${myconf} --cpu=${MCPU}" |
182 |
fi |
183 |
|
184 |
# myconf="${myconf} --extra-cxxflags=\"${CXXFLAGS}\" --extra-cflags=\"${CFLAGS}\"" |
185 |
hasq distcc ${FEATURES} || myconf="${myconf} --disable-distcc" |
186 |
hasq ccache ${FEATURES} || myconf="${myconf} --disable-ccache" |
187 |
|
188 |
# let MythTV come up with our CFLAGS. Upstream will support this |
189 |
CFLAGS="" |
190 |
CXXFLAGS="" |
191 |
einfo "Running ./configure ${myconf}" |
192 |
./configure ${myconf} || die "configure died" |
193 |
|
194 |
eqmake3 mythtv.pro -o "Makefile" || die "eqmake3 failed" |
195 |
emake || die "emake failed" |
196 |
|
197 |
# firewire support should build the tester |
198 |
if use ieee1394; then |
199 |
cd contrib |
200 |
$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../firewire_tester firewire_tester.c \ |
201 |
${LDFLAGS} -liec61883 -lraw1394 || \ |
202 |
die "failed to compile firewire_tester" |
203 |
|
204 |
cd channel_changers |
205 |
$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -std=gnu99 -o ../../6200ch 6200ch.c \ |
206 |
${LDFLAGS} -lrom1394 -lavc1394 -lraw1394 || \ |
207 |
die "failed to compile 6200ch" |
208 |
$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../../sa3250ch sa3250ch.c \ |
209 |
${LDFLAGS} -lrom1394 -lavc1394 -lraw1394 || \ |
210 |
die "failed to compile sa3250ch" |
211 |
# LDLIBS="-liec61883 -lraw1394" CC=$(tc-getCC) emake firewire_tester || \ |
212 |
# die "failed to compile firewire_tester" |
213 |
fi |
214 |
|
215 |
cd "${S}"/contrib/channel_changers |
216 |
$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../../red_eye red_eye.c ${LDFLAGS} || \ |
217 |
die "failed to compile red_eye" |
218 |
} |
219 |
|
220 |
src_install() { |
221 |
|
222 |
einstall INSTALL_ROOT="${D}" || die "install failed" |
223 |
for doc in AUTHORS FAQ UPGRADING ChangeLog README; do |
224 |
test -e "${doc}" && dodoc ${doc} |
225 |
done |
226 |
|
227 |
insinto /usr/share/mythtv/database |
228 |
doins database/* |
229 |
|
230 |
exeinto /usr/share/mythtv |
231 |
doexe "${FILESDIR}/mythfilldatabase.cron" |
232 |
|
233 |
newinitd "${FILESDIR}"/mythbackend-0.18.2.rc mythbackend |
234 |
newconfd "${FILESDIR}"/mythbackend-0.18.2.conf mythbackend |
235 |
|
236 |
dodoc keys.txt docs/*.{txt,pdf} |
237 |
dohtml docs/*.html |
238 |
|
239 |
keepdir /etc/mythtv |
240 |
chown -R mythtv "${D}"/etc/mythtv |
241 |
keepdir /var/log/mythtv |
242 |
chown -R mythtv "${D}"/var/log/mythtv |
243 |
|
244 |
insinto /etc/logrotate.d |
245 |
newins "${FILESDIR}"/mythtv.logrotate.d mythtv |
246 |
|
247 |
insinto /usr/share/mythtv/contrib |
248 |
doins -r contrib/* |
249 |
|
250 |
dobin "${FILESDIR}"/runmythfe |
251 |
|
252 |
if use autostart; then |
253 |
dodir /etc/env.d/ |
254 |
echo 'CONFIG_PROTECT="/home/mythtv/"' > "${D}"/etc/env.d/95mythtv |
255 |
|
256 |
insinto /home/mythtv |
257 |
newins "${FILESDIR}"/bash_profile .bash_profile |
258 |
newins "${FILESDIR}"/xinitrc .xinitrc |
259 |
fi |
260 |
|
261 |
if use ieee1394; then |
262 |
dobin firewire_tester || die "failed to install firewire_tester" |
263 |
dodoc contrib/firewire_tester-README |
264 |
|
265 |
dobin 6200ch || die "failed to install 6200ch" |
266 |
dodoc contrib/channel_changers/6200ch-README |
267 |
|
268 |
dobin sa3250ch || die "failed to install sa3250ch" |
269 |
dodoc contrib/channel_changers/sa3250ch-README |
270 |
fi |
271 |
|
272 |
dobin red_eye || die "failed to install red_eye" |
273 |
dodoc contrib/channel_changers/red_eye-README |
274 |
|
275 |
if use directv; then |
276 |
dobin contrib/channel_changers/d10control.pl || die "failed to install d10control" |
277 |
dodoc contrib/channel_changers/d10control-README |
278 |
fi |
279 |
} |
280 |
|
281 |
pkg_preinst() { |
282 |
enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} || die "Problem adding mythtv user" |
283 |
usermod -a -G ${MYTHTV_GROUPS} mythtv |
284 |
|
285 |
export CONFIG_PROTECT="${CONFIG_PROTECT} ${ROOT}/home/mythtv/" |
286 |
} |
287 |
|
288 |
pkg_postinst() { |
289 |
echo |
290 |
elog "Want mythfrontend to start automatically?" |
291 |
elog "Set USE=autostart. Details can be found at:" |
292 |
elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" |
293 |
|
294 |
echo |
295 |
elog "To always have MythBackend running and available run the following:" |
296 |
elog "rc-update add mythbackend default" |
297 |
echo |
298 |
ewarn "Your recordings folder must be owned by the user 'mythtv' now" |
299 |
ewarn "chown -R mythtv /path/to/store" |
300 |
|
301 |
if use autostart; then |
302 |
echo |
303 |
elog "Please add the following to your /etc/inittab file at the end of" |
304 |
elog "the TERMINALS section" |
305 |
elog "c8:2345:respawn:/sbin/mingetty --autologin mythtv tty8" |
306 |
fi |
307 |
|
308 |
} |
309 |
|
310 |
pkg_info() { |
311 |
/usr/bin/mythfrontend --version |
312 |
} |
313 |
|
314 |
pkg_config() { |
315 |
echo "Creating mythtv MySQL user and mythconverg database if it does not" |
316 |
echo "already exist. You will be prompted for your MySQL root password." |
317 |
/usr/bin/mysql -u root -p < /usr/share/mythtv/database/mc.sql |
318 |
} |
319 |
|
320 |
|
321 |
|
322 |
-- |
323 |
gentoo-commits@l.g.o mailing list |