summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-tv
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/channeleditor/Manifest1
-rw-r--r--media-tv/channeleditor/channeleditor-1.9.2.1-r1.ebuild59
-rw-r--r--media-tv/channeleditor/files/build-1.9.2.1.xml43
-rw-r--r--media-tv/channeleditor/files/channeleditor-1.9.2.1-messages.properties.patch377
-rw-r--r--media-tv/channeleditor/files/channeleditor-1.9.2.1-messages_en.properties.patch160
-rw-r--r--media-tv/channeleditor/metadata.xml12
-rw-r--r--media-tv/dvbstream/Manifest1
-rw-r--r--media-tv/dvbstream/dvbstream-0.7_pre20080516.ebuild61
-rw-r--r--media-tv/dvbstream/files/dvbstream-0.7_pre20080302-telnet-port-switch.diff26
-rw-r--r--media-tv/dvbstream/files/dvbstream-0.7_pre20080516-update.diff12
-rw-r--r--media-tv/dvbstream/metadata.xml6
-rw-r--r--media-tv/dvbstreamer/Manifest2
-rw-r--r--media-tv/dvbstreamer/dvbstreamer-1.1-r1.ebuild40
-rw-r--r--media-tv/dvbstreamer/dvbstreamer-2.0.0_rc1.ebuild37
-rw-r--r--media-tv/dvbstreamer/files/dvbstreamer-1.1-Werror.patch36
-rw-r--r--media-tv/dvbstreamer/files/dvbstreamer-1.1-libtool.patch71
-rw-r--r--media-tv/dvbstreamer/metadata.xml8
-rw-r--r--media-tv/dvbtune/Manifest1
-rw-r--r--media-tv/dvbtune/dvbtune-0.5-r1.ebuild38
-rw-r--r--media-tv/dvbtune/files/dvbtune-0.5-gentoo.diff10
-rw-r--r--media-tv/dvbtune/files/dvbtune-0.5-r1-gentoo.diff20
-rw-r--r--media-tv/dvbtune/metadata.xml8
-rw-r--r--media-tv/freevo/Manifest1
-rw-r--r--media-tv/freevo/files/freevo-1.8.2.boot57
-rw-r--r--media-tv/freevo/files/freevo-1.9.0-PIL.patch26
-rw-r--r--media-tv/freevo/files/freevo-1.9.0-distutils-r1.patch20
-rwxr-xr-xmedia-tv/freevo/files/freevo.boot53
-rw-r--r--media-tv/freevo/files/freevo.conf33
-rw-r--r--media-tv/freevo/files/freevo.desktop6
-rw-r--r--media-tv/freevo/files/xbox-lircrc135
-rw-r--r--media-tv/freevo/freevo-1.9.0-r1.ebuild194
-rw-r--r--media-tv/freevo/freevo-1.9.0.ebuild187
-rw-r--r--media-tv/freevo/metadata.xml20
-rw-r--r--media-tv/gentoo-vdr-scripts/Manifest5
-rw-r--r--media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.0.0.ebuild131
-rw-r--r--media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.5.ebuild134
-rw-r--r--media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.2.ebuild136
-rw-r--r--media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.3.ebuild136
-rw-r--r--media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.ebuild136
-rw-r--r--media-tv/gentoo-vdr-scripts/metadata.xml12
-rw-r--r--media-tv/gtk-v4l/Manifest1
-rw-r--r--media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch53
-rw-r--r--media-tv/gtk-v4l/gtk-v4l-0.4.ebuild38
-rw-r--r--media-tv/gtk-v4l/metadata.xml9
-rw-r--r--media-tv/ivtv-utils/Manifest1
-rw-r--r--media-tv/ivtv-utils/files/ivtv-utils-1.4.0-gentoo.patch99
-rw-r--r--media-tv/ivtv-utils/files/ivtv-utils-1.4.1-overflow.patch71
-rw-r--r--media-tv/ivtv-utils/ivtv-utils-1.4.1.ebuild47
-rw-r--r--media-tv/ivtv-utils/metadata.xml13
-rw-r--r--media-tv/ivtvplayer/Manifest1
-rw-r--r--media-tv/ivtvplayer/ivtvplayer-0.1.3-r1.ebuild41
-rw-r--r--media-tv/ivtvplayer/metadata.xml8
-rw-r--r--media-tv/kodi/Manifest2
-rwxr-xr-xmedia-tv/kodi/files/generate.sh34
-rw-r--r--media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch16
-rw-r--r--media-tv/kodi/files/kodi-14.1-no-arm-flags.patch16
-rw-r--r--media-tv/kodi/files/kodi-9999-no-arm-flags.patch16
-rw-r--r--media-tv/kodi/files/kodi-9999-nomythtv.patch67
-rw-r--r--media-tv/kodi/files/kodi-9999-texturepacker.patch17
-rw-r--r--media-tv/kodi/kodi-14.1.ebuild278
-rw-r--r--media-tv/kodi/kodi-9999.ebuild271
-rw-r--r--media-tv/kodi/metadata.xml29
-rw-r--r--media-tv/linuxtv-dvb-apps/Manifest1
-rw-r--r--media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-alevt.patch37
-rw-r--r--media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-ldflags.patch20
-rw-r--r--media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20100223-r1.ebuild86
-rw-r--r--media-tv/linuxtv-dvb-apps/metadata.xml8
-rw-r--r--media-tv/linuxtv-dvb-firmware/Manifest29
-rw-r--r--media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.07.06638
-rw-r--r--media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.09.19674
-rw-r--r--media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild343
-rw-r--r--media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.09.19.ebuild363
-rw-r--r--media-tv/linuxtv-dvb-firmware/metadata.xml6
-rw-r--r--media-tv/me-tv/Manifest1
-rw-r--r--media-tv/me-tv/files/me-tv-1.4.0.10-gcc47.patch26
-rw-r--r--media-tv/me-tv/me-tv-1.4.0.10.ebuild51
-rw-r--r--media-tv/me-tv/metadata.xml18
-rw-r--r--media-tv/metadata.xml34
-rw-r--r--media-tv/mythtv-status/Manifest1
-rw-r--r--media-tv/mythtv-status/files/mythtv-status.1281
-rw-r--r--media-tv/mythtv-status/metadata.xml5
-rw-r--r--media-tv/mythtv-status/mythtv-status-0.10.4.ebuild39
-rw-r--r--media-tv/mythtv/Manifest15
-rw-r--r--media-tv/mythtv/files/bash_profile4
-rw-r--r--media-tv/mythtv/files/libdir-27.patch13
-rw-r--r--media-tv/mythtv/files/libdir.patch11
-rw-r--r--media-tv/mythtv/files/mythbackend.conf12
-rw-r--r--media-tv/mythtv/files/mythbackend.init56
-rw-r--r--media-tv/mythtv/files/mythbackend.service66
-rw-r--r--media-tv/mythtv/files/mythfrontend.conf13
-rw-r--r--media-tv/mythtv/files/mythfrontend.wrapper29
-rw-r--r--media-tv/mythtv/files/mythtv.logrotate.d-r320
-rw-r--r--media-tv/mythtv/files/mythtv.logrotate.d-r414
-rw-r--r--media-tv/mythtv/files/xinitrc-r18
-rw-r--r--media-tv/mythtv/metadata.xml56
-rw-r--r--media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild347
-rw-r--r--media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild350
-rw-r--r--media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild353
-rw-r--r--media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild355
-rw-r--r--media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild355
-rw-r--r--media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild355
-rw-r--r--media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild355
-rw-r--r--media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild359
-rw-r--r--media-tv/mythtv/mythtv-0.27_p20140321.ebuild350
-rw-r--r--media-tv/nvtv/Manifest1
-rw-r--r--media-tv/nvtv/files/nvtv.start21
-rw-r--r--media-tv/nvtv/metadata.xml13
-rw-r--r--media-tv/nvtv/nvtv-0.4.7-r1.ebuild58
-rw-r--r--media-tv/shoutcast2vdr/Manifest1
-rw-r--r--media-tv/shoutcast2vdr/metadata.xml12
-rw-r--r--media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8-r1.ebuild33
-rw-r--r--media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8.ebuild34
-rw-r--r--media-tv/tvbrowser/Manifest52
-rw-r--r--media-tv/tvbrowser/files/3.4-build.xml.patch150
-rw-r--r--media-tv/tvbrowser/files/3.4-remove-registrykey.patch154
-rw-r--r--media-tv/tvbrowser/files/3.4.1.0-build.xml.patch109
-rw-r--r--media-tv/tvbrowser/files/3.4.1.0-remove-registrykey.patch150
-rw-r--r--media-tv/tvbrowser/files/tvbrowser-3.2.1-build.xml480
-rw-r--r--media-tv/tvbrowser/files/tvbrowser-9999-build.xml965
-rw-r--r--media-tv/tvbrowser/metadata.xml8
-rw-r--r--media-tv/tvbrowser/tvbrowser-3.2.1-r1.ebuild169
-rw-r--r--media-tv/tvbrowser/tvbrowser-3.4.1.0.ebuild99
-rw-r--r--media-tv/tvbrowser/tvbrowser-3.4.ebuild98
-rw-r--r--media-tv/tvbrowser/tvbrowser-9999.ebuild175
-rw-r--r--media-tv/tvheadend/Manifest3
-rw-r--r--media-tv/tvheadend/files/tvheadend.confd14
-rw-r--r--media-tv/tvheadend/files/tvheadend.initd19
-rw-r--r--media-tv/tvheadend/files/tvheadend.service14
-rw-r--r--media-tv/tvheadend/metadata.xml16
-rw-r--r--media-tv/tvheadend/tvheadend-2.12.ebuild73
-rw-r--r--media-tv/tvheadend/tvheadend-3.2.ebuild71
-rw-r--r--media-tv/tvheadend/tvheadend-3.4.27.ebuild91
-rw-r--r--media-tv/tvheadend/tvheadend-9999.ebuild83
-rw-r--r--media-tv/tvmovie2vdr/Manifest1
-rw-r--r--media-tv/tvmovie2vdr/metadata.xml10
-rw-r--r--media-tv/tvmovie2vdr/tvmovie2vdr-0.5.13.ebuild109
-rw-r--r--media-tv/tvnamer/Manifest1
-rw-r--r--media-tv/tvnamer/metadata.xml12
-rw-r--r--media-tv/tvnamer/tvnamer-2.3.ebuild22
-rw-r--r--media-tv/v4l-dvb-saa716x/Manifest2
-rw-r--r--media-tv/v4l-dvb-saa716x/files/OSD_RAW_CMD_patch_2.diff27
-rw-r--r--media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-3.19-set_gpio.patch24
-rw-r--r--media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-Makefilepatch-2.diff8
-rw-r--r--media-tv/v4l-dvb-saa716x/metadata.xml22
-rw-r--r--media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20140322.ebuild48
-rw-r--r--media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109-r1.ebuild49
-rw-r--r--media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109.ebuild48
-rw-r--r--media-tv/v4l-utils/Manifest3
-rw-r--r--media-tv/v4l-utils/metadata.xml9
-rw-r--r--media-tv/v4l-utils/v4l-utils-1.0.0.ebuild42
-rw-r--r--media-tv/v4l-utils/v4l-utils-1.6.0.ebuild46
-rw-r--r--media-tv/v4l-utils/v4l-utils-1.6.2.ebuild51
-rw-r--r--media-tv/w_scan/Manifest5
-rw-r--r--media-tv/w_scan/metadata.xml8
-rw-r--r--media-tv/w_scan/w_scan-20121111.ebuild39
-rw-r--r--media-tv/w_scan/w_scan-20130331.ebuild32
-rw-r--r--media-tv/w_scan/w_scan-20140118.ebuild32
-rw-r--r--media-tv/w_scan/w_scan-20140727.ebuild32
-rw-r--r--media-tv/w_scan/w_scan-20141122.ebuild32
-rw-r--r--media-tv/wis-go7007/Manifest1
-rw-r--r--media-tv/wis-go7007/files/snd.patch130
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff20
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff200
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-2.6.21-typdefs.diff20
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-2.6.24-no_algo_control.diff54
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-2.6.26-nopage.diff26
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-updates.diff242
-rw-r--r--media-tv/wis-go7007/metadata.xml5
-rw-r--r--media-tv/wis-go7007/wis-go7007-0.9.8-r3.ebuild106
-rw-r--r--media-tv/xawtv/Manifest3
-rw-r--r--media-tv/xawtv/files/webcamrc30
-rw-r--r--media-tv/xawtv/files/xawtv-3.95-jpeg-7.patch25
-rw-r--r--media-tv/xawtv/files/xawtv-3.95-libquicktime-compat.patch27
-rw-r--r--media-tv/xawtv/files/xawtv-3.95-pagemask-fix.patch42
-rw-r--r--media-tv/xawtv/metadata.xml9
-rw-r--r--media-tv/xawtv/xawtv-3.95-r2.ebuild157
-rw-r--r--media-tv/xawtv/xawtv-3.95-r3.ebuild158
-rw-r--r--media-tv/xbmc/Manifest13
-rwxr-xr-xmedia-tv/xbmc/files/generate.sh28
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch41
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch46
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libav.patch72
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-nfs-limits.patch28
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-no-arm-flags.patch16
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch30
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-nomythtv.patch206
-rw-r--r--media-tv/xbmc/files/xbmc-12.1-nomythtv.patch68
-rw-r--r--media-tv/xbmc/files/xbmc-12.3-no-sse2.patch185
-rw-r--r--media-tv/xbmc/files/xbmc-9999-no-arm-flags.patch16
-rw-r--r--media-tv/xbmc/files/xbmc-9999-nomythtv.patch67
-rw-r--r--media-tv/xbmc/metadata.xml26
-rw-r--r--media-tv/xbmc/xbmc-11.0.ebuild238
-rw-r--r--media-tv/xbmc/xbmc-12.1-r1.ebuild267
-rw-r--r--media-tv/xbmc/xbmc-12.2-r1.ebuild264
-rw-r--r--media-tv/xbmc/xbmc-12.3.ebuild269
-rw-r--r--media-tv/xbmc/xbmc-13.0_p2.ebuild309
-rw-r--r--media-tv/xbmc/xbmc-13.1.ebuild306
-rw-r--r--media-tv/xbmc/xbmc-13.2-r1.ebuild309
-rw-r--r--media-tv/xbmc/xbmc-13.2.ebuild306
-rw-r--r--media-tv/xbmc/xbmc-9999.ebuild13
-rw-r--r--media-tv/xmltv/Manifest1
-rw-r--r--media-tv/xmltv/files/xmltv-na_dd-xmltwig.patch10
-rw-r--r--media-tv/xmltv/metadata.xml40
-rw-r--r--media-tv/xmltv/xmltv-0.5.57.ebuild207
204 files changed, 18252 insertions, 0 deletions
diff --git a/media-tv/channeleditor/Manifest b/media-tv/channeleditor/Manifest
new file mode 100644
index 00000000000..8bf4d9aa254
--- /dev/null
+++ b/media-tv/channeleditor/Manifest
@@ -0,0 +1 @@
+DIST channeleditor_1.9.2.1_src.tar.gz 317608 SHA256 590ef8daa83244833136f317fc5599c7d998a186ee4f76c9953e4546605435d8 SHA512 84147868aa8b1aacf4ef31a7665822bc7ccd4f7372aaa040aacd8ee42581db1d67092b6b09cda6e447bae2c058fe4ceaab28f3e2a268a54dc5ac25452e64d7d9 WHIRLPOOL 36d1efd40f8931c6d26c28705a3681264d443a8af4c8fffd9cf302be8437a6bf18090d721217c9e71e447d3e2d0c7d95f445ec9bac9f58f7489344004c6479e0
diff --git a/media-tv/channeleditor/channeleditor-1.9.2.1-r1.ebuild b/media-tv/channeleditor/channeleditor-1.9.2.1-r1.ebuild
new file mode 100644
index 00000000000..0810c2a9480
--- /dev/null
+++ b/media-tv/channeleditor/channeleditor-1.9.2.1-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+JAVA_PKG_IUSE=source
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Editor for VDR channels.conf"
+HOMEPAGE="http://www.renier.de/channeleditor"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}_src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.5"
+DEPEND=" >=virtual/jdk-1.5"
+
+S="${WORKDIR}/${PN}"
+
+mainclass() {
+ # read Main-Class from MANIFEST.MF
+ sed -n "s/^Main-Class: \([^ ]\+\).*/\1/p" "${S}/MANIFEST.MF" \
+ || die "reading Main-Class failed"
+}
+
+java_prepare() {
+ # move files out of build and remove stuff not needed in the package
+ mv build/* "${S}" || die "cleaning build dir failed"
+ rm -f src/java/org/javalobby/icons/{README,COPYRIGHT} \
+ || die "removing files failed"
+
+ # copy build.xml
+ cp -f "${FILESDIR}/build-${PV}.xml" build.xml \
+ || die "copying build.xml failed"
+
+ # convert CRLF to LF
+ edos2unix MANIFEST.MF
+
+ # include localisation changes
+ epatch "${FILESDIR}"/${P}-messages.properties.patch
+ epatch "${FILESDIR}"/${P}-messages_en.properties.patch
+}
+
+src_compile() {
+ eant build -Dmanifest.mainclass=$(mainclass)
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_dolauncher ${PN} --main $(mainclass)
+
+ use source && java-pkg_dosrc src
+
+ make_desktop_entry channeleditor Channeleditor "" "Utility"
+}
diff --git a/media-tv/channeleditor/files/build-1.9.2.1.xml b/media-tv/channeleditor/files/build-1.9.2.1.xml
new file mode 100644
index 00000000000..51e13255007
--- /dev/null
+++ b/media-tv/channeleditor/files/build-1.9.2.1.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<project name="channeleditor" default="build">
+ <!-- some properties -->
+ <property name="src.dir" value="src"/>
+ <property name="resources.dir" value="src/java/"/>
+ <property name="build.dir" value="build"/>
+ <property name="dist.dir" value="dist"/>
+ <property name="project.jar" value="${dist.dir}/${ant.project.name}.jar"/>
+ <property name="target.jdk" value="1.4"/>
+
+ <!-- init -->
+ <target name="init">
+ <mkdir dir="${dist.dir}"/>
+ </target>
+
+ <!-- compile everything -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="${target.jdk}"
+ target="${target.jdk}"
+ encoding="ISO-8859-1"/>
+ <copy todir="${build.dir}">
+ <fileset dir="${resources.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+
+ <!-- build the jar files -->
+ <target name="build" depends="compile">
+ <jar jarfile="${project.jar}" basedir="${build.dir}">
+ <manifest>
+ <attribute name="Main-Class" value="${manifest.mainclass}"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- zip the sources -->
+ <target name="sourcezip">
+ <zip destfile="${dist.dir}/${ant.project.name}-src.zip">
+ <zipfileset dir="${src.dir}" />
+ </zip>
+ </target>
+</project>
diff --git a/media-tv/channeleditor/files/channeleditor-1.9.2.1-messages.properties.patch b/media-tv/channeleditor/files/channeleditor-1.9.2.1-messages.properties.patch
new file mode 100644
index 00000000000..9459b004cea
--- /dev/null
+++ b/media-tv/channeleditor/files/channeleditor-1.9.2.1-messages.properties.patch
@@ -0,0 +1,377 @@
+--- trunk/src/java/de/renier/vdr/channel/editor/messages.properties 2008/06/18 07:43:28 10
++++ trunk/src/java/de/renier/vdr/channel/editor/messages.properties 2008/06/23 07:01:09 12
+@@ -1,187 +1,187 @@
+-ChannelParkingPanel.0=Dient zur Ablage von Kan\u00E4len.
+-ChannelParkingPanel.2=Parkplatz l\u00F6schen
+-ChannelListingPanel.0=Leere Liste
+-ChannelDeletedPanel.0=Liste gel\u00F6schter Kan\u00E4le, Dient zur Wiederherstellung.
+-ChannelDeletedPanel.2=Eintr\u00E4ge in L\u00F6schliste endg\u00FCltig l\u00F6schen
+-ChannelEditor.10=Markierte oder Alle Kan\u00E4le vom Parkplatz zum aktuel markierten Kanal im Baum verschieben
+-ChannelEditor.11=Markierte Kan\u00E4le entfernen
+-ChannelEditor.12=Neuen Kanal anlegen
+-ChannelEditor.13=Neue Rubrik anlegen
+-ChannelEditor.14=Mehrfaches Umbennen der Kanalnamen - Vorranstellen eines Textes
+-ChannelEditor.15=Aktuelle Statistik
+-ChannelEditor.16=\u00FCber diese Anwendung
+-ChannelEditor.17=Parkplatz
+-ChannelEditor.19=L\u00F6schliste
+-ChannelEditor.21=Letze Dateien
+-ChannelEditor.23=Tools
+-ChannelEditor.24=Kanaleditor f\u00FCr VDR
+-ChannelEditor.25=ChannelEditor
+-ChannelPropertyPanel.0=Name:
+-ChannelPropertyPanel.1=Frequenz:
+-ChannelPropertyPanel.2=Quelle:
+-ChannelPropertyPanel.3=Parameter:
+-ChannelPropertyPanel.4=Symbolrate:
+-ChannelPropertyPanel.5=jPanel
+-ChannelPropertyPanel.6=VPID:
+-ChannelPropertyPanel.7=APID:
+-ChannelPropertyPanel.8=TPID:
+-ChannelPropertyPanel.9=SID:
+-ChannelListingPanel.10=Sortieren
+-ChannelPropertyPanel.10=TID:
+-ChannelPropertyPanel.11=CA-ID:
+-ChannelPropertyPanel.12=NID:
+-ChannelPropertyPanel.13=RID:
+-ChannelPropertyPanel.14=
+-ChannelPropertyPanel.15=Bouqet:
+-ChannelPropertyPanel.16=Startnr. (@):
+-ChannelPropertyPanel.17=Alias:
+-ChannelPropertyPanel.18=Kann \u00FCber Menu exportiert werden.
+-ChannelPropertyPanel.19=jPanel1
+-ChannelPropertyPanel.24=\u00C4nderungen \u00FCbernehmen
+-ChannelSearchInputDialog.0=Kanalsuche
+-ChannelSearchInputDialog.1=<html><body>Suchbegriff eingeben (Gesucht wird ein teil innerhalb des ausgew\u00E4hlten Feldes)<br>Die Suche startet vom zuletzt markierten Knoten und findet nur Kan\u00E4le die sich unterhalb dieses Knotens befinden.</body></html>
+-ChannelSearchInputDialog.2=Suchbegriff:
+-ChannelSearchInputDialog.3=<html><body><u>Suche in</u></body></html>
+-ChannelSearchInputDialog.4=Frequenz:
+-ChannelSearchInputDialog.5=Parameter:
+-ChannelSearchInputDialog.6=Quelle:
+-ChannelSearchInputDialog.7=Symbolrate:
+-ChannelSearchInputDialog.8=Pidfelder:
+-ChannelSearchInputDialog.9=Suchparameter
+-ChannelSearchInputDialog.10=Name:
+-ChannelSearchInputDialog.11=Bouqet:
+-ChannelSearchInputDialog.12=Suchen
+-ChannelSearchInputDialog.14=Suchbegriff darf nicht leer sein\!
+-ChannelSearchInputDialog.15=Mindestens ein Suchbereich muss angegeben sein\!
+-ChannelSearchInputDialog.16=Abbrechen
+-PreferencesDialog.0=Lokale Einstellungen
+-PreferencesDialog.1=Speichern
+-PreferencesDialog.3=Abbrechen
+-PreferencesDialog.5=Icon Layout:
+-PreferencesDialog.6=Font gr\u00F6sse (Kan\u00E4le):
+-PreferencesDialog.7=(0 = default)
+-PreferencesDialog.8=Sprache:
+-PreferencesAction.0=Einstellungen
+-CreateChannelDialog.0=Neuen Kanal anlegen
+-CreateChannelDialog.1=<html><body>Bitte geben sie alle notwendigen Kanalinformationen an.<br><u>ACHTUNG</u> \u00E4ltere VDR Versionen k\u00F6nnen keine doppelten Kan\u00E4le in der Liste einlesen\!</body></html>
+-CreateChannelDialog.2=Kanal anlegen
+-CreateChannelDialog.4=Es muss mindestens der Kanalname angegeben werden.
+-CreateChannelDialog.5=Abbrechen
+-CreateChannelAction.0=Neuen Kanal erzeugen
+-CreateCategoryAction.0=Neue Rubrik erzeugen
+-CreateCategoryAction.2=Bitte Name f\u00FCr neu zu erstellende Rubrik eingeben:
+-CreateCategoryAction.3=Neue Rubrik
+-ChannelEditor.0=Nichts selektiert
+-ChannelEditor.1=File
+-ChannelEditor.2=Info
+-ChannelEditor.3=Anwendung beenden
+-ChannelEditor.4=Kanalliste \u00F6ffnen
+-ChannelEditor.5=Aktuelle Kanalliste speichern
+-ChannelEditor.6=Aktuelle Kanalliste speichern unter..
+-ChannelEditor.7=\u00F6ffne Lokale Einstellungen
+-ChannelEditor.8=Kanal suchen
+-ChannelEditor.9=Markierte Kan\u00E4le auf den Parkplatz verschieben
+-ImportAliasAction.0=Alias Importieren
+-ImportAliasAction.2=Es wurden
+-ImportAliasAction.3=\ alias Eintr\u00E4ge aus dem File '
+-ImportAliasAction.4=' gelesen.\n\n
+-ImportAliasAction.5=\ konnten davon Kan\u00E4len zugeordnet werden.\n
+-ImportAliasAction.6=Das angegebene File:\n\n
+-ImportAliasAction.7=\n\nkonnte nicht ge\u00F6ffnet werden.\n\n\n
+-SortNameAction.0=nach Namen
+-SortTypeAction.0=nach TV
+-SortTypeAction.1=nach TV Verschl\u00FCsselt
+-SortTypeAction.2=nach Radio
+-SortTypeAction.3=nach Radio Verschl\u00FCssellt
+-SortTypeAction.4=nach Service
+-SortTypeAction.5=nach Service Verschl\u00FCssellt
+-SortTypeAction.6=not supported
+-SortBouqetAction.0=nach Bouqet
+-SortFrequenzAction.0=nach Frequenz
+-OpenAction.0=\u00F6ffnen
+-OpenAction.2=\u00C4nderungen wurden nicht gespeichert. Wirklich neues File \u00F6ffnen?
+-OpenAction.3=Info
+-OpenAction.5=Configuration Files
+-OpenAction.6=Das angegebene File:\n\n
+-OpenAction.7=\n\nkonnte nicht ge\u00F6ffnet werden.\n\n\n
+-ParkAction.0=Parken
+-SaveAsAction.0=Speichern unter
+-SaveAsAction.3=Configuration Files
+-SaveAsAction.4=File '
+-SaveAsAction.5=' existiert bereits.\nSoll die Liste trotzdem gespeichert werden (Datei wird \u00FCberschrieben)?
+-SaveAsAction.6=Info
+-SaveAsAction.7=Fehler beim Speichern unter:
+-SaveAsAction.8=
+-SaveAsAction.9=\nError message:
+-SaveAction.0=Speichern
+-SaveAction.2=Fehler beim Speichern nach:
+-SaveAction.3=\nError message:
+-SaveAction.4=Error
+-SaveAsAction.10=Error
+-StatisticAction.0=Statistik
+-StatisticAction.4=<html><body>
+-StatisticAction.5=<h1>Statistik der Kanalliste</h1>
+-StatisticAction.6=<h3><u>Fileinformationen:</u></h3>
+-StatisticAction.7=<table>
+-StatisticAction.8=<tr><td><font color=green>Geladenes File</font></td><td><font color=blue>
+-StatisticAction.9=</font></td></tr>
+-StatisticAction.10=<tr><td><font color=green>Filepfad</font></td><td><font color=blue>
+-StatisticAction.11=</font></td></tr>
+-StatisticAction.12=<tr><td><font color=green>Filegr\u00F6sse</font></td><td><font color=blue>
+-StatisticAction.13=\ Byte</font></td></tr>
+-StatisticAction.14=</table>
+-StatisticAction.15=<h3><u>Kanalinformationen:</u></h3>
+-StatisticAction.16=<table>
+-StatisticAction.17=<tr><td><font color=green>Anzahl Kan\u00E4le insgesamt</font></td><td><font color=blue>
+-StatisticAction.18=</font></td></tr>
+-StatisticAction.19=<tr><td><font color=green>davon Rubriken</font></td><td><font color=blue>
+-StatisticAction.20=</font></td></tr>
+-StatisticAction.21=<tr><td><font color=green>davon TV</font></td><td><font color=blue>
+-StatisticAction.22=</font></td></tr>
+-StatisticAction.23=<tr><td><font color=green>davon Radio</font></td><td><font color=blue>
+-StatisticAction.24=</font></td></tr>
+-StatisticAction.25=<tr><td><font color=green>davon Service</font></td><td><font color=blue>
+-StatisticAction.26=</font></td></tr>
+-StatisticAction.27=<tr><td><font color=green>Neue Filegr\u00F6sse</font></td><td><font color=blue>
+-StatisticAction.28=\ Byte</font></td></tr>
+-StatisticAction.29=</table>
+-StatisticAction.30=</body></html>
+-StatisticAction.31=Statistik
+-UnparkAction.0=Entparken
+-ExportAliasAction.0=Alias Exportieren
+-ExportAliasAction.2=File '
+-ExportAliasAction.3=' existiert bereits.\nSoll die Aliasliste trotzdem gespeichert werden (Datei wird \u00FCberschrieben)?
+-ExportAliasAction.4=Info
+-ExportAliasAction.6=Es wurden
+-ExportAliasAction.7=\ Alias Eintr\u00E4ge gespeichert.
+-ExportAliasAction.8=Fehler beim Speichern unter:
+-ExportAliasAction.10=\nError message:
+-ExportAliasAction.11=Error
+-DeleteChannelAction.0=Entfernen
+-CloseAction.0=Beenden
+-CloseAction.2=Ihr Parkplatz ist noch gef\u00FCllt\nDiese Inhalte gehen nach dem beenden verloren.\n\nMit dem beenden Vortfahren?
+-CloseAction.3=Info
+-CloseAction.4=\u00C4nderungen wurden nicht gespeichert. Wirklich beenden?
+-CloseAction.5=Info
+-SearchAction.0=Suchen
+-SearchAction.2=Es konnte kein Kanal gefunden werden\!\nSuchbegriff:
+-SearchAction.3=Suchergebnis
+-AboutAction.0=\u00DCber
+-AboutAction.2=<html><body>
+-AboutAction.3=<h1>Kanaleditor f\u00FCr VDR Version 1.9.2.1</h1>
+-AboutAction.4=<p>Editor f\u00FCr die VDR Channel Files.<br>
+-AboutAction.5=F\u00FCr Datenverlust oder Besch\u00E4digung wird keinerlei Haftung \u00FCbernommen</p><br>
+-AboutAction.6=<hr>
+-AboutAction.7=<p>Copyright(C) 2007 by Renier Roth</p>
+-AboutAction.8=<p>Released under the terms of the GNU General Public License version 2 or later.</p>
+-AboutAction.11=<br><p><font size=-2>Icons Copyright(C) 1998 by Dean S. Jones dean@gallant.com www.gallant.com/icons.htm</font></p>
+-AboutAction.12=</body></html>
+-AboutAction.13=About
+-MultiRenameAction.0=Kanalnamen umbenennen
+-MultiRenameAction.2=Funktion zum vorranstellen eines Textes\nzu jedem Kanalnahmen innerhalb der zuletzt markierten Rubrik\n\nWird vom Hauptknoten ausgegangen werden alle Kan\u00E4le umbenannt.\n\nBitte Text eingeben, der vor dem Kanalnamen gestellt werden soll:
+-MultiRenameAction.3=Mehrfach Umbenennung
+-LocalProperties.5=Lokale Einstellungen
+-LocalProperties.6=Lokale einstellungen konnten nicht geladen werden\!
+-LocalProperties.10=ChannelEditor Property File
+-LocalProperties.11=Lokale Einstellungen
+-LocalProperties.12=Lokale Einstellungen k\u00F6nnen nicht gespeichert werden\!
++ChannelParkingPanel.0=Dient zur Ablage von Kan\u00E4len.
++ChannelParkingPanel.2=Parkplatz l\u00F6schen
++ChannelListingPanel.0=Leere Liste
++ChannelDeletedPanel.0=Liste gel\u00F6schter Kan\u00E4le. Dient zur Wiederherstellung.
++ChannelDeletedPanel.2=Eintr\u00E4ge in L\u00F6schliste endg\u00FCltig l\u00F6schen
++ChannelEditor.10=Markierte oder Alle Kan\u00E4le vom Parkplatz zum aktuell markierten Kanal im Baum verschieben
++ChannelEditor.11=Markierte Kan\u00E4le entfernen
++ChannelEditor.12=Neuen Kanal anlegen
++ChannelEditor.13=Neue Rubrik anlegen
++ChannelEditor.14=Mehrfaches Umbenennen der Kanalnamen - Vorranstellen eines Textes
++ChannelEditor.15=Aktuelle Statistik
++ChannelEditor.16=\u00DCber diese Anwendung
++ChannelEditor.17=Parkplatz
++ChannelEditor.19=L\u00F6schliste
++ChannelEditor.21=Letzte Dateien
++ChannelEditor.23=Werkzeuge
++ChannelEditor.24=Kanaleditor f\u00FCr VDR
++ChannelEditor.25=ChannelEditor
++ChannelPropertyPanel.0=Name:
++ChannelPropertyPanel.1=Frequenz:
++ChannelPropertyPanel.2=Quelle:
++ChannelPropertyPanel.3=Parameter:
++ChannelPropertyPanel.4=Symbolrate:
++ChannelPropertyPanel.5=jPanel
++ChannelPropertyPanel.6=VPID:
++ChannelPropertyPanel.7=APID:
++ChannelPropertyPanel.8=TPID:
++ChannelPropertyPanel.9=SID:
++ChannelListingPanel.10=Sortieren
++ChannelPropertyPanel.10=TID:
++ChannelPropertyPanel.11=CA-ID:
++ChannelPropertyPanel.12=NID:
++ChannelPropertyPanel.13=RID:
++ChannelPropertyPanel.14=
++ChannelPropertyPanel.15=Bouquet:
++ChannelPropertyPanel.16=Startnr. (@):
++ChannelPropertyPanel.17=Alias:
++ChannelPropertyPanel.18=Kann \u00FCber Menu exportiert werden.
++ChannelPropertyPanel.19=jPanel1
++ChannelPropertyPanel.24=\u00C4nderungen \u00FCbernehmen
++ChannelSearchInputDialog.0=Kanalsuche
++ChannelSearchInputDialog.1=<html><body>Suchbegriff eingeben (Gesucht wird ein Teil innerhalb des ausgew\u00E4hlten Feldes)<br>Die Suche startet vom zuletzt markierten Knoten und findet nur Kan\u00E4le die sich unterhalb dieses Knotens befinden.</body></html>
++ChannelSearchInputDialog.2=Suchbegriff:
++ChannelSearchInputDialog.3=<html><body><u>Suche in</u></body></html>
++ChannelSearchInputDialog.4=Frequenz:
++ChannelSearchInputDialog.5=Parameter:
++ChannelSearchInputDialog.6=Quelle:
++ChannelSearchInputDialog.7=Symbolrate:
++ChannelSearchInputDialog.8=Pidfelder:
++ChannelSearchInputDialog.9=Suchparameter
++ChannelSearchInputDialog.10=Name:
++ChannelSearchInputDialog.11=Bouquet:
++ChannelSearchInputDialog.12=Suchen
++ChannelSearchInputDialog.14=Suchbegriff darf nicht leer sein\!
++ChannelSearchInputDialog.15=Mindestens ein Suchbereich muss angegeben sein\!
++ChannelSearchInputDialog.16=Abbrechen
++PreferencesDialog.0=Lokale Einstellungen
++PreferencesDialog.1=Speichern
++PreferencesDialog.3=Abbrechen
++PreferencesDialog.5=Icon Layout:
++PreferencesDialog.6=Fontgr\u00F6sse (Kan\u00E4le):
++PreferencesDialog.7=(0 = default)
++PreferencesDialog.8=Sprache:
++PreferencesAction.0=Einstellungen
++CreateChannelDialog.0=Neuen Kanal anlegen
++CreateChannelDialog.1=<html><body>Bitte geben sie alle notwendigen Kanalinformationen an.<br><u>ACHTUNG</u> \u00E4ltere VDR Versionen k\u00F6nnen keine doppelten Kan\u00E4le einlesen\!</body></html>
++CreateChannelDialog.2=Kanal anlegen
++CreateChannelDialog.4=Es muss mindestens der Kanalname angegeben werden.
++CreateChannelDialog.5=Abbrechen
++CreateChannelAction.0=Neuen Kanal erzeugen
++CreateCategoryAction.0=Neue Rubrik erzeugen
++CreateCategoryAction.2=Bitte den Name f\u00FCr die neue Rubrik eingeben:
++CreateCategoryAction.3=Neue Rubrik
++ChannelEditor.0=Nichts selektiert
++ChannelEditor.1=Datei
++ChannelEditor.2=Info
++ChannelEditor.3=Anwendung beenden
++ChannelEditor.4=Kanalliste \u00F6ffnen
++ChannelEditor.5=Aktuelle Kanalliste speichern
++ChannelEditor.6=Aktuelle Kanalliste speichern unter..
++ChannelEditor.7=\u00D6ffne Lokale Einstellungen
++ChannelEditor.8=Kanal suchen
++ChannelEditor.9=Markierte Kan\u00E4le auf den Parkplatz verschieben
++ImportAliasAction.0=Alias Importieren
++ImportAliasAction.2=Es wurden
++ImportAliasAction.3=\ alias Eintr\u00E4ge aus dem File '
++ImportAliasAction.4=' gelesen.\n\n
++ImportAliasAction.5=\ konnten davon Kan\u00E4len zugeordnet werden.\n
++ImportAliasAction.6=Das angegebene File:\n\n
++ImportAliasAction.7=\n\nkonnte nicht ge\u00F6ffnet werden.\n\n\n
++SortNameAction.0=nach Namen
++SortTypeAction.0=nach TV
++SortTypeAction.1=nach TV Verschl\u00FCsselt
++SortTypeAction.2=nach Radio
++SortTypeAction.3=nach Radio Verschl\u00FCssellt
++SortTypeAction.4=nach Service
++SortTypeAction.5=nach Service Verschl\u00FCssellt
++SortTypeAction.6=not supported
++SortBouqetAction.0=nach Bouquet
++SortFrequenzAction.0=nach Frequenz
++OpenAction.0=\u00D6ffnen
++OpenAction.2=\u00C4nderungen wurden nicht gespeichert. Wirklich eine neue Datei \u00F6ffnen?
++OpenAction.3=Info
++OpenAction.5=Kanallisten
++OpenAction.6=Die angegebene Datei:\n\n
++OpenAction.7=\n\nkonnte nicht ge\u00F6ffnet werden.\n\n\n
++ParkAction.0=Parken
++SaveAsAction.0=Speichern unter
++SaveAsAction.3=Kanallisten
++SaveAsAction.4=Die Datei '
++SaveAsAction.5=' existiert bereits.\nSoll die Liste trotzdem gespeichert werden (Datei wird \u00FCberschrieben)?
++SaveAsAction.6=Info
++SaveAsAction.7=Fehler beim Speichern unter:
++SaveAsAction.8=
++SaveAsAction.9=\nError message:
++SaveAction.0=Speichern
++SaveAction.2=Fehler beim Speichern nach:
++SaveAction.3=\nError message:
++SaveAction.4=Error
++SaveAsAction.10=Error
++StatisticAction.0=Statistik
++StatisticAction.4=<html><body>
++StatisticAction.5=<h1>Statistik der Kanalliste</h1>
++StatisticAction.6=<h3><u>Dateiinformationen:</u></h3>
++StatisticAction.7=<table>
++StatisticAction.8=<tr><td><font color=green>Geladene Datei</font></td><td><font color=blue>
++StatisticAction.9=</font></td></tr>
++StatisticAction.10=<tr><td><font color=green>Dateipfad</font></td><td><font color=blue>
++StatisticAction.11=</font></td></tr>
++StatisticAction.12=<tr><td><font color=green>Dateigr\u00F6sse</font></td><td><font color=blue>
++StatisticAction.13=\ Byte</font></td></tr>
++StatisticAction.14=</table>
++StatisticAction.15=<h3><u>Kanalinformationen:</u></h3>
++StatisticAction.16=<table>
++StatisticAction.17=<tr><td><font color=green>Anzahl Kan\u00E4le</font></td><td><font color=blue>
++StatisticAction.18=</font></td></tr>
++StatisticAction.19=<tr><td><font color=green>davon Rubriken</font></td><td><font color=blue>
++StatisticAction.20=</font></td></tr>
++StatisticAction.21=<tr><td><font color=green>davon TV</font></td><td><font color=blue>
++StatisticAction.22=</font></td></tr>
++StatisticAction.23=<tr><td><font color=green>davon Radio</font></td><td><font color=blue>
++StatisticAction.24=</font></td></tr>
++StatisticAction.25=<tr><td><font color=green>davon Service</font></td><td><font color=blue>
++StatisticAction.26=</font></td></tr>
++StatisticAction.27=<tr><td><font color=green>Neue Dateigr\u00F6sse</font></td><td><font color=blue>
++StatisticAction.28=\ Byte</font></td></tr>
++StatisticAction.29=</table>
++StatisticAction.30=</body></html>
++StatisticAction.31=Statistik
++UnparkAction.0=Entparken
++ExportAliasAction.0=Alias Exportieren
++ExportAliasAction.2=Die Datei '
++ExportAliasAction.3=' existiert bereits.\nSoll die Aliasliste trotzdem gespeichert werden (Datei wird \u00FCberschrieben)?
++ExportAliasAction.4=Info
++ExportAliasAction.6=Es wurden
++ExportAliasAction.7=\ Alias Eintr\u00E4ge gespeichert.
++ExportAliasAction.8=Fehler beim Speichern unter:
++ExportAliasAction.10=\nError message:
++ExportAliasAction.11=Error
++DeleteChannelAction.0=Entfernen
++CloseAction.0=Beenden
++CloseAction.2=Ihr Parkplatz ist noch gef\u00FCllt!\nDiese Inhalte gehen nach dem Beenden verloren.\n\nMit dem Beenden Fortfahren?
++CloseAction.3=Info
++CloseAction.4=\u00C4nderungen wurden nicht gespeichert. Wirklich beenden?
++CloseAction.5=Info
++SearchAction.0=Suchen
++SearchAction.2=Es konnte kein Kanal gefunden werden\!\nSuchbegriff:
++SearchAction.3=Suchergebnis
++AboutAction.0=\u00DCber
++AboutAction.2=<html><body>
++AboutAction.3=<h1>Kanaleditor f\u00FCr VDR Version 1.9.2.1</h1>
++AboutAction.4=<p>Editor f\u00FCr die VDR Kanalliste.<br>
++AboutAction.5=F\u00FCr Datenverlust oder Besch\u00E4digung wird keinerlei Haftung \u00FCbernommen.</p><br>
++AboutAction.6=<hr>
++AboutAction.7=<p>Copyright(C) 2007 by Renier Roth</p>
++AboutAction.8=<p>Released under the terms of the GNU General Public License version 2 or later.</p>
++AboutAction.11=<br><p><font size=-2>Icons Copyright(C) 1998 by Dean S. Jones dean@gallant.com www.gallant.com/icons.htm</font></p>
++AboutAction.12=</body></html>
++AboutAction.13=About
++MultiRenameAction.0=Kanalnamen umbenennen
++MultiRenameAction.2=Funktion zum Vorranstellen eines Textes\nzu jedem Kanalnahmen innerhalb der zuletzt markierten Rubrik.\n\nWird vom Hauptknoten ausgegangen werden alle Kan\u00E4le umbenannt.\n\nBitte Text eingeben, der vor den Kanalnamen gestellt werden soll:
++MultiRenameAction.3=Mehrfachumbenennung
++LocalProperties.5=Lokale Einstellungen
++LocalProperties.6=Lokale Einstellungen konnten nicht geladen werden\!
++LocalProperties.10=ChannelEditor Property File
++LocalProperties.11=Lokale Einstellungen
++LocalProperties.12=Lokale Einstellungen k\u00F6nnen nicht gespeichert werden\!
diff --git a/media-tv/channeleditor/files/channeleditor-1.9.2.1-messages_en.properties.patch b/media-tv/channeleditor/files/channeleditor-1.9.2.1-messages_en.properties.patch
new file mode 100644
index 00000000000..5a01dff9755
--- /dev/null
+++ b/media-tv/channeleditor/files/channeleditor-1.9.2.1-messages_en.properties.patch
@@ -0,0 +1,160 @@
+--- trunk/src/java/de/renier/vdr/channel/editor/messages_en.properties 2008/06/18 07:43:28 10
++++ trunk/src/java/de/renier/vdr/channel/editor/messages_en.properties 2008/06/23 07:01:09 12
+@@ -4,15 +4,15 @@
+ ChannelDeletedPanel.0=Deleted channels (for recovery)
+ ChannelDeletedPanel.2=Clear removed channels
+ ChannelEditor.10=Move selected or clipboard items to selected tree
+-ChannelEditor.11=Remove selectedMarkierte Kan\u00E4le entfernen
++ChannelEditor.11=Remove selected
+ ChannelEditor.12=Add new channel
+ ChannelEditor.13=Add new category
+ ChannelEditor.14=Multiple channel rename - Add a text in front
+-ChannelEditor.15=Current statistic
++ChannelEditor.15=Current statistics
+ ChannelEditor.16=About
+ ChannelEditor.17=Clipboard
+ ChannelEditor.19=Removed channels
+-ChannelEditor.21=Letze Dateien
++ChannelEditor.21=Recent files
+ ChannelEditor.23=Tools
+ ChannelEditor.24=Channeleditor for VDR
+ ChannelEditor.25=Channeleditor
+@@ -32,10 +32,10 @@
+ ChannelPropertyPanel.12=NID:
+ ChannelPropertyPanel.13=RID:
+ ChannelPropertyPanel.14=
+-ChannelPropertyPanel.15=Bouqet:
+-ChannelPropertyPanel.16=Startnumber. (@):
++ChannelPropertyPanel.15=Bouquet:
++ChannelPropertyPanel.16=Start number. (@):
+ ChannelPropertyPanel.17=Alias:
+-ChannelPropertyPanel.18=can be exported through menu
++ChannelPropertyPanel.18=Can be exported through menu
+ ChannelPropertyPanel.19=jPanel1
+ ChannelPropertyPanel.24=Apply
+ ChannelSearchInputDialog.0=Channel search
+@@ -49,7 +49,7 @@
+ ChannelSearchInputDialog.8=Pidfield:
+ ChannelSearchInputDialog.9=Search parameter:
+ ChannelSearchInputDialog.10=Name:
+-ChannelSearchInputDialog.11=Bouqet:
++ChannelSearchInputDialog.11=Bouquet:
+ ChannelSearchInputDialog.12=Search
+ ChannelSearchInputDialog.14=Search term cannot be empty\!
+ ChannelSearchInputDialog.15=Enter at least one serch term\!
+@@ -63,9 +63,9 @@
+ PreferencesDialog.8=Language:
+ PreferencesAction.0=Settings
+ CreateChannelDialog.0=Add new Channel
+-CreateChannelDialog.1=<html><body>Bitte geben sie alle notwendigen Kanalinformationen an.<br><u>ACHTUNG</u> \u00E4ltere VDR Versionen k\u00F6nnen keine doppelten Kan\u00E4le in der Liste einlesen\!</body></html>
++CreateChannelDialog.1=<html><body>Please enter the complete channel data.<br><u>WARNING</u> older VDR versions are not able to read duplicate channels from the list\!</body></html>
+ CreateChannelDialog.2=Add channel
+-CreateChannelDialog.4=Es muss mindestens der Kanalname angegeben werden.
++CreateChannelDialog.4=Enter at least the channel name.
+ CreateChannelDialog.5=Abort
+ CreateChannelAction.0=Create new channel
+ CreateCategoryAction.0=Create new category
+@@ -88,25 +88,25 @@
+ ImportAliasAction.5=\ entrys could be assigned.\n
+ ImportAliasAction.6=The selected file:\n\n
+ ImportAliasAction.7=\n\ncould not be opened.\n\n\n
+-SortNameAction.0=after Name
+-SortTypeAction.0=after TV
+-SortTypeAction.1=after TV encrypted
+-SortTypeAction.2=after Radio
+-SortTypeAction.3=after Radio encrypted
+-SortTypeAction.4=after Service
+-SortTypeAction.5=after Service encrypted
++SortNameAction.0=by Name
++SortTypeAction.0=by TV
++SortTypeAction.1=by TV encrypted
++SortTypeAction.2=by Radio
++SortTypeAction.3=by Radio encrypted
++SortTypeAction.4=by Service
++SortTypeAction.5=by Service encrypted
+ SortTypeAction.6=not supported
+-SortBouqetAction.0=after Bouqet
+-SortFrequenzAction.0=after Frequency
++SortBouqetAction.0=by Bouquet
++SortFrequenzAction.0=by Frequency
+ OpenAction.0=Open
+ OpenAction.2=Nothing has been saved. Do you really want to open a new file?
+ OpenAction.3=Info
+-OpenAction.5=Configuration Files
++OpenAction.5=Channel lists
+ OpenAction.6=The selected file:\n\n
+ OpenAction.7=\n\ncould not be opened.\n\n\n
+ ParkAction.0=Clipboard
+ SaveAsAction.0=Save as
+-SaveAsAction.3=Configuration Files
++SaveAsAction.3=Channel lists
+ SaveAsAction.4=File '
+ SaveAsAction.5=' already exists.\nSave anyway? (old file will be overwritten)?
+ SaveAsAction.6=Info
+@@ -118,9 +118,9 @@
+ SaveAction.3=\nError message:
+ SaveAction.4=Error
+ SaveAsAction.10=Error
+-StatisticAction.0=Statistic
++StatisticAction.0=Statistics
+ StatisticAction.4=<html><body>
+-StatisticAction.5=<h1>Statistic</h1>
++StatisticAction.5=<h1>Statistics</h1>
+ StatisticAction.6=<h3><u>File information:</u></h3>
+ StatisticAction.7=<table>
+ StatisticAction.8=<tr><td><font color=green>Loaded file</font></td><td><font color=blue>
+@@ -130,11 +130,11 @@
+ StatisticAction.12=<tr><td><font color=green>Filesize</font></td><td><font color=blue>
+ StatisticAction.13=\ Byte</font></td></tr>
+ StatisticAction.14=</table>
+-StatisticAction.15=<h3><u>Channelinformation:</u></h3>
++StatisticAction.15=<h3><u>Channel information:</u></h3>
+ StatisticAction.16=<table>
+ StatisticAction.17=<tr><td><font color=green>Number of channels</font></td><td><font color=blue>
+ StatisticAction.18=</font></td></tr>
+-StatisticAction.19=<tr><td><font color=green>Categorys</font></td><td><font color=blue>
++StatisticAction.19=<tr><td><font color=green>Categories</font></td><td><font color=blue>
+ StatisticAction.20=</font></td></tr>
+ StatisticAction.21=<tr><td><font color=green>TV</font></td><td><font color=blue>
+ StatisticAction.22=</font></td></tr>
+@@ -146,7 +146,7 @@
+ StatisticAction.28=\ Byte</font></td></tr>
+ StatisticAction.29=</table>
+ StatisticAction.30=</body></html>
+-StatisticAction.31=Statistic
++StatisticAction.31=Statistics
+ UnparkAction.0=Remove
+ ExportAliasAction.0=Export alias
+ ExportAliasAction.2=File '
+@@ -161,15 +161,15 @@
+ CloseAction.0=Quit
+ CloseAction.2=Clipboard not empty. Elements will be lost after quitting. Quit anyway?
+ CloseAction.3=Info
+-CloseAction.4=Changes unsaved. Do you really want to quit?
++CloseAction.4=Changes not saved. Do you really want to quit?
+ CloseAction.5=Info
+ SearchAction.0=Search
+-SearchAction.2=No Channel could be found\!\nSearch term:
++SearchAction.2=No Channel found\!\nSearch term:
+ SearchAction.3=Search result
+ AboutAction.0=About
+ AboutAction.2=<html><body>
+ AboutAction.3=<h1>Channeleditor for VDR Version 1.9.2.1</h1>
+-AboutAction.4=<p>Editor for channels.conf File.<br>
++AboutAction.4=<p>Editor for the VDR channels.conf File.<br>
+ AboutAction.5=Use at your own risk!</p><br>
+ AboutAction.6=<hr>
+ AboutAction.7=<p>Copyright(C) 2007 by Renier Roth</p>
+@@ -178,10 +178,10 @@
+ AboutAction.12=</body></html>
+ AboutAction.13=About
+ MultiRenameAction.0=Rename channel
+-MultiRenameAction.2=Function to add a text\nzu in front of each channel name in the last selected category. Each channel name in the last selected category\n\nIf root is selected, every channel will be renamed.\n\nPlease enter the text, which should be added:
++MultiRenameAction.2=Function to add a text\nin front of each channel name in the last selected category.\n\nIf the root knot is selected, every channel will be renamed.\n\nPlease enter the text, which should be added:
+ MultiRenameAction.3=Multiple rename
+ LocalProperties.5=Local settings
+ LocalProperties.6=Unable to load local settings\!
+-LocalProperties.10=Channelrditor property file
++LocalProperties.10=Channeleditor property file
+ LocalProperties.11=Local Settings
+ LocalProperties.12=Unable to save local settings\!
diff --git a/media-tv/channeleditor/metadata.xml b/media-tv/channeleditor/metadata.xml
new file mode 100644
index 00000000000..9a66f97c792
--- /dev/null
+++ b/media-tv/channeleditor/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>billie@gentoo.org</email>
+ <name>Daniel Pielmeier</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">channeleditor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/dvbstream/Manifest b/media-tv/dvbstream/Manifest
new file mode 100644
index 00000000000..e1a317cc301
--- /dev/null
+++ b/media-tv/dvbstream/Manifest
@@ -0,0 +1 @@
+DIST dvbstream-snapshot-20080302.tar.bz2 58089 SHA256 2c3eb657b794d9366b7f619ae35687b276bcded8629d2372af7251cd7eab7d24
diff --git a/media-tv/dvbstream/dvbstream-0.7_pre20080516.ebuild b/media-tv/dvbstream/dvbstream-0.7_pre20080516.ebuild
new file mode 100644
index 00000000000..9f3621216e3
--- /dev/null
+++ b/media-tv/dvbstream/dvbstream-0.7_pre20080516.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE=""
+
+DESCRIPTION="simple command line tools for DVB cards. Includes a RTP multicast stream server"
+HOMEPAGE="http://sourceforge.net/projects/dvbtools"
+
+#SRC_URI="mirror://sourceforge/dvbtools/${P}.tar.gz"
+#MY_P=${PN}-snapshot-${PV##*_pre}
+MY_P=${PN}-snapshot-20080302
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+
+RDEPEND="dev-lang/perl"
+DEPEND="virtual/linuxtv-dvb-headers"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-update.diff"
+ epatch "${FILESDIR}/${PN}-0.7_pre20080302-telnet-port-switch.diff"
+
+ cd "${S}"
+ sed -i Makefile \
+ -e 's:$(CFLAGS):$(CFLAGS) $(CPPFLAGS):' \
+ -e '/CFLAGS.*=.*-g -Wall -O2/s:-g -Wall -O2::' \
+ -e '/CFLAGS.*=/s:CFLAGS:CPPFLAGS:' \
+ -e 's:-I \.\./DVB/include:-I /usr/include:'
+
+ cp TELNET/svdrpsend.pl dvbstream-send.pl
+ cp TELNET/README README.telnet
+
+ sed -e 's:\./svdrpsend.pl:dvbstream-send.pl:' \
+ -i TELNET/*.sh
+
+ sed -e 's:^DUMPRTP=.*$:DUMPRTP=dumprtp:' \
+ -e 's:^TS2ES=.*$:TS2ES=ts2es:' \
+ -i *.sh
+}
+
+src_install() {
+ dobin dvbstream dumprtp rtpfeed ts_filter dvbstream-send.pl
+
+ dodoc README*
+
+ insinto /usr/share/doc/${PF}/tune
+ doins TELNET/*.sh
+
+ insinto /usr/share/doc/${PF}/multicast
+ doins *.sh
+}
diff --git a/media-tv/dvbstream/files/dvbstream-0.7_pre20080302-telnet-port-switch.diff b/media-tv/dvbstream/files/dvbstream-0.7_pre20080302-telnet-port-switch.diff
new file mode 100644
index 00000000000..6964b4f3e77
--- /dev/null
+++ b/media-tv/dvbstream/files/dvbstream-0.7_pre20080302-telnet-port-switch.diff
@@ -0,0 +1,26 @@
+diff -ru dvbstream-orig/dvbstream.c dvbstream/dvbstream.c
+--- dvbstream-orig/dvbstream.c 2008-05-16 18:23:03.023540289 +0200
++++ dvbstream/dvbstream.c 2008-05-16 18:25:32.293536581 +0200
+@@ -929,6 +929,7 @@
+
+ if (argc==1) {
+ fprintf(stderr,"Usage: dvbtune [OPTIONS] pid1 pid2 ... pid8\n\n");
++ fprintf(stderr,"-tp TELNET port\n");
+ fprintf(stderr,"-i IP multicast address\n");
+ fprintf(stderr,"-r IP multicast port\n");
+ fprintf(stderr,"-net ip:prt IP address:port combination to be followed by pids list. Can be repeated to generate multiple RTP streams\n");
+@@ -1079,6 +1080,12 @@
+ LOF2=atoi(argv[i]);
+ LOF2*=1000UL;
+ }
++#ifdef ENABLE_TELNET
++ else if (strcmp(argv[i],"-tp")==0) {
++ i++;
++ port=atoi(argv[i]);
++ }
++#endif
+ else if (strcmp(argv[i],"-s")==0) {
+ i++;
+ srate=atoi(argv[i])*1000UL;
+Nur in dvbstream: dvbstream.c.orig.
+Nur in dvbstream: dvbstream.c.rej.
diff --git a/media-tv/dvbstream/files/dvbstream-0.7_pre20080516-update.diff b/media-tv/dvbstream/files/dvbstream-0.7_pre20080516-update.diff
new file mode 100644
index 00000000000..ed670e46537
--- /dev/null
+++ b/media-tv/dvbstream/files/dvbstream-0.7_pre20080516-update.diff
@@ -0,0 +1,12 @@
+diff -ru dvbstream-20080302/dvbstream.c dvbstream/dvbstream.c
+--- dvbstream-20080302/dvbstream.c 2007-09-14 23:02:39.000000000 +0200
++++ dvbstream/dvbstream.c 2008-03-24 19:28:16.000000000 +0100
+@@ -817,6 +817,8 @@
+ return 0;
+ else if(af == 3)
+ l += buf[4] + 1;
++ if(l >= TS_SIZE - 4)
++ return 0;
+
+ if(pid == 0)
+ {
diff --git a/media-tv/dvbstream/metadata.xml b/media-tv/dvbstream/metadata.xml
new file mode 100644
index 00000000000..740fefd7217
--- /dev/null
+++ b/media-tv/dvbstream/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+</pkgmetadata>
+
diff --git a/media-tv/dvbstreamer/Manifest b/media-tv/dvbstreamer/Manifest
new file mode 100644
index 00000000000..27a1342f154
--- /dev/null
+++ b/media-tv/dvbstreamer/Manifest
@@ -0,0 +1,2 @@
+DIST dvbstreamer-1.1.tar.bz2 1215626 SHA256 52315b436f00174ab8feac262bc9217a213facb7a7c5298159084f754ab46a23
+DIST dvbstreamer-2.0.0rc1.tar.bz2 676762 SHA256 8e89768452dc4096a38ab68817c6759fa005bfa480a8d9f1142fe70c6d052200
diff --git a/media-tv/dvbstreamer/dvbstreamer-1.1-r1.ebuild b/media-tv/dvbstreamer/dvbstreamer-1.1-r1.ebuild
new file mode 100644
index 00000000000..eebc34dcd48
--- /dev/null
+++ b/media-tv/dvbstreamer/dvbstreamer-1.1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils multilib
+
+DESCRIPTION="DVB over UDP streaming solution"
+HOMEPAGE="http://dvbstreamer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-db/sqlite:3
+ sys-libs/readline
+ >=sys-devel/libtool-2.2.6"
+DEPEND="${RDEPEND}
+ virtual/linuxtv-dvb-headers"
+
+src_prepare() {
+ rm -rf libltdl
+ epatch "${FILESDIR}"/${P}-Werror.patch \
+ "${FILESDIR}"/${P}-libtool.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ rm -rf "${D}"/usr/doc
+
+ dodoc doc/*.txt ChangeLog README AUTHORS NEWS TODO
+}
diff --git a/media-tv/dvbstreamer/dvbstreamer-2.0.0_rc1.ebuild b/media-tv/dvbstreamer/dvbstreamer-2.0.0_rc1.ebuild
new file mode 100644
index 00000000000..8f7c34a3469
--- /dev/null
+++ b/media-tv/dvbstreamer/dvbstreamer-2.0.0_rc1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+MY_P=${P/_}
+
+DESCRIPTION="DVB over UDP streaming solution"
+HOMEPAGE="http://dvbstreamer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-db/sqlite:3
+ dev-libs/libev
+ dev-libs/libyaml
+ >=sys-devel/libtool-2.2.6b
+ sys-libs/readline"
+DEPEND="${RDEPEND}
+ virtual/linuxtv-dvb-headers"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --enable-file-streamer
+}
+
+src_install() {
+ emake DESTDIR="${D}" dvbstreamerdocdir="/usr/share/doc/${PF}" install || die
+ dodoc doc/*.txt
+ prepalldocs
+}
diff --git a/media-tv/dvbstreamer/files/dvbstreamer-1.1-Werror.patch b/media-tv/dvbstreamer/files/dvbstreamer-1.1-Werror.patch
new file mode 100644
index 00000000000..182b4ca6b3d
--- /dev/null
+++ b/media-tv/dvbstreamer/files/dvbstreamer-1.1-Werror.patch
@@ -0,0 +1,36 @@
+diff -ur dvbstreamer-1.1.orig/src/dvbpsi/Makefile.am dvbstreamer-1.1/src/dvbpsi/Makefile.am
+--- dvbstreamer-1.1.orig/src/dvbpsi/Makefile.am 2008-10-31 16:25:01.000000000 +0200
++++ dvbstreamer-1.1/src/dvbpsi/Makefile.am 2009-08-10 10:49:55.000000000 +0300
+@@ -1,7 +1,7 @@
+ AM_CFLAGS =\
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/dvbpsi \
+- -Wall -Werror
++ -Wall
+
+ noinst_LIBRARIES = libdvbpsi.a
+
+diff -ur dvbstreamer-1.1.orig/src/Makefile.am dvbstreamer-1.1/src/Makefile.am
+--- dvbstreamer-1.1.orig/src/Makefile.am 2008-10-31 16:25:02.000000000 +0200
++++ dvbstreamer-1.1/src/Makefile.am 2009-08-10 10:50:04.000000000 +0300
+@@ -3,7 +3,7 @@
+ INCLUDES = @INCLTDL@
+
+ AM_CFLAGS =\
+- -I$(top_srcdir)/include -Wall -Werror -D_GNU_SOURCE
++ -I$(top_srcdir)/include -Wall -D_GNU_SOURCE
+
+
+ bin_PROGRAMS = dvbstreamer dvbctrl setupdvbstreamer
+diff -ur dvbstreamer-1.1.orig/src/plugins/Makefile.am dvbstreamer-1.1/src/plugins/Makefile.am
+--- dvbstreamer-1.1.orig/src/plugins/Makefile.am 2008-10-31 16:24:58.000000000 +0200
++++ dvbstreamer-1.1/src/plugins/Makefile.am 2009-08-10 10:50:17.000000000 +0300
+@@ -2,7 +2,7 @@
+ # Plugins
+ #
+ AM_CFLAGS =\
+- -I$(top_srcdir)/include -Wall -Werror -D_GNU_SOURCE
++ -I$(top_srcdir)/include -Wall -D_GNU_SOURCE
+
+ pluginsdir = @DVBSTREAMER_PLUGINDIR@
+
diff --git a/media-tv/dvbstreamer/files/dvbstreamer-1.1-libtool.patch b/media-tv/dvbstreamer/files/dvbstreamer-1.1-libtool.patch
new file mode 100644
index 00000000000..1b95f79447e
--- /dev/null
+++ b/media-tv/dvbstreamer/files/dvbstreamer-1.1-libtool.patch
@@ -0,0 +1,71 @@
+diff -ur dvbstreamer-1.1.orig/configure.in dvbstreamer-1.1/configure.in
+--- dvbstreamer-1.1.orig/configure.in 2008-10-31 16:49:00.000000000 +0200
++++ dvbstreamer-1.1/configure.in 2010-02-03 12:30:56.000000000 +0200
+@@ -23,7 +23,6 @@
+
+ AM_INIT_AUTOMAKE("dvbstreamer", $SPEC_VERSION)
+
+-AC_CONFIG_SUBDIRS(libltdl)
+ AM_CONFIG_HEADER(config.h)
+
+ AC_ISC_POSIX
+@@ -35,12 +34,8 @@
+ dnl ---------------------------------------------------------------------------
+ dnl Libltdl setup
+ dnl ---------------------------------------------------------------------------
+-AC_LIBTOOL_WIN32_DLL dnl Make sure under cygwin we can load plugins !!!
+-AC_LIBTOOL_DLOPEN
+-AC_LIBLTDL_CONVENIENCE
+-AC_PROG_LIBTOOL
+-AC_SUBST(INCLTDL)
+-AC_SUBST(LIBLTDL)
++LT_PREREQ([2.2.6])
++LT_INIT([dlopen win32-dll disable-static])
+
+ dnl ---------------------------------------------------------------------------
+ dnl Work out the libdir name (copied from xine-lib configure.ac)
+diff -ur dvbstreamer-1.1.orig/Makefile.am dvbstreamer-1.1/Makefile.am
+--- dvbstreamer-1.1.orig/Makefile.am 2008-10-31 16:25:03.000000000 +0200
++++ dvbstreamer-1.1/Makefile.am 2010-02-03 12:25:57.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## DVBStreamer main Makefile
+
+-SUBDIRS = libltdl include include/dvbpsi src/dvbpsi src src/plugins
++SUBDIRS = include include/dvbpsi src/dvbpsi src src/plugins
+
+ dvbstreamerdocdir = ${prefix}/doc/DVBStreamer
+ dvbstreamerdoc_DATA = \
+diff -ur dvbstreamer-1.1.orig/src/Makefile.am dvbstreamer-1.1/src/Makefile.am
+--- dvbstreamer-1.1.orig/src/Makefile.am 2008-10-31 16:25:02.000000000 +0200
++++ dvbstreamer-1.1/src/Makefile.am 2010-02-03 12:33:30.000000000 +0200
+@@ -1,7 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+
+-INCLUDES = @INCLTDL@
+-
+ AM_CFLAGS =\
+ -I$(top_srcdir)/include -Wall -Werror -D_GNU_SOURCE
+
+@@ -104,7 +102,7 @@
+ dvbstreamer_LDFLAGS = -rdynamic -Wl,-whole-archive -Wl,dvbpsi/libdvbpsi.a -Wl,-no-whole-archive
+
+ dvbstreamer_LDADD = \
+- -lpthread -lsqlite3 -lreadline @GETTIME_LIB@ @ICONV_LIB@ @READLINE_TERMCAP@ @LIBLTDL@
++ -lpthread -lsqlite3 -lreadline @GETTIME_LIB@ @ICONV_LIB@ @READLINE_TERMCAP@ -lltdl
+
+ #
+ # dvbctrl
+diff -ur dvbstreamer-1.1.orig/src/pluginmgr.c dvbstreamer-1.1/src/pluginmgr.c
+--- dvbstreamer-1.1.orig/src/pluginmgr.c 2008-10-31 16:25:02.000000000 +0200
++++ dvbstreamer-1.1/src/pluginmgr.c 2010-02-03 12:27:53.000000000 +0200
+@@ -22,9 +22,9 @@
+ */
+ #include <stdlib.h>
+ #include <string.h>
++#include <ltdl.h>
+
+ #include "config.h"
+-#include "ltdl.h"
+ #include "list.h"
+ #include "deliverymethod.h"
+ #include "patprocessor.h"
diff --git a/media-tv/dvbstreamer/metadata.xml b/media-tv/dvbstreamer/metadata.xml
new file mode 100644
index 00000000000..0a94620f9cc
--- /dev/null
+++ b/media-tv/dvbstreamer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <upstream>
+ <remote-id type="sourceforge">dvbstreamer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/dvbtune/Manifest b/media-tv/dvbtune/Manifest
new file mode 100644
index 00000000000..c4fab52dec6
--- /dev/null
+++ b/media-tv/dvbtune/Manifest
@@ -0,0 +1 @@
+DIST dvbtune-0.5.tar.gz 20601 SHA256 e6113080ca8a07202584edea0ac15d5a0948fc30361b7002d39bcb439ef79378 SHA512 0c6e8b8b4185b1b63638f0eff3e07b2c5e4b3bb9d95debb1625973cec2293315754487702ba9f7ed6bd6a0a518b09c8333d9ac4cd40b61f56c311c3d624fd365 WHIRLPOOL 26308845c14a3b25830a98673bc827d11704dccaa570738dd99a47e234ab767cb47f7d225d63f5f9abab6f6db01335f11bb9bb6aa47708c726de9e335d40e0f5
diff --git a/media-tv/dvbtune/dvbtune-0.5-r1.ebuild b/media-tv/dvbtune/dvbtune-0.5-r1.ebuild
new file mode 100644
index 00000000000..01321127dbf
--- /dev/null
+++ b/media-tv/dvbtune/dvbtune-0.5-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="simple tuning app for DVB cards"
+HOMEPAGE="http://sourceforge.net/projects/dvbtools"
+SRC_URI="mirror://sourceforge/dvbtools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="xml"
+
+RDEPEND="xml? ( dev-libs/libxml2 )"
+DEPEND="${RDEPEND}
+ virtual/linuxtv-dvb-headers"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PF}-gentoo.diff
+}
+
+src_compile() {
+ emake dvbtune
+
+ use xml && emake xml2vdr
+}
+
+src_install() {
+ dobin dvbtune
+
+ use xml && dobin xml2vdr
+
+ dodoc README scripts/*
+}
diff --git a/media-tv/dvbtune/files/dvbtune-0.5-gentoo.diff b/media-tv/dvbtune/files/dvbtune-0.5-gentoo.diff
new file mode 100644
index 00000000000..d9b60b15852
--- /dev/null
+++ b/media-tv/dvbtune/files/dvbtune-0.5-gentoo.diff
@@ -0,0 +1,10 @@
+--- dvbtune-0.5/Makefile.orig 2006-01-06 13:01:11.973196250 +0100
++++ dvbtune-0.5/Makefile 2006-01-06 13:01:46.667364500 +0100
+@@ -1,5 +1,6 @@
+ INCS=-I /usr/include/libxml2
+-CFLAGS= -Wall $(INCS)
++CFLAGS ?= -Wall
++CFLAGS += $(INCS)
+ CC=gcc
+ all: dvbtune
+
diff --git a/media-tv/dvbtune/files/dvbtune-0.5-r1-gentoo.diff b/media-tv/dvbtune/files/dvbtune-0.5-r1-gentoo.diff
new file mode 100644
index 00000000000..a615317eb1d
--- /dev/null
+++ b/media-tv/dvbtune/files/dvbtune-0.5-r1-gentoo.diff
@@ -0,0 +1,20 @@
+--- dvbtune-0.5/Makefile.orig 2006-01-06 13:01:11.973196250 +0100
++++ dvbtune-0.5/Makefile 2006-01-06 13:01:46.667364500 +0100
+@@ -1,5 +1,6 @@
+ INCS=-I /usr/include/libxml2
+-CFLAGS= -Wall $(INCS)
++CFLAGS ?= -Wall
++CFLAGS += $(INCS)
+ CC=gcc
+ all: dvbtune
+
+@@ -33,7 +33,7 @@
+ dvbtune: dvbtune.c tune.o
+
+ xml2vdr: xml2vdr.c
+- $(CC) $(CFLAGS) -o xml2vdr xml2vdr.c -lxml2
++ $(CC) $(CFLAGS) -o xml2vdr xml2vdr.c -lxml2 $(LDFLAGS)
+
+ clean:
+ rm -f *.o *~ dvbtune xml2vdr
+
diff --git a/media-tv/dvbtune/metadata.xml b/media-tv/dvbtune/metadata.xml
new file mode 100644
index 00000000000..d95d55ae0fa
--- /dev/null
+++ b/media-tv/dvbtune/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <upstream>
+ <remote-id type="sourceforge">dvbtools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/freevo/Manifest b/media-tv/freevo/Manifest
new file mode 100644
index 00000000000..ceee63bd3ed
--- /dev/null
+++ b/media-tv/freevo/Manifest
@@ -0,0 +1 @@
+DIST freevo-1.9.0.tar.gz 27182867 SHA256 e3c97e1404bc5a171350d0c0edf8decaa6d4eb3eaa9e42112a903d375aaf8722 SHA512 4dc722efbf81101bda1ab4437516faa6d4471d4106553617d30dd6de860bb7ca5a3c7bfc9865f4a7589d6726c7ef838161213f86c679889e1cd086362921ebac WHIRLPOOL 16abf397c20b9dd18271c5933e343c846746cbbbf5bef8a126a364ce945c820e8e0f164e66fb56a61d86f256e6d7b98ba110a39395d8d26c278c6e54ede8a543
diff --git a/media-tv/freevo/files/freevo-1.8.2.boot b/media-tv/freevo/files/freevo-1.8.2.boot
new file mode 100644
index 00000000000..4f4c627f008
--- /dev/null
+++ b/media-tv/freevo/files/freevo-1.8.2.boot
@@ -0,0 +1,57 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# use "freevoboot stop" to stop, "freevoboot xstop" if you use X.
+
+freevo=`grep ^freevo= /etc/conf.d/freevo | cut -d'"' -f2`
+webserver=`grep ^webserver= /etc/conf.d/freevo | cut -d'"' -f2`
+recordserver=`grep ^recordserver= /etc/conf.d/freevo | cut -d'"' -f2`
+
+
+if [ "x$1" != "xstop" ]; then
+ if [ "$recordserver" == "yes" ]; then
+ echo "Starting Freevo recordserver"
+ /usr/bin/freevo recordserver start
+ fi
+
+ if [ "$webserver" == "yes" ]; then
+ echo "Starting Freevo webserver"
+ /usr/bin/freevo webserver start
+ fi
+
+ if [ "$freevo" == "daemon" ] && [ "x$1" != "xstartx" ]; then
+ echo "Starting Freevo daemon"
+ /usr/bin/freevo daemon start
+ elif [ "$freevo" == "yes" ] || [ "x$1" == "xstartx" ] ; then
+ echo "Starting Freevo"
+ if egrep -q '^display.*(x11|dga)' /etc/freevo/freevo.conf ; then
+ if [ -z "$DISPLAY" ] ; then
+ /usr/bin/freevo -fs &>/dev/null &
+ else
+ /usr/bin/freevo &>/dev/null
+ fi
+ else
+ /usr/bin/freevo start
+ fi
+ fi
+
+else
+ if [ "$freevo" == "daemon" ] && [ "x$1" != "xstopx" ]; then
+ echo "Stopping Freevo daemon"
+ /usr/bin/freevo daemon stop
+ elif [ "$freevo" == "yes" ] || [ "x$1" == "xstopx" ] ; then
+ echo "Stopping Freevo"
+ /usr/bin/freevo stop
+ fi
+
+ if [ "$webserver" == "yes" ]; then
+ echo "Stopping Freevo webserver"
+ /usr/bin/freevo webserver stop
+ fi
+
+ if [ "$recordserver" == "yes" ]; then
+ echo "Stopping Freevo recordserver"
+ /usr/bin/freevo recordserver stop
+ fi
+fi
diff --git a/media-tv/freevo/files/freevo-1.9.0-PIL.patch b/media-tv/freevo/files/freevo-1.9.0-PIL.patch
new file mode 100644
index 00000000000..c24d4c4314f
--- /dev/null
+++ b/media-tv/freevo/files/freevo-1.9.0-PIL.patch
@@ -0,0 +1,26 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Mar 9 13:03:10 UTC 2014
+Subject: fix ImageFile import for pillow
+
+--- freevo-1.9.0/setup.py
++++ freevo-1.9.0/setup.py
+@@ -26,7 +26,7 @@
+ ('kaa.imlib2', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"' ),
+ ('BeautifulSoup', 'http://www.crummy.com/software/BeautifulSoup/' ),
+ ('pygame', 'http://www.pygame.org'),
+- ('Image', 'http://www.pythonware.com/products/pil/'),
++ ('PIL.Image', 'http://pypi.python.org/pypi/Pillow'),
+ ('twisted', 'http://www.twistedmatrix.com/'),
+ ('zope.interface', 'http://www.zope.org/Products/ZopeInterface'),
+ ('twisted.web.microdom', 'http://www.twistedmatrix.com/'),
+--- freevo-1.9.0/src/plugins/zoneminder.py
++++ freevo-1.9.0/src/plugins/zoneminder.py
+@@ -50,7 +50,7 @@
+ import pygame
+ import MySQLdb
+ import threading
+-import ImageFile
++from PIL import ImageFile
+
+ # Freevo
+ import config
diff --git a/media-tv/freevo/files/freevo-1.9.0-distutils-r1.patch b/media-tv/freevo/files/freevo-1.9.0-distutils-r1.patch
new file mode 100644
index 00000000000..1494d2f2080
--- /dev/null
+++ b/media-tv/freevo/files/freevo-1.9.0-distutils-r1.patch
@@ -0,0 +1,20 @@
+--- a/freevo-1.9.0/freevo
++++ b/freevo-1.9.0/freevo
+@@ -178,15 +178,8 @@
+ get the newest version of python [ with freevo installed ]
+ """
+ _debug_('version=%r' % (sys.version))
+- if sys.hexversion >= 0x02040000:
+- # python seems to be ok
+- search = ('python', 'python2')
+- elif sys.hexversion >= 0x02030000:
+- # try python2.4, else take python
+- search = ('python2.4', 'python')
+- else:
+- # python is too old, try to find python2.4 or python2
+- search = ('python2.4', 'python2')
++
++ search = ('@EPYTHON@', 'python')
+
+ for python in search:
+ for path in os.environ['PATH'].split(':'):
diff --git a/media-tv/freevo/files/freevo.boot b/media-tv/freevo/files/freevo.boot
new file mode 100755
index 00000000000..f375c889678
--- /dev/null
+++ b/media-tv/freevo/files/freevo.boot
@@ -0,0 +1,53 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# use "freevoboot stop" to stop, "freevoboot xstop" if you use X.
+
+freevo=`grep ^freevo= /etc/conf.d/freevo | cut -d'"' -f2`
+webserver=`grep ^webserver= /etc/conf.d/freevo | cut -d'"' -f2`
+recordserver=`grep ^recordserver= /etc/conf.d/freevo | cut -d'"' -f2`
+
+
+if [ "x$1" != "xstop" ]; then
+ if [ "$recordserver" == "yes" ]; then
+ echo "Starting Freevo recordserver"
+ /usr/bin/freevo recordserver start
+ fi
+
+ if [ "$webserver" == "yes" ]; then
+ echo "Starting Freevo webserver"
+ /usr/bin/freevo webserver start
+ fi
+
+ if [ "$freevo" == "daemon" ] && [ "x$1" != "xstartx" ]; then
+ echo "Starting Freevo daemon"
+ /usr/bin/freevo daemon start
+ elif [ "$freevo" == "yes" ] || [ "x$1" == "xstartx" ] ; then
+ echo "Starting Freevo"
+ if egrep -q '^display.*(x11|dga)' /etc/freevo/freevo.conf ; then
+ /usr/bin/freevo -fs &>/dev/null &
+ else
+ /usr/bin/freevo start
+ fi
+ fi
+
+else
+ if [ "$freevo" == "daemon" ] && [ "x$1" != "xstopx" ]; then
+ echo "Stopping Freevo daemon"
+ /usr/bin/freevo daemon stop
+ elif [ "$freevo" == "yes" ] || [ "x$1" == "xstopx" ] ; then
+ echo "Stopping Freevo"
+ /usr/bin/freevo stop
+ fi
+
+ if [ "$webserver" == "yes" ]; then
+ echo "Stopping Freevo webserver"
+ /usr/bin/freevo webserver stop
+ fi
+
+ if [ "$recordserver" == "yes" ]; then
+ echo "Stopping Freevo recordserver"
+ /usr/bin/freevo recordserver stop
+ fi
+fi
diff --git a/media-tv/freevo/files/freevo.conf b/media-tv/freevo/files/freevo.conf
new file mode 100644
index 00000000000..1515cfeef33
--- /dev/null
+++ b/media-tv/freevo/files/freevo.conf
@@ -0,0 +1,33 @@
+# /etc/conf.d/freevo: configuration options for the freevo init script.
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Id$
+#
+# Before using this, make sure your settings in /etc/freevo are correct.
+
+
+# Mode to start Freevo itself. Possible values are
+#
+# no: don't start Freevo
+# yes: start Freevo on startup. You should only use this when the
+# computer is for Freevo only or you use Freevo with a DXR3
+# daemon: start Freevo in daemon mode. The daemon will wait for you to
+# press QUIT or POWER on your remote and will than start
+# Freevo. After Freevo shut down, the daemon will wait again.
+#
+# You don't need a X server running to start Freevo from init. If
+# needed, Freevo will start a X server on its own. Make sure your X
+# server can handle the resolution defined in /etc/freevo/freevo.conf
+
+freevo="no"
+
+
+# Mode the start the webserver. Possible values are "no" and "yes".
+# If you start the webserver with Freevo itself, you should say "no" here.
+
+webserver="no"
+
+
+# Mode the start the recordserver. Possible values are "no" and "yes".
+
+recordserver="no"
diff --git a/media-tv/freevo/files/freevo.desktop b/media-tv/freevo/files/freevo.desktop
new file mode 100644
index 00000000000..cacbcc66d37
--- /dev/null
+++ b/media-tv/freevo/files/freevo.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Freevo
+TryExec=/usr/bin/freevo
+Exec=/usr/bin/freevo
+Icon=
+Type=Application
diff --git a/media-tv/freevo/files/xbox-lircrc b/media-tv/freevo/files/xbox-lircrc
new file mode 100644
index 00000000000..2763af002b3
--- /dev/null
+++ b/media-tv/freevo/files/xbox-lircrc
@@ -0,0 +1,135 @@
+begin
+ prog = freevo
+ button = 0
+ config = 0
+end
+begin
+ prog = freevo
+ button = 1
+ config = 1
+end
+begin
+ prog = freevo
+ button = 2
+ config = 2
+end
+begin
+ prog = freevo
+ button = 3
+ config = 3
+end
+begin
+ prog = freevo
+ button = 4
+ config = 4
+end
+begin
+ prog = freevo
+ button = 5
+ config = 5
+end
+begin
+ prog = freevo
+ button = 6
+ config = 6
+end
+begin
+ prog = freevo
+ button = 7
+ config = 7
+end
+begin
+ prog = freevo
+ button = 8
+ config = 8
+end
+begin
+ prog = freevo
+ button = 9
+ config = 9
+end
+begin
+ prog = freevo
+ button = DOWN
+ config = DOWN
+end
+begin
+ prog = freevo
+ button = FORWARD
+ config = FFWD
+end
+begin
+ prog = freevo
+ button = LEFT
+ config = LEFT
+end
+begin
+ prog = freevo
+ button = MENU
+ config = MENU
+end
+begin
+ prog = freevo
+ button = SKIP+
+ config = NEXT
+end
+begin
+ prog = freevo
+ button = DISPLAY
+ config = DISPLAY
+end
+begin
+ prog = freevo
+ button = INFO
+ config = DISPLAY
+end
+begin
+ prog = freevo
+ button = PAUSE
+ config = PAUSE
+end
+begin
+ prog = freevo
+ button = PLAY
+ config = PLAY
+end
+begin
+ prog = freevo
+ button = SKIP-
+ config = PREV
+end
+begin
+ prog = freevo
+ button = BACK
+ config = EXIT
+end
+begin
+ prog = freevo
+ button = REVERSE
+ config = REW
+end
+begin
+ prog = freevo
+ button = RIGHT
+ config = RIGHT
+end
+begin
+ prog = freevo
+ button = SELECT
+ config = SELECT
+end
+begin
+ prog = freevo
+ button = STOP
+ config = STOP
+end
+begin
+ prog = freevo
+ button = TITLE
+ config = TITLE
+end
+begin
+ prog = freevo
+ button = UP
+ config = UP
+end
diff --git a/media-tv/freevo/freevo-1.9.0-r1.ebuild b/media-tv/freevo/freevo-1.9.0-r1.ebuild
new file mode 100644
index 00000000000..d1ebc6f0b9b
--- /dev/null
+++ b/media-tv/freevo/freevo-1.9.0-r1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+DISTUTILS_SINGLE_IMPL=1
+
+inherit eutils distutils-r1
+
+DESCRIPTION="Digital video jukebox (PVR, DVR)"
+HOMEPAGE="http://www.freevo.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="cdparanoia doc dvd encode fbcon flac gphoto2 jpeg lame lirc matrox mixer nls tv vorbis xine X"
+
+RDEPEND="
+ dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ dev-python/pygame[${PYTHON_USEDEP}]
+ >=dev-python/twisted-core-2.5[${PYTHON_USEDEP}]
+ >=dev-python/twisted-web-0.6[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+
+ >=dev-python/kaa-base-0.6.0[${PYTHON_USEDEP}]
+ >=dev-python/kaa-metadata-0.7.3[${PYTHON_USEDEP}]
+ >=dev-python/kaa-imlib2-0.2.3[${PYTHON_USEDEP}]
+ dev-python/kaa-display[${PYTHON_USEDEP}]
+
+ media-video/mplayer[fbcon?]
+ >=media-libs/libsdl-1.2.5[fbcon?]
+ media-libs/sdl-image[jpeg,png]
+ x11-apps/xset
+
+ cdparanoia? ( media-sound/cdparanoia )
+ dvd? (
+ >=media-video/lsdvd-0.10
+ fbcon? ( media-libs/xine-lib[fbcon] )
+ encode? ( media-video/dvdbackup )
+ )
+ flac? ( media-libs/flac )
+ gphoto2? ( media-libs/libgphoto2 )
+ jpeg? ( virtual/jpeg )
+ lame? ( media-sound/lame )
+ lirc? ( app-misc/lirc >=dev-python/pylirc-0.0.3 )
+ matrox? ( >=media-video/matroxset-0.3 )
+ mixer? ( media-sound/aumix )
+ tv? ( media-tv/xmltv )
+ xine? ( media-video/xine-ui )
+ vorbis? ( media-sound/vorbis-tools )"
+
+PATCHES=( "${FILESDIR}"/${P}-{PIL,distutils-r1}.patch )
+
+pkg_setup() {
+ if ! { use X || use fbcon || use matrox ; } ; then
+ echo
+ ewarn "WARNING - no video support specified in USE flags."
+ ewarn "Please be sure that media-libs/libsdl supports whatever video"
+ ewarn "support (X11, fbcon, etc.) you plan on using."
+ echo
+ fi
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ sed -i \
+ -e "s/@EPYTHON@/${EPYTHON}/" \
+ freevo || die
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ insinto /etc/freevo
+ newins local_conf.py.example local_conf.py
+
+ if [[ "${PROFILE_ARCH}" == "xbox" ]]; then
+ sed -i \
+ -e "s/# MPLAYER_AO_DEV.*/MPLAYER_AO_DEV='alsa1x'/" \
+ "${D}"/etc/freevo/local_conf.py || die
+ newins "${FILESDIR}"/xbox-lircrc lircrc
+ fi
+
+ if use X; then
+ echo "#!/bin/bash" > freevo
+ echo "/usr/bin/freevoboot startx" >> freevo
+ exeinto /etc/X11/Sessions/
+ doexe freevo
+
+ #insinto /etc/X11/dm/Sessions
+ #doins "${FILESDIR}/freevo.desktop"
+
+ insinto /usr/share/xsessions
+ doins "${FILESDIR}/freevo.desktop"
+ fi
+
+ newbin "${FILESDIR}"/${PN}-1.8.2.boot freevoboot
+ newconfd "${FILESDIR}/freevo.conf" freevo
+
+ rm -rf "${D}/usr/share/doc" || die
+
+ dodoc ChangeLog FAQ RELEASE_NOTES README TODO \
+ Docs/{CREDITS,NOTES,*.txt,plugins/*.txt}
+ use doc &&
+ cp -r Docs/{installation,html,plugin_writing} "${D}/usr/share/doc/${PF}"
+
+ use nls || rm -rf "${D}"/usr/share/locale
+
+ # Create a default freevo setup
+ cd "${S}/src" || die
+ if [ "${PROFILE_ARCH}" == "xbox" ]; then
+ myconf="${myconf} --geometry=640x480 --display=x11"
+ elif use matrox ; then
+ myconf="${myconf} --geometry=768x576 --display=mga"
+ elif use X ; then
+ myconf="${myconf} --geometry=800x600 --display=x11"
+ else
+ myconf="${myconf} --geometry=800x600 --display=fbdev"
+ fi
+ sed -i \
+ "s:/etc/freevo/freevo.conf:${D}/etc/freevo/freevo.conf:g" \
+ setup_freevo.py || die "Could not fix setup_freevo.py"
+ "${EPYTHON}" setup_freevo.py ${myconf} || die "Could not create new freevo.conf"
+}
+
+pkg_postinst() {
+ echo
+ einfo "Please check /etc/freevo/freevo.conf and"
+ einfo "/etc/freevo/local_conf.py before starting Freevo."
+ einfo "To rebuild freevo.conf with different parameters,"
+ einfo "please run:"
+ einfo " # freevo setup"
+
+ ewarn "To update from existing installations, please run"
+ ewarn " # freevo convert_config /etc/freevo/local_conf.py -w"
+ ewarn "If you are using the recordserver, be sure to"
+ ewarn "read the RELEASE_NOTES in /usr/share/doc/${P}"
+
+ echo
+ einfo "To build a freevo-only system, please use the freevoboot"
+ einfo "wrapper to be run it as a user. It can be configured in /etc/conf.d/freevo"
+
+ if use X ; then
+ echo
+ ewarn "If you're using a Freevo-only system with X, you'll need"
+ ewarn "to setup the autologin (as user) and choose freevo as"
+ ewarn "default session. If you need to run recordserver/webserver"
+ ewarn "at boot, please use /etc/conf.d/freevo"
+ echo
+ ewarn "Should you decide to personalize your freevo.desktop"
+ ewarn "session, keep the definition for '/usr/bin/freevoboot startx'"
+ else
+ echo
+ ewarn "If you want Freevo to start automatically,you'll need"
+ ewarn "to follow instructions at :"
+ ewarn "http://doc.freevo.org/BootFreevo"
+ echo
+ ewarn "*NOTE: you can use mingetty or provide a login"
+ ewarn "program for getty to autologin as a user with limited privileges."
+ ewarn "A tutorial for getty is at:"
+ ewarn "http://ubuntuforums.org/showthread.php?t=152274"
+ fi
+
+ if [ -e "${ROOT}/etc/init.d/freevo" ] ; then
+ echo
+ ewarn "Please remove /etc/init.d/freevo as it is a security"
+ ewarn "threat. To set autostart read above."
+ fi
+
+ if [ -e "${ROOT}/opt/freevo" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/opt/freevo because it is no longer used."
+ fi
+ if [ -e "${ROOT}/etc/freevo/freevo_config.py" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/etc/freevo/freevo_config.py."
+ fi
+ if [ -e "${ROOT}/etc/init.d/freevo-record" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/etc/init.d/freevo-record"
+ fi
+ if [ -e "${ROOT}/etc/init.d/freevo-web" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/etc/init.d/freevo-web"
+ fi
+}
diff --git a/media-tv/freevo/freevo-1.9.0.ebuild b/media-tv/freevo/freevo-1.9.0.ebuild
new file mode 100644
index 00000000000..1a7a780b616
--- /dev/null
+++ b/media-tv/freevo/freevo-1.9.0.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2:2.5"
+PYTHON_USE_WITH="xml"
+
+inherit distutils eutils
+
+DESCRIPTION="Digital video jukebox (PVR, DVR)"
+HOMEPAGE="http://www.freevo.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="cdparanoia doc dvd encode fbcon flac gphoto2 jpeg lame lirc matrox mixer nls tv vorbis xine X"
+
+RDEPEND="dev-python/beautifulsoup:python-2
+ virtual/python-imaging
+ dev-python/pygame
+ >=dev-python/twisted-core-2.5
+ >=dev-python/twisted-web-0.6
+ dev-python/zope-interface
+
+ >=dev-python/kaa-base-0.6.0
+ >=dev-python/kaa-metadata-0.7.3
+ >=dev-python/kaa-imlib2-0.2.3
+ dev-python/kaa-display
+
+ media-video/mplayer[fbcon?]
+ >=media-libs/libsdl-1.2.5[fbcon?]
+ media-libs/sdl-image[jpeg,png]
+ x11-apps/xset
+
+ cdparanoia? ( media-sound/cdparanoia )
+ dvd? (
+ >=media-video/lsdvd-0.10
+ fbcon? ( media-libs/xine-lib[fbcon] )
+ encode? ( media-video/dvdbackup )
+ )
+ flac? ( media-libs/flac )
+ gphoto2? ( media-libs/libgphoto2 )
+ jpeg? ( virtual/jpeg )
+ lame? ( media-sound/lame )
+ lirc? ( app-misc/lirc >=dev-python/pylirc-0.0.3 )
+ matrox? ( >=media-video/matroxset-0.3 )
+ mixer? ( media-sound/aumix )
+ tv? ( media-tv/xmltv )
+ xine? ( media-video/xine-ui )
+ vorbis? ( media-sound/vorbis-tools )"
+
+pkg_setup() {
+ if ! { use X || use fbcon || use matrox ; } ; then
+ echo
+ ewarn "WARNING - no video support specified in USE flags."
+ ewarn "Please be sure that media-libs/libsdl supports whatever video"
+ ewarn "support (X11, fbcon, etc.) you plan on using."
+ echo
+ fi
+
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-PIL.patch
+
+ distutils_src_prepare
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ distutils_src_install
+
+ insinto /etc/freevo
+ newins local_conf.py.example local_conf.py
+
+ if [ "${PROFILE_ARCH}" == "xbox" ]; then
+ sed -i -e "s/# MPLAYER_AO_DEV.*/MPLAYER_AO_DEV='alsa1x'/" "${D}"/etc/freevo/local_conf.py
+ newins "${FILESDIR}"/xbox-lircrc lircrc
+ fi
+
+ if use X; then
+ echo "#!/bin/bash" > freevo
+ echo "/usr/bin/freevoboot startx" >> freevo
+ exeinto /etc/X11/Sessions/
+ doexe freevo
+
+ #insinto /etc/X11/dm/Sessions
+ #doins "${FILESDIR}/freevo.desktop"
+
+ insinto /usr/share/xsessions
+ doins "${FILESDIR}/freevo.desktop"
+ fi
+
+ newbin "${FILESDIR}"/${PN}-1.8.2.boot freevoboot
+ newconfd "${FILESDIR}/freevo.conf" freevo
+
+ rm -rf "${D}/usr/share/doc"
+
+ dodoc ChangeLog FAQ RELEASE_NOTES README TODO \
+ Docs/{CREDITS,NOTES,*.txt,plugins/*.txt}
+ use doc &&
+ cp -r Docs/{installation,html,plugin_writing} "${D}/usr/share/doc/${PF}"
+
+ use nls || rm -rf "${D}"/usr/share/locale
+
+ # Create a default freevo setup
+ cd "${S}/src"
+ if [ "${PROFILE_ARCH}" == "xbox" ]; then
+ myconf="${myconf} --geometry=640x480 --display=x11"
+ elif use matrox ; then
+ myconf="${myconf} --geometry=768x576 --display=mga"
+ elif use X ; then
+ myconf="${myconf} --geometry=800x600 --display=x11"
+ else
+ myconf="${myconf} --geometry=800x600 --display=fbdev"
+ fi
+ sed -i "s:/etc/freevo/freevo.conf:${D}/etc/freevo/freevo.conf:g" setup_freevo.py || die "Could not fix setup_freevo.py"
+ "$(PYTHON)" setup_freevo.py ${myconf} || die "Could not create new freevo.conf"
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ echo
+ einfo "Please check /etc/freevo/freevo.conf and"
+ einfo "/etc/freevo/local_conf.py before starting Freevo."
+ einfo "To rebuild freevo.conf with different parameters,"
+ einfo "please run:"
+ einfo " # freevo setup"
+
+ ewarn "To update from existing installations, please run"
+ ewarn " # freevo convert_config /etc/freevo/local_conf.py -w"
+ ewarn "If you are using the recordserver, be sure to"
+ ewarn "read the RELEASE_NOTES in /usr/share/doc/${P}"
+
+ echo
+ einfo "To build a freevo-only system, please use the freevoboot"
+ einfo "wrapper to be run it as a user. It can be configured in /etc/conf.d/freevo"
+
+ if use X ; then
+ echo
+ ewarn "If you're using a Freevo-only system with X, you'll need"
+ ewarn "to setup the autologin (as user) and choose freevo as"
+ ewarn "default session. If you need to run recordserver/webserver"
+ ewarn "at boot, please use /etc/conf.d/freevo"
+ echo
+ ewarn "Should you decide to personalize your freevo.desktop"
+ ewarn "session, keep the definition for '/usr/bin/freevoboot startx'"
+ else
+ echo
+ ewarn "If you want Freevo to start automatically,you'll need"
+ ewarn "to follow instructions at :"
+ ewarn "http://doc.freevo.org/BootFreevo"
+ echo
+ ewarn "*NOTE: you can use mingetty or provide a login"
+ ewarn "program for getty to autologin as a user with limited privileges."
+ ewarn "A tutorial for getty is at:"
+ ewarn "http://ubuntuforums.org/showthread.php?t=152274"
+ fi
+
+ if [ -e "${ROOT}/etc/init.d/freevo" ] ; then
+ echo
+ ewarn "Please remove /etc/init.d/freevo as it is a security"
+ ewarn "threat. To set autostart read above."
+ fi
+
+ if [ -e "${ROOT}/opt/freevo" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/opt/freevo because it is no longer used."
+ fi
+ if [ -e "${ROOT}/etc/freevo/freevo_config.py" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/etc/freevo/freevo_config.py."
+ fi
+ if [ -e "${ROOT}/etc/init.d/freevo-record" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/etc/init.d/freevo-record"
+ fi
+ if [ -e "${ROOT}/etc/init.d/freevo-web" ] ; then
+ echo
+ ewarn "Please remove ${ROOT}/etc/init.d/freevo-web"
+ fi
+}
diff --git a/media-tv/freevo/metadata.xml b/media-tv/freevo/metadata.xml
new file mode 100644
index 00000000000..33f7fbe95a6
--- /dev/null
+++ b/media-tv/freevo/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <longdescription>Freevo is an open-source home theatre PC platform based
+ on Linux and a number of open-source audio/video tools. MPlayer
+ and/or Xine can be used to play audio and video files in most
+ popular formats. Freevo can be used both for a standalone PVR
+ computer with a TV+remote, as well as on a regular desktop
+ computer using the monitor and keyboard. It is mostly written
+ in the Python programming language.
+ </longdescription>
+ <use>
+ <flag name="mixer">Enable support for adjusting volume via <pkg>media-sound/aumix</pkg></flag>
+ <flag name="tv">Enable support for the tv guide plugin</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freevo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/gentoo-vdr-scripts/Manifest b/media-tv/gentoo-vdr-scripts/Manifest
new file mode 100644
index 00000000000..b057b8ec9fd
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/Manifest
@@ -0,0 +1,5 @@
+DIST gentoo-vdr-scripts-2.0.0.tar.bz2 37438 SHA256 6c2025714546a25632c5b8103b3fa4b7ca6adf963189800c91e99cb23f7b2a79 SHA512 0214b390e1e4fe4f65ceb940a1d092f88fe5263eda3c97ebfa7d2925a772165af3a3c62bfc964e577e374ce723aefccb29082f8219fda918ad17f966ad8ad392 WHIRLPOOL a3de83d95a51622de997d8231b973d6899a2fa21324492e11eb4001ad3c15dee5c6e65f20ee44fd43ebe2974b2b1acf623956d2d44b955bfee799d1a696ace65
+DIST gentoo-vdr-scripts-2.5.tar.bz2 39893 SHA256 39a3c5d1cf30f1b07a6218b2154835994bbf9d65358e916260bad970a6ca6432 SHA512 bed3db4e3c4f8195d5715d274a32485d067fa2e539ace417c2d73bac1294d46736754be589d5e18b77e0baa1b4d9cd7df5ff8a13db2850d92d2eb992f9b131a6 WHIRLPOOL 5a7626484784ad49624df92daab0997368f885d4d5f6ad732082c2a77c840f6e23f345cf35816890d43493c57fa70c90eb9a4ab785a8d4ead81f6779714138b9
+DIST gentoo-vdr-scripts-2.7.2.tar.bz2 48584 SHA256 65de19d3738442a08cdb603ab0e0116e96bbcd8d58b9c9b3f2942e0bcb5365cb SHA512 cb0297c7e78e4c110097d1c08a5f6642d8194d01dd47308f7a41c6d76f7b1675cc612d47a7725eb4f47a393086b034ca09703af0867ae02a36af4be12701f861 WHIRLPOOL 7fe4e106512cca4e26a778320cadf93976897622dac2fd2cf7e21e20e44da27caa69da71f7a779747bc05872e6b90ee7440a7c8fbd2165e6c6a2544804c71da1
+DIST gentoo-vdr-scripts-2.7.3.tar.bz2 49156 SHA256 a8fb04ca737080dd4fa4d300243d833f835885c0b4c9ca3f1808997713a626ec SHA512 9d00acaf77bbbf52f4a4d4b8284d94b9d191c354de52ea6f7bba0751be661feec4915cca20be3d24a0471efe4b3f24c5dcc025e3e8b0cc6b2c37f8843b91a520 WHIRLPOOL bd30b36284754d4e5c135c381e4114354b1292f4203d0367622c650252d8ecbcaabe58bc40b4d0ad26b54553f5ee0ff5e2e32e13abdd088bd26b0b41a97ee10c
+DIST gentoo-vdr-scripts-2.7.tar.bz2 46618 SHA256 40f6e50e684b4dde9c026887119e80c9680212bfe41854c6526cc1346c0ae2a2 SHA512 95db4d2632d07cc86394fbc2898050d47175f01cc60b61230ba5363c770ba6ad5c5935987ac6a1131bc575887633ed6c8f6242f7de225fc875d0871123665bc5 WHIRLPOOL 889e2379fa9df6ae9992f6569779d4f485488e84c9c1065c43717ae07d15c601ce9a731e612e6bfaaf7df55d5eb4c7901f16bbf0eff680bc5b4ea25662885790
diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.0.0.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.0.0.ebuild
new file mode 100644
index 00000000000..fa8adcd6241
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.0.0.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils user
+
+DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="nvram"
+
+RDEPEND="nvram? ( sys-power/nvram-wakeup )
+ app-admin/sudo
+ sys-process/wait_on_pid"
+
+VDR_HOME=/var/vdr
+
+pkg_setup() {
+ enewgroup vdr
+
+ # Add user vdr to these groups:
+ # video - accessing dvb-devices
+ # audio - playing sound when using software-devices
+ # cdrom - playing dvds/audio-cds ...
+ enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
+}
+
+src_prepare() {
+ # moved into own package
+ sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
+ sed -e '/all:/s#compile##' -i Makefile
+}
+
+src_install() {
+ emake -s install DESTDIR="${D}" || die "make install failed"
+ dodoc README TODO ChangeLog README.grub2
+
+ # create necessary directories
+ diropts -ovdr -gvdr
+ keepdir "${VDR_HOME}"
+
+ local kd
+ for kd in shutdown-data merged-config-files dvd-images tmp; do
+ keepdir "${VDR_HOME}/${kd}"
+ done
+}
+
+pkg_preinst() {
+ local PLUGINS_NEW=0
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
+ PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
+ fi
+ if [[ ${PLUGINS_NEW} > 0 ]]; then
+ cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
+ else
+ einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
+ local PLUGIN
+ for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
+ echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
+ done
+ fi
+
+ has_version "<${CATEGORY}/${PN}-0.5.4"
+ previous_less_than_0_5_4=$?
+}
+
+VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_5_4 = 0 ]] ; then
+ einfo "\nVDR use now default the --cachedir parameter to store the epg.file"
+ einfo "Please do not override this with the EPGFILE variable\n"
+
+ einfo "svdrp port 2001 support removed\n"
+
+ einfo "--rcu support removed, use media-plugin/vdr-rcu\n"
+ fi
+
+ elog "nvram wakeup is optional."
+ elog "To make use of it emerge sys-power/nvram-wakeup."
+ elog
+
+ elog "Plugins which should be used are now set via its"
+ elog "own config-file called /etc/conf.d/vdr.plugins"
+ elog "or enabled via the frontend eselect vdr-plugin."
+ elog
+
+ if [[ -f "${ROOT}/etc/init.d/dvbsplash" ]]; then
+ ewarn
+ ewarn "You have dvbsplash installed!"
+ ewarn "/etc/init.d/dvbsplash will now be deleted"
+ ewarn "as it causes difficult to debug problems."
+ ewarn
+ rm "${ROOT}/etc/init.d/dvbsplash"
+ fi
+
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
+ grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
+ then
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
+ ewarn "This no longer has any effect, please use"
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
+ fi
+}
+
+pkg_config() {
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
+
+ einfo "Removing depricated entry from /etc/sudoers:"
+ einfo "- ${VDRSUDOENTRY}"
+
+ cd "${T}"
+ cat >sudoedit-vdr.sh <<-SUDOEDITOR
+ #!/bin/bash
+ sed -i \${1} -e '/\/usr\/share\/vdr\/bin\/vdrshutdown-really.sh *$/d'
+
+ SUDOEDITOR
+ chmod a+x sudoedit-vdr.sh
+
+ VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
+
+ einfo "Edited /etc/sudoers"
+ fi
+}
diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.5.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.5.ebuild
new file mode 100644
index 00000000000..aeee417052b
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.5.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="nvram"
+
+RDEPEND="nvram? ( sys-power/nvram-wakeup )
+ app-admin/sudo
+ sys-process/wait_on_pid"
+
+VDR_HOME=/var/vdr
+
+pkg_setup() {
+ enewgroup vdr
+
+ # Add user vdr to these groups:
+ # video - accessing dvb-devices
+ # audio - playing sound when using software-devices
+ # cdrom - playing dvds/audio-cds ...
+ enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
+}
+
+src_prepare() {
+ # moved into own package
+ sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
+ sed -e '/all:/s#compile##' -i Makefile
+}
+
+src_install() {
+ emake -s install DESTDIR="${D}" || die "make install failed"
+ dodoc README TODO ChangeLog README.grub2 README.shutdown README.shutdown-jobs README.systemd README.vdrcaps
+
+ # create necessary directories
+ diropts -ovdr -gvdr
+ keepdir "${VDR_HOME}"
+
+ local kd
+ for kd in shutdown-data merged-config-files dvd-images tmp; do
+ keepdir "${VDR_HOME}/${kd}"
+ done
+}
+
+pkg_preinst() {
+ local PLUGINS_NEW=0
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
+ PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
+ fi
+ if [[ ${PLUGINS_NEW} > 0 ]]; then
+ cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
+ else
+ einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
+ local PLUGIN
+ for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
+ echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
+ done
+ fi
+
+ has_version "<${CATEGORY}/${PN}-0.5.4"
+ previous_less_than_0_5_4=$?
+}
+
+VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_5_4 = 0 ]] ; then
+ einfo "\nVDR use now default the --cachedir parameter to store the epg.file"
+ einfo "Please do not override this with the EPGFILE variable\n"
+
+ einfo "svdrp port 2001 support removed\n"
+
+ einfo "--rcu support removed, use media-plugin/vdr-rcu\n"
+ fi
+
+ elog "nvram wakeup is optional."
+ elog "To make use of it emerge sys-power/nvram-wakeup."
+ elog
+
+ elog "Plugins which should be used are now set via its"
+ elog "own config-file called /etc/conf.d/vdr.plugins"
+ elog "or enabled via the frontend eselect vdr-plugin."
+ elog
+
+ if [[ -f "${ROOT}/etc/init.d/dvbsplash" ]]; then
+ ewarn
+ ewarn "You have dvbsplash installed!"
+ ewarn "/etc/init.d/dvbsplash will now be deleted"
+ ewarn "as it causes difficult to debug problems."
+ ewarn
+ rm "${ROOT}/etc/init.d/dvbsplash"
+ fi
+
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
+ grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
+ then
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
+ ewarn "This no longer has any effect, please use"
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
+ fi
+
+ einfo "systemd is now supported by gentoo-vdr-scripts"
+ einfo "Please read for detailed info on this vdr's README.systemd"
+}
+
+pkg_config() {
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
+
+ einfo "Removing depricated entry from /etc/sudoers:"
+ einfo "- ${VDRSUDOENTRY}"
+
+ cd "${T}"
+ cat >sudoedit-vdr.sh <<-SUDOEDITOR
+ #!/bin/bash
+ sed -i \${1} -e '/\/usr\/share\/vdr\/bin\/vdrshutdown-really.sh *$/d'
+
+ SUDOEDITOR
+ chmod a+x sudoedit-vdr.sh
+
+ VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
+
+ einfo "Edited /etc/sudoers"
+ fi
+}
diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.2.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.2.ebuild
new file mode 100644
index 00000000000..ffda950af11
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.2.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="nvram"
+
+RDEPEND="nvram? ( sys-power/nvram-wakeup )
+ app-admin/sudo
+ sys-process/wait_on_pid"
+
+VDR_HOME=/var/vdr
+
+pkg_setup() {
+ enewgroup vdr
+
+ # Add user vdr to these groups:
+ # video - accessing dvb-devices
+ # audio - playing sound when using software-devices
+ # cdrom - playing dvds/audio-cds ...
+ enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
+}
+
+src_prepare() {
+ # moved into own package
+ sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
+ sed -e '/all:/s#compile##' -i Makefile
+}
+
+src_install() {
+ default
+ dodoc README* TODO ChangeLog
+
+ # create necessary directories
+ diropts -ovdr -gvdr
+ keepdir "${VDR_HOME}"
+
+ local kd
+ for kd in shutdown-data merged-config-files dvd-images; do
+ keepdir "${VDR_HOME}/${kd}"
+ done
+}
+
+pkg_preinst() {
+ local PLUGINS_NEW=0
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
+ PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
+ fi
+ if [[ ${PLUGINS_NEW} > 0 ]]; then
+ cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
+ else
+ einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
+ local PLUGIN
+ for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
+ echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
+ done
+ fi
+
+ has_version "<${CATEGORY}/${PN}-0.5.4"
+ previous_less_than_0_5_4=$?
+
+ has_version "<${CATEGORY}/${PN}-2.6"
+ previous_less_than_2_6=$?
+}
+
+VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_5_4 = 0 ]] ; then
+ elog "\nVDR use now default the --cachedir parameter to store the epg.file"
+ elog "Please do not override this with the EPGFILE variable\n"
+
+ elog "svdrp port 2001 support removed\n"
+
+ elog "--rcu support removed, use media-plugin/vdr-rcu\n"
+ fi
+
+ if [[ $previous_less_than_2_6 = 0 ]]; then
+ elog "${CATEGORY}/${PN} supports now a init script"
+ elog "to start a X server"
+ elog "Please refer for detailed info to"
+ elog "${CATGORY}/${PN} README.x11-setup\n"
+ fi
+
+ if use nvram; then
+ elog "nvram wakeup is optional."
+ elog "To make use of it emerge sys-power/nvram-wakeup.\n"
+ fi
+
+ elog "Plugins which should be used are now set via its"
+ elog "own config-file called /etc/conf.d/vdr.plugins"
+ elog "or enabled via the frontend eselect vdr-plugin.\n"
+
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
+ grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
+ then
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
+ ewarn "This no longer has any effect, please use"
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
+ fi
+
+ elog "systemd is supported by ${CATEGORY}/${PN}"
+ elog "Please read for detailed info on this"
+ elog "${CATEGORY}/${PN} README.systemd"
+}
+
+pkg_config() {
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
+
+ einfo "Removing depricated entry from /etc/sudoers:"
+ einfo "- ${VDRSUDOENTRY}"
+
+ cd "${T}"
+ cat >sudoedit-vdr.sh <<-SUDOEDITOR
+ #!/bin/bash
+ sed -i \${1} -e '/\/usr\/share\/vdr\/bin\/vdrshutdown-really.sh *$/d'
+
+ SUDOEDITOR
+ chmod a+x sudoedit-vdr.sh
+
+ VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
+
+ einfo "Edited /etc/sudoers"
+ fi
+}
diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.3.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.3.ebuild
new file mode 100644
index 00000000000..fbc19e2196a
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="nvram"
+
+RDEPEND="nvram? ( sys-power/nvram-wakeup )
+ app-admin/sudo
+ sys-process/wait_on_pid"
+
+VDR_HOME=/var/vdr
+
+pkg_setup() {
+ enewgroup vdr
+
+ # Add user vdr to these groups:
+ # video - accessing dvb-devices
+ # audio - playing sound when using software-devices
+ # cdrom - playing dvds/audio-cds ...
+ enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
+}
+
+src_prepare() {
+ # moved into own package
+ sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
+ sed -e '/all:/s#compile##' -i Makefile
+}
+
+src_install() {
+ default
+ dodoc README* TODO ChangeLog
+
+ # create necessary directories
+ diropts -ovdr -gvdr
+ keepdir "${VDR_HOME}"
+
+ local kd
+ for kd in shutdown-data merged-config-files dvd-images; do
+ keepdir "${VDR_HOME}/${kd}"
+ done
+}
+
+pkg_preinst() {
+ local PLUGINS_NEW=0
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
+ PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
+ fi
+ if [[ ${PLUGINS_NEW} > 0 ]]; then
+ cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
+ else
+ einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
+ local PLUGIN
+ for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
+ echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
+ done
+ fi
+
+ has_version "<${CATEGORY}/${PN}-0.5.4"
+ previous_less_than_0_5_4=$?
+
+ has_version "<${CATEGORY}/${PN}-2.6"
+ previous_less_than_2_6=$?
+}
+
+VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_5_4 = 0 ]] ; then
+ elog "\nVDR use now default the --cachedir parameter to store the epg.file"
+ elog "Please do not override this with the EPGFILE variable\n"
+
+ elog "svdrp port 2001 support removed\n"
+
+ elog "--rcu support removed, use media-plugin/vdr-rcu\n"
+ fi
+
+ if [[ $previous_less_than_2_6 = 0 ]]; then
+ elog "${CATEGORY}/${PN} supports now a init script"
+ elog "to start a X server"
+ elog "Please refer for detailed info to"
+ elog "${CATGORY}/${PN} README.x11-setup\n"
+ fi
+
+ if use nvram; then
+ elog "nvram wakeup is optional."
+ elog "To make use of it emerge sys-power/nvram-wakeup.\n"
+ fi
+
+ elog "Plugins which should be used are now set via its"
+ elog "own config-file called /etc/conf.d/vdr.plugins"
+ elog "or enabled via the frontend eselect vdr-plugin.\n"
+
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
+ grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
+ then
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
+ ewarn "This no longer has any effect, please use"
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
+ fi
+
+ elog "systemd is supported by ${CATEGORY}/${PN}"
+ elog "Please read for detailed info on this"
+ elog "${CATEGORY}/${PN} README.systemd"
+}
+
+pkg_config() {
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
+
+ einfo "Removing depricated entry from /etc/sudoers:"
+ einfo "- ${VDRSUDOENTRY}"
+
+ cd "${T}"
+ cat >sudoedit-vdr.sh <<-SUDOEDITOR
+ #!/bin/bash
+ sed -i \${1} -e '/\/usr\/share\/vdr\/bin\/vdrshutdown-really.sh *$/d'
+
+ SUDOEDITOR
+ chmod a+x sudoedit-vdr.sh
+
+ VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
+
+ einfo "Edited /etc/sudoers"
+ fi
+}
diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.ebuild
new file mode 100644
index 00000000000..fbc19e2196a
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="nvram"
+
+RDEPEND="nvram? ( sys-power/nvram-wakeup )
+ app-admin/sudo
+ sys-process/wait_on_pid"
+
+VDR_HOME=/var/vdr
+
+pkg_setup() {
+ enewgroup vdr
+
+ # Add user vdr to these groups:
+ # video - accessing dvb-devices
+ # audio - playing sound when using software-devices
+ # cdrom - playing dvds/audio-cds ...
+ enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
+}
+
+src_prepare() {
+ # moved into own package
+ sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
+ sed -e '/all:/s#compile##' -i Makefile
+}
+
+src_install() {
+ default
+ dodoc README* TODO ChangeLog
+
+ # create necessary directories
+ diropts -ovdr -gvdr
+ keepdir "${VDR_HOME}"
+
+ local kd
+ for kd in shutdown-data merged-config-files dvd-images; do
+ keepdir "${VDR_HOME}/${kd}"
+ done
+}
+
+pkg_preinst() {
+ local PLUGINS_NEW=0
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
+ PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
+ fi
+ if [[ ${PLUGINS_NEW} > 0 ]]; then
+ cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
+ else
+ einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
+ local PLUGIN
+ for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
+ echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
+ done
+ fi
+
+ has_version "<${CATEGORY}/${PN}-0.5.4"
+ previous_less_than_0_5_4=$?
+
+ has_version "<${CATEGORY}/${PN}-2.6"
+ previous_less_than_2_6=$?
+}
+
+VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_5_4 = 0 ]] ; then
+ elog "\nVDR use now default the --cachedir parameter to store the epg.file"
+ elog "Please do not override this with the EPGFILE variable\n"
+
+ elog "svdrp port 2001 support removed\n"
+
+ elog "--rcu support removed, use media-plugin/vdr-rcu\n"
+ fi
+
+ if [[ $previous_less_than_2_6 = 0 ]]; then
+ elog "${CATEGORY}/${PN} supports now a init script"
+ elog "to start a X server"
+ elog "Please refer for detailed info to"
+ elog "${CATGORY}/${PN} README.x11-setup\n"
+ fi
+
+ if use nvram; then
+ elog "nvram wakeup is optional."
+ elog "To make use of it emerge sys-power/nvram-wakeup.\n"
+ fi
+
+ elog "Plugins which should be used are now set via its"
+ elog "own config-file called /etc/conf.d/vdr.plugins"
+ elog "or enabled via the frontend eselect vdr-plugin.\n"
+
+ if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
+ grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
+ then
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
+ ewarn "This no longer has any effect, please use"
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
+ fi
+
+ elog "systemd is supported by ${CATEGORY}/${PN}"
+ elog "Please read for detailed info on this"
+ elog "${CATEGORY}/${PN} README.systemd"
+}
+
+pkg_config() {
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
+
+ einfo "Removing depricated entry from /etc/sudoers:"
+ einfo "- ${VDRSUDOENTRY}"
+
+ cd "${T}"
+ cat >sudoedit-vdr.sh <<-SUDOEDITOR
+ #!/bin/bash
+ sed -i \${1} -e '/\/usr\/share\/vdr\/bin\/vdrshutdown-really.sh *$/d'
+
+ SUDOEDITOR
+ chmod a+x sudoedit-vdr.sh
+
+ VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
+
+ einfo "Edited /etc/sudoers"
+ fi
+}
diff --git a/media-tv/gentoo-vdr-scripts/metadata.xml b/media-tv/gentoo-vdr-scripts/metadata.xml
new file mode 100644
index 00000000000..ecc47f16b87
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+ </maintainer>
+ <use>
+ <flag name="nvram">Add support for using nvram-wakeup to set wakeup time in bios</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-tv/gtk-v4l/Manifest b/media-tv/gtk-v4l/Manifest
new file mode 100644
index 00000000000..02cf6c784d3
--- /dev/null
+++ b/media-tv/gtk-v4l/Manifest
@@ -0,0 +1 @@
+DIST gtk-v4l-0.4.tar.gz 328732 SHA256 a87fe9e3afc141dd98be7bf8875faa679a914f438611fb01a7b25b75c2d75b6c SHA512 ed0e1245d9b1cfce6612c91dacd09f26850a9420088d7de172c4bd582b70f4427820940e6cf98a831493edfe52d20fb02d6b2d62b695a24127097f50963df321 WHIRLPOOL f53ca9b344a2692c6e11c6a439d0e836d84e721f27a852809d5824ac3d310fc5dfbad44cb3295de3fd6707fa5674cda7bf2fc88c968b5b1e4f5b31ec6bc08b3a
diff --git a/media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch b/media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch
new file mode 100644
index 00000000000..301c6b15281
--- /dev/null
+++ b/media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch
@@ -0,0 +1,53 @@
+From e7730e2eb0e148e94f6bba13a70ddf61ae94b313 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 9 May 2012 13:00:07 +0200
+Subject: [PATCH] gtk-v4l-device: remove source on finalize
+
+This fixes us from getting events from it, with a user_data argument
+pointing to the finalized object, when the fd gets re-used if another device
+gets plugged in later, and that device then generates ctrl events.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ lib/gtk-v4l-device.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/lib/gtk-v4l-device.c b/lib/gtk-v4l-device.c
+index c4ce1e5..67e8ccc 100644
+--- a/lib/gtk-v4l-device.c
++++ b/lib/gtk-v4l-device.c
+@@ -43,6 +43,7 @@ enum
+ struct _Gtkv4lDevicePrivate {
+ GList *controls;
+ GIOChannel *channel;
++ guint channel_source_id;
+ };
+
+ /* will create gtk_v4l_device_get_type and set gtk_v4l_device_parent_class */
+@@ -166,8 +167,10 @@ gtk_v4l_device_finalize (GObject *object)
+ g_list_foreach (self->priv->controls, gtk_v4l_device_free_control, NULL);
+ g_list_free (self->priv->controls);
+
+- if (self->priv->channel)
++ if (self->priv->channel) {
++ g_source_remove (self->priv->channel_source_id);
+ g_io_channel_unref (self->priv->channel);
++ }
+
+ if (self->fd != -1)
+ close (self->fd);
+@@ -303,8 +306,9 @@ gtk_v4l_device_new_control (Gtkv4lDevice *self, struct v4l2_queryctrl *query)
+ r = v4l2_ioctl(self->fd, VIDIOC_SUBSCRIBE_EVENT, &sub);
+ if (r >= 0 && !self->priv->channel) {
+ self->priv->channel = g_io_channel_unix_new (self->fd);
+- g_io_add_watch (self->priv->channel, G_IO_PRI, gtk_v4l_device_ctrl_event,
+- self);
++ self->priv->channel_source_id =
++ g_io_add_watch (self->priv->channel, G_IO_PRI, gtk_v4l_device_ctrl_event,
++ self);
+ }
+ }
+
+--
+1.7.10
+
diff --git a/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild b/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild
new file mode 100644
index 00000000000..01a18067800
--- /dev/null
+++ b/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="A control application for Video 4 Linux (based on C and GTK+)"
+HOMEPAGE="http://fedorahosted.org/gtk-v4l/"
+SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2
+ >=media-libs/libv4l-0.6
+ virtual/libgudev:=
+ x11-libs/gtk+:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-device-remove-source-on-finalize.patch
+ sed -i -e '/^Categories/s:Application:GTK:' ${PN}.desktop.in || die
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-tv/gtk-v4l/metadata.xml b/media-tv/gtk-v4l/metadata.xml
new file mode 100644
index 00000000000..91724ddf615
--- /dev/null
+++ b/media-tv/gtk-v4l/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-tv/ivtv-utils/Manifest b/media-tv/ivtv-utils/Manifest
new file mode 100644
index 00000000000..b5c4b1e7976
--- /dev/null
+++ b/media-tv/ivtv-utils/Manifest
@@ -0,0 +1 @@
+DIST ivtv-utils-1.4.1.tar.gz 189918 SHA256 8eebe8bda62f348779c24522f78fb3c0231e33d303b6381185eeb795fe761ef6
diff --git a/media-tv/ivtv-utils/files/ivtv-utils-1.4.0-gentoo.patch b/media-tv/ivtv-utils/files/ivtv-utils-1.4.0-gentoo.patch
new file mode 100644
index 00000000000..4b75d177e39
--- /dev/null
+++ b/media-tv/ivtv-utils/files/ivtv-utils-1.4.0-gentoo.patch
@@ -0,0 +1,99 @@
+Fixing multiple QA issues
+ * respect user {CC,CXX,LD}FLAGS
+ * fix linking order
+ * make job server for install phase
+
+Don't install ivtv-ctl (bug #333291) and v4l2-ctl (bug #278255)
+Don't install duplicate kernel headers (bug #244584)
+
+https://bugs.gentoo.org/show_bug.cgi?id=321303
+
+Patch written by Kacper Kowalik <xarthisius.kk@gmail.com>
+
+--- test/Makefile
++++ test/Makefile
+@@ -7,13 +7,13 @@
+ ivtv-osd-dma-test ivtv-fb-colormap-test \
+ ivtv-fb-16-bit-test ps-analyzer
+
+-CFLAGS = -I../utils -D_GNU_SOURCE -O2 -Wall
+-CXXFLAGS = $(CFLAGS)
+-LDFLAGS = -lm
++CFLAGS += -I../utils -D_GNU_SOURCE -Wall
++CXXFLAGS += -I../utils -D_GNU_SOURCE -Wall
++LDLIBS = -lm
+
+ all: $(EXES)
+
+-install: all
++install:
+
+ clean:
+ rm -f *.o $(EXES)
+--- utils/Makefile.orig 2010-05-24 15:35:11.321677941 +0000
++++ utils/Makefile 2010-05-24 15:35:15.595615306 +0000
+@@ -9,41 +9,39 @@
+ X86_EXES := ivtvplay ivtv-mpegindex #ivtv-encoder
+ endif
+
+-EXES := v4l2-ctl ivtv-ctl ivtv-radio $(X86_EXES)
++EXES := ivtv-radio $(X86_EXES)
+
+ BIN := $(EXES) ivtv-tune/ivtv-tune cx25840ctl/cx25840ctl
+
+
+ HEADERS := linux/ivtv.h linux/ivtvfb.h
+
+-CFLAGS = -D_GNU_SOURCE -O2 -Wall -g -I.
+-CXXFLAGS = $(CFLAGS)
++CFLAGS += -D_GNU_SOURCE -Wall -I.
++CXXFLAGS += -D_GNU_SOURCE -Wall -I.
+
+-all:: $(EXES)
+- $(MAKE) CFLAGS="$(CFLAGS)" -C ivtv-tune
+- $(MAKE) CFLAGS="$(CFLAGS)" -C cx25840ctl
++all: $(EXES)
++ $(MAKE) $(MAKEOPTS) CFLAGS="$(CFLAGS)" -C ivtv-tune
++ $(MAKE) $(MAKEOPTS) CFLAGS="$(CFLAGS)" -C cx25840ctl
+
+ ivtv-ctl: ivtv-ctl.o
+- $(CC) -lm -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lm
+
+ v4l2-ctl: v4l2-ctl.o
+- $(CXX) -lm -o $@ $^
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lm
+
+ v4l2-dbg: v4l2-dbg.o v4l2-driverids.o v4l2-chipids.o
+- $(CXX) -lm -o $@ $^
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lm
+
+ ivtvplay: ivtvplay.cc
+- $(CXX) $(CXXFLAGS) -lm -lpthread -o $@ $^
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lm -lpthread
+
+ encoder.o: encoder.c
+ $(CC) $(CFLAGS) -DVIDEO_PORT=0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c $^
+
+ ivtv-encoder: enc_mindex.o enc_chann.o encoder.o
+- $(CC) -lpthread -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lpthread
+
+-install: all
+- install -d $(DESTDIR)/$(HDRDIR)
+- install -m 0644 $(HEADERS) $(DESTDIR)/$(HDRDIR)
++install:
+ install -d $(DESTDIR)/$(BINDIR)
+ install -m 0755 $(BIN) $(DESTDIR)/$(BINDIR)
+
+--- Makefile
++++ Makefile
+@@ -1,6 +1,6 @@
+ all clean install:
+- make -C utils $@
+- make -C test $@
++ $(MAKE) -C utils $@
++ $(MAKE) -C test $@
+
+ distclean: clean
+
diff --git a/media-tv/ivtv-utils/files/ivtv-utils-1.4.1-overflow.patch b/media-tv/ivtv-utils/files/ivtv-utils-1.4.1-overflow.patch
new file mode 100644
index 00000000000..1c2a6615963
--- /dev/null
+++ b/media-tv/ivtv-utils/files/ivtv-utils-1.4.1-overflow.patch
@@ -0,0 +1,71 @@
+http://bugs.gentoo.org/339405
+
+--- utils/cx25840ctl/cx25840ctl.c
++++ utils/cx25840ctl/cx25840ctl.c
+@@ -57,7 +57,7 @@
+ return 0;
+ }
+
+- sprintf(device, "/dev/i2c-%s", opt.inputs[0]);
++ snprintf(device, sizeof(device), "/dev/i2c-%s", opt.inputs[0]);
+
+ // open the device
+ if ((fd = open(device, O_RDWR)) < 0)
+@@ -67,7 +67,7 @@
+ exit(1);
+ }
+
+- sprintf(sysfile, "/sys/bus/i2c/devices/%s-%04x/name", opt.inputs[0], address);
++ snprintf(sysfile, sizeof(sysfile), "/sys/bus/i2c/devices/%s-%04x/name", opt.inputs[0], address);
+ if ((fp = fopen(sysfile, "r")) != NULL)
+ {
+ fgets(name, sizeof(name), fp);
+--- utils/ivtv-ctl.c
++++ utils/ivtv-ctl.c
+@@ -358,7 +358,7 @@
+ __u32 reset = 0;
+ int new_debug_level, gdebug_level;
+ double timestamp;
+- char ptsstr[64];
++ char ptsstr[256];
+ char short_options[26 * 2 * 2 + 1];
+
+ if (argc == 1) {
+@@ -420,7 +420,7 @@
+ static char newdev[20];
+ char dev = device[0];
+
+- sprintf(newdev, "/dev/video%c", dev);
++ snprintf(newdev, sizeof(newdev), "/dev/video%c", dev);
+ device = newdev;
+ }
+ break;
+@@ -600,7 +600,7 @@
+ char buf[20];
+ new_debug_level = debug_level;
+
+- sprintf(buf, "%d", debug_level);
++ snprintf(buf, sizeof(buf), "%d", debug_level);
+ if (dowrite(buf, "/sys/module/ivtv/parameters/debug") == 0) {
+ printf(" set debug level: ");
+ print_debug_mask(new_debug_level);
+--- utils/v4l2-ctl.cpp
++++ utils/v4l2-ctl.cpp
+@@ -416,7 +416,7 @@
+ {
+ char buf[10];
+
+- sprintf(buf, "%08x", num);
++ snprintf(buf, sizeof(buf), "%08x", num);
+ return buf;
+ }
+
+@@ -1449,7 +1449,7 @@
+ static char newdev[20];
+ char dev = device[0];
+
+- sprintf(newdev, "/dev/video%c", dev);
++ snprintf(newdev, sizeof(newdev), "/dev/video%c", dev);
+ device = newdev;
+ }
+ break;
diff --git a/media-tv/ivtv-utils/ivtv-utils-1.4.1.ebuild b/media-tv/ivtv-utils/ivtv-utils-1.4.1.ebuild
new file mode 100644
index 00000000000..26a18c1aabf
--- /dev/null
+++ b/media-tv/ivtv-utils/ivtv-utils-1.4.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="IVTV utilities for Hauppauge PVR PCI cards"
+HOMEPAGE="http://www.ivtvdriver.org/"
+SRC_URI="http://dl.ivtvdriver.org/ivtv/archive/1.4.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="perl"
+
+DEPEND="!media-tv/ivtv"
+RDEPEND="${DEPEND}
+ media-tv/v4l-utils
+ perl? (
+ dev-perl/Video-Frequencies
+ dev-perl/Video-ivtv
+ dev-perl/Config-IniFiles
+ virtual/perl-Getopt-Long
+ dev-perl/perl-tk
+ )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.4.0-gentoo.patch \
+ "${FILESDIR}"/${PN}-1.4.1-overflow.patch
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+ dodoc ChangeLog README doc/*
+
+ if use perl; then
+ dobin utils/perl/*.pl
+ dodoc utils/perl/README.ptune
+ fi
+}
diff --git a/media-tv/ivtv-utils/metadata.xml b/media-tv/ivtv-utils/metadata.xml
new file mode 100644
index 00000000000..1d7f067588e
--- /dev/null
+++ b/media-tv/ivtv-utils/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>cardoe@gentoo.org</email>
+ <name>Doug Goldstein</name>
+ </maintainer>
+ <longdescription>
+ Driver for ivtv based tv tuner cards, currently supports Hauppauge
+ PVR-[23]50 cards
+ </longdescription>
+</pkgmetadata>
diff --git a/media-tv/ivtvplayer/Manifest b/media-tv/ivtvplayer/Manifest
new file mode 100644
index 00000000000..2fe51f34f44
--- /dev/null
+++ b/media-tv/ivtvplayer/Manifest
@@ -0,0 +1 @@
+DIST ivtvplayer-0.1.3.tar.gz 24159 SHA256 4727057b97a5e527e9617cd14e6ee9d892532fbb5e455d70166af07c1724aa17
diff --git a/media-tv/ivtvplayer/ivtvplayer-0.1.3-r1.ebuild b/media-tv/ivtvplayer/ivtvplayer-0.1.3-r1.ebuild
new file mode 100644
index 00000000000..a22797cc378
--- /dev/null
+++ b/media-tv/ivtvplayer/ivtvplayer-0.1.3-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="Simple IVTV command line TV and radio player with support of LIRC"
+HOMEPAGE="http://sourceforge.net/projects/ivtvplayer/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk xosd"
+RDEPEND="|| ( media-tv/ivtv media-tv/v4l-utils )
+ || ( media-video/mplayer[v4l]
+ media-video/mplayer[dvb] )
+ media-sound/alsa-utils
+ dev-perl/XML-Simple
+ gtk? ( dev-perl/gtk2-perl )
+ xosd? ( dev-perl/X-Osd )
+ >=dev-perl/Lirc-Client-1.50"
+DEPEND=""
+
+src_install() {
+ dobin bin/itv
+ dobin bin/iradio
+ if use gtk ; then
+ dobin bin/ictl
+ fi
+ dodoc doc/README doc/CHANGES
+ dodoc conf/*
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "Example of itv, iradio and its LIRC configuration file is located in"
+ einfo "directory /usr/share/doc/${PF}/."
+ einfo ""
+}
diff --git a/media-tv/ivtvplayer/metadata.xml b/media-tv/ivtvplayer/metadata.xml
new file mode 100644
index 00000000000..eba6f282962
--- /dev/null
+++ b/media-tv/ivtvplayer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <upstream>
+ <remote-id type="sourceforge">ivtvplayer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/kodi/Manifest b/media-tv/kodi/Manifest
new file mode 100644
index 00000000000..4ef5ffdc0a5
--- /dev/null
+++ b/media-tv/kodi/Manifest
@@ -0,0 +1,2 @@
+DIST kodi-14.1-generated-addons.tar.xz 71072 SHA256 0666eae88a3214f7577544975524b95a9f55b107cde5124d5d299351427c5d39 SHA512 a26889ba8af33316ac61bbf5a55ec6cd72cb867eac9b6d7c626ff890f3287de8704cf8372a5e2b72d6075ab8c31ba3d8465d1da0c9437065fe6e0171a560142f WHIRLPOOL 34a7067964febd71d5e07333a1ef90c14ad3d7d09e82aa4a3245b8174b068a1b2b31d0d6e5d20a449d11d34701b59611b725c8f37ce61702489c84bda16f227a
+DIST kodi-14.1.tar.gz 70832109 SHA256 a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6 SHA512 05dccad279073fc804faf2f179ba370f612d53c823dd333fdd151e05de37eb8202cc981ba48afff695d475bafde9c8f05f562fe09883593a70299a2f098a9849 WHIRLPOOL 464ff2673c9e65466dff73d3c91b8754ee68d64b4a18ebb0b0c6e8efa2da1cc32ab22686530a8469a105bf7a089d8928db64c5c61d272462c13485006875b506
diff --git a/media-tv/kodi/files/generate.sh b/media-tv/kodi/files/generate.sh
new file mode 100755
index 00000000000..2e5b67fb90e
--- /dev/null
+++ b/media-tv/kodi/files/generate.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+# Generate the various interface files that normally requires java.
+# This makes building the release versions much nicer.
+
+set -eux
+
+PV=$1
+PN=kodi
+P="${PN}-${PV}"
+DISTDIR="/usr/portage/distfiles"
+GITDIR="/usr/local/src/kodi/git"
+
+if [[ ${PV} != "9999" ]] ; then
+ rm -rf xbmc-*/
+ tar xf ${DISTDIR}/${P}.tar.gz
+ d=$(echo xbmc-*/)
+else
+ stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d)
+ P+="-${stamp}"
+ cd ${GITDIR}
+ d=.
+fi
+#cd ${d} && git init . && git add . && git commit -qmm && cd ..
+make -C ${d} -j -f codegenerator.mk
+tar="${DISTDIR}/${P}-generated-addons.tar.xz"
+tar cf - \
+ ${d}/xbmc/interfaces/python/generated/*.cpp \
+ ${d}/xbmc/interfaces/json-rpc/ServiceDescription.h \
+ | xz > "${tar}"
+if [[ ${PV} != "9999" ]] ; then
+ rm -rf xbmc-*/
+fi
+
+du -b "${tar}"
diff --git a/media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch b/media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch
new file mode 100644
index 00000000000..94b86666f9e
--- /dev/null
+++ b/media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch
@@ -0,0 +1,16 @@
+sniped from:
+http://cvs.rpmfusion.org/viewvc/rpms/kodi/devel/kodi-14.0-dvddemux-ffmpeg.patch?root=free&view=markup
+
+--- xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -519,10 +519,6 @@
+
+ void CDVDDemuxFFmpeg::Flush()
+ {
+- // naughty usage of an internal ffmpeg function
+- if (m_pFormatContext)
+- av_read_frame_flush(m_pFormatContext);
+-
+ m_currentPts = DVD_NOPTS_VALUE;
+
+ m_pkt.result = -1;
diff --git a/media-tv/kodi/files/kodi-14.1-no-arm-flags.patch b/media-tv/kodi/files/kodi-14.1-no-arm-flags.patch
new file mode 100644
index 00000000000..82a738356ff
--- /dev/null
+++ b/media-tv/kodi/files/kodi-14.1-no-arm-flags.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/400617
+
+do not force any particular ABI or FPU or SIMD compiler flags for arm
+targets. let the toolchain and user CFLAGS control that.
+
+--- a/configure.in
++++ b/configure.in
+@@ -571,7 +571,7 @@
+ elif test "$target_platform" = "target_raspberry_pi"; then
+ ARCH="arm"
+ use_arch="arm"
+-elif test "$use_arch" = "arm"; then
++elif false; then
+ CFLAGS="$CFLAGS -mno-apcs-stack-check"
+ CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
+ FFMPEG_EXTRACFLAGS=""
diff --git a/media-tv/kodi/files/kodi-9999-no-arm-flags.patch b/media-tv/kodi/files/kodi-9999-no-arm-flags.patch
new file mode 100644
index 00000000000..64c1cfbc8fe
--- /dev/null
+++ b/media-tv/kodi/files/kodi-9999-no-arm-flags.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/400617
+
+do not force any particular ABI or FPU or SIMD compiler flags for arm
+targets. let the toolchain and user CFLAGS control that.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -571,7 +571,7 @@
+ elif test "$target_platform" = "target_raspberry_pi"; then
+ ARCH="arm"
+ use_arch="arm"
+-elif test "$use_arch" = "arm"; then
++elif false; then
+ CFLAGS="$CFLAGS -mno-apcs-stack-check"
+ CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
+ FFMPEG_EXTRACFLAGS=""
diff --git a/media-tv/kodi/files/kodi-9999-nomythtv.patch b/media-tv/kodi/files/kodi-9999-nomythtv.patch
new file mode 100644
index 00000000000..40ab23b98d1
--- /dev/null
+++ b/media-tv/kodi/files/kodi-9999-nomythtv.patch
@@ -0,0 +1,67 @@
+http://trac.xbmc.org/ticket/11775
+
+make mythtv support optional
+
+diff --git a/Makefile.in b/Makefile.in
+index 9ffae7e..17cc525 100755
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -209,7 +209,7 @@ LIB_DIRS=\
+ lib/cpluff \
+ lib/xbmc-dll-symbols
+
+-ifeq (@USE_MYSQL@,1)
++ifeq (@USE_MYTHTV@,1)
+ LIB_DIRS += lib/cmyth
+ CMYTH=cmyth
+ endif
+diff --git a/configure.in b/configure.in
+index d44825f..629d7b4 100755
+--- a/configure.in
++++ b/configure.in
+@@ -479,6 +479,12 @@ AC_ARG_ENABLE([mysql],
+ [AS_HELP_STRING([--disable-mysql],
+ [disable mysql])],
+
++AC_ARG_ENABLE([mythtv],
++ [AS_HELP_STRING([--disable-mythtv],
++ [disable mythtv])],
++ [use_mythtv=$enableval],
++ [use_mythtv=yes])
++
+ AC_ARG_ENABLE([webserver],
+ [AS_HELP_STRING([--disable-webserver],
+ [disable webserver])],
+@@ -1080,6 +1086,9 @@ if test "$use_mysql" = "yes"; then
+ else
+ AC_MSG_ERROR($missing_program)
+ fi
++ if test "$use_mythtv" = "yes"; then
++ AC_DEFINE([HAVE_MYTHTV],[1],["Define to 1 if you want mythtv support"])
++ fi
+ fi
+ AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
+@@ -2372,6 +2381,15 @@ else
+ final_message="$final_message\n MySQL:\tNo"
+ USE_MYSQL=0
+ fi
++
++if test "$use_mythtv" = "yes"; then
++ final_message="$final_message\n MythTV:\tYes"
++ USE_MYTHTV=1
++else
++ final_message="$final_message\n MythTV:\tNo"
++ USE_MYTHTV=0
++fi
++
+ if test "$use_webserver" = "yes"; then
+ final_message="$final_message\n Webserver:\tYes"
+ USE_WEB_SERVER=1
+@@ -2675,6 +2693,7 @@ AC_SUBST(USE_LIBUDEV)
+ AC_SUBST(USE_LIBUSB)
+ AC_SUBST(USE_LIBCEC)
+ AC_SUBST(USE_MYSQL)
++AC_SUBST(USE_MYTHTV)
+ AC_SUBST(USE_WAYLAND)
+
diff --git a/media-tv/kodi/files/kodi-9999-texturepacker.patch b/media-tv/kodi/files/kodi-9999-texturepacker.patch
new file mode 100644
index 00000000000..fe3dcdcf7a8
--- /dev/null
+++ b/media-tv/kodi/files/kodi-9999-texturepacker.patch
@@ -0,0 +1,17 @@
+--- tools/depends/native/TexturePacker/Makefile.old 2015-03-17 22:29:18.880029509 +0100
++++ tools/depends/native/TexturePacker/Makefile 2015-03-17 22:29:41.459671679 +0100
+@@ -9,14 +9,10 @@
+
+ ifeq ($(NATIVEPLATFORM),)
+ PLATFORM = native
+- EXTRA_CONFIGURE = --enable-static
+ else
+ PLATFORM = $(NATIVEPLATFORM)
+ endif
+
+-ifeq ($(NATIVE_OS), linux)
+- EXTRA_CONFIGURE = --enable-static
+-endif
+ ifeq ($(NATIVE_OS), android)
+ EXTRA_CONFIGURE = --enable-static
+ endif
diff --git a/media-tv/kodi/kodi-14.1.ebuild b/media-tv/kodi/kodi-14.1.ebuild
new file mode 100644
index 00000000000..1fcd3917fbc
--- /dev/null
+++ b/media-tv/kodi/kodi-14.1.ebuild
@@ -0,0 +1,278 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Does not work with py3 here
+# It might work with py:2.5 but I didn't test that
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit eutils python-single-r1 multiprocessing autotools
+
+CODENAME="Helix"
+case ${PV} in
+9999)
+ EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
+ inherit git-2
+ ;;
+*|*_p*)
+ MY_PV=${PV/_p/_r}
+ MY_P="${PN}-${MY_PV}"
+ SRC_URI="http://mirrors.kodi.tv/releases/source/${MY_PV}-${CODENAME}.tar.gz -> ${P}.tar.gz
+ http://mirrors.kodi.tv/releases/source/${MY_P}-generated-addons.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+
+ S=${WORKDIR}/xbmc-${PV}-${CODENAME}
+ ;;
+esac
+
+DESCRIPTION="Kodi is a free and open source media-player and entertainment hub"
+HOMEPAGE="http://kodi.tv/ http://kodi.wiki/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="airplay avahi bluetooth bluray caps cec css debug +fishbmc gles goom java joystick midi mysql nfs +opengl profile +projectm pulseaudio pvr +rsxs rtmp +samba sdl sftp test +texturepacker udisks upnp upower +usb vaapi vdpau webserver +X +xrandr"
+REQUIRED_USE="
+ pvr? ( mysql )
+ rsxs? ( X )
+ xrandr? ( X )
+ joystick? ( sdl )
+"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ app-arch/bzip2
+ app-arch/unzip
+ app-arch/zip
+ app-i18n/enca
+ airplay? ( app-pda/libplist )
+ dev-libs/boost
+ dev-libs/expat
+ dev-libs/fribidi
+ dev-libs/libcdio[-minimal]
+ cec? ( >=dev-libs/libcec-2.2 )
+ dev-libs/libpcre[cxx]
+ dev-libs/libxml2
+ dev-libs/libxslt
+ >=dev-libs/lzo-2.04
+ dev-libs/tinyxml[stl]
+ dev-libs/yajl
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ media-fonts/corefonts
+ media-fonts/roboto
+ media-libs/alsa-lib
+ media-libs/flac
+ media-libs/fontconfig
+ media-libs/freetype
+ >=media-libs/glew-1.5.6
+ media-libs/jasper
+ media-libs/jbigkit
+ >=media-libs/libass-0.9.7
+ bluray? ( media-libs/libbluray )
+ css? ( media-libs/libdvdcss )
+ media-libs/libmad
+ media-libs/libmodplug
+ media-libs/libmpeg2
+ media-libs/libogg
+ media-libs/libpng
+ projectm? ( media-libs/libprojectm )
+ media-libs/libsamplerate
+ sdl? ( media-libs/libsdl2 )
+ >=media-libs/taglib-1.8
+ media-libs/libvorbis
+ media-libs/tiff
+ pulseaudio? ( media-sound/pulseaudio )
+ media-sound/wavpack
+ >=media-video/ffmpeg-2.4:=[encode]
+ rtmp? ( media-video/rtmpdump )
+ avahi? ( net-dns/avahi )
+ nfs? ( net-fs/libnfs )
+ net-libs/libmicrohttpd[messages]
+ sftp? ( net-libs/libssh[sftp] )
+ net-misc/curl
+ samba? ( >=net-fs/samba-3.4.6[smbclient(+)] )
+ bluetooth? ( net-wireless/bluez )
+ sys-apps/dbus
+ caps? ( sys-libs/libcap )
+ sys-libs/zlib
+ virtual/jpeg
+ usb? ( virtual/libusb )
+ mysql? ( virtual/mysql )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ gles? (
+ virtual/opengl
+ media-libs/mesa[gles2]
+ )
+ vaapi? ( x11-libs/libva[opengl] )
+ vdpau? (
+ || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
+ media-video/ffmpeg[vdpau]
+ )
+ X? (
+ x11-apps/xdpyinfo
+ x11-apps/mesa-progs
+ x11-libs/libXinerama
+ xrandr? ( x11-libs/libXrandr )
+ x11-libs/libXrender
+ )"
+RDEPEND="${COMMON_DEPEND}
+ !media-tv/xbmc
+ udisks? ( sys-fs/udisks:0 )
+ upower? ( || ( sys-power/upower sys-power/upower-pm-utils ) )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ dev-lang/swig
+ dev-util/gperf
+ texturepacker? (
+ media-libs/libsdl
+ media-libs/sdl-image
+ )
+ sdl? ( media-libs/sdl-image )
+ X? ( x11-proto/xineramaproto )
+ dev-util/cmake
+ x86? ( dev-lang/nasm )
+ java? ( virtual/jre )
+ test? ( dev-cpp/gtest )"
+# Force java for latest git version to avoid having to hand maintain the
+# generated addons package. #488118
+[[ ${PV} == "9999" ]] && DEPEND+=" virtual/jre"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ [[ ${PV} == "9999" ]] && git-2_src_unpack || default
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
+ epatch "${FILESDIR}"/${P}-no-arm-flags.patch #400617
+ epatch "${FILESDIR}"/${PN}-14.0-dvddemux-ffmpeg.patch #526992#36
+ # The mythtv patch touches configure.ac, so force a regen
+ rm -f configure
+
+ # some dirs ship generated autotools, some dont
+ multijob_init
+ local d
+ for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
+ [[ -e ${d} ]] && continue
+ pushd ${d/%configure/.} >/dev/null || die
+ AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
+ multijob_child_init eautoreconf
+ popd >/dev/null
+ done
+ multijob_finish
+ elibtoolize
+
+ [[ ${PV} == "9999" ]] && emake -f codegenerator.mk
+
+ # Disable internal func checks as our USE/DEPEND
+ # stuff handles this just fine already #408395
+ export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
+
+ # Fix the final version string showing as "exported"
+ # instead of the SVN revision number.
+ export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
+
+ # avoid long delays when powerkit isn't running #348580
+ sed -i \
+ -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
+ xbmc/linux/*.cpp || die
+
+ epatch_user #293109
+
+ # Tweak autotool timestamps to avoid regeneration
+ find . -type f -exec touch -r configure {} +
+}
+
+src_configure() {
+ # Disable documentation generation
+ export ac_cv_path_LATEX=no
+ # Avoid help2man
+ export HELP2MAN=$(type -P help2man || echo true)
+ # No configure flage for this #403561
+ export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
+ # Requiring java is asine #434662
+ [[ ${PV} != "9999" ]] && export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
+
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-ccache \
+ --disable-optimizations \
+ --with-ffmpeg=shared \
+ $(use_enable airplay) \
+ $(use_enable avahi) \
+ $(use_enable bluray libbluray) \
+ $(use_enable caps libcap) \
+ $(use_enable cec libcec) \
+ $(use_enable css dvdcss) \
+ $(use_enable debug) \
+ $(use_enable fishbmc) \
+ $(use_enable gles) \
+ $(use_enable goom) \
+ $(use_enable joystick) \
+ $(use_enable midi mid) \
+ $(use_enable mysql) \
+ $(use_enable nfs) \
+ $(use_enable opengl gl) \
+ $(use_enable profile profiling) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable pvr mythtv) \
+ $(use_enable rsxs) \
+ $(use_enable rtmp) \
+ $(use_enable samba) \
+ $(use_enable sdl) \
+ $(use_enable sftp ssh) \
+ $(use_enable usb libusb) \
+ $(use_enable test gtest) \
+ $(use_enable texturepacker) \
+ $(use_enable upnp) \
+ $(use_enable vaapi) \
+ $(use_enable vdpau) \
+ $(use_enable webserver) \
+ $(use_enable X x11) \
+ $(use_enable xrandr)
+}
+
+src_install() {
+ default
+ rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
+
+ domenu tools/Linux/kodi.desktop
+ newicon media/icon48x48.png kodi.png
+
+ # Remove optional addons (platform specific and disabled by USE flag).
+ local disabled_addons=(
+ repository.pvr-{android,ios,osx{32,64},win32}.xbmc.org
+ visualization.dxspectrum
+ )
+ use fishbmc || disabled_addons+=( visualization.fishbmc )
+ use projectm || disabled_addons+=( visualization.{milkdrop,projectm} )
+ use rsxs || disabled_addons+=( screensaver.rsxs.{euphoria,plasma,solarwinds} )
+ rm -rf "${disabled_addons[@]/#/${ED}/usr/share/kodi/addons/}"
+
+ # Remove fonconfig settings that are used only on MacOSX.
+ # Can't be patched upstream because they just find all files and install
+ # them into same structure like they have in git.
+ rm -rf "${ED}"/usr/share/kodi/system/players/dvdplayer/etc
+
+ # Replace bundled fonts with system ones
+ # teletext.ttf: unknown
+ # bold-caps.ttf: unknown
+ # roboto: roboto-bold, roboto-regular
+ # arial.ttf: font mashed from droid/roboto, not removed wrt bug#460514
+ rm -rf "${ED}"/usr/share/kodi/addons/skin.confluence/fonts/Roboto-*
+ dosym /usr/share/fonts/roboto/Roboto-Regular.ttf \
+ /usr/share/kodi/addons/skin.confluence/fonts/Roboto-Regular.ttf
+ dosym /usr/share/fonts/roboto/Roboto-Bold.ttf \
+ /usr/share/kodi/addons/skin.confluence/fonts/Roboto-Bold.ttf
+
+ python_domodule tools/EventClients/lib/python/xbmcclient.py
+ python_newscript "tools/EventClients/Clients/Kodi Send/kodi-send.py" kodi-send
+}
diff --git a/media-tv/kodi/kodi-9999.ebuild b/media-tv/kodi/kodi-9999.ebuild
new file mode 100644
index 00000000000..07705215e65
--- /dev/null
+++ b/media-tv/kodi/kodi-9999.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Does not work with py3 here
+# It might work with py:2.5 but I didn't test that
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit eutils python-single-r1 multiprocessing autotools
+
+CODENAME="Helix"
+case ${PV} in
+9999)
+ EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
+ inherit git-r3
+ ;;
+*|*_p*)
+ MY_PV=${PV/_p/_r}
+ MY_P="${PN}-${MY_PV}"
+ SRC_URI="http://mirrors.kodi.tv/releases/source/${MY_PV}-${CODENAME}.tar.gz -> ${P}.tar.gz
+ http://mirrors.kodi.tv/releases/source/${MY_P}-generated-addons.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+
+ S=${WORKDIR}/xbmc-${PV}-${CODENAME}
+ ;;
+esac
+
+DESCRIPTION="Kodi is a free and open source media-player and entertainment hub"
+HOMEPAGE="http://kodi.tv/ http://kodi.wiki/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="airplay alsa avahi bluetooth bluray caps cec css dbus debug +fishbmc gles goom java joystick midi mysql nfs +opengl profile +projectm pulseaudio +rsxs rtmp +samba sftp +spectrum test +texturepacker udisks upnp upower +usb vaapi vdpau +waveform webserver +X"
+REQUIRED_USE="
+ rsxs? ( X )
+ udisks? ( dbus )
+ upower? ( dbus )
+"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ app-arch/bzip2
+ app-arch/unzip
+ app-arch/zip
+ app-i18n/enca
+ airplay? ( app-pda/libplist )
+ dev-libs/boost
+ dev-libs/expat
+ dev-libs/fribidi
+ dev-libs/libcdio[-minimal]
+ cec? ( >=dev-libs/libcec-2.2 )
+ dev-libs/libpcre[cxx]
+ dev-libs/libxml2
+ dev-libs/libxslt
+ >=dev-libs/lzo-2.04
+ dev-libs/tinyxml[stl]
+ dev-libs/yajl
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ media-fonts/corefonts
+ media-fonts/roboto
+ alsa? ( media-libs/alsa-lib )
+ media-libs/flac
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/jasper
+ media-libs/jbigkit
+ >=media-libs/libass-0.9.7
+ bluray? ( media-libs/libbluray )
+ css? ( media-libs/libdvdcss )
+ media-libs/libmad
+ media-libs/libmodplug
+ media-libs/libmpeg2
+ media-libs/libogg
+ media-libs/libpng
+ projectm? ( media-libs/libprojectm )
+ media-libs/libsamplerate
+ joystick? ( media-libs/libsdl2 )
+ >=media-libs/taglib-1.8
+ media-libs/libvorbis
+ media-libs/tiff
+ pulseaudio? ( media-sound/pulseaudio )
+ media-sound/wavpack
+ >=media-video/ffmpeg-2.6:=[encode]
+ rtmp? ( media-video/rtmpdump )
+ avahi? ( net-dns/avahi )
+ nfs? ( net-fs/libnfs )
+ webserver? ( net-libs/libmicrohttpd[messages] )
+ sftp? ( net-libs/libssh[sftp] )
+ net-misc/curl
+ samba? ( >=net-fs/samba-3.4.6[smbclient(+)] )
+ bluetooth? ( net-wireless/bluez )
+ dbus? ( sys-apps/dbus )
+ caps? ( sys-libs/libcap )
+ sys-libs/zlib
+ virtual/jpeg
+ usb? ( virtual/libusb )
+ mysql? ( virtual/mysql )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ >=media-libs/glew-1.5.6
+ )
+ gles? (
+ media-libs/mesa[gles2]
+ )
+ vaapi? ( x11-libs/libva[opengl] )
+ vdpau? (
+ || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
+ media-video/ffmpeg[vdpau]
+ )
+ X? (
+ x11-apps/xdpyinfo
+ x11-apps/mesa-progs
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ )"
+RDEPEND="${COMMON_DEPEND}
+ !media-tv/xbmc
+ udisks? ( sys-fs/udisks:0 )
+ upower? ( || ( sys-power/upower sys-power/upower-pm-utils ) )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ dev-lang/swig
+ dev-util/gperf
+ X? ( x11-proto/xineramaproto )
+ dev-util/cmake
+ x86? ( dev-lang/nasm )
+ java? ( virtual/jre )
+ test? ( dev-cpp/gtest )"
+# Force java for latest git version to avoid having to hand maintain the
+# generated addons package. #488118
+[[ ${PV} == "9999" ]] && DEPEND+=" virtual/jre"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ [[ ${PV} == "9999" ]] && git-r3_src_unpack || default
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-arm-flags.patch #400617
+ epatch "${FILESDIR}"/${P}-texturepacker.patch
+
+ # some dirs ship generated autotools, some dont
+ multijob_init
+ local d
+ for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
+ [[ -e ${d} ]] && continue
+ pushd ${d/%configure/.} >/dev/null || die
+ AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
+ multijob_child_init eautoreconf
+ popd >/dev/null
+ done
+ multijob_finish
+ elibtoolize
+
+ [[ ${PV} == "9999" ]] && emake -f codegenerator.mk
+
+ # Disable internal func checks as our USE/DEPEND
+ # stuff handles this just fine already #408395
+ export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
+
+ # Fix the final version string showing as "exported"
+ # instead of the SVN revision number.
+ export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
+
+ # avoid long delays when powerkit isn't running #348580
+ sed -i \
+ -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
+ xbmc/linux/*.cpp || die
+
+ epatch_user #293109
+
+ # Tweak autotool timestamps to avoid regeneration
+ find . -type f -exec touch -r configure {} +
+}
+
+src_configure() {
+ # Disable documentation generation
+ export ac_cv_path_LATEX=no
+ # Avoid help2man
+ export HELP2MAN=$(type -P help2man || echo true)
+ # No configure flage for this #403561
+ export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
+ # Requiring java is asine #434662
+ [[ ${PV} != "9999" ]] && export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
+
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-ccache \
+ --disable-optimizations \
+ --with-ffmpeg=shared \
+ $(use_enable alsa) \
+ $(use_enable airplay) \
+ $(use_enable avahi) \
+ $(use_enable bluray libbluray) \
+ $(use_enable caps libcap) \
+ $(use_enable cec libcec) \
+ $(use_enable css dvdcss) \
+ $(use_enable dbus) \
+ $(use_enable debug) \
+ $(use_enable fishbmc) \
+ $(use_enable gles) \
+ $(use_enable goom) \
+ $(use_enable joystick) \
+ $(use_enable midi mid) \
+ $(use_enable mysql) \
+ $(use_enable nfs) \
+ $(use_enable opengl gl) \
+ $(use_enable profile profiling) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable rsxs) \
+ $(use_enable rtmp) \
+ $(use_enable samba) \
+ $(use_enable sftp ssh) \
+ $(use_enable spectrum) \
+ $(use_enable usb libusb) \
+ $(use_enable test gtest) \
+ $(use_enable texturepacker) \
+ $(use_enable upnp) \
+ $(use_enable vaapi) \
+ $(use_enable vdpau) \
+ $(use_enable waveform) \
+ $(use_enable webserver) \
+ $(use_enable X x11)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
+
+ domenu tools/Linux/kodi.desktop
+ newicon media/icon48x48.png kodi.png
+
+ # Remove optional addons (platform specific).
+ local disabled_addons=(
+ repository.pvr-{android,ios,osx{32,64},win32}.xbmc.org
+ visualization.dxspectrum
+ visualization.vortex
+ )
+ rm -rf "${disabled_addons[@]/#/${ED}/usr/share/kodi/addons/}"
+
+ # Remove fonconfig settings that are used only on MacOSX.
+ # Can't be patched upstream because they just find all files and install
+ # them into same structure like they have in git.
+ rm -rf "${ED}"/usr/share/kodi/system/players/dvdplayer/etc
+
+ # Replace bundled fonts with system ones
+ # teletext.ttf: unknown
+ # bold-caps.ttf: unknown
+ # roboto: roboto-bold, roboto-regular
+ # arial.ttf: font mashed from droid/roboto, not removed wrt bug#460514
+ rm -rf "${ED}"/usr/share/kodi/addons/skin.confluence/fonts/Roboto-*
+ dosym /usr/share/fonts/roboto/Roboto-Regular.ttf \
+ /usr/share/kodi/addons/skin.confluence/fonts/Roboto-Regular.ttf
+ dosym /usr/share/fonts/roboto/Roboto-Bold.ttf \
+ /usr/share/kodi/addons/skin.confluence/fonts/Roboto-Bold.ttf
+
+ python_domodule tools/EventClients/lib/python/xbmcclient.py
+ python_newscript "tools/EventClients/Clients/Kodi Send/kodi-send.py" kodi-send
+}
diff --git a/media-tv/kodi/metadata.xml b/media-tv/kodi/metadata.xml
new file mode 100644
index 00000000000..eb040858632
--- /dev/null
+++ b/media-tv/kodi/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>xbox</herd>
+<use>
+ <flag name='airplay'>enable AirPlay support</flag>
+ <flag name='bluray'>Enable playback of Blu-ray filesystems</flag>
+ <flag name='cec'>Enable support for HDMI-CEC devices via libcec</flag>
+ <flag name='fishbmc'>Enable fishBMC visualization plugin</flag>
+ <flag name='gles'>Enable support for GLES</flag>
+ <flag name='goom'>Enable GOOM visualization plugin</flag>
+ <flag name='midi'>Support MIDI files</flag>
+ <flag name='nfs'>Enable NFS client support</flag>
+ <flag name='projectm'>Enable projectM visualization plugin</flag>
+ <flag name='pvr'>Enable MythTV support</flag>
+ <flag name='rtmp'>Enable Real Time Messaging Protocol using librtmp</flag>
+ <flag name='rsxs'>Enable really slick X screensavers</flag>
+ <flag name='sftp'>Support browsing files over SFTP</flag>
+ <flag name='spectrum'>Enable spectrum visualization plugin</flag>
+ <flag name='texturepacker'>Support packing skin textures</flag>
+ <flag name='waveform'>Enable waveform visualization plugin</flag>
+ <flag name='webserver'>Enable internal webserver</flag>
+ <flag name='xrandr'>Support X randr extension</flag>
+</use>
+<upstream>
+ <bugs-to>http://trac.kodi.tv/</bugs-to>
+ <remote-id type="github">xbmc/xbmc</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/media-tv/linuxtv-dvb-apps/Manifest b/media-tv/linuxtv-dvb-apps/Manifest
new file mode 100644
index 00000000000..9fbc2ee62f5
--- /dev/null
+++ b/media-tv/linuxtv-dvb-apps/Manifest
@@ -0,0 +1 @@
+DIST linuxtv-dvb-apps-1.1.1.20100223.tar.bz2 429129 SHA256 8a657a1479de665a6d95d8f5585ffd0228232e1a030b88435d4c40d85e983461 SHA512 0950197e2a199b1ab4392fa2e893d9b537d2b8fed05b24d8b81a2abf11ed2373dcb299a51e217c6508ea68b81691728b120328e4080de68519449fc5fd506161 WHIRLPOOL 5129c13fbc1cc65c9a5177d29de87563c22f4a8c78bbe4534e65a9c46b3683344c5a296cd157379c7af9500a9079daea8418b927a65ed1596d24d6300441ed20
diff --git a/media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-alevt.patch b/media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-alevt.patch
new file mode 100644
index 00000000000..d19ac7e4878
--- /dev/null
+++ b/media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-alevt.patch
@@ -0,0 +1,37 @@
+--- linuxtv-dvb-apps-1.1.1.20100223/util/alevt/exp-gfx.c
++++ linuxtv-dvb-apps-1.1.1.20100223/util/alevt/exp-gfx.c
+@@ -137,6 +137,7 @@
+
+ #ifdef WITH_PNG
+
++#include <zlib.h>
+ #include <png.h>
+ static int png_open(struct export *e);
+ static int png_option(struct export *e, int opt, char *arg);
+--- linuxtv-dvb-apps-1.1.1.20100223/util/alevt/Makefile
++++ linuxtv-dvb-apps-1.1.1.20100223/util/alevt/Makefile
+@@ -25,13 +25,13 @@
+ all: alevt alevt-date alevt-cap alevt.1 alevt-date.1 alevt-cap.1
+
+ alevt: $(OBJS)
+- $(CC) $(OPT) $(OBJS) -o alevt -L$(PREFIX)/lib -L$(PREFIX)/lib64 -lX11 $(EXPLIBS)
++ $(CC) $(OPT) $(OBJS) -o alevt -L$(PREFIX)/lib -L$(PREFIX)/lib64 -lX11 $(EXPLIBS) $(LDFLAGS)
+
+ alevt-date: $(TOBJS)
+- $(CC) $(OPT) $(TOBJS) -o alevt-date $(ZVBILIB)
++ $(CC) $(OPT) $(TOBJS) -o alevt-date $(ZVBILIB) $(LDFLAGS)
+
+ alevt-cap: $(COBJS)
+- $(CC) $(OPT) $(COBJS) -o alevt-cap $(EXPLIBS)
++ $(CC) $(OPT) $(COBJS) -o alevt-cap $(EXPLIBS) $(LDFLAGS)
+
+ font.o: font1.xbm font2.xbm font3.xbm font4.xbm
+ fontsize.h: font1.xbm font2.xbm font3.xbm font4.xbm
+@@ -73,7 +73,6 @@
+ install -m 0644 alevt.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ install -m 0644 alevt-date.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ install -m 0644 alevt-cap.1 $(DESTDIR)$(PREFIX)/share/man/man1
+- install -m 0644 alevt.png $(DESTDIR)$(PREFIX)/share/pixmaps
+ install -m 0644 alevt.desktop $(DESTDIR)$(PREFIX)/share/applications
+
+ uninstall: clean
diff --git a/media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-ldflags.patch b/media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-ldflags.patch
new file mode 100644
index 00000000000..063b4b6c479
--- /dev/null
+++ b/media-tv/linuxtv-dvb-apps/files/linuxtv-dvb-apps-1.1.1.20100223-ldflags.patch
@@ -0,0 +1,20 @@
+--- linuxtv-dvb-apps-1.1.1.20100223/Make.rules
++++ linuxtv-dvb-apps-1.1.1.20100223/Make.rules
+@@ -46,7 +46,7 @@
+ %: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -MMD $(LDFLAGS) -o $@ $< $(filter-out %.h %.c,$^) $(LOADLIBES) $(LDLIBS)
+ %.so:
+- $(CC) -shared -o $@ $^
++ $(CC) $(LDFLAGS) -Wl,-soname -Wl,$@ -shared -o $@ $^
+ %.a:
+ $(AR) rcs $@ $^
+ clean::
+@@ -76,7 +76,7 @@
+ @$(CC) $(CPPFLAGS) $(CFLAGS) -MMD $(LDFLAGS) -o $@ $< $(filter-out %.h %.c,$^) $(LOADLIBES) $(LDLIBS)
+ %.so:
+ @echo CC $@
+- @$(CC) -shared -o $@ $^
++ @$(CC) $(LDFLAGS) -Wl,-soname -Wl,$@ -shared -o $@ $^
+ %.a:
+ @echo AR $@
+ @$(AR) rcs $@ $^
diff --git a/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20100223-r1.ebuild b/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20100223-r1.ebuild
new file mode 100644
index 00000000000..8b07e4ad440
--- /dev/null
+++ b/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20100223-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs vcs-snapshot
+
+HOMEPAGE="http://www.linuxtv.org/"
+DESCRIPTION="small utils for DVB to scan, zap, view signal strength, ..."
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="alevt test usb"
+
+RDEPEND="alevt? ( !media-video/alevt
+ media-libs/libpng
+ media-libs/zvbi[v4l]
+ sys-libs/zlib
+ x11-libs/libX11 )
+ usb? ( virtual/libusb:0 )
+ !dev-db/xbase"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ virtual/linuxtv-dvb-headers"
+# !dev-db/xbase (bug #208596)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-alevt.patch
+
+ # do not compile test-progs, incompartible with videodev2.h
+ sed -e '/-C test/d' \
+ -i Makefile || die
+
+ # remove copy of header-files
+ rm -rf "${S}"/include || die
+}
+
+src_compile() {
+ emake V=1 CC=$(tc-getCC) $(usex usb "ttusb_dec_reset=1" "")
+ if use alevt ; then
+ emake -C util/alevt CC=$(tc-getCC) OPT="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ insinto /usr/bin
+ emake V=1 prefix="${EROOT}usr" libdir="${EROOT}usr/$(get_libdir)" \
+ $(usex usb "ttusb_dec_reset=1" "") \
+ DESTDIR="${D}" INSTDIR="${T}" install
+ if use alevt ; then
+ dodir /usr/share/applications
+ dodir /usr/share/man/man1
+ emake -C util/alevt DESTDIR="${D}" install
+ fi
+
+ # rename scan to scan-dvb
+ mv "${D}"/usr/bin/scan{,-dvb} || die
+
+ # install zap-files
+ local dir=""
+ for dir in dvb-{s,c,t} atsc ; do
+ insinto /usr/share/dvb/zap/${dir}
+ doins "${S}"/util/szap/channels-conf/${dir}/*
+ done
+
+ # install remote-key files
+ insinto /usr/share/dvb/av7110_loadkeys
+ doins util/av7110_loadkeys/*.rc*
+
+ # install Documentation
+ dodoc README
+ newdoc util/scan/README README.scan-dvb
+ newdoc util/szap/README README.zap
+ newdoc util/av7110_loadkeys/README README.av7110_loadkeys
+
+ use usb && newdoc util/ttusb_dec_reset/README README.ttusb_dec_reset
+}
+
+pkg_postinst() {
+ elog "/usr/bin/scan has been installed as scan-dvb."
+}
diff --git a/media-tv/linuxtv-dvb-apps/metadata.xml b/media-tv/linuxtv-dvb-apps/metadata.xml
new file mode 100644
index 00000000000..cd4366c20fb
--- /dev/null
+++ b/media-tv/linuxtv-dvb-apps/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+<use>
+ <flag name="alevt">Build videotext decoder</flag>
+</use>
+</pkgmetadata>
diff --git a/media-tv/linuxtv-dvb-firmware/Manifest b/media-tv/linuxtv-dvb-firmware/Manifest
new file mode 100644
index 00000000000..18eed665383
--- /dev/null
+++ b/media-tv/linuxtv-dvb-firmware/Manifest
@@ -0,0 +1,29 @@
+DIST 2830SCap2.sys 86912 SHA256 ba96cf8e973c721a7a5a78f99b46065fef6a44169f7c2c75007f51b1432b2538 SHA512 641d9c8a44f7a6833538d780e45f71108a2d2d3a36913118d221e923b083eced572ee681a748ec492039d632a2f5124a8d1c5949938aeeae377337c2a6ef1136 WHIRLPOOL 6b0d4499a961b273150cd92ea3383fd77bad27fbbcf879240660d4ad2fe4e45ae0f6c4837397547212ffd5dd66df3445a9737c3182d1d721b52ace3837e3da09
+DIST 2830SLoad2.sys 15872 SHA256 899c3ddecd4227d0bf8ac393a297bc3fe9cd5e366d389154044d14a7dcf255b6 SHA512 594c8608682a515c21112f95be73135d3400a2fcd0d5896c12dae65ca2bdcf50cbd51c01dc4e68b613b848e90d957d259c20bcd670b897df44e33f189df96730 WHIRLPOOL 9f142959ebdacfcc12e845707f5a3b8a9f311bbb589bc806b1d83da100435c39122acd9c3177372d5eee5f708aca94f849d9811603e23cd6b8b3916e40940592
+DIST 7%5Cdrv_2.11.02.zip 235227 SHA256 a8e994a4af94cc5c4808603d648a19d5056f85338cfa6bfffffb072f2fde36bf SHA512 afbb14176d4ea201f67cb6cbb8a525bf6a8bbeb9ef4ec865165a337d4a59e43fe71419123671407e659789662bbd5d7aa3fe16ea7d690abeec5ae26cfb9f7f4e WHIRLPOOL d931f3b068b63655f7439227a3d225563bcee586c705d165238eca1eda0b2bd8ec04139b796c511f593e42ba892d8a663af816039dba67180eeaaaf8054d5159
+DIST AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip 156028 SHA256 7f65564416b12bc34d0d2e49b61a11c557e0f48a49064a8c880423606d43aa3f SHA512 df8515e05fcb612b094e6c65caf10eab571178fe2fbf3b5645ceaec56c2221edf2bb059165c259484acaac77d9779c7b8cc347ffd8b24339be472d982e1222ff WHIRLPOOL 632f517883b6d68af994bc31476aa994cf991fb9ee0bf67e8f426a5c81042b2ac1cf407540069cfa16a0695d75dda605560501fec18c4a4fa851e2209489880e
+DIST TT_PCI_2.19h_28_11_2006.zip 22366414 SHA256 887492ba12193ed39ac28ed98f02e6ebb7290807461f4c7ffb10750685098061 SHA512 08d840c08fcd59d4a613197adf5d271a76de101e0db7fdee21a7fa38b1d6f5b573e58f430e95c74a35db33e2866316143bc56f17316acdfb6875f390cbd64362 WHIRLPOOL 0252866f0af60f8df354a5432a54d0ef7977da438397aa917eded37c61bb350203523c8c1ffda81e139082f6ce58829f36e0b5036e7511eb3508d7f2e86b2419
+DIST Tevii_linuxdriver_0815.rar 3743579 SHA256 e1c5f04d3c565e43f90cf00dea6a1c30981d8bd14162163d8b97755d8ea909c1 SHA512 da35df5c18132df0781055b7d85a267e15051ba697ab1f67a7c4ed274c533d15eb4b21dfe719a72f5ceabaea873ec920185aa564c885413e6fe717d3d5f36560 WHIRLPOOL b3a5e32e6232fdcb4ff95959e51d5f13254b6bb3bf7bd518798e60c7d2dbcb4b5172b1da22f3eeff48c7aecd24932b1fe0f7b579fab099268b811d1d3878883c
+DIST TwinhanDTV2.608a.zip 22316104 SHA256 5e6007e28d2d043c63bb917189f6ddfe8e8a25edd007af0328926a093e2390a6 SHA512 1476ba9b7845bece86d26f272f908704f828ebea2cc68468b4d8cb4180fa22bb8dbea870ae2fbde233a2424e9249de5f21c75a459e65ad067780fb18e1c9fe99 WHIRLPOOL 3c0a73d58f8b30ffec713cccaa644c38c84fcfd9dba57b27f855d896f706d213d150e32115a26913fecaf41d8b03a09001c7e2fd5933fc0259453bbc609f298b
+DIST Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip 2485056 SHA256 0a3e5272ccbc7fbd3ac006d8677a22a556b39594febb52d2cbab637d153e7381 SHA512 58fa3ec67443023d6ac259a6d765453c6ca5271ab6db8f62ed1ccf0c18bf4e88b456dc48cd4015fff72801285149d81412aa64179e0c1797c03c7f7879e617c4 WHIRLPOOL cd0cfc1ea9c9524571aeee6b53c573bb07e14fc144c5cea11ea5059e52b4785702531d15f18f13c5335a16e1752923e4365cfa40d5aa177f454903f55de29978
+DIST af9005.fw 28250 SHA256 5d1eedb40067a622c3ac6ec782f8c2de3af8d11e76603deed738deac7144cd82 SHA512 8937b39d2718ca09f4699a0982c7ad86405230a28f51d6b5e750451197796b3bf4fe6506caa07da47597109af935373f4ac9fb350472f72f7fa6d6c01881e2a3 WHIRLPOOL 955fa7800e3c4ea7918fcd06e42c1967dac05345bfae9a90fb894d24bb4cbf876ce5dafa2d29a4a07d82e179dddf6ed4501123b44d3412210a65ee16c1b5e644
+DIST dec217g.exe 16371951 SHA256 fd20902bcc3178a26b5a27fe88adcdfce888daa8d2206b67b13e5f3a3973dc1c SHA512 2d0fc3b3b7bd8391fb29d1e6378dcb3d61cbb12959a9b57ffe6e68446493a9a43c98a982c08a7394a219bdda64e5c78addc9f6df7db0a7e6bda2830d6941cd65 WHIRLPOOL 932e876d2a779af49030f56bcd7ed7f9081f72f45422573bb990257a4fc75a41dbf25e172862ca2758efa7f8d4e669589d2b55f4263c70763e380af4d0fc8e5d
+DIST download.ashx?file=57 3667491 SHA256 c548a010b8900dece021b29c01052fb195ffd590cb3e6f0c8f8c632fc3901abe SHA512 d0e877fce2f41f5e6444c8c297080b5b3139a6be9034de40dc9dd8b789f9bf403b00ebdb926e930780dce4e054150231c457c543e65988c492dbeffc87de08e3 WHIRLPOOL 30cdcef0b339f6b97dde6afd336dcb1621792a966c48c3abbb5b440e88b657d4b9d21a50bf704241a25b9368c773e86ed90eea9aad72080de91fe463bf8a2cc6
+DIST dvb-fe-bcm3510-01.fw 2285 SHA256 978ece002a3e1f5eb760f6ca48496e05da00b7aa76e0f6f2cb108bde2ea14f51 SHA512 a753e5cca7f976801f02de4a5502b8c149238473b75a492ecca77a8ebbdc006b8e5914f16f7876c6c5f08bea7548aeec56ca111d6b290cdf508e61b865848128 WHIRLPOOL 70edb9c0460fa4a67c586d698c81388755eece217848afbea59869a4cd9a5a3d5213469cdf1bb83ddc6a1f014f51c6e84aff827a2cd87c6d3ca6d877fbdfbd73
+DIST dvb-fe-sp887x.fw 23620 SHA256 e0a3b66c7b059c3be93764bea82866121c1f4fa2336f4b6abed1047360e92368 SHA512 7e7373f28b237c41e8b2bdcda0677ed5a67cf10d47ee87659f6358413b5fd82ed4d39c83344a1134292fc1e76650bf7431aa58e087716b4e4d00c52088469843 WHIRLPOOL f42345c210918e08eaed4a792370d2e7779ddee0ee5b6565456f917d90c473035c1df680e6758c19f21ba56c65d976baa532ee95b53143a32549bf430bf82323
+DIST dvb-fe-tda10045.fw 30555 SHA256 211d6917a2c1b56838d91bdd5963d0646fac111cdd8c765c2398af49e33b0e46 SHA512 ee09e4d6e397d3a5ec24abe136802c43dd854b4fc43e2041a12b525fbd4cf0b9e5fe50c4b4fe0772262de54626d553853bde5bbcf49cf5a74dca8e369a5a865b WHIRLPOOL 0867e6307ef604f4e5ff191d189c02316d0808506dcafc475a254bd9e20917cd2c5d395b3bf8501fd2e1999983db37bb00b06478631f1541fe6ca4c15f1a2214
+DIST dvb-firmwares-1.tar.bz2 182356 SHA256 11772d539e5605e92f51a1edc82382c19808dea2bb9f0b425efad354e0d9bd52 SHA512 e0d94e906034ca4d3b81d5e8802114bcda8cd06119e505425b3d65e9ead39d8d18c3f0bf77df845b47b99a77468fb781412dbf6ee15878c254648499c17461f4 WHIRLPOOL 0aec50735266823e444af7c2e4613c2a02f33e400f136c21db2367972608f7b2b278326b8263df654f0e2802c94256000b440c48ea7628a00ed985f3d15fb5ef
+DIST dvb-ttpci-01.fw-fc2624 242836 SHA256 044c4974189d90715189af82e648a8a0512cd4ce5bd48d50d6f2b80f1095de40 SHA512 044b812043d8d7acbb6c4ac06cb745172976ef0db70122b8be4c0bd74427d92de675fe866f64d639e880476ee11348dd88e8c9d998d9c60c58749aa80c961611 WHIRLPOOL 0f81b7e8573d9958a97ef4d256c6ba18a095bdefbf77ace5329181b94585353799456bf850a6a014d7ccc1f7b383e7d61049d90bcecf2c2b02df6516a04a307d
+DIST dvb-usb-af9015.fw 15913 SHA256 a0ae064c3acef212172f13317d627492d0ed3c0a43f3634821b33a00fbf99621 SHA512 b7ba58329d7432a3c91176632f3905ce073c9cf8531a1629a539cceb0cf018769b0cf966b37350642ce41eddce4036d4dbc123aebc8d63367109cbbdeb590edc WHIRLPOOL 3e0f1811a2598d050c8f7b5264deaf148da6dd2a67c0d6779716df5853d7c01c11298a13c30b7adb8cd6a6e503d8523c8b056e5853e29b0068473f21e891709e
+DIST dvb-usb-bluebird-01.fw 9025 SHA256 1d9d8c5a320a0a76c476e08bd212291144439121d4147dbf8d48822b576306fc SHA512 5e71d89bec537253ec13d1c4de5b82704924a3b20af68b7685e19ca67b7b0776783acbbd2162caac14e53da6b62c51df5467446df5e54dab7cee84217977b42f WHIRLPOOL 8cc3e5f443fa3731d00ef2d271ddd92f006290862baf4d85864781cc877bb012a3883e4dad9ebe49467a6d68527425fb5eecbb5d0c6fa4a0c0819425898b2e97
+DIST dvb-usb-dib0700-1.20.fw 33768 SHA256 74f5ffeb43767e1af6d379d6cc2e0efeaa54455d030bcd71d95f0f2a908c672a SHA512 b9265a620f5e42d3daba60dbaa5f893d118bb1c4285e3f1612e6a9ac2661db911c1ecb36b2974409f2a8c591b5d21566e433db5178a2683c8cbb791504a8972d WHIRLPOOL 2c52c1c4e744996ce8ab3c4f82e3f4d07fb190aa0e95241fa7154e6220ccd96f6be768e4f3e318476b6b73eae767487d3e618752fb1b5c33784998346927f6ba
+DIST dvb-usb-wt220u-02.fw 8480 SHA256 ed8cd2ae6b5ad540fd4a14de9ccaa10f662781961f44cfe58b623679a5f508df SHA512 ed7e493d4a1f8fb89335ba4783cb45bdbb9dc01afd6a56a15cde532c735247ee4e640360307f72464ae56922297d0b166e7b2f5b6dc751fddf00ae9ea7598fe7 WHIRLPOOL 2917c3ee32f770fc5520f45857aa636d1e9c54383be34d4bd1664722b1af7e0ef47287f8ba7afb5c58667d330eec069d3b154d51722be722ab54de1459be1e0b
+DIST dvb-usb-wt220u-fc03.fw 12902 SHA256 838044a2f98736fe5b1266598a36eed4b5c9aa845e65c5d1d4054b8b72f808dc SHA512 94a07b404d7ca678b09d29eb74842f2aeb3e4a61e73d7a225c817e468bdd46b396dc6c8db6ba6cbd69d9ce661bf89add2528d57647586472cc9f3c018b731509 WHIRLPOOL 5efe2f1f19392163f8166a34561f86f66c306d9a3d845ac44f030544434a5ad90fba2cf7a8cfe54b9fe822173b7c8abe8b9c06e6c0352bdac03ebc37cc30d323
+DIST tt_Premium_217g.zip 11348671 SHA256 cfe84a039c20473ba41c2e3da165c668a0e227f197ea0e272abc253c5f9f5a83 SHA512 468dcd8102a8506d51a30eb87b056f98c336bb3894b0a3f0d993dc66f61640b287886fae8e84bae87bdf4eb8008870c6f856181407f63345430a02ef3fdc84ae WHIRLPOOL a96d3734d43740abcec94bdf5e1e4083d6e4fa1954cc8699166d93b2a1c76d068eea190cb87350f38de8ea365e275d8a15fc137f06cf853234244cce5600b7eb
+DIST v4l-cx231xx-avcore-01.fw 16382 SHA256 c2a75fc710f51c778abe7c7e8b54ed5686b17811dd203d1de3070d3df70d70f6 SHA512 2c7db24188c3399b05a2362ef359f9b9978dd3ab937c09ce86c2e923c19a687499d89cd07738e6dc1f4232be15caf989f602b4522d7bb5f3da6009bdcfe0508c WHIRLPOOL 28cb9906c6c85f2f5d6ddfa17eb101bdafab54dafbd9ebaeb8552f0dec4537202a3b05a65250e7280fdae8462e4098c22c864aa88943f98cbe94caf967bbe056
+DIST v4l-cx23418-apu.fw 141200 SHA256 770351d86c757f4be635f276386269eeaf0448e7c3fa1791507e77e5556c063a SHA512 627e073d09d4136604627f24b8a69539221d9becc4e6e18f24d9a81eb417f4f0183484ae38ccbea0aa93da9e8d75882e603f0788b4dff3160f73f2e42e08284e WHIRLPOOL e1aed81fa9da4c6028e76e3a5606c2ec0baafedb01e491ca11f50f6b369a004cfe01d05bd92af6d52265155262b7b5c20cba23aa810e89d859d6419427127b10
+DIST v4l-cx23418-cpu.fw 158332 SHA256 058eebb8072bbf0628de3774aad0e5eaa83f871334f8120c0e12c9b971be9bce SHA512 02bd66461efb50bd74bbf2ba4423db143e7d458e5bf573da5378bf93822ec762b7783b7fcc4163a4e97eda1ac741500db02d16c0c00763daaa8c031fe824b647 WHIRLPOOL 5f5c4b7426ffdc5da1637918c722efa28ada03a3e60ea715d99d8807b598d8b8f39ad474ed6d556df02342726182e63b0b22dc15791d0aba3f4e97bc8b6969ab
+DIST v4l-cx23418-dig.fw 16382 SHA256 a6505aee99fa71768daece0a7ced1ac1f60bf7f8d823707640778fe0a4fd0a81 SHA512 02b48cf498abfc2d72b420021cf6dc3a47d28c883c5175df9718d19b5f31bb7e0bf912088bd47a7572f96c4a9764cf16f4e7db58bfa1d43d79d5e95a90a66d37 WHIRLPOOL a797615acdf6a6f54bc160dacb3e0da077985e1824b6da37b54e44ffd8425f5621370cf904c029ea5ac275c9359b07b2c3cca6638d8d5ae0f1cf749fdc1ebf77
+DIST v4l-cx23885-avcore-01.fw 16382 SHA256 c2a75fc710f51c778abe7c7e8b54ed5686b17811dd203d1de3070d3df70d70f6 SHA512 2c7db24188c3399b05a2362ef359f9b9978dd3ab937c09ce86c2e923c19a687499d89cd07738e6dc1f4232be15caf989f602b4522d7bb5f3da6009bdcfe0508c WHIRLPOOL 28cb9906c6c85f2f5d6ddfa17eb101bdafab54dafbd9ebaeb8552f0dec4537202a3b05a65250e7280fdae8462e4098c22c864aa88943f98cbe94caf967bbe056
+DIST v4l-cx23885-enc.fw 16382 SHA256 c2a75fc710f51c778abe7c7e8b54ed5686b17811dd203d1de3070d3df70d70f6 SHA512 2c7db24188c3399b05a2362ef359f9b9978dd3ab937c09ce86c2e923c19a687499d89cd07738e6dc1f4232be15caf989f602b4522d7bb5f3da6009bdcfe0508c WHIRLPOOL 28cb9906c6c85f2f5d6ddfa17eb101bdafab54dafbd9ebaeb8552f0dec4537202a3b05a65250e7280fdae8462e4098c22c864aa88943f98cbe94caf967bbe056
+DIST v4l-cx25840.fw 16382 SHA256 67a06c2dbcdf893c309357c4de181655be55708b6985c99b2e7ba8bebc417212 SHA512 69e3020b97f80ea8da65c7b141f5281be997fba43f96365b40bfcca2ab788775d39a38c0164f1803ed37c4fabc14fb0cc9e16b46cf791e3eee7403401fc47cc1 WHIRLPOOL ee019238f658025bb3e6bd9dc33b392d66cd394b43794b86876f9d19b188b91b2690b9f7f1fddff7828a953f13b2a5be57949cce8073d0997176729f1c8e4625
diff --git a/media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.07.06 b/media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.07.06
new file mode 100644
index 00000000000..73b77457781
--- /dev/null
+++ b/media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.07.06
@@ -0,0 +1,638 @@
+#!/usr/bin/perl
+# DVB firmware extractor
+#
+# (c) 2004 Andrew de Quincey
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+use File::Temp qw/ tempdir /;
+use IO::Handle;
+
+@components = ( "sp8870", "sp887x", "tda10045", "tda10046",
+ "tda10046lifeview", "av7110", "dec2000t", "dec2540t",
+ "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
+ "or51211", "or51132_qam", "or51132_vsb", "bluebird",
+ "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718" );
+
+# Check args
+syntax() if (scalar(@ARGV) != 1);
+$cid = $ARGV[0];
+
+# Do it!
+for ($i=0; $i < scalar(@components); $i++) {
+ if ($cid eq $components[$i]) {
+ $outfile = eval($cid);
+ die $@ if $@;
+ print STDERR <<EOF;
+Firmware(s) $outfile extracted successfully.
+Now copy it(they) to either /usr/lib/hotplug/firmware or /lib/firmware
+(depending on configuration of firmware hotplug).
+EOF
+ exit(0);
+ }
+}
+
+# If we get here, it wasn't found
+print STDERR "Unknown component \"$cid\"\n";
+syntax();
+
+
+
+
+# ---------------------------------------------------------------
+# Firmware-specific extraction subroutines
+
+sub sp8870 {
+ my $sourcefile = "tt_Premium_217g.zip";
+ my $url = "http://2.download.softwarepatch.pl/1619edb0dcb493dd5337b94a1f79c3f6/$sourcefile";
+ my $hash = "53970ec17a538945a6d8cb608a7b3899";
+ my $outfile = "dvb-fe-sp8870.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash);
+ copy("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $outfile);
+
+ $outfile;
+}
+
+sub sp887x {
+ my $sourcefile = "Dvbt1.3.57.6.zip";
+ my $url = "http://www.avermedia.com/software/$sourcefile";
+ my $cabfile = "DVBT Net Ver1.3.57.6/disk1/data1.cab";
+ my $hash = "237938d53a7f834c05c42b894ca68ac3";
+ my $outfile = "dvb-fe-sp887x.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+ checkunshield();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ unshield("$tmpdir/$cabfile", $tmpdir);
+ verify("$tmpdir/ZEnglish/sc_main.mc", $hash);
+ copy("$tmpdir/ZEnglish/sc_main.mc", $outfile);
+
+ $outfile;
+}
+
+sub tda10045 {
+ my $sourcefile = "tt_budget_217g.zip";
+ my $url = "http://www.technotrend.de/new/217g/$sourcefile";
+ my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a";
+ my $outfile = "dvb-fe-tda10045.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/software/OEM/PCI/App/ttlcdacc.dll", 0x37ef9, 30555, "$tmpdir/fwtmp");
+ verify("$tmpdir/fwtmp", $hash);
+ copy("$tmpdir/fwtmp", $outfile);
+
+ $outfile;
+}
+
+sub tda10046 {
+ my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip";
+ my $url = "http://www.tt-download.com/download/updates/219/$sourcefile";
+ my $hash = "6a7e1e2f2644b162ff0502367553c72d";
+ my $outfile = "dvb-fe-tda10046.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/TT_PCI_2.19h_28_11_2006/software/OEM/PCI/App/ttlcdacc.dll", 0x65389, 24478, "$tmpdir/fwtmp");
+ verify("$tmpdir/fwtmp", $hash);
+ copy("$tmpdir/fwtmp", $outfile);
+
+ $outfile;
+}
+
+sub tda10046lifeview {
+ my $sourcefile = "7%5Cdrv_2.11.02.zip";
+ my $url = "http://www.lifeview.hk/dbimages/document/$sourcefile";
+ my $hash = "1ea24dee4eea8fe971686981f34fd2e0";
+ my $outfile = "dvb-fe-tda10046.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/LVHybrid.sys", 0x8b088, 24602, "$tmpdir/fwtmp");
+ verify("$tmpdir/fwtmp", $hash);
+ copy("$tmpdir/fwtmp", $outfile);
+
+ $outfile;
+}
+
+sub av7110 {
+ my $sourcefile = "dvb-ttpci-01.fw-261d";
+ my $url = "http://www.linuxtv.org/downloads/firmware/$sourcefile";
+ my $hash = "603431b6259715a8e88f376a53b64e2f";
+ my $outfile = "dvb-ttpci-01.fw";
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ verify($sourcefile, $hash);
+ copy($sourcefile, $outfile);
+
+ $outfile;
+}
+
+sub dec2000t {
+ my $sourcefile = "dec217g.exe";
+ my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
+ my $hash = "bd86f458cee4a8f0a8ce2d20c66215a9";
+ my $outfile = "dvb-ttusb-dec-2000t.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $hash);
+ copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $outfile);
+
+ $outfile;
+}
+
+sub dec2540t {
+ my $sourcefile = "dec217g.exe";
+ my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
+ my $hash = "53e58f4f5b5c2930beee74a7681fed92";
+ my $outfile = "dvb-ttusb-dec-2540t.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $hash);
+ copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $outfile);
+
+ $outfile;
+}
+
+sub dec3000s {
+ my $sourcefile = "dec217g.exe";
+ my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
+ my $hash = "b013ececea83f4d6d8d2a29ac7c1b448";
+ my $outfile = "dvb-ttusb-dec-3000s.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $hash);
+ copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $outfile);
+
+ $outfile;
+}
+sub opera1{
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0);
+
+ checkstandard();
+ my $fwfile1="dvb-usb-opera1-fpga-01.fw";
+ my $fwfile2="dvb-usb-opera-01.fw";
+ extract("2830SCap2.sys", 0x62e8, 55024, "$tmpdir/opera1-fpga.fw");
+ extract("2830SLoad2.sys",0x3178,0x3685-0x3178,"$tmpdir/fw1part1");
+ extract("2830SLoad2.sys",0x0980,0x3150-0x0980,"$tmpdir/fw1part2");
+ delzero("$tmpdir/fw1part1","$tmpdir/fw1part1-1");
+ delzero("$tmpdir/fw1part2","$tmpdir/fw1part2-1");
+ verify("$tmpdir/fw1part1-1","5e0909858fdf0b5b09ad48b9fe622e70");
+ verify("$tmpdir/fw1part2-1","d6e146f321427e931df2c6fcadac37a1");
+ verify("$tmpdir/opera1-fpga.fw","0f8133f5e9051f5f3c1928f7e5a1b07d");
+
+ my $RES1="\x01\x92\x7f\x00\x01\x00";
+ my $RES0="\x01\x92\x7f\x00\x00\x00";
+ my $DAT1="\x01\x00\xe6\x00\x01\x00";
+ my $DAT0="\x01\x00\xe6\x00\x00\x00";
+ open FW,">$tmpdir/opera.fw";
+ print FW "$RES1";
+ print FW "$DAT1";
+ print FW "$RES1";
+ print FW "$DAT1";
+ appendfile(FW,"$tmpdir/fw1part1-1");
+ print FW "$RES0";
+ print FW "$DAT0";
+ print FW "$RES1";
+ print FW "$DAT1";
+ appendfile(FW,"$tmpdir/fw1part2-1");
+ print FW "$RES1";
+ print FW "$DAT1";
+ print FW "$RES0";
+ print FW "$DAT0";
+ copy ("$tmpdir/opera1-fpga.fw",$fwfile1);
+ copy ("$tmpdir/opera.fw",$fwfile2);
+
+ $fwfile1.",".$fwfile2;
+}
+sub vp7041 {
+ my $sourcefile = "TwinhanDTV2.608a.zip";
+ my $url = "http://www.twinhan.com/files/AW/Software/$sourcefile";
+ my $hash = "e88c9372d1f66609a3e7b072c53fbcfe";
+ my $outfile = "dvb-vp7041-2.422.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/TwinhanDTV2.608a/Drivers/7041/WinXP/UDTTload.sys", 12503, 3036, "$tmpdir/fwtmp1");
+ extract("$tmpdir/TwinhanDTV2.608a/Drivers/7041/WinXP/UDTTload.sys", 2207, 10274, "$tmpdir/fwtmp2");
+
+ my $CMD = "\000\001\000\222\177\000";
+ my $PAD = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000";
+ my ($FW);
+ open $FW, ">$tmpdir/fwtmp3";
+ print $FW "$CMD\001$PAD";
+ print $FW "$CMD\001$PAD";
+ appendfile($FW, "$tmpdir/fwtmp1");
+ print $FW "$CMD\000$PAD";
+ print $FW "$CMD\001$PAD";
+ appendfile($FW, "$tmpdir/fwtmp2");
+ print $FW "$CMD\001$PAD";
+ print $FW "$CMD\000$PAD";
+ close($FW);
+
+ verify("$tmpdir/fwtmp3", $hash);
+ copy("$tmpdir/fwtmp3", $outfile);
+
+ $outfile;
+}
+
+sub dibusb {
+ my $url = "http://www.linuxtv.org/downloads/firmware/dvb-usb-dibusb-5.0.0.11.fw";
+ my $outfile = "dvb-dibusb-5.0.0.11.fw";
+ my $hash = "fa490295a527360ca16dcdf3224ca243";
+
+ checkstandard();
+
+ wgetfile($outfile, $url);
+ verify($outfile,$hash);
+
+ $outfile;
+}
+
+sub nxt2002 {
+ my $sourcefile = "Technisat_DVB-PC_4_4_COMPACT.zip";
+ my $url = "http://www.bbti.us/download/windows/$sourcefile";
+ my $hash = "476befae8c7c1bb9648954060b1eec1f";
+ my $outfile = "dvb-fe-nxt2002.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/SkyNET.sys", $hash);
+ extract("$tmpdir/SkyNET.sys", 331624, 5908, $outfile);
+
+ $outfile;
+}
+
+sub nxt2004 {
+ my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip";
+ my $url = "http://www.avermedia-usa.com/support/Drivers/$sourcefile";
+ my $hash = "111cb885b1e009188346d72acfed024c";
+ my $outfile = "dvb-fe-nxt2004.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/3xHybrid.sys", $hash);
+ extract("$tmpdir/3xHybrid.sys", 465304, 9584, $outfile);
+
+ $outfile;
+}
+
+sub or51211 {
+ my $fwfile = "dvb-fe-or51211.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "d830949c771a289505bf9eafc225d491";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub cx231xx {
+ my $fwfile = "v4l-cx231xx-avcore-01.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "7d3bb956dc9df0eafded2b56ba57cc42";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub cx18 {
+ my $url = "http://linuxtv.org/downloads/firmware/";
+
+ my %files = (
+ 'v4l-cx23418-apu.fw' => '588f081b562f5c653a3db1ad8f65939a',
+ 'v4l-cx23418-cpu.fw' => 'b6c7ed64bc44b1a6e0840adaeac39d79',
+ 'v4l-cx23418-dig.fw' => '95bc688d3e7599fd5800161e9971cc55',
+ );
+
+ checkstandard();
+
+ my $allfiles;
+ foreach my $fwfile (keys %files) {
+ wgetfile($fwfile, "$url/$fwfile");
+ verify($fwfile, $files{$fwfile});
+ $allfiles .= " $fwfile";
+ }
+
+ $allfiles =~ s/^\s//;
+
+ $allfiles;
+}
+
+sub mpc718 {
+ my $archive = 'Yuan MPC718 TV Tuner Card 2.13.10.1016.zip';
+ my $url = "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/$archive";
+ my $fwfile = "dvb-cx18-mpc718-mt352.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+ wgetfile($archive, $url);
+ unzip($archive, $tmpdir);
+
+ my $sourcefile = "$tmpdir/Yuan MPC718 TV Tuner Card 2.13.10.1016/mpc718_32bit/yuanrap.sys";
+ my $found = 0;
+
+ open IN, '<', $sourcefile or die "Couldn't open $sourcefile to extract $fwfile data\n";
+ binmode IN;
+ open OUT, '>', $fwfile;
+ binmode OUT;
+ {
+ # Block scope because we change the line terminator variable $/
+ my $prevlen = 0;
+ my $currlen;
+
+ # Buried in the data segment are 3 runs of almost identical
+ # register-value pairs that end in 0x5d 0x01 which is a "TUNER GO"
+ # command for the MT352.
+ # Pull out the middle run (because it's easy) of register-value
+ # pairs to make the "firmware" file.
+
+ local $/ = "\x5d\x01"; # MT352 "TUNER GO"
+
+ while (<IN>) {
+ $currlen = length($_);
+ if ($prevlen == $currlen && $currlen <= 64) {
+ chop; chop; # Get rid of "TUNER GO"
+ s/^\0\0//; # get rid of leading 00 00 if it's there
+ printf OUT "$_";
+ $found = 1;
+ last;
+ }
+ $prevlen = $currlen;
+ }
+ }
+ close OUT;
+ close IN;
+ if (!$found) {
+ unlink $fwfile;
+ die "Couldn't find valid register-value sequence in $sourcefile for $fwfile\n";
+ }
+ $fwfile;
+}
+
+sub cx23885 {
+ my $url = "http://linuxtv.org/downloads/firmware/";
+
+ my %files = (
+ 'v4l-cx23885-avcore-01.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb',
+ 'v4l-cx23885-enc.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb',
+ );
+
+ checkstandard();
+
+ my $allfiles;
+ foreach my $fwfile (keys %files) {
+ wgetfile($fwfile, "$url/$fwfile");
+ verify($fwfile, $files{$fwfile});
+ $allfiles .= " $fwfile";
+ }
+
+ $allfiles =~ s/^\s//;
+
+ $allfiles;
+}
+
+sub pvrusb2 {
+ my $url = "http://linuxtv.org/downloads/firmware/";
+
+ my %files = (
+ 'v4l-cx25840.fw' => 'dadb79e9904fc8af96e8111d9cb59320',
+ );
+
+ checkstandard();
+
+ my $allfiles;
+ foreach my $fwfile (keys %files) {
+ wgetfile($fwfile, "$url/$fwfile");
+ verify($fwfile, $files{$fwfile});
+ $allfiles .= " $fwfile";
+ }
+
+ $allfiles =~ s/^\s//;
+
+ $allfiles;
+}
+
+sub or51132_qam {
+ my $fwfile = "dvb-fe-or51132-qam.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "7702e8938612de46ccadfe9b413cb3b5";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub or51132_vsb {
+ my $fwfile = "dvb-fe-or51132-vsb.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "c16208e02f36fc439a557ad4c613364a";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub bluebird {
+ my $url = "http://www.linuxtv.org/download/dvb/firmware/dvb-usb-bluebird-01.fw";
+ my $outfile = "dvb-usb-bluebird-01.fw";
+ my $hash = "658397cb9eba9101af9031302671f49d";
+
+ checkstandard();
+
+ wgetfile($outfile, $url);
+ verify($outfile,$hash);
+
+ $outfile;
+}
+
+# ---------------------------------------------------------------
+# Utilities
+
+sub checkstandard {
+ if (system("which unzip > /dev/null 2>&1")) {
+ die "This firmware requires the unzip command - see ftp://ftp.info-zip.org/pub/infozip/UnZip.html\n";
+ }
+ if (system("which md5sum > /dev/null 2>&1")) {
+ die "This firmware requires the md5sum command - see http://www.gnu.org/software/coreutils/\n";
+ }
+ if (system("which wget > /dev/null 2>&1")) {
+ die "This firmware requires the wget command - see http://wget.sunsite.dk/\n";
+ }
+}
+
+sub checkunshield {
+ if (system("which unshield > /dev/null 2>&1")) {
+ die "This firmware requires the unshield command - see http://sourceforge.net/projects/synce/\n";
+ }
+}
+
+sub wgetfile {
+ my ($sourcefile, $url) = @_;
+
+ if (! -f $sourcefile) {
+ system("wget -O \"$sourcefile\" \"$url\"") and die "wget failed - unable to download firmware";
+ }
+}
+
+sub unzip {
+ my ($sourcefile, $todir) = @_;
+
+ $status = system("unzip -q -o -d \"$todir\" \"$sourcefile\" 2>/dev/null" );
+ if ((($status >> 8) > 2) || (($status & 0xff) != 0)) {
+ die ("unzip failed - unable to extract firmware");
+ }
+}
+
+sub unshield {
+ my ($sourcefile, $todir) = @_;
+
+ system("unshield x -d \"$todir\" \"$sourcefile\" > /dev/null" ) and die ("unshield failed - unable to extract firmware");
+}
+
+sub verify {
+ my ($filename, $hash) = @_;
+ my ($testhash);
+
+ open(CMD, "md5sum \"$filename\"|");
+ $testhash = <CMD>;
+ $testhash =~ /([a-zA-Z0-9]*)/;
+ $testhash = $1;
+ close CMD;
+ die "Hash of extracted file does not match!\n" if ($testhash ne $hash);
+}
+
+sub copy {
+ my ($from, $to) = @_;
+
+ system("cp -f \"$from\" \"$to\"") and die ("cp failed");
+}
+
+sub extract {
+ my ($infile, $offset, $length, $outfile) = @_;
+ my ($chunklength, $buf, $rcount);
+
+ open INFILE, "<$infile";
+ open OUTFILE, ">$outfile";
+ sysseek(INFILE, $offset, SEEK_SET);
+ while($length > 0) {
+ # Calc chunk size
+ $chunklength = 2048;
+ $chunklength = $length if ($chunklength > $length);
+
+ $rcount = sysread(INFILE, $buf, $chunklength);
+ die "Ran out of data\n" if ($rcount != $chunklength);
+ syswrite(OUTFILE, $buf);
+ $length -= $rcount;
+ }
+ close INFILE;
+ close OUTFILE;
+}
+
+sub appendfile {
+ my ($FH, $infile) = @_;
+ my ($buf);
+
+ open INFILE, "<$infile";
+ while(1) {
+ $rcount = sysread(INFILE, $buf, 2048);
+ last if ($rcount == 0);
+ print $FH $buf;
+ }
+ close(INFILE);
+}
+
+sub delzero{
+ my ($infile,$outfile) =@_;
+
+ open INFILE,"<$infile";
+ open OUTFILE,">$outfile";
+ while (1){
+ $rcount=sysread(INFILE,$buf,22);
+ $len=ord(substr($buf,0,1));
+ print OUTFILE substr($buf,0,1);
+ print OUTFILE substr($buf,2,$len+3);
+ last if ($rcount<1);
+ printf OUTFILE "%c",0;
+#print $len." ".length($buf)."\n";
+
+ }
+ close(INFILE);
+ close(OUTFILE);
+}
+
+sub syntax() {
+ print STDERR "syntax: get_dvb_firmware <component>\n";
+ print STDERR "Supported components:\n";
+ for($i=0; $i < scalar(@components); $i++) {
+ print STDERR "\t" . $components[$i] . "\n";
+ }
+ exit(1);
+}
diff --git a/media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.09.19 b/media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.09.19
new file mode 100644
index 00000000000..dcb86d5d455
--- /dev/null
+++ b/media-tv/linuxtv-dvb-firmware/files/get_dvb_firmware-2009.09.19
@@ -0,0 +1,674 @@
+#!/usr/bin/perl
+# DVB firmware extractor
+#
+# (c) 2004 Andrew de Quincey
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+use File::Temp qw/ tempdir /;
+use IO::Handle;
+
+@components = ( "sp8870", "sp887x", "tda10045", "tda10046",
+ "tda10046lifeview", "av7110", "dec2000t", "dec2540t",
+ "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
+ "or51211", "or51132_qam", "or51132_vsb", "bluebird",
+ "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
+ "af9015");
+
+# Check args
+syntax() if (scalar(@ARGV) != 1);
+$cid = $ARGV[0];
+
+# Do it!
+for ($i=0; $i < scalar(@components); $i++) {
+ if ($cid eq $components[$i]) {
+ $outfile = eval($cid);
+ die $@ if $@;
+ print STDERR <<EOF;
+Firmware(s) $outfile extracted successfully.
+Now copy it(they) to either /usr/lib/hotplug/firmware or /lib/firmware
+(depending on configuration of firmware hotplug).
+EOF
+ exit(0);
+ }
+}
+
+# If we get here, it wasn't found
+print STDERR "Unknown component \"$cid\"\n";
+syntax();
+
+
+
+
+# ---------------------------------------------------------------
+# Firmware-specific extraction subroutines
+
+sub sp8870 {
+ my $sourcefile = "tt_Premium_217g.zip";
+ my $url = "http://2.download.softwarepatch.pl/1619edb0dcb493dd5337b94a1f79c3f6/$sourcefile";
+ my $hash = "53970ec17a538945a6d8cb608a7b3899";
+ my $outfile = "dvb-fe-sp8870.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash);
+ copy("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $outfile);
+
+ $outfile;
+}
+
+sub sp887x {
+ my $sourcefile = "Dvbt1.3.57.6.zip";
+ my $url = "http://www.avermedia.com/software/$sourcefile";
+ my $cabfile = "DVBT Net Ver1.3.57.6/disk1/data1.cab";
+ my $hash = "237938d53a7f834c05c42b894ca68ac3";
+ my $outfile = "dvb-fe-sp887x.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+ checkunshield();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ unshield("$tmpdir/$cabfile", $tmpdir);
+ verify("$tmpdir/ZEnglish/sc_main.mc", $hash);
+ copy("$tmpdir/ZEnglish/sc_main.mc", $outfile);
+
+ $outfile;
+}
+
+sub tda10045 {
+ my $sourcefile = "tt_budget_217g.zip";
+ my $url = "http://www.technotrend.de/new/217g/$sourcefile";
+ my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a";
+ my $outfile = "dvb-fe-tda10045.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/software/OEM/PCI/App/ttlcdacc.dll", 0x37ef9, 30555, "$tmpdir/fwtmp");
+ verify("$tmpdir/fwtmp", $hash);
+ copy("$tmpdir/fwtmp", $outfile);
+
+ $outfile;
+}
+
+sub tda10046 {
+ my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip";
+ my $url = "http://www.tt-download.com/download/updates/219/$sourcefile";
+ my $hash = "6a7e1e2f2644b162ff0502367553c72d";
+ my $outfile = "dvb-fe-tda10046.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/TT_PCI_2.19h_28_11_2006/software/OEM/PCI/App/ttlcdacc.dll", 0x65389, 24478, "$tmpdir/fwtmp");
+ verify("$tmpdir/fwtmp", $hash);
+ copy("$tmpdir/fwtmp", $outfile);
+
+ $outfile;
+}
+
+sub tda10046lifeview {
+ my $sourcefile = "7%5Cdrv_2.11.02.zip";
+ my $url = "http://www.lifeview.hk/dbimages/document/$sourcefile";
+ my $hash = "1ea24dee4eea8fe971686981f34fd2e0";
+ my $outfile = "dvb-fe-tda10046.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/LVHybrid.sys", 0x8b088, 24602, "$tmpdir/fwtmp");
+ verify("$tmpdir/fwtmp", $hash);
+ copy("$tmpdir/fwtmp", $outfile);
+
+ $outfile;
+}
+
+sub av7110 {
+ my $sourcefile = "dvb-ttpci-01.fw-261d";
+ my $url = "http://www.linuxtv.org/downloads/firmware/$sourcefile";
+ my $hash = "603431b6259715a8e88f376a53b64e2f";
+ my $outfile = "dvb-ttpci-01.fw";
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ verify($sourcefile, $hash);
+ copy($sourcefile, $outfile);
+
+ $outfile;
+}
+
+sub dec2000t {
+ my $sourcefile = "dec217g.exe";
+ my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
+ my $hash = "bd86f458cee4a8f0a8ce2d20c66215a9";
+ my $outfile = "dvb-ttusb-dec-2000t.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $hash);
+ copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $outfile);
+
+ $outfile;
+}
+
+sub dec2540t {
+ my $sourcefile = "dec217g.exe";
+ my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
+ my $hash = "53e58f4f5b5c2930beee74a7681fed92";
+ my $outfile = "dvb-ttusb-dec-2540t.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $hash);
+ copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $outfile);
+
+ $outfile;
+}
+
+sub dec3000s {
+ my $sourcefile = "dec217g.exe";
+ my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
+ my $hash = "b013ececea83f4d6d8d2a29ac7c1b448";
+ my $outfile = "dvb-ttusb-dec-3000s.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $hash);
+ copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $outfile);
+
+ $outfile;
+}
+sub opera1{
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0);
+
+ checkstandard();
+ my $fwfile1="dvb-usb-opera1-fpga-01.fw";
+ my $fwfile2="dvb-usb-opera-01.fw";
+ extract("2830SCap2.sys", 0x62e8, 55024, "$tmpdir/opera1-fpga.fw");
+ extract("2830SLoad2.sys",0x3178,0x3685-0x3178,"$tmpdir/fw1part1");
+ extract("2830SLoad2.sys",0x0980,0x3150-0x0980,"$tmpdir/fw1part2");
+ delzero("$tmpdir/fw1part1","$tmpdir/fw1part1-1");
+ delzero("$tmpdir/fw1part2","$tmpdir/fw1part2-1");
+ verify("$tmpdir/fw1part1-1","5e0909858fdf0b5b09ad48b9fe622e70");
+ verify("$tmpdir/fw1part2-1","d6e146f321427e931df2c6fcadac37a1");
+ verify("$tmpdir/opera1-fpga.fw","0f8133f5e9051f5f3c1928f7e5a1b07d");
+
+ my $RES1="\x01\x92\x7f\x00\x01\x00";
+ my $RES0="\x01\x92\x7f\x00\x00\x00";
+ my $DAT1="\x01\x00\xe6\x00\x01\x00";
+ my $DAT0="\x01\x00\xe6\x00\x00\x00";
+ open FW,">$tmpdir/opera.fw";
+ print FW "$RES1";
+ print FW "$DAT1";
+ print FW "$RES1";
+ print FW "$DAT1";
+ appendfile(FW,"$tmpdir/fw1part1-1");
+ print FW "$RES0";
+ print FW "$DAT0";
+ print FW "$RES1";
+ print FW "$DAT1";
+ appendfile(FW,"$tmpdir/fw1part2-1");
+ print FW "$RES1";
+ print FW "$DAT1";
+ print FW "$RES0";
+ print FW "$DAT0";
+ copy ("$tmpdir/opera1-fpga.fw",$fwfile1);
+ copy ("$tmpdir/opera.fw",$fwfile2);
+
+ $fwfile1.",".$fwfile2;
+}
+
+sub vp7041 {
+ my $sourcefile = "TwinhanDTV2.608a.zip";
+ my $url = "http://www.twinhan.com/files/AW/Software/$sourcefile";
+ my $hash = "e88c9372d1f66609a3e7b072c53fbcfe";
+ my $outfile = "dvb-vp7041-2.422.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ extract("$tmpdir/TwinhanDTV2.608a/Drivers/7041/WinXP/UDTTload.sys", 12503, 3036, "$tmpdir/fwtmp1");
+ extract("$tmpdir/TwinhanDTV2.608a/Drivers/7041/WinXP/UDTTload.sys", 2207, 10274, "$tmpdir/fwtmp2");
+
+ my $CMD = "\000\001\000\222\177\000";
+ my $PAD = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000";
+ my ($FW);
+ open $FW, ">$tmpdir/fwtmp3";
+ print $FW "$CMD\001$PAD";
+ print $FW "$CMD\001$PAD";
+ appendfile($FW, "$tmpdir/fwtmp1");
+ print $FW "$CMD\000$PAD";
+ print $FW "$CMD\001$PAD";
+ appendfile($FW, "$tmpdir/fwtmp2");
+ print $FW "$CMD\001$PAD";
+ print $FW "$CMD\000$PAD";
+ close($FW);
+
+ verify("$tmpdir/fwtmp3", $hash);
+ copy("$tmpdir/fwtmp3", $outfile);
+
+ $outfile;
+}
+
+sub dibusb {
+ my $url = "http://www.linuxtv.org/downloads/firmware/dvb-usb-dibusb-5.0.0.11.fw";
+ my $outfile = "dvb-dibusb-5.0.0.11.fw";
+ my $hash = "fa490295a527360ca16dcdf3224ca243";
+
+ checkstandard();
+
+ wgetfile($outfile, $url);
+ verify($outfile,$hash);
+
+ $outfile;
+}
+
+sub nxt2002 {
+ my $sourcefile = "Technisat_DVB-PC_4_4_COMPACT.zip";
+ my $url = "http://www.bbti.us/download/windows/$sourcefile";
+ my $hash = "476befae8c7c1bb9648954060b1eec1f";
+ my $outfile = "dvb-fe-nxt2002.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/SkyNET.sys", $hash);
+ extract("$tmpdir/SkyNET.sys", 331624, 5908, $outfile);
+
+ $outfile;
+}
+
+sub nxt2004 {
+ my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip";
+ my $url = "http://www.avermedia-usa.com/support/Drivers/$sourcefile";
+ my $hash = "111cb885b1e009188346d72acfed024c";
+ my $outfile = "dvb-fe-nxt2004.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/3xHybrid.sys", $hash);
+ extract("$tmpdir/3xHybrid.sys", 465304, 9584, $outfile);
+
+ $outfile;
+}
+
+sub or51211 {
+ my $fwfile = "dvb-fe-or51211.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "d830949c771a289505bf9eafc225d491";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub cx231xx {
+ my $fwfile = "v4l-cx231xx-avcore-01.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "7d3bb956dc9df0eafded2b56ba57cc42";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub cx18 {
+ my $url = "http://linuxtv.org/downloads/firmware/";
+
+ my %files = (
+ 'v4l-cx23418-apu.fw' => '588f081b562f5c653a3db1ad8f65939a',
+ 'v4l-cx23418-cpu.fw' => 'b6c7ed64bc44b1a6e0840adaeac39d79',
+ 'v4l-cx23418-dig.fw' => '95bc688d3e7599fd5800161e9971cc55',
+ );
+
+ checkstandard();
+
+ my $allfiles;
+ foreach my $fwfile (keys %files) {
+ wgetfile($fwfile, "$url/$fwfile");
+ verify($fwfile, $files{$fwfile});
+ $allfiles .= " $fwfile";
+ }
+
+ $allfiles =~ s/^\s//;
+
+ $allfiles;
+}
+
+sub mpc718 {
+ my $archive = 'Yuan MPC718 TV Tuner Card 2.13.10.1016.zip';
+ my $url = "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/$archive";
+ my $fwfile = "dvb-cx18-mpc718-mt352.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+ checkstandard();
+ wgetfile($archive, $url);
+ unzip($archive, $tmpdir);
+
+ my $sourcefile = "$tmpdir/Yuan MPC718 TV Tuner Card 2.13.10.1016/mpc718_32bit/yuanrap.sys";
+ my $found = 0;
+
+ open IN, '<', $sourcefile or die "Couldn't open $sourcefile to extract $fwfile data\n";
+ binmode IN;
+ open OUT, '>', $fwfile;
+ binmode OUT;
+ {
+ # Block scope because we change the line terminator variable $/
+ my $prevlen = 0;
+ my $currlen;
+
+ # Buried in the data segment are 3 runs of almost identical
+ # register-value pairs that end in 0x5d 0x01 which is a "TUNER GO"
+ # command for the MT352.
+ # Pull out the middle run (because it's easy) of register-value
+ # pairs to make the "firmware" file.
+
+ local $/ = "\x5d\x01"; # MT352 "TUNER GO"
+
+ while (<IN>) {
+ $currlen = length($_);
+ if ($prevlen == $currlen && $currlen <= 64) {
+ chop; chop; # Get rid of "TUNER GO"
+ s/^\0\0//; # get rid of leading 00 00 if it's there
+ printf OUT "$_";
+ $found = 1;
+ last;
+ }
+ $prevlen = $currlen;
+ }
+ }
+ close OUT;
+ close IN;
+ if (!$found) {
+ unlink $fwfile;
+ die "Couldn't find valid register-value sequence in $sourcefile for $fwfile\n";
+ }
+ $fwfile;
+}
+
+sub cx23885 {
+ my $url = "http://linuxtv.org/downloads/firmware/";
+
+ my %files = (
+ 'v4l-cx23885-avcore-01.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb',
+ 'v4l-cx23885-enc.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb',
+ );
+
+ checkstandard();
+
+ my $allfiles;
+ foreach my $fwfile (keys %files) {
+ wgetfile($fwfile, "$url/$fwfile");
+ verify($fwfile, $files{$fwfile});
+ $allfiles .= " $fwfile";
+ }
+
+ $allfiles =~ s/^\s//;
+
+ $allfiles;
+}
+
+sub pvrusb2 {
+ my $url = "http://linuxtv.org/downloads/firmware/";
+
+ my %files = (
+ 'v4l-cx25840.fw' => 'dadb79e9904fc8af96e8111d9cb59320',
+ );
+
+ checkstandard();
+
+ my $allfiles;
+ foreach my $fwfile (keys %files) {
+ wgetfile($fwfile, "$url/$fwfile");
+ verify($fwfile, $files{$fwfile});
+ $allfiles .= " $fwfile";
+ }
+
+ $allfiles =~ s/^\s//;
+
+ $allfiles;
+}
+
+sub or51132_qam {
+ my $fwfile = "dvb-fe-or51132-qam.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "7702e8938612de46ccadfe9b413cb3b5";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub or51132_vsb {
+ my $fwfile = "dvb-fe-or51132-vsb.fw";
+ my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
+ my $hash = "c16208e02f36fc439a557ad4c613364a";
+
+ checkstandard();
+
+ wgetfile($fwfile, $url);
+ verify($fwfile, $hash);
+
+ $fwfile;
+}
+
+sub bluebird {
+ my $url = "http://www.linuxtv.org/download/dvb/firmware/dvb-usb-bluebird-01.fw";
+ my $outfile = "dvb-usb-bluebird-01.fw";
+ my $hash = "658397cb9eba9101af9031302671f49d";
+
+ checkstandard();
+
+ wgetfile($outfile, $url);
+ verify($outfile,$hash);
+
+ $outfile;
+}
+
+sub af9015 {
+ my $sourcefile = "download.ashx?file=57";
+ my $url = "http://www.ite.com.tw/EN/Services/$sourcefile";
+ my $hash = "ff5b096ed47c080870eacdab2de33ad6";
+ my $outfile = "dvb-usb-af9015.fw";
+ my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+ my $fwoffset = 0x22708;
+ my $fwlength = 18225;
+ my ($chunklength, $buf, $rcount);
+
+ checkstandard();
+
+ wgetfile($sourcefile, $url);
+ unzip($sourcefile, $tmpdir);
+ verify("$tmpdir/Driver/Files/AF15BDA.sys", $hash);
+
+ open INFILE, '<', "$tmpdir/Driver/Files/AF15BDA.sys";
+ open OUTFILE, '>', $outfile;
+
+ sysseek(INFILE, $fwoffset, SEEK_SET);
+ while($fwlength > 0) {
+ $chunklength = 55;
+ $chunklength = $fwlength if ($chunklength > $fwlength);
+ $rcount = sysread(INFILE, $buf, $chunklength);
+ die "Ran out of data\n" if ($rcount != $chunklength);
+ syswrite(OUTFILE, $buf);
+ sysread(INFILE, $buf, 8);
+ $fwlength -= $rcount + 8;
+ }
+
+ close OUTFILE;
+ close INFILE;
+}
+
+# ---------------------------------------------------------------
+# Utilities
+
+sub checkstandard {
+ if (system("which unzip > /dev/null 2>&1")) {
+ die "This firmware requires the unzip command - see ftp://ftp.info-zip.org/pub/infozip/UnZip.html\n";
+ }
+ if (system("which md5sum > /dev/null 2>&1")) {
+ die "This firmware requires the md5sum command - see http://www.gnu.org/software/coreutils/\n";
+ }
+ if (system("which wget > /dev/null 2>&1")) {
+ die "This firmware requires the wget command - see http://wget.sunsite.dk/\n";
+ }
+}
+
+sub checkunshield {
+ if (system("which unshield > /dev/null 2>&1")) {
+ die "This firmware requires the unshield command - see http://sourceforge.net/projects/synce/\n";
+ }
+}
+
+sub wgetfile {
+ my ($sourcefile, $url) = @_;
+
+ if (! -f $sourcefile) {
+ system("wget -O \"$sourcefile\" \"$url\"") and die "wget failed - unable to download firmware";
+ }
+}
+
+sub unzip {
+ my ($sourcefile, $todir) = @_;
+
+ $status = system("unzip -q -o -d \"$todir\" \"$sourcefile\" 2>/dev/null" );
+ if ((($status >> 8) > 2) || (($status & 0xff) != 0)) {
+ die ("unzip failed - unable to extract firmware");
+ }
+}
+
+sub unshield {
+ my ($sourcefile, $todir) = @_;
+
+ system("unshield x -d \"$todir\" \"$sourcefile\" > /dev/null" ) and die ("unshield failed - unable to extract firmware");
+}
+
+sub verify {
+ my ($filename, $hash) = @_;
+ my ($testhash);
+
+ open(CMD, "md5sum \"$filename\"|");
+ $testhash = <CMD>;
+ $testhash =~ /([a-zA-Z0-9]*)/;
+ $testhash = $1;
+ close CMD;
+ die "Hash of extracted file does not match!\n" if ($testhash ne $hash);
+}
+
+sub copy {
+ my ($from, $to) = @_;
+
+ system("cp -f \"$from\" \"$to\"") and die ("cp failed");
+}
+
+sub extract {
+ my ($infile, $offset, $length, $outfile) = @_;
+ my ($chunklength, $buf, $rcount);
+
+ open INFILE, "<$infile";
+ open OUTFILE, ">$outfile";
+ sysseek(INFILE, $offset, SEEK_SET);
+ while($length > 0) {
+ # Calc chunk size
+ $chunklength = 2048;
+ $chunklength = $length if ($chunklength > $length);
+
+ $rcount = sysread(INFILE, $buf, $chunklength);
+ die "Ran out of data\n" if ($rcount != $chunklength);
+ syswrite(OUTFILE, $buf);
+ $length -= $rcount;
+ }
+ close INFILE;
+ close OUTFILE;
+}
+
+sub appendfile {
+ my ($FH, $infile) = @_;
+ my ($buf);
+
+ open INFILE, "<$infile";
+ while(1) {
+ $rcount = sysread(INFILE, $buf, 2048);
+ last if ($rcount == 0);
+ print $FH $buf;
+ }
+ close(INFILE);
+}
+
+sub delzero{
+ my ($infile,$outfile) =@_;
+
+ open INFILE,"<$infile";
+ open OUTFILE,">$outfile";
+ while (1){
+ $rcount=sysread(INFILE,$buf,22);
+ $len=ord(substr($buf,0,1));
+ print OUTFILE substr($buf,0,1);
+ print OUTFILE substr($buf,2,$len+3);
+ last if ($rcount<1);
+ printf OUTFILE "%c",0;
+#print $len." ".length($buf)."\n";
+
+ }
+ close(INFILE);
+ close(OUTFILE);
+}
+
+sub syntax() {
+ print STDERR "syntax: get_dvb_firmware <component>\n";
+ print STDERR "Supported components:\n";
+ for($i=0; $i < scalar(@components); $i++) {
+ print STDERR "\t" . $components[$i] . "\n";
+ }
+ exit(1);
+}
diff --git a/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild b/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild
new file mode 100644
index 00000000000..06fc5cd6d06
--- /dev/null
+++ b/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild
@@ -0,0 +1,343 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Firmware files needed for operation of some dvb-devices"
+HOMEPAGE="http://www.linuxtv.org"
+
+LICENSE="freedist ISC all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}"
+
+# Files which can be fetched from linuxtv.org
+PACKET_NAME=dvb-firmwares-1.tar.bz2
+PACKET_SRC_URI="http://www.linuxtv.org/downloads/firmware/${PACKET_NAME}"
+get_dvb_firmware="${FILESDIR}/get_dvb_firmware-${PV}"
+# from http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=history;f=Documentation/dvb/get_dvb_firmware
+
+FW_USE_FLAGS=(
+# packet
+ "usb-a800"
+ "dibusb-usb2"
+ "usb-dtt200u"
+ "usb-umt"
+ "usb-vp702x"
+ "usb-vp7045"
+ "usb-wt220u"
+ "dibusb-usb1"
+ "or51211"
+ "or51132"
+ "or51132"
+# own URL
+ "ttpci"
+ "bcm3510"
+ "usb-wt220u"
+ "usb-wt220u"
+ "usb-dib0700"
+ "usb-af9015"
+ "sp887x"
+ "af9005"
+ "cx231xx"
+ "cx18"
+ "cx18"
+ "cx18"
+ "cx23885"
+ "cx23885"
+ "pvrusb2"
+ "usb-bluebird"
+ "tda10045"
+# get_dvb_firmware
+ "sp8870"
+ "tda10046"
+ "tda10046lifeview"
+ "ttusb-dec"
+ "ttusb-dec"
+ "ttusb-dec"
+ "opera1"
+ "opera1"
+ "vp7041"
+ "nxt200x"
+ "mpc718"
+)
+
+FW_FILES=(
+# packet
+ "dvb-usb-avertv-a800-02.fw"
+ "dvb-usb-dibusb-6.0.0.8.fw"
+ "dvb-usb-dtt200u-01.fw"
+ "dvb-usb-umt-010-02.fw"
+ "dvb-usb-vp702x-01.fw"
+ "dvb-usb-vp7045-01.fw"
+ "dvb-usb-wt220u-01.fw"
+ "dvb-usb-dibusb-5.0.0.11.fw"
+ "dvb-fe-or51211.fw"
+ "dvb-fe-or51132-qam.fw"
+ "dvb-fe-or51132-vsb.fw"
+# own URL
+ "dvb-ttpci-01.fw"
+ "dvb-fe-bcm3510-01.fw"
+ "dvb-usb-wt220u-02.fw"
+ "dvb-usb-wt220u-fc03.fw"
+ "dvb-usb-dib0700-1.20.fw"
+ "dvb-usb-af9015.fw"
+ "dvb-fe-sp887x.fw"
+ "af9005.fw"
+ "v4l-cx231xx-avcore-01.fw"
+ "v4l-cx23418-apu.fw"
+ "v4l-cx23418-cpu.fw"
+ "v4l-cx23418-dig.fw"
+ "v4l-cx23885-avcore-01.fw"
+ "v4l-cx23885-enc.fw"
+ "v4l-cx25840.fw"
+ "dvb-usb-bluebird-01.fw"
+ "dvb-fe-tda10045.fw"
+# get_dvb_firmware
+ "dvb-fe-sp8870.fw"
+ "dvb-fe-tda10046.fw"
+ "dvb-fe-tda10046.fw"
+ "dvb-ttusb-dec-2000t.fw"
+ "dvb-ttusb-dec-2540t.fw"
+ "dvb-ttusb-dec-3000s.fw"
+ "dvb-usb-opera1-fpga-01.fw"
+ "dvb-usb-opera-01.fw"
+ "dvb-vp7041-2.422.fw"
+ "dvb-fe-nxt2004.fw"
+ "dvb-cx18-mpc718-mt352.fw"
+)
+
+FW_GET_PARAMETER=(
+# packet
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+# own URL
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+# get_dvb_firmware
+ "sp8870"
+ "tda10046"
+ "tda10046lifeview"
+ "dec2000t"
+ "dec2540t"
+ "dec3000s"
+ "opera1"
+ "-"
+ "vp7041"
+ "nxt2004"
+ "mpc718"
+)
+
+FW_URLS=(
+# packet
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+# own URL
+ "http://www.escape-edv.de/endriss/firmware/dvb-ttpci-01.fw-fc2624"
+ "http://www.linuxtv.org/downloads/firmware/dvb-fe-bcm3510-01.fw"
+ "http://www.linuxtv.org/downloads/firmware/dvb-usb-wt220u-02.fw"
+ "http://home.arcor.de/efocht/dvb-usb-wt220u-fc03.fw"
+ "http://www.wi-bw.tfh-wildau.de/~pboettch/home/files/dvb-usb-dib0700-1.20.fw"
+ "http://www.otit.fi/~crope/v4l-dvb/af9015/af9015_firmware_cutter/firmware_files/4.95.0/dvb-usb-af9015.fw"
+ "http://peterdamen.com/dvb-fe-sp887x.fw"
+ "http://ventoso.org/luca/af9005/af9005.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx231xx-avcore-01.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23418-cpu.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23885-avcore-01.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23885-enc.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx25840.fw"
+ "http://linuxtv.org/downloads/firmware/dvb-usb-bluebird-01.fw"
+ "http://www.fireburn.co.uk/dvb-fe-tda10045.fw"
+# get_dvb_firmware
+ "http://2.download.softwarepatch.pl/1619edb0dcb493dd5337b94a1f79c3f6/tt_Premium_217g.zip"
+ "http://www.tt-download.com/download/updates/219/TT_PCI_2.19h_28_11_2006.zip"
+ "http://www.lifeview.hk/dbimages/document/7%5Cdrv_2.11.02.zip"
+ "http://hauppauge.lightpath.net/de/dec217g.exe"
+ "http://hauppauge.lightpath.net/de/dec217g.exe"
+ "http://hauppauge.lightpath.net/de/dec217g.exe"
+ "http://www.informatik.uni-leipzig.de/~hlawit/dvb/2830SCap2.sys"
+ "http://www.informatik.uni-leipzig.de/~hlawit/dvb/2830SLoad2.sys"
+ "http://www.twinhan.com/files/AW/Software/TwinhanDTV2.608a.zip"
+ "http://www.avermedia-usa.com/support/Drivers/AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip"
+ "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip"
+)
+
+SRC_URI=""
+NEGATIVE_USE_FLAGS=""
+NEGATIVE_END_BRACKETS=""
+ALL_URLS=""
+
+for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
+ URL="${FW_URLS[CARD]}"
+
+ if [[ -z ${URL} ]]; then
+ echo "missing url for ${FW_USE_FLAGS[CARD]}"
+ continue
+ fi
+ SRC_URI="${SRC_URI} dvb_cards_${FW_USE_FLAGS[CARD]}? ( ${URL} )"
+
+ IUSE="${IUSE} dvb_cards_${FW_USE_FLAGS[CARD]}"
+ NEGATIVE_USE_FLAGS="${NEGATIVE_USE_FLAGS} !dvb_cards_${FW_USE_FLAGS[CARD]}? ( "
+ NEGATIVE_END_BRACKETS="${NEGATIVE_END_BRACKETS} )"
+ ALL_URLS="${ALL_URLS} ${URL}"
+
+ GET_PARAM="${FW_GET_PARAMETER[CARD]}"
+ if [[ ${GET_PARAM} != "-" ]]; then
+ # all firmwares extracted by get_dvb_firmware need unzip
+ DEPEND="${DEPEND} dvb_cards_${FW_USE_FLAGS[CARD]}? ( app-arch/unzip )"
+ fi
+done
+
+SRC_URI="${SRC_URI} ${NEGATIVE_USE_FLAGS} ${ALL_URLS} ${NEGATIVE_END_BRACKETS}"
+
+DEPEND="${DEPEND}
+ ${NEGATIVE_USE_FLAGS}
+ app-arch/unzip
+ ${NEGATIVE_END_BRACKETS}"
+
+install_dvb_card() {
+ if [[ -z ${DVB_CARDS} ]]; then
+ # install (almost) all firmware files
+ # do not install this one due to conflicting filenames
+ [[ "${1}" != "tda10046lifeview" ]]
+ else
+ # Check if this flag is set
+ use dvb_cards_${1}
+ fi
+}
+
+pkg_setup() {
+ #echo SRC_URI=${SRC_URI}
+ #echo DEPEND=${DEPEND}
+ if has tda1004x ${DVB_CARDS}; then
+ eerror
+ eerror "DVB_CARDS flag tda1004x has been split into"
+ eerror "tda10045, tda10046 and tda10046lifeview".
+ eerror
+ eerror "But beware that you cannot enable tda10046 and"
+ eerror "tda10046lifeview at the same time."
+ fi
+
+ if [[ -z ${DVB_CARDS} ]]; then
+ elog
+ elog "DVB_CARDS is not set, installing all available firmware files."
+ elog "To save bandwidth please consider setting the DVB_CARDS variable"
+ elog "in ${ROOT%/}/etc/make.conf. This way only the firmwares you own"
+ elog "the hardware will be installed."
+ fi
+ # according to http://devmanual.gentoo.org/general-concepts/use-flags/index.html
+ # we should not die here. However, there is no sensible fallback choice to make
+ # because the user may have either the one or the other. WYGIWYG
+ if use dvb_cards_tda10046 && use dvb_cards_tda10046lifeview; then
+ eerror
+ eerror "You cannot have both tda10046 and tda10046lifeview in DVB_CARDS"
+ eerror "because of colliding firmware filenames (dvb-fe-tda10046.fw)."
+ eerror "Sorry."
+ die "Conflicting values for DVB_CARDS set."
+ fi
+ elog
+ elog "List of possible card-names to use for DVB_CARDS:"
+ echo ${FW_USE_FLAGS[*]}| tr ' ' '\n' | sort | uniq | fmt \
+ | while read line; do
+ elog " ${line}"
+ done
+ elog
+ elog "If you need another firmware file and want it included create a bug"
+ elog "at bugs.gentoo.org."
+ elog "In case some firmware sources are not fetchable please try again at"
+ elog "a later time and if it still does not fetch report a bug. If there"
+ elog "is no alternative source or an update to the firmware available we"
+ elog "have to remove it from the ebuild and you are on your own."
+}
+
+src_unpack() {
+ local distfile
+
+ # link all downloaded files to ${S}
+ for distfile in ${A}; do
+ [[ -L ${distfile} ]] || ln -s ${DISTDIR}/${distfile} ${distfile}
+ done
+
+ # unpack firmware-packet
+ if has ${PACKET_NAME} ${A}; then
+ unpack ${PACKET_NAME}
+ fi
+
+ if [[ -z ${DVB_CARDS} ]] || use dvb_cards_mpc718 ; then
+ mv Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip "Yuan MPC718 TV Tuner Card 2.13.10.1016.zip"
+ fi
+ if [[ -z ${DVB_CARDS} ]] || use dvb_cards_ttpci ; then
+ mv dvb-ttpci-01.fw-fc2624 dvb-ttpci-01.fw
+ fi
+
+ local script_v=${PV}
+
+ # Adjust temp-dir of get_dvb_firmware
+ sed "${FILESDIR}"/get_dvb_firmware-${script_v} \
+ -e "s#/tmp#${T}#g" > get_dvb_firmware
+ chmod a+x get_dvb_firmware
+
+ # extract the firmware-files
+ for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
+ install_dvb_card ${FW_USE_FLAGS[CARD]} || continue
+
+ GET_PARAM=${FW_GET_PARAMETER[CARD]}
+ if [[ ${GET_PARAM} != "-" ]]; then
+ [[ -f ${FW_FILES[CARD]} ]] && ewarn "Already existing: ${FW_FILES[CARD]}"
+ elog "Extracting ${FW_FILES[CARD]}"
+ ./get_dvb_firmware ${GET_PARAM}
+ fi
+ done
+}
+
+src_install() {
+ insinto /lib/firmware
+
+ for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
+ if install_dvb_card ${FW_USE_FLAGS[CARD]}; then
+ local file=${FW_FILES[CARD]}
+ [[ -f ${file} ]] || die "File ${file} does not exist!"
+ doins ${file}
+ fi
+ done
+}
diff --git a/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.09.19.ebuild b/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.09.19.ebuild
new file mode 100644
index 00000000000..01f70c00365
--- /dev/null
+++ b/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.09.19.ebuild
@@ -0,0 +1,363 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Firmware files needed for operation of some dvb-devices"
+HOMEPAGE="http://www.linuxtv.org"
+
+LICENSE="freedist ISC all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+DEPEND="app-arch/unrar"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+# Files which can be fetched from linuxtv.org
+PACKET_NAME=dvb-firmwares-1.tar.bz2
+PACKET_SRC_URI="http://www.linuxtv.org/downloads/firmware/${PACKET_NAME}"
+TEVII_NAME=Tevii_linuxdriver_0815.rar
+TEVII_SRC_URI="http://tevii.com/${TEVII_NAME}"
+get_dvb_firmware="${FILESDIR}/get_dvb_firmware-${PV}"
+# from http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=history;f=Documentation/dvb/get_dvb_firmware
+
+FW_USE_FLAGS=(
+# packet
+ "usb-a800"
+ "dibusb-usb2"
+ "usb-dtt200u"
+ "usb-umt"
+ "usb-vp702x"
+ "usb-vp7045"
+ "usb-wt220u"
+ "dibusb-usb1"
+ "or51211"
+ "or51132"
+ "or51132"
+ "usb-dw2104"
+ "usb-dw2104"
+# own URL
+ "ttpci"
+ "bcm3510"
+ "usb-wt220u"
+ "usb-wt220u"
+ "usb-dib0700"
+ "sp887x"
+ "af9005"
+ "cx231xx"
+ "cx18"
+ "cx18"
+ "cx18"
+ "cx23885"
+ "cx23885"
+ "pvrusb2"
+ "usb-bluebird"
+ "tda10045"
+# get_dvb_firmware
+ "sp8870"
+ "tda10046"
+ "tda10046lifeview"
+ "ttusb-dec"
+ "ttusb-dec"
+ "ttusb-dec"
+ "opera1"
+ "opera1"
+ "vp7041"
+ "nxt200x"
+ "mpc718"
+ "usb-af9015"
+)
+
+FW_FILES=(
+# packet
+ "dvb-usb-avertv-a800-02.fw"
+ "dvb-usb-dibusb-6.0.0.8.fw"
+ "dvb-usb-dtt200u-01.fw"
+ "dvb-usb-umt-010-02.fw"
+ "dvb-usb-vp702x-01.fw"
+ "dvb-usb-vp7045-01.fw"
+ "dvb-usb-wt220u-01.fw"
+ "dvb-usb-dibusb-5.0.0.11.fw"
+ "dvb-fe-or51211.fw"
+ "dvb-fe-or51132-qam.fw"
+ "dvb-fe-or51132-vsb.fw"
+ "dvb-usb-dw2104.fw"
+ "dvb-fe-cx24116.fw"
+# own URL
+ "dvb-ttpci-01.fw"
+ "dvb-fe-bcm3510-01.fw"
+ "dvb-usb-wt220u-02.fw"
+ "dvb-usb-wt220u-fc03.fw"
+ "dvb-usb-dib0700-1.20.fw"
+ "dvb-fe-sp887x.fw"
+ "af9005.fw"
+ "v4l-cx231xx-avcore-01.fw"
+ "v4l-cx23418-apu.fw"
+ "v4l-cx23418-cpu.fw"
+ "v4l-cx23418-dig.fw"
+ "v4l-cx23885-avcore-01.fw"
+ "v4l-cx23885-enc.fw"
+ "v4l-cx25840.fw"
+ "dvb-usb-bluebird-01.fw"
+ "dvb-fe-tda10045.fw"
+# get_dvb_firmware
+ "dvb-fe-sp8870.fw"
+ "dvb-fe-tda10046.fw"
+ "dvb-fe-tda10046.fw"
+ "dvb-ttusb-dec-2000t.fw"
+ "dvb-ttusb-dec-2540t.fw"
+ "dvb-ttusb-dec-3000s.fw"
+ "dvb-usb-opera1-fpga-01.fw"
+ "dvb-usb-opera-01.fw"
+ "dvb-vp7041-2.422.fw"
+ "dvb-fe-nxt2004.fw"
+ "dvb-cx18-mpc718-mt352.fw"
+ "dvb-usb-af9015.fw"
+)
+
+FW_GET_PARAMETER=(
+# packet
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+# own URL
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+ "-"
+# get_dvb_firmware
+ "sp8870"
+ "tda10046"
+ "tda10046lifeview"
+ "dec2000t"
+ "dec2540t"
+ "dec3000s"
+ "opera1"
+ "-"
+ "vp7041"
+ "nxt2004"
+ "mpc718"
+ "af9015"
+)
+
+FW_URLS=(
+# packet
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${PACKET_SRC_URI}"
+ "${TEVII_SRC_URI}"
+ "${TEVII_SRC_URI}"
+# own URL
+ "http://www.escape-edv.de/endriss/firmware/dvb-ttpci-01.fw-fc2624"
+ "http://www.linuxtv.org/downloads/firmware/dvb-fe-bcm3510-01.fw"
+ "http://www.linuxtv.org/downloads/firmware/dvb-usb-wt220u-02.fw"
+ "http://home.arcor.de/efocht/dvb-usb-wt220u-fc03.fw"
+ "http://www.wi-bw.tfh-wildau.de/~pboettch/home/files/dvb-usb-dib0700-1.20.fw"
+ "http://peterdamen.com/dvb-fe-sp887x.fw"
+ "http://ventoso.org/luca/af9005/af9005.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx231xx-avcore-01.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23418-cpu.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23885-avcore-01.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx23885-enc.fw"
+ "http://linuxtv.org/downloads/firmware/v4l-cx25840.fw"
+ "http://linuxtv.org/downloads/firmware/dvb-usb-bluebird-01.fw"
+ "http://www.fireburn.co.uk/dvb-fe-tda10045.fw"
+# get_dvb_firmware
+ "http://2.download.softwarepatch.pl/1619edb0dcb493dd5337b94a1f79c3f6/tt_Premium_217g.zip"
+ "http://www.tt-download.com/download/updates/219/TT_PCI_2.19h_28_11_2006.zip"
+ "http://www.lifeview.hk/dbimages/document/7%5Cdrv_2.11.02.zip"
+ "http://hauppauge.lightpath.net/de/dec217g.exe"
+ "http://hauppauge.lightpath.net/de/dec217g.exe"
+ "http://hauppauge.lightpath.net/de/dec217g.exe"
+ "http://www.informatik.uni-leipzig.de/~hlawit/dvb/2830SCap2.sys"
+ "http://www.informatik.uni-leipzig.de/~hlawit/dvb/2830SLoad2.sys"
+ "http://www.twinhan.com/files/AW/Software/TwinhanDTV2.608a.zip"
+ "http://www.avermedia-usa.com/support/Drivers/AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip"
+ "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip"
+ "http://www.ite.com.tw/EN/Services/download.ashx?file=57"
+)
+
+SRC_URI=""
+NEGATIVE_USE_FLAGS=""
+NEGATIVE_END_BRACKETS=""
+ALL_URLS=""
+
+for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
+ URL="${FW_URLS[CARD]}"
+
+ if [[ -z ${URL} ]]; then
+ echo "missing url for ${FW_USE_FLAGS[CARD]}"
+ continue
+ fi
+ SRC_URI="${SRC_URI} dvb_cards_${FW_USE_FLAGS[CARD]}? ( ${URL} )"
+
+ IUSE="${IUSE} dvb_cards_${FW_USE_FLAGS[CARD]}"
+ NEGATIVE_USE_FLAGS="${NEGATIVE_USE_FLAGS} !dvb_cards_${FW_USE_FLAGS[CARD]}? ( "
+ NEGATIVE_END_BRACKETS="${NEGATIVE_END_BRACKETS} )"
+ ALL_URLS="${ALL_URLS} ${URL}"
+
+ GET_PARAM="${FW_GET_PARAMETER[CARD]}"
+ if [[ ${GET_PARAM} != "-" ]]; then
+ # all firmwares extracted by get_dvb_firmware need unzip
+ DEPEND="${DEPEND} dvb_cards_${FW_USE_FLAGS[CARD]}? ( app-arch/unzip )"
+ fi
+done
+
+SRC_URI="${SRC_URI} ${NEGATIVE_USE_FLAGS} ${ALL_URLS} ${NEGATIVE_END_BRACKETS}"
+
+DEPEND="${DEPEND}
+ ${NEGATIVE_USE_FLAGS}
+ app-arch/unzip
+ ${NEGATIVE_END_BRACKETS}"
+
+install_dvb_card() {
+ if [[ -z ${DVB_CARDS} ]]; then
+ # install (almost) all firmware files
+ # do not install this one due to conflicting filenames
+ [[ "${1}" != "tda10046lifeview" ]]
+ else
+ # Check if this flag is set
+ use dvb_cards_${1}
+ fi
+}
+
+pkg_setup() {
+ #echo SRC_URI=${SRC_URI}
+ #echo DEPEND=${DEPEND}
+ if has tda1004x ${DVB_CARDS}; then
+ eerror
+ eerror "DVB_CARDS flag tda1004x has been split into"
+ eerror "tda10045, tda10046 and tda10046lifeview".
+ eerror
+ eerror "But beware that you cannot enable tda10046 and"
+ eerror "tda10046lifeview at the same time."
+ fi
+
+ if [[ -z ${DVB_CARDS} ]]; then
+ elog
+ elog "DVB_CARDS is not set, installing all available firmware files."
+ elog "To save bandwidth please consider setting the DVB_CARDS variable"
+ elog "in ${ROOT%/}/etc/make.conf. This way only the firmwares you own"
+ elog "the hardware will be installed."
+ fi
+ # according to http://devmanual.gentoo.org/general-concepts/use-flags/index.html
+ # we should not die here. However, there is no sensible fallback choice to make
+ # because the user may have either the one or the other. WYGIWYG
+ if use dvb_cards_tda10046 && use dvb_cards_tda10046lifeview; then
+ eerror
+ eerror "You cannot have both tda10046 and tda10046lifeview in DVB_CARDS"
+ eerror "because of colliding firmware filenames (dvb-fe-tda10046.fw)."
+ eerror "Sorry."
+ die "Conflicting values for DVB_CARDS set."
+ fi
+ elog
+ elog "List of possible card-names to use for DVB_CARDS:"
+ echo ${FW_USE_FLAGS[*]}| tr ' ' '\n' | sort | uniq | fmt \
+ | while read line; do
+ elog " ${line}"
+ done
+ elog
+ elog "If you need another firmware file and want it included create a bug"
+ elog "at bugs.gentoo.org."
+ elog "In case some firmware sources are not fetchable please try again at"
+ elog "a later time and if it still does not fetch report a bug. If there"
+ elog "is no alternative source or an update to the firmware available we"
+ elog "have to remove it from the ebuild and you are on your own."
+}
+
+src_unpack() {
+ local distfile
+
+ # link all downloaded files to ${S}
+ for distfile in ${A}; do
+ [[ -L ${distfile} ]] || ln -s ${DISTDIR}/${distfile} ${distfile}
+ done
+
+ # unpack firmware-packet
+ if has ${PACKET_NAME} ${A}; then
+ unpack ${PACKET_NAME}
+ fi
+
+ # unpack tevii packet
+ if has ${TEVII_NAME} ${A}; then
+ unpack ${TEVII_NAME}
+ fi
+
+ if [[ -z ${DVB_CARDS} ]] || use dvb_cards_mpc718 ; then
+ mv Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip "Yuan MPC718 TV Tuner Card 2.13.10.1016.zip"
+ fi
+ if [[ -z ${DVB_CARDS} ]] || use dvb_cards_ttpci ; then
+ mv dvb-ttpci-01.fw-fc2624 dvb-ttpci-01.fw
+ fi
+
+ if [[ -z ${DVB_CARDS} ]] || use dvb_cards_usb-dw2104 ; then
+ mv tevii_linuxdriver_0815/fw/dvb-usb-s650.fw dvb-usb-dw2104.fw
+ mv tevii_linuxdriver_0815/fw/dvb-fe-cx24116.fw ./
+ fi
+
+ local script_v=${PV}
+
+ # Adjust temp-dir of get_dvb_firmware
+ sed "${FILESDIR}"/get_dvb_firmware-${script_v} \
+ -e "s#/tmp#${T}#g" > get_dvb_firmware
+ chmod a+x get_dvb_firmware
+
+ # extract the firmware-files
+ for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
+ install_dvb_card ${FW_USE_FLAGS[CARD]} || continue
+
+ GET_PARAM=${FW_GET_PARAMETER[CARD]}
+ if [[ ${GET_PARAM} != "-" ]]; then
+ [[ -f ${FW_FILES[CARD]} ]] && ewarn "Already existing: ${FW_FILES[CARD]}"
+ elog "Extracting ${FW_FILES[CARD]}"
+ ./get_dvb_firmware ${GET_PARAM}
+ fi
+ done
+}
+
+src_install() {
+ insinto /lib/firmware
+
+ for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
+ if install_dvb_card ${FW_USE_FLAGS[CARD]}; then
+ local file=${FW_FILES[CARD]}
+ [[ -f ${file} ]] || die "File ${file} does not exist!"
+ doins ${file}
+ fi
+ done
+}
diff --git a/media-tv/linuxtv-dvb-firmware/metadata.xml b/media-tv/linuxtv-dvb-firmware/metadata.xml
new file mode 100644
index 00000000000..740fefd7217
--- /dev/null
+++ b/media-tv/linuxtv-dvb-firmware/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+</pkgmetadata>
+
diff --git a/media-tv/me-tv/Manifest b/media-tv/me-tv/Manifest
new file mode 100644
index 00000000000..b64babaa8aa
--- /dev/null
+++ b/media-tv/me-tv/Manifest
@@ -0,0 +1 @@
+DIST me-tv-1.4.0.10.tar.gz 549653 SHA256 a0ee03feb3271c5cd68e5d36f938d2f967db462d28627d39b1d57be60b02f38c SHA512 98988a343f900c6b7a276ada47025f9a703a490eb499f3aad9fb7163c73113061dc205a29b454f06e817ef24d44ae58981fd5a19dfb0a48be669394e91bd5ee8 WHIRLPOOL 8f263ed8ed1dec94b67d607052ce04f2c2d62607d8fdddf1703888905512a9ced76372c81dd210552b3df512adb6b4876e131bf2d288b51444775edbe28ce119
diff --git a/media-tv/me-tv/files/me-tv-1.4.0.10-gcc47.patch b/media-tv/me-tv/files/me-tv-1.4.0.10-gcc47.patch
new file mode 100644
index 00000000000..c785e971997
--- /dev/null
+++ b/media-tv/me-tv/files/me-tv-1.4.0.10-gcc47.patch
@@ -0,0 +1,26 @@
+ https://bugs.gentoo.org/452108
+
+ common/common.cc | 1 +
+ server/thread.cc | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/common/common.cc
++++ b/common/common.cc
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
++#include <unistd.h>
+ #include "../common/common.h"
+ #include "../common/i18n.h"
+ #include "../common/exception.h"
+--- a/server/thread.cc
++++ b/server/thread.cc
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
++#include <unistd.h>
+ #include "thread.h"
+ #include "../common/i18n.h"
+ #include "../common/exception.h"
diff --git a/media-tv/me-tv/me-tv-1.4.0.10.ebuild b/media-tv/me-tv/me-tv-1.4.0.10.ebuild
new file mode 100644
index 00000000000..44ac0c47490
--- /dev/null
+++ b/media-tv/me-tv/me-tv-1.4.0.10.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils versionator autotools gnome2
+
+DESCRIPTION="Me TV is a GTK desktop application for watching digital television"
+HOMEPAGE="http://me-tv.sourceforge.net/"
+SRC_URI="http://launchpad.net/${PN}/$(get_version_component_range 1-2)/$(get_version_component_range 1-3)/+download/${P}.tar.gz"
+RESTRICT="mirror"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="http"
+RDEPEND=">=dev-cpp/gconfmm-2.6
+ dev-cpp/gtkmm:2.4
+ dev-cpp/libxmlpp:2.6
+ dev-libs/libunique:1
+ >=dev-libs/dbus-glib-0.92
+ net-libs/gnet:2
+ =dev-db/sqlite-3*
+ >=media-video/vlc-1.1.8
+ media-libs/gstreamer:0.10
+ media-plugins/gst-plugins-xvideo:0.10
+ media-libs/gst-plugins-base:0.10"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc47.patch
+ eautoreconf
+}
+
+src_install() {
+ gnome2_src_install
+ if use http; then
+ dodoc -r http/
+ fi
+}
+
+pkg_postinst() {
+ if use http; then
+ elog "The HTTP server port, .. are hardcoded"
+ fi
+ elog "Please note that Version 1.4 has a new DB so you"
+ elog "have to re-import your channels."
+}
diff --git a/media-tv/me-tv/metadata.xml b/media-tv/me-tv/metadata.xml
new file mode 100644
index 00000000000..9541ffbf9e5
--- /dev/null
+++ b/media-tv/me-tv/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>lordvan@gentoo.org</email>
+ <name>Thomas Raschbacher</name>
+ </maintainer>
+ <longdescription>Me TV is a GTK desktop application for watching digital television services that use the DVB standard.
+
+Me TV works with DVB-T, DVB-S, DVB-C and ATSC devices that are supported by Linux kernel drivers.</longdescription>
+ <use>
+ <flag name="http">Installation of Web-frontend</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">me-tv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/metadata.xml b/media-tv/metadata.xml
new file mode 100644
index 00000000000..395509311a6
--- /dev/null
+++ b/media-tv/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The media-tv category contains television-related applications.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie media-tc enthält TV-Applikationen.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría media-tv contiene aplicaciones relacionadas con la
+ televisión.
+ </longdescription>
+ <longdescription lang="ja">
+ media-tvカテゴリーにはテレビジョン関連のアプリケーションが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De media-tv categorie bevat TV-applicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm media-tv chứa các ứng dụng liên quan đến truyền hình - TV.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria media-tv contiene applicazioni per la TV.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria media-tv contém aplicações relacionadas com
+ televisão.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria media-tv zawiera programy związane z telewizją.
+ </longdescription>
+</catmetadata>
+
diff --git a/media-tv/mythtv-status/Manifest b/media-tv/mythtv-status/Manifest
new file mode 100644
index 00000000000..ac8b751b881
--- /dev/null
+++ b/media-tv/mythtv-status/Manifest
@@ -0,0 +1 @@
+DIST mythtv-status-0.10.4.tar.gz 37640 SHA256 01ace567c9462d42901e86afa78d75bf8c64b94073bf26cb0acf22e2c6e75e98 SHA512 9701eb59e084df0bdcc487cc79949bb8efd9657b9982a2e545220938255657b49a72cc30c94a08ebc8341ec0d222e03646466f806bc44de3f2d531b75d0d7c1a WHIRLPOOL e55c666f48016326159fa55c0c423d56db6e00678d1d00c6d56dc5e554e297492dbf906724e233a9239a31b65a2f3b8f38364a6576381655415edc667be30486
diff --git a/media-tv/mythtv-status/files/mythtv-status.1 b/media-tv/mythtv-status/files/mythtv-status.1
new file mode 100644
index 00000000000..a4f49fa944f
--- /dev/null
+++ b/media-tv/mythtv-status/files/mythtv-status.1
@@ -0,0 +1,281 @@
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "MYTHTV-STATUS 1"
+.TH MYTHTV-STATUS 1 "2012-07-07" "perl v5.14.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+mythtv\-status \- Display the status of a MythTV backend
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\& mythtv\-status [options]
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This script queries a MythTV backend and reports on the status of it,
+any upcoming recordings and any which are happening right now.
+.PP
+The intention is to warn you if there is a program being recorded or
+about to be recorded.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-c, \-\-colour\fR" 4
+.IX Item "-c, --colour"
+Use colour when showing the status of the encoder(s).
+.IP "\fB\-d, \-\-description\fR" 4
+.IX Item "-d, --description"
+Display the description for the scheduled recordings.
+.IP "\fB\-\-disk\-space\-warn\fR" 4
+.IX Item "--disk-space-warn"
+The threshold (in percent) of used disk space that we should show
+the disk space in red (if using colour) or send an email if we're
+in email mode with email only on warnings.
+.IP "\fB\-\-encoder\-details\fR" 4
+.IX Item "--encoder-details"
+Display the input \s-1ID\s0 and channel name against the recording details.
+.IP "\fB\-\-encoder\-skip\-idle\fR" 4
+.IX Item "--encoder-skip-idle"
+Suppress displaying idle encoders in the Encoders block.
+.IP "\fB\-e, \-\-episode\fR" 4
+.IX Item "-e, --episode"
+Display the episode (subtitle) for the scheduled recordings.
+.IP "\fB\-\-email <address>[ \-\-email <address> ...]\fR" 4
+.IX Item "--email <address>[ --email <address> ...]"
+Send the output to the listed email addresses. By default the encoder status,
+currently recording shows and time till next recording is surpressed from
+the email.
+.Sp
+To turn the additional blocks on you can use \fB\-\-encoders\fR, \fB\-\-recording\-now\fR
+and/or \fB\-\-next\-recording\fR.
+.IP "\fB\-\-email\-only\-on\-alert\fR" 4
+.IX Item "--email-only-on-alert"
+Only send an email out (if \-\-email is present) if there is an alert
+(i.e., schedule conflict or low disk space).
+.IP "\fB\-?, \-\-help\fR" 4
+.IX Item "-?, --help"
+Display help.
+.IP "\fB\-\-file <file>\fR" 4
+.IX Item "--file <file>"
+Load \s-1XML\s0 from the file specified instead of querying a MythTV backend.
+Handy for debugging things.
+.IP "\fB\-\-save\-file <file>\fR" 4
+.IX Item "--save-file <file>"
+Save the \s-1XML\s0 we received from the MythTV backend.
+Handy for debugging things.
+.IP "\fB\-\-guide\-days\-warn <days>\fR" 4
+.IX Item "--guide-days-warn <days>"
+Warn if the number of days of guide data present is equal to or below
+this level. Default is 2 days.
+.IP "\fB\-h \s-1HOST\s0, \-\-host=HOST\fR" 4
+.IX Item "-h HOST, --host=HOST"
+The host to check, defaults to localhost.
+.IP "\fB\-\-nostatus\fR, \fB\-\-noencoders\fR, \fB\-\-norecording\-now\fR, \fB\-\-noscheduled\-recordings\fR, \fB\-\-noschedule\-conflicts\fR, \fB\-\-nonext\-recording\fR, \fB\-\-nototal\-disk\-space\fR, \fB\-\-nodisk\-space\fR, \fB\-\-noguide\-data\fR, \fB\-\-noauto\-expire\fR" 4
+.IX Item "--nostatus, --noencoders, --norecording-now, --noscheduled-recordings, --noschedule-conflicts, --nonext-recording, --nototal-disk-space, --nodisk-space, --noguide-data, --noauto-expire"
+Suppress displaying blocks of the output if they would normally be displayed.
+.IP "\fB\-p \s-1PORT\s0, \-\-port=PORT\fR" 4
+.IX Item "-p PORT, --port=PORT"
+The port to use when connecting to MythTV, defaults to 6544.
+.IP "\fB\-\-oneliner\-bullets\fR" 4
+.IX Item "--oneliner-bullets"
+Insert asterisks (*) before each of the oneliners to stop some
+email clients from thinking the oneliner block is a paragraph and
+trying to word wrap them.
+.IP "\fB\-\-auto\-expire\fR" 4
+.IX Item "--auto-expire"
+Display the shows due to auto expire (output is normally suppressed).
+.IP "\fB\-\-auto\-expire\-count\fR" 4
+.IX Item "--auto-expire-count"
+How many of the auto expire shows to display, defaults to 10.
+.IP "\fB\-\-recording\-in\-warn\fR" 4
+.IX Item "--recording-in-warn"
+If the \*(L"Next Recording In\*(R" time is less than this amount, display it
+in red. This in seconds, and defaults to 3600 (1 hour).
+.IP "\fB\-\-verbose\fR" 4
+.IX Item "--verbose"
+Have slightly more verbose output. This includes any warnings that might
+be generated while parsing the \s-1XML\s0.
+.IP "\fB\-v, \-\-version\fR" 4
+.IX Item "-v, --version"
+Show the version of mythtv-status and then exit.
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+The output of this script is broken up into several chunks they are:
+.IP "Status" 4
+.IX Item "Status"
+Some general info about the backend, currently just the timestamp of when
+this program was run.
+.IP "Guide Data" 4
+.IX Item "Guide Data"
+The number of days of guide data is present. By default it is only shown
+if the number of days is below the warning level. To show it regardless
+of the warning level use \-\-guide\-data.
+.IP "Encoders" 4
+.IX Item "Encoders"
+Each encoder that the backend knows about are listed, with the hostname
+they are on, the encoder \s-1ID\s0 (in brackets) and the current status.
+.IP "Recording Now" 4
+.IX Item "Recording Now"
+Any programs which are being recorded right now.
+.IP "Scheduled Recordings" 4
+.IX Item "Scheduled Recordings"
+Up to 10 programs which are scheduled to be recorded today and tomorrow.
+.IP "Schedule Conflicts" 4
+.IX Item "Schedule Conflicts"
+Any upcoming schedule conflicts (not just limited to today or tomorrow).
+.IP "Shows due to Auto Expire" 4
+.IX Item "Shows due to Auto Expire"
+The shows which will be deleted and the order they'll be deleted if the
+auto expirer kicks in.
+.IP "Total Disk Space" 4
+.IX Item "Total Disk Space"
+The amount of disk space in total, and used by MythTV.
+.IP "Next Recording In" 4
+.IX Item "Next Recording In"
+If there are no recordings currently happening, then the amount of time until
+the next recording is displayed.
+.IP "Disk Space" 4
+.IX Item "Disk Space"
+Details about each storage group that MythTV knows about. By default this
+only shows storage groups that are above the warning level. Use
+\&\fB\-\-disk\-space\fR to turn on display of all storage groups.
+.SH "RETURN CODES"
+.IX Header "RETURN CODES"
+mythtv-status provides some return codes.
+.IP "0" 4
+Standard return code
+.IP "1" 4
+.IX Item "1"
+A warning is generated
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Andrew Ruthven, andrew@etc.gen.nz
+.SH "LICENSE"
+.IX Header "LICENSE"
+Copyright (c) 2007\-2009 Andrew Ruthven <andrew@etc.gen.nz>
+This code is hereby licensed for public consumption under the \s-1GNU\s0 \s-1GPL\s0 v3.
diff --git a/media-tv/mythtv-status/metadata.xml b/media-tv/mythtv-status/metadata.xml
new file mode 100644
index 00000000000..be191b9f54b
--- /dev/null
+++ b/media-tv/mythtv-status/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mythtv</herd>
+</pkgmetadata>
diff --git a/media-tv/mythtv-status/mythtv-status-0.10.4.ebuild b/media-tv/mythtv-status/mythtv-status-0.10.4.ebuild
new file mode 100644
index 00000000000..7431fd8494b
--- /dev/null
+++ b/media-tv/mythtv-status/mythtv-status-0.10.4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Displays the current status of MythTV at the command prompt"
+HOMEPAGE="http://www.etc.gen.nz/projects/mythtv/mythtv-status.html"
+SRC_URI="http://www.etc.gen.nz/projects/mythtv/tarballs/${P}.tar.gz"
+#SRC_URI="mirror://ubuntu/pool/universe/m/mythtv-status/mythtv-status_0.10.2.orig.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-perl/libwww-perl
+ dev-perl/XML-LibXML
+ dev-perl/DateManip
+ dev-perl/MIME-tools
+ dev-perl/Sys-SigAction
+ dev-perl/Config-Auto
+ media-tv/mythtv[perl]"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ dobin bin/mythtv-status
+ doman "${FILESDIR}/mythtv-status.1"
+ dodoc README FAQ ChangeLog THANKS
+}
diff --git a/media-tv/mythtv/Manifest b/media-tv/mythtv/Manifest
new file mode 100644
index 00000000000..91be4bde691
--- /dev/null
+++ b/media-tv/mythtv/Manifest
@@ -0,0 +1,15 @@
+DIST mythtv-0.26.0-9fd7c6102b2cd1a3760337663803b110446c6ea7.tar.xz 179540 SHA256 ae63398f1ea8884950eb4653c42f6bf71e504738112f5ac8f4d13c1988098d95 SHA512 599dab7a51e9e2f5e240e6d80aadf3bc1f89b8f83e0a5c2e6c82695926ef3f1b7694a73d95b0a296544f9642f1e070a809d86563a415498345a3c1049f269aa4 WHIRLPOOL 74c8aa8f2846eb67f88bddacf5d7c5aa0445e0fe2fbd0f6f2f284e51e1f2c024ca8b7ef22639b7e201b8304421859d7bab802a7d2fe9343ec40d36453f0bfa8e
+DIST mythtv-0.26.0.tar.bz2 40887666 SHA256 2f158962ca3009db563dabc32827c47788a688bd67a25abd76f4baa9c3cfe306 SHA512 8c8766542b6a1a877d400fd99343e8149d9c6cc4ab1e425db358bdbdc10b6cb7422bb4bdcf984ce64b2cf02b0ad0725606b266558afcadff9ec9c9bb95bb49c0 WHIRLPOOL c737a1dbdfafe65ae5ee3bde8d0b3a9ad50ebfccec784d6907c78d03f9732637cfbf8b82ecfca80af0b049c65d70c608a81ac3bf27a8070ba3f32d657f5137bb
+DIST mythtv-0.27-583395f5a376637efcd408a102fa64d0f188c12f.tar.xz 298048 SHA256 2b18428980fe8951694eb9c8594aa2559df491b029987e1a4b983128fdea4f51 SHA512 1d8c2a61bd91d7116ba3b43251d517bda3c8db3c235e73dde66116dc02d14806db9c80bacf6e19eaf816c4765d8e51fe9b53900efa3112134c564c08cc0ca012 WHIRLPOOL 3d50908d085f844cd210c568b50c55c47e4fe8dd8423ffe18303a7c799a45e24dfceaa5221e6f59596394484162d9992f46d5f66b0ad3c57fbb5a240def68dec
+DIST mythtv-0.27.1-082d5c1fbccd48dd862f14007c0445dee8502f3d.tar.xz 161652 SHA256 271c12af8bdf6188f1a11f07ac7c3ad45374cc60211e4a005975af66d5421739 SHA512 ed7ecb9fc5d3abe592e195309d88979a41132ebd99e92e59e2471f17c3f5da089cc5846d817a5228657cef37fade5724f9ac8f0e335ec45855158996a2317016 WHIRLPOOL 86a99cc0a74c75789a98e18fd57b5627b59c650da02602d947a8ccd854ed2bf210e76bf858bc16a2a6fd93763149257ae0e3ea95f44aecf0916b5f1a2b81460d
+DIST mythtv-0.27.1-aaae611819c6a6f92a55d5c82efb8738ec9a23df.tar.xz 148364 SHA256 ca09cf37ef0bf8b4ca2ff54416b66126229680bef7e687f6b1f0b215250c0f12 SHA512 bc5d719a10e683b13170975d39d2d57547f7935007697c3f1d002067bffb63fe1b6375e834c4c0aea765c54ef35085d6f46cea1b5744605eae616d939fcb795d WHIRLPOOL 5ff8be973fe9a59cab833025e3cfe5c38dd8a3b4a9af83e2a584350f9b5389d82ec32738f66d91c633fa3f01dbf27c69d723023c72e554e1feec2687a3cdfb1a
+DIST mythtv-0.27.1.tar.gz 85612356 SHA256 a7039ba46347f1d6a0ed392a53117639c8cba6bc458a6ad30082046d8ad85de7 SHA512 f2c79765948c0a00c7a92f24d2315b5af3044333f67ed8925a59c5bebbdebf98792ef05e2bc8864bfbe77be8cc8ff530e3f4e8761320cfe5ed21369341d8915e WHIRLPOOL 938e0e77070473a523323fe64e40eb416809b40b16943d66a5914d65caa7530dd4b5ba5209919050a7b4968c9e5ca5155ee970f165b39a5c77392debb20bf0ad
+DIST mythtv-0.27.3-2d4a7c9235287b0589035974bff282e3f2e9a7e5.tar.xz 71744 SHA256 1c2c9912377dac670d0c24fa14445272af100250aaa19e8ae40e409d3c30b78f SHA512 19fc2d92acb99668d90f71ff5e65b29c5c00fe35d8be150df3721f081b6ada0b53bca4d88a74a4de3ed2bd78c781a0a48df6a502cb10b89aa3d77ea5e12b80f1 WHIRLPOOL d5ca9d06634a7bf41162158ba9be1e0669032b78df85049ff7878ef1b5b1e34cc2c6ecf99815ded8d963da4cefb14bc90dcfbb227ed2277201e0e71d00af460a
+DIST mythtv-0.27.3-e1d575da2fdde7ae7119972c688b0ddd15e676c4.tar.xz 77584 SHA256 43e54366582c71c0835771987be6dd33543326ba2aba4efb8a57f83b965647cc SHA512 0360b990d0ec5eade879879c516a9169c50aafaff8b08fff60d4d65e93b3c2dadac36869f958e070b644eea72592344a7f678c78a25ae7950372e17b725a1cd1 WHIRLPOOL 5eb3b1cbea2defad1143ad3934ad5d2c2585595013bc8619f8e436eebcdfa35efe377bf40b50281140901314b5c1daf2c8654b9a0f7ab4be59fdc49c5d278c43
+DIST mythtv-0.27.3.tar.gz 85624583 SHA256 8eaaf8c6e42ca6eb81f180467de90d597dbeabb1bb14b7085da353d2980db8f4 SHA512 c825c6d5a4fab6fe3179dbb78730575732615ab41cf2d21f82c6e6317ab62c9a6570cd9d204c39c04d176138c90dfdc95892cd8336bb8487051f1f3842cc0866 WHIRLPOOL b9382dbe1019bde96135ff404039d4db5ef03d52d5f2d75cfd3005e1e5eea702529df3a45497c081de89d9ecfd5a6a143b6dadc228e581453b9aa75c63bcc042
+DIST mythtv-0.27.4-3b4390396bf09dfe3741508ecf7fc71a004abd01.tar.xz 12752 SHA256 b3331d8dbe36d34c88ab42aec2d2d84e2bb51ba11b714f23c5faa91e32ce06de SHA512 8f80378cfc5be8058baa74f7d25e8ec0a0405201e6f8b77b6cb96ba91dbd9b9251947ba7b6e48efad5270624769195891e2c48e0c8d0a16d6f8893801103a26b WHIRLPOOL 140d8dfb39942ef587b551099942b6b284bd49e070225aaee71f3fb4feebfc0ce293461b87fe9f6477def2745a6d71226fb103cf090a25fc33ecf85bd62212b6
+DIST mythtv-0.27.4-b305eb5b7fc662146e74983fa3754d622695cdeb.tar.xz 2376 SHA256 a08af2e8457099397512eb10c8729c75ceff078045881e22a1c53595536f41ba SHA512 63e52a9dc34e344e632ab339ab3ab4093e3f9e363b406c5b0b172744fbd78187dde20ed3da9bc2d1258404c412e4d39f855f9060457337815c995773aa0a62b9 WHIRLPOOL 59ba3805295b990f785c7e4f6fcc1c1748444a2d515119de8acaaa31979fe4fec05181ad87b24aeb62de54a100cc017bcad46fdd65dcc0f6d06c773bf7d94ed6
+DIST mythtv-0.27.4.tar.gz 85644227 SHA256 1f734ffc776e4938aa913e49ce94279f2c2d520c62af278f1d04fe399723365b SHA512 6f858f32467756e96db6f79ccb2c42edc0bf22d217cb7b9dc9188ada994bbb9aafe9f72dd71aca10cd26bad1bd5d344af64487ec5fc925872aba81cf7aa257c8 WHIRLPOOL 65cd1869b7cee00197179b13a138d466dc443ecaf23c665754e0451e7ab51940e7235cb74d23ed7296be2c716f443c9c42df2fdd918a0480a04c63381ebce2c4
+DIST mythtv-0.27.5-9498257571e8158926b60a0eefc74568c4436823.tar.xz 11992 SHA256 aef3b944a9f4b49daa3f5489b58a080db35eb7b85c76819d9d00ccf1adfadfdf SHA512 bddc80f6d7e7ad583459a2192660e6101d53d8821c0f875634f90588bc6fbff86c80fa75f6e8cb859fd5164a81f0ad3427939d57da2b112741b1ea9ce646659d WHIRLPOOL 249d4f5332d943669610b96363b6d2b19d63973ba191bd62900e7d31362b4c541077ffe6ca9eae6027c6d1d5fea1d691722739ff9d0d7af6566d288921444961
+DIST mythtv-0.27.5.tar.gz 85652939 SHA256 7e625f94332effeadfba8e7ae7c98d44a83bfc25b7c59e39adce67dc2f4e1e1b SHA512 b912e010e54271f9321ac1b11d4a31e4093f86c0f2ae3139d4b55085bab142ca3fc6d847d163f6b75aa31320404914c71c094528dc8ee7d70086e56a828b9169 WHIRLPOOL e9ebbbabac6ed53b4ec90537371a63e053bb9a2c0a0e920e43d3d2e475f87bdd0ac5a4604045498e88aaf06b11eb054d50dea7881c87dbd45a36c08309e1b880
+DIST mythtv-0.27.tar.gz 85904162 SHA256 494ebd7ee384e751c05ee0a1b3dcd3618caf72f1e94810381c09c2b5d1c799f0 SHA512 2ea070497a7610b8e1548112d9925a28aeedba819c2d063e88cc63daf69947379ce7213e357c26bf2221f8a8e865c937dee3b9bf2695644f2f1adeadf6d11116 WHIRLPOOL 74c4fade0d0f93a64e5f1da3120358f15f6f8891f53b7c74b41a286369e192790cae87829b79a3a90ce3ca23ede63b3dfa809b514b68cee220432794414b8a47
diff --git a/media-tv/mythtv/files/bash_profile b/media-tv/mythtv/files/bash_profile
new file mode 100644
index 00000000000..5de354bccae
--- /dev/null
+++ b/media-tv/mythtv/files/bash_profile
@@ -0,0 +1,4 @@
+# .bash_profile
+case "`tty`" in
+ *tty8) startx; logout ;;
+esac
diff --git a/media-tv/mythtv/files/libdir-27.patch b/media-tv/mythtv/files/libdir-27.patch
new file mode 100644
index 00000000000..d25e714b3c6
--- /dev/null
+++ b/media-tv/mythtv/files/libdir-27.patch
@@ -0,0 +1,13 @@
+diff --git a/mythtv/configure b/mythtv/configure
+index 4aa8727..f890df3 100755
+--- a/mythtv/configure
++++ b/mythtv/configure
+@@ -6475,7 +6475,7 @@ if enabled mythlogserver; then
+ echo "Configuring zeromq..."
+ (cd external/zeromq ; \
+ ./configure --quiet --without-documentation --prefix=${prefix} \
+- --includedir=${prefix}/include/mythtv/zeromq)
++ --includedir=${prefix}/include/mythtv/zeromq --libdir=${libdir})
+ echo "Configuring nzmqt..."
+ (cd external/nzmqt/src ; \
+ ${qmakeconf} -o Makefile)
diff --git a/media-tv/mythtv/files/libdir.patch b/media-tv/mythtv/files/libdir.patch
new file mode 100644
index 00000000000..90fc3627253
--- /dev/null
+++ b/media-tv/mythtv/files/libdir.patch
@@ -0,0 +1,11 @@
+--- external/Makefile 2012-10-06 14:30:40.453248737 -0400
++++ external/Makefile 2012-10-06 14:32:43.283277751 -0400
+@@ -25,7 +25,7 @@
+ zeromq/Makefile: zeromq/configure
+ (cd zeromq ; \
+ ./configure --without-documentation --prefix=${PREFIX} \
+- --includedir=${PREFIX}/include/mythtv/zeromq)
++ --includedir=${PREFIX}/include/mythtv/zeromq --libdir=${LIBDIR})
+
+ zeromq-install zeromq-uninstall zeromq-clean zeromq-distclean:
+ ${MAKE} -C zeromq ${@:zeromq-%=%} DESTDIR=${INSTALL_ROOT}
diff --git a/media-tv/mythtv/files/mythbackend.conf b/media-tv/mythtv/files/mythbackend.conf
new file mode 100644
index 00000000000..4e85f4a215c
--- /dev/null
+++ b/media-tv/mythtv/files/mythbackend.conf
@@ -0,0 +1,12 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Accepts any valid combination of logging options to mythbackend
+# To get a valid list run: /usr/bin/mythbackend -v help
+#MYTHBACKEND_VERBOSE="general"
+
+
+# Allows you to pass specific startup options to mythbackend
+# e.g. --noupnp
+#MYTHBACKEND_OPTS=""
diff --git a/media-tv/mythtv/files/mythbackend.init b/media-tv/mythtv/files/mythbackend.init
new file mode 100644
index 00000000000..7caf7a70617
--- /dev/null
+++ b/media-tv/mythtv/files/mythbackend.init
@@ -0,0 +1,56 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="MythTV backend recording daemon"
+extra_commands="resched upnprebuild"
+description_resched="Forces the recording scheduler to update"
+description_upnprebuild="Rebuilds the UPnP media cache"
+
+depend() {
+ # mythbackend doesn't need to run on the same machine that
+ # mysql runs on. so its use for that reason
+ need net
+ use mysql LCDd
+}
+
+start() {
+ [ -z "${MYTHBACKEND_VERBOSE}" ] && \
+ MYTHBACKEND_VERBOSE="general"
+
+ #fixes for bug #101308
+ unset DISPLAY
+ unset SESSION_MANAGER
+
+ # Work around any strange permissions that may be on these files.
+ chown -R mythtv:video /var/log/mythtv/
+ chown -R mythtv:video /home/mythtv/
+
+ ebegin "Starting MythTV Backend"
+ start-stop-daemon --start --quiet --exec /usr/bin/mythbackend \
+ --pidfile /var/run/mythbackend.pid -- \
+ --daemon --pidfile /var/run/mythbackend.pid --user mythtv \
+ --verbose ${MYTHBACKEND_VERBOSE} \
+ --logpath /var/log/mythtv/ \
+ ${MYTHBACKEND_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping MythTV Backend"
+ start-stop-daemon --stop --quiet --pidfile=/var/run/mythbackend.pid
+ eend $?
+}
+
+resched() {
+ ebegin "Updating the recording scheduler"
+ /usr/bin/mythbackend --resched
+ eend $?
+}
+
+upnprebuild() {
+ ebegin "Rebuilding UPnP media cache"
+ /usr/bin/mythbackend --upnprebuild
+ eend $?
+}
diff --git a/media-tv/mythtv/files/mythbackend.service b/media-tv/mythtv/files/mythbackend.service
new file mode 100644
index 00000000000..496c7b295e1
--- /dev/null
+++ b/media-tv/mythtv/files/mythbackend.service
@@ -0,0 +1,66 @@
+# Do not edit this file, it will be replaced on update
+# If you need to make modifications to this unit file first make a copy in # /etc/systemd/system
+
+# This file is part of the packaging of MythTV #
+# MythTV is free software; view http://www.mythtv.org for more information.
+#
+# It is sometimes necessary to wait for a capture device to finish (hot)plug
+# initialization before the backend starts. If this is necessary,
+# create a Wants and After entry for all the capture devices that
+# one wishes to wait to be created before the backend starts using the systemd
+# device name mangling names (/dev/some/thing turns
+# into dev-some-thing.device). These normally should be udev persistent
+# filename rules to avoid confusion.
+# See the MythTV wiki for udev persistent filename # discussions found at:
+# http://www.mythtv.org/wiki/Device_Filenames_and_udev
+#
+# In order to insure that systemd will create a device unit for the
+# capture device, one must insure that udev will have the tag "systemd"
+# (i.e. add TAG+="systemd" to the udev rule).
+#
+# The MythTV package ships with a default udev rule file located in:
+# /lib/udev/rules.d/99-mythbackend.rules
+
+[Unit]
+Description=MythTV backend service
+After=network.target mysqld.service
+# Uncomment the following line if you will be using the mythweb plugin on the
+# same system as mythbackend.
+#Wants=httpd.service
+
+[Service]
+Type=simple
+
+Environment=MYTHCONFDIR=/etc/mythtv
+# Default setting assumes a system wide install. Otherwise it should be set to
+# the folder containing the .mythtv subfolder containing the config.xml file
+# Such as
+#Environment=HOME=/usr/share/mythtv
+# or
+Environment=HOME=/~/.mythtv
+
+# systemd changes execution from the calling user (possibly root) to this user
+# if you have permissions problems or obscure errors try logging in as mythtv
+# See notes below
+User=mythtv
+
+# Uncomment one of the following...
+# Use sysloging rather than separate logging:
+#ExecStart=/usr/bin/mythbackend --syslog local7
+
+# If Type=forking you must specify the --daemon and --pidfile options:
+#ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv --loglevel crit --pidfile /run/mythtv/mythbackend.pid
+#PIDFILE=/run/mythtv/mythbackend.pid
+
+# Systemd sends stdout to syslog, and mythbackend has console logging enabled without --daemon.
+# Send stdout to /dev/null so console logging doesn't go to syslog
+#StandardOutput=null
+# Default setting for Type=simple.
+#ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv --loglevel crit
+ExecStart=/usr/bin/mythbackend --loglevel notice --nologserver
+
+# Whether systemd will continue over-watch and restart on any halt
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-tv/mythtv/files/mythfrontend.conf b/media-tv/mythtv/files/mythfrontend.conf
new file mode 100644
index 00000000000..c0b8ba9f6ee
--- /dev/null
+++ b/media-tv/mythtv/files/mythfrontend.conf
@@ -0,0 +1,13 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Should 'mythfrontend' really execute mythwelcome instead?
+# Default: false
+MYTHWELCOME=false
+
+# Options to pass to mythfrontend or mythwelcome based on the above setting
+# Note: If you have mythwelcome enabled, it does not pass arguments to
+# mythfrontend. You must configure this inside mythwelcome
+# Default: --syslog local7
+MYTHFRONTEND_OPTS="--syslog local7"
diff --git a/media-tv/mythtv/files/mythfrontend.wrapper b/media-tv/mythtv/files/mythfrontend.wrapper
new file mode 100644
index 00000000000..ce3608ec1f9
--- /dev/null
+++ b/media-tv/mythtv/files/mythfrontend.wrapper
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Based on Mythbuntu's script
+
+# Check if the frontend is already running,
+# if it is bring it to the foreground.
+# This is to prevent multiple frontends from running
+/usr/bin/pgrep mythfrontend.real 2>&1 > /dev/null && \
+ /usr/bin/wmctrl -a "MythTV Frontend" 2> /dev/null && \
+ exit 0
+
+# Check if you're part of the video group
+if [ -n "$(groups | grep -v video)" ]; then
+ echo "'$USER' is not part of the 'video' group." >&2
+ echo "For best results add '$USER' to the 'video' group." >&2
+fi
+
+if [ -e /etc/conf.d/mythfrontend ]; then
+ . /etc/conf.d/mythfrontend
+fi
+
+if [ "x${MYTHWELCOME}" = "xtrue" ]; then
+ exec /usr/bin/mythwelcome ${MYTHFRONTEND_OPTS} "$@"
+ RET=$?
+else
+ exec /usr/bin/mythfrontend.real ${MYTHFRONTEND_OPTS} "$@"
+ RET=$?
+fi
+
+exit ${RET}
diff --git a/media-tv/mythtv/files/mythtv.logrotate.d-r3 b/media-tv/mythtv/files/mythtv.logrotate.d-r3
new file mode 100644
index 00000000000..220776a1d08
--- /dev/null
+++ b/media-tv/mythtv/files/mythtv.logrotate.d-r3
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+/var/log/mythtv/*.log {
+ weekly
+ rotate 8
+ nocompress
+ nocreate
+ notifempty
+ sharedscripts
+ missingok
+ olddir /var/log/mythtv/old
+ postrotate
+ killall -HUP mythfrontend
+ killall -HUP mythbackend
+ killall -HUP mythlcdserver
+ find /var/log/mythtv/old -type f -mtime +30 -delete
+ endscript
+}
diff --git a/media-tv/mythtv/files/mythtv.logrotate.d-r4 b/media-tv/mythtv/files/mythtv.logrotate.d-r4
new file mode 100644
index 00000000000..28e3ce62bfd
--- /dev/null
+++ b/media-tv/mythtv/files/mythtv.logrotate.d-r4
@@ -0,0 +1,14 @@
+/var/log/mythtv/*.log {
+ weekly
+ rotate 8
+ missingok
+ ifempty
+ nocreate
+ nocompress
+ sharedscripts
+ olddir /var/log/mythtv/old
+ lastaction
+ killall -HUP mythlogserver
+ find /var/log/mythtv/old -type f -mtime +30 -delete
+ endscript
+}
diff --git a/media-tv/mythtv/files/xinitrc-r1 b/media-tv/mythtv/files/xinitrc-r1
new file mode 100644
index 00000000000..c366fe487a8
--- /dev/null
+++ b/media-tv/mythtv/files/xinitrc-r1
@@ -0,0 +1,8 @@
+# .xinitrc
+[ -x /usr/bin/nvidia-settings ] && /usr/bin/nvidia-settings -l
+/usr/bin/xset s noblank
+/usr/bin/xset s off
+/usr/bin/xset -dpms
+/usr/bin/evilwm &
+# Configure arguments via /etc/conf.d/mythfrontend
+exec /usr/bin/mythfrontend
diff --git a/media-tv/mythtv/metadata.xml b/media-tv/mythtv/metadata.xml
new file mode 100644
index 00000000000..a1e2ee6a676
--- /dev/null
+++ b/media-tv/mythtv/metadata.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mythtv</herd>
+ <use>
+ <flag name="alsa">Allows MythTV to directly output sound to ALSA devices,
+ this is needed if you are using ALSA dmix or SPDIF. Note, you will have
+ to physically type your device into the MythTV configuration since it
+ will only give you /dev/dsp devices in the drop down.</flag>
+ <flag name="altivec">Builds ffmpeg's codec libraries with altivec
+ support.</flag>
+ <flag name="autostart">Uses a custom autostart configuration gleaned from
+ 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="cec">Allows you to control CEC enabled TVs via HDMI. Currently
+ requires a USB based CEC -&gt; HDMI injector between your TV and video
+ card since no graphics drivers support CEC natively.</flag>
+ <flag name="crystalhd">Allows you to utilize a Broadcom CrystalHD hardware
+ based video decoder to improve the performance of video decode.</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
+ useless.</flag>
+ <flag name="dvb">Enables support for Linux DVB cards. These include all
+ cards that work with digital signals such as ATSC, DVB-T, DVB-C, and
+ DVB-S, QAM-64, and QAM-256.</flag>
+ <flag name="egl">Support EGL video output.</flag>
+ <flag name="fftw">Support visualizations via <pkg>sci-libs/fftw</pkg></flag>
+ <flag name="hls">HTTP Live Streaming support</flag>
+ <flag name="ieee1394">Allows MythTV to communicate and use Firewire enabled
+ Cable boxes. These are typically found in the United States, where such
+ support is required by law. This will also install Firewire test
+ programs and external channel changers if the internal changer does not
+ work.</flag>
+ <flag name="jack">Allows MythTV to use JACK as your sound output device. You
+ will have to manually configure the path to your JACK settings.</flag>
+ <flag name="lcd">Tells MythTV that you have an instance of
+ <pkg>app-misc/lcdproc</pkg> configured on your machine and it should
+ output information such as current time, show name, episode name, etc to
+ that LCD.</flag>
+ <flag name="lirc">Adds LIRC support directly to MythTV allowing for built in
+ control via a LIRC device.</flag>
+ <flag name="perl">Builds the perl bindings for MythTV. Allows you to write
+ scripts in Perl to control your MythTV setup or communicate with
+ it.</flag>
+ <flag name="raop">Remote Audio Output Protocol (aka AirTunes/AirPlay)</flag>
+ <flag name="wrapper">Use Ubuntu mythtfrontend wrapper.</flag>
+ <flag name="xmltv">Pulls in the <pkg>media-tv/xmltv</pkg> TV listing
+ grabbers for users not using Schedules Direct.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">MythTV/mythtv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild b/media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild
new file mode 100644
index 00000000000..a691229d41c
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="9fd7c6102b2cd1a3760337663803b110446c6ea7"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user
+
+MYTHTV_VERSION="v0.26.0"
+MYTHTV_BRANCH="fixes/0.26"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="ftp://ftp.osuosl.org/pub/mythtv/${MY_P}.tar.bz2
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=profile"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ use vaapi && myconf="${myconf} --enable-vaapi"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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"
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild b/media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild
new file mode 100644
index 00000000000..babdf7fc423
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild
@@ -0,0 +1,350 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="aaae611819c6a6f92a55d5c82efb8738ec9a23df"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.1"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.1.tar.gz -> mythtv-0.27.1.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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"
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild b/media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild
new file mode 100644
index 00000000000..7c4ae99c9cd
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="082d5c1fbccd48dd862f14007c0445dee8502f3d"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.1"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.1.tar.gz -> mythtv-0.27.1.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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 "Note that the systemd unit now restarts by default and logs"
+ elog "to journald via the console at the notice verbosity."
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild b/media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild
new file mode 100644
index 00000000000..1eec0c6c44a
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="2d4a7c9235287b0589035974bff282e3f2e9a7e5"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.3"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.3.tar.gz -> mythtv-0.27.3.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ myconf="${myconf} $(use_enable libass)"
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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 "Note that the systemd unit now restarts by default and logs"
+ elog "to journald via the console at the notice verbosity."
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild b/media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild
new file mode 100644
index 00000000000..ec69473e960
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="e1d575da2fdde7ae7119972c688b0ddd15e676c4"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.3"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.3.tar.gz -> mythtv-0.27.3.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ myconf="${myconf} $(use_enable libass)"
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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 "Note that the systemd unit now restarts by default and logs"
+ elog "to journald via the console at the notice verbosity."
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild b/media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild
new file mode 100644
index 00000000000..1e30d86eafb
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="b305eb5b7fc662146e74983fa3754d622695cdeb"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.4"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.4.tar.gz -> mythtv-0.27.4.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ myconf="${myconf} $(use_enable libass)"
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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 "Note that the systemd unit now restarts by default and logs"
+ elog "to journald via the console at the notice verbosity."
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild b/media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild
new file mode 100644
index 00000000000..65287edf7ee
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.7"
+BACKPORTS="3b4390396bf09dfe3741508ecf7fc71a004abd01"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.4"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.4.tar.gz -> mythtv-0.27.4.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ myconf="${myconf} $(use_enable libass)"
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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 "Note that the systemd unit now restarts by default and logs"
+ elog "to journald via the console at the notice verbosity."
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild b/media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild
new file mode 100644
index 00000000000..ee4d0832be4
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild
@@ -0,0 +1,359 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.7"
+BACKPORTS="9498257571e8158926b60a0eefc74568c4436823"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27.5"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.5.tar.gz -> mythtv-0.27.5.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +wrapper +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+ echo "SOURCE_VERSION=\"${BACKPORTS}\"" > "${S}"/EXPORTED_VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/EXPORTED_VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ myconf="${myconf} $(use_enable libass)"
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=release"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ if use wrapper; then
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+ fi
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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 "Note that the systemd unit now restarts by default and logs"
+ elog "to journald via the console at the notice verbosity."
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/mythtv/mythtv-0.27_p20140321.ebuild b/media-tv/mythtv/mythtv-0.27_p20140321.ebuild
new file mode 100644
index 00000000000..f767c45a49d
--- /dev/null
+++ b/media-tv/mythtv/mythtv-0.27_p20140321.ebuild
@@ -0,0 +1,350 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.6"
+BACKPORTS="583395f5a376637efcd408a102fa64d0f188c12f"
+MY_P=${P%_p*}
+
+inherit flag-o-matic multilib eutils python user systemd
+
+MYTHTV_VERSION="v0.27"
+MYTHTV_BRANCH="fixes/0.27"
+
+DESCRIPTION="Homebrew PVR project"
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.tar.gz -> mythtv-0.27.tar.gz
+ ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+IUSE_INPUT_DEVICES="input_devices_joystick"
+IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
+egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \
+vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}"
+
+REQUIRED_USE="
+ bluray? ( xml )
+ theora? ( vorbis )"
+
+COMMON="
+ >=media-libs/freetype-2.0:=
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXinerama:=
+ x11-libs/libXv:=
+ x11-libs/libXrandr:=
+ x11-libs/libXxf86vm:=
+ >=dev-qt/qtcore-4.7.2:4=
+ >=dev-qt/qtdbus-4.7.2:4=
+ >=dev-qt/qtgui-4.7.2:4=
+ >=dev-qt/qtscript-4.7.2:4=
+ >=dev-qt/qtsql-4.7.2:4=[mysql]
+ >=dev-qt/qtopengl-4.7.2:4=[egl?]
+ >=dev-qt/qtwebkit-4.7.2:4=
+ x11-misc/wmctrl:=
+ virtual/mysql:=
+ virtual/opengl:=
+ alsa? ( >=media-libs/alsa-lib-1.0.24:= )
+ bluray? (
+ dev-libs/libcdio:=
+ media-libs/libbluray:=
+ )
+ cec? ( dev-libs/libcec:= )
+ dvb? (
+ media-libs/libdvb:=
+ virtual/linuxtv-dvb-headers:=
+ )
+ dvd? ( dev-libs/libcdio:= )
+ egl? ( media-libs/mesa:=[egl] )
+ fftw? ( sci-libs/fftw:3.0= )
+ hls? (
+ media-libs/faac:=
+ media-libs/libvpx:=
+ >=media-libs/x264-0.0.20111220:=
+ >=media-sound/lame-3.93.1
+ )
+ 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 )
+ libass? ( >=media-libs/libass-0.9.11:= )
+ lirc? ( app-misc/lirc )
+ perl? (
+ dev-perl/DBD-mysql
+ dev-perl/Net-UPnP
+ dev-perl/LWP-Protocol-https
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-INET6
+ >=dev-perl/libwww-perl-5
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? (
+ dev-python/mysql-python
+ dev-python/lxml
+ dev-python/urlgrabber
+ )
+ raop? (
+ dev-libs/openssl:=
+ net-dns/avahi[mdnsresponder-compat]
+ )
+ theora? ( media-libs/libtheora:= media-libs/libogg:= )
+ vaapi? ( x11-libs/libva:= )
+ vdpau? ( x11-libs/libvdpau:= )
+ vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= )
+ xml? ( >=dev-libs/libxml2-2.6.0:= )
+ xvid? ( >=media-libs/xvid-1.1.0:= )
+ !media-tv/mythtv-bindings
+ !x11-themes/mythtv-themes
+ media-libs/taglib:=
+ dev-libs/glib:=
+ "
+
+RDEPEND="${COMMON}
+ media-fonts/corefonts
+ media-fonts/dejavu
+ media-fonts/liberation-fonts
+ x11-apps/xinit
+ autostart? (
+ net-dialup/mingetty
+ x11-wm/evilwm
+ x11-apps/xset
+ )
+ dvd? ( media-libs/libdvdcss:= )
+ xmltv? ( >=media-tv/xmltv-0.5.43 )
+ "
+
+DEPEND="${COMMON}
+ dev-lang/yasm
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ "
+
+S="${WORKDIR}/${MY_P}/mythtv"
+
+MYTHTV_GROUPS="video,audio,tty,uucp"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+ enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
+ usermod -a -G ${MYTHTV_GROUPS} mythtv
+}
+
+src_prepare() {
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ # 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
+
+ # Fix up the version info since we are using the fixes/${PV} branch
+ echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION
+ echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION
+
+ echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro
+
+ epatch "${FILESDIR}/libdir-27.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=
+
+ # Setup paths
+ myconf="${myconf} --prefix=${EPREFIX}/usr"
+ myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)"
+ myconf="${myconf} --libdir-name=$(get_libdir)"
+ myconf="${myconf} --mandir=${EPREFIX}/usr/share/man"
+
+ # Audio
+ myconf="${myconf} $(use_enable alsa audio-alsa)"
+ myconf="${myconf} $(use_enable jack audio-jack)"
+ use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
+
+ use altivec || myconf="${myconf} --disable-altivec"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable ieee1394 firewire)"
+ myconf="${myconf} $(use_enable lirc)"
+ myconf="${myconf} $(use_enable xvid libxvid)"
+ myconf="${myconf} --dvb-path=/usr/include"
+ myconf="${myconf} --enable-xrandr"
+ myconf="${myconf} --enable-xv"
+ myconf="${myconf} --enable-x11"
+ myconf="${myconf} --enable-nonfree"
+ use cec || myconf="${myconf} --disable-libcec"
+ use raop || myconf="${myconf} --disable-libdns-sd"
+ myconf="${myconf} $(use_enable theora libtheora)"
+ myconf="${myconf} $(use_enable vorbis libvorbis)"
+
+ if use hls; then
+ myconf="${myconf} --enable-libmp3lame"
+ myconf="${myconf} --enable-libx264"
+ myconf="${myconf} --enable-libvpx"
+ myconf="${myconf} --enable-libfaac"
+ fi
+
+ 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
+
+ use python && myconf="${myconf} --python=$(PYTHON)"
+
+ if use debug; then
+ myconf="${myconf} --compile-type=debug"
+ else
+ myconf="${myconf} --compile-type=profile"
+ #myconf="${myconf} --enable-debug" does nothing per sphery
+ #myconf="${myconf} --disable-stripping" does nothing per sphery
+ fi
+
+ # Video
+ use vdpau && myconf="${myconf} --enable-vdpau"
+ myconf="${myconf} $(use_enable vaapi)"
+ use crystalhd && myconf="${myconf} --enable-crystalhd"
+
+ # Input
+ use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
+
+ # Clean up DSO load times and other compiler bits
+ myconf="${myconf} --enable-symbol-visibility"
+ myconf="${myconf} --enable-pic"
+
+ # CPU settings
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host"
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ myconf="${myconf} --cross-prefix=${CHOST}-"
+ fi
+
+ # Build boosters
+ has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
+ has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
+
+ chmod +x ./external/FFmpeg/version.sh
+
+ einfo "Running ./configure ${myconf}"
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ ${myconf} || die "configure died"
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die "install failed"
+ dodoc AUTHORS UPGRADING README
+
+ insinto /usr/share/mythtv/database
+ doins database/*
+
+ newinitd "${FILESDIR}"/mythbackend.init mythbackend
+ newconfd "${FILESDIR}"/mythbackend.conf mythbackend
+ systemd_dounit "${FILESDIR}"/mythbackend.service
+
+ dodoc keys.txt
+
+ keepdir /etc/mythtv
+ chown -R mythtv "${ED}"/etc/mythtv
+ keepdir /var/log/mythtv
+ chown -R mythtv "${ED}"/var/log/mythtv
+ dodir /var/log/mythtv/old
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
+
+ insinto /usr/share/mythtv/contrib
+ doins -r contrib/*
+
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
+
+ if use autostart; then
+ dodir /etc/env.d/
+ echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
+
+ insinto /home/mythtv
+ newins "${FILESDIR}"/bash_profile .bash_profile
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
+ fi
+
+ # Make Python files executable
+ find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
+ if [[ ! "${file##*/}" = "__init__.py" ]]; then
+ chmod a+x "${file}"
+ fi
+ done
+
+ # Ensure that Python scripts are executed by Python 2
+ python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv"
+
+ # Make shell & perl scripts executable
+ find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
+ while read file; do
+ chmod a+x "${file}"
+ done
+}
+
+pkg_preinst() {
+ export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize MythTV
+
+ elog "To have this machine operate as recording host for MythTV, "
+ elog "mythbackend must be running. Run the following:"
+ elog "rc-update add mythbackend default"
+ elog
+ elog "Your recordings folder must be owned 'mythtv'. e.g."
+ elog "chown -R mythtv /var/lib/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"
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup MythTV
+}
+
+pkg_info() {
+ if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
+ "${EROOT}"/usr/bin/mythfrontend --version
+ fi
+}
+
+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."
+ "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
+}
diff --git a/media-tv/nvtv/Manifest b/media-tv/nvtv/Manifest
new file mode 100644
index 00000000000..411c8a81481
--- /dev/null
+++ b/media-tv/nvtv/Manifest
@@ -0,0 +1 @@
+DIST nvtv-0.4.7.tar.gz 419564 SHA256 f044c6de2df66196fa589ed0d33203bd10d88604f447befce1a6f62eb7b08dac
diff --git a/media-tv/nvtv/files/nvtv.start b/media-tv/nvtv/files/nvtv.start
new file mode 100644
index 00000000000..0d8044537ef
--- /dev/null
+++ b/media-tv/nvtv/files/nvtv.start
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use modules logger
+}
+
+start() {
+ ebegin "Starting NVidia TV-Out Server"
+ start-stop-daemon --start --quiet --exec /usr/sbin/nvtvd \
+ --background 1>&2
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NVidia TV-Out Server"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nvtvd 1>&2
+ eend $?
+}
diff --git a/media-tv/nvtv/metadata.xml b/media-tv/nvtv/metadata.xml
new file mode 100644
index 00000000000..2e8d3be4630
--- /dev/null
+++ b/media-tv/nvtv/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>media-tv@gentoo.org</email>
+ <name>media-tv</name>
+ </maintainer>
+ <longdescription>TV-Out for NVidia cards</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nv-tv-out</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/nvtv/nvtv-0.4.7-r1.ebuild b/media-tv/nvtv/nvtv-0.4.7-r1.ebuild
new file mode 100644
index 00000000000..f16230494ae
--- /dev/null
+++ b/media-tv/nvtv/nvtv-0.4.7-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+IUSE="X gtk"
+
+DESCRIPTION="TV-Out for NVidia cards"
+HOMEPAGE="http://sourceforge.net/projects/nv-tv-out/"
+SRC_URI="mirror://sourceforge/nv-tv-out/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~amd64"
+
+RDEPEND="sys-apps/pciutils[-zlib]
+ gtk? ( x11-libs/gtk+:2 )
+ X? ( x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXxf86vm )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xf86vidmodeproto )"
+
+src_configure() {
+ local myconf
+
+ if use gtk
+ then
+ myconf="${myconf} --with-gtk"
+ else
+ myconf="${myconf} --without-gtk"
+ fi
+
+ use X \
+ && myconf="${myconf} --with-x" \
+ || myconf="${myconf} --without-x"
+
+ econf ${myconf}
+}
+
+src_compile() {
+ # The CFLAGS don't seem to make it into the Makefile.
+ cd src
+ emake CXFLAGS="${CFLAGS}" || die
+}
+
+src_install() {
+ dobin src/nvtv || die
+ dosbin src/nvtvd || die
+
+ dodoc ANNOUNCE BUGS FAQ INSTALL README \
+ doc/USAGE doc/chips.txt doc/overview.txt \
+ doc/timing.txt xine/tvxine
+
+ newinitd "${FILESDIR}"/nvtv.start nvtv
+}
diff --git a/media-tv/shoutcast2vdr/Manifest b/media-tv/shoutcast2vdr/Manifest
new file mode 100644
index 00000000000..2a270638a50
--- /dev/null
+++ b/media-tv/shoutcast2vdr/Manifest
@@ -0,0 +1 @@
+DIST shoutcast2vdr-0.0.8.gz 3538 SHA256 fa63f656ea5a0f25794337e26aac0bedf74f2758bef65bf51ffb750c326bb227 SHA512 ae5ce60c993ff85b3ac9ab3567be55a22ad1929b98a035b323583fa6166b21a96bd7e7017917865d4a339790e7d6c1113820d7230787225d97c68e2174f02c37 WHIRLPOOL 322ea24c91ca63e1629656d0df05400a56296854305aa41274211eabc8a1143bd766d571c4b7922193df23dc8be65830df6970457b18f451f6ede8443c9007b5
diff --git a/media-tv/shoutcast2vdr/metadata.xml b/media-tv/shoutcast2vdr/metadata.xml
new file mode 100644
index 00000000000..d1b88e6872a
--- /dev/null
+++ b/media-tv/shoutcast2vdr/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+<maintainer>
+<email>vdr@gentoo.org</email>
+<name>Gentoo VDR Project</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8-r1.ebuild b/media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8-r1.ebuild
new file mode 100644
index 00000000000..3c43bf1f0fb
--- /dev/null
+++ b/media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="VDR script: generate shoutcast playlists"
+HOMEPAGE="http://www.vdr-portal.de/board/thread.php?threadid=19478"
+SRC_URI="http://www.kost.sh/vdr/${P}.gz"
+
+KEYWORDS="amd64 x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+DEPEND="media-video/vdr"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+PLAYLIST_DIR="/var/cache/vdr/music/playlists"
+
+src_prepare() {
+ sed -i shoutcast2vdr-0.0.8 -e "s:outputdir=/home/volker/vdr/radio:outputdir=${PLAYLIST_DIR}:"
+
+ # wrt bug 520624
+ sed -i shoutcast2vdr-0.0.8 -e "s:mkdir:mkdir -p:"
+}
+
+src_install() {
+ exeinto /usr/share/vdr/shoutcast2vdr
+ newexe shoutcast2vdr-0.0.8 shoutcast2vdr
+}
diff --git a/media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8.ebuild b/media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8.ebuild
new file mode 100644
index 00000000000..a30c7348cd5
--- /dev/null
+++ b/media-tv/shoutcast2vdr/shoutcast2vdr-0.0.8.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="VDR script: generate shoutcast playlists"
+HOMEPAGE="http://www.vdr-portal.de/board/thread.php?threadid=19478"
+SRC_URI="http://www.kost.sh/vdr/${P}.gz"
+
+KEYWORDS="amd64 x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+DEPEND="media-video/vdr"
+
+S="${WORKDIR}"
+
+PLAYLIST_DIR="/var/cache/vdr/music/playlists"
+
+src_unpack() {
+
+ unpack ${A}
+ cd "${S}"
+
+ sed -i shoutcast2vdr-0.0.8 -e "s:outputdir=/home/volker/vdr/radio:outputdir=${PLAYLIST_DIR}:"
+}
+
+src_install() {
+
+ exeinto /usr/share/vdr/shoutcast2vdr
+ newexe shoutcast2vdr-0.0.8 shoutcast2vdr
+
+ keepdir ${PLAYLIST_DIR}
+}
diff --git a/media-tv/tvbrowser/Manifest b/media-tv/tvbrowser/Manifest
new file mode 100644
index 00000000000..46c4a6bb05e
--- /dev/null
+++ b/media-tv/tvbrowser/Manifest
@@ -0,0 +1,52 @@
+DIST BeOSthemepack.zip 39412 SHA256 ec2acb46a77f38a9750ede23ab573b2c2773bedd37fa1ac7bbaa0bdc74982574 SHA512 479d9180cf8678cb555a86ecc80d19f0f615f7c2f5807acf550d117cfda44155ca80315f51f67c17799b71f9768e9988919d23bfd38abce0887195f30ecb97c3 WHIRLPOOL 430f961de95389f7b503da63fdb01881dad4a54f4799d99917336eff0b167f11b7d6287bc10618292255a93665e498b04d57e6e40526b8688bd3e09f94ea6959
+DIST amarachthemepack.zip 53700 SHA256 80bbe3df2c3e44f26bb390994e271264bcc71ff581527039bf677fa38df4a547 SHA512 da0a082dea2abccec47137ef1db54a57b1becfbf0fc1b99fe41c0f60c254f1963dfde032bd622d034a3abde4ead1c2aa00f3ea2d872859ad384168ebe8fd1c52 WHIRLPOOL d748b611c12a3dcfb148282cad27626c802f70b260ac20397548625c3803e821ba0fb0d0a0157c53d72462dc8179d03cecc701c22b72da5130690ff42f1db1e1
+DIST aquathemepack.zip 90542 SHA256 eabbfc07a3aa6172145c3786d5ec2abe5185daad358718305e9cd920642b4b01 SHA512 f73c60c0273f796487d04adbc9e6e535a6117f07154b48ad0d41725b50674762fa14b340cf3869167e8eac6f28ddb2e7b0133a0f5ab8fdf548fb7d6419ac9ceb WHIRLPOOL b8bff080331b67a3ebe8eedf5fd854efa95e3155ba5375b8d80ed3ba053ed8fd8de0761b83ae0a2139e47ec852aa0c1eb92a8b9c9df49f3b15b5c25aa52ada1a
+DIST architectBluethemepack.zip 52161 SHA256 4a6cb351ed88e924fb06a35f3e5a7bfbc01013c2464cb8a2edd0f15a9b7bc39b SHA512 67cff378b8b6eb033e61d8b1c1dc689316e4fe80233d7b2f40a1579bd8ae5b04de2797cbdfb2083bf4922594ffa2955ea0f920a9346e0ffc2dbc659cf864e408 WHIRLPOOL a8c89b8500a31e6cb681db11816d4afb49f6eed7c54458359837a8d025a688b62b2ac63b5eb4fa65ec1763f78177912988012c6003d191644b93a0f7d6700218
+DIST architectOlivethemepack.zip 52265 SHA256 eafff0696a2db1ee258448689d945d5720faa8e70877f44fb6c8de9847365693 SHA512 b2dd6cfa4ff0e45e663bb672cb53e58aa954f86b639f761df128c4fdaf9f37d5e9ff2b3f58b3aebe6c763943b69ec56fedda33ce342fe575c4e1ce5e2d6293f7 WHIRLPOOL b0b783d083003d1c6d28449030e951cad88b75731b163fd6cf1c6eccf4ad5454002b19bd312241b6b643c7883b39e593c0accd43fc8a0596f02d006a6d7a05fb
+DIST b0sumiErgothempack.zip 54621 SHA256 fedc7995976f35487a8c7acc2712d993e4a328352494ee8899c58d3ddce885f7 SHA512 6caf37070e214b5ebad3c18f6bf743f04d66b97334f154b698e9e502f56c459c7cf3dbc2101fba61312ca28e35712c0dd27ec64631cb8863b34f9228521955c9 WHIRLPOOL bc644f132025219d3e049f6cefba6bf445ada164b159a75c81d8875038839e4ea30384efea9b77cdffa05e3704bf0415eaae71ef01e3f8a66e1a6ed7f8121051
+DIST b0sumithemepack.zip 53817 SHA256 ba28a68ef1627ed44c67370645601d0a53ace6c9ed23ae139159d923d48ebc3f SHA512 77fca69c714e4f1966ec6a893e1ca990108bd2e967e4ab762445de8c57f6436d83d762c43fbae3d46a5631ced1166a74f4b67742a61b75b65d1f22e18c03360e WHIRLPOOL e556ef033a5e5d6da0727da8185b5e9e80910e7ae5c6be9a60be6d82b73b1bfc2ef6fcc2fd35ffe459d9b240cd036b82f2b22aae58e56e9b9a3ae6dde067cf6b
+DIST bbjthemepack.zip 63397 SHA256 e6d3900a0486c5bd808df5660329505cde601752ee7058fe2e1efe3cdc3a3ea3 SHA512 619787c2449bbecea496565e15ed49d7ca65b7d8a9a0122300c5f397ab921431e495cb7256166a908b82dc48f17dc3c4bfd559805c5c4325fa074c86ac3fac4c WHIRLPOOL acb633297a98e22bdef791304c7405a77a9bcbcd743bae98ce93a341fcdc160dc8b4dcbefcef100675ba2948603e322fd4ee537d8a04b17893556fb122aa4671
+DIST beigeazulthemepack.zip 81543 SHA256 185eae63d028f76923f201209d3fdd39222f9df6a73ee7d19b38a859551432e2 SHA512 7bf5529766f6ff19a8ce2c5ff6e2782d1deead8595efbc6b88a79fd8fa0be8f64e8e023d7997c1d0d8554beccde82e09c118e98bd3532faf63fa3466a15de392 WHIRLPOOL d7be6dbfcb7e89856fb7681b2c63cb6156c4006bbf04459a1a77d08ce880754546f9bf85eb8cd992481f597b2b4f8d52db9f530034b9470c96409437f2969b83
+DIST beosthemepack.zip 22851 SHA256 1a5744c1fdf68e0f6893ef27300de4be57327a532edfe751a808b1ae923815f7 SHA512 f1e49fa793e067c19d25576a4a4b1d18f6d78f7a5377da40c87d1d4829aa185581b75cda533e0bafd49db53f8f41e165be3145eabe4afac23503b42a42a593ff WHIRLPOOL 06b23321efa78375c4724f21a6d46a8d2d5d1595390306d1968bae1f07666c86beea18c137d36b2278b32ac01b0110e7938344addc4e811a8905b7c7eadada84
+DIST blueMetalthemepack.zip 67613 SHA256 205d44aa6a6035480c2e062c4b6876fa73545c45b513ec7bf1ce033cbc13336a SHA512 7b471a6debdb1fe42a4c005c768d2fa534ecf9f292f2ccce5f4e4d1968ccc57299e28e7f3ae9fcfecf032e924e0f3fd5186637d4676bebb80eea29170b5fc6f5 WHIRLPOOL fac2be1e4179850e1ed44d5249d000ac944ab97c690342cd013f7af106b812ea10fe447cb29388fdfc1a73b1f6e1929604e8f66fa444f593bb3c869938de6764
+DIST blueTurquesathemepack.zip 62676 SHA256 c3764fe15785e2aa63a5bd86f60d9d992fa8a52262cbc366d9b612286cf5abc3 SHA512 49be6c67e2e00eca499d92288f2d353971567046497286ab5b9c50c04a15429dcc11a8d35095af5e9f338fd375dd08ebbdba3acacfabef216142ed38d7abb652 WHIRLPOOL f0c58d78b78577c51e6098e888fb5e90688d429cfc7ac8916389d05d9654bbfa3c412e46fca6c691e08279b1ec26efcfd6cb81952990594319a84ba4cbb49da7
+DIST cellshadedthemepack.zip 54354 SHA256 bc2d594a4a4dce63b2db91bec7faa1f60398783fe0d26aed40215c004c6d8a24 SHA512 2d66e9c4dcc97a5e2bfef09d40e41c18ea5f285be5db8b2c62d9a7f1d6fbb51ca82f1ec2e656559bd25a5eddb9521e92ee609663dca612d7e4ba9d62a72a7f08 WHIRLPOOL f6d786ca4da3fd5ce3de53f28853a7758ae5296a681174259a2b057c11af6bbed10a235438e967886f71c71561bb2d7234cee85799bdd2720e8f3cd4d86ec903
+DIST chaNinja-Bluethemepack.zip 77692 SHA256 927bdc98a4cb1b26c5150f40d6e8825f33d34391b6703da8cc14c246dd8e461f SHA512 e2bd79f5ea5413df77f36b38a6922fdf7d55bdc4eb6be044b4ae2de97127d437f771b101e8349d1aef8b3e62a74838c3bce692d54b198691f6b477d882ccadf7 WHIRLPOOL 1c8e92d3d818fd7fa806e2f0d238a54de0afd65e52dac5bb709c065dc1685e0d209ce9660b5b98aa18913aa80284b07508eac7832142f66734ce9e52b015da13
+DIST coronaHthemepack.zip 82406 SHA256 79f1eab6d2c09c66001404bcb562d4db25edddfd142af2763c63fad6e96c775f SHA512 ad5ac7b3cb86f4dde835a880fe5fbca4a389a9b64c6404ace3ac809f1361d9524c298d579fd0de9da950d81cfff7d2cca6ff8fdfc502182d8b0e0d3fb6360898 WHIRLPOOL 20943fd9000a5ad8f654286ffda70f3e86ab9939bdbf2f11dc80b1fc71f51716ad1c98c00819c31f5131809eeb059b027daf9a76c1c9eb6ea4e82cb7362b4bd8
+DIST cougarthemepack.zip 49992 SHA256 d3b2b83ab1f149ee6cafe22e5bdb755ce1f46c68be43bdb989d8e9e63102d037 SHA512 687e776167b50a84863e97c3795280df68f65e1863f9655c5584b24ddf74a4509ac9ad769a3d939b9454c5835b08ea5d586ffbb249bf4307af7025a7a0369014 WHIRLPOOL 9343a2b9af429c15cf13e7a294ae8e9018675c60391f34ac2a0ae79bf82d73aaea2695123efdea6142f90d90729bf528a0e87b2c9266cef5e7ebbc44e3324cc3
+DIST crystal2themepack.zip 58696 SHA256 1b70750575aceca938f24ea7c25dccf4c899cccf926dda6bb4c1d3d8c10e2451 SHA512 875c4964af8fca451131ab2a071de094947528b648deb8aa653dd9a86832224d8ba92e19a22c926204acab7cf3342504ae8f28ba43bb5e911f886facdc4473b7 WHIRLPOOL 6ef37968c8a7aab088529c97592b60eabf2e90fe18def154278ae94498abc0c5950b18530d7fe83bc61e3ec9dc27afbadcd64cc26d596e8ecfd322f18e28eabe
+DIST fatalEthemepack.zip 57391 SHA256 c47933c59b6f55a2decea26b69f536c1d841b207d310c468586597af2659a553 SHA512 5dcf086e509be63a752ddab90e1d2691c194ec46f382f0a454f703694f562404e657ce434fed1cfe9c5760b541e44a71b1c43ce826d917f6f5c424ac1fd0fc1a WHIRLPOOL 436b50d947cdb7062081dab871aa631f019c3708294cd6f4e04c5656f7c1a71801487ae0795de7f837d4d694d7e900f52616db1ec712c28fbe3999b69fca2f89
+DIST gfxOasisthemepack.zip 55859 SHA256 2b9e71141ede87fee8dbef4858c3e707866ab96a1d070cd1745d54da62bf79d2 SHA512 6335fa82c27a92ee188318a4829fa4a50af5b6fafda102096a27239d236eb023ad45d43dcd08533bcc6442298ed323cba4db62278036a9da366a85c3fb73006c WHIRLPOOL 63b4c36ddb28bac1615b4037c1562f5728fe75b80ad136a5545bab44980315f7074ac2ae64d62ef7a43191c5cccf4fee63c45341cd95193c307216981509603e
+DIST gorillathemepack.zip 43281 SHA256 f508880ab9610fde40b187a14844c52f11197e331b98506a536b27733756cc60 SHA512 cbc53c8ad1ea8cda40bf1ff43d92da9890831e8d25945c0930bcadcf298e7640bb3d55511d5065e360a03c864db313dd602911ec25e8b8169d74b797d0a6263a WHIRLPOOL 0362893ac81e0c3493e0fdcd86f0dc12739d07a8ebee9c5beea4fb4947bd8baf5c69f2ae2d57d102df8a52fff4fd8ac930a0a9482a2f9b2e75320a257e19eb11
+DIST hmmXPBluethemepack.zip 40046 SHA256 42c18247445e3d6624b326cee90a81e1977891c8e580b649033a295585a72102 SHA512 1f0dc4d22171cb2430a5e7a1827262fa4b2530d6230b893e94d52933a94656392200047849fde652dee004303811d308ce98d95994c6580b26a4ed50915e42f8 WHIRLPOOL c8d39856fd4baf82fed262a0e479d2a2d4829e3d999dd5c0e8e12a53f74660df427deb9adbda6a4547a819a6f979c98c36841209153c057677d0fe9b9a78e7ea
+DIST hmmXPMonoBluethemepack.zip 39815 SHA256 7886dcc91c0d692c3d80b0016f89724187a8a90e70d59bfb6c64d9506ece77cb SHA512 4d8fd6f445234f8f1f50ec6a77dbef6d86521d910bc8ff54afba340d82a5a39b9227ec33e6889745c9ad6f607d023375ab3a2e7b97cc41744f4066209f0ac03a WHIRLPOOL 448fb99e9405cbe08c6d9b762e2ee1f0f07d87975ce74a2fffb6901fcf279a8a6ab5fa5486a11d1cf5e99a25ee6921013ec5608538f54653158b7a2e191b2cb6
+DIST iBarthemepack.zip 68829 SHA256 acf46246336007f161dd396cc92ff17927dc45991ffb8a54c24620493ed65b6b SHA512 c4a5d3921cba2980dd147d62ec4db9aee44b7be35af3c5a50adfbb861edd95ed61655b31346e51efa1b087f04891890ed44597c456cd7fd3704f8605375733d2 WHIRLPOOL 1fccd783da812cf88f9d8eca380639287af9c3ee9f30e03943a77d0764bcb0c785df7d6b2513cd57dd012dd55e217bbc59a6005669ee1c35ba36d846fb966ca9
+DIST macosthemepack.zip 38584 SHA256 3876e6adffff030bb5dc605c80632cfb3518f8f8d6d3540776c74c2662b14e17 SHA512 53dccdaacdcc277d9ae2464a85d285f7ea740d49e0464212b4089f0ce6f08ccb69b295bf9ac4bf8c324cef2f4cedce1b3dcc8e7cde9b0a510860c9071abbc191 WHIRLPOOL a1b81763dd71be046f39a07ee7e7e105f23458ad605af45ff93f725013a4a0907211ea57debecc1a93ccc3f0d2dd852516ccc975b694962d970646400a0b578c
+DIST midnightthemepack.zip 44585 SHA256 b3517806229fabcf5872da7acbe3d0878a710e4cee63908423a384bf5b4f8eed SHA512 be59dec17246aac30fd767de4e0d21fd467e17cc1f4ac8080e1b63d2d2e0d5e70424d0bd1e5b6be53d09167ff4c6af848807682c8bd514cdc7d879d13e96bfc2 WHIRLPOOL 9cb41da825560cbf884fd1906a55e43d1c96ae7f650d576fc4faea1e483ee4442c72588ce94c5ddd5ba0bdea3341141cfec05b4262936f5813609a49a6aa127a
+DIST mmMagra-Xthemepack.zip 76329 SHA256 e6c4062797568f4a1667974529e17d9c50ebc1a1fbcc826f0f536eaf4919ac34 SHA512 17838f010083298bdf652177c601ee73d2dfdc0661f03999992eefe2382302ad033a8e284c093d3a93698869a2e5e5617659618ba44e5b342cfb882bdd4282b0 WHIRLPOOL 0f71e67060a62b4c8bd5b4bb8a4899be48facc436976fdb24f2d90154c9223154a69188c0d97d1dc3a2efee138b83a496eea4270762de8feb1afa1ef02a10dc2
+DIST modernthemepack.zip 97490 SHA256 1b64d58c6ef0b00e3b7128bb242ae80da14977f7d54ef24b09102aa212b2ac70 SHA512 607df1e04b58dbdded89ec673b25046d254e49698c450e57dba43b6dad235e96b1521a5b604834626daa75b9922027dc985ffdf902216ffbe66f279258dc4caa WHIRLPOOL 5d823097b5a4b7a5287c0f2876c86641ca06a61f0cdc93023b44e1e0c9f3f999997535cdc65df3ac2c16bb924bdde76a48f54510b1aa2c95c434e954e8b967d1
+DIST noia.zip 174721 SHA256 bd6236c8c8cb7c38d667904130417927a154c4201b5373b65260466083fb7a7d SHA512 f883bcc8e8242b74a32252b1fcf2a87e4329b756eb52b0137b286cc7e766f5aebea31743cf7c95376034655c3f36fe81882be8cd0caa873dc99dbe2b18ebaa1f WHIRLPOOL 92700a98bfac5211e49d597aa533fc6c6db7d44c7b8c1745e4ebe082fd4ea810a6c29df0f37a42d29f063e0eaf8ca6b2dadc8c33434bfd72a2a7e8a07acaa872
+DIST nuvola.zip 286612 SHA256 8ac40d72387663961062d09dbc749f2b2a865aebca8243bf94cb8d5101e9e894 SHA512 db47fbaf0f3eb1cb3613c4e5878c98f7fcb4c9db7fccd65d0e443debaf7de6b98bf5a03510e6f6fc6bcd071ec0c814a39aba42c09b8ba29ca26ebb630d5e7a3e WHIRLPOOL 0150f8a396d08d524cec59dbb28521b4d7c077db65989c4dd63b6aa1fedbdf9661eb408329b81603be47cc0ecb2b46218c30025f80b8fd4be4a4bf517bd04c06
+DIST oliveGreenLunaXPthemepack.zip 62509 SHA256 bd71c50b464a5778a3af4c7c0eec18d6917b378a960b1ba7d31dfa272d13ab49 SHA512 0fc245c02907fdf0984963d77e2da47dcb7c5d54fd2f68f893759ebc9ceb8702267325373edce3def03e96c695965df6946ddcf3d58f144e20a51d52307d4024 WHIRLPOOL 29ef223d3ca76df2f00ed6ac05901e604e1687db125f2d72eb1f364abf8949846a445b61b0301ec7386e363ab1943d5c9e0e70e152c70351e4d1d689e79aa42e
+DIST opusLunaSilverthemepack.zip 55716 SHA256 c1e1e77e1f9bc328a5b472c522fc3c3daf69e6e86ced280cda57283a065f1bdc SHA512 4701d500aca71ff0524a463731a266a306db5bf3127d40143478fbe239039d0cd38b3765bd42037ade2a14e55e79f5d2de47902042ded385e7b4016228315a0a WHIRLPOOL fbd0a6108de8eba157cea391934faeb0bef04f053101114bd48f5e86835b737f647f2e6e92de630da18499349acd96daa2787771a7bf60fc6ae52f0509695061
+DIST opusOSBluethemepack.zip 56227 SHA256 bea825716bfb76959a33607b4e7894a5ac1b09a0ca2e505e8441ba892f5fefcf SHA512 f1aa79ee4d6c1ce8efe19be3c275851bb3588e71961fe3f3b1cf3bf013ab1e80f55fb6a62e475a6a92864b25db0f646fa2d44490c66403c387df9f2468d9f3b6 WHIRLPOOL b1314b333fb931c41f50e486f1f359a7ef38ed265381a4f4260c8f0f2e3d2c9041d53beb18121a8044f38daedd5faa1ac63b576cc9608c47f4612d864d2b6e45
+DIST opusOSDeepthemepack.zip 56418 SHA256 527ad7ae50992b2dbb52217658c03cb855451dd7731b0b71bbc16eabd0a503df SHA512 3b89a6fadcd10e4be8be5f0d1fc5c0f54d0904dd462f1aa3284717b841296a19f2985faf79333091f59de45567ed77114ee6fb8039a3047d0c16f26e19af2ed9 WHIRLPOOL 0f4edcc40a4a1cd90c00cc134679fc3be77b3bf3a527162792e79a7be8790eac0456bc9137f11be67e4a1422e920efe847481015bbbaf147c2409096a60555f3
+DIST opusOSOlivethemepack.zip 55758 SHA256 a1d9e1ef4f0047151a7966eb19b2b0721ccbe5cc31de378b0081ac787b348e92 SHA512 9b60f6af405653a97ba959ca1fedd2b0f16e704f7b027d5999dbdc6331c28a217adbf041cc55499ad2b7f1e3c3e466afd5491a761a9f0f20bcb19612dcb43549 WHIRLPOOL ff8f9fe290d2b1e8213f8c373ca623ea32f1fed5a824c64e5f859284954c4e04e44aec8e63b7ba84819cffed4b0ecd87147f3379c538ee1f5961adc84499aada
+DIST quickSilverRthemepack.zip 75812 SHA256 4e6c4597a56d4a75daf17b94717792ea0e3ad4eeeb0f3c6fc154c80d38ae7a4e SHA512 8cb111da5da83a37bdef84f4219416dfc6b3c58c5713ac36c364d720474978c9605ae99682b5bced884978b3cb303e4682f12ffd9b490f2888e31f25665b9a91 WHIRLPOOL c9204f627e3cd88dab303d8ee13e82929c0851367aebd27b7c5f67a2169c98bd5f204b4f9993714821b40f81a442f37def3577acb4b83241b6f99d56f841e11d
+DIST roueBluethemepack.zip 48959 SHA256 9514431ae6a4ecf8ad6621b00ff01b583a46efe570c4309e13c26750fa4e0035 SHA512 807012473bb25024856178a8b7fa00628b1514065184ef1c5b88f57528fcc448bc6f4969cf3b8c2a318c6e139fecdccf6b62d32ceace4344a72be3242e3d7bd3 WHIRLPOOL 627a743da69f6f7bd2365cd431574cff66210204843edf1b79d20eb4bf91bfc32f4f7d85d95bf8aabebeddb82639bdf20a8ab501d49837cca7e061fc683bcfd0
+DIST roueBrownthemepack.zip 49043 SHA256 f6c02ae51aa197cc43db9a1854da54e24efdb590c254a259cc1844ce1a0ead79 SHA512 84e3f6c6a37a687aad1c0c78a61631ee8fa08f9b3d539e619400e7f1d8bf2f07bc946a39bbc6b4d654131e8b31a3159b7ecd60fa6bb772e4579eaef4700e2d0a WHIRLPOOL 33e2e7e61bea66e816a700b882c5e1e365c8af60f9997bd52df839b15f3ca634b9377b479e96da3815d544b6e621fe52e5c2d9b33a04fd5e8df871e5cce501e4
+DIST roueGreenthemepack.zip 48957 SHA256 87402bf8f7b508e6be51bf0305a9ad3bcdc5e3c311149bb2db2d66b3c19782e8 SHA512 ba302cf75c387e7e01462ce2b65ca490ee68ae79fa4e1aaf100396bfc24ceac556248acc2828cde6489f9ddd2c738482f7cf763a39df820f34ede1d562045bbb WHIRLPOOL 6d9a378b12a8f38d7a66dcb1f7a7541db0446f54722581c9dd4fe704910b76454bcc785065675059222966cabd9ee0a589db1c695ebf0e40490ffd68f49a9d3a
+DIST royalInspiratthemepack.zip 50579 SHA256 fcc9bdb217c78d22fed169e8c3686a652afeff8b46a845832709bea13270eb02 SHA512 69b6ce41595b5325850a0d2930e714b568871bf4c237aeb6361a4b7dc7d842c5b5eb30cfabe42662b8decf8e0101816c932730e32291ba606ce18d7cb9e71cac WHIRLPOOL e41c0ee12bc9f9327049a7dbcfd1b56cf5eed2544286e65cbe77237e769b3f55fbf19b716e0364107afea094c5347d989d4f039431c0f89a75dbcb1524a9d781
+DIST silverLunaXPthemepack.zip 54618 SHA256 f53cfa989a023b28337a7794956746de2aae81ab43784360db18b73c29197d52 SHA512 2949b849c50adf7f07ecc6e208d31fc9417ebb3e4dd79b4508616440d9a2e408d7b899f51e3dbe69bb754a335fa45ae6ca5e79c19353bb759f3eb79608f663c0 WHIRLPOOL f4e97bb78b0445a38b83ab4d55412b8afaf55de51a80118ef1bb24e5a330729f8c4643592f7b3c6f1c07029c8fddbcf99e1bc05515252cca923c8d0fc702a573
+DIST solunaRthemepack.zip 59579 SHA256 49a561c657223de888dd390c2011edb1fac1dc6a95543ffc41f70c0fe015a9d8 SHA512 1082c24b1cfa881e03c7c3a398c2dfe3260459118763dd461cdfc09d11b16107f252b62ba56714acf897b8f3c2399478e5362b0d13f7dbeee7f809d0a76a2eb8 WHIRLPOOL 232419fb5258b01f6e92466e993bc5106dc08164b7af006e59411693e9a3a8ba71a2d97967bac0e1eb9f7335b05c04aa3ae70d2d01c92c5a6bb08e16dbeb53b6
+DIST tango_without_heart.zip 217125 SHA256 6c7fce9223d1827bea881c2b9901d0e5c8a111e09ebab6e45ec0a9d70b07e9a6 SHA512 03ba432c84b58acb1f488ef9d5fafef3523188948696fd9a8b707be55210db90d227d18f09999d43975a834dabdb89d939328cbef564ba05cf162271dee4fc7b WHIRLPOOL f37427d27b07bdf3c4a2b2e2b5dca44202a84d2461bb43174828c3892a220fb40c445c1ee9cac042b650ea26788f6f9339ad509ba10cefe0cab20162add1fdf0
+DIST tigerGraphitethemepack.zip 75611 SHA256 94d2b4978686158a421122dec73b385725b21408c0941984b6f37677c965fb35 SHA512 6b40a4f920f2ce1e63d365a0f56ab6babe280a6d4da193b39262d677f0cb3c92ceb98da84acf7aa9e94eab0e8bf0cc607ad48fe4a77e1976007479125b75ed5d WHIRLPOOL 70b22222cfc70773c361b658510477e44947be68d785867b445799bade497ee9a172b0099f04c62996e96f59af372a807d8d10b1993496fb1e33ef56e6579437
+DIST tigerthemepack.zip 77856 SHA256 55002367d55ffe7953e5e059d9357ce6d9111bbba303532b91263ca7ec69dbf5 SHA512 7d6fb04f2f69f97eab7b5b58fd3e3df421b015dd0a49a426c00458c0e17d7add84a389304cf850511ffe637d6e37c6b759d8dcd39091c03049d5cc4da085a991 WHIRLPOOL 4bc4bae43bd8236cdd8a64b85d7be0e91df48b7133b924d4d14458cf62ecfd162dc61cbbdb60f5a70f11f6e2891a977d9ed8a89b064d7d6af794cab8c63b64a5
+DIST toxicthemepack.zip 68233 SHA256 a3d6c2311f8a35381c8aa3ac9b7bead5ba81b00a47d4e4bd27b5e38de6322600 SHA512 350f091bd67b2c78a4c69936bce9d7f922c1b57f3711f173d4763856a6f60ba0f284a3cb63fbfe810381d6ea6d21afe14fec13fb6e2efb526c28d1d79501bf02 WHIRLPOOL 3b0bb5d288714014d6635cb6fe86fdb284d80698f95eb750c7fbd86b7de611f08fc59a7d656e1ed5a64b15e8e11401e24af0dcda3d53de14af2368085de04007
+DIST tulliana.zip 258520 SHA256 d9a7670c3933757f58bc6913433b6f00e984c0cbff17eaf59076d951ac195a88 SHA512 96ae1835892763e70dd02b2739837063a57318b32a106556415037e8e0688db4d8caa9e7c50495ad6dbfc6ed9499b08af10956c164f5435bde2942b90ddb291a WHIRLPOOL 57e2052bca12b0fcb7eb889d6b51d775d74a6f4cd3cd1b638ffd06fb74a3336e26a7c6626ddcbcd204342d1c7f71614cdc8247a4aa245f17eef9997075be5135
+DIST tvbrowser_3.2.1_src.zip 17580308 SHA256 21edb1920d0603465caaa970c879b3fb19b56e485053555e54c694c80e8b2c8f SHA512 7ad27e0f0a3471fa9c1a7ceaba8896079295b3bbc757dc56f93391bb34a8802220cc4269776d1a18330e53482bc1255d1467d68a63ef2c42596af60d52983bbe WHIRLPOOL 0cb639119e88dec53484d562d6f68f0bfdd43c30f5b90a5b636f6702e1b8949c753f0df7e8f79f228163395901df30da9edac2b7c3c193af487b19f04ae43cb5
+DIST tvbrowser_3.4.1.0_src.zip 14256785 SHA256 e9079d4bb8a2b823770c3590662fa5bf9575b3ab7985201faa17dba01130248d SHA512 ec95898449209863ecb800db8395436be8946c30947ef25075caebe03db27c0393451a25f123d99b5d1ed82638920fa5102d4c1b16ddfdd9fd316f19de75d07a WHIRLPOOL aea5673ef79c0d962e01176ad59fa5174529d87db9efed044c85400df6d6897ce4053a0514e03e1a4bf01dac63a76d62206c0cbd4fec3dddb7b1dc4228fca6db
+DIST tvbrowser_3.4_src.zip 13991299 SHA256 841065b189c027074e94a44df4bd3e9e87a4bc5b21e73245715255dd68876bc9 SHA512 9bd3e510805714bde1474fbb2e76353d801962f309933d666ad489fd5d6a50c5dfbeb4a8a037a253153fd89172bb89ad0b008418b4cac837d04c16012e909ef9 WHIRLPOOL 87e1d4c60501cc63db9cebc9ffcb35abdb689c0fa6006eae8bb2b32e4f840cb84820b6d65168935be974c1b9799ad7ba56835d185bdea635c643c8e54ea0a405
+DIST underlingthemepack.zip 59786 SHA256 67dfd8757162dce375e02c250403a7184b64fbd1c1eb754a11373467ff96eb44 SHA512 d123c6ddb8db820a6d825e36433d31505b88e5e5578d0e368d639c3817893e9300d85bcd7a16a7a7329e962bf87919fad250d87e3759ceb32db6ffc1d6290c0a WHIRLPOOL 15bcccc7704389dfdde629dee895ecb37ac56ae89680b3e8629fd8539fef0a0c9218cdfa4969b2a1b8c841e4b3b5f0164e6cec395f43ab9c3c409ba5bc6b4f8c
+DIST whistlerthemepack.zip 32206 SHA256 0d8e5fab4cc148d35610f11061ddc7cd8eb23116919d99c8c673c1956ae6711e SHA512 1d9969fa436b7065db57f06ccd6ffb6b3c395a3ca4f976b9eb69445de9f63bfb55755e832269b3192365b5c30fb953998ca95d2b16e7c8bd06d78d8a42703a3c WHIRLPOOL 2724a0d005876a976a701c69509b701957edabd919b6e3d1a2cdfce1827a9a198de64a3f402af79004dee5db212f3732dde4e799d3e5016bcc95f993c18be362
+DIST xplunathemepack.zip 63343 SHA256 c8a2328597e0b05866919a2c925baf39dad294d1feade9d28cf4cf01722b95ee SHA512 79698db5fc4dfdcf85d96f595227679c4bc593d7f8e89923a3af0243ebeb0cb0a101bc48821f37f736298406c564f0332ab7eed5748a4efb092acd95827b4a06 WHIRLPOOL 784531315de55bb917b9451b0c9dd84f8a6a297594f8742743ed64a3702d9833c83104b422874c972e1d92b8a971ddaf2ac4bd8670054e40c2c908a8eb2bbe72
diff --git a/media-tv/tvbrowser/files/3.4-build.xml.patch b/media-tv/tvbrowser/files/3.4-build.xml.patch
new file mode 100644
index 00000000000..a1d6db698d2
--- /dev/null
+++ b/media-tv/tvbrowser/files/3.4-build.xml.patch
@@ -0,0 +1,150 @@
+diff --git a/tvbrowser-3.4/build.xml b/tvbrowser-3.4/build.xml
+index 2073823..615f576 100644
+--- a/tvbrowser-3.4/build.xml
++++ b/tvbrowser-3.4/build.xml
+@@ -104,31 +104,6 @@
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+- <!-- Creates an .app file for Mac OS X (http://informagen.com/JarBundler/) -->
+- <taskdef name="jarbundler"
+- classpath="deployment/macosx/jarbundler-2.0.0.jar"
+- classname="net.sourceforge.jarbundler.JarBundler" />
+-
+- <!-- Creates a Windows Executable using launch4j (http://launch4j.sf.net) -->
+- <taskdef name="launch4j"
+- classname="net.sf.launch4j.ant.Launch4jTask"
+- classpath="${deployment.dir}/win/launch4j/launch4j.jar:${deployment.dir}/win/launch4j/lib/xstream.jar" />
+-
+- <!-- Creates a linux desktopEntry-->
+- <taskdef name="desktopEntry"
+- classname="com.googlecode.ant_deb_task.DesktopEntry"
+- classpathref="ant-deb.classpath"/>
+-
+- <!-- Creates an Ubuntu package-->
+- <taskdef name="deb"
+- classname="com.googlecode.ant_deb_task.Deb"
+- classpathref="ant-deb.classpath"/>
+-
+- <!-- Creates a RedHad package-->
+- <taskdef name="rrpm"
+- classname="org.redline_rpm.RedlineTask"
+- classpathref="ant-rpm.classpath"/>
+-
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Display all targets
+@@ -304,6 +279,7 @@
+ <echo message="Creating the jars ..."/>
+
+ <!-- Extract the libraries for the tvbrowser.jar into the temp.dir -->
++ <!--
+ <unjar src="${lib.dir}/${lib.skinlf.name}-${lib.skinlf.version}.jar" dest="${unpacked.dir}/${lib.skinlf.name}.jar"/>
+ <unjar src="${lib.dir}/${lib.bsh.name}-${lib.bsh.version}.jar" dest="${unpacked.dir}/${lib.bsh.name}.jar"/>
+ <unjar src="${lib.dir}/${lib.jgoodies-common.name}-${lib.jgoodies-common.version}.jar" dest="${unpacked.dir}/${lib.jgoodies-common.name}.jar"/>
+@@ -318,6 +294,7 @@
+ <unjar src="${lib.dir}/${lib.texhyphj.name}-${lib.texhyphj.version}.jar" dest="${unpacked.dir}/${lib.texhyphj.name}.jar" />
+ <unjar src="${lib.dir}/${lib.substance.name}-${lib.substance.version}.jar" dest="${unpacked.dir}/${lib.substance.name}.jar" />
+ <unjar src="${lib.dir}/${lib.trident.name}-${lib.trident.version}.jar" dest="${unpacked.dir}/${lib.trident.name}.jar" />
++ -->
+
+ <!-- Pack the tvbrowser.jar -->
+ <jar jarfile="${tvbrowser-default.runtime.dir}/tvbrowser.jar"
+@@ -333,6 +310,7 @@
+ <fileset dir="${classes.dir}" includes="util/**"/>
+ <fileset dir="${classes.dir}" includes="com/**"/>
+ <fileset dir="${classes.dir}/imgs" includes="splash.png"/>
++ <!--
+ <fileset dir="${unpacked.dir}/${lib.skinlf.name}.jar" includes="com/**"/>
+ <fileset dir="${unpacked.dir}/${lib.skinlf.name}.jar" includes="org/**"/>
+ <fileset dir="${unpacked.dir}/${lib.bsh.name}.jar" includes="bsh/**"/>
+@@ -348,6 +326,7 @@
+ <fileset dir="${unpacked.dir}/${lib.texhyphj.name}.jar" includes="net/**"/>
+ <fileset dir="${unpacked.dir}/${lib.substance.name}.jar" includes="org/**"/>
+ <fileset dir="${unpacked.dir}/${lib.trident.name}.jar" includes="org/**"/>
++ -->
+ </jar>
+
+ <!-- Copy the other stuff -->
+@@ -406,8 +385,9 @@
+
+ <!-- Extract the libraries for the tvbrowser.jar into the temp.dir -->
+ <mkdir dir="${unpacked.dir}/${lib.commons.net.name}.jar"/>
++ <!--
+ <unjar src="${lib.dir}/${lib.commons.net.name}-${lib.commons.net.version}.jar" dest="${unpacked.dir}/${lib.commons.net.name}.jar"/>
+-
++-->
+ </target>
+
+
+@@ -446,7 +426,7 @@
+
+ <!-- Creates the runtime folder for the Mac platform -->
+ <target name="runtime-mac" depends="clean-mac, make-mac, runtime, test">
+-
++<!--
+ <delete dir="${tvbrowser-mac.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-mac.runtime.dir}"/>
+
+@@ -477,11 +457,12 @@
+ <copy todir="${tvbrowser-mac.runtime.dir}/TV-Browser.app/Contents/Resources">
+ <fileset dir="${deployment.dir}" includes="osx.properties"/>
+ </copy>
+-
++-->
+ </target>
+
+ <!-- Creates the desktop entry file for Linux platforms -->
+ <target name="tvbrowser-desktop-entry">
++ <!--
+ <desktopEntry
+ toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
+ name="TV-Browser"
+@@ -498,10 +479,12 @@
+ <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
+ </desktopEntry>
+ <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
++ -->
+ </target>
+
+ <!-- Creates the desktop entry file for Ubuntu platform -->
+ <target name="tvbrowser-desktop-entry-deb">
++ <!--
+ <desktopEntry
+ toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
+ name="${programname}"
+@@ -518,6 +501,7 @@
+ <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
+ </desktopEntry>
+ <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
++ -->
+ </target>
+
+ <!-- Creates the runtime folder for linux platforms -->
+@@ -673,6 +657,7 @@
+
+ <!-- Creates the windows exe file -->
+ <target name="exe" depends="runtime-win">
++ <!--
+ <launch4j configFile="${deployment.dir}/win/launch4j/tvbrowser.xml"
+ fileversion="${tvbrowser.version.file}"
+ productversion="${tvbrowser.version.file}"
+@@ -683,15 +668,18 @@
+ productversion="${tvbrowser.version.file}"
+ txtfileversion="${tvbrowser.version}"
+ txtproductversion="${tvbrowser.version}"/>
++ -->
+ </target>
+
+ <!-- Creates the windows transportable exe file -->
+ <target name="transportable-exe" depends="runtime-transportable">
++ <!--
+ <launch4j configFile="${deployment.dir}/win/launch4j/tvbrowser-transportable.xml"
+ fileversion="${tvbrowser.version.file}"
+ productversion="${tvbrowser.version.file}"
+ txtfileversion="${tvbrowser.version}"
+ txtproductversion="${tvbrowser.version}"/>
++ -->
+ </target>
+
+ <!-- Creates the release binaries (.exe installer) for windows platforms -->
diff --git a/media-tv/tvbrowser/files/3.4-remove-registrykey.patch b/media-tv/tvbrowser/files/3.4-remove-registrykey.patch
new file mode 100644
index 00000000000..e886aaf22d1
--- /dev/null
+++ b/media-tv/tvbrowser/files/3.4-remove-registrykey.patch
@@ -0,0 +1,154 @@
+diff --git a/tvbrowser-3.4/src/tvbrowser/TVBrowser.java b/tvbrowser-3.4/src/tvbrowser/TVBrowser.java
+index 1aaedb5..51558be 100644
+--- a/tvbrowser-3.4/src/tvbrowser/TVBrowser.java
++++ b/tvbrowser-3.4/src/tvbrowser/TVBrowser.java
+@@ -113,9 +113,6 @@ import util.ui.Localizer;
+ import util.ui.UIThreadRunner;
+ import util.ui.UiUtilities;
+ import util.ui.textcomponentpopup.TextComponentPopupEventQueue;
+-import ca.beq.util.win32.registry.RegistryKey;
+-import ca.beq.util.win32.registry.RegistryValue;
+-import ca.beq.util.win32.registry.RootKey;
+
+ import com.jgoodies.looks.LookUtils;
+ import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;
+@@ -575,77 +572,6 @@ public class TVBrowser {
+ public void run() {
+ ChannelList.completeChannelLoading();
+ initializeAutomaticDownload();
+- if (Launch.isOsWindowsNtBranch()) {
+- try {
+- RegistryKey desktopSettings = new RegistryKey(
+- RootKey.HKEY_CURRENT_USER, "Control Panel\\Desktop");
+- RegistryValue autoEnd = desktopSettings
+- .getValue("AutoEndTasks");
+-
+- if (autoEnd.getData().equals("1")) {
+- RegistryValue killWait = desktopSettings
+- .getValue("WaitToKillAppTimeout");
+-
+- int i = Integer.parseInt(killWait.getData().toString());
+-
+- if (i < 5000) {
+- JOptionPane pane = new JOptionPane();
+-
+- String cancel = mLocalizer.msg("registryCancel",
+- "Close TV-Browser");
+- String dontDoIt = mLocalizer.msg("registryJumpOver",
+- "Not this time");
+-
+- pane.setOptions(new String[] {
+- Localizer.getLocalization(Localizer.I18N_OK), dontDoIt,
+- cancel });
+- pane.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
+- pane.setMessageType(JOptionPane.WARNING_MESSAGE);
+- pane
+- .setMessage(mLocalizer
+- .msg(
+- "registryWarning",
+- "The fast shutdown of Windows is activated.\nThe timeout to wait for before Windows is closing an application is too short,\nto give TV-Browser enough time to save all settings.\n\nThe setting hasn't the default value. It was changed by a tool or by you.\nTV-Browser will now try to change the timeout.\n\nIf you don't want to change this timeout select 'Not this time' or 'Close TV-Browser'."));
+-
+- pane.setInitialValue(mLocalizer.msg("registryCancel",
+- "Close TV-Browser"));
+-
+- JDialog d = pane.createDialog(UiUtilities
+- .getLastModalChildOf(mainFrame), UIManager
+- .getString("OptionPane.messageDialogTitle"));
+- d.setModal(true);
+- UiUtilities.centerAndShow(d);
+-
+- if (pane.getValue() == null
+- || pane.getValue().equals(cancel)) {
+- mainFrame.quit();
+- } else if (!pane.getValue().equals(dontDoIt)) {
+- try {
+- killWait.setData("5000");
+- desktopSettings.setValue(killWait);
+- JOptionPane
+- .showMessageDialog(
+- UiUtilities.getLastModalChildOf(mainFrame),
+- mLocalizer
+- .msg("registryChanged",
+- "The timeout was changed successfully.\nPlease reboot Windows!"));
+- } catch (Exception registySetting) {
+- JOptionPane
+- .showMessageDialog(
+- UiUtilities.getLastModalChildOf(mainFrame),
+- mLocalizer
+- .msg(
+- "registryNotChanged",
+- "<html>The Registry value couldn't be changed. Maybe you haven't the right to do it.<br>If it is so contact you Administrator and let him do it for you.<br><br><b><Attention:/b> The following description is for experts. If you change or delete the wrong value in the Registry you could destroy your Windows installation.<br><br>To get no warning on TV-Browser start the Registry value <b>WaitToKillAppTimeout</b> in the Registry path<br><b>HKEY_CURRENT_USER\\Control Panel\\Desktop</b> have to be at least <b>5000</b> or the value for <b>AutoEndTasks</b> in the same path have to be <b>0</b>.</html>"),
+- Localizer.getLocalization(Localizer.I18N_ERROR),
+- JOptionPane.ERROR_MESSAGE);
+- }
+- }
+- }
+- }
+- } catch (Throwable registry) {
+- }
+- }
+
+ if (currentVersion != null
+ && currentVersion.compareTo(new Version(2, 71, false)) < 0) {
+diff --git a/tvbrowser-3.4/src/tvbrowser/ui/settings/StartupSettingsTab.java b/tvbrowser-3.4/src/tvbrowser/ui/settings/StartupSettingsTab.java
+index fa90661..fe13256 100644
+--- a/tvbrowser-3.4/src/tvbrowser/ui/settings/StartupSettingsTab.java
++++ b/tvbrowser-3.4/src/tvbrowser/ui/settings/StartupSettingsTab.java
+@@ -50,8 +50,6 @@ import tvbrowser.ui.mainframe.MainFrame;
+ import tvbrowser.ui.mainframe.PeriodItem;
+ import util.ui.Localizer;
+ import util.ui.UiUtilities;
+-import ca.beq.util.win32.registry.RegistryKey;
+-import ca.beq.util.win32.registry.RootKey;
+
+ import com.jgoodies.forms.builder.PanelBuilder;
+ import com.jgoodies.forms.factories.Borders;
+@@ -163,41 +161,6 @@ public class StartupSettingsTab implements devplugin.SettingsTab {
+ .getBoolean());
+ mSettingsPn.add(mShowStartScreenChB, cc.xy(2, ++y));
+
+- if (System.getProperty("os.name").toLowerCase().startsWith("windows") && !TVBrowser.isTransportable()) {
+- layout.insertRow(++y, RowSpec.decode("1dlu"));
+- layout.insertRow(++y, RowSpec.decode("pref"));
+-
+- try {
+- RegistryKey shellFolders = new RegistryKey(RootKey.HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders");
+- String path = shellFolders.getValue("Startup").getData().toString();
+-
+- if(path == null || path.length() < 1 || !(new File(path)).isDirectory()) {
+- throw new Exception();
+- }
+-
+- mLinkFileFile = new File(path,"TV-Browser.url");
+-
+- try {
+- mLinkFile = new LinkFile(mLinkFileFile);
+-
+- if(mLinkFileFile.isFile()) {
+- try {
+- if (!mLinkFile.hasTarget((new File("tvbrowser.exe")).getAbsoluteFile())) {
+- createLink(mLinkFile);
+- }
+- }catch(Exception linkException) {
+- mLinkFileFile.delete();
+- }
+- }
+- }catch(FileNotFoundException fe) {}
+-
+- mAutostartWithWindows = new JCheckBox(mLocalizer.msg("autostart","Start TV-Browser with Windows"),
+- mLinkFileFile.isFile());
+-
+- mSettingsPn.add(mAutostartWithWindows, cc.xy(2, y));
+- } catch (Throwable e) {e.printStackTrace();}
+- }
+-
+ y++;
+
+ mSettingsPn.add(createRefreshPanel(), cc.xyw(1,++y,5));
+@@ -513,4 +476,4 @@ public class StartupSettingsTab implements devplugin.SettingsTab {
+ return new File(mTarget).equals(file);
+ }
+ }
+-}
+\ No newline at end of file
++}
diff --git a/media-tv/tvbrowser/files/3.4.1.0-build.xml.patch b/media-tv/tvbrowser/files/3.4.1.0-build.xml.patch
new file mode 100644
index 00000000000..570bff32db7
--- /dev/null
+++ b/media-tv/tvbrowser/files/3.4.1.0-build.xml.patch
@@ -0,0 +1,109 @@
+--- build.xml.orig 2015-03-24 17:34:18.753531031 +0000
++++ build.xml 2015-03-24 17:38:48.013509290 +0000
+@@ -105,32 +105,6 @@
+ | Task definitions
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+-
+- <!-- Creates an .app file for Mac OS X (http://informagen.com/JarBundler/) -->
+- <taskdef name="jarbundler"
+- classpath="deployment/macosx/jarbundler-2.0.0.jar"
+- classname="net.sourceforge.jarbundler.JarBundler" />
+-
+- <!-- Creates a Windows Executable using launch4j (http://launch4j.sf.net) -->
+- <taskdef name="launch4j"
+- classname="net.sf.launch4j.ant.Launch4jTask"
+- classpath="${deployment.dir}/win/launch4j/launch4j.jar:${deployment.dir}/win/launch4j/lib/xstream.jar" />
+-
+- <!-- Creates a linux desktopEntry-->
+- <taskdef name="desktopEntry"
+- classname="com.googlecode.ant_deb_task.DesktopEntry"
+- classpathref="ant-deb.classpath"/>
+-
+- <!-- Creates an Ubuntu package-->
+- <taskdef name="deb"
+- classname="com.googlecode.ant_deb_task.Deb"
+- classpathref="ant-deb.classpath"/>
+-
+- <!-- Creates a RedHad package-->
+- <taskdef name="rrpm"
+- classname="org.redline_rpm.RedlineTask"
+- classpathref="ant-rpm.classpath"/>
+-
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Display all targets
+@@ -329,6 +303,7 @@
+ <echo message="Creating the jars ..."/>
+
+ <!-- Extract the libraries for the tvbrowser.jar into the temp.dir -->
++ <!--
+ <unjar src="${lib.dir}/${lib.skinlf.name}-${lib.skinlf.version}.jar" dest="${unpacked.dir}/${lib.skinlf.name}.jar"/>
+ <unjar src="${lib.dir}/${lib.bsh.name}-${lib.bsh.version}.jar" dest="${unpacked.dir}/${lib.bsh.name}.jar"/>
+ <unjar src="${lib.dir}/${lib.jgoodies-common.name}-${lib.jgoodies-common.version}.jar" dest="${unpacked.dir}/${lib.jgoodies-common.name}.jar"/>
+@@ -343,6 +318,7 @@
+ <unjar src="${lib.dir}/${lib.texhyphj.name}-${lib.texhyphj.version}.jar" dest="${unpacked.dir}/${lib.texhyphj.name}.jar" />
+ <unjar src="${lib.dir}/${lib.substance.name}-${lib.substance.version}.jar" dest="${unpacked.dir}/${lib.substance.name}.jar" />
+ <unjar src="${lib.dir}/${lib.trident.name}-${lib.trident.version}.jar" dest="${unpacked.dir}/${lib.trident.name}.jar" />
++ -->
+
+ <!-- Pack the tvbrowser.jar -->
+ <jar jarfile="${tvbrowser-default.runtime.dir}/tvbrowser.jar"
+@@ -357,6 +333,7 @@
+ <fileset dir="${classes.dir}" includes="tvdataservice/**"/>
+ <fileset dir="${classes.dir}" includes="util/**"/>
+ <fileset dir="${classes.dir}" includes="com/**"/>
++ <!--
+ <fileset dir="${classes.dir}/imgs" includes="splash.png"/>
+ <fileset dir="${unpacked.dir}/${lib.skinlf.name}.jar" includes="com/**"/>
+ <fileset dir="${unpacked.dir}/${lib.skinlf.name}.jar" includes="org/**"/>
+@@ -373,6 +350,7 @@
+ <fileset dir="${unpacked.dir}/${lib.texhyphj.name}.jar" includes="net/**"/>
+ <fileset dir="${unpacked.dir}/${lib.substance.name}.jar" includes="org/**"/>
+ <fileset dir="${unpacked.dir}/${lib.trident.name}.jar" includes="org/**"/>
++ -->
+ </jar>
+
+ <!-- Copy the other stuff -->
+@@ -431,7 +409,9 @@
+
+ <!-- Extract the libraries for the tvbrowser.jar into the temp.dir -->
+ <mkdir dir="${unpacked.dir}/${lib.commons.net.name}.jar"/>
++ <!--
+ <unjar src="${lib.dir}/${lib.commons.net.name}-${lib.commons.net.version}.jar" dest="${unpacked.dir}/${lib.commons.net.name}.jar"/>
++ -->
+
+ </target>
+
+@@ -555,6 +535,7 @@
+
+ <!-- Creates the desktop entry file for Linux platforms -->
+ <target name="tvbrowser-desktop-entry">
++ <!--
+ <desktopEntry
+ toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
+ name="TV-Browser"
+@@ -571,6 +552,7 @@
+ <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
+ </desktopEntry>
+ <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
++ -->
+ </target>
+
+ <!-- Creates the desktop entry file for Ubuntu platform -->
+@@ -752,6 +734,7 @@
+
+ <!-- Creates the windows exe file -->
+ <target name="exe" depends="runtime-win">
++ <!--
+ <launch4j configFile="${deployment.dir}/win/launch4j/tvbrowser.xml"
+ fileversion="${tvbrowser.version.file}"
+ productversion="${tvbrowser.version.file}"
+@@ -762,6 +745,7 @@
+ productversion="${tvbrowser.version.file}"
+ txtfileversion="${tvbrowser.version}"
+ txtproductversion="${tvbrowser.version}"/>
++ -->
+ </target>
+
+ <!-- Creates the windows transportable exe file -->
diff --git a/media-tv/tvbrowser/files/3.4.1.0-remove-registrykey.patch b/media-tv/tvbrowser/files/3.4.1.0-remove-registrykey.patch
new file mode 100644
index 00000000000..2c52ddada29
--- /dev/null
+++ b/media-tv/tvbrowser/files/3.4.1.0-remove-registrykey.patch
@@ -0,0 +1,150 @@
+--- src/tvbrowser/TVBrowser.java.orig 2015-03-24 17:41:56.811494046 +0000
++++ src/tvbrowser/TVBrowser.java 2015-03-24 17:43:30.625486471 +0000
+@@ -113,9 +113,6 @@
+ import util.ui.UIThreadRunner;
+ import util.ui.UiUtilities;
+ import util.ui.textcomponentpopup.TextComponentPopupEventQueue;
+-import ca.beq.util.win32.registry.RegistryKey;
+-import ca.beq.util.win32.registry.RegistryValue;
+-import ca.beq.util.win32.registry.RootKey;
+
+ import com.jgoodies.looks.LookUtils;
+ import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;
+@@ -567,77 +564,6 @@
+ public void run() {
+ ChannelList.completeChannelLoading();
+ initializeAutomaticDownload();
+- if (Launch.isOsWindowsNtBranch()) {
+- try {
+- RegistryKey desktopSettings = new RegistryKey(
+- RootKey.HKEY_CURRENT_USER, "Control Panel\\Desktop");
+- RegistryValue autoEnd = desktopSettings
+- .getValue("AutoEndTasks");
+-
+- if (autoEnd.getData().equals("1")) {
+- RegistryValue killWait = desktopSettings
+- .getValue("WaitToKillAppTimeout");
+-
+- int i = Integer.parseInt(killWait.getData().toString());
+-
+- if (i < 5000) {
+- JOptionPane pane = new JOptionPane();
+-
+- String cancel = mLocalizer.msg("registryCancel",
+- "Close TV-Browser");
+- String dontDoIt = mLocalizer.msg("registryJumpOver",
+- "Not this time");
+-
+- pane.setOptions(new String[] {
+- Localizer.getLocalization(Localizer.I18N_OK), dontDoIt,
+- cancel });
+- pane.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
+- pane.setMessageType(JOptionPane.WARNING_MESSAGE);
+- pane
+- .setMessage(mLocalizer
+- .msg(
+- "registryWarning",
+- "The fast shutdown of Windows is activated.\nThe timeout to wait for before Windows is closing an application is too short,\nto give TV-Browser enough time to save all settings.\n\nThe setting hasn't the default value. It was changed by a tool or by you.\nTV-Browser will now try to change the timeout.\n\nIf you don't want to change this timeout select 'Not this time' or 'Close TV-Browser'."));
+-
+- pane.setInitialValue(mLocalizer.msg("registryCancel",
+- "Close TV-Browser"));
+-
+- JDialog d = pane.createDialog(UiUtilities
+- .getLastModalChildOf(mainFrame), UIManager
+- .getString("OptionPane.messageDialogTitle"));
+- d.setModal(true);
+- UiUtilities.centerAndShow(d);
+-
+- if (pane.getValue() == null
+- || pane.getValue().equals(cancel)) {
+- mainFrame.quit();
+- } else if (!pane.getValue().equals(dontDoIt)) {
+- try {
+- killWait.setData("5000");
+- desktopSettings.setValue(killWait);
+- JOptionPane
+- .showMessageDialog(
+- UiUtilities.getLastModalChildOf(mainFrame),
+- mLocalizer
+- .msg("registryChanged",
+- "The timeout was changed successfully.\nPlease reboot Windows!"));
+- } catch (Exception registySetting) {
+- JOptionPane
+- .showMessageDialog(
+- UiUtilities.getLastModalChildOf(mainFrame),
+- mLocalizer
+- .msg(
+- "registryNotChanged",
+- "<html>The Registry value couldn't be changed. Maybe you haven't the right to do it.<br>If it is so contact you Administrator and let him do it for you.<br><br><b><Attention:/b> The following description is for experts. If you change or delete the wrong value in the Registry you could destroy your Windows installation.<br><br>To get no warning on TV-Browser start the Registry value <b>WaitToKillAppTimeout</b> in the Registry path<br><b>HKEY_CURRENT_USER\\Control Panel\\Desktop</b> have to be at least <b>5000</b> or the value for <b>AutoEndTasks</b> in the same path have to be <b>0</b>.</html>"),
+- Localizer.getLocalization(Localizer.I18N_ERROR),
+- JOptionPane.ERROR_MESSAGE);
+- }
+- }
+- }
+- }
+- } catch (Throwable registry) {
+- }
+- }
+
+ if (currentVersion != null
+ && currentVersion.compareTo(new Version(2, 71, false)) < 0) {
+--- src/tvbrowser/ui/settings/StartupSettingsTab.java.orig 2015-03-24 17:51:54.418445794 +0000
++++ src/tvbrowser/ui/settings/StartupSettingsTab.java 2015-03-24 17:52:23.370443456 +0000
+@@ -50,8 +50,6 @@
+ import tvbrowser.ui.mainframe.PeriodItem;
+ import util.ui.Localizer;
+ import util.ui.UiUtilities;
+-import ca.beq.util.win32.registry.RegistryKey;
+-import ca.beq.util.win32.registry.RootKey;
+
+ import com.jgoodies.forms.builder.PanelBuilder;
+ import com.jgoodies.forms.factories.Borders;
+@@ -163,41 +161,6 @@
+ .getBoolean());
+ mSettingsPn.add(mShowStartScreenChB, cc.xy(2, ++y));
+
+- if (System.getProperty("os.name").toLowerCase().startsWith("windows") && !TVBrowser.isTransportable()) {
+- layout.insertRow(++y, RowSpec.decode("1dlu"));
+- layout.insertRow(++y, RowSpec.decode("pref"));
+-
+- try {
+- RegistryKey shellFolders = new RegistryKey(RootKey.HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders");
+- String path = shellFolders.getValue("Startup").getData().toString();
+-
+- if(path == null || path.length() < 1 || !(new File(path)).isDirectory()) {
+- throw new Exception();
+- }
+-
+- mLinkFileFile = new File(path,"TV-Browser.url");
+-
+- try {
+- mLinkFile = new LinkFile(mLinkFileFile);
+-
+- if(mLinkFileFile.isFile()) {
+- try {
+- if (!mLinkFile.hasTarget((new File("tvbrowser.exe")).getAbsoluteFile())) {
+- createLink(mLinkFile);
+- }
+- }catch(Exception linkException) {
+- mLinkFileFile.delete();
+- }
+- }
+- }catch(FileNotFoundException fe) {}
+-
+- mAutostartWithWindows = new JCheckBox(mLocalizer.msg("autostart","Start TV-Browser with Windows"),
+- mLinkFileFile.isFile());
+-
+- mSettingsPn.add(mAutostartWithWindows, cc.xy(2, y));
+- } catch (Throwable e) {e.printStackTrace();}
+- }
+-
+ y++;
+
+ mSettingsPn.add(createRefreshPanel(), cc.xyw(1,++y,5));
+@@ -513,4 +476,4 @@
+ return new File(mTarget).equals(file);
+ }
+ }
+-}
+\ No newline at end of file
++}
diff --git a/media-tv/tvbrowser/files/tvbrowser-3.2.1-build.xml b/media-tv/tvbrowser/files/tvbrowser-3.2.1-build.xml
new file mode 100644
index 00000000000..a26bcc4d69e
--- /dev/null
+++ b/media-tv/tvbrowser/files/tvbrowser-3.2.1-build.xml
@@ -0,0 +1,480 @@
+<?xml version="1.0"?>
+<!--
+ | Ant build script for the TV-Browser project.
+ |
+ | TV-Browser
+ | Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)
+ |
+ | This program is free software; you can redistribute it and/or
+ | modify it under the terms of the GNU General Public License
+ | as published by the Free Software Foundation; either version 2
+ | of the License, or (at your option) any later version.
+ |
+ | This program is distributed in the hope that it will be useful,
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ | GNU General Public License for more details.
+ |
+ | You should have received a copy of the GNU General Public License
+ | along with this program; if not, write to the Free Software
+ | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ |
+ | CVS information:
+ | $RCSfile: tvbrowser-3.2.1-build.xml,v $
+ | $Source: /var/cvsroot/gentoo-x86/media-tv/tvbrowser/files/tvbrowser-3.2.1-build.xml,v $
+ | $Date: 2013/08/13 20:58:08 $
+ | $Author: tomwij $
+ | $Revision: 1.1 $
+ |
+ | Author: Til Schneider, www.murfman.de
+ |
+ | Modified by Gentoo Developers for Gentoo Linux packaging purposes.
+ +-->
+<project name="TV-Browser" default="targets" basedir=".">
+
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | The properties and paths
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <property environment="env"/>
+ <property file="build.properties"/>
+ <property name="programname" value="TV-Browser"/>
+ <property name="programname.file" value="tvbrowser"/>
+ <property name="classes.dir" value="classes"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="txt.dir" value="txt"/>
+ <property name="src.dir" value="src"/>
+ <property name="test.src.dir" value="test/src"/>
+ <property name="test.classes.dir" value="test/classes"/>
+ <property name="doc.dir" value="doc"/>
+ <property name="doc.header" value="${programname} ${tvbrowser.version} API"/>
+ <property name="doc.title" value="API documentation for ${programname} ${tvbrowser.version}"/>
+ <property name="doc.bottom" value="${programname} ${tvbrowser.version}, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)"/>
+
+ <property name="runtime.dir" value="runtime"/>
+ <property name="tvbrowser-default.runtime.dir" value="${runtime.dir}/tvbrowser_default"/>
+
+ <property name="tvbrowser-win.runtime.dir" value="${runtime.dir}/tvbrowser_win"/>
+ <property name="tvbrowser-linux.runtime.dir" value="${runtime.dir}/tvbrowser_linux"/>
+ <property name="tvbrowser-transportable.runtime.dir" value="${runtime.dir}/tvbrowser_transportable"/>
+ <property name="tvbrowser-nightly.runtime.dir" value="${runtime.dir}/tvbrowser_nightly"/>
+ <property name="tvbrowser-mac.runtime.dir" value="${runtime.dir}/tvbrowser_mac"/>
+ <property name="themepacks.dir" value="themepacks"/>
+ <property name="personas.dir" value="personas"/>
+
+ <property name="deployment.dir" value="deployment" />
+ <property name="win.dir" value="${deployment.dir}/win"/>
+ <property name="linux.dir" value="${deployment.dir}/linux"/>
+ <property name="x11.dir" value="${deployment.dir}/x11"/>
+ <property name="installer.dir" value="${win.dir}/installer"/>
+ <property name="package-lists.dir" value="${txt.dir}/package-lists"/>
+ <property name="public.dir" value="public"/>
+
+ <path id="sourcepath">
+ <pathelement location="${src.dir}"/>
+ </path>
+
+ <path id="classpath">
+ <pathelement location="${classes.dir}"/>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ <exclude name="ant.jar"/>
+ </fileset>
+ </path>
+
+ <path id="docpath">
+ <path refid="sourcepath"/>
+ </path>
+
+ <path id="ant-deb.classpath">
+ <fileset dir="${deployment.dir}/linux/ant-deb-task" includes="*.jar"/>
+ </path>
+
+ <path id="ant-rpm.classpath">
+ <fileset dir="${deployment.dir}/linux/redline-rpm" includes="*.jar"/>
+ </path>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+|
+| Display all targets
+|
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <target name="targets" description="lists all the available public targets">
+ <echo message="usage: build [target]"/>
+ <echo message=""/>
+ <echo message="main targets:"/>
+ <echo message="============="/>
+ <echo message=" targets Shows this list of targets."/>
+ <echo message=" dump-info Dumps some information (VM-Version...)."/>
+ <echo message=" public-default Creates platform-independent binaries"/>
+ <echo message=" public-linux Creates binaries for Linux platforms"/>
+ <echo message=" public-nightly Creates platform-independent binaries for nightly transportable version of TV-Browser (without platform dependent starters)"/>
+ <echo message=" public-src Creates a .zip file containing the full source code of TV-Browser"/>
+ <echo message=" public-doc Generates the JavaDoc documentation."/>
+ <echo message=" release-packages Generates all packages needed for a TV-Browser release (without Mac version, works only under Windows)."/>
+ <echo message=""/>
+ <echo message="further targets:"/>
+ <echo message="================"/>
+ <echo message=" clean Deletes all class files, runtime directories and temporary files."/>
+ <echo message=" clean-runtime Deletes the runtime directory."/>
+ <echo message=" make-default Compiles the platform independent source code."/>
+ <echo message=" make-linux Compiles the source code for linux platforms."/>
+ <echo message=" runtime-default Creates the platform independent runtime directory" />
+ <echo message=" runtime-linux Creates a runtime directory for linux platforms" />
+ <echo message=" test Runs the JUnit tests."/>
+ </target>
+
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Clean tasks: remove files
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+
+ <!-- Deletes the runtime director -->
+ <target name="clean">
+ <delete dir="${classes.dir}"/>
+ <delete dir="${test.classes.dir}"/>
+ </target>
+
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-default" depends="clean">
+ <delete dir="${tvbrowser-default.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-transportable" depends="clean">
+ <delete dir="${tvbrowser-transportable.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-win" depends="clean">
+ <delete dir="${tvbrowser-win.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-linux" depends="clean">
+ <delete dir="${tvbrowser-linux.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-mac" depends="clean">
+ <delete dir="${tvbrowser-mac.runtime.dir}"/>
+ </target>
+
+ <target name="clean-all" depends="clean-mac, clean-linux, clean-win, clean-default">
+ <delete dir="${public.dir}"/>
+ </target>
+
+
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+|
+| Make tasks: compile the source code
+|
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <target name="copy-resources">
+ <copy todir="${classes.dir}">
+ <fileset dir="${src.dir}" includes="**/*.gif"/>
+ <fileset dir="${src.dir}" includes="**/*.jpg"/>
+ <fileset dir="${src.dir}" includes="**/*.png"/>
+ <fileset dir="${src.dir}" includes="**/*.dtd"/>
+ <fileset dir="${src.dir}" includes="**/*.properties"/>
+ <fileset dir="${src.dir}" includes="**/*.theme"/>
+ <fileset dir="${src.dir}" includes="**/*.csv"/>
+ </copy>
+ </target>
+
+ <!-- Compiles the platform independent source code -->
+ <target name="make-default" depends="copy-resources">
+ <echo message="Compiling the source code ... "/>
+ <mkdir dir="${classes.dir}"/>
+ <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.6" source="1.6">
+ <src>
+ <path refid="sourcepath"/>
+ </src>
+ <classpath>
+ <path refid="classpath"/>
+ </classpath>
+ <exclude name="**/macosx/*"/>
+ </javac>
+
+
+ </target>
+
+
+ <!-- Compiles the source code for windows platforms -->
+ <target name="make-win" depends="make-default">
+
+ </target>
+
+
+ <!-- Compiles the source code for linux platforms -->
+ <target name="make-linux" depends="make-default">
+
+ </target>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Runtime tasks: create runtime folders for the specified platform
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <target name="mkdirs">
+ <!-- Make the TV-Browser runtime -->
+ <delete dir="${tvbrowser-default.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-default.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-default.runtime.dir}/plugins"/>
+ </target>
+
+ <!-- Creates the platform independent runtime folder -->
+ <target name="runtime" depends="clean-default, make-default, mkdirs">
+ <echo message="Creating the jars ..."/>
+
+ <!-- Pack the tvbrowser.jar -->
+ <jar jarfile="${tvbrowser-default.runtime.dir}/tvbrowser.jar"
+ compress="true"
+ index="true">
+ <manifest>
+ <attribute name="Main-Class" value="tvbrowser.TVBrowser"/>
+ <attribute name="SplashScreen-Image" value="splash.png"/>
+ </manifest>
+ <fileset dir="${classes.dir}" includes="tvbrowser/**"/>
+ <fileset dir="${classes.dir}" includes="devplugin/**"/>
+ <fileset dir="${classes.dir}" includes="tvdataservice/**"/>
+ <fileset dir="${classes.dir}" includes="util/**"/>
+ <fileset dir="${classes.dir}" includes="com/**"/>
+ <fileset dir="${classes.dir}/imgs" includes="splash.png"/>
+ </jar>
+
+ <!-- Copy the other stuff -->
+ <echo message="Copying the images and all the other stuff ..."/>
+ <mkdir dir="${tvbrowser-default.runtime.dir}/imgs"/>
+ <copy todir="${tvbrowser-default.runtime.dir}/imgs">
+ <fileset dir="${classes.dir}/imgs" excludes="splash.png"/>
+ </copy>
+
+ <copy todir="${tvbrowser-default.runtime.dir}/imgs">
+ <fileset dir="./images/additional">
+ <include name="*.ico"/>
+ </fileset>
+ </copy>
+
+ <mkdir dir="${tvbrowser-default.runtime.dir}/personas"/>
+ <copy todir="${tvbrowser-default.runtime.dir}/personas">
+ <fileset dir="./personas"/>
+ </copy>
+ <copy todir="${tvbrowser-default.runtime.dir}">
+ <fileset dir="${txt.dir}" includes="LICENSE.txt"/>
+ <fileset dir="${txt.dir}" includes="COPYRIGHT.txt"/>
+ <fileset dir="${deployment.dir}/common" includes="**" />
+ <!-- <fileset dir="${txt.dir}" includes="website.url"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="default.properties"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="osx.properties"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="windows.properties"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="tvbrowser.sh"/> -->
+ </copy>
+
+ <!-- Themepacks -->
+ <mkdir dir="${tvbrowser-default.runtime.dir}/themepacks"/>
+ <copy todir="${tvbrowser-default.runtime.dir}/themepacks">
+ <fileset dir="themepacks"/>
+ </copy>
+
+ <!-- Icon-Themes -->
+ <mkdir dir="${tvbrowser-default.runtime.dir}/icons"/>
+
+ <zip destfile="${tvbrowser-default.runtime.dir}/icons/Tango.zip">
+ <zipfileset dir="images/themes/tango"></zipfileset>
+ </zip>
+ <zip destfile="${tvbrowser-default.runtime.dir}/icons/CrystalClear.zip">
+ <zipfileset dir="images/themes/CrystalClear"></zipfileset>
+ </zip>
+ </target>
+
+
+ <!-- Creates the default runtime folder (platform independent) -->
+ <target name="runtime-default" depends="clean-default, make-default, runtime, test">
+ </target>
+
+ <!-- Creates the runtime folder for linux platforms -->
+ <target name="runtime-linux" depends="clean-linux, make-linux, runtime">
+ <delete dir="${tvbrowser-linux.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-linux.runtime.dir}"/>
+ <copy todir="${tvbrowser-linux.runtime.dir}">
+ <fileset dir="${tvbrowser-default.runtime.dir}"/>
+ <fileset dir="${deployment.dir}" includes="linux.properties"/>
+ <fileset dir="${linux.dir}" includes="tvbrowser.sh"/>
+ <!-- <fileset dir="${linux.dir}" includes="tvbrowser.desktop"/>-->
+ </copy>
+ <chmod perm="u+x" file="${tvbrowser-linux.runtime.dir}/tvbrowser.sh"/>
+ </target>
+
+ <target name="release-packages" depends="public-linux, public-default, public-doc, public-src"/>
+
+ <!-- Creates the release binaries (.zip) for the platform independent TV-Browser version -->
+ <target name="public-default" depends="runtime-default" description="creates platform-independent binaries">
+ <mkdir dir="${public.dir}"/>
+
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_bin.zip">
+ <zipfileset prefix="tvbrowser-${tvbrowser.version}"
+ dir="${tvbrowser-default.runtime.dir}"/>
+ </zip>
+ </target>
+
+ <target name="clean-public">
+ <delete>
+ <fileset dir="${public.dir}" includes="**/*"/>
+ </delete>
+ </target>
+
+ <target name="public-nightly" depends="clean-public" description="Creates platform-independent binaries for nightly transportable version of TV-Browser (without platform dependent starters)">
+ <mkdir dir="${public.dir}"/>
+
+ <tstamp>
+ <format property="TODAY" pattern="yyyy-MM-dd"/>
+ </tstamp>
+
+ <echo file="${tvbrowser-transportable.runtime.dir}/NIGHTLY_VALUES" append="false">${TODAY}-nightly</echo>
+
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_${TODAY}_nightly_bin_transportable.zip">
+ <zipfileset prefix="tvbrowser-nightly-transportable" dir="${tvbrowser-transportable.runtime.dir}"/>
+ </zip>
+
+ </target>
+
+ <!-- Creates the release binaries (.tar.gz) for linux platforms -->
+ <target name="public-linux" depends="runtime-linux" description="Creates binaries for Linux platforms">
+ <mkdir dir="${public.dir}"/>
+
+ <tar tarfile="${public.dir}/tvbrowser_${tvbrowser.version}_bin.tar.gz" compression="gzip">
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="tvbrowser-${tvbrowser.version}" excludes="**/tvbrowser.sh"/>
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}"
+ prefix="tvbrowser-${tvbrowser.version}"
+ mode="755" includes="**/tvbrowser.sh" />
+ </tar>
+
+ </target>
+
+ <!--
+ | Does the JUnit tests.
+ |
+ | If this target does not work, copy the file "junit.jar" from the directory "lib"
+ | in your ANT_HOME/lib directory. (ANT_HOME/lib is on my machine "/usr/share/ant/lib")
+ +-->
+ <target name="test" depends="make-default">
+ <echo>${ant.version}. JUnit4 tests will only work with Ant>=1.7</echo>
+ <mkdir dir="${test.classes.dir}"/>
+ <javac destdir="${test.classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.5" source="1.5">
+ <src>
+ <path path="${test.src.dir}"/>
+ </src>
+ <classpath>
+ <path refid="classpath"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${test.classes.dir}">
+ <fileset dir="${test.src.dir}" includes="**/*.gif"/>
+ <fileset dir="${test.src.dir}" includes="**/*.jpg"/>
+ <fileset dir="${test.src.dir}" includes="**/*.png"/>
+ <fileset dir="${test.src.dir}" includes="**/*.dtd"/>
+ <fileset dir="${test.src.dir}" includes="**/*.properties"/>
+ <fileset dir="${test.src.dir}" includes="**/*.theme"/>
+ <fileset dir="${test.src.dir}" includes="**/*.txt"/>
+ </copy>
+
+
+ <junit haltonfailure="yes" fork="no" >
+ <classpath>
+ <path refid="classpath"/>
+ <path path="${test.classes.dir}"/>
+ </classpath>
+
+ <formatter type="brief" usefile="false"/>
+
+ <batchtest>
+ <fileset dir="${test.src.dir}">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <!--
+ | Generates the JavaDoc documentation.
+ +-->
+ <target name="public-doc" description="Generates the JavaDoc documentation">
+ <echo message="Generating JavaDoc documentation ..." />
+ <delete dir="${doc.dir}"/>
+ <mkdir dir="${doc.dir}"/>
+ <javadoc packagenames="*"
+ sourcepathref="docpath"
+ classpathref="classpath"
+ destdir="${doc.dir}"
+ doctitle="${doc.title}"
+ windowtitle="${doc.title}"
+ additionalparam="-breakiterator"
+ header="${doc.header}"
+ bottom="${doc.bottom}"
+ access="package"
+ failonerror="true"
+ encoding="UTF-8"
+ charset="UTF-8"
+ docencoding="UTF-8">
+ <link offline="true"
+ href="${java-api-location}"
+ packagelistLoc="${package-lists.dir}/jdk/"/>
+ </javadoc>
+
+
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_doc.zip">
+ <zipfileset prefix="tvbrowser_v${tvbrowser.version}/doc"
+ dir="${doc.dir}"/>
+ </zip>
+
+ </target>
+
+ <!--
+ | Dump some information.
+ +-->
+ <target name="dump-info">
+ <echo message="JAVA_HOME=${env.JAVA_HOME}" />
+ <echo message="java.vm.info=${java.vm.info}" />
+ <echo message="java.vm.name=${java.vm.name}" />
+ <echo message="java.vm.vendor=${java.vm.vendor}" />
+ <echo message="java.vm.version=${java.vm.version}" />
+ <echo message="os.arch=${os.arch}" />
+ <echo message="os.name=${os.name}" />
+ <echo message="os.version=${os.version}" />
+ <echo message="file.encoding=${file.encoding}" />
+ <echo message="user.language=${user.language}" />
+ </target>
+
+
+
+
+ <target name="public-src" description="Creates a .zip file containing the full source code of TV-Browser">
+ <mkdir dir="${public.dir}"/>
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_src.zip">
+ <zipfileset prefix="tvbrowser-${tvbrowser.version}"
+ dir=".">
+
+ <exclude name="${classes.dir}/**" />
+ <exclude name="${public.dir}/**" />
+ <exclude name="${runtime.dir}/**" />
+
+ </zipfileset>
+ </zip>
+ </target>
+
+ <target name="public-tvdatakit"></target>
+
+</project>
diff --git a/media-tv/tvbrowser/files/tvbrowser-9999-build.xml b/media-tv/tvbrowser/files/tvbrowser-9999-build.xml
new file mode 100644
index 00000000000..16143b7197d
--- /dev/null
+++ b/media-tv/tvbrowser/files/tvbrowser-9999-build.xml
@@ -0,0 +1,965 @@
+<?xml version="1.0"?>
+<!--
+ | Ant build script for the TV-Browser project.
+ |
+ | TV-Browser
+ | Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)
+ |
+ | This program is free software; you can redistribute it and/or
+ | modify it under the terms of the GNU General Public License
+ | as published by the Free Software Foundation; either version 2
+ | of the License, or (at your option) any later version.
+ |
+ | This program is distributed in the hope that it will be useful,
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ | GNU General Public License for more details.
+ |
+ | You should have received a copy of the GNU General Public License
+ | along with this program; if not, write to the Free Software
+ | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ |
+ | CVS information:
+ | $RCSfile: tvbrowser-9999-build.xml,v $
+ | $Source: /var/cvsroot/gentoo-x86/media-tv/tvbrowser/files/tvbrowser-9999-build.xml,v $
+ | $Date: 2015/05/31 00:56:25 $
+ | $Author: monsieurp $
+ | $Revision: 1.1 $
+ |
+ | Author: Til Schneider, www.murfman.de
+ +-->
+<project name="TV-Browser" default="targets" basedir=".">
+
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | The properties and paths
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <property environment="env"/>
+ <property file="build.properties"/>
+ <property name="programname" value="TV-Browser"/>
+ <property name="programname.file" value="tvbrowser"/>
+ <property name="classes.dir" value="classes"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="txt.dir" value="txt"/>
+ <property name="src.dir" value="src"/>
+ <property name="test.src.dir" value="test/src"/>
+ <property name="test.classes.dir" value="test/classes"/>
+ <property name="doc.dir" value="doc"/>
+ <property name="doc.header" value="${programname} ${tvbrowser.version} API"/>
+ <property name="doc.title" value="API documentation for ${programname} ${tvbrowser.version}"/>
+ <property name="doc.bottom" value="${programname} ${tvbrowser.version}, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)"/>
+
+ <property name="unpacked.dir" value="unpacked"/>
+
+ <property name="runtime.dir" value="runtime"/>
+ <property name="tvbrowser-default.runtime.dir" value="${runtime.dir}/tvbrowser_default"/>
+
+ <property name="tvbrowser-win.runtime.dir" value="${runtime.dir}/tvbrowser_win"/>
+ <property name="tvbrowser-linux.runtime.dir" value="${runtime.dir}/tvbrowser_linux"/>
+ <property name="tvbrowser-transportable.runtime.dir" value="${runtime.dir}/tvbrowser_transportable"/>
+ <property name="tvbrowser-nightly.runtime.dir" value="${runtime.dir}/tvbrowser_nightly"/>
+ <property name="tvbrowser-mac.runtime.dir" value="${runtime.dir}/tvbrowser_mac"/>
+ <property name="tvbrowser-macjava.runtime.dir" value="${runtime.dir}/tvbrowser_macjava"/>
+ <property name="themepacks.dir" value="themepacks"/>
+ <property name="personas.dir" value="personas"/>
+
+ <property name="deployment.dir" value="deployment" />
+ <property name="win.dir" value="${deployment.dir}/win"/>
+ <property name="linux.dir" value="${deployment.dir}/linux"/>
+ <property name="osx.dir" value="${deployment.dir}/macosx"/>
+ <property name="x11.dir" value="${deployment.dir}/x11"/>
+ <property name="installer.dir" value="${win.dir}/installer"/>
+ <property name="package-lists.dir" value="${txt.dir}/package-lists"/>
+ <property name="public.dir" value="public"/>
+ <property name="newsplugin.url" value="http://www.tvbrowser.org/data/uploads/1372016422809_543/NewsPlugin.jar"/>
+
+ <path id="sourcepath">
+ <pathelement location="${src.dir}"/>
+ </path>
+
+ <path id="classpath">
+ <pathelement location="${classes.dir}"/>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ <exclude name="ant.jar"/>
+ </fileset>
+ </path>
+
+ <path id="docpath">
+ <path refid="sourcepath"/>
+ </path>
+
+ <path id="ant-deb.classpath">
+ <fileset dir="${deployment.dir}/linux/ant-deb-task" includes="*.jar"/>
+ </path>
+
+ <path id="ant-rpm.classpath">
+ <fileset dir="${deployment.dir}/linux/redline-rpm" includes="*.jar"/>
+ </path>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Display all targets
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <target name="targets" description="lists all the available public targets">
+ <echo message="usage: build [target]"/>
+ <echo message=""/>
+ <echo message="main targets:"/>
+ <echo message="============="/>
+ <echo message=" targets Shows this list of targets."/>
+ <echo message=" download-libs Downloads all necessary libraries from the Internet."/>
+ <echo message=" dump-info Dumps some information (VM-Version...)."/>
+ <echo message=" public-default Creates platform-independent binaries"/>
+ <echo message=" public-mac Creates binaries for the Mac OS X (requires Mac OS X)"/>
+ <echo message=" public-macjava Creates binaries for the Mac OS X with Java from Oracle (requires Mac OS X)"/>
+ <echo message=" public-linux Creates binaries for Linux platforms"/>
+ <echo message=" public-ubuntu Creates binaries for Ubuntu platforms"/>
+ <echo message=" public-fedora Creates binaries for Fedora platforms"/>
+ <echo message=" public-transportable Creates platform-independent binaries for transportable version of TV-Browser (requires Windows)"/>
+ <echo message=" public-nightly Creates platform-independent binaries for nightly transportable version of TV-Browser (without platform dependent starters)"/>
+ <echo message=" public-src Creates a .zip file containing the full source code of TV-Browser"/>
+ <echo message=" public-doc Generates the JavaDoc documentation."/>
+ <echo message=" release-packages Generates all packages needed for a TV-Browser release (without Mac version, works only under Windows)."/>
+ <echo message=""/>
+ <echo message="further targets:"/>
+ <echo message="================"/>
+ <echo message=" clean Deletes all class files, runtime directories and temporary files."/>
+ <echo message=" clean-runtime Deletes the runtime directory."/>
+ <echo message=" make-default Compiles the platform independent source code."/>
+ <echo message=" make-transportable Compiles the platform independent source code for transportable version."/>
+ <echo message=" make-linux Compiles the source code for linux platforms."/>
+ <echo message=" make-win Compiles the source code for windows platforms."/>
+ <echo message=" make-mac Compiles the source code for Mac OS X."/>
+ <echo message=" make-macjava Compiles the source code for Mac OS X with Java from Oracle."/>
+ <echo message=" runtime-default Creates the platform independent runtime directory" />
+ <echo message=" runtime-transportable Creates the platform independent runtime directory for transportable version" />
+ <echo message=" runtime-linux Creates a runtime directory for linux platforms" />
+ <echo message=" runtime-mac Creates a runtime directory for Mac OS X" />
+ <echo message=" runtime-macjava Creates a runtime directory for Mac OS X with Java from Oracle" />
+ <echo message=" runtime-win Creates a runtime directory for MS Windows" />
+ <echo message=" test Runs the JUnit tests."/>
+ </target>
+
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Clean tasks: remove files
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+
+ <!-- Deletes the runtime director -->
+ <target name="clean">
+ <delete dir="${classes.dir}"/>
+ <delete dir="${unpacked.dir}"/>
+ <delete dir="${test.classes.dir}"/>
+ </target>
+
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-default" depends="clean">
+ <delete dir="${tvbrowser-default.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-transportable" depends="clean">
+ <delete dir="${tvbrowser-transportable.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-win" depends="clean">
+ <delete dir="${tvbrowser-win.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-linux" depends="clean">
+ <delete dir="${tvbrowser-linux.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-mac" depends="clean">
+ <delete dir="${tvbrowser-mac.runtime.dir}"/>
+ </target>
+
+ <!-- Deletes the classes and the runtime directory. -->
+ <target name="clean-macjava" depends="clean">
+ <delete dir="${tvbrowser-macjava.runtime.dir}"/>
+ </target>
+
+ <target name="clean-all" depends="clean-mac, clean-macjava, clean-linux, clean-win, clean-default">
+ <delete dir="${public.dir}"/>
+ </target>
+
+
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+|
+| Make tasks: compile the source code
+|
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <target name="copy-resources">
+ <copy todir="${classes.dir}">
+ <fileset dir="${src.dir}" includes="**/*.gif"/>
+ <fileset dir="${src.dir}" includes="**/*.jpg"/>
+ <fileset dir="${src.dir}" includes="**/*.png"/>
+ <fileset dir="${src.dir}" includes="**/*.dtd"/>
+ <fileset dir="${src.dir}" includes="**/*.properties"/>
+ <fileset dir="${src.dir}" includes="**/*.theme"/>
+ <fileset dir="${src.dir}" includes="**/*.csv"/>
+ </copy>
+ </target>
+
+ <!-- Compiles the platform independent source code -->
+ <target name="make-default" depends="copy-resources">
+ <echo message="Compiling the source code ... "/>
+ <mkdir dir="${classes.dir}"/>
+ <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.6" source="1.6">
+ <src>
+ <path refid="sourcepath"/>
+ </src>
+ <classpath>
+ <path refid="classpath"/>
+ </classpath>
+ </javac>
+
+
+ </target>
+
+
+ <!-- Compiles the source code for windows platforms -->
+ <target name="make-win" depends="make-default">
+
+ </target>
+
+
+ <!-- Compiles the source code for linux platforms -->
+ <target name="make-linux" depends="make-default">
+
+ </target>
+
+ <!-- Compiles the source code for transportable version of TV-Browser -->
+ <target name="make-transportable" depends="make-default">
+
+ </target>
+
+ <!-- Compiles the source code for mac platforms -->
+ <target name="make-mac" depends="copy-resources">
+ <echo message="Compiling the source code ..."/>
+ <mkdir dir="${classes.dir}"/>
+ <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.5" source="1.5">
+ <src>
+ <path refid="sourcepath"/>
+ </src>
+ <classpath>
+ <path refid="classpath"/>
+ <path location="/System/Library/Java"/>
+ </classpath>
+ </javac>
+
+ </target>
+
+ <!-- Compiles the source code for mac platforms with Java from Oracle -->
+ <target name="make-macjava" depends="copy-resources">
+ <echo message="Compiling the source code ..."/>
+ <mkdir dir="${classes.dir}"/>
+ <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.6" source="1.6">
+ <src>
+ <path refid="sourcepath"/>
+ </src>
+ <classpath>
+ <path refid="classpath"/>
+ <path location="/Library/Java/JavaVirtualMachines"/>
+ </classpath>
+ </javac>
+
+ </target>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ |
+ | Runtime tasks: create runtime folders for the specified platform
+ |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <target name="mkdirs">
+ <!-- Make the TV-Browser runtime -->
+ <delete dir="${tvbrowser-default.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-default.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-default.runtime.dir}/plugins"/>
+ </target>
+
+ <!-- Creates the platform independent runtime folder -->
+ <target name="runtime" depends="clean-default, make-default, mkdirs">
+ <echo message="Creating the jars ..."/>
+
+ <!-- Pack the tvbrowser.jar -->
+ <jar jarfile="${tvbrowser-default.runtime.dir}/tvbrowser.jar"
+ compress="true"
+ index="true">
+ <manifest>
+ <attribute name="Main-Class" value="tvbrowser.TVBrowser"/>
+ <attribute name="SplashScreen-Image" value="splash.png"/>
+ </manifest>
+ <fileset dir="${classes.dir}" includes="tvbrowser/**"/>
+ <fileset dir="${classes.dir}" includes="devplugin/**"/>
+ <fileset dir="${classes.dir}" includes="tvdataservice/**"/>
+ <fileset dir="${classes.dir}" includes="util/**"/>
+ <fileset dir="${classes.dir}" includes="com/**"/>
+ <fileset dir="${classes.dir}/imgs" includes="splash.png"/>
+ </jar>
+
+ <!-- Copy the other stuff -->
+ <echo message="Copying the images and all the other stuff ..."/>
+ <mkdir dir="${tvbrowser-default.runtime.dir}/imgs"/>
+ <copy todir="${tvbrowser-default.runtime.dir}/imgs">
+ <fileset dir="${classes.dir}/imgs" excludes="splash.png"/>
+ </copy>
+
+ <copy todir="${tvbrowser-default.runtime.dir}/imgs">
+ <fileset dir="./images/additional">
+ <include name="*.ico"/>
+ </fileset>
+ </copy>
+
+ <mkdir dir="${tvbrowser-default.runtime.dir}/personas"/>
+ <copy todir="${tvbrowser-default.runtime.dir}/personas">
+ <fileset dir="./personas"/>
+ </copy>
+ <copy todir="${tvbrowser-default.runtime.dir}">
+ <fileset dir="${txt.dir}" includes="LICENSE.txt"/>
+ <fileset dir="${txt.dir}" includes="COPYRIGHT.txt"/>
+ <fileset dir="${deployment.dir}/common" includes="**" />
+ <!-- <fileset dir="${txt.dir}" includes="website.url"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="default.properties"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="osx.properties"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="windows.properties"/> -->
+ <!-- <fileset dir="${txt.dir}" includes="tvbrowser.sh"/> -->
+ </copy>
+
+ <!-- Themepacks -->
+ <mkdir dir="${tvbrowser-default.runtime.dir}/themepacks"/>
+ <copy todir="${tvbrowser-default.runtime.dir}/themepacks">
+ <fileset dir="themepacks"/>
+ </copy>
+
+ <!-- Icon-Themes -->
+ <mkdir dir="${tvbrowser-default.runtime.dir}/icons"/>
+
+ <!-- Info-Icon-Themes -->
+ <mkdir dir="${tvbrowser-default.runtime.dir}/infothemes"/>
+
+ <zip destfile="${tvbrowser-default.runtime.dir}/infothemes/tvb_default.zip">
+ <zipfileset dir="images/infothemes/tvb_default"></zipfileset>
+ </zip>
+ <zip destfile="${tvbrowser-default.runtime.dir}/infothemes/tvb_colored.zip">
+ <zipfileset dir="images/infothemes/tvb_colored"></zipfileset>
+ </zip>
+
+ <zip destfile="${tvbrowser-default.runtime.dir}/icons/Tango.zip">
+ <zipfileset dir="images/themes/tango"></zipfileset>
+ </zip>
+ <zip destfile="${tvbrowser-default.runtime.dir}/icons/CrystalClear.zip">
+ <zipfileset dir="images/themes/CrystalClear"></zipfileset>
+ </zip>
+ </target>
+
+ <!-- Creates the default runtime folder (platform independent) -->
+ <target name="runtime-default" depends="clean-default, make-default, runtime">
+ </target>
+
+
+ <!-- Creates the runtime folder for the transportable version -->
+ <target name="runtime-transportable" depends="clean-transportable, make-transportable, runtime">
+ <echo message="deployment dir is ${deployment.dir}, win is ${win.dir}" />
+ <mkdir dir="${tvbrowser-transportable.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-transportable.runtime.dir}/settings"/>
+ <copy todir="${tvbrowser-transportable.runtime.dir}/settings">
+ <fileset dir="${deployment.dir}" includes="packer.txt"/>
+ </copy>
+ <copy todir="${tvbrowser-transportable.runtime.dir}">
+ <fileset dir="${tvbrowser-default.runtime.dir}"/>
+ <fileset dir="${win.dir}/jRegistryKey" includes="jRegistryKey.dll" />
+ </copy>
+ </target>
+
+ <!-- Creates the runtime folder for the windows platform -->
+ <target name="runtime-win" depends="clean-win, make-win, runtime">
+ <echo message="deployment dir is ${deployment.dir}, win is ${win.dir}" />
+ <mkdir dir="${tvbrowser-win.runtime.dir}"/>
+ <copy todir="${tvbrowser-win.runtime.dir}">
+ <fileset dir="${tvbrowser-default.runtime.dir}"/>
+ <fileset dir="${win.dir}/jRegistryKey" includes="jRegistryKey.dll" />
+ <fileset dir="${deployment.dir}" includes="windows.properties"/>
+ <fileset dir="${win.dir}" includes="tvbrowser_noDD.txt"/>
+ </copy>
+
+ </target>
+
+
+ <!-- Creates the runtime folder for the Mac platform -->
+ <target name="runtime-mac" depends="clean-mac, make-mac, runtime">
+
+ <delete dir="${tvbrowser-mac.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-mac.runtime.dir}"/>
+
+ <jarbundler dir="${tvbrowser-mac.runtime.dir}"
+ verbose="false"
+ name="TV-Browser"
+ icon="./images/additional/tvbrowser.icns"
+ mainclass="tvbrowser.TVBrowser"
+ extraclasspath="/System/Library/Java"
+ jvmversion="1.6+"
+ vmoptions="-Dpropertiesfile=osx.properties -Xmx256m"
+ bundleid="org.tvbrowser"
+ smalltabs="true"
+ antialiasedgraphics="true"
+ antialiasedtext="true"
+ liveresize="true"
+ growboxintrudes="false"
+ screenmenu="true"
+ developmentregion="Global"
+ version="${tvbrowser.version}"
+ workingdirectory="$APP_PACKAGE/Contents/Resources"
+ jars="${tvbrowser-default.runtime.dir}/tvbrowser.jar">
+ <resourcefileset dir="${tvbrowser-default.runtime.dir}">
+ <exclude name="tvbrowser.jar"/>
+ </resourcefileset>
+ </jarbundler>
+
+ <copy todir="${tvbrowser-mac.runtime.dir}/TV-Browser.app/Contents/Resources">
+ <fileset dir="${deployment.dir}" includes="osx.properties"/>
+ </copy>
+
+ </target>
+
+ <!-- Creates the runtime folder for the Mac platform with Java from Oracle->
+ <target name="runtime-macjava" depends="clean-macjava, make-macjava, runtime, test"-->
+ <target name="runtime-macjava" depends="clean-macjava, make-macjava, runtime">
+
+ <!-- Creates an .app file for Mac OS X with appbundler for Java SE 7+ from infinitekind -->
+ <taskdef name="appbundler"
+ classpath="deployment/macosx7/appbundler-1.0ea.jar"
+ classname="com.oracle.appbundler.AppBundlerTask" />
+
+ <!--runtime dir="${env.JAVA_HOME}"/-->
+
+ <delete dir="${tvbrowser-macjava.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-macjava.runtime.dir}"/>
+
+ <appbundler
+ outputdirectory="${tvbrowser-macjava.runtime.dir}"
+ name="TV-Browser"
+ icon="images/additional/tvbrowser.icns"
+ displayname="TV-Browser"
+ identifier="tvbrowser.TVBrowser"
+ shortversion="${tvbrowser.version}"
+ applicationCategory="public.app-category.entertainment"
+ workingDirectory="$APP_ROOT/Contents/Resources"
+ mainclassname="tvbrowser.TVBrowser"
+ highResolutionCapable="false">
+ <classpath dir="${tvbrowser-default.runtime.dir}">
+ <include name="*.jar"/>
+ </classpath>
+ <!-- OSX specific options, optional -->
+ <option value="-Dpropertiesfile=osx.properties"/>
+ <option value="-Dapple.laf.useScreenMenuBar=true"/>
+ <option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
+ <!--option value="-Dcom.apple.macos.useScreenMenuBar=true"/-->
+ <option value="-Dcom.apple.mrj.application.apple.menu.about.name=${bundle.name}"/>
+ <option value="-Dcom.apple.smallTabs=true"/>
+ <option value="-Xmx1024M"/>
+ </appbundler>
+
+ <copy todir="${tvbrowser-macjava.runtime.dir}/TV-Browser.app/Contents/Resources">
+ <fileset dir="${tvbrowser-default.runtime.dir}" excludes="tvbrowser.jar"/>
+ </copy>
+ <copy todir="${tvbrowser-macjava.runtime.dir}/TV-Browser.app/Contents/Resources">
+ <fileset dir="${deployment.dir}" includes="osx.properties"/>
+ </copy>
+
+ </target>
+
+
+ <!-- Creates the desktop entry file for Linux platforms -->
+ <target name="tvbrowser-desktop-entry">
+ <desktopEntry
+ toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
+ name="TV-Browser"
+ icon="imgs/tvbrowser128.png"
+ exec="tvbrowser.sh"
+ tryExec="tvbrowser.sh"
+ categories="Video;AudioVideo;TV"
+ type="Application"
+ >
+ <name lang="de" value="${programname}"/>
+ <genericName value="Digital TV Guide"/>
+ <genericName lang="de" value="Digitale TV-Zeitschrift"/>
+ <comment value="Themeable and easy to use TV Guide - written in Java"/>
+ <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
+ </desktopEntry>
+ <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
+ </target>
+
+ <!-- Creates the desktop entry file for Ubuntu platform -->
+ <target name="tvbrowser-desktop-entry-deb">
+ <desktopEntry
+ toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
+ name="${programname}"
+ icon="/usr/share/tvbrowser/imgs/tvbrowser128.png"
+ exec="tvbrowser"
+ categories="Video;AudioVideo;TV"
+ type="Application"
+ comment="Easy to use TV Guide - written in Java"
+ >
+ <name lang="de" value="${programname}"/>
+ <genericName value="Digital TV Guide"/>
+ <genericName lang="de" value="Digitale TV-Zeitschrift"/>
+ <comment value="Themeable and easy to use TV Guide - written in Java"/>
+ <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
+ </desktopEntry>
+ <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
+ </target>
+
+ <!-- Creates the runtime folder for linux platforms -->
+ <target name="runtime-linux" depends="clean-linux, make-linux, runtime">
+ <delete dir="${tvbrowser-linux.runtime.dir}"/>
+ <mkdir dir="${tvbrowser-linux.runtime.dir}"/>
+ <copy todir="${tvbrowser-linux.runtime.dir}">
+ <fileset dir="${tvbrowser-default.runtime.dir}"/>
+ <fileset dir="${deployment.dir}" includes="linux.properties"/>
+ <fileset dir="${linux.dir}" includes="tvbrowser.sh"/>
+ <!-- <fileset dir="${linux.dir}" includes="tvbrowser.desktop"/>-->
+ </copy>
+ <chmod perm="u+x" file="${tvbrowser-linux.runtime.dir}/tvbrowser.sh"/>
+ </target>
+
+ <target name="release-packages" depends="public-linux, public-ubuntu, public-fedora, public-default, public-doc, public-src"/>
+
+ <!-- Creates the release binaries (.zip) for the platform independent TV-Browser version -->
+ <target name="public-default" depends="runtime-default" description="creates platform-independent binaries">
+ <mkdir dir="${public.dir}"/>
+
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_bin.zip">
+ <zipfileset prefix="tvbrowser-${tvbrowser.version}"
+ dir="${tvbrowser-default.runtime.dir}"/>
+ </zip>
+ </target>
+
+ <target name="clean-public">
+ <delete>
+ <fileset dir="${public.dir}" includes="**/*"/>
+ </delete>
+ </target>
+
+ <target name="public-nightly" depends="clean-public,runtime-transportable" description="Creates platform-independent binaries for nightly transportable version of TV-Browser (without platform dependent starters)">
+ <mkdir dir="${public.dir}"/>
+
+ <tstamp>
+ <format property="TODAY" pattern="yyyy-MM-dd"/>
+ </tstamp>
+
+ <echo file="${tvbrowser-transportable.runtime.dir}/NIGHTLY_VALUES" append="false">${TODAY}-nightly</echo>
+
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_${TODAY}_nightly_bin_transportable.zip">
+ <zipfileset prefix="tvbrowser-nightly-transportable" dir="${tvbrowser-transportable.runtime.dir}"/>
+ </zip>
+
+ </target>
+
+ <target name="public-ubuntu" depends="runtime-linux, tvbrowser-desktop-entry-deb" description="Creates binaries for Ubuntu platforms">
+ <mkdir dir="${public.dir}"/>
+
+ <deb
+ todir="${public.dir}"
+ package="tvbrowser"
+ section="utils"
+ depends="sun-java6-jre | openjdk-6-jre | sun-java7-jre | openjdk-7-jre | openjdk-8-jre | default-jre | java6-runtime | java7-runtime | java8-runtime "
+ recommends="openjdk-6-jre">
+
+ <version upstream="${tvbrowser.version}"/>
+ <maintainer name="TV-Browser team" email="dev@tvbrowser.org"/>
+
+ <!-- do not indent the description, otherwise the indent will be visible in the package manager and other tools -->
+ <description synopsis="Digital TV Guide">Themeable and easy to use TV Guide - written in Java.</description>
+
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="usr/share/tvbrowser">
+ <include name="imgs/**"/>
+ <include name="plugins/**"/>
+ <include name="themepacks/**"/>
+ <include name="infothemes/**"/>
+ <exclude name="tvbrowser.sh"/>
+ <exclude name="tvbrowser.desktop"/>
+ <include name="*"/>
+ </tarfileset>
+
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}/personas" prefix="usr/share/tvbrowser/personas" />
+
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}/icons" prefix="usr/share/tvbrowser/icons">
+ <include name="*"/>
+ </tarfileset>
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="usr/share/tvbrowser" filemode="755" includes="**/tvbrowser.sh" />
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="usr/share/applications" includes="**/tvbrowser.desktop"/>
+ <tarfileset dir="${deployment.dir}/linux"
+ prefix="usr/bin"
+ filemode="755" includes="**/tvbrowser" />
+ </deb>
+ </target>
+
+ <target name="public-fedora" depends="runtime-linux, tvbrowser-desktop-entry-deb" description="Creates binaries for RedHat platforms">
+ <mkdir dir="${public.dir}"/>
+
+ <rrpm
+ destination="${public.dir}"
+ name="tvbrowser"
+ version="${tvbrowser.version}"
+ group="Java">
+
+ <zipfileset dir="${tvbrowser-linux.runtime.dir}" prefix="/usr/share/tvbrowser">
+ <include name="imgs/**"/>
+ <include name="plugins/**"/>
+ <include name="themepacks/**"/>
+ <include name="infothemes/**"/>
+ <exclude name="tvbrowser.sh"/>
+ <exclude name="tvbrowser.desktop"/>
+ <include name="*"/>
+ </zipfileset>
+
+ <zipfileset dir="${tvbrowser-linux.runtime.dir}/personas" prefix="/usr/share/tvbrowser/personas" />
+
+ <zipfileset dir="${tvbrowser-linux.runtime.dir}/icons" prefix="/usr/share/tvbrowser/icons">
+ <include name="*"/>
+ </zipfileset>
+ <zipfileset dir="${tvbrowser-linux.runtime.dir}" prefix="/usr/share/tvbrowser" filemode="755" includes="**/tvbrowser.sh" />
+ <zipfileset dir="${tvbrowser-linux.runtime.dir}" prefix="/usr/share/applications" includes="**/tvbrowser.desktop"/>
+ <zipfileset dir="${deployment.dir}/linux"
+ prefix="/usr/bin"
+ filemode="755" includes="**/tvbrowser" />
+ <depends name="java" version="1.6"/>
+ </rrpm>
+ </target>
+
+ <!-- Creates the release binaries (.tar.gz) for linux platforms -->
+ <target name="public-linux" depends="runtime-linux, tvbrowser-desktop-entry" description="Creates binaries for Linux platforms">
+ <mkdir dir="${public.dir}"/>
+
+ <tar tarfile="${public.dir}/tvbrowser_${tvbrowser.version}_bin.tar.gz" compression="gzip">
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="tvbrowser-${tvbrowser.version}" excludes="**/tvbrowser.sh"/>
+ <tarfileset dir="${tvbrowser-linux.runtime.dir}"
+ prefix="tvbrowser-${tvbrowser.version}"
+ mode="755" includes="**/tvbrowser.sh" />
+ </tar>
+
+ </target>
+
+ <!--
+ | Does the JUnit s.
+ |
+ | If this target does not work, copy the file "junit.jar" from the directory "lib"
+ | in your ANT_HOME/lib directory. (ANT_HOME/lib is on my machine "/usr/share/ant/lib")
+ +-->
+ <target name="test" depends="make-default">
+ <echo>${ant.version}. JUnit4 tests will only work with Ant>=1.7</echo>
+ <mkdir dir="${test.classes.dir}"/>
+ <javac destdir="${test.classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.5" source="1.5">
+ <src>
+ <path path="${test.src.dir}"/>
+ </src>
+ <classpath>
+ <path refid="classpath"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${test.classes.dir}">
+ <fileset dir="${test.src.dir}" includes="**/*.gif"/>
+ <fileset dir="${test.src.dir}" includes="**/*.jpg"/>
+ <fileset dir="${test.src.dir}" includes="**/*.png"/>
+ <fileset dir="${test.src.dir}" includes="**/*.dtd"/>
+ <fileset dir="${test.src.dir}" includes="**/*.properties"/>
+ <fileset dir="${test.src.dir}" includes="**/*.theme"/>
+ <fileset dir="${test.src.dir}" includes="**/*.txt"/>
+ </copy>
+
+
+ <junit haltonfailure="yes" fork="no" >
+ <classpath>
+ <path refid="classpath"/>
+ <path path="${test.classes.dir}"/>
+ </classpath>
+
+ <formatter type="brief" usefile="false"/>
+
+ <batchtest>
+ <fileset dir="${test.src.dir}">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <!--
+ | Generates the JavaDoc documentation.
+ +-->
+ <target name="public-doc" description="Generates the JavaDoc documentation">
+ <echo message="Generating JavaDoc documentation ..." />
+ <delete dir="${doc.dir}"/>
+ <mkdir dir="${doc.dir}"/>
+ <javadoc packagenames="*"
+ sourcepathref="docpath"
+ classpathref="classpath"
+ destdir="${doc.dir}"
+ doctitle="${doc.title}"
+ windowtitle="${doc.title}"
+ additionalparam="-breakiterator"
+ header="${doc.header}"
+ bottom="${doc.bottom}"
+ access="package"
+ failonerror="false"
+ encoding="UTF-8"
+ charset="UTF-8"
+ docencoding="UTF-8">
+ <link offline="true"
+ href="${java-api-location}"
+ packagelistLoc="${package-lists.dir}/jdk/"/>
+ </javadoc>
+
+
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_doc.zip">
+ <zipfileset prefix="tvbrowser_v${tvbrowser.version}/doc"
+ dir="${doc.dir}"/>
+ </zip>
+
+ </target>
+
+ <!--
+ | Dump some information.
+ +-->
+ <target name="dump-info">
+ <echo message="JAVA_HOME=${env.JAVA_HOME}" />
+ <echo message="java.vm.info=${java.vm.info}" />
+ <echo message="java.vm.name=${java.vm.name}" />
+ <echo message="java.vm.vendor=${java.vm.vendor}" />
+ <echo message="java.vm.version=${java.vm.version}" />
+ <echo message="os.arch=${os.arch}" />
+ <echo message="os.name=${os.name}" />
+ <echo message="os.version=${os.version}" />
+ <echo message="file.encoding=${file.encoding}" />
+ <echo message="user.language=${user.language}" />
+ </target>
+
+
+
+
+ <target name="public-src" description="Creates a .zip file containing the full source code of TV-Browser">
+ <mkdir dir="${public.dir}"/>
+ <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_src.zip">
+ <zipfileset prefix="tvbrowser-${tvbrowser.version}"
+ dir=".">
+
+ <exclude name="${classes.dir}/**" />
+ <exclude name="${public.dir}/**" />
+ <exclude name="${runtime.dir}/**" />
+ <exclude name="${unpacked.dir}/**" />
+
+ </zipfileset>
+ </zip>
+ </target>
+
+
+ <!-- - - - - - - - - - - - - - - - - -
+ internal target: download-zipped-lib
+ - - - - - - - - - - - - - - - - - -->
+ <target name="download-zipped-lib">
+
+ <macrodef name="propertycopy">
+ <attribute name="name"/>
+ <attribute name="from"/>
+ <sequential>
+ <property name="@{name}" value="${@{from}}"/>
+ </sequential>
+ </macrodef>
+
+ <propertycopy name="lib.url" from="lib.${lib}.url"/>
+ <propertycopy name="lib.name" from="lib.${lib}.name"/>
+ <propertycopy name="lib.version" from="lib.${lib}.version"/>
+
+ <get dest="${lib.dir}/download.zip" src="${lib.url}"/>
+ <unzip src="${lib.dir}/download.zip" dest="${lib.dir}/download">
+ <patternset>
+ <include name="**/${lib.name}*.jar"/>
+ </patternset>
+ <flattenmapper/>
+ </unzip>
+ <copy todir="${lib.dir}" verbose="true" overwrite="true">
+ <fileset dir="${lib.dir}/download">
+ <include name="${lib.name}.jar"/>
+ <include name="${lib.name}-?.?.jar"/>
+ <include name="${lib.name}-?.?.?.jar"/>
+ <include name="${lib.name}-?.?.??.jar"/>
+ <include name="${lib.name}-r*.jar"/>
+ </fileset>
+ <mapper>
+ <mergemapper to="${lib.name}-${lib.version}.jar"/>
+ </mapper>
+ </copy>
+ <delete dir="${lib.dir}/download"/>
+ </target>
+
+<!-- - - - - - - - - - - - - - - - - -
+ internal target: download-tarred-lib
+ - - - - - - - - - - - - - - - - - -->
+ <target name="download-tarred-lib">
+ <macrodef name="propertycopy">
+ <attribute name="name"/>
+ <attribute name="from"/>
+ <sequential>
+ <property name="@{name}" value="${@{from}}"/>
+ </sequential>
+ </macrodef>
+
+ <propertycopy name="lib.url" from="lib.${lib}.url"/>
+ <propertycopy name="lib.name" from="lib.${lib}.name"/>
+ <propertycopy name="lib.version" from="lib.${lib}.version"/>
+
+ <get dest="${lib.dir}/download.tar.gz" src="${lib.url}"/>
+ <gunzip src="${lib.dir}/download.tar.gz"/>
+ <untar src="${lib.dir}/download.tar" dest="${lib.dir}/download">
+ <patternset>
+ <include name="**/${lib.name}*.jar"/>
+ </patternset>
+ <flattenmapper/>
+ </untar>
+ <copy todir="${lib.dir}" verbose="true" overwrite="true">
+ <fileset dir="${lib.dir}/download">
+ <include name="${lib.name}.jar"/>
+ <include name="${lib.name}-?.?.jar"/>
+ <include name="${lib.name}-?.?.?.jar"/>
+ <include name="${lib.name}-?.?.??.jar"/>
+ </fileset>
+ <mapper>
+ <mergemapper to="${lib.name}-${lib.version}.jar"/>
+ </mapper>
+ </copy>
+ <delete dir="${lib.dir}/download"/>
+ </target>
+
+<!-- - - - - - - - - - - - - - - - - -
+ internal target: download-lib
+ - - - - - - - - - - - - - - - - - -->
+ <target name="download-lib">
+ <macrodef name="propertycopy">
+ <attribute name="name"/>
+ <attribute name="from"/>
+ <sequential>
+ <property name="@{name}" value="${@{from}}"/>
+ </sequential>
+ </macrodef>
+
+ <propertycopy name="lib.url" from="lib.${lib}.url"/>
+ <propertycopy name="lib.name" from="lib.${lib}.name"/>
+ <propertycopy name="lib.version" from="lib.${lib}.version"/>
+
+ <get dest="${lib.dir}/${lib.name}-${lib.version}.jar" src="${lib.url}"/>
+ </target>
+
+ <target name="download-libs" description="downloads all necessary library files">
+ <mkdir dir="${lib.dir}"/>
+
+ <!-- bsh -->
+ <antcall target="download-lib">
+ <param name="lib" value="bsh"/>
+ </antcall>
+
+ <!-- commons codec -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="commons.codec"/>
+ </antcall>
+
+ <!-- commons lang -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="commons.lang"/>
+ </antcall>
+
+ <!-- commons net -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="commons.net"/>
+ </antcall>
+
+ <!-- htmlparser -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="htmlparser"/>
+ </antcall>
+
+ <!-- jgoodies common -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="jgoodies-common"/>
+ </antcall>
+
+ <!-- jgoodies forms -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="jgoodies-forms"/>
+ </antcall>
+
+ <!-- jgoodies looks -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="jgoodies-looks"/>
+ </antcall>
+
+ <!-- jRegistryKey -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="jregistrykey"/>
+ </antcall>
+
+ <!-- l2prod common tasks -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="tasks"/>
+ </antcall>
+
+ <!-- opencsv -->
+ <antcall target="download-tarred-lib">
+ <param name="lib" value="opencsv"/>
+ </antcall>
+
+ <!-- skinlf -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="skinlf"/>
+ </antcall>
+
+ <!-- stax -->
+ <antcall target="download-lib">
+ <param name="lib" value="stax"/>
+ </antcall>
+ <antcall target="download-lib">
+ <param name="lib" value="stax.api"/>
+ </antcall>
+
+ <!-- substance -->
+ <antcall target="download-lib">
+ <param name="lib" value="substance"/>
+ </antcall>
+
+ <!-- texhyphj -->
+ <antcall target="download-zipped-lib">
+ <param name="lib" value="texhyphj"/>
+ </antcall>
+
+ <!-- trident -->
+ <antcall target="download-lib">
+ <param name="lib" value="trident"/>
+ </antcall>
+
+ <delete dir="${lib.dir}">
+ <patternset>
+ <include name="*.zip"/>
+ <include name="*.tar.gz"/>
+ <include name="*.tar"/>
+ </patternset>
+ </delete>
+ </target>
+ <target name="public-tvdatakit"></target>
+
+</project>
diff --git a/media-tv/tvbrowser/metadata.xml b/media-tv/tvbrowser/metadata.xml
new file mode 100644
index 00000000000..19aa81717c4
--- /dev/null
+++ b/media-tv/tvbrowser/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <use>
+ <flag name="themes">Install extra theme packs</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-tv/tvbrowser/tvbrowser-3.2.1-r1.ebuild b/media-tv/tvbrowser/tvbrowser-3.2.1-r1.ebuild
new file mode 100644
index 00000000000..cf177b2c014
--- /dev/null
+++ b/media-tv/tvbrowser/tvbrowser-3.2.1-r1.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2 flag-o-matic virtualx
+
+tp_base="http://javootoo.l2fprod.com/plaf/skinlf/themepacks"
+tvp_base="http://tvbrowser.org/downloads"
+
+DESCRIPTION="Themeable and easy to use TV Guide - written in Java"
+HOMEPAGE="http://www.tvbrowser.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}_src.zip
+
+themes? (
+ ${tp_base}/BeOSthemepack.zip
+ ${tp_base}/amarachthemepack.zip
+ ${tp_base}/aquathemepack.zip
+ ${tp_base}/architectBluethemepack.zip
+ ${tp_base}/architectOlivethemepack.zip
+ ${tp_base}/b0sumiErgothempack.zip
+ ${tp_base}/b0sumithemepack.zip
+ ${tp_base}/bbjthemepack.zip
+ ${tp_base}/beigeazulthemepack.zip
+ ${tp_base}/beosthemepack.zip
+ ${tp_base}/blueMetalthemepack.zip
+ ${tp_base}/blueTurquesathemepack.zip
+ ${tp_base}/cellshadedthemepack.zip
+ ${tp_base}/chaNinja-Bluethemepack.zip
+ ${tp_base}/coronaHthemepack.zip
+ ${tp_base}/cougarthemepack.zip
+ ${tp_base}/crystal2themepack.zip
+ ${tp_base}/fatalEthemepack.zip
+ ${tp_base}/gfxOasisthemepack.zip
+ ${tp_base}/gorillathemepack.zip
+ ${tp_base}/hmmXPBluethemepack.zip
+ ${tp_base}/hmmXPMonoBluethemepack.zip
+ ${tp_base}/iBarthemepack.zip
+ ${tp_base}/macosthemepack.zip
+ ${tp_base}/midnightthemepack.zip
+ ${tp_base}/mmMagra-Xthemepack.zip
+ ${tp_base}/modernthemepack.zip
+ ${tp_base}/oliveGreenLunaXPthemepack.zip
+ ${tp_base}/opusLunaSilverthemepack.zip
+ ${tp_base}/opusOSBluethemepack.zip
+ ${tp_base}/opusOSDeepthemepack.zip
+ ${tp_base}/opusOSOlivethemepack.zip
+ ${tp_base}/quickSilverRthemepack.zip
+ ${tp_base}/roueBluethemepack.zip
+ ${tp_base}/roueBrownthemepack.zip
+ ${tp_base}/roueGreenthemepack.zip
+ ${tp_base}/royalInspiratthemepack.zip
+ ${tp_base}/silverLunaXPthemepack.zip
+ ${tp_base}/solunaRthemepack.zip
+ ${tp_base}/tigerGraphitethemepack.zip
+ ${tp_base}/tigerthemepack.zip
+ ${tp_base}/toxicthemepack.zip
+ ${tp_base}/underlingthemepack.zip
+ ${tp_base}/whistlerthemepack.zip
+ ${tp_base}/xplunathemepack.zip
+
+ ${tvp_base}/noia.zip
+ ${tvp_base}/nuvola.zip
+ ${tvp_base}/tulliana.zip
+ ${tvp_base}/tango_without_heart.zip
+)"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+
+IUSE="themes"
+
+COMMON_DEP="dev-java/bsh:0
+ dev-java/commons-codec:0
+ dev-java/commons-lang:2.1
+ dev-java/commons-net:0
+ dev-java/jakarta-oro:2.0
+ dev-java/jgoodies-forms:0
+ dev-java/jgoodies-looks:2.0
+ dev-java/l2fprod-common:0
+ dev-java/log4j:0
+ dev-java/skinlf:0
+ dev-java/stax:0
+ dev-java/swt:4.2
+ dev-java/xalan:0
+ x11-libs/libXt:0
+ x11-libs/libSM:0
+ x11-libs/libICE:0
+ x11-libs/libXext:0
+ x11-libs/libXtst:0
+ x11-libs/libX11:0
+ x11-libs/libXau:0
+ x11-libs/libXdmcp:0
+"
+
+DEPEND="${COMMON_DEP}
+ app-arch/unzip:0
+ >=virtual/jdk-1.6
+ test? ( dev-java/junit:0 dev-java/ant-junit:0 )
+"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+"
+
+java_prepare() {
+ cp "${FILESDIR}"/${P}-build.xml build.xml || die "Failed to replace build.xml."
+
+ local error="Failed to unbundle or remove libraries or classes."
+ pushd lib > /dev/null
+ rm -v bsh-*.jar commons*.jar jgoodies*.jar l2fprod-common-tasks*.jar \
+ skinlf*.jar stax*.jar || die ${error}
+ popd > /dev/null
+
+ find deployment -name '*.jar' -exec rm -v {} \; || die ${error}
+ find . -name '*.class' -exec rm -v {} \; || die ${error}
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="bsh,commons-codec,commons-lang-2.1,jgoodies-forms,jgoodies-looks-2.0,l2fprod-common,skinlf"
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},ant-junit,junit"
+
+EANT_BUILD_TARGET="runtime-linux"
+EANT_DOC_TARGET="public-doc"
+
+src_test() {
+ VIRTUALX_COMMAND="java-pkg-2_src_test" virtualmake
+}
+
+src_install() {
+ pushd runtime/${PN}_linux > /dev/null
+ java-pkg_dojar ${PN}.jar
+
+ local todir="${JAVA_PKG_SHAREPATH}"
+
+ cp -a {imgs,icons,plugins} "${D}/${todir}" || die "Failed to copy directories."
+ cp linux.properties "${D}/${todir}" || die "Failed to copy linux.properties."
+
+ insinto "${todir}/themepacks"
+ doins themepacks/themepack.zip
+
+ if use themes ; then
+ pushd "${DISTDIR}" > /dev/null
+ doins *pack.zip
+
+ insinto "${todir}/icons"
+ doins noia.zip nuvola.zip tulliana.zip tango_without_heart.zip
+ popd > /dev/null
+ fi
+
+ java-pkg_dolauncher "tvbrowser" \
+ --main tvbrowser.TVBrowser \
+ --pwd ${todir} \
+ --java_args " -Dpropertiesfile=${todir}/linux.properties"
+
+ make_desktop_entry ${PN} "TV-Browser" \
+ /usr/share/tvbrowser/imgs/tvbrowser128.png "AudioVideo;TV;Video"
+ popd > /dev/null
+
+ java-pkg_dojar lib/{htmlparser-1.6.jar,jRegistryKey-1.4.5.jar,opencsv-2.3.jar}
+ java-pkg_dojar lib/{quaqua-7.3.4.jar,substance-6.1.jar,texhyphj-1.1.jar,trident-1.3.jar}
+
+ use source && java-pkg_dosrc src
+ use doc && java-pkg_dojavadoc doc
+}
diff --git a/media-tv/tvbrowser/tvbrowser-3.4.1.0.ebuild b/media-tv/tvbrowser/tvbrowser-3.4.1.0.ebuild
new file mode 100644
index 00000000000..207aff66a52
--- /dev/null
+++ b/media-tv/tvbrowser/tvbrowser-3.4.1.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Themeable and easy to use TV Guide - written in Java"
+HOMEPAGE="http://www.tvbrowser.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}_src.zip"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+IUSE=""
+
+COMMON_DEP="dev-java/bsh:0
+ dev-java/commons-codec:0
+ dev-java/commons-lang:3.1
+ dev-java/commons-net:0
+ dev-java/jakarta-oro:2.0
+ dev-java/jgoodies-common:1.8
+ dev-java/jgoodies-forms:1.8
+ dev-java/jgoodies-looks:2.6
+ dev-java/l2fprod-common:0
+ dev-java/htmlparser-org:0
+ dev-java/log4j:0
+ dev-java/skinlf:0
+ dev-java/stax:0
+ dev-java/xalan:0
+ dev-java/opencsv:0
+ dev-java/texhyphj:0
+ dev-java/trident:0
+ x11-libs/libXt
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXext
+ x11-libs/libXtst
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp"
+
+DEPEND="${COMMON_DEP}
+ app-arch/unzip
+ >=virtual/jdk-1.6"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+
+java_prepare() {
+ epatch "${FILESDIR}"/${PV}-*.patch
+ #epatch "${FILESDIR}"/${PV}-build.xml.patch
+
+ rm -v lib/{bsh-,commons,jgoodies,l2fprod-common-tasks,skinlf,stax,htmlparser,opencsv,trident,texhyphj,jRegistryKey}*.jar
+
+ find deployment -name '*.jar' -delete || die
+ find . -name '*.class' -delete || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="bsh
+ commons-codec
+ commons-lang-3.1
+ jgoodies-common-1.8
+ jgoodies-forms-1.8
+ jgoodies-looks-2.6
+ l2fprod-common
+ skinlf
+ htmlparser-org
+ opencsv
+ texhyphj"
+EANT_BUILD_TARGET="runtime-linux"
+EANT_DOC_TARGET="public-doc"
+
+src_install() {
+ java-pkg_dojar runtime/${PN}_linux/${PN}.jar
+ java-pkg_dojar lib/substance-6.1.jar
+ java-pkg_register-dependency trident,opencsv
+
+ insinto /usr/share/${PN}
+ doins -r runtime/${PN}_linux/{imgs,icons,plugins,infothemes}
+ doins runtime/${PN}_linux/linux.properties
+
+ insinto /usr/share/${PN}/themepacks
+ doins themepacks/themepack.zip
+
+ java-pkg_dolauncher "tvbrowser" \
+ --main tvbrowser.TVBrowser \
+ --pwd /usr/share/${PN} \
+ --java_args " -Dpropertiesfile=/usr/share/${PN}/linux.properties"
+
+ make_desktop_entry ${PN} "TV-Browser" \
+ /usr/share/tvbrowser/imgs/tvbrowser128.png "AudioVideo;TV;Video"
+
+ use source && java-pkg_dosrc src/*
+ use doc && java-pkg_dojavadoc doc
+}
diff --git a/media-tv/tvbrowser/tvbrowser-3.4.ebuild b/media-tv/tvbrowser/tvbrowser-3.4.ebuild
new file mode 100644
index 00000000000..9c32400677a
--- /dev/null
+++ b/media-tv/tvbrowser/tvbrowser-3.4.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Themeable and easy to use TV Guide - written in Java"
+HOMEPAGE="http://www.tvbrowser.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}_src.zip"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+IUSE=""
+
+COMMON_DEP="dev-java/bsh:0
+ dev-java/commons-codec:0
+ dev-java/commons-lang:3.1
+ dev-java/commons-net:0
+ dev-java/jakarta-oro:2.0
+ dev-java/jgoodies-common:1.8
+ dev-java/jgoodies-forms:1.8
+ dev-java/jgoodies-looks:2.6
+ dev-java/l2fprod-common:0
+ dev-java/htmlparser-org:0
+ dev-java/log4j:0
+ dev-java/skinlf:0
+ dev-java/stax:0
+ dev-java/xalan:0
+ dev-java/opencsv:0
+ dev-java/texhyphj:0
+ dev-java/trident:0
+ x11-libs/libXt
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXext
+ x11-libs/libXtst
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp"
+
+DEPEND="${COMMON_DEP}
+ app-arch/unzip
+ >=virtual/jdk-1.6"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+
+java_prepare() {
+ epatch "${FILESDIR}"/${PV}-*.patch
+
+ rm -v lib/{bsh-,commons,jgoodies,l2fprod-common-tasks,skinlf,stax,htmlparser,opencsv,trident,texhyphj,jRegistryKey}*.jar
+
+ find deployment -name '*.jar' -delete || die
+ find . -name '*.class' -delete || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="bsh
+ commons-codec
+ commons-lang-3.1
+ jgoodies-common-1.8
+ jgoodies-forms-1.8
+ jgoodies-looks-2.6
+ l2fprod-common
+ skinlf
+ htmlparser-org
+ opencsv
+ texhyphj"
+EANT_BUILD_TARGET="runtime-linux"
+EANT_DOC_TARGET="public-doc"
+
+src_install() {
+ java-pkg_dojar runtime/${PN}_linux/${PN}.jar
+ java-pkg_dojar lib/substance-6.1.jar
+ java-pkg_register-dependency trident,opencsv
+
+ insinto /usr/share/${PN}
+ doins -r runtime/${PN}_linux/{imgs,icons,plugins,infothemes}
+ doins runtime/${PN}_linux/linux.properties
+
+ insinto /usr/share/${PN}/themepacks
+ doins themepacks/themepack.zip
+
+ java-pkg_dolauncher "tvbrowser" \
+ --main tvbrowser.TVBrowser \
+ --pwd /usr/share/${PN} \
+ --java_args " -Dpropertiesfile=/usr/share/${PN}/linux.properties"
+
+ make_desktop_entry ${PN} "TV-Browser" \
+ /usr/share/tvbrowser/imgs/tvbrowser128.png "AudioVideo;TV;Video"
+
+ use source && java-pkg_dosrc src/*
+ use doc && java-pkg_dojavadoc doc
+}
diff --git a/media-tv/tvbrowser/tvbrowser-9999.ebuild b/media-tv/tvbrowser/tvbrowser-9999.ebuild
new file mode 100644
index 00000000000..aef81d7131f
--- /dev/null
+++ b/media-tv/tvbrowser/tvbrowser-9999.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2 flag-o-matic virtualx subversion
+
+tp_base="http://javootoo.l2fprod.com/plaf/skinlf/themepacks"
+tvp_base="http://tvbrowser.org/downloads"
+
+DESCRIPTION="Themeable and easy to use TV Guide - written in Java"
+HOMEPAGE="http://www.tvbrowser.org/"
+ESVN_REPO_URI="https://tvbrowser.svn.sourceforge.net/svnroot/tvbrowser/trunk/tvbrowser"
+SRC_URI="
+themes? (
+ ${tp_base}/BeOSthemepack.zip
+ ${tp_base}/amarachthemepack.zip
+ ${tp_base}/aquathemepack.zip
+ ${tp_base}/architectBluethemepack.zip
+ ${tp_base}/architectOlivethemepack.zip
+ ${tp_base}/b0sumiErgothempack.zip
+ ${tp_base}/b0sumithemepack.zip
+ ${tp_base}/bbjthemepack.zip
+ ${tp_base}/beigeazulthemepack.zip
+ ${tp_base}/beosthemepack.zip
+ ${tp_base}/blueMetalthemepack.zip
+ ${tp_base}/blueTurquesathemepack.zip
+ ${tp_base}/cellshadedthemepack.zip
+ ${tp_base}/chaNinja-Bluethemepack.zip
+ ${tp_base}/coronaHthemepack.zip
+ ${tp_base}/cougarthemepack.zip
+ ${tp_base}/crystal2themepack.zip
+ ${tp_base}/fatalEthemepack.zip
+ ${tp_base}/gfxOasisthemepack.zip
+ ${tp_base}/gorillathemepack.zip
+ ${tp_base}/hmmXPBluethemepack.zip
+ ${tp_base}/hmmXPMonoBluethemepack.zip
+ ${tp_base}/iBarthemepack.zip
+ ${tp_base}/macosthemepack.zip
+ ${tp_base}/midnightthemepack.zip
+ ${tp_base}/mmMagra-Xthemepack.zip
+ ${tp_base}/modernthemepack.zip
+ ${tp_base}/oliveGreenLunaXPthemepack.zip
+ ${tp_base}/opusLunaSilverthemepack.zip
+ ${tp_base}/opusOSBluethemepack.zip
+ ${tp_base}/opusOSDeepthemepack.zip
+ ${tp_base}/opusOSOlivethemepack.zip
+ ${tp_base}/quickSilverRthemepack.zip
+ ${tp_base}/roueBluethemepack.zip
+ ${tp_base}/roueBrownthemepack.zip
+ ${tp_base}/roueGreenthemepack.zip
+ ${tp_base}/royalInspiratthemepack.zip
+ ${tp_base}/silverLunaXPthemepack.zip
+ ${tp_base}/solunaRthemepack.zip
+ ${tp_base}/tigerGraphitethemepack.zip
+ ${tp_base}/tigerthemepack.zip
+ ${tp_base}/toxicthemepack.zip
+ ${tp_base}/underlingthemepack.zip
+ ${tp_base}/whistlerthemepack.zip
+ ${tp_base}/xplunathemepack.zip
+
+ ${tvp_base}/noia.zip
+ ${tvp_base}/nuvola.zip
+ ${tvp_base}/tulliana.zip
+ ${tvp_base}/tango_without_heart.zip
+)"
+
+SLOT="0"
+KEYWORDS=""
+LICENSE="GPL-3"
+
+IUSE="themes"
+
+CDEPEND="dev-java/bsh:0
+ dev-java/commons-codec:0
+ dev-java/commons-lang:3.3
+ dev-java/commons-net:0
+ dev-java/jakarta-oro:2.0
+ dev-java/jgoodies-common:1.8
+ dev-java/jgoodies-forms:1.8
+ dev-java/jgoodies-looks:2.6
+ dev-java/l2fprod-common:0
+ dev-java/log4j:0
+ dev-java/skinlf:0
+ dev-java/stax:0
+ dev-java/swt:4.2
+ dev-java/xalan:0
+ x11-libs/libXt:0
+ x11-libs/libSM:0
+ x11-libs/libICE:0
+ x11-libs/libXext:0
+ x11-libs/libXtst:0
+ x11-libs/libX11:0
+ x11-libs/libXau:0
+ x11-libs/libXdmcp:0"
+
+DEPEND="${CDEPEND}
+ app-arch/unzip:0
+ >=virtual/jdk-1.6
+ test? ( dev-java/junit:0 dev-java/ant-junit:0 )"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+
+src_prepare() {
+ cp "${FILESDIR}"/${P}-build.xml build.xml || die "Failed to replace build.xml."
+
+ # Yes, there are some bundled jars.
+ # Can't help but use them for the time being.
+ local error="Failed to unbundle or remove libraries or classes."
+ pushd lib > /dev/null
+ rm -v bsh-*.jar commons*.jar jgoodies*.jar l2fprod-common-tasks*.jar \
+ skinlf*.jar stax*.jar || die ${error}
+ popd > /dev/null
+
+ find deployment -name '*.jar' -exec rm -v {} \; || die ${error}
+ find . -name '*.class' -exec rm -v {} \; || die ${error}
+
+ # These tests fail.
+ rm -v \
+ test/src/util/misc/TextLineBreakerTest.java \
+ test/src/util/ui/html/HTMLTextHelperTest.java
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="bsh,commons-codec,commons-lang-3.3,jgoodies-common-1.8,jgoodies-forms-1.8,jgoodies-looks-2.6,l2fprod-common,skinlf"
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},ant-junit,junit"
+
+EANT_BUILD_TARGET="runtime-linux"
+EANT_DOC_TARGET="public-doc"
+
+src_test() {
+ VIRTUALX_COMMAND="java-pkg-2_src_test" virtualmake
+}
+
+src_install() {
+ pushd runtime/${PN}_linux > /dev/null
+ java-pkg_dojar ${PN}.jar
+
+ local todir="${JAVA_PKG_SHAREPATH}"
+
+ cp -a {imgs,icons,plugins} "${D}/${todir}" || die "Failed to copy directories."
+ cp linux.properties "${D}/${todir}" || die "Failed to copy linux.properties."
+
+ insinto "${todir}/themepacks"
+ doins themepacks/themepack.zip
+
+ if use themes ; then
+ pushd "${DISTDIR}" > /dev/null
+ doins *pack.zip
+
+ insinto "${todir}/icons"
+ doins noia.zip nuvola.zip tulliana.zip tango_without_heart.zip
+ popd > /dev/null
+ fi
+
+ java-pkg_dolauncher "tvbrowser" \
+ --main tvbrowser.TVBrowser \
+ --pwd ${todir} \
+ --java_args " -Dpropertiesfile=${todir}/linux.properties"
+
+ make_desktop_entry ${PN} "TV-Browser" \
+ /usr/share/tvbrowser/imgs/tvbrowser128.png "AudioVideo;TV;Video"
+ popd > /dev/null
+
+ java-pkg_dojar $(ls lib/*.jar)
+ #java-pkg_dojar lib/{htmlparser-1.6.jar,jRegistryKey-1.4.5.jar,opencsv-2.3.jar}
+ #java-pkg_dojar lib/{substance-6.1.jar,texhyphj-1.1.jar,trident-1.3.jar}
+
+ use source && java-pkg_dosrc src
+ use doc && java-pkg_dojavadoc doc
+}
diff --git a/media-tv/tvheadend/Manifest b/media-tv/tvheadend/Manifest
new file mode 100644
index 00000000000..a40c11b49b9
--- /dev/null
+++ b/media-tv/tvheadend/Manifest
@@ -0,0 +1,3 @@
+DIST hts-tvheadend_2.12.tar.gz 1475053 SHA256 c2e33384b24356be036bf8e58a026efeed247b001d3674929dc0016bf2b0e11b SHA512 87808a57454b58f458e8e7db6d381e34917064a0f196ed4e91f2ee912575282e121ada72d11ce6c3f8c5e2913dc4510b0b1e6a7d252b702946c033ef35e85c68 WHIRLPOOL 953735a6796972dbf5a7b2f541fc07c7dc2666e4a15f007fdefd92b7445055c227ce8b570088e4fd0810ffebd3271a19af7fd023eb58dfd046b24d45be5053cc
+DIST tvheadend-3.2.tar.gz 2155532 SHA256 4bda0da2488c2078c6bd7e92ea5099c7c1e6c52fd361af965c83e82070cfb651 SHA512 f4f87a42c10bf9989606ca932ba916f9c70d0adfc1c0f6ee1f1dd3c23545de8e1699c4f519c56a7f5df0b27521d7f714c02ea5d30432756511baefb00ddd8d22 WHIRLPOOL 8dbf8c7eeff31b132f61d7ff8cf5412659e430e3fe47733ec54e7e804b8be608bd9886d8149975a91653608edeb641781e08c6f3df819dc08a4f7d96abe41dfb
+DIST tvheadend-3.4.27.tar.gz 2201905 SHA256 50438809ff43ab332d255248096e9531ac85e6c51511206a3f68cfc1697f4ead SHA512 fb6dc59fbaf5ea43f69452ff6b034ed80b040bb15f5c43f26a3f8075601066354f82e5cf15f7c5215adf1387edfa57468f71605aacfc0824a996aee108a0f11a WHIRLPOOL b0c92d8368cf7643a238d918752f8b1816ddcfde28372fecad228ab133d4e1dd6219d5b436c396fa4013af5269b2fd05b62bb6ce6180553d835204c8c38029ca
diff --git a/media-tv/tvheadend/files/tvheadend.confd b/media-tv/tvheadend/files/tvheadend.confd
new file mode 100644
index 00000000000..8be4a5dadce
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend.confd
@@ -0,0 +1,14 @@
+# /etc/conf.d/tvheadend: config file for /etc/init.d/tvheadend
+# See the tvheadend(1) manpage for more info.
+
+# Run Tvheadend as this user.
+TVHEADEND_USER="tvheadend"
+
+# Run Tvheadend as this group.
+TVHEADEND_GROUP="video"
+
+# Path to Tvheadend config.
+TVHEADEND_CONFIG="/etc/tvheadend"
+
+# Other options you want to pass to Tvheadend.
+TVHEADEND_OPTIONS=""
diff --git a/media-tv/tvheadend/files/tvheadend.initd b/media-tv/tvheadend/files/tvheadend.initd
new file mode 100644
index 00000000000..58ded5e5f93
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Tvheadend"
+ start-stop-daemon --start --quiet --exec /usr/bin/tvheadend \
+ -- -f -C -u ${TVHEADEND_USER} -g ${TVHEADEND_GROUP} \
+ -c ${TVHEADEND_CONFIG} ${TVHEADEND_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Tvheadend"
+ start-stop-daemon --stop --quiet --pidfile /var/run/tvheadend.pid
+ eend $?
+}
diff --git a/media-tv/tvheadend/files/tvheadend.service b/media-tv/tvheadend/files/tvheadend.service
new file mode 100644
index 00000000000..227faffcb08
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=tvheadend
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/tvheadend.pid
+ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -c /etc/tvheadend -u tvheadend -g video
+ExecStop=/usr/bin/rm /run/tvheadend.pid
+Restart=always
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-tv/tvheadend/metadata.xml b/media-tv/tvheadend/metadata.xml
new file mode 100644
index 00000000000..e6ede4196eb
--- /dev/null
+++ b/media-tv/tvheadend/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>leho@kraav.com</email>
+ <name>Leho Kraav</name>
+ </maintainer>
+ <use>
+ <flag name='xmltv'>Use <pkg>media-tv/xmltv</pkg></flag>
+ <flag name='ccache'>Use <pkg>dev-util/ccache</pkg></flag>
+ <flag name='dvbscan'>Use <pkg>media-tv/linuxtv-dvb-apps</pkg></flag>
+ <flag name='imagecache'>Enable support for image caching</flag>
+ <flag name='uriparser'>Use <pkg>dev-libs/uriparser</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-tv/tvheadend/tvheadend-2.12.ebuild b/media-tv/tvheadend/tvheadend-2.12.ebuild
new file mode 100644
index 00000000000..aa19691e71b
--- /dev/null
+++ b/media-tv/tvheadend/tvheadend-2.12.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs user
+
+MY_PN="hts-${PN}"
+
+DESCRIPTION="A combined DVB receiver, Digital Video Recorder and Live TV streaming server"
+HOMEPAGE="http://www.lonelycoder.com/hts/"
+SRC_URI="http://www.lonelycoder.com/debian/dists/hts/main/source/${MY_PN}_${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="avahi xmltv"
+
+DEPEND="virtual/linuxtv-dvb-headers"
+RDEPEND="${DEPEND}
+ avahi? ( net-dns/avahi )
+ xmltv? ( media-tv/xmltv )"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+pkg_setup() {
+ enewuser tvheadend -1 -1 /dev/null video
+}
+
+src_prepare() {
+ # set version number to avoid subversion and git dependencies
+ sed -e 's:\$(shell support/version.sh):${PV}:' \
+ -i Makefile || die "sed failed!"
+
+ # remove stripping
+ sed -e 's:install -s:install:' \
+ -i support/posix.mk || die "sed failed!"
+
+ # remove '-Werror' wrt bug #438424
+ sed -i 's:-Werror::' Makefile || die "sed on removing '-Werror' failed!"
+}
+
+src_configure() {
+ econf $(use_enable avahi) --release
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc ChangeLog README
+ doman man/tvheadend.1
+
+ newinitd "${FILESDIR}/tvheadend.initd" tvheadend
+ newconfd "${FILESDIR}/tvheadend.confd" tvheadend
+
+ dodir /etc/tvheadend
+ fperms 0700 /etc/tvheadend
+ fowners tvheadend:video /etc/tvheadend
+}
+
+pkg_postinst() {
+ elog "The Tvheadend web interface can be reached at:"
+ elog "http://localhost:9981/"
+ elog
+ elog "Make sure that you change the default username"
+ elog "and password via the Configuration / Access control"
+ elog "tab in the web interface."
+}
diff --git a/media-tv/tvheadend/tvheadend-3.2.ebuild b/media-tv/tvheadend/tvheadend-3.2.ebuild
new file mode 100644
index 00000000000..7d9b290d182
--- /dev/null
+++ b/media-tv/tvheadend/tvheadend-3.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="A combined DVB receiver, Digital Video Recorder and Live TV streaming server"
+HOMEPAGE="https://www.lonelycoder.com/redmine/projects/tvheadend/"
+SRC_URI="mirror://github/tvheadend/tvheadend/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="avahi xmltv zlib"
+
+DEPEND="dev-libs/openssl
+ virtual/linuxtv-dvb-headers
+ avahi? ( net-dns/avahi )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ xmltv? ( media-tv/xmltv )"
+
+DOCS=( README )
+
+pkg_setup() {
+ enewuser tvheadend -1 -1 /dev/null video
+}
+
+src_prepare() {
+ # set the correct version number
+ sed -e "s:(3.1.694):(${PV}):" -i debian/changelog || die 'sed failed!'
+
+ # remove '-Werror' wrt bug #438424
+ sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
+}
+
+src_configure() {
+ econf --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/"${PN}" \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --release \
+ --disable-dvbscan \
+ $(use_enable avahi) \
+ $(use_enable zlib)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/tvheadend.initd" tvheadend
+ newconfd "${FILESDIR}/tvheadend.confd" tvheadend
+
+ dodir /etc/tvheadend
+ fperms 0700 /etc/tvheadend
+ fowners tvheadend:video /etc/tvheadend
+}
+
+pkg_postinst() {
+ elog "The Tvheadend web interface can be reached at:"
+ elog "http://localhost:9981/"
+ elog
+ elog "Make sure that you change the default username"
+ elog "and password via the Configuration / Access control"
+ elog "tab in the web interface."
+}
diff --git a/media-tv/tvheadend/tvheadend-3.4.27.ebuild b/media-tv/tvheadend/tvheadend-3.4.27.ebuild
new file mode 100644
index 00000000000..b5e760f7488
--- /dev/null
+++ b/media-tv/tvheadend/tvheadend-3.4.27.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs user
+
+MY_PV="3.4patch1"
+
+DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
+HOMEPAGE="https://tvheadend.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="avahi +dvb +dvbscan ffmpeg imagecache inotify xmltv zlib"
+
+REQUIRED_USE="dvbscan? ( dvb )"
+
+DEPEND="dev-libs/openssl
+ avahi? ( net-dns/avahi )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ ffmpeg? ( virtual/ffmpeg )
+ imagecache? ( net-misc/curl )
+ zlib? ( sys-libs/zlib )
+ virtual/pkgconfig"
+
+RDEPEND="${DEPEND}
+ dvbscan? ( media-tv/linuxtv-dvb-apps )
+ xmltv? ( media-tv/xmltv )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+DOCS=( README )
+
+pkg_setup() {
+ enewuser tvheadend -1 -1 /dev/null video
+}
+
+src_prepare() {
+ # set the version number
+ echo "const char *tvheadend_version = \"${PV}\";" \
+ > src/version.c || die "setting version failed!"
+
+ # remove '-Werror' wrt bug #438424
+ sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
+}
+
+src_configure() {
+ econf --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ $(use_enable avahi) \
+ --disable-dvbscan \
+ $(use_enable dvb linuxdvb) \
+ $(use_enable ffmpeg libav) \
+ $(use_enable imagecache) \
+ $(use_enable inotify) \
+ $(use_enable zlib)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/tvheadend.initd" tvheadend
+ newconfd "${FILESDIR}/tvheadend.confd" tvheadend
+
+ systemd_dounit "${FILESDIR}/tvheadend.service"
+
+ dodir /etc/tvheadend
+ fperms 0700 /etc/tvheadend
+ fowners tvheadend:video /etc/tvheadend
+}
+
+pkg_postinst() {
+ elog "The Tvheadend web interface can be reached at:"
+ elog "http://localhost:9981/"
+ elog
+ elog "Make sure that you change the default username"
+ elog "and password via the Configuration / Access control"
+ elog "tab in the web interface."
+}
diff --git a/media-tv/tvheadend/tvheadend-9999.ebuild b/media-tv/tvheadend/tvheadend-9999.ebuild
new file mode 100644
index 00000000000..1744e4722b9
--- /dev/null
+++ b/media-tv/tvheadend/tvheadend-9999.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils git-2 linux-info systemd toolchain-funcs user
+
+DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
+HOMEPAGE="https://tvheadend.org/"
+EGIT_REPO_URI="git://github.com/tvheadend/tvheadend.git"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+
+IUSE="avahi ccache +dvb +dvbscan ffmpeg imagecache inotify uriparser xmltv zlib"
+
+DEPEND="dev-libs/openssl
+ avahi? ( net-dns/avahi )
+ ccache? ( dev-util/ccache )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ ffmpeg? ( virtual/ffmpeg )
+ uriparser? ( dev-libs/uriparser )
+ zlib? ( sys-libs/zlib )
+ virtual/pkgconfig"
+
+RDEPEND="${DEPEND}
+ dvbscan? ( media-tv/linuxtv-dvb-apps )
+ xmltv? ( media-tv/xmltv )"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+DOCS=( README.md )
+
+pkg_setup() {
+ enewuser tvheadend -1 -1 /dev/null video
+}
+
+src_prepare() {
+ # remove '-Werror' wrt bug #438424
+ sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
+}
+
+src_configure() {
+ econf --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share \
+ $(use_enable avahi) \
+ $(use_enable ccache) \
+ --disable-dvbscan \
+ $(use_enable dvb linuxdvb) \
+ $(use_enable ffmpeg libav) \
+ $(use_enable imagecache) \
+ $(use_enable inotify) \
+ $(use_enable uriparser) \
+ $(use_enable zlib)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/tvheadend.initd" tvheadend
+ newconfd "${FILESDIR}/tvheadend.confd" tvheadend
+
+ systemd_dounit "${FILESDIR}/tvheadend.service"
+
+ dodir /etc/tvheadend
+ fperms 0700 /etc/tvheadend
+ fowners tvheadend:video /etc/tvheadend
+}
+
+pkg_postinst() {
+ elog "The Tvheadend web interface can be reached at:"
+ elog "http://localhost:9981/"
+ elog
+ elog "Make sure that you change the default username"
+ elog "and password via the Configuration / Access control"
+ elog "tab in the web interface."
+}
diff --git a/media-tv/tvmovie2vdr/Manifest b/media-tv/tvmovie2vdr/Manifest
new file mode 100644
index 00000000000..f7f2e5b00ec
--- /dev/null
+++ b/media-tv/tvmovie2vdr/Manifest
@@ -0,0 +1 @@
+DIST tvmovie2vdr-0.5.13.tar.gz 214932 SHA256 26952547e0c75b278b1cf928c91d2fdf7e895d60f7c429e287be443896cc0b05
diff --git a/media-tv/tvmovie2vdr/metadata.xml b/media-tv/tvmovie2vdr/metadata.xml
new file mode 100644
index 00000000000..b9c00d0c96f
--- /dev/null
+++ b/media-tv/tvmovie2vdr/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/media-tv/tvmovie2vdr/tvmovie2vdr-0.5.13.ebuild b/media-tv/tvmovie2vdr/tvmovie2vdr-0.5.13.ebuild
new file mode 100644
index 00000000000..7f8caacbdf8
--- /dev/null
+++ b/media-tv/tvmovie2vdr/tvmovie2vdr-0.5.13.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+VDR_CONF_DIR="/etc/vdr"
+VDR_VIDEO_DIR="/var/vdr/video"
+
+CONF_DIR="/etc/vdr/tvmovie2vdr"
+VAR_DIR="/var/vdr/tvmovie2vdr"
+SHARE_DIR="/usr/share/${PN}"
+
+DESCRIPTION="load the program guide from tvmovie and others to vdr"
+HOMEPAGE="http://steckrue.be/tvm2vdr/"
+SRC_URI="http://steckrue.be/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+DEPEND=">=media-video/vdr-1.2.0
+ >=dev-perl/DateManip-5.42a-r1
+ >=virtual/perl-IO-Compress-1.22
+ >=dev-perl/Archive-Zip-1.14
+ >=dev-perl/Text-Iconv-1.4
+ >=dev-perl/libwww-perl-5.69-r2
+ >=dev-perl/HTML-Parser-3.34-r1
+ >=dev-perl/HTML-Scrubber-0.08
+ >=dev-perl/HTML-TableContentParser-0.13
+ >=dev-perl/XML-Simple-DTDReader-0.03
+ >=media-gfx/imagemagick-6.2.2.3
+ dev-perl/DateManip
+ dev-perl/XML-Simple-DTDReader"
+
+src_compile() {
+ # change default downloadpath in config
+ sed -i config/config.pl_dist \
+ -e "s:channelsfile = .*;:channelsfile = \"${VDR_CONF_DIR}/channels.conf\";:" \
+ -e "s:epgfile = .*;:epgfile = \"${VDR_VIDEO_DIR}/epg.data\";:" \
+ -e "s:downloadprefix = .*;:downloadprefix = \"${VAR_DIR}/downloadfiles/\";:" \
+ -e "s:updateprefix = .*;:updateprefix = \"${VAR_DIR}/downloadupdatefiles/\";:" \
+ -e "s:infosaturl=.*;:infosaturl=\"${VAR_DIR}/infosatepg\";:" \
+ -e 's:imagepath = .*;:imagepath = "/var/vdr/epgimages";:'
+
+ # set correct pathes to conf and include files
+ sed -i tvm2vdr tvinfomerk2vdr clearoldtimer \
+ -e 's:push (@INC, "./config");:push (@INC, "'${CONF_DIR}'");:' \
+ -e 's:push (@INC, "./inc");:push (@INC, "'${SHARE_DIR}/inc'");:' \
+ -e "s:contrib/:${SHARE_DIR}/contrib/:"
+}
+
+src_install() {
+ # config files
+ insinto "${CONF_DIR}"
+ local c
+ for c in channels.pl channels_vps_wanted.pl channels_wanted.pl config.pl; do
+ newins "config/${c}_dist" "${c}"
+ done
+
+ # include files - helpers for different providers
+ insinto "${SHARE_DIR}/inc"
+ doins inc/*
+
+ exeinto "${SHARE_DIR}/contrib"
+ doexe ./contrib/*
+ doexe clearoldtimer getinfosat tvm2vdr.sh
+
+ # install main binaries
+ dobin tvinfomerk2vdr
+ dobin tvm2vdr
+
+ # dirs to keep downloaded data in
+ keepdir "${VAR_DIR}/downloadfiles"
+ keepdir "${VAR_DIR}/downloadupdatefiles"
+ keepdir "/var/vdr/epgimages"
+ chown -R vdr:vdr "${D}/${VAR_DIR}" "${D}/var/vdr/epgimages"
+
+ # install documentation
+ dodoc HISTORY README tvm2vdr.sh
+}
+
+pkg_postinst() {
+ # cleanup old cruft
+ [ -L "${ROOT}/etc/vdr/tvmovie2vdr/files" ] \
+ && rm -f "${ROOT}/etc/vdr/tvmovie2vdr/files"
+
+ [ -L "${ROOT}/var/vdr/tvmovie2vdr/tvmovie2vdr" ] \
+ && rm -f "${ROOT}/var/vdr/tvmovie2vdr/tvmovie2vdr"
+
+ eerror "The executable name of tvmovie2vdr changed!"
+ eerror "Old name was tvm2vdr.pl, new is: tvm2vdr"
+ eerror "Please change name in your cron-job!"
+ eerror
+
+ elog "You have to configure the following files:"
+ elog "\t${CONF_DIR}/config.pl"
+ elog "\t${CONF_DIR}/channels_wanted.pl"
+ elog
+ elog "It's a good idea to add the following to /etc/crontab:"
+ elog "\t3 5 * * * vdr /usr/bin/tvinfomerk2vdr"
+ elog "\t7 5 * * * vdr /usr/bin/tvm2vdr"
+ elog
+ elog "To delete old pictures you should run the following command with the tvmovie2vdr run:"
+ elog "\tfind /var/vdr/epgimages/ -type f -mtime +10 -exec rm {} \;"
+ elog "or see tvm2vdr.sh in /usr/share/tvmovie2vdr/contrib"
+ elog
+}
diff --git a/media-tv/tvnamer/Manifest b/media-tv/tvnamer/Manifest
new file mode 100644
index 00000000000..f335dd91ffd
--- /dev/null
+++ b/media-tv/tvnamer/Manifest
@@ -0,0 +1 @@
+DIST tvnamer-2.3.tar.gz 44415 SHA256 230b5608002f048640e270639cfb43f3301f08127af46e1243a033c8e1c62696 SHA512 b1b0ac4e665a04215cb3d4e738197285c800c554b276e56ccd14af17fc624ffe7dab92b208f9791806045eb1ad0a59d6e76e52464e488f919e48dff2a879d96c WHIRLPOOL e04543a1921c327681fc748d85a9278270ebaa9ac211e069ed78309b3cbed64c86ee5114e0a13827418546ed9ec550c6dc1588ecd5386cf29e9cdabea0cc82cb
diff --git a/media-tv/tvnamer/metadata.xml b/media-tv/tvnamer/metadata.xml
new file mode 100644
index 00000000000..6e85dceeed0
--- /dev/null
+++ b/media-tv/tvnamer/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>thev00d00@gentoo.org</email>
+ <name>Ian Whyman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">tvnamer</remote-id>
+ <remote-id type="github">dbr/tvnamer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/tvnamer/tvnamer-2.3.ebuild b/media-tv/tvnamer/tvnamer-2.3.ebuild
new file mode 100644
index 00000000000..cf00435348b
--- /dev/null
+++ b/media-tv/tvnamer/tvnamer-2.3.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT="python2_7"
+inherit distutils-r1
+
+DESCRIPTION="Automatic TV episode file renamer, data from thetvdb.com"
+HOMEPAGE="http://github.com/dbr/tvnamer"
+SRC_URI="mirror://pypi/t/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-python/tvdb_api"
+DEPEND="${DEPEND}
+ dev-python/setuptools
+"
diff --git a/media-tv/v4l-dvb-saa716x/Manifest b/media-tv/v4l-dvb-saa716x/Manifest
new file mode 100644
index 00000000000..7a6f599326a
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/Manifest
@@ -0,0 +1,2 @@
+DIST v4l-dvb-saa716x-0.0.1_p20140322.tar.gz 5026505 SHA256 79ff65c1354506ffb951e23bc1667c372cf22e9eca8309f9b7486fcfec22ef29 SHA512 2b452f6951064f01e88ccf1a2a6f0c9db8ac96779f7b8d56d33cf387d6ed196922edf6b6234d5887ce9dfdb7013772dc874be5ad5893b8e92b23ffe1f2b5d6ea WHIRLPOOL c6f63e835a670455aa871d179283d283d1e3da23f83c868040a48a402178d73d0c7f44ee807076e3cbd72a7b3e1f050d3e6103d2a49c778eddfe19efdba815a7
+DIST v4l-dvb-saa716x-0.0.1_p20141109.tar.gz 5028238 SHA256 2c6608f94df9da7681e2b22fdbdd842cdd1e97dd1dac6017c713c1fc037cd2bd SHA512 a67f095d4878b4ceb3b340e725925385fee33b289e875e9e0903370d0ec909d66893d9ac846d5c7fedf469129a3327e3458668db5a83ff2718c04174e6e07c66 WHIRLPOOL 156cac6e08c57c1a4c2b5511d211de784d941c22d6bc7c2aa8188e9c01b8cf043e4f7a3af595180c68af4de6be7d1bfba4f27323c14a18afdd3110e8629802a3
diff --git a/media-tv/v4l-dvb-saa716x/files/OSD_RAW_CMD_patch_2.diff b/media-tv/v4l-dvb-saa716x/files/OSD_RAW_CMD_patch_2.diff
new file mode 100644
index 00000000000..7f09a1d60f1
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/files/OSD_RAW_CMD_patch_2.diff
@@ -0,0 +1,27 @@
+--- linux/drivers/media/common/saa716x/saa716x_ff_cmd.h.orig 2011-11-12 14:46:51.175700236 +0100
++++ linux/drivers/media/common/saa716x/saa716x_ff_cmd.h 2011-11-12 14:45:10.103702959 +0100
+@@ -1,6 +1,24 @@
+ #ifndef __SAA716x_FF_CMD_H
+ #define __SAA716x_FF_CMD_H
+
++#if !defined OSD_RAW_CMD
++typedef struct osd_raw_cmd_s {
++ const void *cmd_data;
++ int cmd_len;
++ void *result_data;
++ int result_len;
++} osd_raw_cmd_t;
++
++typedef struct osd_raw_data_s {
++ const void *data_buffer;
++ int data_length;
++ int data_handle;
++} osd_raw_data_t;
++
++#define OSD_RAW_CMD _IOWR('o', 162, osd_raw_cmd_t)
++#define OSD_RAW_DATA _IOWR('o', 163, osd_raw_data_t)
++#endif
++
+ extern int sti7109_cmd_init(struct sti7109_dev *sti7109);
+ extern int sti7109_raw_cmd(struct sti7109_dev * sti7109,
+ osd_raw_cmd_t * cmd);
diff --git a/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-3.19-set_gpio.patch b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-3.19-set_gpio.patch
new file mode 100644
index 00000000000..895caa4449e
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-3.19-set_gpio.patch
@@ -0,0 +1,24 @@
+--- v4l-dvb-saa716x-d7e98fc59230-orig/linux/drivers/media/common/saa716x/saa716x_budget.c 2014-11-09 15:44:55.000000000 +0100
++++ v4l-dvb-saa716x-d7e98fc59230/linux/drivers/media/common/saa716x/saa716x_budget.c 2015-02-28 13:58:01.258743639 +0100
+@@ -497,10 +497,10 @@
+ break;
+ }
+
+- err = stv090x_set_gpio(fe, 2, 0, en, 0);
++ err = skystar2_stv090x_config.set_gpio(fe, 2, 0, en, 0);
+ if (err < 0)
+ goto exit;
+- err = stv090x_set_gpio(fe, 3, 0, sel, 0);
++ err = skystar2_stv090x_config.set_gpio(fe, 3, 0, sel, 0);
+ if (err < 0)
+ goto exit;
+
+@@ -519,7 +519,7 @@
+ else
+ value = 0;
+
+- err = stv090x_set_gpio(fe, 4, 0, value, 0);
++ err = skystar2_stv090x_config.set_gpio(fe, 4, 0, value, 0);
+ if (err < 0)
+ goto exit;
+
diff --git a/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-Makefilepatch-2.diff b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-Makefilepatch-2.diff
new file mode 100644
index 00000000000..78ba021fb4f
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-Makefilepatch-2.diff
@@ -0,0 +1,8 @@
+--- v4l-dvb-saa716x-cfa4b4faab67/linux/drivers/media/common/saa716x/Makefile.orig 2013-03-02 07:44:51.112642592 +0100
++++ v4l-dvb-saa716x-cfa4b4faab67/linux/drivers/media/common/saa716x/Makefile 2013-03-02 07:46:56.703138542 +0100
+@@ -24,3 +24,5 @@
+ obj-$(CONFIG_DVB_SAA716X_FF) += saa716x_ff.o
+
+ EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/
++EXTRA_CFLAGS += -Idrivers/media/common/tuners/ # up to kernel 3.6
++EXTRA_CFLAGS += -Idrivers/media/tuners/ # kernel 3.7+
diff --git a/media-tv/v4l-dvb-saa716x/metadata.xml b/media-tv/v4l-dvb-saa716x/metadata.xml
new file mode 100644
index 00000000000..8bbb40ee412
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>martin.dummer@gmx.net</email>
+ <name>Martin Dummer</name>
+ <description>Proxied maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ <name>Joerg Bornkessel</name>
+ <description>Proxying maintainer</description>
+ </maintainer>
+ <use>
+ <flag name="firmware">Install firmware</flag>
+ </use>
+ <upstream>
+ <remote-id type="bitbucket">powARman/v4l-dvb-saa716x</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20140322.ebuild b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20140322.ebuild
new file mode 100644
index 00000000000..afe9fe3c771
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20140322.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info linux-mod
+
+DESCRIPTION="driver for saa716x based dvb cards like Technotrend S2-6400 or Technisat Skystar 2 eXpress HD"
+HOMEPAGE="http://powarman.dyndns.org/hgwebdir.cgi/v4l-dvb-saa716x/"
+
+HG_REVISION="196681f1e154"
+HG_REVISION_DATE="20140322"
+
+SRC_URI="http://powarman.dyndns.org/hgwebdir.cgi/v4l-dvb-saa716x/archive/${HG_REVISION}.tar.gz
+-> v4l-dvb-saa716x-0.0.1_p${HG_REVISION_DATE}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+firmware"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ firmware? ( sys-firmware/tt-s2-6400-firmware )"
+
+S="${WORKDIR}/v4l-dvb-saa716x-${HG_REVISION}"
+
+BUILD_TARGETS="modules"
+MODULE_NAMES="saa716x_ff(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_core(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_budget(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_hybrid(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)"
+
+CONFIG_CHECK="DVB_CORE DVB_STV6110x DVB_STV090x"
+
+src_prepare() {
+ epatch "${FILESDIR}/OSD_RAW_CMD_patch_2.diff"
+ epatch "${FILESDIR}/v4l-dvb-saa716x-Makefilepatch-2.diff"
+}
+
+src_compile() {
+ BUILD_PARAMS="SUBDIRS=${S}/linux/drivers/media/common/saa716x \
+ CONFIG_SAA716X_CORE=m CONFIG_DVB_SAA716X_FF=m CONFIG_DVB_SAA716X_BUDGET=m \
+ CONFIG_DVB_SAA716X_HYBRID=m"
+ addpredict "${ROOT}"/usr/src/linux/
+ linux-mod_src_compile
+}
diff --git a/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109-r1.ebuild b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109-r1.ebuild
new file mode 100644
index 00000000000..3b6a0653383
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info linux-mod
+
+DESCRIPTION="driver for saa716x based dvb cards like Technotrend S2-6400 or Technisat Skystar 2 eXpress HD"
+HOMEPAGE="https://bitbucket.org/powARman/v4l-dvb-saa716x/overview"
+
+HG_REVISION="d7e98fc59230"
+HG_REVISION_DATE="20141109"
+
+SRC_URI="https://bitbucket.org/powARman/v4l-dvb-saa716x/get/${HG_REVISION}.tar.gz
+-> v4l-dvb-saa716x-0.0.1_p${HG_REVISION_DATE}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+firmware"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ firmware? ( sys-firmware/tt-s2-6400-firmware )"
+
+S="${WORKDIR}/powARman-v4l-dvb-saa716x-${HG_REVISION}"
+
+BUILD_TARGETS="modules"
+MODULE_NAMES="saa716x_ff(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_core(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_budget(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_hybrid(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)"
+
+CONFIG_CHECK="DVB_CORE DVB_STV6110x DVB_STV090x"
+
+src_prepare() {
+ epatch "${FILESDIR}/OSD_RAW_CMD_patch_2.diff"
+ epatch "${FILESDIR}/v4l-dvb-saa716x-Makefilepatch-2.diff"
+ kernel_is ge 3 19 0 && epatch "${FILESDIR}/v4l-dvb-saa716x-3.19-set_gpio.patch"
+}
+
+src_compile() {
+ BUILD_PARAMS="SUBDIRS=${S}/linux/drivers/media/common/saa716x \
+ CONFIG_SAA716X_CORE=m CONFIG_DVB_SAA716X_FF=m CONFIG_DVB_SAA716X_BUDGET=m \
+ CONFIG_DVB_SAA716X_HYBRID=m"
+ addpredict "${ROOT}"/usr/src/linux/
+ linux-mod_src_compile
+}
diff --git a/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109.ebuild b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109.ebuild
new file mode 100644
index 00000000000..efe5e18c9c1
--- /dev/null
+++ b/media-tv/v4l-dvb-saa716x/v4l-dvb-saa716x-0.0.1_p20141109.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info linux-mod
+
+DESCRIPTION="driver for saa716x based dvb cards like Technotrend S2-6400 or Technisat Skystar 2 eXpress HD"
+HOMEPAGE="https://bitbucket.org/powARman/v4l-dvb-saa716x/overview"
+
+HG_REVISION="d7e98fc59230"
+HG_REVISION_DATE="20141109"
+
+SRC_URI="https://bitbucket.org/powARman/v4l-dvb-saa716x/get/${HG_REVISION}.tar.gz
+-> v4l-dvb-saa716x-0.0.1_p${HG_REVISION_DATE}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+firmware"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ firmware? ( sys-firmware/tt-s2-6400-firmware )"
+
+S="${WORKDIR}/powARman-v4l-dvb-saa716x-${HG_REVISION}"
+
+BUILD_TARGETS="modules"
+MODULE_NAMES="saa716x_ff(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_core(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_budget(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)
+ saa716x_hybrid(misc:${ROOT}/usr/src/linux:${S}/linux/drivers/media/common/saa716x)"
+
+CONFIG_CHECK="DVB_CORE DVB_STV6110x DVB_STV090x"
+
+src_prepare() {
+ epatch "${FILESDIR}/OSD_RAW_CMD_patch_2.diff"
+ epatch "${FILESDIR}/v4l-dvb-saa716x-Makefilepatch-2.diff"
+}
+
+src_compile() {
+ BUILD_PARAMS="SUBDIRS=${S}/linux/drivers/media/common/saa716x \
+ CONFIG_SAA716X_CORE=m CONFIG_DVB_SAA716X_FF=m CONFIG_DVB_SAA716X_BUDGET=m \
+ CONFIG_DVB_SAA716X_HYBRID=m"
+ addpredict "${ROOT}"/usr/src/linux/
+ linux-mod_src_compile
+}
diff --git a/media-tv/v4l-utils/Manifest b/media-tv/v4l-utils/Manifest
new file mode 100644
index 00000000000..47ea0902c72
--- /dev/null
+++ b/media-tv/v4l-utils/Manifest
@@ -0,0 +1,3 @@
+DIST v4l-utils-1.0.0.tar.bz2 963427 SHA256 1de3882099e04e89e354675ee408b82c8ac8afd3ca6ab27ea321771901285f30 SHA512 19e31167015623f50f93dc27becb8f053ca7488ffc41e275c195cb46af63671a0cec6cecea71d90a43b3b01b47f6e6cc2f44517dddd3c2c376bb1d82f770117e WHIRLPOOL 133d85232457545a828e783ca503d368a5da814ab51d70648ef9a727947a21a07bf82e8ebdcbc48b4fc9a139bdff22c73f0dd1ad666cf8f8a051f7df93e4f2fe
+DIST v4l-utils-1.6.0.tar.bz2 1146003 SHA256 6054d3120c67a1524993e699b3b02036c817bb000b742c332682163966dc7605 SHA512 328d771a58fd8aa5378a7bd96c4e1d9fa805f0fa2331f9446f3311951f0a9df1441d344abe485cf144e92b0fdf4f9505eb812c7b99410941f2fc543f8cb2ee20 WHIRLPOOL 26ee7e63c6624f4da59e0ac5b4f8e78cce918528595caae63111a4909efbf7be955d6be3d5752cb5628353fce5dbc4e49ac8a7d94f5de0cf49e545035608e500
+DIST v4l-utils-1.6.2.tar.bz2 1148309 SHA256 d3d6eb1f0204fb11f3d318bfca35d5f73cc077f88fac7665a47856a16496be7d SHA512 e14442e1b3660d0cb0844f1a5a88f855bc8532df9e72e1b2afd348a7c077ad25657f832d0fd47d3f567bfd399fd82c5a749d075ac9ecb911ea462685e31aa0b2 WHIRLPOOL bd1b825354ca52e62e8c5f83d43bfd2cec63611c65d6b2709a7274fd15ae0fa21345d2b95a073c0b3a33b7c94b304562f1efcf112e1357a58515bd0d6f37f396
diff --git a/media-tv/v4l-utils/metadata.xml b/media-tv/v4l-utils/metadata.xml
new file mode 100644
index 00000000000..39e45a6e406
--- /dev/null
+++ b/media-tv/v4l-utils/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>tetromino@gentoo.org</email>
+ <name>Alexandre Rostovtsev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-tv/v4l-utils/v4l-utils-1.0.0.ebuild b/media-tv/v4l-utils/v4l-utils-1.0.0.ebuild
new file mode 100644
index 00000000000..c38a6383f94
--- /dev/null
+++ b/media-tv/v4l-utils/v4l-utils-1.0.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils udev
+
+DESCRIPTION="Separate utilities ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${P}.tar.bz2"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="qt4"
+
+RDEPEND=">=media-libs/libv4l-${PV}
+ qt4? ( dev-qt/qtgui:4 )
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --disable-static \
+ $(use_enable qt4 qv4l2) \
+ --with-udevdir="$(get_udevdir)"
+}
+
+src_install() {
+ emake -C utils DESTDIR="${D}" install
+ emake -C contrib DESTDIR="${D}" install
+
+ dodoc README
+ newdoc utils/libv4l2util/TODO TODO.libv4l2util
+ newdoc utils/libmedia_dev/README README.libmedia_dev
+ newdoc utils/dvb/README README.dvb
+ newdoc utils/xc3028-firmware/README README.xc3028-firmware
+ newdoc utils/v4l2-compliance/fixme.txt fixme.txt.v4l2-compliance
+}
diff --git a/media-tv/v4l-utils/v4l-utils-1.6.0.ebuild b/media-tv/v4l-utils/v4l-utils-1.6.0.ebuild
new file mode 100644
index 00000000000..1d8aad9994b
--- /dev/null
+++ b/media-tv/v4l-utils/v4l-utils-1.6.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils udev
+
+DESCRIPTION="Separate utilities ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${P}.tar.bz2"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="qt4 udev"
+
+RDEPEND=">=media-libs/libv4l-${PV}
+ qt4? ( dev-qt/qtgui:4 )
+ udev? ( virtual/libudev )
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_configure() {
+ # Hard disable the flags that apply only to the libs.
+ econf \
+ --disable-static \
+ $(use_enable qt4 qv4l2) \
+ $(use_with udev libudev) \
+ --with-udevdir="$(get_udevdir)" \
+ --with-jpeg
+}
+
+src_install() {
+ emake -C utils DESTDIR="${D}" install
+ emake -C contrib DESTDIR="${D}" install
+
+ dodoc README
+ newdoc utils/libv4l2util/TODO TODO.libv4l2util
+ newdoc utils/libmedia_dev/README README.libmedia_dev
+ newdoc utils/dvb/README README.dvb
+ newdoc utils/xc3028-firmware/README README.xc3028-firmware
+ newdoc utils/v4l2-compliance/fixme.txt fixme.txt.v4l2-compliance
+}
diff --git a/media-tv/v4l-utils/v4l-utils-1.6.2.ebuild b/media-tv/v4l-utils/v4l-utils-1.6.2.ebuild
new file mode 100644
index 00000000000..f6683db2a8f
--- /dev/null
+++ b/media-tv/v4l-utils/v4l-utils-1.6.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils udev
+
+DESCRIPTION="Separate utilities ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${P}.tar.bz2"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ppc ~ppc64 sparc x86"
+IUSE="qt4 udev"
+
+RDEPEND=">=media-libs/libv4l-${PV}
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ virtual/opengl
+ media-libs/alsa-lib
+ )
+ udev? ( virtual/libudev )
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_configure() {
+ # Hard disable the flags that apply only to the libs.
+ econf \
+ --disable-static \
+ $(use_enable qt4 qv4l2) \
+ $(use_with udev libudev) \
+ --with-udevdir="$(get_udevdir)" \
+ --without-jpeg
+}
+
+src_install() {
+ emake -C utils DESTDIR="${D}" install
+ emake -C contrib DESTDIR="${D}" install
+
+ dodoc README
+ newdoc utils/libv4l2util/TODO TODO.libv4l2util
+ newdoc utils/libmedia_dev/README README.libmedia_dev
+ newdoc utils/dvb/README README.dvb
+ newdoc utils/xc3028-firmware/README README.xc3028-firmware
+ newdoc utils/v4l2-compliance/fixme.txt fixme.txt.v4l2-compliance
+}
diff --git a/media-tv/w_scan/Manifest b/media-tv/w_scan/Manifest
new file mode 100644
index 00000000000..88403fe1a8b
--- /dev/null
+++ b/media-tv/w_scan/Manifest
@@ -0,0 +1,5 @@
+DIST w_scan-20121111.tar.bz2 216224 SHA256 5e51e5f1c124a8ed70608b4dbf7376adb2b1bf6a48a65b746076263b2589afe5 SHA512 eff6db61c019d0366e3de873d2c28c807bf0a1caa6e1d6e89d4728faea2679c0baffb98a8eccd0841eff7608189d185e96dcb5433e7556a445eb3ca0a666e97c WHIRLPOOL c8daee14c47a704293e648196b375172d2a0e9c64d400953cda6a90f70ce49647708a9566429a840d8933170225a511f1ad66dfeb4daa2ccad8af0c51a92033a
+DIST w_scan-20130331.tar.bz2 215996 SHA256 422414e9f13bfb574aace014c6f4dd2175f7eeb08ba9d5e3187cf02fae1522bf SHA512 6439630b5ec63c211987a084cf68b374f23593798cc25e9cd010cf217d3506edadb464ea163570abb25ee8e5adfadd6068c17c421c3e376c5473a1fdba7e7a78 WHIRLPOOL b0134ad063403e5e2eb3c5663cf2c8fabc4669ca6fcdd4d0aabba0117f0c0e6d130d36e899d587d6192ea09f206c115d2097ee063af5732744b6e8400ae59ca0
+DIST w_scan-20140118.tar.bz2 217975 SHA256 dda9d3999eabef99561b9d8ef25af8ec912c30cfff9ba177a1ca7e70e0c28cd7 SHA512 5d417e1146cb963417d54e57bdddcc9fa7ebf1c82a360b710d459ec522c9f0ac29fc50fcf9cbea2520796d47248472f86ff3c342ff53697c9c98d1c22712d0e6 WHIRLPOOL 0300ff4e6283208912811bb06a80d94860c2e5f2a7be89e815479bd1908b07a62db7035ff9c0ce53032e61cd8b3eb18c98271e949e915a9392ed44e42e82781d
+DIST w_scan-20140727.tar.bz2 239583 SHA256 58509a0b48182140a749034fe98cd6bb533151c5c0baccda31426cc0be61fbbc SHA512 d72c1018f3e86deb1402bf356c9a97688f774dee4ced37aabeb94da7ef76b2c513ff3325d930fcb07f171a30b9ccceb73c4c0c1e847eec2b29927e43099a421e WHIRLPOOL 857c028ac8bd372b5f6afb5f658e42b06975c625db17a2c2d0e6713e6a3712bfb262c15b5895c71d8fd6c15f9fbf54aca1c8037b8128dd18bbdebc663475db32
+DIST w_scan-20141122.tar.bz2 239277 SHA256 b6d7c9ab997c53a0b0d92e8390f313cc3b82ee8ece1756b4e526119fd5ba09b4 SHA512 64d8d92dd84a5c3cfae4531fbba683602e70597f83ec28c314ccce8810fed70685f03d3e4861d586c52764573e17e0b15881bbdb2f6c60db9d3686d554f1ee6d WHIRLPOOL daef8ec1b007d5060c2175b8e9dcac2f9a37e43189e5bd4e9df923a05d07f1e639709bcbb904de23034d3c3edff954cccf4bc7ab51205fdddd8ccd980e68c4f7
diff --git a/media-tv/w_scan/metadata.xml b/media-tv/w_scan/metadata.xml
new file mode 100644
index 00000000000..636266bdd0b
--- /dev/null
+++ b/media-tv/w_scan/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-tv/w_scan/w_scan-20121111.ebuild b/media-tv/w_scan/w_scan-20121111.ebuild
new file mode 100644
index 00000000000..d21691ece5a
--- /dev/null
+++ b/media-tv/w_scan/w_scan-20121111.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Scan for DVB-C/DVB-T/DVB-S channels without prior knowledge of frequencies and modulations"
+HOMEPAGE="http://wirbel.htpc-forum.de/w_scan/index2.html"
+SRC_URI="http://wirbel.htpc-forum.de/w_scan/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples"
+
+DEPEND=">=virtual/linuxtv-dvb-headers-5.3"
+RDEPEND=""
+
+src_prepare() {
+ # support dvb api 5.8
+ if has_version ">=virtual/linuxtv-dvb-headers-5.8"; then
+ sed -e "s:DTV_DVBT2_PLP_ID:DTV_STREAM_ID:" -i scan.c
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc ChangeLog README
+
+ if use doc; then
+ dodoc doc/README.file_formats doc/README_VLC_DVB
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/rotor.conf
+ fi
+}
diff --git a/media-tv/w_scan/w_scan-20130331.ebuild b/media-tv/w_scan/w_scan-20130331.ebuild
new file mode 100644
index 00000000000..a58207c523b
--- /dev/null
+++ b/media-tv/w_scan/w_scan-20130331.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="Scan for DVB-C/DVB-T/DVB-S channels without prior knowledge of frequencies and modulations"
+HOMEPAGE="http://wirbel.htpc-forum.de/w_scan/index2.html"
+SRC_URI="http://wirbel.htpc-forum.de/w_scan/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples"
+
+DEPEND=">=virtual/linuxtv-dvb-headers-5.8"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc ChangeLog README
+
+ if use doc; then
+ dodoc doc/README.file_formats doc/README_VLC_DVB
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/rotor.conf
+ fi
+}
diff --git a/media-tv/w_scan/w_scan-20140118.ebuild b/media-tv/w_scan/w_scan-20140118.ebuild
new file mode 100644
index 00000000000..2e39793baf1
--- /dev/null
+++ b/media-tv/w_scan/w_scan-20140118.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Scan for DVB-C/DVB-T/DVB-S channels without prior knowledge of frequencies and modulations"
+HOMEPAGE="http://wirbel.htpc-forum.de/w_scan/index2.html"
+SRC_URI="http://wirbel.htpc-forum.de/w_scan/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
+
+DEPEND=">=virtual/linuxtv-dvb-headers-5.8"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc ChangeLog README
+
+ if use doc; then
+ dodoc doc/README.file_formats doc/README_VLC_DVB
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/rotor.conf
+ fi
+}
diff --git a/media-tv/w_scan/w_scan-20140727.ebuild b/media-tv/w_scan/w_scan-20140727.ebuild
new file mode 100644
index 00000000000..2e39793baf1
--- /dev/null
+++ b/media-tv/w_scan/w_scan-20140727.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Scan for DVB-C/DVB-T/DVB-S channels without prior knowledge of frequencies and modulations"
+HOMEPAGE="http://wirbel.htpc-forum.de/w_scan/index2.html"
+SRC_URI="http://wirbel.htpc-forum.de/w_scan/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
+
+DEPEND=">=virtual/linuxtv-dvb-headers-5.8"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc ChangeLog README
+
+ if use doc; then
+ dodoc doc/README.file_formats doc/README_VLC_DVB
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/rotor.conf
+ fi
+}
diff --git a/media-tv/w_scan/w_scan-20141122.ebuild b/media-tv/w_scan/w_scan-20141122.ebuild
new file mode 100644
index 00000000000..2e39793baf1
--- /dev/null
+++ b/media-tv/w_scan/w_scan-20141122.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Scan for DVB-C/DVB-T/DVB-S channels without prior knowledge of frequencies and modulations"
+HOMEPAGE="http://wirbel.htpc-forum.de/w_scan/index2.html"
+SRC_URI="http://wirbel.htpc-forum.de/w_scan/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
+
+DEPEND=">=virtual/linuxtv-dvb-headers-5.8"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc ChangeLog README
+
+ if use doc; then
+ dodoc doc/README.file_formats doc/README_VLC_DVB
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/rotor.conf
+ fi
+}
diff --git a/media-tv/wis-go7007/Manifest b/media-tv/wis-go7007/Manifest
new file mode 100644
index 00000000000..261335200c3
--- /dev/null
+++ b/media-tv/wis-go7007/Manifest
@@ -0,0 +1 @@
+DIST wis-go7007-linux-0.9.8.tar.bz2 136517 SHA256 efd7600d881fc57e0484ddd7f0820c18a3bd98dce8060418dfba1626c8a79b1a
diff --git a/media-tv/wis-go7007/files/snd.patch b/media-tv/wis-go7007/files/snd.patch
new file mode 100644
index 00000000000..26c864671c2
--- /dev/null
+++ b/media-tv/wis-go7007/files/snd.patch
@@ -0,0 +1,130 @@
+diff -ur wis-go7007-linux-0.9.8.old/kernel/snd-go7007.c wis-go7007-linux-0.9.8/kernel/snd-go7007.c
+--- wis-go7007-linux-0.9.8.old/kernel/snd-go7007.c 2007-07-16 19:54:38.736387914 +0100
++++ wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-07-16 19:56:18.309084853 +0100
+@@ -58,9 +58,9 @@
+ MODULE_PARM_DESC(index, "Enable for the go7007 audio driver");
+
+ struct go7007_snd {
+- snd_card_t *card;
+- snd_pcm_t *pcm;
+- snd_pcm_substream_t *substream;
++ struct snd_card *card;
++ struct snd_pcm *pcm;
++ struct snd_pcm_substream *substream;
+ spinlock_t lock;
+ int w_idx;
+ int hw_ptr;
+@@ -68,7 +68,7 @@
+ int capturing;
+ };
+
+-static snd_pcm_hardware_t go7007_snd_capture_hw = {
++static struct snd_pcm_hardware go7007_snd_capture_hw = {
+ .info = (SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER |
+@@ -89,7 +89,7 @@
+ static void parse_audio_stream_data(struct go7007 *go, u8 *buf, int length)
+ {
+ struct go7007_snd *gosnd = go->snd_context;
+- snd_pcm_runtime_t *runtime = gosnd->substream->runtime;
++ struct snd_pcm_runtime *runtime = gosnd->substream->runtime;
+ int frames = bytes_to_frames(runtime, length);
+
+ spin_lock(&gosnd->lock);
+@@ -119,8 +119,8 @@
+ snd_pcm_period_elapsed(gosnd->substream);
+ }
+
+-static int go7007_snd_hw_params(snd_pcm_substream_t *substream,
+- snd_pcm_hw_params_t *hw_params)
++static int go7007_snd_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *hw_params)
+ {
+ struct go7007 *go = snd_pcm_substream_chip(substream);
+ unsigned int bytes;
+@@ -137,7 +137,7 @@
+ return 0;
+ }
+
+-static int go7007_snd_hw_free(snd_pcm_substream_t *substream)
++static int go7007_snd_hw_free(struct snd_pcm_substream *substream)
+ {
+ struct go7007 *go = snd_pcm_substream_chip(substream);
+
+@@ -148,7 +148,7 @@
+ return 0;
+ }
+
+-static int go7007_snd_capture_open(snd_pcm_substream_t *substream)
++static int go7007_snd_capture_open(struct snd_pcm_substream *substream)
+ {
+ struct go7007 *go = snd_pcm_substream_chip(substream);
+ struct go7007_snd *gosnd = go->snd_context;
+@@ -166,7 +166,7 @@
+ return r;
+ }
+
+-static int go7007_snd_capture_close(snd_pcm_substream_t *substream)
++static int go7007_snd_capture_close(struct snd_pcm_substream *substream)
+ {
+ struct go7007 *go = snd_pcm_substream_chip(substream);
+ struct go7007_snd *gosnd = go->snd_context;
+@@ -175,12 +175,12 @@
+ return 0;
+ }
+
+-static int go7007_snd_pcm_prepare(snd_pcm_substream_t *substream)
++static int go7007_snd_pcm_prepare(struct snd_pcm_substream *substream)
+ {
+ return 0;
+ }
+
+-static int go7007_snd_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
++static int go7007_snd_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
+ {
+ struct go7007 *go = snd_pcm_substream_chip(substream);
+ struct go7007_snd *gosnd = go->snd_context;
+@@ -200,7 +200,7 @@
+ }
+ }
+
+-static snd_pcm_uframes_t go7007_snd_pcm_pointer(snd_pcm_substream_t *substream)
++static snd_pcm_uframes_t go7007_snd_pcm_pointer(struct snd_pcm_substream *substream)
+ {
+ struct go7007 *go = snd_pcm_substream_chip(substream);
+ struct go7007_snd *gosnd = go->snd_context;
+@@ -208,13 +208,13 @@
+ return gosnd->hw_ptr;
+ }
+
+-static struct page *go7007_snd_pcm_page(snd_pcm_substream_t *substream,
++static struct page *go7007_snd_pcm_page(struct snd_pcm_substream *substream,
+ unsigned long offset)
+ {
+ return vmalloc_to_page(substream->runtime->dma_area + offset);
+ }
+
+-static snd_pcm_ops_t go7007_snd_capture_ops = {
++static struct snd_pcm_ops go7007_snd_capture_ops = {
+ .open = go7007_snd_capture_open,
+ .close = go7007_snd_capture_close,
+ .ioctl = snd_pcm_lib_ioctl,
+@@ -226,7 +226,7 @@
+ .page = go7007_snd_pcm_page,
+ };
+
+-static int go7007_snd_free(snd_device_t *device)
++static int go7007_snd_free(struct snd_device *device)
+ {
+ struct go7007 *go = device->device_data;
+
+@@ -237,7 +237,7 @@
+ return 0;
+ }
+
+-static snd_device_ops_t go7007_snd_device_ops = {
++static struct snd_device_ops go7007_snd_device_ops = {
+ .dev_free = go7007_snd_free,
+ };
+
diff --git a/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff b/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff
new file mode 100644
index 00000000000..6712b9c427d
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff
@@ -0,0 +1,20 @@
+diff -ru wis-go7007-linux-0.9.8-orig/udev/wis-ezusb.rules.in wis-go7007-linux-0.9.8/udev/wis-ezusb.rules.in
+--- wis-go7007-linux-0.9.8-orig/udev/wis-ezusb.rules.in 2007-04-26 10:32:05.967814203 +0200
++++ wis-go7007-linux-0.9.8/udev/wis-ezusb.rules.in 2007-04-26 10:38:00.372601940 +0200
+@@ -1,8 +1,8 @@
+-ACTION=="add", BUS=="usb", ENV{PRODUCT}=="93b/a002/*", \
+- RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_PX-M402U.hex"
+-ACTION=="add", BUS=="usb", ENV{PRODUCT}=="93b/a004/*", \
+- RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_PX-TV402U.hex"
+-ACTION=="add", BUS=="usb", ENV{PRODUCT}=="eb1/6666/*", \
+- RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_LR192.hex"
+-ACTION=="add", BUS=="usb", ENV{PRODUCT}=="eb1/6668/*", \
+- RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_StarTrek.hex"
++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="093b", ATTRS{idProduct}=="a002", \
++ RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_PX-M402U.hex -D %N"
++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="093b", ATTRS{idProduct}=="a004", \
++ RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_PX-TV402U.hex -D %N"
++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0eb1", ATTRS{idProduct}=="6666", \
++ RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_LR192.hex -D %N"
++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0eb1", ATTRS{idProduct}=="6668", \
++ RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_StarTrek.hex -D %N"
diff --git a/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff b/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff
new file mode 100644
index 00000000000..720f4c0650b
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff
@@ -0,0 +1,200 @@
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c wis-go7007-linux-0.9.8/kernel/go7007-driver.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-driver.c 2007-04-26 18:35:06.000000000 +0200
+@@ -18,7 +18,9 @@
+ #include <linux/module.h>
+ #include <linux/version.h>
+ #include <linux/init.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/spinlock.h>
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c wis-go7007-linux-0.9.8/kernel/go7007-fw.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-fw.c 2007-04-26 18:35:06.000000000 +0200
+@@ -26,7 +26,10 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/time.h>
+ #include <linux/mm.h>
+ #include <linux/device.h>
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c wis-go7007-linux-0.9.8/kernel/go7007-i2c.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-i2c.c 2007-04-26 18:35:06.000000000 +0200
+@@ -15,9 +15,11 @@
+ * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ */
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/module.h>
+-#include <linux/version.h>
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c wis-go7007-linux-0.9.8/kernel/go7007-usb.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-usb.c 2007-04-26 18:35:06.000000000 +0200
+@@ -27,7 +27,7 @@
+ #include <linux/usb.h>
+ #include <linux/i2c.h>
+ #include <asm/byteorder.h>
+-#include <media/audiochip.h>
++#include <media/tvaudio.h>
+
+ #include "go7007-priv.h"
+ #include "wis-i2c.h"
+@@ -225,17 +225,17 @@
+ .inputs = {
+ {
+ .video_input = 1,
+- .audio_input = AUDIO_EXTERN,
++ .audio_input = TVAUDIO_INPUT_EXTERN,
+ .name = "Composite",
+ },
+ {
+ .video_input = 8,
+- .audio_input = AUDIO_EXTERN,
++ .audio_input = TVAUDIO_INPUT_EXTERN,
+ .name = "S-Video",
+ },
+ {
+ .video_input = 3,
+- .audio_input = AUDIO_TUNER,
++ .audio_input = TVAUDIO_INPUT_TUNER,
+ .name = "Tuner",
+ },
+ },
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c 2007-04-26 18:35:06.000000000 +0200
+@@ -17,8 +17,10 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
+-#include <linux/config.h>
+ #include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
++#include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/spinlock.h>
+@@ -939,7 +941,7 @@
+ if (go->i2c_adapter_online) {
+ i2c_clients_command(&go->i2c_adapter, DECODER_SET_INPUT,
+ &go->board_info->inputs[*input].video_input);
+- i2c_clients_command(&go->i2c_adapter, AUDC_SET_INPUT,
++ i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO,
+ &go->board_info->inputs[*input].audio_input);
+ }
+ return 0;
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c wis-go7007-linux-0.9.8/kernel/snd-go7007.c
+--- wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-04-26 18:38:24.000000000 +0200
+@@ -20,7 +20,9 @@
+ #include <linux/version.h>
+ #include <linux/moduleparam.h>
+ #include <linux/init.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/vmalloc.h>
+@@ -305,7 +307,11 @@
+ struct go7007_snd *gosnd = go->snd_context;
+
+ snd_card_disconnect(gosnd->card);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ snd_card_free_in_thread(gosnd->card);
++#else
++ snd_card_free_when_closed(gosnd->card);
++#endif
+ return 0;
+ }
+ EXPORT_SYMBOL(go7007_snd_remove);
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c wis-go7007-linux-0.9.8/kernel/wis-saa7113.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-saa7113.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c wis-go7007-linux-0.9.8/kernel/wis-saa7115.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-saa7115.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c wis-go7007-linux-0.9.8/kernel/wis-tw2804.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-tw2804.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c wis-go7007-linux-0.9.8/kernel/wis-tw9903.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-tw9903.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c wis-go7007-linux-0.9.8/kernel/wis-uda1342.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-uda1342.c 2007-04-26 18:35:06.000000000 +0200
+@@ -20,7 +20,7 @@
+ #include <linux/version.h>
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+-#include <media/audiochip.h>
++#include <media/tvaudio.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ #include <media/v4l2-common.h>
+ #endif
+@@ -38,15 +38,15 @@
+ unsigned int cmd, void *arg)
+ {
+ switch (cmd) {
+- case AUDC_SET_INPUT:
++ case VIDIOC_S_AUDIO:
+ {
+ int *inp = arg;
+
+ switch (*inp) {
+- case AUDIO_TUNER:
++ case TVAUDIO_INPUT_TUNER:
+ write_reg(client, 0x00, 0x1441); /* select input 2 */
+ break;
+- case AUDIO_EXTERN:
++ case TVAUDIO_INPUT_EXTERN:
+ write_reg(client, 0x00, 0x1241); /* select input 1 */
+ break;
+ default:
diff --git a/media-tv/wis-go7007/files/wis-go7007-2.6.21-typdefs.diff b/media-tv/wis-go7007/files/wis-go7007-2.6.21-typdefs.diff
new file mode 100644
index 00000000000..e3a9bf0c929
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-2.6.21-typdefs.diff
@@ -0,0 +1,20 @@
+diff -ru work/wis-go7007-linux-0.9.8/kernel/snd-go7007.c fixed/kernel/snd-go7007.c
+--- work/wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-04-30 11:11:35.000000000 -0300
++++ fixed/kernel/snd-go7007.c 2007-04-30 11:09:14.000000000 -0300
+@@ -57,6 +57,16 @@
+ MODULE_PARM_DESC(index, "ID string for the go7007 audio driver");
+ MODULE_PARM_DESC(index, "Enable for the go7007 audio driver");
+
++typedef struct snd_card snd_card_t;
++typedef struct snd_pcm snd_pcm_t;
++typedef struct snd_pcm_substream snd_pcm_substream_t;
++typedef struct snd_pcm_hardware snd_pcm_hardware_t;
++typedef struct snd_pcm_runtime snd_pcm_runtime_t;
++typedef struct snd_pcm_hw_params snd_pcm_hw_params_t;
++typedef struct snd_pcm_ops snd_pcm_ops_t;
++typedef struct snd_device snd_device_t;
++typedef struct snd_device_ops snd_device_ops_t;
++
+ struct go7007_snd {
+ snd_card_t *card;
+ snd_pcm_t *pcm;
diff --git a/media-tv/wis-go7007/files/wis-go7007-2.6.24-no_algo_control.diff b/media-tv/wis-go7007/files/wis-go7007-2.6.24-no_algo_control.diff
new file mode 100644
index 00000000000..9de0552dce9
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-2.6.24-no_algo_control.diff
@@ -0,0 +1,54 @@
+diff -urN wis-go7007-linux-0.9.8.orig/kernel/go7007-i2c.c wis-go7007-linux-0.9.8/kernel/go7007-i2c.c
+--- wis-go7007-linux-0.9.8.orig/kernel/go7007-i2c.c 2008-02-23 13:58:12.000000000 -0500
++++ wis-go7007-linux-0.9.8/kernel/go7007-i2c.c 2008-02-23 13:59:44.000000000 -0500
+@@ -278,11 +278,13 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ static int go7007_algo_control(struct i2c_adapter *adapter,
+ unsigned int cmd, unsigned long arg)
+ {
+ return 0;
+ }
++#endif
+
+ static u32 go7007_functionality(struct i2c_adapter *adapter)
+ {
+@@ -296,7 +298,9 @@
+ #endif
+ .smbus_xfer = go7007_smbus_xfer,
+ .master_xfer = go7007_i2c_master_xfer,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ .algo_control = go7007_algo_control,
++#endif
+ .functionality = go7007_functionality,
+ };
+
+diff -urN wis-go7007-linux-0.9.8.orig/kernel/go7007-usb.c wis-go7007-linux-0.9.8/kernel/go7007-usb.c
+--- wis-go7007-linux-0.9.8.orig/kernel/go7007-usb.c 2008-02-23 13:58:12.000000000 -0500
++++ wis-go7007-linux-0.9.8/kernel/go7007-usb.c 2008-02-23 13:59:48.000000000 -0500
+@@ -918,11 +918,13 @@
+ return ret;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ static int go7007_usb_algo_control(struct i2c_adapter *adapter,
+ unsigned int cmd, unsigned long arg)
+ {
+ return 0;
+ }
++#endif
+
+ static u32 go7007_usb_functionality(struct i2c_adapter *adapter)
+ {
+@@ -937,7 +939,9 @@
+ .id = I2C_ALGO_GO7007,
+ #endif
+ .master_xfer = go7007_usb_i2c_master_xfer,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ .algo_control = go7007_usb_algo_control,
++#endif
+ .functionality = go7007_usb_functionality,
+ };
+
diff --git a/media-tv/wis-go7007/files/wis-go7007-2.6.26-nopage.diff b/media-tv/wis-go7007/files/wis-go7007-2.6.26-nopage.diff
new file mode 100644
index 00000000000..2fd1cca4a63
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-2.6.26-nopage.diff
@@ -0,0 +1,26 @@
+diff -urN wis-go7007-linux-0.9.8.orig/kernel/go7007-v4l2.c wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c
+--- wis-go7007-linux-0.9.8.orig/kernel/go7007-v4l2.c 2007-05-09 13:56:07.000000000 -0400
++++ wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c 2008-08-03 16:01:35.000000000 -0400
+@@ -1375,6 +1375,7 @@
+ }
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ /* This is really only going to ever be called when we
+ * do get_user_pages() in VIDIOC_QBUF */
+ static struct page *go7007_vm_nopage(struct vm_area_struct *vma,
+@@ -1392,11 +1393,14 @@
+ *type = VM_FAULT_MINOR;
+ return page;
+ }
++#endif
+
+ static struct vm_operations_struct go7007_vm_ops = {
+ .open = go7007_vm_open,
+ .close = go7007_vm_close,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ .nopage = go7007_vm_nopage,
++#endif
+ };
+
+ static int go7007_mmap(struct file *file, struct vm_area_struct *vma)
diff --git a/media-tv/wis-go7007/files/wis-go7007-updates.diff b/media-tv/wis-go7007/files/wis-go7007-updates.diff
new file mode 100644
index 00000000000..83dfd015bd5
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-updates.diff
@@ -0,0 +1,242 @@
+diff -ru wis-go7007-linux-0.9.8/kernel/go7007-driver.c wis-go7007-linux-0.9.8-new/kernel/go7007-driver.c
+--- wis-go7007-linux-0.9.8/kernel/go7007-driver.c 2006-04-02 00:35:48.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/go7007-driver.c 2006-08-19 10:55:47.000000000 +0200
+@@ -18,7 +18,9 @@
+ #include <linux/module.h>
+ #include <linux/version.h>
+ #include <linux/init.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/spinlock.h>
+diff -ru wis-go7007-linux-0.9.8/kernel/go7007-fw.c wis-go7007-linux-0.9.8-new/kernel/go7007-fw.c
+--- wis-go7007-linux-0.9.8/kernel/go7007-fw.c 2006-04-02 00:35:55.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/go7007-fw.c 2006-08-19 11:01:51.000000000 +0200
+@@ -26,7 +26,10 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/time.h>
+ #include <linux/mm.h>
+ #include <linux/device.h>
+diff -ru wis-go7007-linux-0.9.8/kernel/go7007-i2c.c wis-go7007-linux-0.9.8-new/kernel/go7007-i2c.c
+--- wis-go7007-linux-0.9.8/kernel/go7007-i2c.c 2006-04-02 00:36:00.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/go7007-i2c.c 2006-08-19 11:01:28.000000000 +0200
+@@ -15,9 +15,11 @@
+ * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ */
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/module.h>
+-#include <linux/version.h>
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+diff -ru wis-go7007-linux-0.9.8/kernel/go7007-usb.c wis-go7007-linux-0.9.8-new/kernel/go7007-usb.c
+--- wis-go7007-linux-0.9.8/kernel/go7007-usb.c 2006-04-02 00:57:04.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/go7007-usb.c 2006-12-17 13:16:11.000000000 +0100
+@@ -27,7 +27,7 @@
+ #include <linux/usb.h>
+ #include <linux/i2c.h>
+ #include <asm/byteorder.h>
+-#include <media/audiochip.h>
++#include <media/tvaudio.h>
+
+ #include "go7007-priv.h"
+ #include "wis-i2c.h"
+@@ -225,17 +225,17 @@
+ .inputs = {
+ {
+ .video_input = 1,
+- .audio_input = AUDIO_EXTERN,
++ .audio_input = TVAUDIO_INPUT_EXTERN,
+ .name = "Composite",
+ },
+ {
+ .video_input = 8,
+- .audio_input = AUDIO_EXTERN,
++ .audio_input = TVAUDIO_INPUT_EXTERN,
+ .name = "S-Video",
+ },
+ {
+ .video_input = 3,
+- .audio_input = AUDIO_TUNER,
++ .audio_input = TVAUDIO_INPUT_TUNER,
+ .name = "Tuner",
+ },
+ },
+@@ -645,8 +645,12 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+ static void go7007_usb_readinterrupt_complete(struct urb *urb,
+- struct pt_regs *pt_regs)
++ struct pt_regs *pt_regs)
++#else
++static void go7007_usb_readinterrupt_complete(struct urb *urb)
++#endif
+ {
+ struct go7007 *go = (struct go7007 *)urb->context;
+ u16 *regs = (u16 *)urb->transfer_buffer;
+@@ -690,8 +694,12 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+ static void go7007_usb_read_video_pipe_complete(struct urb *urb,
+- struct pt_regs *pt_regs)
++ struct pt_regs *pt_regs)
++#else
++static void go7007_usb_read_video_pipe_complete(struct urb *urb)
++#endif
+ {
+ struct go7007 *go = (struct go7007 *)urb->context;
+ int r;
+@@ -715,8 +723,12 @@
+ printk(KERN_ERR "go7007-usb: error in video pipe: %d\n", r);
+ }
+
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+ static void go7007_usb_read_audio_pipe_complete(struct urb *urb,
+- struct pt_regs *pt_regs)
++ struct pt_regs *pt_regs)
++#else
++static void go7007_usb_read_audio_pipe_complete(struct urb *urb)
++#endif
+ {
+ struct go7007 *go = (struct go7007 *)urb->context;
+ int r;
+diff -ru wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c wis-go7007-linux-0.9.8-new/kernel/go7007-v4l2.c
+--- wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c 2006-04-02 01:22:03.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/go7007-v4l2.c 2006-08-19 11:01:14.000000000 +0200
+@@ -17,8 +17,10 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
+-#include <linux/config.h>
+ #include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
++#include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/spinlock.h>
+@@ -939,7 +941,7 @@
+ if (go->i2c_adapter_online) {
+ i2c_clients_command(&go->i2c_adapter, DECODER_SET_INPUT,
+ &go->board_info->inputs[*input].video_input);
+- i2c_clients_command(&go->i2c_adapter, AUDC_SET_INPUT,
++ i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO,
+ &go->board_info->inputs[*input].audio_input);
+ }
+ return 0;
+diff -ru wis-go7007-linux-0.9.8/kernel/snd-go7007.c wis-go7007-linux-0.9.8-new/kernel/snd-go7007.c
+--- wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2006-04-02 00:36:38.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/snd-go7007.c 2006-12-17 12:20:54.000000000 +0100
+@@ -20,7 +20,9 @@
+ #include <linux/version.h>
+ #include <linux/moduleparam.h>
+ #include <linux/init.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/vmalloc.h>
+@@ -305,7 +307,11 @@
+ struct go7007_snd *gosnd = go->snd_context;
+
+ snd_card_disconnect(gosnd->card);
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+ snd_card_free_in_thread(gosnd->card);
++#else
++ snd_card_free_when_closed(gosnd->card);
++#endif
+ return 0;
+ }
+ EXPORT_SYMBOL(go7007_snd_remove);
+diff -ru wis-go7007-linux-0.9.8/kernel/wis-saa7113.c wis-go7007-linux-0.9.8-new/kernel/wis-saa7113.c
+--- wis-go7007-linux-0.9.8/kernel/wis-saa7113.c 2006-04-02 00:37:06.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/wis-saa7113.c 2006-08-19 11:03:04.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8/kernel/wis-saa7115.c wis-go7007-linux-0.9.8-new/kernel/wis-saa7115.c
+--- wis-go7007-linux-0.9.8/kernel/wis-saa7115.c 2006-04-02 00:37:12.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/wis-saa7115.c 2006-08-19 11:02:28.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8/kernel/wis-tw2804.c wis-go7007-linux-0.9.8-new/kernel/wis-tw2804.c
+--- wis-go7007-linux-0.9.8/kernel/wis-tw2804.c 2006-04-02 00:37:22.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/wis-tw2804.c 2006-08-19 11:02:43.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8/kernel/wis-tw9903.c wis-go7007-linux-0.9.8-new/kernel/wis-tw9903.c
+--- wis-go7007-linux-0.9.8/kernel/wis-tw9903.c 2006-04-02 00:37:28.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/wis-tw9903.c 2006-08-19 11:02:47.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8/kernel/wis-uda1342.c wis-go7007-linux-0.9.8-new/kernel/wis-uda1342.c
+--- wis-go7007-linux-0.9.8/kernel/wis-uda1342.c 2006-04-02 00:37:32.000000000 +0200
++++ wis-go7007-linux-0.9.8-new/kernel/wis-uda1342.c 2006-04-03 13:07:04.000000000 +0200
+@@ -20,7 +20,7 @@
+ #include <linux/version.h>
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+-#include <media/audiochip.h>
++#include <media/tvaudio.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ #include <media/v4l2-common.h>
+ #endif
+@@ -38,15 +38,15 @@
+ unsigned int cmd, void *arg)
+ {
+ switch (cmd) {
+- case AUDC_SET_INPUT:
++ case VIDIOC_S_AUDIO:
+ {
+ int *inp = arg;
+
+ switch (*inp) {
+- case AUDIO_TUNER:
++ case TVAUDIO_INPUT_TUNER:
+ write_reg(client, 0x00, 0x1441); /* select input 2 */
+ break;
+- case AUDIO_EXTERN:
++ case TVAUDIO_INPUT_EXTERN:
+ write_reg(client, 0x00, 0x1241); /* select input 1 */
+ break;
+ default:
diff --git a/media-tv/wis-go7007/metadata.xml b/media-tv/wis-go7007/metadata.xml
new file mode 100644
index 00000000000..a6b9e38a1b9
--- /dev/null
+++ b/media-tv/wis-go7007/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+</pkgmetadata>
diff --git a/media-tv/wis-go7007/wis-go7007-0.9.8-r3.ebuild b/media-tv/wis-go7007/wis-go7007-0.9.8-r3.ebuild
new file mode 100644
index 00000000000..05523665b3c
--- /dev/null
+++ b/media-tv/wis-go7007/wis-go7007-0.9.8-r3.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod udev
+
+MY_PN=${PN}-linux
+DESCRIPTION="Linux drivers for go7007 chipsets (Plextor ConvertX PVR)"
+HOMEPAGE="http://oss.wischip.com/ http://home.comcast.net/~bender647/go7007/"
+SRC_URI="http://oss.wischip.com/${MY_PN}-${PV}.tar.bz2"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa"
+DEPEND="virtual/udev
+ sys-apps/fxload"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+pkg_setup() {
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KERNELSRC=${KERNEL_DIR}"
+ CONFIG_CHECK="HOTPLUG MODULES KMOD FW_LOADER I2C VIDEO_DEV SOUND SND USB
+ USB_DEVICEFS USB_EHCI_HCD"
+
+ if use alsa; then
+ CONFIG_CHECK="${CONFIG_CHECK} SND_MIXER_OSS SND_PCM_OSS"
+ fi
+
+ if ! kernel_is ge 2 6 26; then
+ eerror "This ebuild version will only work with a 2.6.26 kernel"
+ die "Needs a different kernel"
+ fi
+
+ linux-mod_pkg_setup
+ MODULE_NAMES="go7007(extra:${S}:${S}/kernel)
+ go7007-usb(extra:${S}:${S}/kernel)
+ snd-go7007(extra:${S}:${S}/kernel)
+ wis-ov7640(extra:${S}:${S}/kernel)
+ wis-sony-tuner(extra:${S}:${S}/kernel)
+ wis-tw9903(extra:${S}:${S}/kernel)
+ wis-uda1342(extra:${S}:${S}/kernel)
+ wis-saa7113(extra:${S}:${S}/kernel)
+ wis-saa7115(extra:${S}:${S}/kernel)"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ if kernel_is ge 2 6 26; then
+ epatch "${FILESDIR}/wis-go7007-updates.diff"
+ epatch "${FILESDIR}/wis-go7007-2.6.21-typdefs.diff"
+ epatch "${FILESDIR}/wis-go7007-2.6.24-no_algo_control.diff"
+ epatch "${FILESDIR}/wis-go7007-2.6.26-nopage.diff"
+ fi
+}
+
+src_compile() {
+ linux-mod_src_compile || die "failed to build driver "
+}
+
+src_install() {
+ cd "${S}/apps"
+ make KERNELDIR="${KERNEL_DIR}" DESTDIR="${D}" PREFIX=/usr install || die "failed to install"
+ cd "${S}"
+ dodir "/lib/modules"
+ insinto "/lib/modules"
+ dodoc README README.saa7134 RELEASE-NOTES
+ cd "${S}/kernel"
+ linux-mod_src_install || die "failed to install modules"
+
+ insinto "${KERNEL_DIR}/include/linux"
+ doins "${S}/include/*.h"
+ insinto "/lib/firmware"
+ doins "${S}/firmware/*.bin"
+ insinto "/lib/firmware/ezusb"
+ doins "${S}/firmware/ezusb/*.hex"
+ udev_dorules "${S}/udev/wis-ezusb.rules"
+
+ exeinto "/usr/bin"
+ use alsa && doexe "${S}/apps/gorecord"
+ doexe "${S}/apps/modet"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ elog ""
+ elog "For more information on how to use the Plextor devices with Gentoo"
+ elog "you can follow this thread for tips and tricks:"
+ elog "http://forums.gentoo.org/viewtopic-t-306559-highlight-.html"
+ elog ""
+ elog "Also, the unofficial Gentoo wiki has a HOWTO page:"
+ elog "http://gentoo-wiki.com/HARDWARE_go7007"
+ elog ""
+ ewarn "Don't forget to add your modules to /etc/modules.autoload.d/kernel.2.6"
+ ewarn "so they will load on startup:"
+ ewarn ""
+ ewarn "snd_go7007"
+ ewarn "go7007"
+ ewarn "go7007_usb"
+ ewarn "wis_saa7115"
+ ewarn "wis_uda1342"
+ ewarn "wis_sony_tuner"
+}
diff --git a/media-tv/xawtv/Manifest b/media-tv/xawtv/Manifest
new file mode 100644
index 00000000000..c8b6365a966
--- /dev/null
+++ b/media-tv/xawtv/Manifest
@@ -0,0 +1,3 @@
+DIST tv-fonts-1.1.tar.bz2 80177 SHA256 0194dd03ac9b384951e7f5ed7d08c6fc5f6d94efcd08516732720a1a4704d9f6 SHA512 669e3c13ede19f62d69d099a57ca39fd3326608b5b794221d29b3abcc29b1098fd30e0dcde1d1420c9aec55f6ae16d0a262b606ab598f5b3ee522f8b5540c3e9 WHIRLPOOL 3503a868d558151657ddfbd2fba5768ef6377a08a9c16eb5e0bb4d6c0862c4af66fc36271a13093a5b5558980d46f3e83baaa034c763febd6b17199deaac5532
+DIST xawtv-3.95.tar.gz 555731 SHA256 1204212c59d10df4e29a9a0ddce96cab78342859ec44bf6fd1c5f260b5c7216f SHA512 9c793ee7fa233aafb12decbd9289f09cbad5aa828db1f4dd89a9999e71bebe5faacc4c361cd41cf928931f32310bdb0c24e52c2c7c8d5595c286c163727faa01 WHIRLPOOL a55089b733d34fa144e9e56f6ff856c3401206294d42d348a05b1128421884269cfb890d16718ac3f3cd70159d7d683b4b9375f92fa936ebeeb22b84d9fd1257
+DIST xawtv-patches-4.tar.bz2 3258 SHA256 0d1a6c386c9e3ea58e92ab26268f620a3e36d888dd8cbaa46441e38215a69e9e SHA512 4f7bf2ac7be1d487daaccaaf853e3ed6a388784d15e87413cbefa4fb2e04c324f5cdce498636d4bf83d70a698b343df877e1f3df9acd615932f361b4292f6dd5 WHIRLPOOL 8b8b72e7815c04470f430e2ba3c1e252782813af56cb9875b647b70e5379f2ce13d1fb5667a6274e472e6dbe1402069b20c36933e24312ab96fef4eb1847f09a
diff --git a/media-tv/xawtv/files/webcamrc b/media-tv/xawtv/files/webcamrc
new file mode 100644
index 00000000000..6773a673cb4
--- /dev/null
+++ b/media-tv/xawtv/files/webcamrc
@@ -0,0 +1,30 @@
+ [ftp]
+ host = www
+ user = webcam
+ pass = xxxxxx
+ dir = public_html/images
+ file = webcam.jpeg
+ tmp = uploading.jpeg
+ passive = 1
+ debug = 0
+ auto = 0
+ local = 0
+ ssh = 0
+
+ [grab]
+ device = /dev/video0
+ text = "webcam %Y-%m-%d %H:%M:%S"
+ infofile = filename
+ width = 320
+ height = 240
+ delay = 3
+ input = composite1
+ norm = pal
+ rotate = 0
+ top = 0
+ left = 0
+ bottom = -1
+ right = -1
+ quality = 75
+ trigger = 0
+ once = 0
diff --git a/media-tv/xawtv/files/xawtv-3.95-jpeg-7.patch b/media-tv/xawtv/files/xawtv-3.95-jpeg-7.patch
new file mode 100644
index 00000000000..20219853d52
--- /dev/null
+++ b/media-tv/xawtv/files/xawtv-3.95-jpeg-7.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/288158
+http://bugs.gentoo.org/479848
+
+--- libng/plugins/conv-mjpeg.c
++++ libng/plugins/conv-mjpeg.c
+@@ -229,6 +229,9 @@
+ jpeg_set_quality(&h->mjpg_cinfo, ng_jpeg_quality, TRUE);
+
+ h->mjpg_cinfo.raw_data_in = TRUE;
++ #if JPEG_LIB_VERSION >= 70
++ h->mjpg_cinfo.do_fancy_downsampling = FALSE;
++ #endif
+ jpeg_set_colorspace(&h->mjpg_cinfo,JCS_YCbCr);
+
+ h->mjpg_ptrs[0] = malloc(h->fmt.height*sizeof(char*));
+@@ -453,6 +456,9 @@
+ h->buf = in;
+ jpeg_read_header(&h->mjpg_cinfo,1);
+ h->mjpg_cinfo.raw_data_out = 1;
++ #if JPEG_LIB_VERSION >= 70
++ h->mjpg_cinfo.do_fancy_upsampling = FALSE;
++ #endif
+
+ if (ng_debug > 1)
+ fprintf(stderr,"yuv: %dx%d - %d %d / %d %d / %d %d\n",
diff --git a/media-tv/xawtv/files/xawtv-3.95-libquicktime-compat.patch b/media-tv/xawtv/files/xawtv-3.95-libquicktime-compat.patch
new file mode 100644
index 00000000000..a86c48d83b4
--- /dev/null
+++ b/media-tv/xawtv/files/xawtv-3.95-libquicktime-compat.patch
@@ -0,0 +1,27 @@
+--- xawtv-3.95/libng/plugins/write-qt.c.old 2006-10-16 20:50:45.000000000 +0200
++++ xawtv-3.95/libng/plugins/write-qt.c 2006-10-17 19:36:09.000000000 +0200
+@@ -348,10 +348,10 @@
+ info[i]->name,info[i]->long_name);
+ for (j = 0; j < info[i]->num_fourccs; j++)
+ fprintf(stderr," fcc : %s\n",info[i]->fourccs[j]);
+- for (j = 0; j < info[i]->num_encoding_colormodels; j++)
++ for (j = 0; j < lqt_num_colormodels(); j++)
+ fprintf(stderr," cmodel: %d [%s]\n",
+- info[i]->encoding_colormodels[j],
+- lqt_get_colormodel_string(info[i]->encoding_colormodels[j]));
++ lqt_get_colormodel(j),
++ lqt_get_colormodel_string(j));
+ }
+
+ /* sanity checks */
+@@ -378,8 +378,8 @@
+ /* pick colormodel */
+ fmtid = VIDEO_NONE;
+ cmodel = 0;
+- for (j = 0; j < info[i]->num_encoding_colormodels; j++) {
+- cmodel = info[i]->encoding_colormodels[j];
++ for (j = 0; j < lqt_num_colormodels(); j++) {
++ cmodel = lqt_get_colormodel(j);
+ if (cmodel>= sizeof(cmodels)/sizeof(int))
+ continue;
+ if (!cmodels[cmodel])
diff --git a/media-tv/xawtv/files/xawtv-3.95-pagemask-fix.patch b/media-tv/xawtv/files/xawtv-3.95-pagemask-fix.patch
new file mode 100644
index 00000000000..7a1ff5e71f0
--- /dev/null
+++ b/media-tv/xawtv/files/xawtv-3.95-pagemask-fix.patch
@@ -0,0 +1,42 @@
+Patch from Andreas Jochens
+http://lists.debian.org/debian-qa-packages/2006/08/msg00519.html
+
+--- a/console/fbtools.c 2003-02-14 14:14:04.000000000 +0000
++++ b/console/fbtools.c 2006-08-23 10:57:40.000000000 +0000
+@@ -21,8 +21,6 @@
+ #include <linux/vt.h>
+ #include <linux/fb.h>
+
+-#include <asm/page.h>
+-
+ #include "fbtools.h"
+
+ /* -------------------------------------------------------------------- */
+@@ -424,7 +422,7 @@
+ goto err;
+ }
+ #endif
+- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK);
++ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & ~(sysconf(_SC_PAGE_SIZE)-1);
+ fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset,
+ PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
+ if (-1L == (long)fb_mem) {
+--- a/console/matrox.c 2005-02-03 10:40:41.000000000 +0000
++++ b/console/matrox.c 2006-08-23 11:09:51.000000000 +0000
+@@ -9,7 +9,6 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+
+-#include <asm/page.h> /* PAGE_SIZE */
+ #include <linux/fb.h>
+
+ #include "byteswap.h"
+@@ -226,7 +225,7 @@
+ return -1;
+ }
+ off = (unsigned long)fb_fix.mmio_start -
+- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1));
++ ((unsigned long)fb_fix.mmio_start & ~(sysconf(_SC_PAGE_SIZE)-1));
+ bmmio += off;
+ mmio = (uint32_t*)bmmio;
+ return 0;
diff --git a/media-tv/xawtv/metadata.xml b/media-tv/xawtv/metadata.xml
new file mode 100644
index 00000000000..277f360d0e9
--- /dev/null
+++ b/media-tv/xawtv/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <use>
+ <flag name="xext">Enable use of XFree extensions (DGA,VidMode,DPMS)</flag>
+ <flag name="zvbi">Enable VBI Decoding Library for Zapping</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-tv/xawtv/xawtv-3.95-r2.ebuild b/media-tv/xawtv/xawtv-3.95-r2.ebuild
new file mode 100644
index 00000000000..d2254ec17cb
--- /dev/null
+++ b/media-tv/xawtv/xawtv-3.95-r2.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=1
+
+inherit eutils font autotools flag-o-matic
+
+PATCHLEVEL="4"
+
+IUSE="aalib alsa dv lirc cpu_flags_x86_mmx motif nls opengl quicktime X xv zvbi xext"
+
+MY_FONT=tv-fonts-1.1
+DESCRIPTION="Small suite of video4linux related software"
+HOMEPAGE="http://bytesex.org/xawtv/"
+SRC_URI="http://dl.bytesex.org/releases/xawtv/${P}.tar.gz
+ X? ( http://dl.bytesex.org/releases/tv-fonts/${MY_FONT}.tar.bz2 )
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ia64 ~ppc ~sparc x86"
+
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/jpeg
+ X? (
+ x11-libs/libFS
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXrender
+ xext? (
+ x11-libs/libXinerama
+ x11-libs/libXxf86dga
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ )
+ x11-apps/xset
+ xv? ( x11-libs/libXv )
+ )
+ motif? ( >=x11-libs/motif-2.3:0
+ app-text/recode )
+ alsa? ( media-libs/alsa-lib )
+ aalib? ( media-libs/aalib )
+ dv? ( media-libs/libdv )
+ lirc? ( app-misc/lirc )
+ opengl? ( virtual/opengl )
+ quicktime? ( media-libs/libquicktime )
+ zvbi? ( media-libs/zvbi
+ media-libs/libpng )"
+
+DEPEND="${RDEPEND}
+ X? (
+ x11-apps/xset
+ x11-apps/bdftopcf
+ x11-proto/videoproto
+ xext? ( x11-proto/xineramaproto )
+ )"
+
+pkg_setup() {
+ if use X; then
+ font_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ if use X; then
+ cd "${WORKDIR}/${MY_FONT}"
+ epatch "${WORKDIR}/patches/extra/${MY_FONT}-nox.patch"
+ fi
+ cd "${S}"
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${P}-libquicktime-compat.patch"
+ epatch "${FILESDIR}/${P}-pagemask-fix.patch"
+ epatch "${FILESDIR}/${P}-jpeg-7.patch"
+ eautoreconf
+}
+
+src_compile() {
+ # It tries to include FSlib.h directly, but this seems to have moved.
+ use X && has_version x11-libs/libFS && append-flags -I/usr/include/X11/fonts
+
+ econf \
+ $(use_with X x) \
+ $(use_enable xext xfree-ext) \
+ $(use_enable xv xvideo) \
+ $(use_enable dv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable motif) \
+ $(use_enable quicktime) \
+ $(use_enable alsa) \
+ $(use_enable lirc) \
+ $(use_enable opengl gl) \
+ $(use_enable zvbi) \
+ $(use_enable aalib aa)
+
+ emake verbose=yes || die
+
+ if use X; then
+ cd "${WORKDIR}/${MY_FONT}"
+ emake -j1 DISPLAY= || die
+ fi
+}
+
+src_install() {
+ make install DESTDIR="${D}" resdir="${D}"/usr/share/X11 || die
+
+ # v4lctl is only installed automatically if the X USE flag is enabled
+ use X || \
+ dobin x11/v4lctl
+
+ dodoc Changes README* TODO "${FILESDIR}"/webcamrc
+ docinto cgi-bin
+ dodoc scripts/webcam.cgi
+
+ use X || \
+ rm -f "${D}"/usr/share/man/man1/{pia,propwatch}.1 \
+ "${D}"/usr/share/{man,man/fr,man/es}/man1/xawtv.1 \
+ "${D}"/usr/share/{man,man/es}/man1/rootv.1
+
+ use motif || \
+ rm -f "${D}"/usr/share/man/man1/{motv,mtt}.1
+
+ use zvbi || \
+ rm -f "${D}"/usr/share/man/man1/{alevtd,mtt}.1 \
+ "${D}"/usr/share/{man,man/es}/man1/scantv.1
+
+ use nls || \
+ rm -f "${D}"/usr/share/man/fr \
+ "${D}"/usr/share/man/es
+
+ # The makefile seems to be fubar'd for some data
+ dodir /usr/share/${PN}
+ mv "${D}"/usr/share/*.list "${D}"/usr/share/${PN}
+ mv "${D}"/usr/share/Index* "${D}"/usr/share/${PN}
+
+ if use X; then
+ cd "${WORKDIR}/${MY_FONT}"
+ insinto /usr/share/fonts/xawtv
+ doins *.gz fonts.alias
+
+ font_xfont_config
+ fi
+}
+
+pkg_postinst() {
+ if use X; then
+ ebegin "installing teletype fonts into /usr/share/fonts/xawtv"
+ cd /usr/share/fonts/xawtv
+ mkfontdir
+ eend
+ fi
+}
diff --git a/media-tv/xawtv/xawtv-3.95-r3.ebuild b/media-tv/xawtv/xawtv-3.95-r3.ebuild
new file mode 100644
index 00000000000..451a9d10fe2
--- /dev/null
+++ b/media-tv/xawtv/xawtv-3.95-r3.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils font autotools flag-o-matic
+
+PATCHLEVEL="4"
+
+IUSE="aalib alsa dv lirc cpu_flags_x86_mmx motif nls opengl quicktime X xv zvbi xext"
+
+MY_FONT=tv-fonts-1.1
+DESCRIPTION="Small suite of video4linux related software"
+HOMEPAGE="http://bytesex.org/xawtv/"
+SRC_URI="http://dl.bytesex.org/releases/xawtv/${P}.tar.gz
+ X? ( http://dl.bytesex.org/releases/tv-fonts/${MY_FONT}.tar.bz2 )
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/jpeg:0
+ X? (
+ x11-libs/libFS
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXrender
+ xext? (
+ x11-libs/libXinerama
+ x11-libs/libXxf86dga
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ )
+ x11-apps/xset
+ xv? ( x11-libs/libXv )
+ )
+ motif? ( >=x11-libs/motif-2.3:0
+ app-text/recode )
+ alsa? ( media-libs/alsa-lib )
+ aalib? ( media-libs/aalib )
+ dv? ( media-libs/libdv )
+ lirc? ( app-misc/lirc )
+ opengl? ( virtual/opengl )
+ quicktime? ( media-libs/libquicktime )
+ zvbi? ( media-libs/zvbi
+ media-libs/libpng:0 )"
+
+DEPEND="${RDEPEND}
+ X? (
+ x11-apps/xset
+ x11-apps/bdftopcf
+ x11-proto/videoproto
+ xext? ( x11-proto/xineramaproto )
+ )"
+
+pkg_setup() {
+ if use X; then
+ font_pkg_setup
+ fi
+}
+
+src_prepare() {
+ if use X; then
+ cd "${WORKDIR}/${MY_FONT}"
+ epatch "${WORKDIR}/patches/extra/${MY_FONT}-nox.patch"
+ fi
+ cd "${S}"
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${P}-libquicktime-compat.patch"
+ epatch "${FILESDIR}/${P}-pagemask-fix.patch"
+ epatch "${FILESDIR}/${P}-jpeg-7.patch"
+ eautoreconf
+}
+
+src_configure() {
+ # It tries to include FSlib.h directly, but this seems to have moved.
+ use X && has_version x11-libs/libFS && append-flags -I/usr/include/X11/fonts
+
+ econf \
+ $(use_with X x) \
+ $(use_enable xext xfree-ext) \
+ $(use_enable xv xvideo) \
+ $(use_enable dv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable motif) \
+ $(use_enable quicktime) \
+ $(use_enable alsa) \
+ $(use_enable lirc) \
+ $(use_enable opengl gl) \
+ $(use_enable zvbi) \
+ $(use_enable aalib aa)
+}
+
+src_compile() {
+ emake verbose=yes
+
+ if use X; then
+ cd "${WORKDIR}/${MY_FONT}"
+ emake -j1 DISPLAY=
+ fi
+}
+
+src_install() {
+ make install DESTDIR="${D}" resdir="${D}"/usr/share/X11 || die
+
+ # v4lctl is only installed automatically if the X USE flag is enabled
+ use X || \
+ dobin x11/v4lctl
+
+ dodoc Changes README* TODO "${FILESDIR}"/webcamrc
+ docinto cgi-bin
+ dodoc scripts/webcam.cgi
+
+ use X || \
+ rm -f "${D}"/usr/share/man/man1/{pia,propwatch}.1 \
+ "${D}"/usr/share/{man,man/fr,man/es}/man1/xawtv.1 \
+ "${D}"/usr/share/{man,man/es}/man1/rootv.1
+
+ use motif || \
+ rm -f "${D}"/usr/share/man/man1/{motv,mtt}.1
+
+ use zvbi || \
+ rm -f "${D}"/usr/share/man/man1/{alevtd,mtt}.1 \
+ "${D}"/usr/share/{man,man/es}/man1/scantv.1
+
+ use nls || \
+ rm -f "${D}"/usr/share/man/fr \
+ "${D}"/usr/share/man/es
+
+ # The makefile seems to be fubar'd for some data
+ dodir /usr/share/${PN}
+ mv "${D}"/usr/share/*.list "${D}"/usr/share/${PN}
+ mv "${D}"/usr/share/Index* "${D}"/usr/share/${PN}
+
+ if use X; then
+ cd "${WORKDIR}/${MY_FONT}"
+ insinto /usr/share/fonts/xawtv
+ doins *.gz fonts.alias
+
+ font_xfont_config
+ fi
+}
+
+pkg_postinst() {
+ if use X; then
+ ebegin "installing teletype fonts into /usr/share/fonts/xawtv"
+ cd /usr/share/fonts/xawtv
+ mkfontdir
+ eend
+ fi
+}
diff --git a/media-tv/xbmc/Manifest b/media-tv/xbmc/Manifest
new file mode 100644
index 00000000000..21fe5e7dd15
--- /dev/null
+++ b/media-tv/xbmc/Manifest
@@ -0,0 +1,13 @@
+DIST xbmc-11.0.tar.gz 63012044 SHA256 1fe5d310c16138f26e2b13bc545604e95f48ace6c8636f23e77da402cd7b0b19 SHA512 ba738129f70dd171b3fae385ab44317f62c9041a116bfe809d6d07c99ea69c663ad5d598552a17be0b942251ce12a68f34d0be21b303b256055849a6dde90043 WHIRLPOOL 4dd068749c86542e39b8fc42b45bbb56e885813b17876d3583cb4d91c902ff075e1f16f1c19720e3430dc149c40e52e7d1ab3323f666263fb353a59e2ef94a8e
+DIST xbmc-12-libav.tar.xz 6080 SHA256 84ba05dc66a476d2cb940c10355a22a04c5ef3b4fd6bd96a87a1fb2ffa7ccc0c SHA512 cde76dd435fb449ec843aaaa41a46f0fb4efeeb753669f9e4d052c06f00fe512be9fe994d5dd56794f47ce2f49146a2782f2da72dd78a1f66e5f54ca15723f13 WHIRLPOOL 07ba9e3fb3a4ba6d2c52055bcbe52009a87363bc8e0b21ebc90965bd3562196eee728103028fe8baaad250def5c6f76616a19731f825955648df9ff01c905e6b
+DIST xbmc-12.1.tar.gz 67430677 SHA256 29e3f36e1884913088f786179a4c925f52e46e9ba7bf8f24e35e934177c01ec3 SHA512 a8b5194766e32e09fa65c0e3656ff180c15761ce2348dc8a1fff0c65247b47e644db4fc91a829e73907b6a52c8e1bdebf624640b9dd06cea2c46bda1d2b3b4a5 WHIRLPOOL 13dbaf040faaaef1b04da892949e9684d7a958cec286b3a5f8cb449ec0fea6b5f96c2a473ece840b86103eb03dd1f39dd66411e5b0526785256d2cc92e1e95e8
+DIST xbmc-12.2.tar.gz 67663000 SHA256 b2330634fc513d27a44b131bbbe4ca6b61d60a1fe6c7ca27a7dc749df0bcea1c SHA512 d6812886b4d1a5c28c8150b164d714f8855ccb1ac4e74811c9eb03d09e12a6f05bedd3c034132ae79e0bff66efd54ced9c2c1140da6b4ad7b82dbb90fa3d1c39 WHIRLPOOL c3fc97e5f45a38a259bca06af0b171630ac16832034410e45174d900358b1d16b72940b29475dcad72a2198d8722859a229152379ab7784a7d61f961eb261ddb
+DIST xbmc-12.3-generated-addons.tar.xz 52228 SHA256 477f789dea36969149fe118ecac1c4f3d8c3414772cc6c569be4aefb7e3f221e SHA512 2107271445c0cdcc14b348d011e12ffaaee75bbec506496798f64218256ab9e86cc0ada5edc1e70e509ac1ab366695fae4c15e90bd47fa57ccfe723d7e406b85 WHIRLPOOL 3963577539dee04f33dc4b988944f906688d77864d5e6a6b403e4578c9a91f2b77c256e6b4ed234a9722524c1c3acc626a28ff44c6376c09d93f24008abf54cd
+DIST xbmc-12.3.tar.gz 64615159 SHA256 3e15c960d034efdea5f92a7b74716cb48094842d077b076025fd8640754ede73 SHA512 abe5333f940460a2d40b04a4821f932b44c7605e0d4954e48781317aa25ee04e102b051165842094c5804024c637ca30506773dc3319aba7ab6dbfbe1973ccaa WHIRLPOOL 035cf5792c3c9785eb0a5227406c66298591bafc1251889d4e4a2742ffd715c374c0b6e092f5705db181412de9cae6d1eb3e9c370f3390858b4651f4c135fda1
+DIST xbmc-13.0_r2-generated-addons.tar.xz 312524 SHA256 82e2c219a09a758c5cc7a29c4e719c48255523ee79e2ac9fe72d39b45730e32e SHA512 1399b922711424844756d4f56696ea4be34b3ffbeedfc23bb832cb8e0ee9d6831f1c31ebc41d49f20c262f0cbb52601786e33550d5aca5de4de520fcee0f53ec WHIRLPOOL 67f184b241e90c369cee7ceaf3f714c002093a5b4e82614cd1413af35e7c3aef1adb2460d9286c54a40e5a74de37864eff86d5631e0a0ea33a69e3b29082e477
+DIST xbmc-13.0_r2.tar.gz 65616107 SHA256 663b99f3e196ead51d90f06ccfa864b4e5ade385dfc5972acb0f854d525f2903 SHA512 c56d11959797f4c6c3b1831afeab03332913fe6cc00f2542c45af725fe932ba3b997c2af997a602665734a6bcc061c40b8e876144894fdeab91b56df98958433 WHIRLPOOL 394b76c9d20dd90a0d04306d301d4bb656fe99afab6e7392d6274bd3eb8c9a3083bfe192f3850f6ea7123ed537baa64f658a48b14eee68b8226b4e620a76d199
+DIST xbmc-13.1-generated-addons.tar.xz 54968 SHA256 fb0c265640e8d468ed094d83be5089274b7effc1ad1946c42ce21d831442d00e SHA512 7081e25621141eaf76d552fe648fcf9ff4697fc76991b2081806ae829af6094012194cfab93b0c836242197ded00ff88458b89ed6008532b38552d3114d2a776 WHIRLPOOL d83a4290af3e9a2a88dccf074d73692e34a9877d2ff7ff6a946a601b0c8e9d01105eb04bf1d28f62bf648d7221df787b42e52b416f2e924bfa5208342b3ef51a
+DIST xbmc-13.1.tar.gz 65758346 SHA256 344b604eae2ddb47c032dd7964d01f27e6fcd7a8873c84c0841d5da75961a678 SHA512 918126a85a8194dd49d5c82a5a56d2006b811ff5fca535e95bcc5ef4ab135c5907d01595c2ceb4accdc69aef5afc621adae249a1fef85425945560a646e970b0 WHIRLPOOL d429dd9a03974aedd5cd256f0cf1409dcf7434ec1bafeaa0fcdaaa0d8bb08442183143d514d33b1de4934a5e800b03a8f64df5abdd7203d8a0557638e124b53a
+DIST xbmc-13.2-generated-addons.tar.xz 55008 SHA256 26d72e282f0458acb48b283edc27f7b71fc3f285344b8d4df6835a2520ae5650 SHA512 7b77bc22e0c665b74d90276cfa8b827222b22930f4d3bf335191dd5a8123f8bd74367de123199e124b02c7075aa81536058ace38926f4c03d0449ea55fd83254 WHIRLPOOL 449fe73e5ca7f5d973fb1d49e4e84f47955bced804bfea93a5bda67481af096dfa10581435fd84a26d59cb30f4b0eedd7096c905d5b1749286f85b042f90b626
+DIST xbmc-13.2.tar.gz 65900491 SHA256 acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585 SHA512 83a514410748b05da4c626caff34fec7b6b26a8bdea9f158e1c75721d3a47d36eb1f97ed4c162f6c2472a97f658e3b5285c1e0b144bfb4f654932586eee4d1c8 WHIRLPOOL 54e8551fa8393b9fd1076572e87b4d5a7e1b52acaa0443d14cfc8ed08e69a2efb86e3bb2cbe97d8894989ad7f892f512649165089e3d1035307f8cc820772e6f
+DIST xbmc_backports-12-1.tar.bz2 5010 SHA256 a222c32f5a4a0a8690b1544674cfbfeddf81943e85b6ea716768b83c9eba5fa8 SHA512 19b29808f7a3a7b0642f8463bdd229041588d2f42952fe55a17ab69b5b259cde249eb763598893463218d0ab6c747bf3c81e045bdbf5655f9f5f2d2067cb35d2 WHIRLPOOL cc6870dabca8b53a1a6055a4218a8f9bbb2c031ab3b928040325fb121ea75ae6db431542660d28c3bc6900a904e2c0949d69651b2f63faffe8bc7f670d519f06
diff --git a/media-tv/xbmc/files/generate.sh b/media-tv/xbmc/files/generate.sh
new file mode 100755
index 00000000000..68d1082bcae
--- /dev/null
+++ b/media-tv/xbmc/files/generate.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -eux
+
+PV=$1
+PN=xbmc
+P="${PN}-${PV}"
+DISTDIR="/usr/portage/distfiles"
+GITDIR="/usr/local/src/xbmc/git"
+
+if [[ ${PV} != "9999" ]] ; then
+ rm -rf ${PN}-*/
+ tar xf ${DISTDIR}/${P}.tar.gz
+ d=$(echo ${PN}-*/)
+else
+ stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d)
+ P+="-${stamp}"
+ cd ${GITDIR}
+ d=.
+fi
+make -C ${d} -j -f codegenerator.mk
+tar="${DISTDIR}/${P}-generated-addons.tar.xz"
+tar cf - ${d}/xbmc/interfaces/python/generated/*.cpp | xz > "${tar}"
+if [[ ${PV} != "9999" ]] ; then
+ rm -rf ${PN}-*/
+fi
+
+du -b "${tar}"
diff --git a/media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch b/media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch
new file mode 100644
index 00000000000..b6a2d731dc1
--- /dev/null
+++ b/media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch
@@ -0,0 +1,41 @@
+From 4d74bd14c0fa158c5a2bcf18192f418fafc3a053 Mon Sep 17 00:00:00 2001
+From: Tomas Chvatal <tchvatal@suse.cz>
+Date: Fri, 23 Mar 2012 11:59:02 +0100
+Subject: [PATCH 1/2] Add support for new ffmpeg-10/11 api.
+
+---
+ configure.in | 3 +++
+ lib/DllAvUtil.h | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index bca9239..bea66ac 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1225,6 +1225,9 @@ if test "$use_external_ffmpeg" = "yes"; then
+ # old FFmpeg have this in libavcodec/opt.h instead:
+ AC_CHECK_HEADERS([libavutil/opt.h])
+
++ # new FFmpeg have math headers
++ AC_CHECK_HEADERS([libavutil/mathematics.h],,)
++
+ # We'll support the use of rgb2rgb.h if it exists.
+ AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
+ AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
+diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h
+index e882cac..e3b8a02 100644
+--- a/lib/DllAvUtil.h
++++ b/lib/DllAvUtil.h
+@@ -59,6 +59,9 @@ extern "C" {
+ #else
+ #include <ffmpeg/mem.h>
+ #endif
++ #if (defined HAVE_LIBAVUTIL_MATHEMATICS_H)
++ #include <libavutil/mathematics.h>
++ #endif
+ #else
+ #include "libavutil/avutil.h"
+ #include "libavutil/crc.h"
+--
+1.7.3.4
+
diff --git a/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch b/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch
new file mode 100644
index 00000000000..51372fdc1db
--- /dev/null
+++ b/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/406215
+
+From 97212837ec81c3869ba60e0690f26c09b9428747 Mon Sep 17 00:00:00 2001
+From: Tomas Chvatal <tchvatal@suse.cz>
+Date: Fri, 30 Mar 2012 10:00:46 +0200
+Subject: [PATCH] Ensure we include proper header on ffmpeg.
+
+---
+ configure.in | 3 +++
+ lib/DllAvFilter.h | 6 +++++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index bca9239..d209f80 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1229,6 +1229,9 @@ if test "$use_external_ffmpeg" = "yes"; then
+ AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
+ AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
+
++ # check for avcodec header as it is not present on libav
++ AC_CHECK_HEADERS([libavfilter/avcodec.h],,)
++
+ # Check if AVFilterBufferRefVideoProps AVRational member is named
+ # 'pixel_aspect' or 'sample_aspect_ratio'.
+ AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
+diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
+index 827746e..d47623b 100644
+--- a/lib/DllAvFilter.h
++++ b/lib/DllAvFilter.h
+@@ -48,7 +48,11 @@ extern "C" {
+ #endif
+ /* for av_vsrc_buffer_add_frame */
+ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
+- #include <libavfilter/vsrc_buffer.h>
++ #if defined(HAVE_LIBAVFILTER_AVCODEC_H)
++ #include <libavfilter/avcodec.h>
++ #else
++ #include <libavfilter/vsrc_buffer.h>
++ #endif
+ #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+ int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
+ AVFrame *frame);
+--
+1.7.3.4
+
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav.patch b/media-tv/xbmc/files/xbmc-11.0-libav.patch
new file mode 100644
index 00000000000..0aaa1ce4184
--- /dev/null
+++ b/media-tv/xbmc/files/xbmc-11.0-libav.patch
@@ -0,0 +1,72 @@
+https://bugs.gentoo.org/406215
+
+From c74abc298e2075f431d9fa700fcfc5e1bbbddf22 Mon Sep 17 00:00:00 2001
+From: Tomas Chvatal <tchvatal@suse.cz>
+Date: Fri, 23 Mar 2012 12:08:53 +0100
+Subject: [PATCH 2/2] Add support for libav api as it sligthly differ.
+
+The libav use micro version as 0
+The ffmpeg use the micro version as 100+
+
+Simply check if the variable is defined then it is not libav.
+---
+ lib/DllAvFilter.h | 10 +++++++++-
+ .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 ++++
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
+index 302e35c..827746e 100644
+--- a/lib/DllAvFilter.h
++++ b/lib/DllAvFilter.h
+@@ -48,7 +48,7 @@ extern "C" {
+ #endif
+ /* for av_vsrc_buffer_add_frame */
+ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
+- #include <libavfilter/avcodec.h>
++ #include <libavfilter/vsrc_buffer.h>
+ #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+ int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
+ AVFrame *frame);
+@@ -83,7 +83,11 @@ public:
+ virtual int avfilter_poll_frame(AVFilterLink *link)=0;
+ virtual int avfilter_request_frame(AVFilterLink *link)=0;
+ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
++#if LIBAVFILTER_VERSI