<?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>81372</bug_id>
          
          <creation_ts>2005-02-09 07:24 0000</creation_ts>
          <short_desc>EBUILD: media-tv/mythtv-0.16.20050115 viaXvMC (cle266) support</short_desc>
          <delta_ts>2005-02-10 06:36:22 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>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://sourceforge.net/project/shownotes.php?release_id=266463</bug_file_loc>
          
          <keywords>InCVS</keywords>
          <priority>P4</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>deepshag@gmail.com</reporter>
          <assigned_to>media-tv@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>deepshag@gmail.com</who>
            <bug_when>2005-02-09 07:24:05 0000</bug_when>
            <thetext>SYMPTOMS:  Ebuild appears to compile normally, free of errors, but when user attempts to play a recorded program or view live TV, mythfrontend crashes entirely, and returns error messages indicating that it failed to initialize the  XvMC control.

SCOPE:  Affects gentoo users running MythTV on an computer using the Via CLE266 hardware MPEG decoder.  Primary users of the Via Epia mini-ITX motherboard family.

This one took me a minute to track down, but there is an error in the use of sed to uncomment lines in the file settings.pro (located /var/tmp/portage/mythtv-0.16.20050115/work/mythtv/settings.pro).  It should be noted also that the settings.pro included with mythtv-0.16 is non-standard to start with, and not all of the via XvMC lines start out commented out, like they should (to make it like the nvidia XvMC lines).  

The original calls from the ebuild are (lines 131-140):
  if use cle266 ; then
    sed -e &apos;s:#EXTRA_LIBS += -lviaXvMC -lXvMC:EXTRA_LIBS += -lviaXvMC -lXvMC:&apos; \
      -i &apos;settings.pro&apos; || die &quot;enable cle266 sed failed&quot;
  fi

  if ! use cle266 ; then
    sed -e &apos;s:CONFIG += using_xvmc using_xvmc_vld:#CONFIG += using_xvmc using_xvmc_vld:&apos; \
      -e &apos;s:DEFINES += USING_XVMC USING_XVMC_VLD:#DEFINES += USING_XVMC USING_XVMC_VLD:&apos; \
      -i &apos;settings.pro&apos; || die &quot;disable VLD XvMC sed failed&quot;
  fi

Should be replaced with:
  if use cle266 ; then
    sed -e &apos;s:#CONFIG += using_xvmc using_xvmc_vld:CONFIG += using_xvmc using_xvmc_vld:&apos; \
      -e &apos;s:#DEFINES += USING_XVMC USING_XVMC_VLD:DEFINES += USING_XVMC USING_XVMC_VLD:&apos; \
      -e &apos;s:#EXTRA_LIBS += -lviaXvMC -lXvMC:EXTRA_LIBS += -lviaXvMC -lXvMC:&apos; \
      -i &apos;settings.pro&apos; || die &quot;enable cle266 sed failed&quot;
  fi

  if ! use cle266 ; then # needed because nvidia and cle266 are not compatible
    sed -e &apos;s:EXTRA_LIBS += -lviaXvMC -lXvMC:#EXTRA_LIBS += -lviaXvMC -lXvMC:&apos; \
      -i &apos;settings.pro&apos; || die &quot;disable VLD XvMC sed failed&quot;
  fi

I tested this ebuild after making these changes, and was able to successfully build mythtv 0.16 with viaXvMC support, and it acted normally (didn&apos;t crash as soon as it attempted an XvMC call).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>deepshag@gmail.com</who>
            <bug_when>2005-02-09 07:39:41 0000</bug_when>
            <thetext>Created an attachment (id=50831)
Patch to fix the via XvMC support in ebuild mythtv-0.16.20050115.ebuild
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2005-02-09 23:25:08 0000</bug_when>
            <thetext>Thanks. In CVS.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kallamej@gentoo.org</who>
            <bug_when>2005-02-10 06:36:22 0000</bug_when>
            <thetext>This fix breaks USE=&quot;nvidia -cle266&quot;, as the nvidia sed matches also the XvMC_VLD support. It results in the following settings.pro.

# XvMC support, modify as necessary.
CONFIG += using_xvmc
DEFINES += USING_XVMC
EXTRA_LIBS += -lXvMCNVIDIA -lXvMC

# XvMC_VLD support, modify as necessary. Incompatible with normal XvMC support.
CONFIG += using_xvmc using_xvmc_vld
DEFINES += USING_XVMC USING_XVMC_VLD
##EXTRA_LIBS += -lviaXvMC -lXvMC

Mythtv consequently fails to compile due to 

xvmc_render.h:13:36: X11/extensions/vldXvMC.h: No such file or directory

while compiling vmcvldvideo.c

The ! use cle266 case needs to be restored to its previous state.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>50831</attachid>
            <date>2005-02-09 07:39 0000</date>
            <desc>Patch to fix the via XvMC support in ebuild mythtv-0.16.20050115.ebuild</desc>
            <filename>patch-mythtv-0.16.20050115-viaXvMC-fix-ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIG15dGh0di0wLjE2LjIwMDUwMTE1LmVidWlsZAkyMDA1LTAyLTA5IDE2OjM5OjMyLjc0NjUy
ODk4NCArMDEwMAorKysgbXl0aHR2LTAuMTYuMjAwNTAyMDkuZWJ1aWxkCTIwMDUtMDItMDkgMTY6
Mzk6MzIuNzcyNTI1MDMyICswMTAwCkBAIC0xMjksMTMgKzEyOSwxNCBAQAogCWZpCiAKIAlpZiB1
c2UgY2xlMjY2IDsgdGhlbgotCQlzZWQgLWUgJ3M6I0VYVFJBX0xJQlMgKz0gLWx2aWFYdk1DIC1s
WHZNQzpFWFRSQV9MSUJTICs9IC1sdmlhWHZNQyAtbFh2TUM6JyBcCisJCXNlZCAtZSAnczojQ09O
RklHICs9IHVzaW5nX3h2bWMgdXNpbmdfeHZtY192bGQ6Q09ORklHICs9IHVzaW5nX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