Introduce mythtv 0.24.1
authorRichard Freeman <rich0@gentoo.org>
Sun, 18 Dec 2011 04:15:55 +0000 (04:15 +0000)
committerRichard Freeman <rich0@gentoo.org>
Sun, 18 Dec 2011 04:15:55 +0000 (04:15 +0000)
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64

media-tv/mythtv/ChangeLog
media-tv/mythtv/Manifest
media-tv/mythtv/files/ffmpeg-sync.patch [new file with mode: 0644]
media-tv/mythtv/files/fixLdconfSandbox.patch [new file with mode: 0644]
media-tv/mythtv/files/mythtv-v4l2-fix.2.patch [new file with mode: 0644]
media-tv/mythtv/metadata.xml
media-tv/mythtv/mythtv-0.24.1_p20110524.ebuild [new file with mode: 0644]

index fa2b88877f5b5eee34001f6ab3caec1f4e5f3e43..8273b62fbc932c51114cd8c0981f13a3e7df9760 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for media-tv/mythtv
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.334 2011/07/28 21:10:59 neurogeek Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.335 2011/12/18 04:15:55 rich0 Exp $
+
+*mythtv-0.24.1_p20110524 (17 Dec 2011)
+
+  17 Dec 2011; Richard Freeman <rich0@gentoo.org> +files/ffmpeg-sync.patch,
+  +files/fixLdconfSandbox.patch, +files/mythtv-v4l2-fix.2.patch,
+  +mythtv-0.24.1_p20110524.ebuild:
+  Introduce mythtv 0.24.1
 
   28 Jul 2011; Jesus Rivero <neurogeek@gentoo.org>
   mythtv-0.23.1_p27077.ebuild:
index f1e146f0fcdf35e48a76c254a809ee4c5e07d7a8..037ce712e9ab576a83f2486568a92b38bfdc805b 100644 (file)
@@ -1,25 +1,30 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
 
 AUX bash_profile 63 RMD160 71ed6a00c824f8d2704b65371e54adb85ca6d861 SHA1 cd4bc03298d30fadb759d1a2463e930441c5a5e7 SHA256 9a753f699d07b5f481374d13ea3f2b2439a22f3a9a49b6280cc8d9eebf0b2ca9
+AUX ffmpeg-sync.patch 457 RMD160 911dc0264e77e3ef62dea14a874c427b6aae4015 SHA1 9fb1f64029fed6c45463a2612376a2126e362c76 SHA256 ee3c283d1619e7609f58485e9858c0b2a77b8d14f2f47deba45c874aec09231b
+AUX fixLdconfSandbox.patch 386 RMD160 83f311a9b28516310a8bc906c415be29d8c7818b SHA1 5dbc422510c2c7184567e8e2ed271c491c9ea325 SHA256 466668c48f3b21d64de464cf33971bcb1f12237da705a5a77dfa4fad1f687a93
 AUX mythbackend-0.18.2.conf 1430 RMD160 f966c40618592cae62a2e4345bb4cd5847ec0de6 SHA1 2a3cb59593c4fd1ba431b4ebe70b91782a418a02 SHA256 0b6d0514d410bdcbeaebded48488926fc2941edaeee518794d9884693a4eb9db
 AUX mythbackend-0.18.2.rc 1128 RMD160 0297452b3d9fe09479c737d136a73171a35eb643 SHA1 df4fe1ca7750c3ed27c9f5bbeb28dcebb36f9b1d SHA256 be994a8b6690e830820e82316f4ccce5b7f84ce68213de75e3740818227f6f3c
 AUX mythfilldatabase.cron 73 RMD160 ce57516fe3ac3f339ebaad6b88c85366d4dbbc5b SHA1 7ae24184f931336f317eaefaa7c27a8e4531e0ee SHA256 fc5a3b094fd403e9076fbb1903e826ddc97bd579cb0ba7ef6fc11940099fca3d
 AUX mythtv-0.21-ldconfig-sanxbox-fix.patch 448 RMD160 4a5f9f7824c2c31f2a875f2fe25bcbd5b8f87e25 SHA1 2fe5f624ca80ecf097c45e12a3a9cd8038e92377 SHA256 aecead5240507fd0ccadad337160c79a9d7125d47e085f2bf167d9fecd2a804e
 AUX mythtv-0.22-x86-no-fpic.patch 948 RMD160 2711e1764e8054fb494dd1e616a5d4808bb06872 SHA1 a0d1b57fccdb503cfbc8c6276907187d664629ab SHA256 4c386b7e0821708da46f611f2ebfd987019b5d0355ec9101ce3a7bae3c1d17d9
+AUX mythtv-v4l2-fix.2.patch 21826 RMD160 c417dae2a6b8b4435cfb1721b715bf8baf56b8dc SHA1 a6e86ea8d2f71aacb5c881827c9323b5d27f9e47 SHA256 b14f5fcb1982f22ec89ffe6bde2494e7911901b52315fa0edac58bd072e842d7
 AUX mythtv.logrotate.d 434 RMD160 c76842df30c1e9cc772f57dd3a3532c017d4176d SHA1 f5e772659b2616a55ca7326f65d8917352029b51 SHA256 a9032f190b28c3778340799be668779638ee09cf85e8febc669443f3aaf3578c
 AUX mythtv.logrotate.d-r1 474 RMD160 8c2be94b32ad715b5127d7a18a5c70838a9e23b7 SHA1 31c7ea88738641ea17a554ddc227bcc5f8ecdb51 SHA256 e55228b8f79dbea32601f6be4e368a1f44e3b9d6a7d5d311ba9444ace5da052c
 AUX mythtv.png 2652 RMD160 557469c29583b3935558b9d4153579943bc041f5 SHA1 0f002c1541ac787be262a027b77c1ffd8141ce9d SHA256 3bb70a05dae6777bb61aea26b8852966bd3923714752e928f99eab8a9e6fcaa7
 AUX runmythfe 186 RMD160 e4b5bfeaecbf541e6cc45b6a9c0e5c048e3fccd0 SHA1 f5ec9dfd4781b28c0af8745c282ce242141590d8 SHA256 bebc665f37b21193be2f259cb8daf6863dfd4336e4e1424a7a989d6b679964fe
 AUX xinitrc 240 RMD160 9c0c1030aa65c8fd3f20501f45757515a9208a61 SHA1 11795aa8be5bd668d91acdd61aa80d5cc8af5cac SHA256 770990183ce8df60bf3bcbc3a334558155aedd0a80357556261fb938b4254e94
 DIST mythtv-0.23.1_p27077.zip 32275426 RMD160 a6a60cb2ed072001992848474257313a927db26a SHA1 00a3db7d1000bffaf9480bacd48c4565f0879756 SHA256 0a92404bd1763f145450df9b107b34aab4a285fbfb3a940954d84c9782e2b952
