<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>12257</bug_id>
          
          <creation_ts>2002-12-16 14:53 0000</creation_ts>
          <short_desc>xvid 0.9.0 does not build on ppc</short_desc>
          <delta_ts>2006-02-04 06:03:35 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>PPC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>rajiv@gentoo.org</reporter>
          <assigned_to>rajiv@gentoo.org</assigned_to>
          <cc>azarah@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>rajiv@gentoo.org</who>
            <bug_when>2002-12-16 14:53:12 0000</bug_when>
            <thetext>xvid-0.9.0.ebuild does not build on ppc:


&gt;&gt;&gt; emerge (11 of 16) media-libs/xvid-0.9.0 to /
&gt;&gt;&gt; md5 ;-) xvidcore-0.9.0.tar.bz2
&gt;&gt;&gt; Unpacking source...
&gt;&gt;&gt; Unpacking xvidcore-0.9.0.tar.bz2
ppc
&gt;&gt;&gt; Source unpacked.
gcc -O3 -pipe -fsigned-char -Wall -Os -funroll-loops -ffast-math
-fstrict-aliasing -fomit-frame-pointer -fPIC   -c -o ../../src/decoder.o
../../src/decoder.c
gcc -O3 -pipe -fsigned-char -Wall -Os -funroll-loops -ffast-math
-fstrict-aliasing -fomit-frame-pointer -fPIC   -c -o ../../src/divx4.o
../../src/divx4.c
In file included from ../../src/decoder.c:66:
../../src/portab.h:143:6: #error Architecture not supported.
../../src/portab.h:349:10: #error Architecture not supported.
.... with many more errors.

if you look at portab.h you will see:

#if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_MIPS)  ||
defined(ARCH_SPARC)
#    define CACHE_LINE  16
#    define ptr_t uint32_t
#elif defined(ARCH_IA64)
#    define CACHE_LINE  32
#    define ptr_t uint64_t
#else
#    error Architecture not supported.
#endif

and in the original makefiles there is stuff like:

# Constants which should not be modified
CFLAGS += -DLINUX
CFLAGS += -DARCH_PPC
CFLAGS += -DARCH_IS_BIG_ENDIAN

yet the ebuild has:

        if use ppc; then
                sed -e &quot;s:^CC:#CC:&quot; \
                        -e &quot;s:^LIBDIR:#LIBDIR:&quot; \
                        -e &quot;s:^CFLAGS +=:#CFLAGS +=:&quot; \
                        -e &quot;s:^CFLAGS =:CFLAGS +=:&quot; \
                        Makefile.linuxppc &gt; Makefile

so the necessary -DARCH_xxx and others gets commented out.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>azarah@gentoo.org</who>
            <bug_when>2002-12-16 15:05:32 0000</bug_when>
            <thetext>I think the:

-------------------------------
        if use ppc; then
                sed -e &quot;s:^CC:#CC:&quot; \
                        -e &quot;s:^LIBDIR:#LIBDIR:&quot; \
                        -e &quot;s:^CFLAGS +=:#CFLAGS +=:&quot; \
                        -e &quot;s:^CFLAGS =:CFLAGS +=:&quot; \
                        Makefile.linuxppc &gt; Makefile
-------------------------------

should be:

-------------------------------
        if use ppc; then
                sed -e &quot;s:^CC:#CC:&quot; \
                        -e &quot;s:^LIBDIR:#LIBDIR:&quot; \
                        -e &quot;s:^CFLAGS +=:#CFLAGS +=:&quot; \
                        -e &quot;s:^CFLAGS =:CFLAGS +=:&quot; \
                        -e &quot;s:^#CFLAGS += -D:CFLAGS += -D:&quot; \
                        Makefile.linuxppc &gt; Makefile
-------------------------------

Like I told Rajiv, i think those seds are needed for cvs snapshots,
but cant remember now ..</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rajiv@gentoo.org</who>
            <bug_when>2002-12-19 20:19:17 0000</bug_when>
            <thetext>i removed those sed lines from ppc section of src_compile() since we are not
using a cvs snapshot for this ebuild. xvid now builds properly on ppc.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>