Mythtv

Install according to http://buffalo.nas-central.org/wiki/Debian_on_the_Kurobox using http://buffalo.nas-central.org/wiki/Debian_sylver

Then update your apt sources (if you are not running the latest version of Debian (4.0 at the time of writing) you will need to change "stable" in the lines below for the name of your distribution (e.g. "sarge" for version 3.1), for more information visit http://wiki.debian.org/SourcesList?action=show&redirect=sources.list) deb http://ftp.debian.org/debian stable main contrib non-free deb-src http://ftp.debian.org/debian stable main contrib non-free deb http://security.debian.org/ stable/updates main contrib non-free deb-src http://security.debian.org/ stable/updates main contrib non-free
 * 1) /etc/apt/sources.list
 * 2)  Debian Main
 * 1)  Debian Main
 * 1)  Debian Security Updates
 * 1)  Debian Security Updates

deb http://www.debian-multimedia.org stable main deb-src http://www.debian-multimedia.org stable main deb http://http.us.debian.org/debian stable main contrib non-free deb-src http://http.us.debian.org/debian stable main contrib non-free
 * 1) Christian Marillat's packages (MythTV, mplayer, lame)

I've added the following to default things to Sarge in /etc/apt/apt.conf (if it is missing this can be the only contents when you create it) APT::Default-Release "stable";

Update and sort out dependencies. I prefer to use aptitude since some of the dependencies are a little dicey, but this will work too. apt-get update apt-get build-dep mythtv

Download source and configure options. apt-get source mythtv --download-only dpkg-source -x mythtv_0.20-svn20070223-0.0.dsc cd mythtv-0.20-svn20070223 echo --disable-altivec > config.opts

The curent patch to allow compilation for the release-20-fixes branch in a file I called KuroHG-DisableAltivec.patch Index: libs/libmythmpeg2/cpu_accel.c

=
====================================================== --- libs/libmythmpeg2/cpu_accel.c      (revision 12297) +++ libs/libmythmpeg2/cpu_accel.c      (working copy) @@ -149,7 +149,7 @@ static uint32_t arch_accel (uint32_t accel) { -#ifdef ACCEL_DETECT +#if defined(ACCEL_DETECT) && defined(HAVE_ALTIVEC) if ((accel & (MPEG2_ACCEL_PPC_ALTIVEC | MPEG2_ACCEL_DETECT)) ==       MPEG2_ACCEL_DETECT) { static RETSIGTYPE (* oldsig) (int); Index: libs/libmythmpeg2/motion_comp.c
 * 1) ifdef ARCH_PPC

=
====================================================== --- libs/libmythmpeg2/motion_comp.c    (revision 12297) +++ libs/libmythmpeg2/motion_comp.c    (working copy) @@ -44,7 +44,7 @@    else -#ifdef ARCH_PPC +#ifdef HAVE_ALTIVEC if (accel & MPEG2_ACCEL_PPC_ALTIVEC) mpeg2_mc = mpeg2_mc_altivec; else Index: libs/libmythmpeg2/idct.c
 * 1) endif /* MMX */
 * 2) endif

=
====================================================== --- libs/libmythmpeg2/idct.c   (revision 12297) +++ libs/libmythmpeg2/idct.c   (working copy) @@ -248,7 +248,7 @@    } else -#ifdef ARCH_PPC +#ifdef HAVE_ALTIVEC if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { mpeg2_idct_copy = mpeg2_idct_copy_altivec; mpeg2_idct_add = mpeg2_idct_add_altivec; Index: libs/libmythmpeg2/cpu_state.c
 * 1) endif
 * 2) endif

=
====================================================== --- libs/libmythmpeg2/cpu_state.c      (revision 12297) +++ libs/libmythmpeg2/cpu_state.c      (working copy) @@ -43,7 +43,7 @@ }
 * 1) endif

-#ifdef ARCH_PPC +#ifdef HAVE_ALTIVEC @@ -120,7 +120,7 @@       mpeg2_cpu_state_restore = state_restore_mmx; } -#ifdef ARCH_PPC +#ifdef HAVE_ALTIVEC if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { mpeg2_cpu_state_save = state_save_altivec; mpeg2_cpu_state_restore = state_restore_altivec;
 * 1) if defined(HAVE_ALTIVEC_H) && !defined(CONFIG_DARWIN) /* gnu */
 * 2) define LI(a,b) "li " #a "," #b "\n\t"
 * 3) define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
 * 1) endif

patch the source with: patch -u -p 0 < KuroHG-DisableAltivec.patch

alter the debian/changelog to the desired package name from: mythtv (0.20-svn20070223-0.0) unstable; urgency=low

to: mythtv (0.20-svn20070223-KUROHG-0.0) unstable; urgency=low

build the packages and install! CONFIGURE_OPTS=`cat config.opts` dpkg-buildpackage cd .. dpkg --install *myth*.deb

add to end of /etc/lighttpd/lighttpd.conf to use lighttpd instead of apache. server.modules += ("mod_rewrite","mod_fastcgi","mod_setenv") index-file.names += ("mythweb.php") fastcgi.server   = ( ".php" =>        ( "localhost" => (               "bin-path" => "/usr/bin/php4-cgi",                "socket" => "/tmp/php-fastcgi.socket",                "max-procs" => 2,                "idle-timeout" => 20,                "bin-environment" => ( "db_server" => "localhost", "db_name" => "mythconverg", "db_login" => "mythtv", "db_password" => "mythtv" ),               "broken-scriptfilename" => "enable"        ))

) url.rewrite-once = ( "^/mythweb/(tv.*|music.*|video.*|weather.*|settings.*|status.*|backend_log.*)$" => "/mythweb/mythweb.php/$1", )