+DIST mythtv-0.24.1_p20110524.tar.gz 69756131 RMD160 e42fd2350d2b0199805e4f6e62646c8d835f353b SHA1 db7a91f237cd64c0604e7ee1672b041c37fe5e06 SHA256 ea3e37258f8596c9186865289ffd8f9ece9fc80d28a2ded80bd008544138a863
 EBUILD mythtv-0.23.1_p27077.ebuild 10360 RMD160 9748fd3d9d5671bbb92536d03e589f1ec52ac05e SHA1 d0a60bd836b1f91ecfe67ae22413489483927ed7 SHA256 741dca17e7c10bb5b0d11c8d95737f86f7bc19b543104829615ca47061d5966d
-MISC ChangeLog 66175 RMD160 00d5ead791f0d7c476e48dee228d3667a3eb69cb SHA1 4813d70312c40ebbc00855a2db0139a886341648 SHA256 c9e5b2824cfaf5027a906e41ca96e8815e7c193ebd720f5f93e5975f69e4e1be
-MISC metadata.xml 3277 RMD160 46cdf33001f42c1fa6bc6f4321011078918c9081 SHA1 2adadd184fc16a93be980999c5410130a949e570 SHA256 6fa2b5e0529887435076607cd779290b7a21707e6b08e594cc368c21f05ac702
+EBUILD mythtv-0.24.1_p20110524.ebuild 9287 RMD160 7d59f1c39a8872d453c58f25dd3defc39ed3f613 SHA1 a992a41d65966cf1003b7b376fecc73a1d310848 SHA256 d435e80f4b6cd64773af6c1a7f103981f6e3ad81a8f656d83e66fba0922b7ba1
+MISC ChangeLog 66414 RMD160 fd88ef1d62f6d7f6a13af4d4bdd7be438b18d6cc SHA1 098b849bba474858280a20b09537c85733e29067 SHA256 6342d2462761105978517162e8936e04977b3e70ec0e199e50607fc3ba795d7b
+MISC metadata.xml 3344 RMD160 41bcdb116736e6498e18d37a8bd18f007fc50382 SHA1 3d8ea99a8d0e3b798ef0617cd07cac4ca2f676ba SHA256 e92e92389e4c7316d076d08181de60ea278641ecc5eb5369ea52d8402ba32c05
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.16 (GNU/Linux)
+Version: GnuPG v2.0.17 (GNU/Linux)
 
-iEYEARECAAYFAk4x0J0ACgkQdIssYB9vBoPJfQCfUs0eoYHcsqX1EpN/zoy19XV6
-5w8AoIGEOagCG6eAedjrHegViwd0bQP/
-=nqdV
+iF4EAREIAAYFAk7taQYACgkQCMFw3lXsEjowkQD/SqlR5lDZI0tzjX0yH4KNxfdU
+ZSGSRTjumJ1Tr700tuoA/396wfDS8gM2gHtAjBqa1qYPMrrnnZ/T+w+1V8krK2VM
+=W3Ec
 -----END PGP SIGNATURE-----
