[mythtv] Patch for PowerPC

Matt Zimmerman mdz at debian.org
Tue Mar 23 13:33:19 EST 2004

On Mon, Mar 22, 2004 at 08:41:14PM -0800, Mino Taoyama wrote:

> I've been able to get MythTV working on a PowerMac G4 (Dual 1.25GHz) 
> running YellowDog Linux 3.0.  It required some changes to the sources.  
> I've included a patch against the 0.14 release.
> 1) Added PowerPC settings in settings.pro and commented out x86 support.

This should be done in such a way as to automatically select the proper
settings; qmake may already provide a "scope" which lets you conditionalize
things based on architecture.

> 2) Needed to fix a few items in libavcoded.pro.
>     a) Changed TARGET_ARCH_ALTIVEC to TARGET_ALTIVEC.  This was needed 
> since the config.mak uses TARGET_ALTIVEC.
>     b) Added a line to include some missing altivec sources. 
> (ppc/gmc_altivec.c ppc/fdct_altivec.c ppc/fft_altivec.c)

Applied to CVS.

> 3) Had to change vsync.c in libmythtv since PPC does not have a 
> sys/io.h file.  It also required conditionally compiling the x86 
> specific code.
>     a) Added an #if i386 around including 'sys/io.h' since this header 
> only exists in x86.
>     b) Added an #if i386 around the code in 'vgasync_cleanup'
>     c) Added an conditional compile so the routine 'vgasync_init' 
> returns a 0.
>     d) Added an #if i386 around the code in 
> 'vgasync_spin_until_end_of_next_refresh'
>     e) Added an #if i386 around the code in 
> 'vgasync_spin_until_out_of_refresh'

Probably the i386-specific parts of this file should be moved into a
separate file, which would not even be compiled on non-i386.  This is
cleaner and more maintainable than adding many #ifs.

 - mdz

More information about the mythtv-dev mailing list