Gentoo Archives: gentoo-commits

From: "Doug Klima (cardoe)" <cardoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-tv/mythtv: ChangeLog mythtv-0.20.2_p15477.ebuild mythtv-0.21_pre15567.ebuild mythtv-0.21_pre15362.ebuild
Date: Thu, 24 Jan 2008 15:58:15
Message-Id: E1JI4Sy-0005Le-0y@stork.gentoo.org
1 cardoe 08/01/24 15:58:12
2
3 Modified: ChangeLog
4 Added: mythtv-0.20.2_p15477.ebuild
5 mythtv-0.21_pre15567.ebuild
6 Removed: mythtv-0.21_pre15362.ebuild
7 Log:
8 upstream merged --as-needed fixes from ticket #2402 for 0.20.2. new trunk (0.21) revision.
9 (Portage version: 2.1.4)
10
11 Revision Changes Path
12 1.206 media-tv/mythtv/ChangeLog
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/ChangeLog?rev=1.206&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/ChangeLog?rev=1.206&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/ChangeLog?r1=1.205&r2=1.206
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v
21 retrieving revision 1.205
22 retrieving revision 1.206
23 diff -u -r1.205 -r1.206
24 --- ChangeLog 22 Jan 2008 20:51:16 -0000 1.205
25 +++ ChangeLog 24 Jan 2008 15:58:11 -0000 1.206
26 @@ -1,6 +1,14 @@
27 # ChangeLog for media-tv/mythtv
28 # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.205 2008/01/22 20:51:16 cardoe Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.206 2008/01/24 15:58:11 cardoe Exp $
31 +
32 +*mythtv-0.21_pre15567 (24 Jan 2008)
33 +*mythtv-0.20.2_p15477 (24 Jan 2008)
34 +
35 + 24 Jan 2008; Doug Klima <cardoe@g.o> +mythtv-0.20.2_p15477.ebuild,
36 + -mythtv-0.21_pre15362.ebuild, +mythtv-0.21_pre15567.ebuild:
37 + upstream merged --as-needed fixes from ticket #2402 for 0.20.2. new trunk
38 + (0.21) revision.
39
40 22 Jan 2008; Doug Klima <cardoe@g.o> mythtv-0.20.2_p15332.ebuild,
41 mythtv-0.21_pre15447.ebuild:
42
43
44
45 1.1 media-tv/mythtv/mythtv-0.20.2_p15477.ebuild
46
47 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/mythtv-0.20.2_p15477.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/mythtv-0.20.2_p15477.ebuild?rev=1.1&content-type=text/plain
49
50 Index: mythtv-0.20.2_p15477.ebuild
51 ===================================================================
52 # Copyright 1999-2008 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.20.2_p15477.ebuild,v 1.1 2008/01/24 15:58:11 cardoe Exp $
55
56 inherit mythtv flag-o-matic multilib eutils qt3 subversion toolchain-funcs
57
58 DESCRIPTION="Homebrew PVR project"
59 SLOT="0"
60 KEYWORDS="~amd64 ~ppc ~x86"
61
62 IUSE_VIDEO_CARDS="video_cards_i810 video_cards_nvidia video_cards_via"
63
64 IUSE="alsa altivec autostart backendonly crciprec dbox2 debug directv dts dvb dvd freebox frontendonly hdhomerun ieee1394 ivtv jack joystick lcd lirc mmx vorbis opengl perl xvmc ${IUSE_VIDEO_CARDS}"
65
66 RDEPEND=">=media-libs/freetype-2.0
67 >=media-sound/lame-3.93.1
68 x11-libs/libX11
69 x11-libs/libXext
70 x11-libs/libXinerama
71 x11-libs/libXv
72 x11-libs/libXrandr
73 x11-libs/libXxf86vm
74 xvmc? (
75 x11-libs/libXvMC
76 video_cards_nvidia? ( x11-drivers/nvidia-drivers )
77 video_cards_via? ( x11-drivers/xf86-video-via )
78 video_cards_i810? ( x11-drivers/xf86-video-i810 )
79 )
80 $(qt_min_version 3.3)
81 virtual/mysql
82 virtual/opengl
83 virtual/glu
84 || ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 )
85 alsa? ( >=media-libs/alsa-lib-0.9 )
86 dts? ( || ( media-libs/libdca media-libs/libdts ) )
87 dvd? ( media-libs/libdvdnav )
88 dvb? ( media-libs/libdvb media-tv/linuxtv-dvb-headers )
89 directv? ( virtual/perl-Time-HiRes )
90 ivtv? ( media-tv/ivtv )
91 jack? ( media-sound/jack-audio-connection-kit )
92 lcd? ( app-misc/lcdproc )
93 lirc? ( app-misc/lirc )
94 perl? ( dev-perl/DBD-mysql )
95 vorbis? ( media-libs/libvorbis )
96 ieee1394? ( >=sys-libs/libraw1394-1.2.0
97 >=sys-libs/libavc1394-0.5.0
98 >=media-libs/libiec61883-1.0.0 )
99 autostart? ( net-dialup/mingetty
100 x11-wm/evilwm
101 x11-apps/xset )"
102
103 DEPEND="${RDEPEND}
104 x11-proto/xineramaproto
105 x11-proto/xf86vidmodeproto
106 x11-apps/xinit"
107
108 PDEPEND="=x11-themes/mythtv-themes-${MY_PV}*"
109
110 S="${WORKDIR}/${PN}-${MY_PV}"
111
112 MYTHTV_GROUPS="video,audio,tty,uucp"
113
114 pkg_setup() {
115
116 local rip=0
117 if ! built_with_use -a =x11-libs/qt-3* mysql opengl ; then
118 echo
119 eerror "MythTV requires Qt to be built with mysql and opengl use flags enabled."
120 eerror "Please re-emerge =x11-libs/qt-3*, after having the use flags set."
121 echo
122 rip=1
123 fi
124
125 if use xvmc && use video_cards_nvidia; then
126 echo
127 ewarn "You enabled the 'xvmc' USE flag, you must have a GeForce 4 or"
128 ewarn "greater to use this. Otherwise, you'll have crashes with MythTV"
129 echo
130 fi
131
132 if use xvmc && ! ( use video_cards_i810 || use video_cards_nvidia || use video_cards_via ); then
133 echo
134 eerror "You enabled the XvMC USE flag but did not configure VIDEO_CARDS with either"
135 eerror "an nVidia, Intel i810, or VIA video card."
136 echo
137 rip=1
138 fi
139
140 if use autostart && use backendonly; then
141 echo
142 eerror "You can't have USE=autostart while having USE=backendonly."
143 eerror "USE=autostart is for mythfrontend"
144 echo
145 rip=1
146 fi
147
148 [[ $rip == 1 ]] && die "Please fix the above issues, before continuing."
149
150 echo
151 einfo "This ebuild now uses a heavily stripped down version of your CFLAGS"
152 einfo "Don't complain because your -momfg-fast-speed CFLAG is being stripped"
153 einfo "Only additional CFLAG issues that will be addressed are for binary"
154 einfo "package building."
155 echo
156 }
157
158 src_unpack() {
159 subversion_src_unpack
160
161 # upstream wants the revision number in their version.cpp
162 # since the subversion.eclass strips out the .svn directory
163 # svnversion in MythTV's build doesn't work
164 sed -e "s:\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`:${SVNREV}:" \
165 -i "${S}"/version.pro || die "svnversion sed failed"
166 }
167
168 src_compile() {
169 local myconf="--prefix=/usr
170 --mandir=/usr/share/man
171 --libdir-name=$(get_libdir)"
172 use alsa || myconf="${myconf} --disable-audio-alsa"
173 use jack || myconf="${myconf} --disable-audio-jack"
174 use dts || myconf="${myconf} --disable-dts"
175 use freebox || myconf="${myconf} --disable-freebox"
176 use dbox2 || myconf="${myconf} --disable-dbox2"
177 use hdhomerun || myconf="${myconf} --disable-hdhomerun"
178 use crciprec || myconf="${myconf} --disable-crciprec"
179 use altivec || myconf="${myconf} --disable-altivec"
180 use xvmc && myconf="${myconf} --enable-xvmc"
181 use xvmc && use video_cards_via && myconf="${myconf} --enable-xvmc-pro"
182 use perl && myconf="${myconf} --with-bindings=perl"
183 myconf="${myconf}
184 --disable-audio-arts
185 $(use_enable lirc)
186 $(use_enable joystick joystick-menu)
187 $(use_enable dvb)
188 --dvb-path=/usr/include
189 $(use_enable opengl opengl-vsync)
190 $(use_enable ieee1394 firewire)
191 --enable-xrandr
192 --enable-xv
193 --disable-directfb
194 --enable-x11
195 --enable-proc-opt"
196
197 if use mmx || use amd64; then
198 myconf="${myconf} --enable-mmx"
199 else
200 myconf="${myconf} --disable-mmx"
201 fi
202
203 if use debug; then
204 myconf="${myconf} --compile-type=debug"
205 else
206 myconf="${myconf} --compile-type=release"
207 fi
208
209 ## CFLAG cleaning so it compiles
210 MARCH=$(get-flag "march")
211 MTUNE=$(get-flag "mtune")
212 MCPU=$(get-flag "mcpu")
213 strip-flags
214 filter-flags "-march=*" "-mtune=*" "-mcpu=*"
215 filter-flags "-O" "-O?"
216
217 if [[ -n "${MARCH}" ]]; then
218 myconf="${myconf} --arch=${MARCH}"
219 fi
220 if [[ -n "${MTUNE}" ]]; then
221 myconf="${myconf} --tune=${MTUNE}"
222 fi
223 if [[ -n "${MCPU}" ]]; then
224 myconf="${myconf} --cpu=${MCPU}"
225 fi
226
227 # myconf="${myconf} --extra-cxxflags=\"${CXXFLAGS}\" --extra-cflags=\"${CFLAGS}\""
228 hasq distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
229 hasq ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
230
231 if use frontendonly; then
232 ##Backend Removal
233 ewarn
234 ewarn "You are using the experimental feature for only installing the frontend."
235 ewarn "You will not get Gentoo support nor support from MythTV upstream for this."
236 ewarn "If this breaks, you own both pieces."
237 ewarn
238 myconf="${myconf} --disable-backend"
239 fi
240
241 if use backendonly; then
242 ##Frontend Removal
243 ewarn
244 ewarn "You are using the experimental feature for only installing the backend."
245 ewarn "You will not get Gentoo support nor support from MythTV upstream for this."
246 ewarn "If this breaks, you own both pieces."
247 ewarn
248 myconf="${myconf} --disable-frontend"
249 fi
250
251 # let MythTV come up with our CFLAGS. Upstream will support this
252 CFLAGS=""
253 CXXFLAGS=""
254 einfo "Running ./configure ${myconf}"
255 ./configure ${myconf} || die "configure died"
256
257 eqmake3 -o "Makefile" mythtv.pro || die "qmake failed"
258 emake || die "emake failed"
259
260 # firewire support should build the tester
261 if use ieee1394; then
262 cd contrib
263 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../firewire_tester firewire_tester.c \
264 ${LDFLAGS} -liec61883 -lraw1394 || \
265 die "failed to compile firewire_tester"
266
267 cd channel_changers
268 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -std=gnu99 -o ../../6200ch 6200ch.c \
269 ${LDFLAGS} -lrom1394 -lavc1394 -lraw1394 || \
270 die "failed to compile 6200ch"
271 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../../sa3250ch sa3250ch.c \
272 ${LDFLAGS} -lrom1394 -lavc1394 -lraw1394 || \
273 die "failed to compile sa3250ch"
274 # LDLIBS="-liec61883 -lraw1394" CC=$(tc-getCC) emake firewire_tester || \
275 # die "failed to compile firewire_tester"
276 fi
277
278 cd "${S}"/contrib/channel_changers
279 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../../red_eye red_eye.c ${LDFLAGS} || \
280 die "failed to compile red_eye"
281 }
282
283 src_install() {
284
285 einstall INSTALL_ROOT="${D}" || die "install failed"
286 for doc in AUTHORS FAQ UPGRADING ChangeLog README; do
287 test -e "${doc}" && dodoc ${doc}
288 done
289
290 if ! use frontendonly; then
291 insinto /usr/share/mythtv/database
292 doins database/*
293
294 exeinto /usr/share/mythtv
295 doexe "${FILESDIR}"/mythfilldatabase.cron
296
297 newinitd "${FILESDIR}"/mythbackend-0.18.2.rc mythbackend
298 newconfd "${FILESDIR}"/mythbackend-0.18.2.conf mythbackend
299 fi
300
301 dodoc keys.txt docs/*.{txt,pdf}
302 dohtml docs/*.html
303
304 keepdir /etc/mythtv
305 chown -R mythtv "${D}"/etc/mythtv
306 keepdir /var/log/mythtv
307 chown -R mythtv "${D}"/var/log/mythtv
308
309 insinto /etc/logrotate.d
310 newins "${FILESDIR}"/mythtv.logrotate.d mythtv
311
312 insinto /usr/share/mythtv/contrib
313 doins -r contrib/*
314
315 insinto /usr/share/mythtv/configfiles
316 doins configfiles/*
317
318 if ! use backendonly; then
319 dobin "${FILESDIR}"/runmythfe
320
321 if use autostart; then
322 dodir /etc/env.d/
323 echo 'CONFIG_PROTECT="/home/mythtv/"' > "${D}"/etc/env.d/95mythtv
324
325 insinto /home/mythtv
326 newins "${FILESDIR}"/bash_profile .bash_profile
327 newins "${FILESDIR}"/xinitrc .xinitrc
328 fi
329 fi
330
331 if use ieee1394; then
332 dobin firewire_tester || die "failed to install firewire_tester"
333 dodoc contrib/firewire_tester-README
334
335 dobin 6200ch || die "failed to install 6200ch"
336 dodoc contrib/channel_changers/6200ch-README
337
338 dobin sa3250ch || die "failed to install sa3250ch"
339 dodoc contrib/channel_changers/sa3250ch-README
340 fi
341
342 dobin red_eye || die "failed to install red_eye"
343 dodoc contrib/channel_changers/red_eye-README
344
345 if use directv; then
346 dobin contrib/channel_changers/d10control.pl || die "failed to install d10control"
347 dodoc contrib/channel_changers/d10control-README
348 fi
349 }
350
351 pkg_preinst() {
352 enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} || die "Problem adding mythtv user"
353 usermod -a -G ${MYTHTV_GROUPS} mythtv
354
355 export CONFIG_PROTECT="${CONFIG_PROTECT} ${ROOT}/home/mythtv/"
356 }
357
358 pkg_postinst() {
359 if ! use backendonly; then
360 echo
361 elog "Want mythfrontend to start automatically?"
362 elog "Set USE=autostart. Details can be found at:"
363 elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html"
364 fi
365
366 if ! use frontendonly; then
367 elog
368 elog "To always have MythBackend running and available run the following:"
369 elog "rc-update add mythbackend default"
370 elog
371 ewarn "Your recordings folder must be owned by the user 'mythtv' now"
372 ewarn "chown -R mythtv /path/to/store"
373 fi
374
375 if use autostart; then
376 elog
377 elog "Please add the following to your /etc/inittab file at the end of"
378 elog "the TERMINALS section"
379 elog "c8:2345:respawn:/sbin/mingetty --autologin mythtv tty8"
380 fi
381
382 }
383
384 pkg_info() {
385 /usr/bin/mythfrontend --version
386 }
387
388 pkg_config() {
389 echo "Creating mythtv MySQL user and mythconverg database if it does not"
390 echo "already exist. You will be prompted for your MySQL root password."
391 /usr/bin/mysql -u root -p < /usr/share/mythtv/database/mc.sql
392 }
393
394
395
396 1.1 media-tv/mythtv/mythtv-0.21_pre15567.ebuild
397
398 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/mythtv-0.21_pre15567.ebuild?rev=1.1&view=markup
399 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/mythtv-0.21_pre15567.ebuild?rev=1.1&content-type=text/plain
400
401 Index: mythtv-0.21_pre15567.ebuild
402 ===================================================================
403 # Copyright 1999-2008 Gentoo Foundation
404 # Distributed under the terms of the GNU General Public License v2
405 # $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.21_pre15567.ebuild,v 1.1 2008/01/24 15:58:11 cardoe Exp $
406
407 inherit flag-o-matic multilib eutils qt3 mythtv subversion toolchain-funcs
408
409 DESCRIPTION="Homebrew PVR project"
410 SLOT="0"
411 KEYWORDS="~amd64 ~ppc ~x86"
412
413 IUSE_VIDEO_CARDS="video_cards_i810 video_cards_nvidia video_cards_via"
414
415 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}"
416
417 RDEPEND=">=media-libs/freetype-2.0
418 >=media-sound/lame-3.93.1
419 x11-libs/libX11
420 x11-libs/libXext
421 x11-libs/libXinerama
422 x11-libs/libXv
423 x11-libs/libXrandr
424 x11-libs/libXxf86vm
425 xvmc? (
426 x11-libs/libXvMC
427 video_cards_nvidia? ( x11-drivers/nvidia-drivers )
428 video_cards_via? ( x11-drivers/xf86-video-via )
429 video_cards_i810? ( x11-drivers/xf86-video-i810 )
430 )
431 $(qt_min_version 3.3)
432 virtual/mysql
433 virtual/opengl
434 virtual/glu
435 || ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 )
436 alsa? ( >=media-libs/alsa-lib-0.9 )
437 dts? ( || ( media-libs/libdca media-libs/libdts ) )
438 dvd? ( media-libs/libdvdnav )
439 dvb? ( media-libs/libdvb media-tv/linuxtv-dvb-headers )
440 directv? ( virtual/perl-Time-HiRes )
441 ivtv? ( media-tv/ivtv )
442 jack? ( media-sound/jack-audio-connection-kit )
443 lcd? ( app-misc/lcdproc )
444 lirc? ( app-misc/lirc )
445 perl? ( dev-perl/DBD-mysql )
446 vorbis? ( media-libs/libvorbis )
447 ieee1394? ( >=sys-libs/libraw1394-1.2.0
448 >=sys-libs/libavc1394-0.5.0
449 >=media-libs/libiec61883-1.0.0 )
450 autostart? ( net-dialup/mingetty
451 x11-wm/evilwm
452 x11-apps/xset )"
453
454 DEPEND="${RDEPEND}
455 x11-proto/xineramaproto
456 x11-proto/xf86vidmodeproto
457 x11-apps/xinit"
458
459 PDEPEND="=x11-themes/mythtv-themes-${MY_PV}*"
460
461 S="${WORKDIR}/${PN}-${MY_PV}"
462
463 MYTHTV_GROUPS="video,audio,tty,uucp"
464
465 pkg_setup() {
466
467 local rip=0
468 if ! built_with_use -a =x11-libs/qt-3* mysql opengl ; then
469 echo
470 eerror "MythTV requires Qt to be built with mysql and opengl use flags enabled."
471 eerror "Please re-emerge =x11-libs/qt-3*, after having the use flags set."
472 echo
473 rip=1
474 fi
475
476 if use xvmc && use video_cards_nvidia; then
477 echo
478 ewarn "You enabled the 'xvmc' USE flag, you must have a GeForce 4 or"
479 ewarn "greater to use this. Otherwise, you'll have crashes with MythTV"
480 echo
481 fi
482
483 if use xvmc && ! ( use video_cards_i810 || use video_cards_nvidia || use video_cards_via ); then
484 echo
485 eerror "You enabled the XvMC USE flag but did not configure VIDEO_CARDS with either"
486 eerror "an nVidia, Intel i810, or VIA video card."
487 echo
488 rip=1
489 fi
490
491 [[ $rip == 1 ]] && die "Please fix the above issues, before continuing."
492
493 echo
494 einfo "This ebuild now uses a heavily stripped down version of your CFLAGS"
495 einfo "Don't complain because your -momfg-fast-speed CFLAG is being stripped"
496 einfo "Only additional CFLAG issues that will be addressed are for binary"
497 einfo "package building."
498 echo
499 }
500
501 src_unpack() {
502 subversion_src_unpack
503
504 # As needed fix since they don't know how to write qmake let alone a real
505 # make system. And they won't accept this upstream since it comes from
506 # Gentoo
507 #epatch "${FILESDIR}"/${PN}-0.20-as-needed.patch
508
509 # upstream wants the revision number in their version.cpp
510 # since the subversion.eclass strips out the .svn directory
511 # svnversion in MythTV's build doesn't work
512 sed -e "s:\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`:${SVNREV}:" \
513 -i "${S}"/version.pro || die "svnversion sed failed"
514 }
515
516 src_compile() {
517 local myconf="--prefix=/usr
518 --mandir=/usr/share/man
519 --libdir-name=$(get_libdir)"
520 use alsa || myconf="${myconf} --disable-audio-alsa"
521 use jack || myconf="${myconf} --disable-audio-jack"
522 use dts && myconf="${myconf} --enable-libdts"
523 use dbox2 || myconf="${myconf} --disable-dbox2"
524 use hdhomerun || myconf="${myconf} --disable-hdhomerun"
525 use altivec || myconf="${myconf} --disable-altivec"
526 use ivtv || myconf="${myconf} --disable-ivtv"
527 use perl || myconf="${myconf} --without-bindings=perl"
528 use xvmc && myconf="${myconf} --enable-xvmc"
529 use xvmc && use video_cards_via && myconf="${myconf} --enable-xvmc-pro"
530 use xvmc && ! use video_cards_nvidia && myconf="${myconf} --disable-xvmc-opengl"
531 myconf="${myconf}
532 --disable-audio-arts
533 $(use_enable lirc)
534 $(use_enable joystick joystick-menu)
535 $(use_enable dvb)
536 --dvb-path=/usr/include
537 $(use_enable opengl opengl-vsync)
538 $(use_enable ieee1394 firewire)
539 $(use_enable iptv)
540 --enable-xrandr
541 --enable-xv
542 --disable-directfb
543 --enable-x11
544 --enable-proc-opt"
545
546 if use mmx || use amd64; then
547 myconf="${myconf} --enable-mmx"
548 else
549 myconf="${myconf} --disable-mmx"
550 fi
551
552 if use debug; then
553 myconf="${myconf} --compile-type=debug"
554 else
555 myconf="${myconf} --compile-type=release"
556 fi
557
558 ## CFLAG cleaning so it compiles
559 MARCH=$(get-flag "march")
560 MTUNE=$(get-flag "mtune")
561 MCPU=$(get-flag "mcpu")
562 strip-flags
563 filter-flags "-march=*" "-mtune=*" "-mcpu=*"
564 filter-flags "-O" "-O?"
565
566 if [[ -n "${MARCH}" ]]; then
567 myconf="${myconf} --arch=${MARCH}"
568 fi
569 if [[ -n "${MTUNE}" ]]; then
570 myconf="${myconf} --tune=${MTUNE}"
571 fi
572 if [[ -n "${MCPU}" ]]; then
573 myconf="${myconf} --cpu=${MCPU}"
574 fi
575
576 # myconf="${myconf} --extra-cxxflags=\"${CXXFLAGS}\" --extra-cflags=\"${CFLAGS}\""
577 hasq distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
578 hasq ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
579
580 # let MythTV come up with our CFLAGS. Upstream will support this
581 CFLAGS=""
582 CXXFLAGS=""
583 einfo "Running ./configure ${myconf}"
584 ./configure ${myconf} || die "configure died"
585
586 eqmake3 -o "Makefile" mythtv.pro || die "qmake failed"
587 emake || die "emake failed"
588
589 # firewire support should build the tester
590 if use ieee1394; then
591 cd contrib
592 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../firewire_tester firewire_tester.c \
593 ${LDFLAGS} -liec61883 -lraw1394 || \
594 die "failed to compile firewire_tester"
595
596 cd channel_changers
597 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -std=gnu99 -o ../../6200ch 6200ch.c \
598 ${LDFLAGS} -lrom1394 -lavc1394 -lraw1394 || \
599 die "failed to compile 6200ch"
600 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../../sa3250ch sa3250ch.c \
601 ${LDFLAGS} -lrom1394 -lavc1394 -lraw1394 || \
602 die "failed to compile sa3250ch"
603 # LDLIBS="-liec61883 -lraw1394" CC=$(tc-getCC) emake firewire_tester || \
604 # die "failed to compile firewire_tester"
605 fi
606
607 cd "${S}"/contrib/channel_changers
608 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ../../red_eye red_eye.c ${LDFLAGS} || \
609 die "failed to compile red_eye"
610 }
611
612 src_install() {
613
614 einstall INSTALL_ROOT="${D}" || die "install failed"
615 for doc in AUTHORS FAQ UPGRADING ChangeLog README; do
616 test -e "${doc}" && dodoc ${doc}
617 done
618
619 insinto /usr/share/mythtv/database
620 doins database/*
621
622 exeinto /usr/share/mythtv
623 doexe "${FILESDIR}/mythfilldatabase.cron"
624
625 newinitd "${FILESDIR}"/mythbackend-0.18.2.rc mythbackend
626 newconfd "${FILESDIR}"/mythbackend-0.18.2.conf mythbackend
627
628 dodoc keys.txt docs/*.{txt,pdf}
629 dohtml docs/*.html
630
631 keepdir /etc/mythtv
632 chown -R mythtv "${D}"/etc/mythtv
633 keepdir /var/log/mythtv
634 chown -R mythtv "${D}"/var/log/mythtv
635
636 insinto /etc/logrotate.d
637 newins "${FILESDIR}"/mythtv.logrotate.d mythtv
638
639 insinto /usr/share/mythtv/contrib
640 doins -r contrib/*
641
642 insinto /usr/share/mythtv/configfiles
643 doins configfiles/*
644
645 dobin "${FILESDIR}"/runmythfe
646
647 if use autostart; then
648 dodir /etc/env.d/
649 echo 'CONFIG_PROTECT="/home/mythtv/"' > "${D}"/etc/env.d/95mythtv
650
651 insinto /home/mythtv
652 newins "${FILESDIR}"/bash_profile .bash_profile
653 newins "${FILESDIR}"/xinitrc .xinitrc
654 fi
655
656 if use ieee1394; then
657 dobin firewire_tester || die "failed to install firewire_tester"
658 dodoc contrib/firewire_tester-README
659
660 dobin 6200ch || die "failed to install 6200ch"
661 dodoc contrib/channel_changers/6200ch-README
662
663 dobin sa3250ch || die "failed to install sa3250ch"
664 dodoc contrib/channel_changers/sa3250ch-README
665 fi
666
667 dobin red_eye || die "failed to install red_eye"
668 dodoc contrib/channel_changers/red_eye-README
669
670 if use directv; then
671 dobin contrib/channel_changers/d10control.pl || die "failed to install d10control"
672 dodoc contrib/channel_changers/d10control-README
673 fi
674 }
675
676 pkg_preinst() {
677 enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} || die "Problem adding mythtv user"
678 usermod -a -G ${MYTHTV_GROUPS} mythtv
679
680 export CONFIG_PROTECT="${CONFIG_PROTECT} ${ROOT}/home/mythtv/"
681 }
682
683 pkg_postinst() {
684 echo
685 elog "Want mythfrontend to start automatically?"
686 elog "Set USE=autostart. Details can be found at:"
687 elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html"
688
689 echo
690 elog "To always have MythBackend running and available run the following:"
691 elog "rc-update add mythbackend default"
692 echo
693 ewarn "Your recordings folder must be owned by the user 'mythtv' now"
694 ewarn "chown -R mythtv /path/to/store"
695
696 if use autostart; then
697 echo
698 elog "Please add the following to your /etc/inittab file at the end of"
699 elog "the TERMINALS section"
700 elog "c8:2345:respawn:/sbin/mingetty --autologin mythtv tty8"
701 fi
702
703 }
704
705 pkg_info() {
706 /usr/bin/mythfrontend --version
707 }
708
709 pkg_config() {
710 echo "Creating mythtv MySQL user and mythconverg database if it does not"
711 echo "already exist. You will be prompted for your MySQL root password."
712 /usr/bin/mysql -u root -p < /usr/share/mythtv/database/mc.sql
713 }
714
715
716
717 --
718 gentoo-commits@l.g.o mailing list