diff --git a/media-tv/mythtv/files/ffmpeg-sync.patch b/media-tv/mythtv/files/ffmpeg-sync.patch
new file mode 100644 (file)
index 0000000..ca7b3a2
--- /dev/null
@@ -0,0 +1,16 @@
+Index: configure
+===================================================================
+--- configure  (revision 25841)
++++ configure  (working copy)
+@@ -4745,7 +4745,7 @@
+ cat >> external/FFmpeg/config.mak <<EOF
+ LIBDIR=\$(INSTALL_ROOT)$libdir
+ SHLIBDIR=\$(INSTALL_ROOT)$shlibdir
+-INCDIR=\$(INSTALL_ROOT)$incdir
++INCDIR=$incdir
+-BINDIR=\$(INSTALL_ROOT)$bindir
++BINDIR=$bindir
+-DATADIR=\$(INSTALL_ROOT)$datadir
++DATADIR=$datadir
+ MANDIR=\$(INSTALL_ROOT)$mandir
+
diff --git a/media-tv/mythtv/files/fixLdconfSandbox.patch b/media-tv/mythtv/files/fixLdconfSandbox.patch
new file mode 100644 (file)
index 0000000..075b220
--- /dev/null
@@ -0,0 +1,10 @@
+Index: programs/mythfrontend/mythfrontend.pro
+===================================================================
+--- programs/mythfrontend/mythfrontend.pro     (revision 26148)
++++ programs/mythfrontend/mythfrontend.pro     (working copy)
+@@ -86,3 +86,5 @@
+ using_jack:DEFINES += USING_JACK
+ using_oss: DEFINES += USING_OSS
+ macx:      DEFINES += USING_COREAUDIO
++
++setting.extra -= -ldconfig
diff --git a/media-tv/mythtv/files/mythtv-v4l2-fix.2.patch b/media-tv/mythtv/files/mythtv-v4l2-fix.2.patch
new file mode 100644 (file)
index 0000000..e26e166
--- /dev/null
@@ -0,0 +1,724 @@
+diff --git a/mythtv/configure b/mythtv/configure
+index 1efe803..7bcdf06 100755
+--- a/mythtv/configure
++++ b/mythtv/configure
+@@ -109,7 +109,8 @@ Advanced options (experts only):
+   --disable-iptv           disable support for recording RTSP/UDP/RTP streams
+   --disable-hdhomerun      disable support for HDHomeRun boxes
+   --disable-v4l            disable Video4Linux support
+-  --disable-ivtv           disable ivtv support (PVR-x50) req. v4l support
++  --disable-v4l2           disable Video4Linux2 support
++  --disable-ivtv           disable ivtv support (PVR-x50) req. v4l2 support
+   --disable-hdpvr          disable HD-PVR support
+   --disable-dvb            disable DVB support
+   --dvb-path=HDRLOC        location of directory containing
+@@ -1315,6 +1316,7 @@ MYTHTV_CONFIG_LIST='
+     qtwebkit
+     quartz_video
+     v4l
++    v4l2
+     valgrind
+     x11
+     xrandr
+@@ -1706,8 +1708,8 @@ audio_oss_deps_any="soundcard_h sys_soundcard_h"
+ dvb_deps="backend"
+ firewire_deps="backend"
+ iptv_deps="backend"
+-ivtv_deps="backend v4l"
+-hdpvr_deps="backend v4l"
++ivtv_deps="backend v4l2"
++hdpvr_deps="backend v4l2"
+ hdhomerun_deps="backend"
+ mpegtsraw_demuxer_deps="merge_libavformat_mpegts_c"
+ mythtranscode_deps="backend frontend"
+@@ -1715,6 +1717,7 @@ opengl_deps_any="agl_h GL_gl_h darwin windows x11"
+ opengl_video_deps="opengl"
+ opengl_vsync_deps="opengl"
+ v4l_deps="backend linux_videodev_h linux_videodev2_h"
++v4l2_deps="backend linux_videodev2_h"
+ vdpau_deps="opengl vdpau_vdpau_h vdpau_vdpau_x11_h"
+ xrandr_deps="x11"
+ xv_deps="x11"
+@@ -1933,6 +1936,7 @@ enable opengl_vsync
+ enable opengl_video
+ enable quartz_video
+ enable v4l
++enable v4l2
+ enable x11
+ enable xrandr
+ enable xv
+@@ -3062,6 +3066,7 @@ EOF
+         fi
+         disable opengl_vsync
+         disable v4l
++        disable v4l2
+         disable x11
+         # Workaround compile errors from missing gmtime_r/localtime_r/uint def
+         CFLAGS=`echo $CFLAGS | sed 's/-D_POSIX_C_SOURCE=200112//'`
+@@ -3106,6 +3111,7 @@ EOF
+         fi
+         disable symver
+         disable v4l
++        disable v4l2
+         enable  windows
+         disable x11
+         ###### Standard ffmpeg configure stuff follows:
+@@ -4375,6 +4381,7 @@ enabled stripping || strip="echo skipping strip"
+ if enabled backend; then
+   echo "Video4Linux sup.          ${v4l-no}"
++  echo "Video4Linux2 sup.         ${v4l2-no}"
+   echo "ivtv support              ${ivtv-no}"
+   echo "HD-PVR support            ${hdpvr-no}"
+   echo "FireWire support          ${firewire-no}"
+diff --git a/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp b/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
+index 739634d..39e5956 100644
+--- a/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
++++ b/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
+@@ -42,9 +42,13 @@ extern "C" {
+ #include "libswscale/swscale.h"
+ }
++#if defined(USING_V4L) || defined(USING_V4L2)
+ #ifdef USING_V4L
+ #include <linux/videodev.h>
++#endif
++#ifdef USING_V4L2
+ #include <linux/videodev2.h>
++#endif
+ #include "go7007_myth.h"
+@@ -55,9 +59,9 @@ extern "C" {
+ extern "C" {
+ #include "vbitext/vbi.h"
+ }
+-#else  // USING_V4l
++#else  // USING_V4L || USING_V4L2
+ #define VT_WIDTH 0
+-#endif // USING_V4l
++#endif // USING_V4l || USING_V4L2
+ #define KEYFRAMEDIST   30
+@@ -1019,7 +1023,7 @@ bool NuppelVideoRecorder::Open(void)
+ void NuppelVideoRecorder::ProbeV4L2(void)
+ {
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     usingv4l2 = true;
+     struct v4l2_capability vcap;
+@@ -1049,7 +1053,7 @@ void NuppelVideoRecorder::ProbeV4L2(void)
+     QString driver = (char *)vcap.driver;
+     if (driver == "go7007")
+         go7007 = true;
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ }
+ void NuppelVideoRecorder::StartRecording(void)
+@@ -2460,7 +2464,7 @@ void NuppelVideoRecorder::doAudioThread(void)
+         audio_device->Close();
+ }
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+ struct VBIData
+ {
+     NuppelVideoRecorder *nvr;
+@@ -2634,9 +2638,9 @@ void NuppelVideoRecorder::FormatTeletextSubtitles(struct VBIData *vbidata)
+         act_text_buffer = 0;
+     textbuffer[act]->freeToEncode = 1;
+ }
+-#else  // USING_V4L
++#else  // USING_V4L || USING_V4L2
+ void NuppelVideoRecorder::FormatTeletextSubtitles(struct VBIData *vbidata) {}
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ void NuppelVideoRecorder::FormatCC(struct cc *cc)
+ {
+@@ -2863,7 +2867,7 @@ void NuppelVideoRecorder::doVbiThread(void)
+     //VERBOSE(VB_RECORD, LOC + "vbi end");
+ }
+-#else  // USING_V4L
++#else  // USING_V4L 
+ void NuppelVideoRecorder::doVbiThread(void) { }
+ #endif // USING_V4L
+diff --git a/mythtv/libs/libmythtv/analogsignalmonitor.cpp b/mythtv/libs/libmythtv/analogsignalmonitor.cpp
+index 2a4f4c5..fa5823a 100644
+--- a/mythtv/libs/libmythtv/analogsignalmonitor.cpp
++++ b/mythtv/libs/libmythtv/analogsignalmonitor.cpp
+@@ -6,7 +6,9 @@
+ #include <sys/ioctl.h>
+ #include <poll.h>
++#ifdef USING_V4L
+ #include <linux/videodev.h>
++#endif
+ #include "mythverbose.h"
+ #include "analogsignalmonitor.h"
+@@ -151,6 +153,7 @@ void AnalogSignalMonitor::UpdateValues(void)
+     }
+     else
+     {
++#ifdef USING_V4L
+         struct video_tuner tuner;
+         bzero(&tuner, sizeof(tuner));
+@@ -163,6 +166,7 @@ void AnalogSignalMonitor::UpdateValues(void)
+         {
+             isLocked = tuner.signal;
+         }
++#endif
+     }
+     {
+diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
+index 8852682..494f48a 100644
+--- a/mythtv/libs/libmythtv/cardutil.cpp
++++ b/mythtv/libs/libmythtv/cardutil.cpp
+@@ -4,7 +4,7 @@
+ #include <algorithm>
+-#if defined(USING_V4L) || defined(USING_DVB)
++#if defined(USING_V4L) || defined(USING_V4L2) || defined(USING_DVB)
+ #include <sys/ioctl.h>
+ #endif
+@@ -28,6 +28,8 @@
+ #ifdef USING_V4L
+ #include <linux/videodev.h>
++#endif
++#ifdef USING_V4L2
+ #include <linux/videodev2.h>
+ #endif
+@@ -1455,15 +1457,15 @@ uint CardUtil::GetQuickTuning(uint cardid, const QString &input_name)
+ bool CardUtil::hasV4L2(int videofd)
+ {
+     (void) videofd;
+-#ifdef USING_V4L
++#ifdef USING_V4L2
+     struct v4l2_capability vcap;
+     bzero(&vcap, sizeof(vcap));
+     return ((ioctl(videofd, VIDIOC_QUERYCAP, &vcap) >= 0) &&
+             (vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE));
+-#else // if !USING_V4L
++#else // if !USING_V4L2
+     return false;
+-#endif // !USING_V4L
++#endif // !USING_V4L2
+ }
+ bool CardUtil::GetV4LInfo(
+@@ -1475,7 +1477,7 @@ bool CardUtil::GetV4LInfo(
+     if (videofd < 0)
+         return false;
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     // First try V4L2 query
+     struct v4l2_capability capability;
+     bzero(&capability, sizeof(struct v4l2_capability));
+@@ -1487,11 +1489,13 @@ bool CardUtil::GetV4LInfo(
+     }
+     else // Fallback to V4L1 query
+     {
++#ifdef USING_V4L
+         struct video_capability capability;
+         if (ioctl(videofd, VIDIOCGCAP, &capability) >= 0)
+             card = QString::fromAscii((const char*)capability.name);
++#endif //USING_V4L
+     }
+-#endif // !USING_V4L
++#endif // !USING_V4L || USING_V4L2
+     if (!driver.isEmpty())
+         driver.remove( QRegExp("\\[[0-9]\\]$") );
+@@ -1506,9 +1510,9 @@ InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok)
+     InputNames list;
+     ok = false;
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     bool usingv4l2 = hasV4L2(videofd);
+-
++#ifdef USING_V4L2
+     // V4L v2 query
+     struct v4l2_input vin;
+     bzero(&vin, sizeof(vin));
+@@ -1523,8 +1527,10 @@ InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok)
+         ok = true;
+         return list;
+     }
++#endif
+     // V4L v1 query
++#ifdef USING_V4L
+     struct video_capability vidcap;
+     bzero(&vidcap, sizeof(vidcap));
+     if (ioctl(videofd, VIDIOCGCAP, &vidcap) != 0)
+@@ -1552,15 +1558,15 @@ InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok)
+         list[i] = test.name;
+     }
+-
++#endif
+     // Create an input on single input cards that don't advertise input
+     if (!list.size())
+         list[0] = "Television";
+     ok = true;
+-#else // if !USING_V4L
++#else // if !USING_V4L || USING_V4L2
+     list[-1] += QObject::tr("ERROR, Compile with V4L support to query inputs");
+-#endif // !USING_V4L
++#endif // !USING_V4L || USING_V4L2
+     return list;
+ }
+diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
+index 832d0a8..e35b186 100644
+--- a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
++++ b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
+@@ -1394,7 +1394,7 @@ const DVBChannel *ChannelScanSM::GetDVBChannel(void) const
+ V4LChannel *ChannelScanSM::GetV4LChannel(void)
+ {
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     return dynamic_cast<V4LChannel*>(channel);
+ #else
+     return NULL;
+diff --git a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
+index 1595d6a..4d2b2cf 100644
+--- a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
++++ b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
+@@ -342,7 +342,7 @@ void ChannelScanner::PreScanCommon(
+         channel = new DVBChannel(device);
+ #endif
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     if (("V4L" == card_type) || ("MPEG" == card_type))
+         channel = new V4LChannel(NULL, device);
+ #endif
+diff --git a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp
+index 00fd9d3..70e3469 100644
+--- a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp
++++ b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp
+@@ -27,14 +27,14 @@ static QString card_types(void)
+     cardTypes += "'DVB'";
+ #endif // USING_DVB
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     if (!cardTypes.isEmpty())
+         cardTypes += ",";
+     cardTypes += "'V4L'";
+ # ifdef USING_IVTV
+     cardTypes += ",'MPEG'";
+ # endif // USING_IVTV
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ #ifdef USING_IPTV
+     if (!cardTypes.isEmpty())
+diff --git a/mythtv/libs/libmythtv/libmythtv.pro b/mythtv/libs/libmythtv/libmythtv.pro
+index 3d26e0a..ea06ee7 100644
+--- a/mythtv/libs/libmythtv/libmythtv.pro
++++ b/mythtv/libs/libmythtv/libmythtv.pro
+@@ -119,7 +119,7 @@ cygwin:DEFINES += _WIN32
+ using_valgrind:DEFINES += USING_VALGRIND
+ # old libvbitext (Caption decoder)
+-using_v4l {
++using_v4l || using_v4l2 {
+     HEADERS += vbitext/cc.h vbitext/dllist.h vbitext/hamm.h vbitext/lang.h
+     HEADERS += vbitext/vbi.h vbitext/vt.h
+     SOURCES += vbitext/cc.cpp vbitext/vbi.c vbitext/hamm.c vbitext/lang.c
+@@ -471,11 +471,17 @@ using_backend {
+     SOURCES += channelchangemonitor.cpp
+     # Support for Video4Linux devices
+-    using_v4l {
++    using_v4l || using_v4l2 {
+         HEADERS += v4lchannel.h                analogsignalmonitor.h
+         SOURCES += v4lchannel.cpp              analogsignalmonitor.cpp
+-        DEFINES += USING_V4L
++        using_v4l {
++            DEFINES += USING_V4L
++        }
++
++        using_v4l2 {
++            DEFINES += USING_V4L2
++        }
+     }
+     # Support for cable boxes that provide Firewire out
+diff --git a/mythtv/libs/libmythtv/signalmonitor.cpp b/mythtv/libs/libmythtv/signalmonitor.cpp
+index 221efef..c199b3b 100644
+--- a/mythtv/libs/libmythtv/signalmonitor.cpp
++++ b/mythtv/libs/libmythtv/signalmonitor.cpp
+@@ -23,7 +23,7 @@ extern "C" {
+ #   include "dvbchannel.h"
+ #endif
+-#ifdef USING_V4L
++#ifdef USING_V4L2
+ #   include "analogsignalmonitor.h"
+ #   include "v4lchannel.h"
+ #endif
+@@ -95,7 +95,7 @@ SignalMonitor *SignalMonitor::Init(QString cardtype, int db_cardnum,
+     }
+ #endif
+-#ifdef USING_V4L
++#ifdef USING_V4L2
+     if ((cardtype.toUpper() == "HDPVR"))
+     {
+         V4LChannel *chan = dynamic_cast<V4LChannel*>(channel);
+diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
+index b885eaa..3d9c7ad 100644
+--- a/mythtv/libs/libmythtv/tv_rec.cpp
++++ b/mythtv/libs/libmythtv/tv_rec.cpp
+@@ -57,7 +57,7 @@ using namespace std;
+ #include "channelgroup.h"
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+ #include "v4lchannel.h"
+ #endif
+@@ -206,7 +206,7 @@ bool TVRec::CreateChannel(const QString &startchannel)
+     }
+     else // "V4L" or "MPEG", ie, analog TV
+     {
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+         channel = new V4LChannel(this, genOpt.videodev);
+         if (!channel->Open())
+             return false;
+@@ -1082,11 +1082,11 @@ bool TVRec::SetupRecorder(RecordingProfile &profile)
+     }
+     else
+     {
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+         // V4L/MJPEG/GO7007 from here on
+         recorder = new NuppelVideoRecorder(this, channel);
+         recorder->SetOption("skipbtaudio", genOpt.skip_btaudio);
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+     }
+     if (recorder)
+@@ -1292,11 +1292,11 @@ FirewireChannel *TVRec::GetFirewireChannel(void)
+ V4LChannel *TVRec::GetV4LChannel(void)
+ {
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     return dynamic_cast<V4LChannel*>(channel);
+ #else
+     return NULL;
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ }
+ /** \fn TVRec::EventThread(void*)
+@@ -4137,7 +4137,7 @@ void TVRec::TuningNewRecorder(MPEGStreamData *streamData)
+                                   channel->GetCurrentName());
+     }
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     if (GetV4LChannel())
+     {
+         channel->InitPictureAttributes();
+diff --git a/mythtv/libs/libmythtv/v4lchannel.cpp b/mythtv/libs/libmythtv/v4lchannel.cpp
+index bc82b49..7aa47ef 100644
+--- a/mythtv/libs/libmythtv/v4lchannel.cpp
++++ b/mythtv/libs/libmythtv/v4lchannel.cpp
+@@ -16,8 +16,12 @@
+ #include <iostream>
+ using namespace std;
++#ifdef USING_V4L
+ #include <linux/videodev.h>
++#endif
++#ifdef USING_V4L2
+ #include <linux/videodev2.h>
++#endif
+ // MythTV headers
+ #include "v4lchannel.h"
+@@ -150,8 +154,10 @@ static int format_to_mode(const QString &fmt, int v4l_version)
+     {
+         if (fmt == "NTSC-JP")
+             return 6;
++#ifdef USING_V4L
+         else if (fmt.left(5) == "SECAM")
+             return VIDEO_MODE_SECAM;
++#endif
+         else if (fmt == "PAL-NC")
+             return 3;
+         else if (fmt == "PAL-M")
+@@ -159,6 +165,7 @@ static int format_to_mode(const QString &fmt, int v4l_version)
+         else if (fmt == "PAL-N")
+             return 5;
+         // generics...
++#ifdef USING_V4L
+         else if (fmt.left(3) == "PAL")
+             return VIDEO_MODE_PAL;
+         else if (fmt.left(4) == "NTSC")
+@@ -166,6 +173,7 @@ static int format_to_mode(const QString &fmt, int v4l_version)
+         else if (fmt.left(4) == "ATSC")
+             return VIDEO_MODE_NTSC; // We've dropped V4L ATSC support...
+         return VIDEO_MODE_NTSC;
++#endif 
+     }
+     VERBOSE(VB_IMPORTANT,
+@@ -237,6 +245,7 @@ static QString mode_to_format(int mode, int v4l_version)
+     }
+     else if (1 == v4l_version)
+     {
++#ifdef USING_V4L    
+         if (mode == VIDEO_MODE_NTSC)
+             return "NTSC";
+         else if (mode == VIDEO_MODE_PAL)
+@@ -249,6 +258,7 @@ static QString mode_to_format(int mode, int v4l_version)
+             return "PAL-N";
+         else if (mode == 6)
+             return "NTSC-JP";
++#endif
+     }
+     else
+     {
+@@ -676,6 +686,7 @@ bool V4LChannel::Tune(uint frequency, QString inputname,
+         return true;
+     }
++#ifdef USING_V4L
+     // Video4Linux version 1 tuning
+     uint freq = frequency / 62500;
+     ioctlval = ioctl(videofd, VIDIOCSFREQ, &freq);
+@@ -687,6 +698,7 @@ bool V4LChannel::Tune(uint frequency, QString inputname,
+                 .arg(device).arg(ioctlval).arg(strerror(errno)));
+         return false;
+     }
++#endif
+     SetSIStandard(si_std);
+@@ -858,6 +870,7 @@ bool V4LChannel::SetInputAndFormat(int inputNum, QString newFmt)
+     if (usingv4l1)
+     {
++#ifdef USING_V4L
+         VERBOSE(VB_CHANNEL, LOC + msg + "(v4l v1)");
+         // read in old settings
+@@ -875,8 +888,9 @@ bool V4LChannel::SetInputAndFormat(int inputNum, QString newFmt)
+         {
+             VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+                     "\n\t\t\twhile setting format (v4l v1)" + ENO);
+-        }
+-        else if (usingv4l2)
++        } else
++#endif
++        if (usingv4l2)
+         {
+             VERBOSE(VB_IMPORTANT, LOC + msg +
+                     "\n\t\t\tSetting video mode with v4l version 1 worked");
+@@ -951,6 +965,7 @@ bool V4LChannel::SwitchToInput(int inputnum, bool setstarting)
+     return ok;
+ }
++#ifdef USING_V4L
+ static unsigned short *get_v4l1_field(
+     int v4l2_attrib, struct video_picture &vid_pic)
+ {
+@@ -970,6 +985,7 @@ static unsigned short *get_v4l1_field(
+     }
+     return NULL;
+ }
++#endif
+ static int get_v4l2_attribute(const QString &db_col_name)
+ {
+@@ -1067,6 +1083,7 @@ bool V4LChannel::InitPictureAttribute(const QString db_col_name)
+     }
+     // V4L1
++#ifdef USING_V4L
+     unsigned short *setfield;
+     struct video_picture vid_pic;
+     bzero(&vid_pic, sizeof(vid_pic));
+@@ -1087,7 +1104,7 @@ bool V4LChannel::InitPictureAttribute(const QString db_col_name)
+         VERBOSE(VB_IMPORTANT, loc_err + "failed to set controls." + ENO);
+         return false;
+     }
+-
++#endif
+     return true;
+ }
+@@ -1154,6 +1171,7 @@ static int get_v4l2_attribute_value(int videofd, int v4l2_attrib)
+ static int get_v4l1_attribute_value(int videofd, int v4l2_attrib)
+ {
++#ifdef USING_V4L
+     struct video_picture vid_pic;
+     bzero(&vid_pic, sizeof(vid_pic));
+@@ -1167,6 +1185,7 @@ static int get_v4l1_attribute_value(int videofd, int v4l2_attrib)
+     unsigned short *setfield = get_v4l1_field(v4l2_attrib, vid_pic);
+     if (setfield)
+         return *setfield;
++#endif
+     return -1;
+ }
+@@ -1210,6 +1229,7 @@ static int set_v4l2_attribute_value(int videofd, int v4l2_attrib, int newvalue)
+ static int set_v4l1_attribute_value(int videofd, int v4l2_attrib, int newvalue)
+ {
++#ifdef USING_V4L
+     unsigned short *setfield;
+     struct video_picture vid_pic;
+     bzero(&vid_pic, sizeof(vid_pic));
+@@ -1236,7 +1256,7 @@ static int set_v4l1_attribute_value(int videofd, int v4l2_attrib, int newvalue)
+         // ???
+         return -1;
+     }
+-
++#endif
+     return 0;
+ }
+diff --git a/mythtv/libs/libmythtv/v4lchannel.h b/mythtv/libs/libmythtv/v4lchannel.h
+index b059c64..aa6d934 100644
+--- a/mythtv/libs/libmythtv/v4lchannel.h
++++ b/mythtv/libs/libmythtv/v4lchannel.h
+@@ -4,11 +4,11 @@
+ #define CHANNEL_H
+ #include "dtvchannel.h"
+-#ifdef USING_V4L
++#ifdef USING_V4L2
+ #include <linux/videodev2.h> // needed for v4l2_std_id type
+ #else
+ typedef uint64_t v4l2_std_id;
+-#endif //USING_V4L
++#endif //USING_V4L2
+ using namespace std;
+diff --git a/mythtv/libs/libmythtv/vbitext/vbi.c b/mythtv/libs/libmythtv/vbitext/vbi.c
+index 15f8d85..4c50e8d 100644
+--- a/mythtv/libs/libmythtv/vbitext/vbi.c
++++ b/mythtv/libs/libmythtv/vbitext/vbi.c
+@@ -14,8 +14,12 @@
+ //       compiling with -std=c99.  We could remove this in the .pro file,
+ //       but that would disable it for all .c files.
+ #undef __STRICT_ANSI__
++#ifdef USING_V4L
+ #include <linux/videodev.h>
++#endif
++#ifdef USING_V4L2
+ #include <linux/videodev2.h>
++#endif
+ // vbitext headers
+ #include "vt.h"
+@@ -29,8 +33,13 @@ static int rawbuf_size;                // its current size
+ /***** bttv api *****/
++#ifdef USING_V4L
+ #define BTTV_VBISIZE           _IOR('v' , BASE_VIDIOCPRIVATE+8, int)
+-
++#else // !USING_V4L
++#ifdef USING_V4L2
++#define BTTV_VBISIZE           _IOR('v' , BASE_VIDIOC_PRIVATE+8, int)
++#endif // USING_V4L2
++#endif // !USING_V4L
+ static void
+ error(const char *str, ...)
+diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
+index 5d7a508..635faeb 100644
+--- a/mythtv/libs/libmythtv/videosource.cpp
++++ b/mythtv/libs/libmythtv/videosource.cpp
+@@ -45,7 +45,7 @@ using namespace std;
+ #include "dvbtypes.h"
+ #endif
+-#ifdef USING_V4L
++#ifdef USING_V4L2
+ #include <linux/videodev2.h>
+ #endif
+@@ -2012,7 +2012,7 @@ CaptureCardGroup::CaptureCardGroup(CaptureCard &parent) :
+     setTrigger(cardtype);
+     setSaveAll(false);
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     addTarget("V4L",       new V4LConfigurationGroup(parent));
+ # ifdef USING_IVTV
+     addTarget("MPEG",      new MPEGConfigurationGroup(parent));
+@@ -2020,7 +2020,7 @@ CaptureCardGroup::CaptureCardGroup(CaptureCard &parent) :
+ # ifdef USING_HDPVR
+     addTarget("HDPVR",     new HDPVRConfigurationGroup(parent));
+ # endif // USING_HDPVR
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ #ifdef USING_DVB
+     addTarget("DVB",       new DVBConfigurationGroup(parent));
+@@ -2201,7 +2201,7 @@ CardType::CardType(const CaptureCard &parent) :
+ void CardType::fillSelections(SelectSetting* setting)
+ {
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     setting->addSelection(
+         QObject::tr("Analog V4L capture card"), "V4L");
+     setting->addSelection(
+@@ -2214,7 +2214,7 @@ void CardType::fillSelections(SelectSetting* setting)
+     setting->addSelection(
+         QObject::tr("H.264 encoder card (HD-PVR)"), "HDPVR");
+ # endif // USING_HDPVR
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ #ifdef USING_DVB
+     setting->addSelection(
+@@ -2226,11 +2226,11 @@ void CardType::fillSelections(SelectSetting* setting)
+         QObject::tr("FireWire cable box"), "FIREWIRE");
+ #endif // USING_FIREWIRE
+-#ifdef USING_V4L
++#if defined(USING_V4L) || defined(USING_V4L2)
+     setting->addSelection(
+         QObject::tr("USB MPEG-4 encoder box (Plextor ConvertX, etc)"),
+         "GO7007");
+-#endif // USING_V4L
++#endif // USING_V4L || USING_V4L2
+ #ifdef USING_HDHOMERUN
+     setting->addSelection(
index ed1acca600dde0acbd2b939a7806c5f7ede6c7e5..3bff68eebd98e4c961046f37bd807c2d61885ea6 100644 (file)
@@ -19,6 +19,7 @@
                experience with MythTV since its early versions and discussed with
                other MythTV maintainers and users. Does not rely on KDE being installed
                like most methods do.</flag>
+       <flag name="bluray">Pulls in libbluray for BluRay support.</flag>
        <flag name="debug">Instructs Qt to use the 'debug' target instead of
                'release' target. If your MythTV is crashing or you need a backtrace,
                you need to compile it with this option otherwise the debugging data is
diff --git a/media-tv/mythtv/mythtv-0.24.1_p20110524.ebuild b/media-tv/mythtv/mythtv-0.24.1_p20110524.ebuild
new file mode 100644 (file)
index 0000000..7d3e62c
--- /dev/null
@@ -0,0 +1,354 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.24.1_p20110524.ebuild,v 1.1 2011/12/18 04:15:55 rich0 Exp $
+
+EAPI=3
+PYTHON_DEPEND="2"
+MYTHTV_VERSION="v0.24.1-1-g347cd24"
+MYTHTV_BRANCH="fixes/0.24"
+MYTHTV_REV="347cd2477ad82a7aa75ebe7c686db77465f415dc"
+MYTHTV_SREV="347cd24"
+
+inherit flag-o-matic multilib eutils qt4 toolchain-funcs python linux-info versionator
+
+DESCRIPTION="Homebrew PVR project"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_VIDEO_CARDS="video_cards_nvidia"
+IUSE="altivec autostart dvb \
+dvd bluray \
+ieee1394 jack lcd lirc \
+alsa jack \
+debug profile \
+perl python \
+xvmc vdpau \
+${IUSE_VIDEO_CARDS} \
+input_devices_joystick \
+"
+
+RDEPEND=">=media-libs/freetype-2.0
+       >=media-sound/lame-3.93.1
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXinerama
+       x11-libs/libXv
+       x11-libs/libXrandr
+       x11-libs/libXxf86vm
+       x11-libs/qt-core:4[qt3support]
+       x11-libs/qt-gui:4[qt3support]
+       x11-libs/qt-sql:4[qt3support,mysql]
+       x11-libs/qt-opengl:4[qt3support]
+       x11-libs/qt-webkit:4
+       virtual/mysql
+       virtual/opengl
+       virtual/glu
+       || ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.43 )
+       alsa? ( >=media-libs/alsa-lib-0.9 )
+       autostart? ( net-dialup/mingetty
+                                x11-wm/evilwm
+                                x11-apps/xset )
+       dvb? ( media-libs/libdvb media-tv/linuxtv-dvb-headers )
+       dvd? ( media-libs/libdvdcss )
+       ieee1394? (     >=sys-libs/libraw1394-1.2.0
+                           >=sys-libs/libavc1394-0.5.3
+                           >=media-libs/libiec61883-1.0.0 )
+       jack? ( media-sound/jack-audio-connection-kit )
+       lcd? ( app-misc/lcdproc )
+       lirc? ( app-misc/lirc )
+       perl? ( dev-perl/DBD-mysql
+                       dev-perl/Net-UPnP
+                       >=dev-perl/libwww-perl-6 )
+       python? ( dev-python/mysql-python
+                       dev-python/lxml )
+       xvmc? ( x11-libs/libXvMC )
+       bluray? ( media-libs/libbluray )
+       video_cards_nvidia? ( >=x11-drivers/nvidia-drivers-180.06 )
+       media-fonts/corefonts
+       media-fonts/dejavu
+       !media-tv/mythtv-bindings
+       "
+
+DEPEND="${RDEPEND}
+       dev-lang/yasm
+       x11-proto/xineramaproto
+       x11-proto/xf86vidmodeproto
+       x11-apps/xinit
+       "
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+# Release version
+MY_PV="${PV%_*}"
+
+# what product do we want
+case "${PN}" in
+       mythtv)
+               REPO="mythtv"
+               MY_PN="mythtv"
+               S="${WORKDIR}/MythTV-${REPO}-${MYTHTV_SREV}/${MY_PN}"
+               ;;
+       mythtv-bindings)
+               REPO="mythtv"
+               MY_PN="mythtv"
+               S="${WORKDIR}/MythTV-${REPO}-${MYTHTV_SREV}/${MY_PN}"
+               ;;
+       mythweb)
+               REPO="mythweb"
+               MY_PN="mythweb"
+               S="${WORKDIR}/MythTV-${REPO}-${MYTHTV_SREV}/"
+               ;;
+       nuvexport)
+               REPO="nuvexport"
+               MY_PN="nuvexport"
+               MYTHTV_REV="$NUVEXPORT_REV"
+               S="${WORKDIR}/MythTV-${REPO}-${NUVEXPORT_SREV}/"
+               ;;
+       *)
+               REPO="mythtv"
+               MY_PN="mythplugins"
+               S="${WORKDIR}/MythTV-${REPO}-${MYTHTV_SREV}/${MY_PN}"
+               ;;
+esac
+
+# _pre is from SVN trunk while _p and _beta are from SVN ${MY_PV}-fixes
+# TODO: probably ought to do something smart if the regex doesn't match anything
+[[ "${PV}" =~ (_alpha|_beta|_pre|_rc|_p)([0-9]+) ]] || {
+       # assume a tagged release
+       MYTHTV_REV="v${PV}"
+}
+
+HOMEPAGE="http://www.mythtv.org"
+LICENSE="GPL-2"
+SRC_URI="https://github.com/MythTV/${REPO}/tarball/${MYTHTV_REV} -> ${REPO}-${PV}.tar.gz"
+
+pkg_setup() {
+       einfo "This ebuild now uses a heavily stripped down version of your CFLAGS"
+
+       if use xvmc && use video_cards_nvidia
+       then
+               elog
+               elog "For NVIDIA based cards, the XvMC renderer only works on"
+               elog "the NVIDIA 4, 5, 6 & 7 series cards."
+       fi
+
+       python_set_active_version 2
+
+       enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+       usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+# upstream wants the revision number in their version.cpp
+# since the subversion.eclass strips out the .svn directory
+# svnversion in MythTV's build doesn't work
+sed -e "s#\${SOURCE_VERSION}#${MYTHTV_VERSION}#g" -e "s#\${BRANCH}#${MYTHTV_BRANCH}#g" -i "${S}"/version.sh
+
+# Perl bits need to go into vender_perl and not site_perl
+       sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \
+               -i "${S}"/bindings/perl/Makefile
+
+       epatch "${FILESDIR}/ffmpeg-sync.patch"
+       epatch "${FILESDIR}/fixLdconfSandbox.patch"
+
+       if kernel_is -ge 2 6 38
+       then
+               epatch "${FILESDIR}/mythtv-v4l2-fix.2.patch"
+       fi
+
+}
+
+src_configure() {
+       local myconf="--prefix=/usr"
+       myconf="${myconf} --mandir=/usr/share/man"
+       myconf="${myconf} --libdir-name=$(get_libdir)"
+
+       myconf="${myconf} --enable-pic"
+       myconf="${myconf} --enable-proc-opt"
+
+       myconf="${myconf} --enable-disable-mmx-for-debugging"
+
+       use alsa    || myconf="${myconf} --disable-audio-alsa"
+       use altivec || myconf="${myconf} --disable-altivec"
+       use jack    || myconf="${myconf} --disable-audio-jack"
+
+#from bug #220857
+       if use xvmc; then
+               myconf="${myconf} --enable-xvmc"
+               myconf="${myconf} --enable-xvmcw"
+               myconf="${myconf} --disable-xvmc-vld"
+       else
+               myconf="${myconf} --disable-xvmc"
+               myconf="${myconf} --disable-xvmcw"
+       fi
+
+       myconf="${myconf} $(use_enable dvb)"
+       myconf="${myconf} $(use_enable ieee1394 firewire)"
+       myconf="${myconf} $(use_enable lirc)"
+       myconf="${myconf} --disable-directfb"
+       myconf="${myconf} --dvb-path=/usr/include"
+       myconf="${myconf} --enable-opengl-vsync"
+       myconf="${myconf} --enable-xrandr"
+       myconf="${myconf} --enable-xv"
+       myconf="${myconf} --enable-x11"
+
+       if use perl && use python
+       then
+               myconf="${myconf} --with-bindings=perl,python"
+       elif use perl
+       then
+               myconf="${myconf} --without-bindings=python"
+               myconf="${myconf} --with-bindings=perl"
+       elif use python
+       then
+               myconf="${myconf} --without-bindings=perl"
+               myconf="${myconf} --with-bindings=python"
+       else
+               myconf="${myconf} --without-bindings=perl,python"
+       fi
+
+       if use debug
+       then
+               myconf="${myconf} --compile-type=debug"
+       elif use profile
+       then
+               myconf="${myconf} --compile-type=profile"
+       else
+               myconf="${myconf} --compile-type=release"
+               myconf="${myconf} --enable-proc-opt"
+       fi
+
+       if use xvmc && use video_cards_nvidia
+       then
+               myconf="${myconf} --xvmc-lib=XvMCNVIDIA"
+               myconf="${myconf} --enable-opengl-video"
+       fi
+
+       if use vdpau && use video_cards_nvidia
+       then
+               myconf="${myconf} --enable-vdpau"
+       fi
+
+       use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+## CFLAG cleaning so it compiles
+       strip-flags
+       filter-flags "-march=*" "-mtune=*" "-mcpu=*"
+       filter-flags "-O" "-O?"
+
+       has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+       has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+# let MythTV come up with our CFLAGS. Upstream will support this
+       CFLAGS=""
+       CXXFLAGS=""
+
+       chmod +x ./external/FFmpeg/version.sh
+
+       einfo "Running ./configure ${myconf}"
+       chmod +x ./configure
+       ./configure ${myconf} || die "configure died"
+}
+
+src_compile() {
+#      eqmake4 mythtv.pro -o "Makefile" || die "eqmake4 failed"
+       emake || die "emake failed"
+}
+
+src_install() {
+       einstall INSTALL_ROOT="${D}" || die "install failed"
+       dodoc AUTHORS FAQ UPGRADING  README
+
+       insinto /usr/share/mythtv/database
+       doins database/*
+
+       exeinto /usr/share/mythtv
+
+       newinitd "${FILESDIR}"/mythbackend-0.18.2.rc mythbackend
+       newconfd "${FILESDIR}"/mythbackend-0.18.2.conf mythbackend
+
+       dodoc keys.txt docs/*.{txt,pdf}
+       dohtml docs/*.html
+
+       keepdir /etc/mythtv
+       chown -R mythtv "${D}"/etc/mythtv
+       keepdir /var/log/mythtv
+       chown -R mythtv "${D}"/var/log/mythtv
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}"/mythtv.logrotate.d-r1 mythtv
+
+       insinto /usr/share/mythtv/contrib
+       doins -r contrib/*
+
+       dobin "${FILESDIR}"/runmythfe
+
+       if use autostart
+       then
+               dodir /etc/env.d/
+               echo 'CONFIG_PROTECT="/home/mythtv/"' > "${D}"/etc/env.d/95mythtv
+
+               insinto /home/mythtv
+               newins "${FILESDIR}"/bash_profile .bash_profile
+               newins "${FILESDIR}"/xinitrc .xinitrc
+       fi
+
+       for file in `find "${D}" -type f -name \*.py`; do chmod a+x "$file"; done
+       for file in `find "${D}" -type f -name \*.sh`; do chmod a+x "$file"; done
+       for file in `find "${D}" -type f -name \*.pl`; do chmod a+x "$file"; done
+}
+
+pkg_preinst() {
+       export CONFIG_PROTECT="${CONFIG_PROTECT} ${ROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+       use python && python_mod_optimize MythTV
+
+       elog "Want mythfrontend to start automatically?"
+       elog "Set USE=autostart. Details can be found at:"
+       elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html"
+
+       elog
+       elog "To always have MythBackend running and available run the following:"
+       elog "rc-update add mythbackend default"
+       elog
+       ewarn "Your recordings folder must be owned by the user 'mythtv' now"
+       ewarn "chown -R mythtv /path/to/store"
+       ewarn
+       elog "Note that USE=-mmx now works with mythtv, but you could suffer"
+       elog "from performance issues if you use it."
+
+       if use xvmc && [[ ! -s "${ROOT}/etc/X11/XvMCConfig" ]]
+       then
+               ewarn
+               ewarn "No XvMC implementation has been selected yet"
+               ewarn "Use 'eselect xvmc list' for a list of available choices"
+               ewarn "Then use 'eselect xvmc set <choice>' to choose"
+               ewarn "'eselect xvmc set nvidia' for example"
+       fi
+
+       if use autostart
+       then
+               elog
+               elog "Please add the following to your /etc/inittab file at the end of"
+               elog "the TERMINALS section"
+               elog "c8:2345:respawn:/sbin/mingetty --autologin mythtv tty8"
+       fi
+
+}
+
+pkg_postrm()
+{
+       use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+       "${ROOT}"/usr/bin/mythfrontend --version
+}
+
+pkg_config() {
+       echo "Creating mythtv MySQL user and mythconverg database if it does not"
+       echo "already exist. You will be prompted for your MySQL root password."
+       "${ROOT}"/usr/bin/mysql -u root -p < "${ROOT}"/usr/share/mythtv/database/mc.sql
+}